diff options
author | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-12-16 21:57:25 -0600 |
---|---|---|
committer | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-12-16 21:57:25 -0600 |
commit | 530ee85037375106652e51a23cf05deb2a5ad1d9 (patch) | |
tree | 4a21d65794d16330c3b24e014e21779d988bbd2b /common/.config/sketchybar/plugins/battery.sh.org | |
parent | ad9cf5cf9e45d1c9daaa386dcb0eff00f3e20cfd (diff) |
remove unused configs
Diffstat (limited to 'common/.config/sketchybar/plugins/battery.sh.org')
-rwxr-xr-x | common/.config/sketchybar/plugins/battery.sh.org | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/common/.config/sketchybar/plugins/battery.sh.org b/common/.config/sketchybar/plugins/battery.sh.org deleted file mode 100755 index d3918e2..0000000 --- a/common/.config/sketchybar/plugins/battery.sh.org +++ /dev/null @@ -1,46 +0,0 @@ -#+title: SketchyBar Battery Plugin - -Get the percentage and charging status. -#+begin_src sh :tangle ~/.config/sketchybar/plugins/battery.sh :mkdirp yes :tangle-mode o755 - #!/bin/sh - PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)" - CHARGING="$(pmset -g batt | grep 'AC Power')" -#+end_src - -Exit if no percentage was reported. -#+begin_src sh :tangle ~/.config/sketchybar/plugins/battery.sh :mkdirp yes :tangle-mode o755 - if [ "$PERCENTAGE" = "" ]; then - exit 0 - fi -#+end_src - -Choose the icon based on the percentage. -#+begin_src sh :tangle ~/.config/sketchybar/plugins/battery.sh :mkdirp yes :tangle-mode o755 - if [[ "$CHARGING" != "" ]]; then - case "${PERCENTAGE}" in - 9[0-9]|100) ICON="" - ;; - [6-8][0-9]) ICON="" - ;; - [3-5][0-9]) ICON="" - ;; - [1-2][0-9]) ICON="" - ;; - ,*) ICON="" - esac - else - case "${PERCENTAGE}" in - 9[0-9]|100) ICON="" - ;; - [6-8][0-9]) ICON="" - ;; - [3-5][0-9]) ICON="" - ;; - [1-2][0-9]) ICON="" - ;; - ,*) ICON="" - esac - fi - - sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}%" -#+end_src |