diff options
Diffstat (limited to '.local/bin/statusbar')
| -rwxr-xr-x | .local/bin/statusbar/sb-battery | 37 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-clock | 3 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-memory | 4 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-mpdup | 8 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-music | 11 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-updates | 3 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-volume | 2 |
7 files changed, 0 insertions, 68 deletions
diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery deleted file mode 100755 index 513cb1e..0000000 --- a/.local/bin/statusbar/sb-battery +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Prints all batteries, their percentage remaining and an emoji corresponding -# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.). - -case $BLOCK_BUTTON in - 3) notify-send "🔋 Battery module" "🔋: discharging -🛑: not charging -♻: stagnant charge -🔌: charging -⚡: charged -❗: battery very low! -- Scroll to change adjust xbacklight." ;; - 4) xbacklight -inc 10 ;; - 5) xbacklight -dec 10 ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -# Loop through all attached batteries and format the info -for battery in /sys/class/power_supply/BAT?*; do - # If non-first battery, print a space separator. - [ -n "${capacity+x}" ] && printf " " - # Sets up the status and capacity - case "$(cat "$battery/status" 2>&1)" in - "Full") status="⚡" ;; - "Discharging") status="🔋" ;; - "Charging") status="🔌" ;; - "Not charging") status="🛑" ;; - "Unknown") status="♻️" ;; - *) exit 1 ;; - esac - capacity="$(cat "$battery/capacity" 2>&1)" - # Will make a warn variable if discharging and low - [ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗" - # Prints the info - printf "[ %s %s%d%% ]" "$status" "$warn" "$capacity"; unset warn -done && printf "\\n" diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock deleted file mode 100755 index 3a1b2ee..0000000 --- a/.local/bin/statusbar/sb-clock +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# date "+[ %a %d %b %Y] [ %I:%M %P ]" -date "+[ %a %d %b %Y] [ %R ]" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory deleted file mode 100755 index b894ca1..0000000 --- a/.local/bin/statusbar/sb-memory +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# echo "[ $(free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB", ( $3 / 1024), ($2 / 1024))}') $(sensors | awk '/Core 0/ {print " " $3}') ]" - -echo "[ $(free -h --si | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p") $(grep -o "^[^ ]*" /proc/loadavg ) ]" diff --git a/.local/bin/statusbar/sb-mpdup b/.local/bin/statusbar/sb-mpdup deleted file mode 100755 index 770d44d..0000000 --- a/.local/bin/statusbar/sb-mpdup +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# This loop will update the mpd statusbar module whenever a command changes the -# music player's status. mpd must be running on X's start for this to work. - -while : ; do - mpc idle >/dev/null && kill -45 $(pidof dwmblocks) || break -done diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music deleted file mode 100755 index 0a8e0ca..0000000 --- a/.local/bin/statusbar/sb-music +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} - -pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & - -if [ -z "$(filter)" ]; then - echo "" -else - echo "[ $(filter) ]" -fi diff --git a/.local/bin/statusbar/sb-updates b/.local/bin/statusbar/sb-updates deleted file mode 100755 index e7683aa..0000000 --- a/.local/bin/statusbar/sb-updates +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "[ $(checkupdates | wc -l) ]" diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume deleted file mode 100755 index eefed94..0000000 --- a/.local/bin/statusbar/sb-volume +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo [ "$([ "$(pamixer --get-mute)" = "false" ] && printf ' ' || printf ' ')$(pamixer --get-volume)%" ] |
