#!/bin/dash # echo 0; exit 0 # loads colors . ~/.cache/wal/colors.sh SEPARATOR=" " # default color button use() { printf "%s^c%s^^b%s^ %s ^b%s^ %s ^b%s^" "$SEPARATOR" "$background" "$primary" "$1" "$accent" "$2" "$background" } # show in specified color if specified condition is true usecolorif() { if [ "$3" = "1" ]; then printf "%s^c%s^^b%s^ %s ^c%s^^b%s^ %s ^b%s^" "$SEPARATOR" "$primary" "$background" "$1" "$accent" "$background" "$2" "$background" else use "$1" "$2" fi } # only show if content is not zero useif() { if [ -n "$2" ]; then use "$1" "$2" fi } # actual string echo "\ $(useif "󰇚" "$(updates read)")\ $(useif "󰍬" "$(mute shortstatus)")\ $(useif "󰕾" "$(volume)")\ $(useif "󰒢" "$(network)")\ $(use "󰘚" "$(load) | $(temp)")\ $(use "󱐋" "$(battery)")\ $(use "󰃭" "$(datetime)")\ "