aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/statusbar
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/statusbar')
-rwxr-xr-x.local/bin/statusbar/sb-battery2
-rwxr-xr-x.local/bin/statusbar/sb-brightness23
-rwxr-xr-x.local/bin/statusbar/sb-clock4
-rwxr-xr-x.local/bin/statusbar/sb-cpu2
-rwxr-xr-x.local/bin/statusbar/sb-cpubars2
-rwxr-xr-x.local/bin/statusbar/sb-disk2
-rwxr-xr-x.local/bin/statusbar/sb-doppler2
-rwxr-xr-x.local/bin/statusbar/sb-forecast2
-rwxr-xr-x.local/bin/statusbar/sb-help-icon2
-rwxr-xr-x.local/bin/statusbar/sb-internet2
-rwxr-xr-x.local/bin/statusbar/sb-kbselect2
-rwxr-xr-x.local/bin/statusbar/sb-mailbox2
-rwxr-xr-x.local/bin/statusbar/sb-memory2
-rwxr-xr-x.local/bin/statusbar/sb-moonphase2
-rwxr-xr-x.local/bin/statusbar/sb-music2
-rwxr-xr-x.local/bin/statusbar/sb-nettraf2
-rwxr-xr-x.local/bin/statusbar/sb-news4
-rwxr-xr-x.local/bin/statusbar/sb-pacpackages2
-rwxr-xr-x.local/bin/statusbar/sb-price2
-rwxr-xr-x.local/bin/statusbar/sb-tasks2
-rwxr-xr-x.local/bin/statusbar/sb-torrent2
-rwxr-xr-x.local/bin/statusbar/sb-volume8
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@)"