feat ✨: Yazi plugins
This commit is contained in:
parent
f68f2e5717
commit
f541445e91
12 changed files with 492 additions and 1 deletions
22
waybar/scripts/volume-bar.sh
Executable file
22
waybar/scripts/volume-bar.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
volume=$(pamixer --get-volume)
|
||||
muted=$(pamixer --get-mute)
|
||||
|
||||
if [ "$muted" = "true" ]; then
|
||||
echo '{"text": "[Muted]"}'
|
||||
exit
|
||||
fi
|
||||
|
||||
bar=""
|
||||
full_blocks=$((volume / 10))
|
||||
empty_blocks=$((10 - full_blocks))
|
||||
|
||||
for ((i=0; i<full_blocks; i++)); do
|
||||
bar+="█"
|
||||
done
|
||||
for ((i=0; i<empty_blocks; i++)); do
|
||||
bar+="░"
|
||||
done
|
||||
|
||||
echo "{\"text\": \"$bar $volume%\"}"
|
Loading…
Add table
Add a link
Reference in a new issue