upload dotfiles
This commit is contained in:
parent
c79eb9fc65
commit
ac383289c7
337 changed files with 3187 additions and 0 deletions
19
.local/bin/getvol
Executable file
19
.local/bin/getvol
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
dev=@DEFAULT_SINK@
|
||||
! [ "$1" = '-m' ] || { dev=@DEFAULT_SOURCE@; shift; }
|
||||
|
||||
vol="$(wpctl get-volume "$dev")"
|
||||
|
||||
[ "$vol" != "${vol%\[MUTED\]}" ] && echo "MUTED" && exit
|
||||
vol="${vol#Volume: }"
|
||||
|
||||
split() {
|
||||
# For ommiting the . without calling and external program.
|
||||
IFS=$2
|
||||
set -- $1
|
||||
printf '%s' "$@"
|
||||
}
|
||||
|
||||
vol="$(printf "%.0f" "$(split "$vol" ".")")"
|
||||
echo "$vol"
|
Loading…
Add table
Add a link
Reference in a new issue