summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmlog
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-01-31 11:46:19 +0100
committerJoe <rrbo@proton.me>2023-01-31 11:46:19 +0100
commit7eabc900314cd93042f78123fe12ad2771050333 (patch)
treeb3f6129c0d01a403be68fb5ff156a21204b00ea4 /.local/bin/dmlog
parentup (diff)
downloaddotfiles-bsd-7eabc900314cd93042f78123fe12ad2771050333.tar.gz
dotfiles-bsd-7eabc900314cd93042f78123fe12ad2771050333.tar.bz2
dotfiles-bsd-7eabc900314cd93042f78123fe12ad2771050333.tar.xz
dotfiles-bsd-7eabc900314cd93042f78123fe12ad2771050333.tar.zst
dotfiles-bsd-7eabc900314cd93042f78123fe12ad2771050333.zip
Pop update
Diffstat (limited to '.local/bin/dmlog')
-rwxr-xr-x.local/bin/dmlog17
1 files changed, 12 insertions, 5 deletions
diff --git a/.local/bin/dmlog b/.local/bin/dmlog
index 3d6ccc1..a4c0182 100755
--- a/.local/bin/dmlog
+++ b/.local/bin/dmlog
@@ -62,11 +62,11 @@ sub action
'-u',
'normal',
'shutdown',
- ' G\'night, partner!'
+ ' G\'night, partner!'
);
sleep 2;
if (OS eq 'Linux') {
- exec(LOGINCTL_PATH, 'suspend');
+ exec('systemctl', 'suspend');
}
exec(ACPI_PATH, '-s', '3');
}
@@ -84,8 +84,15 @@ sub action
if (confirm($var) == 1) {
system(EMACS_PATH, '-e', '"(save-buffers-kill-terminal)"');
if (OS eq 'Linux') {
- exec(LOGINCTL_PATH, 'reboot');
+ exec('systemctl', 'reboot');
}
+ system(
+ NOTIF_PATH,
+ '-u',
+ 'normal',
+ 'shutdown',
+ ' Rebootin\', partner!'
+ );
exec(SHUTDOWN_PATH, '-r', 'now');
}
}
@@ -97,11 +104,11 @@ sub action
'-u',
'normal',
'shutdown',
- ' Farewell, partner!'
+ ' Farewell, partner!'
);
sleep 2;
if (OS eq 'Linux') {
- exec(LOGINCTL_PATH, 'poweroff');
+ exec('systemctl', 'poweroff');
}
exec(SHUTDOWN_PATH, '-p', 'now');
}