summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmlog
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2021-03-09 17:13:10 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2021-03-09 17:13:10 +0100
commitf3a02b2ceec9cabc4bdde0426ec0d5c084f69b45 (patch)
tree65587b92e729f3d5b46aecc698ba0649898228b4 /.local/bin/dmlog
parentnew script (diff)
downloaddotfiles-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 '')
-rwxr-xr-x.local/bin/dmlog16
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);
}