dotfiles/.local/bin/wp-vol
Martin Büchler 7d13e6ff1c chore: initial commit of all dotfiles, configs, and setup scripts
Includes modular setup, device profile support, and documentation.

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
2025-08-07 23:05:28 +02:00

12 lines
423 B
Bash

#!/bin/bash
# Show current volume in a Mako notification using wpctl
# Get current volume as a percentage
VOLUME=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{printf "%d", $2 * 100}')
# Get mute status
MUTED=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo " (muted)" || echo "")
# Show notification
notify-send -a Volume -h string:x-canonical-private-synchronous:volume -u low "Volume: $VOLUME%$MUTED"