diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2021-03-09 17:13:10 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2021-03-09 17:13:10 +0100 |
commit | f3a02b2ceec9cabc4bdde0426ec0d5c084f69b45 (patch) | |
tree | 65587b92e729f3d5b46aecc698ba0649898228b4 /.local/bin/dmlog | |
parent | new script (diff) | |
download | dotfiles-bsd-f3a02b2ceec9cabc4bdde0426ec0d5c084f69b45.tar.gz dotfiles-bsd-f3a02b2ceec9cabc4bdde0426ec0d5c084f69b45.tar.bz2 dotfiles-bsd-f3a02b2ceec9cabc4bdde0426ec0d5c084f69b45.tar.xz dotfiles-bsd-f3a02b2ceec9cabc4bdde0426ec0d5c084f69b45.tar.zst dotfiles-bsd-f3a02b2ceec9cabc4bdde0426ec0d5c084f69b45.zip |
new scripts
Diffstat (limited to '.local/bin/dmlog')
-rwxr-xr-x | .local/bin/dmlog | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/.local/bin/dmlog b/.local/bin/dmlog index 423bc2e..b87bbf5 100755 --- a/.local/bin/dmlog +++ b/.local/bin/dmlog @@ -9,11 +9,11 @@ use constant { SHUTDOWN_PATH => '/sbin/shutdown' }; use constant LIST => [ - "Lock screen", - "Sleep", - "Logout", - "Shutdown", - "Reboot" + 'Lock screen', + 'Sleep', + 'Logout', + 'Shutdown', + 'Reboot' ]; use constant CONFIRM => [ "No", @@ -29,7 +29,7 @@ sub confirm for (@{+CONFIRM}) { $list .= $_ . "\n"; } - $choice = `printf "%s" "$list" | dmenu -p "$var:"`; + $choice = `printf "%s" "$list" | dmenu -i -p "$var?" -l 2 -m 0`; chomp $choice; if ($choice eq ${+CONFIRM}[1]) { return (1); @@ -51,7 +51,7 @@ sub action if (not $pid) { exec(SLOCK_PATH); } - els{ + else { exec(ACPI_PATH, '-s', '3'); } } @@ -81,7 +81,7 @@ sub main for (@{+LIST}) { $list .= $_ . "\n"; } - $choice = `printf "%s" "$list" | dmenu`; + $choice = `printf "%s" "$list" | dmenu -i -l 5 -m 0`; action($choice); return (0); } |