-#!/usr/bin/env sh
-# Sends a notification with the time, battery level, and volume
-
-pkill -SIGUSR1 herbe
-if [ "$1" = "status" ]; then
- herbe "$(date "+%A %Y-%m-%d, %r")" \
- "$(acpi | tail -c +12)" \
- "$(amixer sget Master | tail -n 1 | cut -d " " -f 7-)"
-elif [ "$1" = "audio" ]; then
- if [ "$2" ]; then
- amixer sget Master | tail -n 1 | grep "off" && \
- pactl set-sink-mute 0 toggle
- pactl set-sink-volume 0 "$2%"
- else
- pactl set-sink-mute 0 toggle
- fi
-
- herbe "Volume" "$(amixer sget Master | tail -n 1 | cut -d " " -f 7-)"
-elif [ "$1" = "brightness" ]; then
- brightnessctl set "$2"
- herbe "Brightness" "$(brightnessctl | grep % | tail -c +22)"
-else
- echo "setter: unknown subcommand"
- exit 1
-fi