From 0eedeb37d60acad439ad4f63a434493a23491ce4 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Sun, 26 Mar 2023 10:05:49 -0400 Subject: [PATCH] Session Control, AwesomeWM Tweaks, & Presentation Mode - Exclude awesome bar from rounded corners in picom - Add xfce power manager presentation mode switching to game launch and exit scripts - Change session control rofi menu to work with AwesomeWM using remote execution - Change session control rofi menu to use systemctl commands for all non-WM operations - Update awesome config submodule --- .config/awesome | 2 +- .config/picom/picom.conf | 1 + .scripts/game_exit.sh | 1 + .scripts/game_launch.sh | 1 + .scripts/session.sh | 14 +++++++------- README.org | 17 ++++++++++------- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.config/awesome b/.config/awesome index c03126a..3630ca4 160000 --- a/.config/awesome +++ b/.config/awesome @@ -1 +1 @@ -Subproject commit c03126abf86a2392241a842b3b929617e67051dc +Subproject commit 3630ca4c1a2c5b3b701bf89d58d3a8a8d3aa6e22 diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index df7c4c7..a0b2ebf 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -39,6 +39,7 @@ rounded-corners-exclude = [ "class_g = 'Polybar'", "class_g = 'Rofi'", "class_g = 'deadd-notification-center'", + "class_g = 'awesome'", # "class_g = 'code-oss'", #"class_g = 'TelegramDesktop'", # "class_g = 'firefox'", diff --git a/.scripts/game_exit.sh b/.scripts/game_exit.sh index 202f51c..4aa0437 100755 --- a/.scripts/game_exit.sh +++ b/.scripts/game_exit.sh @@ -1,3 +1,4 @@ #!/bin/bash /home/sravan/.scripts/deadd.sh --unpause /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-adaptive +/usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false diff --git a/.scripts/game_launch.sh b/.scripts/game_launch.sh index b4425bf..69e68f8 100755 --- a/.scripts/game_launch.sh +++ b/.scripts/game_launch.sh @@ -2,3 +2,4 @@ /home/sravan/.scripts/picom.sh --off /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-performance /home/sravan/.scripts/deadd.sh --pause +/usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s true diff --git a/.scripts/session.sh b/.scripts/session.sh index cd41555..0de0a20 100755 --- a/.scripts/session.sh +++ b/.scripts/session.sh @@ -11,7 +11,7 @@ help_menu() { rofi_menu() { declare -a options=( - "勒 Restart Dwm - restart" + "勒 Restart AwesomeWM - restart" " Logout - logout" " Lock - lock" "⏾ Sleep - sleep" @@ -42,8 +42,8 @@ main() { help_menu ;; --logout) - notify-send "Session Control" "Logging Out of Dwm" - xdotool key Super+Shift_L+q + notify-send "Session Control" "Logging Out of AwesomeWM" + /usr/bin/awesome-client "awesome.quit()" ;; --lock) notify-send "Session Control" "Locking Session" @@ -55,19 +55,19 @@ main() { ;; --reboot) notify-send "Session Control" "Rebooting System" - reboot + systemctl reboot ;; --shutdown) notify-send "Session Control" "Shutting Down System" - shutdown now + systemctl poweroff ;; --hibernate) notify-send "Session Control" "Hibernating System" systemctl hibernate ;; --restart) - notify-send "Session Control" "Restarting Dwm" - xdotool key Super+Control_L+Shift_L+q + notify-send "Session Control" "Restarting AwesomeWM" + /usr/bin/awesome-client "awesome.restart()" ;; --rofi) rofi_menu diff --git a/README.org b/README.org index 80a5f80..680a04f 100644 --- a/README.org +++ b/README.org @@ -2451,6 +2451,7 @@ rounded-corners-exclude = [ "class_g = 'Polybar'", "class_g = 'Rofi'", "class_g = 'deadd-notification-center'", + "class_g = 'awesome'", # "class_g = 'code-oss'", #"class_g = 'TelegramDesktop'", # "class_g = 'firefox'", @@ -7289,6 +7290,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam /home/sravan/.scripts/picom.sh --off /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-performance /home/sravan/.scripts/deadd.sh --pause +/usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s true #+END_SRC *** Post-Exit Script @@ -7298,6 +7300,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam #+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/game_exit.sh /home/sravan/.scripts/deadd.sh --unpause /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-adaptive +/usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false #+END_SRC *** PlayStation 5 (DualSense) to Xbox 360 Controller Button Mapping @@ -8697,7 +8700,7 @@ help_menu() { rofi_menu() { declare -a options=( - "勒 Restart Dwm - restart" + "勒 Restart AwesomeWM - restart" " Logout - logout" " Lock - lock" "⏾ Sleep - sleep" @@ -8728,8 +8731,8 @@ main() { help_menu ;; --logout) - notify-send "Session Control" "Logging Out of Dwm" - xdotool key Super+Shift_L+q + notify-send "Session Control" "Logging Out of AwesomeWM" + /usr/bin/awesome-client "awesome.quit()" ;; --lock) notify-send "Session Control" "Locking Session" @@ -8741,19 +8744,19 @@ main() { ;; --reboot) notify-send "Session Control" "Rebooting System" - reboot + systemctl reboot ;; --shutdown) notify-send "Session Control" "Shutting Down System" - shutdown now + systemctl poweroff ;; --hibernate) notify-send "Session Control" "Hibernating System" systemctl hibernate ;; --restart) - notify-send "Session Control" "Restarting Dwm" - xdotool key Super+Control_L+Shift_L+q + notify-send "Session Control" "Restarting AwesomeWM" + /usr/bin/awesome-client "awesome.restart()" ;; --rofi) rofi_menu