elif [ "${CHARGE}" -lt 65 ]; then
COLOR="${COL_YELLOW}"
fi
- print_bar_block "${CHARGE}" "${COLOR}" 0
+ print_bar_block "${CHARGE}%" "${COLOR}" 0
COLOR="${COL_WHITE}"
STATUS=$(cat "${BAT_DIR}/status")
fi
print_bar_block "${CHARGING}" "${COLOR}" 0
- print_bar_block "$(calc_percent full full_design)"
+ print_bar_block "$(calc_percent full full_design)%"
}
print_temperature() {
print_bar_block "${TZ}" ""
}
+print_volume() {
+ MUTE=M
+ if [ "$(pactl get-sink-mute 0)" = "Mute: no" ]; then
+ MUTE=
+ COLOR="${COL_WHITE}"
+ fi
+ print_bar_block "v:${MUTE}$(pactl get-sink-volume 0 | head -1 | cut -d' ' -f5)" "${COLOR}"
+}
+
print_keyboard() {
LAYOUT=$(swaymsg -t get_inputs | grep 'xkb_active_layout_name' | sed -E 's/[ ,"]+//g' | cut -d':' -f2 | head -1)
if [ "${LAYOUT}" = "English(US)" ]; then
print_battery
print_temperature
print_datetime
+ print_volume
print_keyboard
printf '],'
sleep 0.1