misc scripts & programs
1#!/usr/bin/env bash
2#
3# https://github.com/BreadOnPenguins/scripts/blob/master/dmenu_sys
4
5case "$(printf "kill\nzzz\nreboot\nshutdown" | dmenu -i -c -l 4)" in
6 kill) ps -u $USER -o pid,comm,%cpu,%mem | dmenu -i -c -l 10 -p Kill: | awk '{print $1}' | xargs -r kill ;;
7 zzz) systemctl suspend -i ;;
8 reboot) systemctl reboot -i ;;
9 shutdown) shutdown now ;;
10 *) exit 1 ;;
11esac