diff options
Diffstat (limited to '.config/i3blocks')
| -rw-r--r-- | .config/i3blocks/config | 59 | ||||
| -rwxr-xr-x | .config/i3blocks/scripts/batterybar | 8 |
2 files changed, 34 insertions, 33 deletions
diff --git a/.config/i3blocks/config b/.config/i3blocks/config index 9ffb7b1..ac3ddbb 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -101,7 +101,6 @@ interval=10 separator=false label=AVG - # # Temperature # @@ -113,6 +112,29 @@ label=TEMP interval=10 command=/usr/lib/i3blocks/temperature --chip coretemp-isa-0000 +# Key indicators +# +# Add the following bindings to i3 config file: +# +# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks +# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks +[keyindicator] +instance=CAPS +interval=once +signal=11 +# +#[keyindicator] +#instance=NUM +#interval=once +#signal=11 + +[brightness] +command=~/.config/i3blocks/scripts/brightness.py +label= +#☀️ +interval=once +signal=12 + # Battery indicator # # The battery instance defaults to 0. @@ -127,42 +149,19 @@ markup=pango interval=30 #separator=false -[brightness] -command=~/.config/i3blocks/scripts/brightness.py -label= -#☀️ -interval=once -signal=12 - -# Key indicators -# -# Add the following bindings to i3 config file: -# -# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks -# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks -#[keyindicator] -#instance=CAPS -#interval=once -#signal=11 -# -#[keyindicator] -#instance=NUM -#interval=once -#signal=11 - # Volume indicator # # The first parameter sets the step (and units to display) # The second parameter overrides the mixer selection # See the script for details. -[volume] -#label=VOL -label=♪ -instance=Master +#[volume] +##label=VOL +#label=♪ +#instance=Master #instance=PCM -interval=once -signal=10 +#interval=once +#signal=10 # Date Time diff --git a/.config/i3blocks/scripts/batterybar b/.config/i3blocks/scripts/batterybar index 46ad51d..5b5e869 100755 --- a/.config/i3blocks/scripts/batterybar +++ b/.config/i3blocks/scripts/batterybar @@ -22,6 +22,7 @@ readarray -t output <<< $(acpi battery) battery_count=${#output[@]} + for line in "${output[@]}"; do percentages+=($(echo "$line" | grep -o -m1 '[0-9]\{1,3\}%' | tr -d '%')) @@ -40,7 +41,7 @@ squares="■" #discharging dis_colors=("#FF0027" "#FF3B05" "#FFB923" "#FFD000" "#E4FF00" "#ADFF00" "#6DFF00" "#10BA00") -charging_color="#00AFE3" +charging_color="#00FFFF" full_color="#FFFFFF" ac_color="#535353" @@ -73,7 +74,7 @@ while getopts 1:2:3:4:5:6:7:8:c:f:a:h opt; do done end=$(($battery_count - 1)) -for i in $(seq 1 $end); +for i in $(seq 0 $end); do if (( percentages[$i] >=85 )); then squares="" @@ -88,7 +89,8 @@ do fi if [[ "${statuses[$i]}" = "Unknown" ]]; then - squares="<sup>?</sup>$squares" + #squares="<sup>?</sup>$squares" + continue fi case "${statuses[$i]}" in |
