session-dmenu (264B) - raw


      1 #!/bin/sh
      2 
      3 cmds="\
      4 lock        | slock
      5 exit        | kill -TERM $(pidof -s dwm)
      6 reboot      | reboot
      7 shutdown    | shutdown now"
      8 
      9 choice="$(echo "$cmds" | sed "s/ *|/|/g" | cut -d'|' -f 1 | dmenu)" || exit 1
     10 
     11 `echo "$cmds" | grep "^$choice *| " | cut -d '|' -f2-`