commit e046b0cccefb6b442574bdcfa7299c2760e56c24
parent 3a2c10d31053eb6e45221652b981a768315af64d
Author: grouse <bdmfegys@duck.com>
Date: Tue, 9 Jan 2024 22:39:29 -0500
add S_TEST and S_TEST_ICON to exitdwm.c, to access restarter script
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/exitdwm.c b/exitdwm.c
@@ -7,6 +7,7 @@ void exitdwm ()
defined S_LOCK || \
defined S_RESTART_DWM || \
defined S_OFFSCREEN || \
+ defined S_TEST || \
defined S_EXIT || \
defined S_REBOOT || \
defined S_SHUTDOWN || \
@@ -14,6 +15,7 @@ void exitdwm ()
defined S_RESTART_DWM_ICON || \
defined S_OFFSCREEN_ICON || \
defined S_EXIT_ICON || \
+ defined S_TEST_ICON || \
defined S_REBOOT_ICON || \
defined S_SHUTDOWN_ICON || \
defined S_FORMAT || \
@@ -24,6 +26,7 @@ void exitdwm ()
# define S_LOCK "Lock"
# define S_RESTART_DWM "restart birdwm"
# define S_OFFSCREEN "Off-screen"
+# define S_TEST "Restarter Script"
# define S_EXIT "Exit"
# define S_REBOOT "Reboot"
# define S_SHUTDOWN "Shutdown"
@@ -31,6 +34,7 @@ void exitdwm ()
# define S_RESTART_DWM_ICON "\uf01e"
# define S_OFFSCREEN_ICON "\uf108"
# define S_EXIT_ICON "\uf2f5"
+# define S_TEST_ICON "\uf0c9"
# define S_REBOOT_ICON "\uf021"
# define S_SHUTDOWN_ICON "\uf011"
@@ -42,6 +46,7 @@ void exitdwm ()
S_FORMAT (LOCK) "\n"
S_FORMAT (RESTART_DWM) "\n"
S_FORMAT (OFFSCREEN) "\n"
+ S_FORMAT (TEST) "\n"
S_FORMAT (EXIT) "\n"
S_FORMAT (REBOOT) "\n"
S_FORMAT (SHUTDOWN)
@@ -64,6 +69,7 @@ void exitdwm ()
else if (strcmp (exit_action, S_RESTART_DWM) == 0) quit (& (const Arg) {1});
else if (strcmp (exit_action, S_OFFSCREEN) == 0) system ("sleep .5; xset dpms force off");
else if (strcmp (exit_action, S_EXIT) == 0) quit (& (const Arg) {0});
+ else if (strcmp (exit_action, S_TEST) == 0) system ("restarter");
else if (strcmp (exit_action, S_REBOOT) == 0) system ("systemctl reboot");
else if (strcmp (exit_action, S_SHUTDOWN) == 0) system ("systemctl poweroff -i");
@@ -74,12 +80,14 @@ close_streams:
# undef S_RESTART_DWM
# undef S_OFFSCREEN
# undef S_EXIT
+# undef S_TEST
# undef S_REBOOT
# undef S_SHUTDOWN
# undef S_LOCK_ICON
# undef S_RESTART_DWM_ICON
# undef S_OFFSCREEN_ICON
# undef S_EXIT_ICON
+# undef S_TEST_ICON
# undef S_REBOOT_ICON
# undef S_SHUTDOWN_ICON
# undef S_FORMAT