extract pulse_sink script
This commit is contained in:
parent
43a1960e18
commit
690ab81d76
5 changed files with 20 additions and 18 deletions
|
@ -24,10 +24,11 @@
|
|||
_diffr = [ diffr ];
|
||||
kak-pager = [ fish final._diffr ];
|
||||
terminal = [ alacritty ];
|
||||
wpass = [ final.bmenu fd pass sd wl-clipboard wtype ];
|
||||
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
|
||||
screenshotsh =
|
||||
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
|
||||
volumesh = [ pulseaudio libnotify ];
|
||||
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
|
||||
} // lib.mapAttrs import_script {
|
||||
wdmenu = ./wdmenu.nix;
|
||||
wlauncher = ./wlauncher.nix;
|
||||
|
|
12
scripts/pulse_sink
Normal file
12
scripts/pulse_sink
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
output=$(printf "HDMI\nHeadphones" | wdmenu -i -p "Output:")
|
||||
vol=$(pamixer --get-volume)
|
||||
case "$output" in
|
||||
HDMI)
|
||||
pactl set-default-sink alsa_output.pci-0000_07_00.1.hdmi-stereo-extra1
|
||||
;;
|
||||
Headphones)
|
||||
pactl set-default-sink alsa_output.pci-0000_09_00.4.analog-stereo
|
||||
;;
|
||||
esac
|
||||
pamixer --set-volume "$vol"
|
|
@ -4,7 +4,7 @@ set -xe
|
|||
find_file() {
|
||||
fd --strip-cwd-prefix '\.gpg$' |
|
||||
sd ".gpg$" "" |
|
||||
bmenu -p "Password" $@
|
||||
wdmenu -p "Password" $@
|
||||
}
|
||||
|
||||
main() {
|
||||
|
@ -20,7 +20,7 @@ main() {
|
|||
username=`pass show "$entry" 2>/dev/null | perl -ne 'print $2 if /^(login|user|email): (.*)/'`
|
||||
password=`pass show "$entry" 2>/dev/null | head -n 1`
|
||||
|
||||
action=`printf "Autotype\nUsername -> $username\nPassword" | bmenu -p Action`
|
||||
action=`printf "Autotype\nUsername -> $username\nPassword" | wdmenu -p Action`
|
||||
|
||||
case $action in
|
||||
Autotype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue