Added xmonad and leftwm configs
This commit is contained in:
21
leftwm/scripts/dzen_exit_menu.pl
Executable file
21
leftwm/scripts/dzen_exit_menu.pl
Executable 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"`;
|
Reference in New Issue
Block a user