diff options
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/dmbookm | 4 | ||||
-rwxr-xr-x | .local/bin/dmlog | 22 | ||||
-rwxr-xr-x | .local/bin/dmrun | 19 |
3 files changed, 37 insertions, 8 deletions
diff --git a/.local/bin/dmbookm b/.local/bin/dmbookm index 7c9dbd2..e43d565 100755 --- a/.local/bin/dmbookm +++ b/.local/bin/dmbookm @@ -15,6 +15,10 @@ use constant { use constant LIST => { graf => 'http://graf.joe.town/', zhinu => 'https://zhinu.jozan.org/', + perplexity => 'https://perplexity.ai/', + chatgpt => 'https://chatgpt.com/', + discord => 'https://discord.com/', + protondb => 'https://www.protondb.com/', nua_grafana => 'https://grafana.nuabee.fr/', nua_gr_linux_servers => 'https://grafana.nuabee.fr/d/xfpJB9FGz/linux-servers', nua_gr_restops => 'https://grafana.nuabee.fr/d/Mz11bd07k/vue-d-ensemble-machines-atelier', diff --git a/.local/bin/dmlog b/.local/bin/dmlog index 632f518..756d9b9 100755 --- a/.local/bin/dmlog +++ b/.local/bin/dmlog @@ -29,14 +29,15 @@ use constant CONFIRM => [ sub confirm { - my ($var) = @_; + my ($var, $color) = @_; my $list; my $choice; for (@{+CONFIRM}) { $list .= $_ . "\n"; } - $choice = `printf "%s" "$list" | dmenu -i -p "$var?"`; + $choice = `printf "%s" "$list" | \ + dmenu -i -p "$var?" -sb '$color' -shb '$color'`; chomp $choice; if ($choice eq ${+CONFIRM}[1]) { return (1); @@ -46,7 +47,7 @@ sub confirm sub action { - my ($var) = @_; + my ($var, $color) = @_; my $pid; chomp $var; @@ -77,7 +78,7 @@ sub action } } elsif ($var eq ${+LIST}[2]) { - if (confirm($var) == 1) { + if (confirm($var, $color) == 1) { if (HOSTNAME eq 'mother') { exec(LOGINCTL_PATH, 'terminate-session', 'self'); } @@ -85,7 +86,7 @@ sub action } } elsif ($var eq ${+LIST}[3]) { - if (confirm($var) == 1) { + if (confirm($var, $color) == 1) { if (HOSTNAME eq 'mother') { exec(LOGINCTL_PATH, 'reboot'); } @@ -103,7 +104,7 @@ sub action } } elsif ($var eq ${+LIST}[4]) { - if (confirm($var) == 1) { + if (confirm($var, $color) == 1) { system( NOTIF_PATH, '-u', @@ -128,12 +129,17 @@ sub main { my $list; my $choice; + my $color; + $color = '#cc241d'; + if (@ARGV == 1) { + $color = $ARGV[0]; + } for (@{+LIST}) { $list .= $_ . "\n"; } - $choice = `printf "%s" "$list" | dmenu -i`; - action($choice); + $choice = `printf "%s" "$list" | dmenu -i -sb '$color' -shb '$color'`; + action($choice, $color); return (0); } diff --git a/.local/bin/dmrun b/.local/bin/dmrun new file mode 100755 index 0000000..f47c232 --- /dev/null +++ b/.local/bin/dmrun @@ -0,0 +1,19 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +sub main +{ + my $color; + + $color = '#cc241d'; + if (@ARGV == 1) { + $color = $ARGV[0]; + } + return exec("dmenu_run -i -sb '$color' -shb '$color'"); +} + +main(); + +__END__ |