diff options
Diffstat (limited to '.local/bin/statusbar')
-rwxr-xr-x | .local/bin/statusbar/sb-battery | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-brightness | 23 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-clock | 4 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-cpu | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-cpubars | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-disk | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-doppler | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-forecast | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-help-icon | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-internet | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-kbselect | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-mailbox | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-memory | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-moonphase | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-music | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-nettraf | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-news | 4 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-pacpackages | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-price | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-tasks | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-torrent | 2 | ||||
-rwxr-xr-x | .local/bin/statusbar/sb-volume | 8 |
22 files changed, 49 insertions, 26 deletions
diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery index 93cbe08..79030bc 100755 --- a/.local/bin/statusbar/sb-battery +++ b/.local/bin/statusbar/sb-battery @@ -13,7 +13,7 @@ case $BLOCK_BUTTON in - Scroll to change adjust xbacklight." ;; 4) xbacklight -inc 10 ;; 5) xbacklight -dec 10 ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # Loop through all attached batteries and format the info diff --git a/.local/bin/statusbar/sb-brightness b/.local/bin/statusbar/sb-brightness new file mode 100755 index 0000000..913387b --- /dev/null +++ b/.local/bin/statusbar/sb-brightness @@ -0,0 +1,23 @@ +#!/bin/sh + +# current brightness +curr_brightness=$(cat /sys/class/backlight/*/brightness) + +# max_brightness +max_brightness=$(cat /sys/class/backlight/*/max_brightness) + +# brightness percentage +brightness_per=$((100 * curr_brightness / max_brightness)) + +case $BLOCK_BUTTON in + 1) + ;; + 3) + notify-send "π‘ Brightness module" "\- Shows current brightness level βοΈ." + ;; + 6) + setsid -f "$TERMINAL" -e "$EDITOR" "$0" + ;; +esac + +echo "π‘ ${brightness_per}%" diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock index 940fefc..2e0f7a2 100755 --- a/.local/bin/statusbar/sb-clock +++ b/.local/bin/statusbar/sb-clock @@ -19,11 +19,11 @@ case "$clock" in esac case $BLOCK_BUTTON in - 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e')\>/<b><span color='red'>&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; + 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e'|tr -d ' ')\>/<b><span color='red'>&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; 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" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac date "+%g/%m/%d (%a) $icon%I:%M%p" diff --git a/.local/bin/statusbar/sb-cpu b/.local/bin/statusbar/sb-cpu index 382901c..6a5a5c7 100755 --- a/.local/bin/statusbar/sb-cpu +++ b/.local/bin/statusbar/sb-cpu @@ -6,7 +6,7 @@ case $BLOCK_BUTTON in 3) notify-send "π₯ CPU module " "\- Shows CPU temperature. - Click to show intensive processes. - Middle click to open htop." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac sensors -f | awk '/Core 0/ {print "π‘" $3}' diff --git a/.local/bin/statusbar/sb-cpubars b/.local/bin/statusbar/sb-cpubars index 297424e..4015893 100755 --- a/.local/bin/statusbar/sb-cpubars +++ b/.local/bin/statusbar/sb-cpubars @@ -12,7 +12,7 @@ case $BLOCK_BUTTON in 2) setsid -f "$TERMINAL" -e htop ;; 3) notify-send "πͺ¨ CPU load module" "Each bar represents one CPU core";; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # id total idle diff --git a/.local/bin/statusbar/sb-disk b/.local/bin/statusbar/sb-disk index e947509..7f3ff79 100755 --- a/.local/bin/statusbar/sb-disk +++ b/.local/bin/statusbar/sb-disk @@ -11,7 +11,7 @@ case $BLOCK_BUTTON in 1) notify-send "π½ Disk space" "$(df -h --output=target,used,size)" ;; 3) notify-send "π½ Disk module" "\- Shows used hard drive space. - Click to show all disk info." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac case "$location" in diff --git a/.local/bin/statusbar/sb-doppler b/.local/bin/statusbar/sb-doppler index 5a28361..2dcdd24 100755 --- a/.local/bin/statusbar/sb-doppler +++ b/.local/bin/statusbar/sb-doppler @@ -274,7 +274,7 @@ case $BLOCK_BUTTON in 3) notify-send "πΊοΈ Doppler RADAR module" "\- Left click for local Doppler RADAR. - Middle click to update RADAR location. After $secs seconds, new clicks will also automatically update the doppler RADAR." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac echo π
diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast index d8a16aa..5225601 100755 --- a/.local/bin/statusbar/sb-forecast +++ b/.local/bin/statusbar/sb-forecast @@ -45,7 +45,7 @@ case $BLOCK_BUTTON in β: Chance of rain/snow π₯Ά: Daily low π: Daily high" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac checkforecast || getforecast diff --git a/.local/bin/statusbar/sb-help-icon b/.local/bin/statusbar/sb-help-icon index 8fa4a52..8372e6f 100755 --- a/.local/bin/statusbar/sb-help-icon +++ b/.local/bin/statusbar/sb-help-icon @@ -13,5 +13,5 @@ case $BLOCK_BUTTON in 2) restartwm ;; 3) notify-send "β Help module" "\- Left click to open LARBS guide. - Middle click to refresh window manager." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac; echo "β" diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index 5440a52..6d0c513 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -14,7 +14,7 @@ case $BLOCK_BUTTON in π: ethernet working π: vpn is active " ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # Wifi diff --git a/.local/bin/statusbar/sb-kbselect b/.local/bin/statusbar/sb-kbselect index ab2140c..df455c1 100755 --- a/.local/bin/statusbar/sb-kbselect +++ b/.local/bin/statusbar/sb-kbselect @@ -11,7 +11,7 @@ case $BLOCK_BUTTON in pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";; 3) notify-send "β¨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')") - Left click to change keyboard.";; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac echo "$kb" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox index 88522f2..7483aa4 100755 --- a/.local/bin/statusbar/sb-mailbox +++ b/.local/bin/statusbar/sb-mailbox @@ -10,7 +10,7 @@ case $BLOCK_BUTTON in - Shows π if syncing mail - Left click opens neomutt - Middle click syncs mail" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory index 01d3daf..8178b10 100755 --- a/.local/bin/statusbar/sb-memory +++ b/.local/bin/statusbar/sb-memory @@ -6,7 +6,7 @@ case $BLOCK_BUTTON in 3) notify-send "π§ Memory module" "\- Shows Memory Used/Total. - Click to show memory hogs. - Middle click to open htop." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac free --mebi | sed -n '2{p;q}' | awk '{printf ("π§ %2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}' diff --git a/.local/bin/statusbar/sb-moonphase b/.local/bin/statusbar/sb-moonphase index 99adaee..d496ae2 100755 --- a/.local/bin/statusbar/sb-moonphase +++ b/.local/bin/statusbar/sb-moonphase @@ -33,5 +33,5 @@ case $BLOCK_BUTTON in - π: Waning Gibbous - π: Last Quarter - π: Waning Crescent" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music index 266b916..6734eeb 100755 --- a/.local/bin/statusbar/sb-music +++ b/.local/bin/statusbar/sb-music @@ -14,6 +14,6 @@ case $BLOCK_BUTTON in - Scroll changes track.";; # right click, pause/unpause 4) mpc prev | filter ;; # scroll up, previous 5) mpc next | filter ;; # scroll down, next - 6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) mpc status | filter ; setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; *) mpc status | filter ;; esac diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf index 178f677..08cb829 100755 --- a/.local/bin/statusbar/sb-nettraf +++ b/.local/bin/statusbar/sb-nettraf @@ -8,7 +8,7 @@ case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e bmon ;; 3) notify-send "π Network traffic module" "π»: Traffic received πΊ: Traffic transmitted" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac update() { diff --git a/.local/bin/statusbar/sb-news b/.local/bin/statusbar/sb-news index fe701db..cc481e1 100755 --- a/.local/bin/statusbar/sb-news +++ b/.local/bin/statusbar/sb-news @@ -5,13 +5,13 @@ case $BLOCK_BUTTON in 1) setsid "$TERMINAL" -e newsboat ;; - 2) setsid -f newsup >/dev/null exit ;; + 2) setsid -f newsup >/dev/null && exit ;; 3) notify-send "π° News module" "\- Shows unread news items - Shows π if updating with \`newsup\` - Left click opens newsboat - Middle click syncs RSS feeds <b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "π°" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)" diff --git a/.local/bin/statusbar/sb-pacpackages b/.local/bin/statusbar/sb-pacpackages index 37ebed3..6acdce6 100755 --- a/.local/bin/statusbar/sb-pacpackages +++ b/.local/bin/statusbar/sb-pacpackages @@ -23,7 +23,7 @@ case $BLOCK_BUTTON in 3) notify-send "π Upgrade module" "π¦: number of upgradable packages - Left click to upgrade packages - Middle click to show upgradable packages" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/π¦/;s/^π¦0$//g" diff --git a/.local/bin/statusbar/sb-price b/.local/bin/statusbar/sb-price index f95c815..611ec36 100755 --- a/.local/bin/statusbar/sb-price +++ b/.local/bin/statusbar/sb-price @@ -44,7 +44,7 @@ case $BLOCK_BUTTON in - Shows π if updating prices. - <b>Last updated: $uptime</b>" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac [ -n "$updateme" ] && diff --git a/.local/bin/statusbar/sb-tasks b/.local/bin/statusbar/sb-tasks index 586300e..4beb2d0 100755 --- a/.local/bin/statusbar/sb-tasks +++ b/.local/bin/statusbar/sb-tasks @@ -13,7 +13,7 @@ case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e tsp -l ;; 3) notify-send "Tasks module" "π€: number of running/queued background tasks - Left click opens tsp" ;; # Right click - 2) $EDITOR "$0" ;; # Middle click + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac [ "$num" != "0(0)" ] && diff --git a/.local/bin/statusbar/sb-torrent b/.local/bin/statusbar/sb-torrent index 08c9173..493631b 100755 --- a/.local/bin/statusbar/sb-torrent +++ b/.local/bin/statusbar/sb-torrent @@ -23,5 +23,5 @@ Module shows number of torrents: π½: downloading β
: done π±: done and seeding" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index fa0abcd..f9d406b 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -4,13 +4,13 @@ case $BLOCK_BUTTON in 1) setsid -w -f "$TERMINAL" -e pulsemixer; pkill -RTMIN+10 "${STATUSBAR:-dwmblocks}" ;; - 2) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle ;; - 4) wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+ ;; - 5) wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%- ;; + 2) wpctl set-mute @DEFAULT_SINK@ toggle ;; + 4) wpctl set-volume @DEFAULT_SINK@ 1%+ ;; + 5) wpctl set-volume @DEFAULT_SINK@ 1%- ;; 3) notify-send "π’ Volume module" "\- Shows volume π, π if muted. - Middle click to mute. - Scroll to change." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; + 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" |