statusbar scripts now open when shift-clicked

weather module "fixed"
other minor statusbar script tweaks
This commit is contained in:
Luke Smith 2020-05-07 17:31:42 -04:00
parent baad9e0136
commit 33e329c8cb
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
17 changed files with 45 additions and 24 deletions

View file

@ -10,6 +10,7 @@ case $BLOCK_BUTTON in
🔌: charging
⚡: charged
❗: battery very low!" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
# acpi alternative

View file

@ -23,6 +23,7 @@ case $BLOCK_BUTTON in
2) setsid "$TERMINAL" -e calcurse -D ~/.config/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
printf '%s %s%s\n' "$(date '+%Y %b %d (%a)')" "$icon" "$(date '+%I:%M%p')"

View file

@ -6,6 +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" ;;
esac
sensors | awk '/Core 0/ {print "🌡", $3}'

View file

@ -48,6 +48,7 @@ case $BLOCK_BUTTON in
- Middle click to update.
- Shows 🔃 if updating prices.
- Manually add/remove currencies to list in the script." ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
printprices

View file

@ -11,6 +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" ;;
esac
case "$location" in

View file

@ -13,4 +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" ;;
esac; echo "❓"

View file

@ -11,6 +11,7 @@ case $BLOCK_BUTTON in
❎: no ethernet
🌐: ethernet working
" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in

View file

@ -10,6 +10,7 @@ case $BLOCK_BUTTON in
- Shows 🔃 if syncing mail
- Left click opens neomutt
- Middle click syncs mail" ;;
6) "$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)"

View file

@ -6,6 +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" ;;
esac
free -h | sed -n '2{p;q}' | awk '{print "🧠", $3 "/" $2}'

View file

@ -15,10 +15,11 @@ case "$mnphs" in
"Waning Crescent") icon="🌘" ;;
esac
case ${BUTTON:-$BLOCK_BUTTON} in
case $BLOCK_BUTTON in
1) $mnphs ;;
2) $mnphs ;;
3) notify-send " 🌜$(pom)" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
echo "${icon:?}" "$prcnt"%

View file

@ -3,14 +3,15 @@
filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | tr '\n' ' ' | sed 's/ $//' ;}
case $BLOCK_BUTTON in
1) mpc status | filter && setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause
1) mpc status | filter ; setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause
2) mpc toggle | filter ;; # right click, pause/unpause
3) mpc status | filter && notify-send "🎵 Music module" "\- Shows mpd song playing.
3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing.
- Italic when paused.
- Left click opens ncmpcpp.
- Middle click pauses.
- 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" ;;
*) mpc status | filter ;;
esac

View file

@ -7,6 +7,7 @@
case "$BLOCK_BUTTON" in
3) notify-send "🌐 Network traffic module" "🔻: Traffic received
🔺: Traffic transmitted" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
rxfile="${XDG_CACHE_HOME:-$HOME/.cache}/rxlog"

View file

@ -11,6 +11,7 @@ case $BLOCK_BUTTON in
- 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" ;;
esac
cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ print "📰 " $1}' | sed 's/^📰 0$//g')$(cat ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/.update 2>/dev/null)"

View file

@ -23,6 +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" ;;
esac
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/📦/;s/^📦0$//g"

View file

@ -10,18 +10,24 @@ transmission-remote -l | grep % |
s/.*%.*/M/g" |
sort -h | uniq -c | sed " # Now we replace the standin letters with icons.
s/A/🛑/g;
s/B/⌛️/g;
s/B/🕰/g;
s/L/🔼/g;
s/M/🔽/g;
s/N/✅/g;
s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed 's/ $//'
case $BLOCK_BUTTON in
1) $TERMINAL -e tremc ;;
3) notify-send "Torrent module" "🛑: paused
⏳: idle (seeds needed)
1) setsid "$TERMINAL" -e tremc & ;;
2) td-toggle ;;
3) notify-send "🌱 Torrent module" "\- Left click to open tremc.
- Middle click to toggle transmission.
- Shift click to edit script.
Module shows number of torrents:
🛑: paused
🕰: idle (seeds needed)
🔼: uploading (unfinished)
🔽: downloading
✅: done
🌱: done and seeding" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac

View file

@ -14,7 +14,8 @@ case $BLOCK_BUTTON in
5) pamixer --allow-boost -d 1 ;;
3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
- Middle click to mute.
- Scroll to change."
- Scroll to change." ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
volstat="$(pactl list sinks)"

View file

@ -15,15 +15,15 @@ showweather() { printf "%s" "$(sed '16q;d' "${XDG_DATA_HOME:-$HOME/.local/share}
grep -wo "[0-9]*%" | sort -rn | sed "s/^/☔ /g;1q" | tr -d '\n')"
sed '13q;d' "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " 🥶",$1 "°","🌞",$2 "°"}' ;}
# The BLOCK_BUTTON bloat for clicking in i3.
case $BLOCK_BUTTON in
1) setsid "$TERMINAL" -e less -Sf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" & ;;
1) setsid "$TERMINAL" -e less -Srf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" & ;;
2) getforecast && showweather ;;
3) notify-send "🌈 Weather module" "\- Left click for full forecast.
- Middle click to update forecast.
☔: Chance of rain/snow
🥶: Daily low
🌞: Daily high" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
# The test if our forcecast is updated to the day. If it isn't download a new