voidrice/.local/bin/sysact
mokulus ea61ca6366
Squashed commit of the following: (#600)
commit 8f7b5b2e1e0c93db6620f163e944a14558fba652
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sun Apr 26 07:23:41 2020 +0200

    Fix sysact when there are multiple spaces.

commit dd0133304c55eec117c4e03f38317f332ad8970f
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sun Apr 26 07:22:55 2020 +0200

    Remove trailing newline

    So there is no empty selection at the end in dmenu.

commit 2ab45df225695f9c64031d52ff48d837bb9a6e72
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sun Apr 26 07:22:22 2020 +0200

    Exit when escaping dmenu.

commit e8209da3e809ac830844b89e7638d695cd61240f
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sun Apr 26 07:19:18 2020 +0200

    Revert "Fix sysact"

    This reverts commit 90a2147c0a2463122a5f0cc3ff14de0cceb66135.

commit 8dba47f7462d04a49282be33ae9ce68eb7d8d476
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sun Apr 26 07:18:57 2020 +0200

    Revert "Change tab to spaces."

    This reverts commit 2e480b32ba90c793771d87d47d7273bcdc180e12.

commit 2e480b32ba90c793771d87d47d7273bcdc180e12
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sat Apr 25 11:35:55 2020 +0200

    Change tab to spaces.

commit 90a2147c0a2463122a5f0cc3ff14de0cceb66135
Author: MateuszOkulus <mateusz.okulus@protonmail.com>
Date:   Sat Apr 25 11:25:50 2020 +0200

    Fix sysact

    See #584. It now uses # so it's clearly visible.
2020-04-28 08:50:57 -04:00

14 lines
331 B
Bash
Executable file

#!/bin/sh
# A dmenu wrapper script for system functions.
cmds="\
lock screen slock
leave dwm kill -TERM $(pidof -s dwm)
refresh dwm kill -HUP $(pidof -s dwm)
reboot sudo -A reboot
shutdown sudo -A shutdown -h now"
choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" || exit 1
`echo "$cmds" | grep "^$choice " | cut -d ' ' -f2-`