1
0
Fork 0

add base dotfiles

This commit is contained in:
Lucas Sta Maria 2022-03-20 03:19:38 -04:00
commit 968449de49
No known key found for this signature in database
GPG key ID: 4B9481F3C5068E2E
31 changed files with 2121 additions and 0 deletions

20
.config/eww/scripts/volumelabel Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
raw_percent=$(pamixer --get-volume-human)
if [ "$raw_percent" == "muted" ]; then
echo "{\"icon\": \"\", \"content\": \"(label :class \\\"volume__label\\\" :text \\\"muted\\\")\"}"
else
percent=$(echo "$raw_percent" | sed 's/[^0-9]*//g')
#if [ "$percent" -gt 66 ]; then
# icon=""
#elif [ "$percent" -gt 33 ]; then
# icon=""
#elif [ "$percent" -gt 0 ]; then
# icon=""
#else
# icon=""
#fi
icon=""
volume="$percent%"
echo "{\"icon\": \"${icon}\", \"content\": \"(label :class \\\"volume__label\\\" :text \\\"${volume}\\\")\"}"
fi