From 591e7a7bc4ed0748fb774a636c8493b32d8cb932 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Thu, 15 Oct 2020 19:47:33 -0400 Subject: rename dwmb-bat to dwmb-battery --- .local/bin/dwmbar/dwmb-bat | 29 ----------------------------- .local/bin/dwmbar/dwmb-battery | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) delete mode 100755 .local/bin/dwmbar/dwmb-bat create mode 100755 .local/bin/dwmbar/dwmb-battery (limited to '.local/bin/dwmbar') diff --git a/.local/bin/dwmbar/dwmb-bat b/.local/bin/dwmbar/dwmb-bat deleted file mode 100755 index 4cc14ec..0000000 --- a/.local/bin/dwmbar/dwmb-bat +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) notify-send hey ;; - 2) setsid -f "$TERMINAL" -e calcurse ;; - 3) notify-send " Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` -- Middle click opens calcurse if installed" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -# Charging:  # -# Discharching:  # -# Full: underscore:  # -# LOW BATTERY:  # - -batstatus=$(acpi | tail -n 1) - -ico="" - -# Change the underscore color according to the charging state -case "$batstatus" in - *Charging*) ico=" ";; - *Discharging*) ico="  " ;; - *) ico="  " ;; -esac - -percentage=$( echo "$batstatus" | sed "s/.*\(\ [0-9]*\)\%.*$/\1/; s/\ //g; 1q") - -echo "$ico$percentage% " diff --git a/.local/bin/dwmbar/dwmb-battery b/.local/bin/dwmbar/dwmb-battery new file mode 100755 index 0000000..4cc14ec --- /dev/null +++ b/.local/bin/dwmbar/dwmb-battery @@ -0,0 +1,29 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) notify-send hey ;; + 2) setsid -f "$TERMINAL" -e calcurse ;; + 3) notify-send " Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` +- Middle click opens calcurse if installed" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +# Charging:  # +# Discharching:  # +# Full: underscore:  # +# LOW BATTERY:  # + +batstatus=$(acpi | tail -n 1) + +ico="" + +# Change the underscore color according to the charging state +case "$batstatus" in + *Charging*) ico=" ";; + *Discharging*) ico="  " ;; + *) ico="  " ;; +esac + +percentage=$( echo "$batstatus" | sed "s/.*\(\ [0-9]*\)\%.*$/\1/; s/\ //g; 1q") + +echo "$ico$percentage% " -- cgit v1.2.3