blob: d64a034ce2a0e5f059f5d1097e02d2b939f8670b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/csh
set cmd = 'sysctl hw.snd.default_unit'
if ($#argv > 0) then
$cmd=$1 >&/dev/null
else if (`$cmd | rev | cut -d ' ' -f 1` == 0) then
$cmd=4 >&/dev/null
else
$cmd=0 >&/dev/null
endif
exec notify-send \
-u low \
-t 2000 \
'swsnd' \
"Switched to `grep default /dev/sndstat | \
sed -e 's/.*<\(.*\)>.*/\1/' | \
sed -e 's/.*(\(.*\)).*/\1/'`"
|