summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmlog
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dmlog')
-rwxr-xr-x.local/bin/dmlog11
1 files changed, 7 insertions, 4 deletions
diff --git a/.local/bin/dmlog b/.local/bin/dmlog
index d209ee5..600e4d4 100755
--- a/.local/bin/dmlog
+++ b/.local/bin/dmlog
@@ -64,7 +64,8 @@ sub action
"-fail-color", "0xcc241d");
}
else {
- exec(XSCREENSAVER_PATH, '-lock');
+ exec(SLOCK_PATH);
+ # exec(XSCREENSAVER_PATH, '-lock');
}
}
elsif ($var eq ${+LIST}[1]) {
@@ -90,10 +91,11 @@ sub action
);
sleep 2;
if (HOSTNAME eq 'mother') {
+ system('umount', '-f', '/var/dev/ceres');
exec(LOGINCTL_PATH, 'suspend');
}
elsif (HOSTNAME eq 'po-rbo') {
- exec('systemctl', 'suspend');
+ exec('doas', 'systemctl', 'suspend');
}
exec(ACPI_PATH, '-s', '3');
}
@@ -109,10 +111,11 @@ sub action
elsif ($var eq ${+LIST}[3]) {
if (confirm($var, $color) == 1) {
if (HOSTNAME eq 'mother') {
+ system('umount', '-f', '/var/dev/ceres');
exec(LOGINCTL_PATH, 'reboot');
}
elsif (HOSTNAME eq 'po-rbo') {
- exec('systemctl', 'reboot');
+ exec('doas', 'systemctl', 'reboot');
}
system(
NOTIF_PATH,
@@ -138,7 +141,7 @@ sub action
exec(LOGINCTL_PATH, 'poweroff');
}
elsif (HOSTNAME eq 'po-rbo') {
- exec('systemctl', 'poweroff');
+ exec('doas', 'systemctl', 'poweroff');
}
exec(SHUTDOWN_PATH, '-p', 'now');
}