diff options
author | Joe <bousset.rudy@gmail.com> | 2023-01-31 21:13:10 +0100 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2023-01-31 21:13:10 +0100 |
commit | ae83bf5ca77c4cb3b6f219456e92d4c5e0f8fc9f (patch) | |
tree | 7341031ed0f84167350e95f48397761ef6544ad9 /.local/bin/dmlog | |
parent | fbsd merge (diff) | |
parent | up (diff) | |
download | dotfiles-bsd-ae83bf5ca77c4cb3b6f219456e92d4c5e0f8fc9f.tar.gz dotfiles-bsd-ae83bf5ca77c4cb3b6f219456e92d4c5e0f8fc9f.tar.bz2 dotfiles-bsd-ae83bf5ca77c4cb3b6f219456e92d4c5e0f8fc9f.tar.xz dotfiles-bsd-ae83bf5ca77c4cb3b6f219456e92d4c5e0f8fc9f.tar.zst dotfiles-bsd-ae83bf5ca77c4cb3b6f219456e92d4c5e0f8fc9f.zip |
Merge branch 'master' of gitjoe.xyz:dotfiles-bsd
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/dmlog | 17 |
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'); } |