Consistency of dmenu scripts.
This commit is contained in:
parent
b8958a9aad
commit
5002db57b2
3 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ set_input() {
|
||||||
sinks=$(pactl list sinks | awk -F':' '/Description:/ {print $2}')
|
sinks=$(pactl list sinks | awk -F':' '/Description:/ {print $2}')
|
||||||
sources=$(pactl list sources | grep -v 'Monitor of ' | awk -F':' '/Description:/ {print $2}')
|
sources=$(pactl list sources | grep -v 'Monitor of ' | awk -F':' '/Description:/ {print $2}')
|
||||||
[ "$(echo "$sinks" | wc -l)" -lt 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")
|
chosen=$(printf "output\\ninput" | dmenu -i -p "change")
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
|
|
|
@ -48,7 +48,7 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
|
||||||
|
|
||||||
# If there's only one screen
|
# If there's only one screen
|
||||||
[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
|
[ "$(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:
|
# 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") &&
|
chosen=$(printf -- "home-1\\nhome-2\\n----\\n%s\\n----\\nmulti" "$screens" | dmenu -l 20 -i -p "display") &&
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/sh
|
#!/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
|
[ -z "$chosen" ] && exit
|
||||||
|
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
xdotool type "$chosen"
|
xdotool type "$chosen"
|
||||||
else
|
else
|
||||||
printf "$chosen" | xsel -l /dev/null
|
printf "$chosen" | xsel -l /dev/null
|
||||||
notify-send "'$chosen' copied to clipboard." &
|
notify-send "'$chosen' copied to clipboard" &
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue