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.
14 lines
560 B
Bash
Executable file
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
|