aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2022-02-20 16:43:06 -0800
committerTrumeet <yuuta@yuuta.moe>2022-02-20 16:43:06 -0800
commit1918ebb0713ad69c9ad5af5e68c93cf9ca81ace0 (patch)
tree295254b8ed22a7caa42cb34dd822978d65c46bf8
parent326abc4339ad60799c02b4cc3fdd33a670dcd0f6 (diff)
downloadgists-1918ebb0713ad69c9ad5af5e68c93cf9ca81ace0.tar
gists-1918ebb0713ad69c9ad5af5e68c93cf9ca81ace0.tar.gz
gists-1918ebb0713ad69c9ad5af5e68c93cf9ca81ace0.tar.bz2
gists-1918ebb0713ad69c9ad5af5e68c93cf9ca81ace0.zip
pwrdialog + brightnessctl
-rw-r--r--SystemdGraphicalSession/i3config16
-rwxr-xr-xSystemdGraphicalSession/pwrdialog35
-rw-r--r--SystemdGraphicalSession/xbindkeysrc11
3 files changed, 46 insertions, 16 deletions
diff --git a/SystemdGraphicalSession/i3config b/SystemdGraphicalSession/i3config
index 447f9a5..f13dca1 100644
--- a/SystemdGraphicalSession/i3config
+++ b/SystemdGraphicalSession/i3config
@@ -54,19 +54,3 @@ bar {
font pango:Icons 10
}
bindsym $mod+x [urgent=latest] focus
-set $Locker systemctl --user start i3lock
-set $mode_system System (l) lock, (Shift+e) logout, (Shift+s) suspend, (Shift+h) hibernate, (Ctrl+Shift+r) reboot, (Ctrl+Shift+s) shutdown
-mode "$mode_system" {
- bindsym l exec --no-startup-id $Locker, mode "default"
- bindsym Shift+e exec --no-startup-id systemctl --user stop graphical-session.target
- bindsym Shift+s exec --no-startup-id $Locker && systemctl suspend, mode "default"
- bindsym Shift+h exec --no-startup-id $Locker && systemctl hibernate, mode "default"
- bindsym Control+Shift+r exec --no-startup-id systemctl reboot, mode "default"
- bindsym Control+Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
-
- # back to normal: Enter or Escape
- bindsym Return mode "default"
- bindsym Escape mode "default"
-}
-
-bindsym Control+Mod1+Delete mode "$mode_system"
diff --git a/SystemdGraphicalSession/pwrdialog b/SystemdGraphicalSession/pwrdialog
new file mode 100755
index 0000000..4507e1a
--- /dev/null
+++ b/SystemdGraphicalSession/pwrdialog
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -e
+choice=$(dialog \
+ --clear \
+ --erase-on-exit \
+ --stdout \
+ --backtitle $(hostname) \
+ --title "Power Options" \
+ --menu "Select an option:" 24 50 12 \
+ l "Lock" \
+ e "Logout" \
+ s "S3" \
+ r "Reboot" \
+ h "S5")
+case $choice in
+ l)
+ cmd="exec systemctl --user start i3lock"
+ ;;
+ e)
+ cmd="exec systemctl --user stop graphical-session.target"
+ ;;
+ s)
+ cmd="systemctl --user start i3lock && exec systemctl suspend"
+ ;;
+ r)
+ cmd="exec systemctl reboot"
+ ;;
+ h)
+ cmd="exec systemctl poweroff"
+ ;;
+ *)
+ cmd="exit 1"
+ ;;
+esac
+$cmd
diff --git a/SystemdGraphicalSession/xbindkeysrc b/SystemdGraphicalSession/xbindkeysrc
index e6d6c39..2bed0fd 100644
--- a/SystemdGraphicalSession/xbindkeysrc
+++ b/SystemdGraphicalSession/xbindkeysrc
@@ -71,5 +71,16 @@
"flameshot gui"
Print
+# Brightness
+"brightnessctl -s +5%"
+ XF86MonBrightnessUp
+
+"brightnessctl s 5%-"
+ XF86MonBrightnessDown
+
+# Power Dialog
+"xterm -fullscreen ~/.local/pwrdialog"
+ Control + Mod1 + Delete
+
#
# End of xbindkeys configuration