From 7845a76d09005cb25cdc00a873c06b1ae41e5751 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 3 Jun 2022 14:33:21 +0200 Subject: [PATCH] Update colors of every status bar element --- dwm/dwmblocks/status-bar/battery.sh | 24 ++++++++++++------------ dwm/dwmblocks/status-bar/bluetooth.sh | 4 ++-- dwm/dwmblocks/status-bar/cpu.sh | 2 +- dwm/dwmblocks/status-bar/dunst.sh | 4 ++-- dwm/dwmblocks/status-bar/memory.sh | 2 +- dwm/dwmblocks/status-bar/redshift.sh | 4 ++-- dwm/dwmblocks/status-bar/volume.sh | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dwm/dwmblocks/status-bar/battery.sh b/dwm/dwmblocks/status-bar/battery.sh index 9967169..174e29f 100755 --- a/dwm/dwmblocks/status-bar/battery.sh +++ b/dwm/dwmblocks/status-bar/battery.sh @@ -13,33 +13,33 @@ ramp100= ac_bat= ac=ﮣ -if [[ ! $(acpi 2>&1 | grep "No support") ]]; then +if [[ ! $(acpi 2>&1 | grep "information unavailable") ]]; then export bat=$(cat /sys/class/power_supply/BAT*/capacity) export status=$(cat /sys/class/power_supply/BAT*/status) export plugged=$(cat /sys/class/power_supply/A*/online) if [[ $plugged == "1" ]]; then - echo -n "^c#ebcb8b^$ac_bat^d^" + echo -n "^C3^$ac_bat^d^" elif [[ $bat -lt 10 ]]; then - echo -n "^c#ebcb8b^$ramp10^d^" + echo -n "^C3^$ramp10^d^" elif [[ $bat -lt 20 ]]; then - echo -n "^c#ebcb8b^$ramp20^d^" + echo -n "^C3^$ramp20^d^" elif [[ $bat -lt "30" ]]; then - echo -n "^c#ebcb8b^$ramp30^d^" + echo -n "^C3^$ramp30^d^" elif [[ $bat -lt "40" ]]; then - echo -n "^c#ebcb8b^$ramp40^d^" + echo -n "^C3^$ramp40^d^" elif [[ $bat -lt "50" ]]; then - echo -n "^c#ebcb8b^$ramp50^d^" + echo -n "^C3^$ramp50^d^" elif [[ $bat -lt "60" ]]; then - echo -n "^c#ebcb8b^$ramp60^d^" + echo -n "^C3^$ramp60^d^" elif [[ $bat -lt "70" ]]; then - echo -n "^c#ebcb8b^$ramp70^d^" + echo -n "^C3^$ramp70^d^" elif [[ $bat -lt "80" ]]; then - echo -n "^c#ebcb8b^$ramp80^d^" + echo -n "^C3^$ramp80^d^" elif [[ $bat -lt "90" ]]; then - echo -n "^c#ebcb8b^$ramp90^d^" + echo -n "^C3^$ramp90^d^" elif [[ $bat -le "100" ]]; then - echo -n "^c#ebcb8b^$ramp100^d^" + echo -n "^C3^$ramp100^d^" fi echo " $bat%" fi diff --git a/dwm/dwmblocks/status-bar/bluetooth.sh b/dwm/dwmblocks/status-bar/bluetooth.sh index 6331579..ed7acd2 100755 --- a/dwm/dwmblocks/status-bar/bluetooth.sh +++ b/dwm/dwmblocks/status-bar/bluetooth.sh @@ -8,9 +8,9 @@ else device="$(echo info | timeout 1 bluetoothctl | grep 'Name')" if [ ! "$device" = "" ]; then - echo "^c#81a1c1^^d^ $(echo "$device" | head -n 1 | xargs | cut -c 7-)" + echo "^C14^^d^ $(echo "$device" | head -n 1 | xargs | cut -c 7-)" else - echo "^c#81a1c1^^d^" + echo "^C14^^d^" fi fi diff --git a/dwm/dwmblocks/status-bar/cpu.sh b/dwm/dwmblocks/status-bar/cpu.sh index efb6a83..fd5f60c 100755 --- a/dwm/dwmblocks/status-bar/cpu.sh +++ b/dwm/dwmblocks/status-bar/cpu.sh @@ -1,6 +1,6 @@ #!/bin/sh -echo -n "^c#ebcb8b^ ^d^ $(grep -o "^[^ ]*" /proc/loadavg)" +echo -n "^C3^ ^d^ $(grep -o "^[^ ]*" /proc/loadavg)" case $BUTTON in 1) kitty --class htop htop;; diff --git a/dwm/dwmblocks/status-bar/dunst.sh b/dwm/dwmblocks/status-bar/dunst.sh index bae8759..6f0c448 100755 --- a/dwm/dwmblocks/status-bar/dunst.sh +++ b/dwm/dwmblocks/status-bar/dunst.sh @@ -5,7 +5,7 @@ case $BUTTON in esac if [ $(dunstctl is-paused) = "true" ]; then - echo "^c#88c0d0^ ^d^" + echo "^C6^ ^d^" else - echo "^c#88c0d0^ ^d^" + echo "^C6^ ^d^" fi diff --git a/dwm/dwmblocks/status-bar/memory.sh b/dwm/dwmblocks/status-bar/memory.sh index e3692e6..c52324a 100755 --- a/dwm/dwmblocks/status-bar/memory.sh +++ b/dwm/dwmblocks/status-bar/memory.sh @@ -2,7 +2,7 @@ MEM=$(free | grep Mem | awk '{printf("%d", $3/$2 * 100.0)}') -echo "^c#a3be8c^ ^d^ $MEM%" +echo "^C10^ ^d^ $MEM%" case $BUTTON in 1) kitty --class htop htop;; diff --git a/dwm/dwmblocks/status-bar/redshift.sh b/dwm/dwmblocks/status-bar/redshift.sh index e97bdff..b923d33 100755 --- a/dwm/dwmblocks/status-bar/redshift.sh +++ b/dwm/dwmblocks/status-bar/redshift.sh @@ -15,7 +15,7 @@ case $BUTTON in esac if [ "$pid" = "" ]; then - echo "^c#ebcb8b^^d^" + echo "^C11^^d^" else - echo "^c#ebcb8b^^d^" + echo "^C11^^d^" fi diff --git a/dwm/dwmblocks/status-bar/volume.sh b/dwm/dwmblocks/status-bar/volume.sh index ec4566d..ea2615c 100755 --- a/dwm/dwmblocks/status-bar/volume.sh +++ b/dwm/dwmblocks/status-bar/volume.sh @@ -1,20 +1,20 @@ #!/usr/bin/env zsh case $BUTTON in - 1) kitty --class pamix pamix ;; + 1) pavucontrol ;; 4) pulseaudio-ctl up ;; 5) pulseaudio-ctl down ;; esac STATUS=$(pulseaudio-ctl full-status 2> /dev/null) if [[ $? != 0 ]]; then - echo "^c#abe8c^婢 ^d^ ??%" + echo "^C5^婢 ^d^ ??%" exit 0 fi PERCENT=$(echo $STATUS | cut -d' ' -f 1) if [[ $(echo $STATUS | cut -d' ' -f 2) == "yes" ]]; then - echo "^c#a3be8c^婢 ^d^ $PERCENT%" + echo "^C5^婢 ^d^ $PERCENT%" else - echo "^c#a3be8c^墳 ^d^ $PERCENT%" + echo "^C5^墳 ^d^ $PERCENT%" fi