Fcitx and hotkey cleanup
This commit is contained in:
parent
e0ed730e2c
commit
70b1078f94
4 changed files with 29 additions and 10 deletions
14
.local/bin/sinkmenu
Executable file
14
.local/bin/sinkmenu
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Simple dmenu script for changing default audio sink
|
||||
|
||||
sinks_and_numbers=`wpctl status \
|
||||
| awk '/Audio/,/Video/ {print}' \
|
||||
| awk '/Sinks:/,/Sink endpoints:/ {print}' \
|
||||
| tail -n +2 | head -n -2 | cut -c 10-`
|
||||
|
||||
sinks=`echo "$sinks_and_numbers" | awk -F'.' '{print $2}' | awk -F'[' '{print $1}' | cut -c 2-`
|
||||
chosen=`echo "$sinks" | dmenu -i -l 30`
|
||||
number=`echo "$sinks_and_numbers" | grep "$chosen" | awk '{print $1}' | sed 's/\./ /'`
|
||||
|
||||
wpctl set-default $number
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue