summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/bell
blob: a0395aca86602ef556cc0aa38edba9d81e78e5cf (plain)
1
2
3
4
5
6
7
#!/bin/sh

bef="$(amixer get Master | awk -F '[][]' 'END{print $2}')"
amixer set Master 10%
# code steal from https://unix.stackexchange.com/a/163716/459013
speaker-test -t sine -f 1000 -l 1
amixer set Master "$bef"
pan class="hl kwd">$opt in c) tz_from="Asia/Shanghai";; f) tz_from="$(tzselect)";; F) tz_from="$OPTARG";; # one extra ',' at the end will not let `for tz in ...` loop one extra time? t) for i in $(seq "$OPTARG"); do tz_to="$(tzselect),$tz_to" done;; T) tz_to="$OPTARG,$tz_to";; \?) exit 1;; esac done shift $((OPTIND-1))