From 8b7d7cdb6581d3c785f33379a108a4267ed596a1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 23 Aug 2026 20:42:59 -0400 Subject: vol: add ALIGN and OFFSET, change color to green. --- vol | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/vol b/vol index 14425d7..9933c74 100755 --- a/vol +++ b/vol @@ -24,6 +24,11 @@ # Can also be used from the command line. Run with no args for help. +### TODO: +# aosd_cat -R LightGreen -n 'Normal 40' -p 7 -t 0 +# looks promising (the "40" is points; could be "40px" instead). +# Font string spec: https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html + # -------------------- # Configurable options # -------------------- @@ -43,15 +48,21 @@ FONT=12x24 # What color is the OSD bar and text? See /usr/share/X11/rgb.txt. # COLOR is for when we're unmuted, MUTECOLOR is for muted. -COLOR=orange +COLOR=green MUTECOLOR=red # Text drop shadow, 0 to disable. SHADOW=3 -# Where does the OSD show up on screen? One of: top middle bottom +# Where does the OSD show up on screen (vert)? One of: top middle bottom POSITION=bottom +# Where does the OSD show up on the screen (horiz)? One of: left right center +ALIGN=center + +# Where does the OSD show up (offset from top or bottom of screen)? +OFFSET=40 + # How long does the OSD persist? In seconds, integer only. DELAY=2 @@ -96,6 +107,8 @@ osd() { fi osd_cat -b percentage \ + -o $OFFSET \ + -A $ALIGN \ -d $DELAY \ -P $volpct \ -p $POSITION \ -- cgit v1.2.3