dotfiles/bin/rice-osd
Sarthak 7f41cf7a82 replace the old dotfiles with the sakura line rice
The bare $HOME repo is gone. This is now the rice: install.sh, rice-*
scripts in bin/, configs in home/ linked into $HOME, theme templates, st
and the particle wallpaper. Clone to ~/rice and run install.sh.
2026-09-14 19:44:44 +05:30

14 lines
560 B
Bash
Executable file

#!/usr/bin/env bash
# rice-osd <glyph> <label> <percent|text>
# An on-screen display that replaces itself in place (dunst [osd] rule).
# A number draws dunst's progress bar; anything else is shown as text.
glyph="${1:?usage: rice-osd <glyph> <label> <percent|text>}"
label="${2:-}"
value="${3:-}"
tag="osd-${label,,}"
if [[ $value =~ ^[0-9]+$ ]]; then
notify-send -a osd -u low -h "int:value:$value" -h "string:x-dunst-stack-tag:$tag" "$glyph $label $value%"
else
notify-send -a osd -u low -h "string:x-dunst-stack-tag:$tag" "$glyph $label $value"
fi