From c09d91fe95fca4367f47c06fc808cd02a1a8e6a5 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Tue, 13 Aug 2019 14:40:54 -0400 Subject: add bins --- templates/.bin/pwrman | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 templates/.bin/pwrman (limited to 'templates/.bin/pwrman') diff --git a/templates/.bin/pwrman b/templates/.bin/pwrman new file mode 100755 index 0000000..ef0823b --- /dev/null +++ b/templates/.bin/pwrman @@ -0,0 +1,20 @@ +#!/usr/bin/env zsh + +dmenu_fn=Roboto +dmenu_nb="#0e2133" +dmenu_nf="#e6e0cf" +dmenu_sb="#7390bf" +dmenu_sf="#0e2133" + +menu() { + dmenu -fn "$dmenu_fn" -nf "$dmenu_nf" -nb "$dmenu_nb" -sb "$dmenu_sb" -sf "$dmenu_sf" -p "$1" +} + +action=$(echo "lock screen\nreboot\nshutdown" | menu "Action:") +if [[ "$action" == "lock screen" ]]; then + i3lock-fancy -- scrot -z +elif [[ "$action" == "reboot" ]]; then + i3-nagbar -t warning -m "Are you sure you want to reboot?" -B "Reboot" "reboot" +elif [[ "$action" == "shutdown" ]]; then + i3-nagbar -t warning -m "Are you sure you want to shut down?" -B "Shut Down" "sudo shutdown -h now" +fi -- cgit v1.2.3