diff options
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/dmotp | 7 | ||||
-rwxr-xr-x | .local/bin/dmpass | 9 | ||||
-rwxr-xr-x | .local/bin/dmpc | 7 | ||||
-rwxr-xr-x | .local/bin/dmscrot | 7 | ||||
-rwxr-xr-x | .local/bin/dmsearch | 9 |
5 files changed, 31 insertions, 8 deletions
diff --git a/.local/bin/dmotp b/.local/bin/dmotp index b5a36f6..97f015f 100755 --- a/.local/bin/dmotp +++ b/.local/bin/dmotp @@ -1,5 +1,10 @@ #!/bin/sh +color='#cc241d'; +if echo "$1" | grep '^#' 2>&1; then + color="$1" +fi + if [ -n "$WAYLAND_DISPLAY" ]; then dmenu=dmenu-wl xdotool="ydotool type --file -" @@ -14,7 +19,7 @@ fi prefix=${PASSWORD_STORE_DIR-~/.local/share/pass}/otp rprefix=$(printf "%s" $prefix | sed 's/\//\\\//g') password_files=$(ls "$prefix"/*.gpg | sed 's/^'${rprefix}'\///g' | sed 's/\.gpg//g') -password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15) +password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15 -sb "$color" -shb "$color") [ -n "$password" ] || exit diff --git a/.local/bin/dmpass b/.local/bin/dmpass index c0a10ba..d5b0494 100755 --- a/.local/bin/dmpass +++ b/.local/bin/dmpass @@ -1,11 +1,14 @@ #!/bin/sh full=0 +color='#cc241d'; if [ "$1" = "--full" ]; then full=1 - if [ "$2" ]; then + if echo "$2" | grep '^#' 2>&1; then + color="$2" fi -elif [ "$1"]; then +elif echo "$1" | grep '^#' 2>&1; then + color="$1" fi @@ -23,7 +26,7 @@ fi prefix=${PASSWORD_STORE_DIR-~/.local/share/pass} rprefix=$(printf "%s" $prefix | sed 's/\//\\\//g') password_files=$(ls "$prefix"/*.gpg "$prefix"/*/*.gpg | sed 's/^'${rprefix}'\///g' | sed 's/\.gpg//g') -password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15) +password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15 -sb "$color" -shb "$color") [ -n "$password" ] || exit diff --git a/.local/bin/dmpc b/.local/bin/dmpc index f332431..cb741be 100755 --- a/.local/bin/dmpc +++ b/.local/bin/dmpc @@ -9,7 +9,12 @@ sub main my $current; my $prompt; my $queued; + my $color; + $color = '#cc241d'; + if (@ARGV == 1) { + $color = $ARGV[0]; + } $current = `mpc current`; if (not $current) { $current = 'Current: Stopped'; @@ -27,7 +32,7 @@ sub main chomp $current; chomp $queued; $prompt = "toggle\nnext\nprev\nplay\nstop\nclear\nrepeat\nrandom\n\n$current\n$queued\n"; - $action = `printf "$prompt" | dmenu -i -l 11`; + $action = `printf "$prompt" | dmenu -i -l 11 -sb '$color' -shb '$color'`; system("mpc " . $action); return; } diff --git a/.local/bin/dmscrot b/.local/bin/dmscrot index 82b3c27..dcefb70 100755 --- a/.local/bin/dmscrot +++ b/.local/bin/dmscrot @@ -129,11 +129,16 @@ 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 -l 10`; + $choice = `printf "%s" "$list" | dmenu -i -sb '$color' -shb '$color'`; action($choice); return (0); } diff --git a/.local/bin/dmsearch b/.local/bin/dmsearch index 22ad2d7..9e76bbd 100755 --- a/.local/bin/dmsearch +++ b/.local/bin/dmsearch @@ -6,7 +6,7 @@ use Sys::Hostname; use constant { BROWSER => '/bin/firefox', - HOSTNAME => (split /\./, hostname()) + HOSTNAME => (split /\./, hostname())[0] }; sub main @@ -15,12 +15,17 @@ sub main my $url; my $pid; my $prefix; + my $color; + $color = '#cc241d'; + if (@ARGV == 1) { + $color = $ARGV[0]; + } $prefix = '/usr'; if (HOSTNAME eq "mars") { $prefix += '/local'; } - $choice = `printf "" | dmenu -i -p 'search:'`; + $choice = `printf "" | dmenu -i -p 'search:' -sb '$color' -shb '$color'`; if (not $choice) { return; } |