summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmlog
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-15 12:41:33 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-15 12:41:33 +0200
commit85112f4c20e5aff86639e78e7c45bc42d0418ad1 (patch)
treeaf279620f7e5396603ae368d29cba7debcfe6c84 /.local/bin/dmlog
parentupdate (diff)
downloaddotfiles-bsd-85112f4c20e5aff86639e78e7c45bc42d0418ad1.tar.gz
dotfiles-bsd-85112f4c20e5aff86639e78e7c45bc42d0418ad1.tar.bz2
dotfiles-bsd-85112f4c20e5aff86639e78e7c45bc42d0418ad1.tar.xz
dotfiles-bsd-85112f4c20e5aff86639e78e7c45bc42d0418ad1.tar.zst
dotfiles-bsd-85112f4c20e5aff86639e78e7c45bc42d0418ad1.zip
Cool dmlog update
Diffstat (limited to '.local/bin/dmlog')
-rwxr-xr-x.local/bin/dmlog10
1 files changed, 9 insertions, 1 deletions
diff --git a/.local/bin/dmlog b/.local/bin/dmlog
index ff55f25..5d9abc8 100755
--- a/.local/bin/dmlog
+++ b/.local/bin/dmlog
@@ -6,7 +6,8 @@ use constant {
SLOCK_PATH => '/usr/local/bin/slock',
ACPI_PATH => '/usr/sbin/acpiconf',
KILL_PATH => '/usr/bin/killall',
- SHUTDOWN_PATH => '/sbin/shutdown'
+ SHUTDOWN_PATH => '/sbin/shutdown',
+ NOTIF_PATH => '/usr/local/bin/notify-send'
};
use constant LIST => [
'Lock screen',
@@ -67,6 +68,13 @@ sub action
}
elsif ($var eq ${+LIST}[4]) {
if (confirm($var) == 1) {
+ system(
+ NOTIF_PATH,
+ '-u',
+ 'normal',
+ 'shutdown',
+ 'Farwell, partner!'
+ );
exec(SHUTDOWN_PATH, '-p', 'now');
}
}