From 877660de3343d08cb87bace33dc86b611540c8ce Mon Sep 17 00:00:00 2001 From: tdro Date: Sun, 22 Nov 2020 22:18:38 -0500 Subject: .local/bin/dmenu_run_history: Add labels Change binding for privilege launcher --- .local/bin/dmenu_run_history | 6 +++--- .local/bin/scripts/app-launcher-priv | 6 ++---- .local/bin/scripts/app-launcher-terminal | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to '.local') diff --git a/.local/bin/dmenu_run_history b/.local/bin/dmenu_run_history index 73fac27..735ba1f 100755 --- a/.local/bin/dmenu_run_history +++ b/.local/bin/dmenu_run_history @@ -1,7 +1,7 @@ #!/bin/sh -[ "$1" = "sudo" ] && export cmd_prefix='sudo -A ' && export dmenu_args='-sb red' && shift 1; -[ "$1" = "terminal" ] && export cmd_prefix='urxvt -hold -e ' && export dmenu_args='-sb gray' && shift 1; +[ "$1" = "privilege" ] && export cmd_prefix='sudo -A ' && export dmenu_args='-p Privilege -sb red' && shift 1; +[ "$1" = "terminal" ] && export cmd_prefix='urxvt -hold -e ' && export dmenu_args='-p Terminal -sb gray' && shift 1; # https://tools.suckless.org/dmenu/scripts/ @@ -28,7 +28,7 @@ awk -v histfile=$historyfile ' x[$0]=1 } } !x[$0]++ ' "$cache" \ - | dmenu -b $dmenu_args "$@" \ + | dmenu -b ${dmenu_args:--p Launch} "$@" \ | awk -v histfile=$historyfile ' BEGIN { FS=OFS="\t" diff --git a/.local/bin/scripts/app-launcher-priv b/.local/bin/scripts/app-launcher-priv index 09d279f..8552f21 100755 --- a/.local/bin/scripts/app-launcher-priv +++ b/.local/bin/scripts/app-launcher-priv @@ -1,5 +1,3 @@ -#!/bin/sh - +#!/bin/sh -eu # rofi -cache-dir "$HOME/.local/share" -fullscreen -show run -display-run '#' -run-command 'sudo -A {cmd}' -font 'ubuntu 12' -padding 250; - -dmenu_run_history sudo; +dmenu_run_history privilege; diff --git a/.local/bin/scripts/app-launcher-terminal b/.local/bin/scripts/app-launcher-terminal index 97d5f0f..c96f919 100755 --- a/.local/bin/scripts/app-launcher-terminal +++ b/.local/bin/scripts/app-launcher-terminal @@ -1,3 +1,2 @@ -#!/bin/sh - +#!/bin/sh -eu dmenu_run_history terminal; -- cgit v1.2.3