From 683564bd058884356491b7b847f5d2e204207389 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Mon, 19 Nov 2018 14:13:18 +0100 Subject: Initial scripts commit. --- systemControl.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 systemControl.sh (limited to 'systemControl.sh') diff --git a/systemControl.sh b/systemControl.sh new file mode 100644 index 0000000..2b4125f --- /dev/null +++ b/systemControl.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# A dmenu prompt script to control system functions. + +options="lock\nreboot\nshutdown\nexit i3" + +chosen=$(echo -e "$options" | dmenu \ +-i \ +-p ">_" \ +-nb "#000000" \ +-nf "#60ff00" \ +-sb "#60f000" \ +-sf "#000000") + +case "$chosen" in + lock) i3lock -i ~/images/wallpapers/lockbg.png -f ;; + reboot) bash ~/scripts/prompt.sh Reboot? reboot ;; + shutdown) bash ~/scripts/prompt.sh Shutdown? "shutdown now" ;; + "exit i3") bash ~/scripts/prompt.sh "Exit i3? (ends X session)" "i3-msg exit" ;; +esac -- cgit v1.2.1