summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorivan-boikov <ik.boikov.public@protonmail.com>2022-07-14 23:51:06 +0200
committerivan-boikov <ik.boikov.public@protonmail.com>2022-07-14 23:51:06 +0200
commit47eb75b4250badd24b3137f77bf237e6f0570b15 (patch)
tree3ea591e70b3e5f6e9a4dd7005904d9226f1b6891 /scripts
parent919fe5982b47278ef34a30d3b08af41e1ddd1b11 (diff)
1
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/.local/bin/checkpipewire2
-rwxr-xr-xscripts/.local/bin/checkvideodriver2
-rwxr-xr-xscripts/.local/bin/checkzswap2
-rwxr-xr-xscripts/.local/bin/dmnt20
-rwxr-xr-xscripts/.local/bin/gendunstrc3
-rwxr-xr-xscripts/.local/bin/genxresrouces54
-rwxr-xr-xscripts/.local/bin/rmgenrc5
-rwxr-xr-xscripts/.local/bin/sb-battery (renamed from scripts/.local/bin/statusbar/sb-battery)0
-rwxr-xr-xscripts/.local/bin/sb-clock (renamed from scripts/.local/bin/statusbar/sb-clock)0
-rwxr-xr-xscripts/.local/bin/sb-cpu (renamed from scripts/.local/bin/statusbar/sb-cpu)0
-rwxr-xr-xscripts/.local/bin/sb-cpubars (renamed from scripts/.local/bin/statusbar/sb-cpubars)7
-rwxr-xr-xscripts/.local/bin/sb-disk16
-rwxr-xr-xscripts/.local/bin/sb-forecast (renamed from scripts/.local/bin/statusbar/sb-forecast)14
-rwxr-xr-xscripts/.local/bin/sb-internet (renamed from scripts/.local/bin/statusbar/sb-internet)0
-rwxr-xr-xscripts/.local/bin/sb-kbselect (renamed from scripts/.local/bin/statusbar/sb-kbselect)0
-rwxr-xr-xscripts/.local/bin/sb-mailbox10
-rwxr-xr-xscripts/.local/bin/sb-memory (renamed from scripts/.local/bin/statusbar/sb-memory)0
-rwxr-xr-xscripts/.local/bin/sb-mpdup (renamed from scripts/.local/bin/statusbar/sb-mpdup)0
-rwxr-xr-xscripts/.local/bin/sb-music (renamed from scripts/.local/bin/statusbar/sb-music)0
-rwxr-xr-xscripts/.local/bin/sb-nettraf (renamed from scripts/.local/bin/statusbar/sb-nettraf)9
-rwxr-xr-xscripts/.local/bin/sb-volume15
-rwxr-xr-xscripts/.local/bin/statusbar/sb-disk23
-rwxr-xr-xscripts/.local/bin/statusbar/sb-doppler206
-rwxr-xr-xscripts/.local/bin/statusbar/sb-help-icon17
-rwxr-xr-xscripts/.local/bin/statusbar/sb-iplocate17
-rwxr-xr-xscripts/.local/bin/statusbar/sb-mailbox22
-rwxr-xr-xscripts/.local/bin/statusbar/sb-moonphase37
-rwxr-xr-xscripts/.local/bin/statusbar/sb-news17
-rwxr-xr-xscripts/.local/bin/statusbar/sb-pacpackages29
-rwxr-xr-xscripts/.local/bin/statusbar/sb-popupgrade9
-rwxr-xr-xscripts/.local/bin/statusbar/sb-price50
-rwxr-xr-xscripts/.local/bin/statusbar/sb-tasks12
-rwxr-xr-xscripts/.local/bin/statusbar/sb-torrent27
-rwxr-xr-xscripts/.local/bin/statusbar/sb-volume26
-rwxr-xr-xscripts/.local/bin/tab-buttons (renamed from scripts/.local/bin/tablet/pad)0
-rwxr-xr-xscripts/.local/bin/tab-osu (renamed from scripts/.local/bin/tablet/osu)2
-rwxr-xr-xscripts/.local/bin/tab-scale (renamed from scripts/.local/bin/tablet/scale)3
-rwxr-xr-xscripts/.local/bin/tablet/reset2
38 files changed, 120 insertions, 538 deletions
diff --git a/scripts/.local/bin/checkpipewire b/scripts/.local/bin/checkpipewire
index 33af0d4..d5b3389 100755
--- a/scripts/.local/bin/checkpipewire
+++ b/scripts/.local/bin/checkpipewire
@@ -1 +1,3 @@
+#!/bin/sh
+
LANG=C pactl info | grep "Server Name"
diff --git a/scripts/.local/bin/checkvideodriver b/scripts/.local/bin/checkvideodriver
index 935cf00..d398345 100755
--- a/scripts/.local/bin/checkvideodriver
+++ b/scripts/.local/bin/checkvideodriver
@@ -1 +1,3 @@
+#!/bin/sh
+
lshw -c video
diff --git a/scripts/.local/bin/checkzswap b/scripts/.local/bin/checkzswap
index 905e106..d6a4a00 100755
--- a/scripts/.local/bin/checkzswap
+++ b/scripts/.local/bin/checkzswap
@@ -1,4 +1,4 @@
-#! /bin/sh -
+#!/bin/sh
# https://gist.github.com/phizev/31185a30e7d4984724f1fbbf9c2afe19
diff --git a/scripts/.local/bin/dmnt b/scripts/.local/bin/dmnt
index 4d4b70c..9371ce8 100755
--- a/scripts/.local/bin/dmnt
+++ b/scripts/.local/bin/dmnt
@@ -11,7 +11,7 @@ getmount() { \
[ "$mp" = "" ] && exit 1
if [ ! -d "$mp" ]; then
mkdiryn=$(printf "No\nYes" | "$dmenu" -i -p "$mp does not exist. Create it?") || exit 1
- [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas mkdir -p "$mp")
+ [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo mkdir -p "$mp")
fi
}
@@ -21,24 +21,24 @@ mountusb() { \
# *crypto_LUKS*)
#;;
#esac
- #doas mount "$1" 2>/dev/null && notify-send "USB mounting" "$1 mounted." && exit 0
- doas mount "$1" 2>/dev/null && notify-send "$1 mounted" "" && exit 0
+ #sudo mount "$1" 2>/dev/null && notify-send "USB mounting" "$1 mounted." && exit 0
+ sudo mount "$1" 2>/dev/null && notify-send "$1 mounted" "" && exit 0
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
getmount "/mnt /media -maxdepth 1 -type d $alreadymounted"
partitiontype="$(lsblk -no "fstype" "$1")"
case "$partitiontype" in
- "vfat") doas mount -t vfat "$1" "$mp" -o rw,umask=0000;;
- "exfat") doas mount "$1" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
+ "vfat") sudo mount -t vfat "$1" "$mp" -o rw,umask=0000;;
+ "exfat") sudo mount "$1" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
*crypto_LUKS*)
name="$(LC_ALL=C tr -dc A-Za-z0-9 </dev/urandom | head -c 16)"
mkfifo fifo
dpass > fifo &
- doas cryptsetup open --type luks "$1" "$name" --key-file fifo
+ sudo cryptsetup open --type luks "$1" "$name" --key-file fifo
rm fifo
device="/dev/mapper/$name"
- doas mount "$device" "$mp"
+ sudo mount "$device" "$mp"
;;
- *) doas mount "$1" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; doas chown "$user":"$ug" "$mp";;
+ *) sudo mount "$1" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo chown "$user":"$ug" "$mp";;
esac
notify-send "$1 mounted to $mp." ""
}
@@ -55,7 +55,7 @@ mountsamba() { \
getmount "/mnt -maxdepth 1 -type d"
user=$(echo $(whoami) | $dmenu -i -p "Input user name for $1:")
pass=$(pass-askpass "Input password for user \"$user\" for share $1")
- doas mount -t cifs -o user="$user",password="$pass",iocharset=utf8,uid=$(id -u),gid=$(id -g),file_mode=0644,dir_mode=0755 "$1" "$mp"
+ sudo mount -t cifs -o user="$user",password="$pass",iocharset=utf8,uid=$(id -u),gid=$(id -g),file_mode=0644,dir_mode=0755 "$1" "$mp"
if [ $? -ne 0 ]; then
notify-send -u critical "Samba mounting" "Failed to mount $1 to $mp as $user"
exit 1
@@ -64,7 +64,7 @@ mountsamba() { \
}
unmountdev() { \
- result=$(doas umount "$1" 2>&1)
+ result=$(sudo umount "$1" 2>&1)
if [ -z "$result" ]; then
notify-send "Unmount device" "$1 unmounted"
return
diff --git a/scripts/.local/bin/gendunstrc b/scripts/.local/bin/gendunstrc
index 10fca2c..d1d2dc9 100755
--- a/scripts/.local/bin/gendunstrc
+++ b/scripts/.local/bin/gendunstrc
@@ -14,6 +14,9 @@ cat <<CONF
format = "<b>%s</b>\n%b"
frame_width=5
corner_radius=0
+ # handle legacy versions
+ geometry=0x0-0-0
+ horizontal_padding=10
[urgency_low]
background = "$(getxcolor background:)"
diff --git a/scripts/.local/bin/genxresrouces b/scripts/.local/bin/genxresrouces
new file mode 100755
index 0000000..d73b775
--- /dev/null
+++ b/scripts/.local/bin/genxresrouces
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Generates .Xresources
+
+dpi="92"
+if [ $(xdpyinfo | awk '/dimensions/ {print $2}') == '3840x2160' ]; then
+ dpi="192"
+fi
+
+cat <<CONF
+! special
+*.foreground: #e1a15b
+*.background: #0e0a05
+*.cursorColor: #e1a15b
+
+! black
+*.color0: #222222
+*.color8: #000000
+
+! red
+*.color1: #e75c58
+*.color9: #b22b31
+
+! green
+*.color2: #00b800
+*.color10: #008100
+
+! yellow
+*.color3: #ebeb00
+*.color11: #d3d300
+
+! blue
+*.color4: #0082ff
+*.color12: #0061c3
+
+! magenta
+*.color5: #d160c4
+*.color13: #a03196
+
+! cyan
+*.color6: #009393
+*.color14: #007e7e
+
+! white
+*.color7: #d2d2d2
+*.color15: #787878
+
+Xft.dpi: $dpi
+Xft.autohint: 0
+Xft.lcdfilter: lcddefault
+Xft.hinting: 1
+Xft.antialias: 1
+Xft.rgba: rgb
+CONF
diff --git a/scripts/.local/bin/rmgenrc b/scripts/.local/bin/rmgenrc
new file mode 100755
index 0000000..1cf864a
--- /dev/null
+++ b/scripts/.local/bin/rmgenrc
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+rm -rv "$HOME/.config/zathura"
+rm -rv "$HOME/.config/dunst"
+rm -rv "$HOME/.Xresources"
diff --git a/scripts/.local/bin/statusbar/sb-battery b/scripts/.local/bin/sb-battery
index 04a3cf7..04a3cf7 100755
--- a/scripts/.local/bin/statusbar/sb-battery
+++ b/scripts/.local/bin/sb-battery
diff --git a/scripts/.local/bin/statusbar/sb-clock b/scripts/.local/bin/sb-clock
index e6fbb6b..e6fbb6b 100755
--- a/scripts/.local/bin/statusbar/sb-clock
+++ b/scripts/.local/bin/sb-clock
diff --git a/scripts/.local/bin/statusbar/sb-cpu b/scripts/.local/bin/sb-cpu
index 4594826..4594826 100755
--- a/scripts/.local/bin/statusbar/sb-cpu
+++ b/scripts/.local/bin/sb-cpu
diff --git a/scripts/.local/bin/statusbar/sb-cpubars b/scripts/.local/bin/sb-cpubars
index cfa54e4..946f9ef 100755
--- a/scripts/.local/bin/statusbar/sb-cpubars
+++ b/scripts/.local/bin/sb-cpubars
@@ -8,13 +8,6 @@
# Cache in tmpfs to improve speed and reduce SSD load
cache=/tmp/cpubarscache
-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" ;;
-esac
-
# id total idle
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
[ ! -f $cache ] && echo "$stats" > "$cache"
diff --git a/scripts/.local/bin/sb-disk b/scripts/.local/bin/sb-disk
new file mode 100755
index 0000000..c5629cd
--- /dev/null
+++ b/scripts/.local/bin/sb-disk
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Status bar module for disk space
+# $1 should be drive mountpoint, otherwise assumed /.
+
+location=${1:-/}
+
+[ -d "$location" ] || exit
+
+case "$location" in
+ "/home"* ) icon="H" ;;
+ "/mnt"* ) icon="M" ;;
+ *) icon="O";;
+esac
+
+printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')"
diff --git a/scripts/.local/bin/statusbar/sb-forecast b/scripts/.local/bin/sb-forecast
index 1a625bd..40a50c3 100755
--- a/scripts/.local/bin/statusbar/sb-forecast
+++ b/scripts/.local/bin/sb-forecast
@@ -1,8 +1,5 @@
#!/bin/sh
-# 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.
# You could set up a shell alias to view the full file in a pager in the
# terminal if desired. This function will only be run once a day when needed.
@@ -16,17 +13,6 @@ 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 "Β°"}' ;}
-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.
-- 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
# weather report from wttr.in with the above function.
[ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
diff --git a/scripts/.local/bin/statusbar/sb-internet b/scripts/.local/bin/sb-internet
index 6d80852..6d80852 100755
--- a/scripts/.local/bin/statusbar/sb-internet
+++ b/scripts/.local/bin/sb-internet
diff --git a/scripts/.local/bin/statusbar/sb-kbselect b/scripts/.local/bin/sb-kbselect
index f0c923f..f0c923f 100755
--- a/scripts/.local/bin/statusbar/sb-kbselect
+++ b/scripts/.local/bin/sb-kbselect
diff --git a/scripts/.local/bin/sb-mailbox b/scripts/.local/bin/sb-mailbox
new file mode 100755
index 0000000..451c129
--- /dev/null
+++ b/scripts/.local/bin/sb-mailbox
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Displays number of unread mail and an loading icon if updating.
+# When clicked, brings up `neomutt`.
+
+unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
+
+pidof mbsync >/dev/null 2>&1 && icon="U"
+
+[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "οƒ $unread$icon"
diff --git a/scripts/.local/bin/statusbar/sb-memory b/scripts/.local/bin/sb-memory
index bfb31c3..bfb31c3 100755
--- a/scripts/.local/bin/statusbar/sb-memory
+++ b/scripts/.local/bin/sb-memory
diff --git a/scripts/.local/bin/statusbar/sb-mpdup b/scripts/.local/bin/sb-mpdup
index af81a7d..af81a7d 100755
--- a/scripts/.local/bin/statusbar/sb-mpdup
+++ b/scripts/.local/bin/sb-mpdup
diff --git a/scripts/.local/bin/statusbar/sb-music b/scripts/.local/bin/sb-music
index 06e7e4d..06e7e4d 100755
--- a/scripts/.local/bin/statusbar/sb-music
+++ b/scripts/.local/bin/sb-music
diff --git a/scripts/.local/bin/statusbar/sb-nettraf b/scripts/.local/bin/sb-nettraf
index 824e156..07cbd5c 100755
--- a/scripts/.local/bin/statusbar/sb-nettraf
+++ b/scripts/.local/bin/sb-nettraf
@@ -4,13 +4,6 @@
# transmitted (TX) since the previous time this script ran. So if run every
# second, gives network traffic per second.
-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" ;;
-esac
-
update() {
sum=0
for arg; do
@@ -26,4 +19,4 @@ update() {
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
-printf "%4sB/%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
+printf "%4sB ξ’―%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
diff --git a/scripts/.local/bin/sb-volume b/scripts/.local/bin/sb-volume
new file mode 100755
index 0000000..be07c93
--- /dev/null
+++ b/scripts/.local/bin/sb-volume
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Prints the current volume or MUT if muted.
+
+[ $(pamixer --get-mute) = true ] && echo "MUT" && exit
+
+vol="$(pamixer --get-volume)"
+
+if [ "$vol" -gt "0" ]; then
+ icon=""
+else
+ echo "MUT" && exit
+fi
+
+printf "%3d" $vol
diff --git a/scripts/.local/bin/statusbar/sb-disk b/scripts/.local/bin/statusbar/sb-disk
deleted file mode 100755
index e947509..0000000
--- a/scripts/.local/bin/statusbar/sb-disk
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# Status bar module for disk space
-# $1 should be drive mountpoint, otherwise assumed /.
-
-location=${1:-/}
-
-[ -d "$location" ] || exit
-
-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
- "/home"* ) icon="🏠" ;;
- "/mnt"* ) icon="πŸ’Ύ" ;;
- *) icon="πŸ–₯";;
-esac
-
-printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')"
diff --git a/scripts/.local/bin/statusbar/sb-doppler b/scripts/.local/bin/statusbar/sb-doppler
deleted file mode 100755
index dc93db0..0000000
--- a/scripts/.local/bin/statusbar/sb-doppler
+++ /dev/null
@@ -1,206 +0,0 @@
-#!/bin/sh
-
-# Show a Doppler RADAR of an American user's preferred location.
-
-secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds.
-radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar"
-doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif"
-
-pickloc() { chosen="$(echo "Northeast
-Southeast
-PacNorthWest
-PacSouthWest
-UpperMissVly
-SouthMissVly
-SouthPlains
-NorthRockies
-SouthRockies
-Alaska
-Carib
-Hawaii
-CentGrLakes
-Conus-Large
-KABR: Aberdeen, SD
-KBIS: Bismarck, ND
-KFTG: Denver/Boulder, CO
-KDMX: Des Moines, IA
-KDTX: Detroit, MI
-KDDC: Dodge City, KS
-KDLH: Duluth, MN
-KCYS: Cheyenne, WY
-KLOT: Chicago, IL
-KGLD: Goodland, KS
-KUEX: Hastings, NE
-KGJX: Grand Junction, CO
-KGRR: Grand Rapids, MI
-KMVX: Fargo/Grand Forks, ND
-KGRB: Green Bay, WI
-KIND: Indianapolis, IN
-KJKL: Jackson, KY
-KARX: La Crosse, WI
-KILX: Lincoln/Central Illinois, IL
-KLVX: Louisville, KY
-KMQT: Marquette
-KMKX: Milwaukee, WI
-KMPX: Minneapolis, MN
-KAPX: Gaylord/Alpena, MI
-KLNX: North Platte, NE
-KIWX: N. Webster/Northern, IN
-KOAX: Omaha, NE
-KPAH: Paducah, KY
-KEAX: Pleasant Hill, MO
-KPUX: Pueblo, CO
-KDVN: Quad Cities, IA
-KUDX: Rapid City, SD
-KRIW: Riverton, WY
-KSGF: Springfield, MO
-KLSX: St. LOUIS, MO
-KFSD: Sioux Falls, IA
-KTWX: Topeka, KS
-KICT: Wichita, KS
-KVWX: Paducah, KY
-ICAO: Responsible Wfo
-KLTX: WILMINGTON, NC
-KCCX: State College/Central, PA
-KLWX: Sterling, VA
-KFCX: Blacksburg/Roanoke, VA
-KRAX: Raleigh/Durham, NC
-KGYX: Portland, ME
-KDIX: Mt Holly/Philadelphia, PA
-KPBZ: Pittsburgh, PA
-KAKQ: Wakefield, VA
-KMHX: Morehead City, NC
-KGSP: Greer/Greenville/Sprtbg, SC
-KILN: Wilmington/Cincinnati, OH
-KCLE: Cleveland, OH
-KCAE: Columbia, SC
-KBGM: Binghamton, NY
-KENX: Albany, NY
-KBUF: Buffalo, NY
-KCXX: Burlington, VT
-KCBW: Caribou, ME
-KBOX: Boston /Taunton, MA
-KOKX: New York City, NY
-KCLX: Charleston, SC
-KRLX: Charleston, WV
-ICAO: Responsible WFO
-KBRO: Brownsville, TX
-KABX: Albuquerque, NM
-KAMA: Amarillo, TX
-KFFC: Peachtree City/Atlanta, GA
-KEWX: Austin/Sanantonio, TX
-KBMX: Birmingham, AL
-KCRP: Corpus Christi, TX
-KFWS: Dallas / Ft. Worth, TX
-KEPZ: El Paso, TX
-KHGX: Houston/ Galveston, TX
-KJAX: Jacksonville, FL
-KBYX: Key West, FL
-KMRX: Morristown/knoxville, TN
-KLBB: Lubbock, TX
-KLZK: Little Rock, AR
-KLCH: Lake Charles, LA
-KOHX: Nashville, TN
-KMLB: Melbourne, FL
-KNQA: Memphis, TN
-KAMX: Miami, FL
-KMAF: Midland/odessa, TX
-KTLX: Norman, OK
-KHTX: Huntsville, AL
-KMOB: Mobile, AL
-KTLH: Tallahassee, FL
-KTBW: Tampa Bay Area, FL
-KSJT: San Angelo, TX
-KINX: Tulsa, OK
-KSRX: Tulsa, OK
-KLIX: New Orleans/slidell, LA
-KDGX: Jackson, MS
-KSHV: Shreveport, LA
-ICAO: Responsible WFO
-KLGX: Seattle / Tacoma, WA
-KOTX: Spokane, WA
-KEMX: Tucson, AZ
-KYUX: Phoenix, AZ
-KNKX: San Diego, CA
-KMUX: Monterey/san Francisco, CA
-KHNX: San Joaquin/hanford, CA
-KSOX: San Diego, CA
-KATX: Seattle / Tacoma, WA
-KIWA: Phoenix, AZ
-KRTX: Portland, OR
-KSFX: Pocatello, ID
-KRGX: Reno, NV
-KDAX: Sacramento, CA
-KMTX: Salt Lake City, UT
-KPDT: Pendleton, OR
-KMSX: Missoula, MT
-KESX: Las Vegas, NV
-KVTX: Los Angeles, CA
-KMAX: Medford, OR
-KFSX: Flagstaff, AZ
-KGGW: Glasgow, MT
-KLRX: Elko, NV
-KBHX: Eureka, CA
-KTFX: Great Falls, MT
-KCBX: Boise, ID
-KBLX: Billings, MT
-KICX: Salt Lake City, UT
-ICAO: Responsible Wfo W/ MSCF
-PABC: Anchorage, AK
-PAPD: Fairbanks, AK
-PHKM: Honolulu, HI
-PAHG: Anchorage, AK
-PAKC: Anchorage, AK
-PAIH: Anchorage, AK
-PHMO: Honolulu, HI
-PAEC: Fairbanks, AK
-TJUA: San Juan, PR
-PACG: Juneau, AK
-PHKI: Honolulu, HI
-PHWA: Honolulu, HI
-ICAO: Responsible Wfo W/ MSCF
-KFDR: Norman, OK
-PGUA: Guam
-KBBX: Sacramento, CA
-KFDX: Albuquerque, NM
-KGWX: Jackson, MS
-KDOX: Wakefield, VA
-KDYX: San Angelo, TX
-KEYX: Las Vegas, NV
-KEVX: Mobile, AL
-KHPX: Paducah, KY
-KTYX: Burlington, VT
-KGRK: Dallas / Ft. Worth, TX
-KPOE: Lake Charles, LA
-KEOX: Tallahassee, FL
-KHDX: El Paso, TX
-KDFX: San Antonio, TX
-KMXX: Birmingham, AL
-KMBX: Bismarck, ND
-KVAX: Jacksonville, FL
-KJGX: Peachtree City/atlanta, GA
-KVNX: Norman, OK
-KVBX: Vandenberg Afb: Orcutt, CA" | dmenu -r -i -l 50 -p "Select a National Weather Service radar to use as default:" | sed "s/:.*//" | tr "[:lower:]" "[:upper:]")"
-
-# Sanity check of selection and ensure user did not escape.
-echo "$chosen" | grep -q "^[A-Z]\+$" && echo "$chosen" > "$radarloc" ;}
-
-getdoppler() {
- loc="$(cat "$radarloc")"
- notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
- curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;}
-
-showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;}
-
-case $BLOCK_BUTTON in
- 1) [ ! -f "$radarloc" ] && pickloc && getdoppler
- [ $(($(date '+%s') - $(stat -c %Y "$doppler"))) -gt "$secs" ] && getdoppler
- showdoppler ;;
- 2) pickloc && getdoppler && showdoppler ;;
- 3) notify-send "πŸ—ΊοΈ Doppler RADAR module" "\- Left click for local Doppler RADAR.
-- Middle click to update change RADAR location.
-After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac
-
-echo πŸ—ΊοΈ
diff --git a/scripts/.local/bin/statusbar/sb-help-icon b/scripts/.local/bin/statusbar/sb-help-icon
deleted file mode 100755
index 8fa4a52..0000000
--- a/scripts/.local/bin/statusbar/sb-help-icon
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# The clickable help menu. Middle click to restart wm.
-
-# If dwm is running, use dwm's readme and restart.
-pidof dwm >/dev/null &&
- READMEFILE=/usr/local/share/dwm/larbs.mom
- restartwm() { pkill -HUP dwm ;} ||
- restartwm() { i3 restart ;}
-
-case $BLOCK_BUTTON in
- 1) groff -mom "${READMEFILE:-${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom}" -Tpdf | zathura - ;;
- 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 "❓"
diff --git a/scripts/.local/bin/statusbar/sb-iplocate b/scripts/.local/bin/statusbar/sb-iplocate
deleted file mode 100755
index ab89ffd..0000000
--- a/scripts/.local/bin/statusbar/sb-iplocate
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# Gets your public ip address checks which country you are in and
-# displays that information in the statusbar
-#
-# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
-
-#ifinstalled "geoip" || exit
-#addr="$(curl ifconfig.me 2>/dev/null)" || exit
-#grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"
-
-locaddr=$(hostname -i | awk '{print $1}')
-echo $locaddr
-
-case $BLOCK_BUTTON in
- 1) notify-send "$(curl ifconfig.me 2>/dev/null)"
-esac
diff --git a/scripts/.local/bin/statusbar/sb-mailbox b/scripts/.local/bin/statusbar/sb-mailbox
deleted file mode 100755
index 13e152f..0000000
--- a/scripts/.local/bin/statusbar/sb-mailbox
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# Displays number of unread mail and an loading icon if updating.
-# When clicked, brings up `neomutt`.
-
-# ivan: removed gay emoji
-
-case $BLOCK_BUTTON in
- 1) setsid -f "$TERMINAL" -e neomutt ;;
- 2) setsid -f mw -Y >/dev/null ;;
- 3) notify-send "πŸ“¬ Mail module" "\- Shows unread mail
-- 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)"
-
-pidof mbsync >/dev/null 2>&1 && icon="U"
-
-[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "$unread$icon"
diff --git a/scripts/.local/bin/statusbar/sb-moonphase b/scripts/.local/bin/statusbar/sb-moonphase
deleted file mode 100755
index fab8b4d..0000000
--- a/scripts/.local/bin/statusbar/sb-moonphase
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-# Shows the current moon phase.
-
-moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase"
-
-[ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
- { curl -sf "wttr.in/?format=%m" > "$moonfile" || exit 1 ;}
-
-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" ;;
- *) 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" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac
diff --git a/scripts/.local/bin/statusbar/sb-news b/scripts/.local/bin/statusbar/sb-news
deleted file mode 100755
index fe701db..0000000
--- a/scripts/.local/bin/statusbar/sb-news
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# Displays number of unread news items and an loading icon if updating.
-# When clicked, brings up `newsboat`.
-
-case $BLOCK_BUTTON in
- 1) setsid "$TERMINAL" -e newsboat ;;
- 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" ;;
-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/scripts/.local/bin/statusbar/sb-pacpackages b/scripts/.local/bin/statusbar/sb-pacpackages
deleted file mode 100755
index 37ebed3..0000000
--- a/scripts/.local/bin/statusbar/sb-pacpackages
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# Displays number of upgradeable packages.
-# For this to work, have a `pacman -Sy` command run in the background as a
-# cronjob every so often as root. This script will then read those packages.
-# When clicked, it will run an upgrade via pacman.
-#
-# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook:
-#
-# [Trigger]
-# Operation = Upgrade
-# Type = Package
-# Target = *
-#
-# [Action]
-# Description = Updating statusbar...
-# When = PostTransaction
-# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3.
-
-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
-- 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"
diff --git a/scripts/.local/bin/statusbar/sb-popupgrade b/scripts/.local/bin/statusbar/sb-popupgrade
deleted file mode 100755
index 29d6230..0000000
--- a/scripts/.local/bin/statusbar/sb-popupgrade
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-printf "Beginning upgrade.\\n"
-
-yay -Syu
-pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
-
-printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
-read -r _
diff --git a/scripts/.local/bin/statusbar/sb-price b/scripts/.local/bin/statusbar/sb-price
deleted file mode 100755
index 42c84c1..0000000
--- a/scripts/.local/bin/statusbar/sb-price
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-# Usage:
-# price <url> <Name of currency> <icon> <Price to show in>
-# price bat "Basic Attention Token" 🦁
-# When the name of the currency is multi-word, put it in quotes.
-
-[ -z "$3" ] && exit 1
-
-# use $4 as currency, if not passed in use "usd" as default
-currency="${4:-usd}"
-interval="@14d" # History contained in chart preceded by '@' (7d = 7 days)
-dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices"
-pricefile="$dir/$1-$currency"
-chartfile="$dir/$1-$currency-chart"
-
-updateprice() { temp="$(mktemp)"
- curl -s "$currency.rate.sx/1$1" > "$temp" &&
- mv -f "$temp" "$pricefile" &&
- curl -s "$currency.rate.sx/$1$interval" > "$temp" &&
- mv -f "$temp" "$chartfile" ;}
-
-[ -d "$dir" ] || mkdir -p "$dir"
-
-[ "$(stat -c %x "$pricefile" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
- updateprice "$1"
-
-case $BLOCK_BUTTON in
- 1) setsid "$TERMINAL" -e less -Srf "$chartfile" ;;
- 2) notify-send -u low "$3 Updating..." "Updating $2 price..."
- updateprice "$1" && notify-send "$3 Update complete." "$2 price is now
-\$$(cat "$pricefile")" ;;
- 3) uptime="$(date -d "$(stat -c %x "$pricefile")" '+%D at %T' | sed "s|$(date '+%D')|Today|")"
- notify-send "$3 $2 module" "\- <b>Exact price: \$$(cat "$pricefile")</b>
-- Left click for chart of changes.
-- Middle click to update.
-- Shows πŸ”ƒ if updating prices.
-- <b>Last updated:
- $uptime</b>" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac
-
-case "$currency" in
- usd) symb="$" ;;
- gbp) symb="Β£" ;;
- eur) symb="€" ;;
- btc) symb="β‚Ώ" ;;
-esac
-
-printf "$3$symb%0.2f$after" "$(cat "$pricefile")"
diff --git a/scripts/.local/bin/statusbar/sb-tasks b/scripts/.local/bin/statusbar/sb-tasks
deleted file mode 100755
index 349e8cb..0000000
--- a/scripts/.local/bin/statusbar/sb-tasks
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# Originally by Andr3as07 <https://github.com/Andr3as07>
-# Some changes by Luke
-# Rebuild by Tenyun
-
-# This block displays the number running background tasks. Requires tsp.
-
-num=$(tsp -l | awk -v numr=0 -v numq=0 '{if (/running/)numr++; if (/queued/)numq++} END{print numr+numq"("numq")"}')
-
-[ "$num" != "0(0)" ] &&
- echo "$num"
diff --git a/scripts/.local/bin/statusbar/sb-torrent b/scripts/.local/bin/statusbar/sb-torrent
deleted file mode 100755
index 6527005..0000000
--- a/scripts/.local/bin/statusbar/sb-torrent
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-transmission-remote -l | grep % |
- sed " # The letters are for sorting and will not appear.
- s/.*Stopped.*/A πŸ›‘/;
- s/.*Seeding.*/Z 🌱/;
- s/.*100%.*/N βœ…/;
- s/.*Idle.*/B πŸ•°οΈ/;
- s/.*Uploading.*/L ⬆️/;
- s/.*%.*/M ⬇️/" |
- sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -
-
-case $BLOCK_BUTTON in
- 1) setsid -f "$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
diff --git a/scripts/.local/bin/statusbar/sb-volume b/scripts/.local/bin/statusbar/sb-volume
deleted file mode 100755
index 2b7ce67..0000000
--- a/scripts/.local/bin/statusbar/sb-volume
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# 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.
-- Middle click to mute.
-- Scroll to change." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac
-
-[ $(pamixer --get-mute) = true ] && echo πŸ”‡ && exit
-
-vol="$(pamixer --get-volume)"
-
-if [ "$vol" -gt "0" ]; then
- icon=""
-else
- echo  && exit
-fi
-
-echo "$icon$vol%"
diff --git a/scripts/.local/bin/tablet/pad b/scripts/.local/bin/tab-buttons
index a056d19..a056d19 100755
--- a/scripts/.local/bin/tablet/pad
+++ b/scripts/.local/bin/tab-buttons
diff --git a/scripts/.local/bin/tablet/osu b/scripts/.local/bin/tab-osu
index c46480a..6de540d 100755
--- a/scripts/.local/bin/tablet/osu
+++ b/scripts/.local/bin/tab-osu
@@ -1,4 +1,4 @@
#!/bin/bash
notify-send 'Tablet: osu!'
#$HOME/.local/bin/tablet/scale 1366 768 4 100 50 0 0
-$HOME/.local/bin/tablet/scale 1920 1080 4 100 50 0 0
+$HOME/.local/bin/tab-scale 1920 1080 4 100 50 0 0
diff --git a/scripts/.local/bin/tablet/scale b/scripts/.local/bin/tab-scale
index c405048..25fd7bf 100755
--- a/scripts/.local/bin/tablet/scale
+++ b/scripts/.local/bin/tab-scale
@@ -2,8 +2,6 @@
args=("$@")
-#echo Number of arguments: $#
-
tablet=$(xsetwacom list | grep stylus | cut -f 1 | xargs)
Wx=${args[0]}
@@ -38,4 +36,3 @@ dy=$((($resY-$Wy)/2 + $skewY))
xsetwacom --set "${tablet}" Area $((($Nx-$Nxx)/2)) 0 $((($Nx+$Nxx)/2)) $Nyy
#xsetwacom --set "${tablet}" Area 0 $(($Ny-$Nyy)) $Nxx $Ny
xsetwacom --set "${tablet}" MapToOutput ${Wx}x${Wy}+$dx+$dy
-
diff --git a/scripts/.local/bin/tablet/reset b/scripts/.local/bin/tablet/reset
deleted file mode 100755
index 3f68711..0000000
--- a/scripts/.local/bin/tablet/reset
+++ /dev/null
@@ -1,2 +0,0 @@
-notify-send 'Tablet: reset'
-tabletscale 1920 1080 1 87 54 0 0