123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #!/usr/bin/env bash
- set -euo pipefail # bash strict mode
- # ____ _____
- # | _ \_ _| Derek Taylor (DistroTube)
- # | | | || | http://www.youtube.com/c/DistroTube
- # | |_| || | http://www.gitlab.com/dwt1/
- # |____/ |_|
- #
- # Dmenu script for launching system monitoring programs.
- declare -a options=("bashtop
- glances
- gtop
- htop
- iftop
- iotop
- iptraf-ng
- nmon
- s-tui
- quit")
- choice=$(echo -e "${options[@]}" | dmenu -l -i -p 'System monitors: ')
- case $choice in
- quit)
- echo "Program terminated." && exit 1
- ;;
- bashtop| \
- glances| \
- gtop| \
- htop| \
- nmon| \
- s-tui)
- exec st -e $choice
- ;;
- iftop| \
- iotop| \
- iptraf-ng)
- exec st -e gksu $choice
- ;;
- *)
- exit 1
- ;;
- esac
|