major restructuring for using snowfall

This commit is contained in:
2024-02-01 12:42:15 +01:00
parent d8e53f1f78
commit 67d23bcd9e
87 changed files with 24 additions and 164 deletions

View File

@ -0,0 +1,21 @@
#!/bin/perl
use strict;
use warnings;
my $message="System (l) lock, (e) logout, (r) reboot, (s) shutdown";
my $screen_height=1080;
my $message_height=34;
my %actions;
$actions{"l"} = "i3lock --ignore-empty-password --color 000000";
$actions{"e"} = "pkill leftwm";
$actions{"r"} = "systemctl reboot";
$actions{"s"} = "systemctl poweroff";
my @dzen_actions;
while ((my $key, my $action) = each (%actions)){
push @dzen_actions, "key_$key=exit,exec:$action";
}
my $joined_actions = join(";", @dzen_actions);
print "$joined_actions";
`echo "$message" | dzen2 -h $message_height -p -y $screen_height -e "onstart=grabkeys;key_Escape=exit;key_Return=exit;button1=exit;$joined_actions"`;