mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
upstream merge
This commit is contained in:
commit
77ab6c935b
@ -31,7 +31,7 @@ interval=20
|
|||||||
signal=7
|
signal=7
|
||||||
|
|
||||||
[weather]
|
[weather]
|
||||||
interval=3600
|
interval=18000
|
||||||
signal=5
|
signal=5
|
||||||
|
|
||||||
[mailbox]
|
[mailbox]
|
||||||
|
|||||||
@ -18,7 +18,8 @@ getmount() { \
|
|||||||
mountusb() { \
|
mountusb() { \
|
||||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
||||||
sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
|
sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
|
||||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
|
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \( -path *%s -prune \) \ \n",$3}')
|
||||||
|
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
|
||||||
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
partitiontype="$(lsblk -no "fstype" "$chosen")"
|
||||||
case "$partitiontype" in
|
case "$partitiontype" in
|
||||||
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1) groff -kejpt -mom ~/.local/share/larbs/readme.mom -Tpdf | zathura - ;;
|
1) groff -mom ~/.readme.mom -Tpdf | zathura - ;;
|
||||||
|
2) i3 restart ;;
|
||||||
3) pgrep -x dunst >/dev/null && notify-send "<b>❓ Help module:</b>
|
3) pgrep -x dunst >/dev/null && notify-send "<b>❓ Help module:</b>
|
||||||
- Left click to open LARBS guide.";;
|
- Left click to open LARBS guide.
|
||||||
esac
|
- Middle click to refresh i3.";;
|
||||||
|
esac; echo "❓"
|
||||||
echo "❓"
|
|
||||||
|
|||||||
@ -1,15 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
[ "$(stat -c %y /tmp/weatherreport | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] && getforecast damietta
|
location="$1"; [ -z "$location" ] || location="$location+"
|
||||||
|
|
||||||
|
getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1
|
||||||
|
curl -s "wttr.in/$location" > "$HOME/.local/share/weatherreport" || exit 1 ;}
|
||||||
|
|
||||||
|
showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
|
||||||
|
sed '13q;d' "$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 "°"}' ;}
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1) $TERMINAL -e less -S -R /tmp/weatherreport ;;
|
1) $TERMINAL -e less -S "$HOME/.local/share/weatherreport" ;;
|
||||||
|
2) getforecast && showweather ;;
|
||||||
3) pgrep -x dunst >/dev/null && notify-send "<b>🌈 Weather module:</b>
|
3) pgrep -x dunst >/dev/null && notify-send "<b>🌈 Weather module:</b>
|
||||||
- Click for wttr.in forecast.
|
- Left click for full forecast.
|
||||||
|
- Middle click to update forecast.
|
||||||
☔: Chance of rain/snow
|
☔: Chance of rain/snow
|
||||||
❄: Daily low
|
❄: Daily low
|
||||||
🌞: Daily high" ;;
|
🌞: Daily high" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
printf "%s" "$(sed '16q;d' /tmp/weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
|
if [ "$(stat -c %y "$HOME/.local/share/weatherreport" | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ]
|
||||||
|
then getforecast && showweather
|
||||||
sed '13q;d' /tmp/weatherreport | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}'
|
else showweather
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user