From 3e8f0c71297ef8a0168ed2df98f373daaac8ed75 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 28 Jul 2022 16:41:46 +0200 Subject: CDE --- .local/bin/dmlog | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to '.local') diff --git a/.local/bin/dmlog b/.local/bin/dmlog index 9be8cf6..786d59b 100755 --- a/.local/bin/dmlog +++ b/.local/bin/dmlog @@ -3,12 +3,13 @@ use strict; use warnings; use constant { - SLOCK_PATH => 'slock', - ACPI_PATH => 'acpiconf', - KILL_PATH => 'killall', - SHUTDOWN_PATH => 'shutdown', - NOTIF_PATH => 'notify-send', - EMACS_PATH => 'emacsclient' + SLOCK_PATH => 'slock', + XSCREENSAVER_PATH => 'xscreensaver-command', + ACPI_PATH => 'acpiconf', + KILL_PATH => 'killall', + SHUTDOWN_PATH => 'shutdown', + NOTIF_PATH => 'notify-send', + EMACS_PATH => 'emacsclient' }; use constant LIST => [ 'Lock screen', @@ -46,12 +47,12 @@ sub action chomp $var; if ($var eq ${+LIST}[0]) { - exec(SLOCK_PATH); + exec(XSCREENSAVER_PATH, '-lock'); } elsif ($var eq ${+LIST}[1]) { $pid = fork(); if (not $pid) { - exec(SLOCK_PATH); + exec(XSCREENSAVER_PATH, '-lock'); } else { system( -- cgit v1.2.3