2019-09-07 20:29:36 -04:00
|
|
|
#!/bin/bash
|
2019-11-11 17:34:19 -05:00
|
|
|
# ____ _____
|
2019-09-07 20:29:36 -04:00
|
|
|
# | _ \_ _| Derek Taylor (DistroTube)
|
|
|
|
# | | | || | http://www.youtube.com/c/DistroTube
|
2019-11-11 17:34:19 -05:00
|
|
|
# | |_| || | http://www.gitlab.com/dwt1/
|
|
|
|
# |____/ |_|
|
2019-09-07 20:29:36 -04:00
|
|
|
#
|
|
|
|
# Dmenu script for launching system monitoring programs.
|
|
|
|
|
|
|
|
|
2019-11-11 17:34:19 -05:00
|
|
|
declare -a options=("htop
|
|
|
|
glances
|
|
|
|
gtop
|
|
|
|
iftop
|
|
|
|
iotop
|
|
|
|
iptraf-ng
|
|
|
|
nmon
|
|
|
|
s-tui
|
|
|
|
quit")
|
2019-09-07 20:29:36 -04:00
|
|
|
|
|
|
|
choice=$(echo -e "${options[@]}" | dmenu -l -i -p 'System monitors: ')
|
|
|
|
|
2019-11-11 17:34:19 -05:00
|
|
|
case $choice in
|
|
|
|
quit)
|
|
|
|
echo "Program terminated." && exit 1
|
|
|
|
;;
|
|
|
|
htop| \
|
|
|
|
glances| \
|
|
|
|
gtop| \
|
|
|
|
nmon| \
|
|
|
|
s-tui)
|
|
|
|
exec st -e $choice
|
|
|
|
;;
|
|
|
|
iftop| \
|
|
|
|
iotop| \
|
|
|
|
iptraf-ng)
|
|
|
|
exec st -e gksu $choice
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|