Consistency of dmenu scripts.
This commit is contained in:
parent
b8958a9aad
commit
5002db57b2
@ -15,7 +15,7 @@ set_input() {
|
||||
sinks=$(pactl list sinks | awk -F':' '/Description:/ {print $2}')
|
||||
sources=$(pactl list sources | grep -v 'Monitor of ' | awk -F':' '/Description:/ {print $2}')
|
||||
[ "$(echo "$sinks" | wc -l)" -lt 2 ] &&
|
||||
{ notify-send "🔊 Nothing to switch to."; exit; }
|
||||
{ notify-send "🔊 nothing to switch"; exit; }
|
||||
|
||||
chosen=$(printf "output\\ninput" | dmenu -i -p "change")
|
||||
case "$chosen" in
|
||||
|
@ -48,7 +48,7 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
|
||||
|
||||
# If there's only one screen
|
||||
[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
|
||||
{ onescreen "$screens"; postrun; notify-send "💻 Nothing to switch to."; exit ;}
|
||||
{ onescreen "$screens"; postrun; notify-send "💻 nothing to switch"; exit ;}
|
||||
|
||||
# Get user choice including both and manual selection:
|
||||
chosen=$(printf -- "home-1\\nhome-2\\n----\\n%s\\n----\\nmulti" "$screens" | dmenu -l 20 -i -p "display") &&
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/emoji | dmenu -i -l 30 | sed "s/ .*//")
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/emoji | dmenu -l 30 -p emoji | sed "s/ .*//")
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
xdotool type "$chosen"
|
||||
else
|
||||
printf "$chosen" | xsel -l /dev/null
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
notify-send "'$chosen' copied to clipboard" &
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user