summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmlog
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2022-04-23 01:25:46 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2022-04-23 01:25:46 +0200
commit575db6052aa15cf135d1bea9efd04d4edef1b062 (patch)
tree2005b91d281d02b0aa757116cdd123b9093820f6 /.local/bin/dmlog
parentncmpc keys update and more (diff)
downloaddotfiles-bsd-575db6052aa15cf135d1bea9efd04d4edef1b062.tar.gz
dotfiles-bsd-575db6052aa15cf135d1bea9efd04d4edef1b062.tar.bz2
dotfiles-bsd-575db6052aa15cf135d1bea9efd04d4edef1b062.tar.xz
dotfiles-bsd-575db6052aa15cf135d1bea9efd04d4edef1b062.tar.zst
dotfiles-bsd-575db6052aa15cf135d1bea9efd04d4edef1b062.zip
udpate
Diffstat (limited to '')
-rwxr-xr-x.local/bin/dmlog6
1 files changed, 5 insertions, 1 deletions
diff --git a/.local/bin/dmlog b/.local/bin/dmlog
index 51edb8a..cc0f736 100755
--- a/.local/bin/dmlog
+++ b/.local/bin/dmlog
@@ -7,7 +7,8 @@ use constant {
ACPI_PATH => '/usr/sbin/acpiconf',
KILL_PATH => '/usr/bin/killall',
SHUTDOWN_PATH => '/sbin/shutdown',
- NOTIF_PATH => '/usr/local/bin/notify-send'
+ NOTIF_PATH => '/usr/local/bin/notify-send',
+ EMACS_PATH => '/usr/local/bin/emacsclient'
};
use constant LIST => [
'Lock screen',
@@ -58,16 +59,19 @@ sub action
}
elsif ($var eq ${+LIST}[2]) {
if (confirm($var) == 1) {
+ system(EMACS_PATH, '-e', '(save-buffers-kill-terminal)');
exec(KILL_PATH, 'dwm');
}
}
elsif ($var eq ${+LIST}[3]) {
if (confirm($var) == 1) {
+ system(EMACS_PATH, '-e', '(save-buffers-kill-terminal)');
exec(SHUTDOWN_PATH, '-r', 'now');
}
}
elsif ($var eq ${+LIST}[4]) {
if (confirm($var) == 1) {
+ system(EMACS_PATH, '-e', '(save-buffers-kill-terminal)');
system(
NOTIF_PATH,
'-u',