mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Add files via upload
This commit is contained in:
parent
f32d2c0245
commit
b3fa23487d
@ -4,7 +4,7 @@
|
||||
# to charge status ( for plugged up, for discharging on battery, etc.).
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) notify-send " Battery module" ": discharging
|
||||
3) notify-send " Battery module" ": discharging
|
||||
: not charging
|
||||
: stagnant charge
|
||||
: charging
|
||||
@ -23,7 +23,7 @@ for battery in /sys/class/power_supply/BAT?*; do
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status" 2>&1)" in
|
||||
"Full") status="" ;;
|
||||
"Discharging") status="" ;;
|
||||
"Discharging") status="" ;;
|
||||
"Charging") status="" ;;
|
||||
"Not charging") status="" ;;
|
||||
"Unknown") status="" ;;
|
||||
|
||||
@ -3,19 +3,19 @@
|
||||
clock=$(date '+%I')
|
||||
|
||||
case "$clock" in
|
||||
"00") icon="" ;;
|
||||
"01") icon="" ;;
|
||||
"02") icon="" ;;
|
||||
"03") icon="" ;;
|
||||
"04") icon="" ;;
|
||||
"05") icon="" ;;
|
||||
"06") icon="" ;;
|
||||
"07") icon="" ;;
|
||||
"08") icon="" ;;
|
||||
"09") icon="" ;;
|
||||
"10") icon="" ;;
|
||||
"11") icon="" ;;
|
||||
"12") icon="" ;;
|
||||
"00") icon="" ;;
|
||||
"01") icon="" ;;
|
||||
"02") icon="" ;;
|
||||
"03") icon="" ;;
|
||||
"04") icon="" ;;
|
||||
"05") icon="" ;;
|
||||
"06") icon="" ;;
|
||||
"07") icon="" ;;
|
||||
"08") icon="" ;;
|
||||
"09") icon="" ;;
|
||||
"10") icon="" ;;
|
||||
"11") icon="" ;;
|
||||
"12") icon="" ;;
|
||||
esac
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
|
||||
@ -9,4 +9,4 @@ case $BLOCK_BUTTON in
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
sensors | awk '/Core 0/ {print " " $3}'
|
||||
sensors | awk '/Core 0/ {print "" $3}'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Displays todays precipication chance () and daily low () and high ().
|
||||
# Displays todays precipication chance () and daily low () and high ().
|
||||
# Usually intended for the statusbar.
|
||||
|
||||
# If we have internet, get a weather report from wttr.in and store it locally.
|
||||
@ -13,17 +13,17 @@ getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;}
|
||||
# precipitation chance and the daily high and low from the downloaded file and
|
||||
# display them with coresponding emojis.
|
||||
showweather() { printf "%s" "$(sed '16q;d' "$weatherreport" |
|
||||
grep -wo "[0-9]*%" | sort -rn | sed "s/^//g;1q" | tr -d '\n')"
|
||||
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " " $1 "°","" $2 "°"}' ;}
|
||||
grep -wo "[0-9]*%" | sort -rn | sed "s/^//g;1q" | tr -d '\n')"
|
||||
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " " $1 "°","" $2 "°"}' ;}
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e less -Srf "$weatherreport" ;;
|
||||
2) getforecast && showweather ;;
|
||||
3) notify-send " Weather module" "\- Left click for full forecast.
|
||||
3) notify-send " Weather module" "\- Left click for full forecast.
|
||||
- Middle click to update forecast.
|
||||
: Chance of rain/snow
|
||||
: Daily low
|
||||
: Daily high" ;;
|
||||
: Chance of rain/snow
|
||||
: Daily low
|
||||
: Daily high" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Show wifi 📶 and percent strength or 📡 if none.
|
||||
# Show 🌐 if connected to ethernet or ❎ if none.
|
||||
# Show 🔒 if a vpn connection is active
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;;
|
||||
3) notify-send " Internet module" "\- Click to connect
|
||||
@ -20,7 +16,7 @@ esac
|
||||
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
wifiicon="$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
|
||||
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
|
||||
grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="📡 " || wifiicon="❌ "
|
||||
grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon=" " || wifiicon=" "
|
||||
fi
|
||||
|
||||
printf "%s%s%s\n" "$wifiicon" "$(sed "s/down//;s/up//" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)"
|
||||
printf "%s%s%s\n" "$wifiicon" "$(sed "s/down//;s/up//" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*//" /sys/class/net/tun*/operstate 2>/dev/null)"
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send " Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
1) notify-send " Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send " Memory module" "\- Shows Memory Used/Total.
|
||||
3) notify-send " Memory module" "\- Shows Memory Used/Total.
|
||||
- Click to show memory hogs.
|
||||
- Middle click to open htop." ;;
|
||||
6) "$TERMINAL" "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf (" %2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf (" %2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
||||
|
||||
@ -10,28 +10,28 @@ moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase"
|
||||
icon="$(cat "$moonfile")"
|
||||
|
||||
case "$icon" in
|
||||
🌑) name="New" ;;
|
||||
🌒) name="Waxing Crescent" ;;
|
||||
🌓) name="First Quarter" ;;
|
||||
🌔) name="Waxing Gibbous" ;;
|
||||
🌕) name="Full" ;;
|
||||
🌖) name="Waning Gibbous" ;;
|
||||
🌗) name="Last Quarter" ;;
|
||||
🌘) name="Waning Crescent" ;;
|
||||
) name="New" ;;
|
||||
) name="Waxing Crescent" ;;
|
||||
) name="First Quarter" ;;
|
||||
) name="Waxing Gibbous" ;;
|
||||
) name="Full" ;;
|
||||
) name="Waning Gibbous" ;;
|
||||
) name="Last Quarter" ;;
|
||||
) name="Waning Crescent" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
echo "${icon-?}"
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) notify-send "🌜 Moon phase module" "Displays current moon phase.
|
||||
- 🌑: New
|
||||
- 🌒: Waxing Crescent
|
||||
- 🌓: First Quarter
|
||||
- 🌔: Waxing Gibbous
|
||||
- 🌕: Full
|
||||
- 🌖: Waning Gibbous
|
||||
- 🌗: Last Quarter
|
||||
- 🌘: Waning Crescent" ;;
|
||||
3) notify-send " Moon phase module" "Displays current moon phase.
|
||||
- : New
|
||||
- : Waxing Crescent
|
||||
- : First Quarter
|
||||
- : Waxing Gibbous
|
||||
- : Full
|
||||
- : Waning Gibbous
|
||||
- : Last Quarter
|
||||
- : Waning Crescent" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e bmon ;;
|
||||
3) notify-send " Network traffic module" ": Traffic received
|
||||
: Traffic transmitted" ;;
|
||||
3) notify-send " Network traffic module" ": Traffic received
|
||||
: Traffic transmitted" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
@ -26,4 +26,4 @@ update() {
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf "%4s %4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
printf "%4s %4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
|
||||
@ -20,10 +20,10 @@
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e sb-popupgrade ;;
|
||||
2) notify-send "$(/usr/bin/pacman -Qu)" ;;
|
||||
3) notify-send " Upgrade module" ": number of upgradable packages
|
||||
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"
|
||||
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^//;s/^0$//g"
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Prints the current volume or 🔇 if muted.
|
||||
# Prints the current volume or if muted.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e pulsemixer ;;
|
||||
2) pamixer -t ;;
|
||||
4) pamixer --allow-boost -i 1 ;;
|
||||
5) pamixer --allow-boost -d 1 ;;
|
||||
3) notify-send " Volume module" "\- Shows volume , if muted.
|
||||
3) notify-send " Volume module" "\- Shows volume , 婢 if muted.
|
||||
- Middle click to mute.
|
||||
- Scroll to change." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
@ -20,11 +20,11 @@ vol="$(pamixer --get-volume)"
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon=""
|
||||
elif [ "$vol" -gt "30" ]; then
|
||||
icon=""
|
||||
icon=""
|
||||
elif [ "$vol" -gt "0" ]; then
|
||||
icon=""
|
||||
icon=""
|
||||
else
|
||||
echo && exit
|
||||
echo 婢 && exit
|
||||
fi
|
||||
|
||||
echo "$icon$vol%"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user