From c6267bd2101d8e381d76317c36a8879519dcb949 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 19 Nov 2022 21:11:35 +0000 Subject: Also allow for custom scripts to be installed by GNU Stow --- scripts/.local/bin/i3exit | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/.local/bin/i3exit (limited to 'scripts/.local/bin/i3exit') diff --git a/scripts/.local/bin/i3exit b/scripts/.local/bin/i3exit new file mode 100755 index 0000000..9e3f3a1 --- /dev/null +++ b/scripts/.local/bin/i3exit @@ -0,0 +1,30 @@ +#!/bin/sh +lock() { + $HOME/.local/bin/betterlock -$1 blur +} + +case "$1" in + lock) + lock l + ;; + logout) + i3-msg exit + ;; + suspend) + lock s + ;; + hibernate) + lock && systemctl hibernate + ;; + reboot) + systemctl reboot + ;; + shutdown) + systemctl poweroff + ;; + *) + echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}" + exit 2 +esac + +exit 0 -- cgit