From 624028251338ca3f0ce6b3eaca6e15f9acfb4794 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 8 Mar 2026 18:24:38 +0000 Subject: [PATCH] Organising --- .../waybar/indicators}/statusbar/sb-clock | 0 .../waybar/indicators}/statusbar/sb-cpu | 0 .../waybar/indicators}/statusbar/sb-cpubars | 0 .../waybar/indicators}/statusbar/sb-forecast | 0 .../waybar/indicators}/statusbar/sb-kbselect | 0 .../waybar/indicators}/statusbar/sb-memory | 0 .../waybar/indicators}/statusbar/sb-moonphase | 0 .../waybar/indicators}/statusbar/sb-nettraf | 0 .../waybar/indicators}/statusbar/sb-speedtest | 0 .../waybar/indicators}/statusbar/sb-tasks | 0 .../waybar/indicators}/statusbar/sb-time | 0 .local/bin/compiler | 57 ----------- .local/bin/cron/checkup | 16 ---- .local/bin/cron/crontog | 6 -- .local/bin/cron/newsup | 15 --- .local/bin/dmenuhandler | 21 ----- .local/bin/dmenulib | 16 ---- .local/bin/dmenumount | 67 ------------- .local/bin/dmenupass | 6 -- .local/bin/dmenuumount | 44 --------- .local/bin/dmenuunicode | 18 ---- .local/bin/downloadhandler | 24 ----- .local/bin/env | 11 --- .local/bin/ex | 45 --------- .local/bin/fitness_data_to_fnf_import.js | 94 ------------------- .local/bin/install/dev.sh | 15 --- .local/bin/install/nixos-todo/setupbacklight | 8 -- .local/bin/install/nixos-todo/setupprinter | 14 --- .local/bin/install/nixos-todo/setupwifi | 18 ---- .local/bin/linkhandler | 23 ----- .local/bin/{ => nixos-todo}/enp | 0 .local/bin/{ => nixos-todo}/fa_dd_download | 0 .local/bin/{ => nixos-todo}/fa_token_download | 0 .local/bin/{ => nixos-todo}/initwacom | 0 .local/bin/{ => nixos-todo}/installzip | 0 .local/bin/{ => nixos-todo}/rotdir | 0 .local/bin/{ => nixos-todo}/setbg | 0 .local/bin/{ => nixos-todo}/shortcuts | 0 .local/bin/{ => nixos-todo}/splitbg | 0 .../bin/{ => nixos-todo}/upgradedungeondraft | 0 .local/bin/opout | 13 --- .local/bin/setup/fixrealtek | 12 --- .local/bin/setup/setup | 30 ------ .local/bin/setup/setupbacklight | 8 -- .local/bin/setup/setupdev | 15 --- .local/bin/setup/setupfirefox | 18 ---- .local/bin/setup/setupnextcloud | 37 -------- .local/bin/setup/setupobsidian | 4 - .local/bin/setup/setupprinter | 14 --- .local/bin/setup/setupssh | 76 --------------- .local/bin/setup/setupvpn | 17 ---- .local/bin/setup/setupwifi | 18 ---- .../{install => station-install}/firefox.sh | 0 .../{install => station-install}/install.sh | 0 .../{install => station-install}/nextcloud.sh | 0 .../{install => station-install}/password.sh | 0 .../bin/{install => station-install}/ssh.sh | 0 .../bin/{install => station-install}/vpn.sh | 0 .local/bin/statusbar/sb-battery | 39 -------- .local/bin/statusbar/sb-disk | 23 ----- .local/bin/statusbar/sb-internet | 24 ----- .local/bin/statusbar/sb-mailbox | 20 ---- .local/bin/statusbar/sb-mpdup | 8 -- .local/bin/statusbar/sb-music | 19 ---- .local/bin/statusbar/sb-news | 17 ---- .local/bin/statusbar/sb-pacpackages | 29 ------ .local/bin/statusbar/sb-popupgrade | 9 -- .local/bin/statusbar/sb-volume | 28 ------ .local/bin/tag | 67 ------------- .local/bin/teardown/teardownandroid | 21 ----- .local/bin/texclear | 15 --- 71 files changed, 1099 deletions(-) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-clock (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-cpu (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-cpubars (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-forecast (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-kbselect (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-memory (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-moonphase (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-nettraf (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-speedtest (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-tasks (100%) rename {.local/bin => .config/waybar/indicators}/statusbar/sb-time (100%) delete mode 100755 .local/bin/compiler delete mode 100755 .local/bin/cron/checkup delete mode 100755 .local/bin/cron/crontog delete mode 100755 .local/bin/cron/newsup delete mode 100755 .local/bin/dmenuhandler delete mode 100755 .local/bin/dmenulib delete mode 100755 .local/bin/dmenumount delete mode 100755 .local/bin/dmenupass delete mode 100755 .local/bin/dmenuumount delete mode 100755 .local/bin/dmenuunicode delete mode 100755 .local/bin/downloadhandler delete mode 100644 .local/bin/env delete mode 100755 .local/bin/ex delete mode 100644 .local/bin/fitness_data_to_fnf_import.js delete mode 100755 .local/bin/install/dev.sh delete mode 100755 .local/bin/install/nixos-todo/setupbacklight delete mode 100755 .local/bin/install/nixos-todo/setupprinter delete mode 100755 .local/bin/install/nixos-todo/setupwifi delete mode 100755 .local/bin/linkhandler rename .local/bin/{ => nixos-todo}/enp (100%) rename .local/bin/{ => nixos-todo}/fa_dd_download (100%) rename .local/bin/{ => nixos-todo}/fa_token_download (100%) rename .local/bin/{ => nixos-todo}/initwacom (100%) rename .local/bin/{ => nixos-todo}/installzip (100%) rename .local/bin/{ => nixos-todo}/rotdir (100%) rename .local/bin/{ => nixos-todo}/setbg (100%) rename .local/bin/{ => nixos-todo}/shortcuts (100%) rename .local/bin/{ => nixos-todo}/splitbg (100%) rename .local/bin/{ => nixos-todo}/upgradedungeondraft (100%) delete mode 100755 .local/bin/opout delete mode 100755 .local/bin/setup/fixrealtek delete mode 100755 .local/bin/setup/setup delete mode 100755 .local/bin/setup/setupbacklight delete mode 100755 .local/bin/setup/setupdev delete mode 100755 .local/bin/setup/setupfirefox delete mode 100755 .local/bin/setup/setupnextcloud delete mode 100755 .local/bin/setup/setupobsidian delete mode 100755 .local/bin/setup/setupprinter delete mode 100755 .local/bin/setup/setupssh delete mode 100755 .local/bin/setup/setupvpn delete mode 100755 .local/bin/setup/setupwifi rename .local/bin/{install => station-install}/firefox.sh (100%) rename .local/bin/{install => station-install}/install.sh (100%) rename .local/bin/{install => station-install}/nextcloud.sh (100%) rename .local/bin/{install => station-install}/password.sh (100%) rename .local/bin/{install => station-install}/ssh.sh (100%) rename .local/bin/{install => station-install}/vpn.sh (100%) delete mode 100755 .local/bin/statusbar/sb-battery delete mode 100755 .local/bin/statusbar/sb-disk delete mode 100755 .local/bin/statusbar/sb-internet delete mode 100755 .local/bin/statusbar/sb-mailbox delete mode 100755 .local/bin/statusbar/sb-mpdup delete mode 100755 .local/bin/statusbar/sb-music delete mode 100755 .local/bin/statusbar/sb-news delete mode 100755 .local/bin/statusbar/sb-pacpackages delete mode 100755 .local/bin/statusbar/sb-popupgrade delete mode 100755 .local/bin/statusbar/sb-volume delete mode 100755 .local/bin/tag delete mode 100755 .local/bin/teardown/teardownandroid delete mode 100755 .local/bin/texclear diff --git a/.local/bin/statusbar/sb-clock b/.config/waybar/indicators/statusbar/sb-clock similarity index 100% rename from .local/bin/statusbar/sb-clock rename to .config/waybar/indicators/statusbar/sb-clock diff --git a/.local/bin/statusbar/sb-cpu b/.config/waybar/indicators/statusbar/sb-cpu similarity index 100% rename from .local/bin/statusbar/sb-cpu rename to .config/waybar/indicators/statusbar/sb-cpu diff --git a/.local/bin/statusbar/sb-cpubars b/.config/waybar/indicators/statusbar/sb-cpubars similarity index 100% rename from .local/bin/statusbar/sb-cpubars rename to .config/waybar/indicators/statusbar/sb-cpubars diff --git a/.local/bin/statusbar/sb-forecast b/.config/waybar/indicators/statusbar/sb-forecast similarity index 100% rename from .local/bin/statusbar/sb-forecast rename to .config/waybar/indicators/statusbar/sb-forecast diff --git a/.local/bin/statusbar/sb-kbselect b/.config/waybar/indicators/statusbar/sb-kbselect similarity index 100% rename from .local/bin/statusbar/sb-kbselect rename to .config/waybar/indicators/statusbar/sb-kbselect diff --git a/.local/bin/statusbar/sb-memory b/.config/waybar/indicators/statusbar/sb-memory similarity index 100% rename from .local/bin/statusbar/sb-memory rename to .config/waybar/indicators/statusbar/sb-memory diff --git a/.local/bin/statusbar/sb-moonphase b/.config/waybar/indicators/statusbar/sb-moonphase similarity index 100% rename from .local/bin/statusbar/sb-moonphase rename to .config/waybar/indicators/statusbar/sb-moonphase diff --git a/.local/bin/statusbar/sb-nettraf b/.config/waybar/indicators/statusbar/sb-nettraf similarity index 100% rename from .local/bin/statusbar/sb-nettraf rename to .config/waybar/indicators/statusbar/sb-nettraf diff --git a/.local/bin/statusbar/sb-speedtest b/.config/waybar/indicators/statusbar/sb-speedtest similarity index 100% rename from .local/bin/statusbar/sb-speedtest rename to .config/waybar/indicators/statusbar/sb-speedtest diff --git a/.local/bin/statusbar/sb-tasks b/.config/waybar/indicators/statusbar/sb-tasks similarity index 100% rename from .local/bin/statusbar/sb-tasks rename to .config/waybar/indicators/statusbar/sb-tasks diff --git a/.local/bin/statusbar/sb-time b/.config/waybar/indicators/statusbar/sb-time similarity index 100% rename from .local/bin/statusbar/sb-time rename to .config/waybar/indicators/statusbar/sb-time diff --git a/.local/bin/compiler b/.local/bin/compiler deleted file mode 100755 index 39e149e..0000000 --- a/.local/bin/compiler +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -# This script will compile or run another finishing operation on a document. I -# have this script run via vim. -# -# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent -# presentations. Runs scripts based on extention or shebang. -# -# Note that .tex files which you wish to compile with XeLaTeX should have the -# string "xelatex" somewhere in a comment/command in the first 5 lines. - -file=$(readlink -f "$1") -dir=${file%/*} -base="${file%.*}" -ext="${file##*.}" - -cd "$dir" || exit 1 - -textype() { \ - command="pdflatex" - ( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex" - $command --output-directory="$dir" "$base" && - grep -qi addbibresource "$file" && - biber --input-directory "$dir" "$base" && - $command --output-directory="$dir" "$base" && - $command --output-directory="$dir" "$base" -} - -case "$ext" in - # Try to keep these cases in alphabetical order. - [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; - c) cc "$file" -o "$base" && "$base" ;; - cpp) g++ "$file" -o "$base" && "$base" ;; - cs) mcs "$file" && mono "$base".exe ;; - go) go run "$file" ;; - h) sudo make install ;; - java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; - m) octave "$file" ;; - md) if [ -x "$(command -v lowdown)" ]; then - lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf - elif [ -x "$(command -v groffdown)" ]; then - groffdown -i "$file" | groff > "$base.pdf" - else - pandoc -t ms --highlight-style=kate -s -o "$base".pdf "$file" - fi ; ;; - mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; - ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; - org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;; - py) python "$file" ;; - [rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; - rs) cargo build ;; - sass) sassc -a "$file" "$base.css" ;; - scad) openscad -o "$base".stl "$file" ;; - sent) setsid -f sent "$file" 2>/dev/null ;; - tex) textype "$file" ;; - *) head -n1 "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; -esac diff --git a/.local/bin/cron/checkup b/.local/bin/cron/checkup deleted file mode 100755 index 58bc1d2..0000000 --- a/.local/bin/cron/checkup +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# Syncs repositories and downloads updates, meant to be run as a cronjob. - -notify-send " Repository Sync" "Checking for package updates..." - -sudo yay -Syyuw --noconfirm || notify-send "Error downloading updates. -Check your internet connection, if pacman is already running, or run update manually to see errors." -pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" - -if pacman -Qu | grep -v "\[ignored\]" -then - notify-send " Repository Sync" "Updates available. Click statusbar icon () for update." -else - notify-send " Repository Sync" "Sync complete. No new packages for update." -fi diff --git a/.local/bin/cron/crontog b/.local/bin/cron/crontog deleted file mode 100755 index 5aba5e6..0000000 --- a/.local/bin/cron/crontog +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# Toggles all cronjobs off/on. -# Stores disabled crontabs in ~/.consaved until restored. - -([ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved ] && crontab - < "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && rm "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.") diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup deleted file mode 100755 index c2091e8..0000000 --- a/.local/bin/cron/newsup +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Set as a cron job to check for new RSS entries for newsboat. -# If newsboat is open, sends it an "R" key to refresh. - -/usr/bin/notify-send "📰 Updating RSS feeds..." - -pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit - -echo  > /tmp/newsupdate -pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" -/usr/bin/newsboat -x reload -rm -f /tmp/newsupdate -pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" -/usr/bin/notify-send "📰 RSS feed update complete." diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler deleted file mode 100755 index e5de8ef..0000000 --- a/.local/bin/dmenuhandler +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Feed this script a link and it will give dmenu -# some choice programs to use to open it. -feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}" - -case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in - "copy url") echo "$feed" | xclip -selection clipboard ;; - mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;; - "mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;; - "mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;; - "queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;; - "queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;; - "queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;; - PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; - sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; - vim) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f "$TERMINAL" -e "$EDITOR" "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; - setbg) curl -L "$feed" > $XDG_CACHE_HOME/pic ; xwallpaper --zoom $XDG_CACHE_HOME/pic >/dev/null 2>&1 ;; - browser) setsid -f "$BROWSER" "$feed" >/dev/null 2>&1 ;; - lynx) lynx "$feed" >/dev/null 2>&1 ;; -esac diff --git a/.local/bin/dmenulib b/.local/bin/dmenulib deleted file mode 100755 index 4940360..0000000 --- a/.local/bin/dmenulib +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -files="$(find -L "$HOME/Tower/Library" -name '*.pdf' -or -name '*.epub')" - -options=$(echo "$files" | xargs --delimiter="\n" basename -a) - -chosen=$(echo "$options" | dmenu -i -ix -c -l 30) - -[ -z "$chosen" ] && exit - -line="$(($chosen + 1))" - -file="$(echo "$files" | sed "${line}q;d")" - -zathura "$file" - diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount deleted file mode 100755 index b98b6a3..0000000 --- a/.local/bin/dmenumount +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -# Gives a dmenu prompt to mount unmounted drives and Android phones. If -# they're in /etc/fstab, they'll be mounted automatically. Otherwise, you'll -# be prompted to give a mountpoint from already existsing directories. If you -# input a novel directory, it will prompt you to create that directory. - -getmount() { \ - [ -z "$chosen" ] && exit 1 - # shellcheck disable=SC2086 - mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1 - [ "$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" || sudo -A mkdir -p "$mp") - fi - } - -mountusb() { \ - chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1 - chosen="$(echo "$chosen" | awk '{print $1}')" - sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen 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 /mount /home -maxdepth 5 -type d $alreadymounted" - partitiontype="$(lsblk -no "fstype" "$chosen")" - case "$partitiontype" in - "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; - "exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";; - *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";; - esac - notify-send "💻 USB mounting" "$chosen mounted to $mp." - } - -mountandroid() { \ - chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1 - chosen="$(echo "$chosen" | cut -d : -f 1)" - getmount "$HOME -maxdepth 3 -type d" - simple-mtpfs --device "$chosen" "$mp" - echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1 - simple-mtpfs --device "$chosen" "$mp" - notify-send "🤖 Android Mounting" "Android device mounted to $mp." - } - -asktype() { \ - choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1 - case $choice in - USB) mountusb ;; - Android) mountandroid ;; - esac - } - -anddrives=$(simple-mtpfs -l 2>/dev/null) -usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | grep 'part\|rom' | awk '$4==""{printf "%s (%s)\n",$1,$3}')" - -if [ -z "$usbdrives" ]; then - [ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit - echo "Android device(s) detected." - mountandroid -else - if [ -z "$anddrives" ]; then - echo "USB drive(s) detected." - mountusb - else - echo "Mountable USB drive(s) and Android device(s) detected." - asktype - fi -fi diff --git a/.local/bin/dmenupass b/.local/bin/dmenupass deleted file mode 100755 index b8e2f1b..0000000 --- a/.local/bin/dmenupass +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# This script is the SUDO_ASKPASS variable, meaning that it will be used as a -# password prompt if needed. - -dmenu -P -p "$1" <&- && echo diff --git a/.local/bin/dmenuumount b/.local/bin/dmenuumount deleted file mode 100755 index 26612ef..0000000 --- a/.local/bin/dmenuumount +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# A dmenu prompt to unmount drives. -# Provides you with mounted partitions, select one to unmount. -# Drives mounted at /, /boot and /home will not be options to unmount. - -unmountusb() { - [ -z "$drives" ] && exit - chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1 - chosen="$(echo "$chosen" | awk '{print $1}')" - [ -z "$chosen" ] && exit - sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted." - } - -unmountandroid() { \ - chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1 - [ -z "$chosen" ] && exit - sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted." - } - -asktype() { \ - choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1 - case "$choice" in - USB) unmountusb ;; - Android) unmountandroid ;; - esac - } - -drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}') - -if ! grep simple-mtpfs /etc/mtab; then - [ -z "$drives" ] && echo "No drives to unmount." && exit - echo "Unmountable USB drive detected." - unmountusb -else - if [ -z "$drives" ] - then - echo "Unmountable Android device detected." - unmountandroid - else - echo "Unmountable USB drive(s) and Android device(s) detected." - asktype - fi -fi diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode deleted file mode 100755 index 58ae934..0000000 --- a/.local/bin/dmenuunicode +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# The famous "get a menu of emojis to copy" script. - -# Get user selection via dmenu from emoji file. -chosen=$(cut -d ';' -f1 ~/.local/share/emojis | dmenu -i -l 30 | sed "s/ .*//") - -# Exit if none chosen. -[ -z "$chosen" ] && exit - -# If you run this command with an argument, it will automatically insert the -# character. Otherwise, show a message that the emoji has been copied. -if [ -n "$1" ]; then - xdotool type "$chosen" -else - printf "$chosen" | xclip -selection clipboard - notify-send "'$chosen' copied to clipboard." & -fi diff --git a/.local/bin/downloadhandler b/.local/bin/downloadhandler deleted file mode 100755 index e755e48..0000000 --- a/.local/bin/downloadhandler +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -echo "starting" -echo "$1" - -file="${1:-$HOME/Downloads}" - -[ -d "$file" ] && file="$file/$(ls -Art "$file" | tail -n 1)" - -echo "continuing" -echo "$file" - -case "$file" in - *ergodox*.hex) - wally-cli "$file" ;; - # *png|*jpg|*jpe|*jpeg|*gif) - # curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; - # *pdf|*cbz|*cbr) - # curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; - # *mp3|*flac|*opus|*mp3?source*) - # qndl "$1" 'curl -LO' >/dev/null 2>&1 ;; - # *) - # [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1 -esac diff --git a/.local/bin/env b/.local/bin/env deleted file mode 100644 index 4728899..0000000 --- a/.local/bin/env +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# add binaries to PATH if they aren't added yet -# affix colons on either side of $PATH to simplify matching -case ":${PATH}:" in - *:"$HOME/.local/share/../bin":*) - ;; - *) - # Prepending path in case a system-installed binary needs to be overridden - export PATH="$HOME/.local/share/../bin:$PATH" - ;; -esac diff --git a/.local/bin/ex b/.local/bin/ex deleted file mode 100755 index 927fb5b..0000000 --- a/.local/bin/ex +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -# A general, all-purpose extraction script. Not all extraction programs here -# are installed by LARBS automatically. -# -# Default behavior: Extract archive into new directory -# Behavior with `-c` option: Extract contents into current directory - -while getopts "hc" o; do case "${o}" in - c) extracthere="True" ;; - *) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit 1 ;; -esac done - -if [ -z "$extracthere" ]; then - archive="$(readlink -f "$*")" && - directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" && - mkdir -p "$directory" && - cd "$directory" || exit 1 -else - archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)" -fi - -[ -z "$archive" ] && printf "Give archive to extract as argument.\\n" && exit 1 - -if [ -f "$archive" ] ; then - case "$archive" in - *.tar.bz2|*.tbz2) tar xvjf "$archive" ;; - *.tar.xz) tar -xf "$archive" ;; - *.tar.gz|*.tgz) tar xvzf "$archive" ;; - *.tar.zst) tar -I zstd -xf "$archive" ;; - *.lzma) unlzma "$archive" ;; - *.bz2) bunzip2 "$archive" ;; - *.rar) unrar x -ad "$archive" ;; - *.gz) gunzip "$archive" ;; - *.tar) tar xvf "$archive" ;; - *.zip) unzip "$archive" ;; - *.Z) uncompress "$archive" ;; - *.7z) 7z x "$archive" ;; - *.xz) unxz "$archive" ;; - *.exe) cabextract "$archive" ;; - *) printf "extract: '%s' - unknown archive method\\n" "$archive" ;; - esac -else - printf "File \"%s\" not found.\\n" "$archive" -fi diff --git a/.local/bin/fitness_data_to_fnf_import.js b/.local/bin/fitness_data_to_fnf_import.js deleted file mode 100644 index e8143f8..0000000 --- a/.local/bin/fitness_data_to_fnf_import.js +++ /dev/null @@ -1,94 +0,0 @@ -const fs = require('fs'); - -const input = fs.readFileSync('./Chris S. Coaching Tracker - Weekly Tracker.csv', 'utf8'); - -const rows = []; - -const week = { - 'Chest': null, - 'Right thigh': null, - 'Left thigh': null, - 'Waist': null, - 'Left biceps': null, - 'Right biceps': null, -} - -let year = 2023; - -input.split("\n").forEach((line) => { - if (line.includes(' 1 Jan')) { - year++; - } - const map = { - 'R Arm': 'Right biceps', - 'L Arm': 'Left biceps', - 'Navel': 'Waist', - 'Chest': 'Chest', - 'R Leg': 'Right thigh', - 'L Leg': 'Left thigh', - } - for (let key in map) { - const val = map[key]; - const match = line.match(new RegExp(`${key},([^,]+)`)); - if (match) { - week[val] = (1*match[1]).toPrecision(3); - } - } - if (line.startsWith('"Sun')) { - const match = line.match(/^"(Sun[^"]+)\s*"/)[1]; - const date = new Date(`${match} UTC`); - date.setFullYear(year); - - for (let key in week) { - const val = week[key]; - rows.push(`BODYMEASURE,${date.toJSON().split('T')[0]},${key},${val},cm`); - } - } -}); - -['Weight', 'Weight(1)', 'Weight(2)', 'Weight(3)'].forEach((name) => { - const weightInput = fs.readFileSync(`./${name}.csv`, 'utf8').split("\n"); - - weightInput.shift(); - for (let i = 0; i < weightInput.length;) { - if (!weightInput[i] || !weightInput[i + 1]) { - i++; - continue; - } - const date = new Date(`${weightInput[i].substring(2, weightInput[i].length - 2)} UTC`); - const [time, weight, change, bmi, fat, muscle, bone, water] = weightInput[i + 1].split(',') - - if (weight && weight !== '--') { - const [kg, units] = weight.split(' '); - rows.push(`BODYMEASURE,${date.toJSON().split('T')[0]},Weight,${kg},${units}`); - } - - if (fat && fat !== '--') { - const [perc, units] = fat.split(' '); - rows.push(`BODYMEASURE,${date.toJSON().split('T')[0]},Fat,${perc},${units}`); - } - - if (muscle && muscle !== '--' && weight && weight !== '--') { - const [kg, units] = muscle.split(' '); - const weightKg = weight.split(' ')[0]; - const perc = (100 * kg / weightKg).toPrecision(3); - rows.push(`BODYMEASURE,${date.toJSON().split('T')[0]},Muscles,${perc},%`); - } - - if (water && water !== '--') { - const [perc, units] = water.split(' '); - rows.push(`BODYMEASURE,${date.toJSON().split('T')[0]},Water,${perc},${units}`); - } - - i++; - while (weightInput[i] && weightInput[i][0] !== '"') { - i++; - } - } -}); - -rows.sort(); - -rows.unshift('TABLE,DATE,BODYPART_NAME,MEASURE,UNIT'); - -fs.writeFileSync('./fnfImport.csv', rows.join("\n")); diff --git a/.local/bin/install/dev.sh b/.local/bin/install/dev.sh deleted file mode 100755 index 2e8d3e6..0000000 --- a/.local/bin/install/dev.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -echo "Creating development directories" - -mkdir "$HOME/Code" -mkdir "$HOME/Code/DevOps" # For server and computer admin -mkdir "$HOME/Code/FSharp" -mkdir "$HOME/Code/JavaScript" -mkdir "$HOME/Code/Scala" -mkdir "$HOME/Code/Rust" -mkdir "$HOME/Code/PHP" -mkdir "$HOME/Code/Tutorials" # For doing tutorials/courses -mkdir "$HOME/Code/Sites" # Websites in any language -mkdir "$HOME/Code/MobileApps" # Mobile apps in any language -mkdir "$HOME/Code/Tests" # Small test files/scripts diff --git a/.local/bin/install/nixos-todo/setupbacklight b/.local/bin/install/nixos-todo/setupbacklight deleted file mode 100755 index df2fc14..0000000 --- a/.local/bin/install/nixos-todo/setupbacklight +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash - -doas tee /etc/udev/rules/90-backlight.rules </dev/null 2>&1 ;; - *png|*jpg|*jpe|*jpeg|*gif) - curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; - *pdf|*cbz|*cbr) - curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; - *mp3|*flac|*opus|*mp3?source*) - qndl "$1" 'curl -LO' >/dev/null 2>&1 ;; - *) - [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1 -esac diff --git a/.local/bin/enp b/.local/bin/nixos-todo/enp similarity index 100% rename from .local/bin/enp rename to .local/bin/nixos-todo/enp diff --git a/.local/bin/fa_dd_download b/.local/bin/nixos-todo/fa_dd_download similarity index 100% rename from .local/bin/fa_dd_download rename to .local/bin/nixos-todo/fa_dd_download diff --git a/.local/bin/fa_token_download b/.local/bin/nixos-todo/fa_token_download similarity index 100% rename from .local/bin/fa_token_download rename to .local/bin/nixos-todo/fa_token_download diff --git a/.local/bin/initwacom b/.local/bin/nixos-todo/initwacom similarity index 100% rename from .local/bin/initwacom rename to .local/bin/nixos-todo/initwacom diff --git a/.local/bin/installzip b/.local/bin/nixos-todo/installzip similarity index 100% rename from .local/bin/installzip rename to .local/bin/nixos-todo/installzip diff --git a/.local/bin/rotdir b/.local/bin/nixos-todo/rotdir similarity index 100% rename from .local/bin/rotdir rename to .local/bin/nixos-todo/rotdir diff --git a/.local/bin/setbg b/.local/bin/nixos-todo/setbg similarity index 100% rename from .local/bin/setbg rename to .local/bin/nixos-todo/setbg diff --git a/.local/bin/shortcuts b/.local/bin/nixos-todo/shortcuts similarity index 100% rename from .local/bin/shortcuts rename to .local/bin/nixos-todo/shortcuts diff --git a/.local/bin/splitbg b/.local/bin/nixos-todo/splitbg similarity index 100% rename from .local/bin/splitbg rename to .local/bin/nixos-todo/splitbg diff --git a/.local/bin/upgradedungeondraft b/.local/bin/nixos-todo/upgradedungeondraft similarity index 100% rename from .local/bin/upgradedungeondraft rename to .local/bin/nixos-todo/upgradedungeondraft diff --git a/.local/bin/opout b/.local/bin/opout deleted file mode 100755 index 7f452df..0000000 --- a/.local/bin/opout +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# opout: "open output": A general handler for opening a file's intended output, -# usually the pdf of a compiled document. I find this useful especially -# running from vim. - -basename="$(echo "${*}" | sed 's/\.[^\/.]*$//')" - -case "${*}" in - *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;; - *.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;; - *.sent) setsid -f sent "$1" >/dev/null 2>&1 ;; -esac diff --git a/.local/bin/setup/fixrealtek b/.local/bin/setup/fixrealtek deleted file mode 100755 index 2aa6f5f..0000000 --- a/.local/bin/setup/fixrealtek +++ /dev/null @@ -1,12 +0,0 @@ -sudo tee /etc/modprobes.d/r8169.conf <&1) - -while [[ "$CHECKPW" == *level=fatal* ]]; do - export MASTERPW=$(zenity --password) - CHECKPW=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort list) -done - -echo "Password set successfuly" - -setupssh -setupdev -setupfirefox -setupnextcloud -setupobsidian diff --git a/.local/bin/setup/setupbacklight b/.local/bin/setup/setupbacklight deleted file mode 100755 index df2fc14..0000000 --- a/.local/bin/setup/setupbacklight +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash - -doas tee /etc/udev/rules/90-backlight.rules <&1) -FIREFOXUN=$(echo "$FIREFOX" | grep -Po "(?<=login: )\w+") - -wait_for_copy() { - timeout 60s wl-paste --watch sh -c 'kill $PPID' >/dev/null 2>&1 -} - -echo $FIREFOXUN | wl-copy - -firefox "https://accounts.firefox.com/signin?action=email&service=sync" & - -enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort copy "Firefox" - -read -s -k $'?Press enter when you have synced Firefox...\n' - -echo "" | wl-copy diff --git a/.local/bin/setup/setupnextcloud b/.local/bin/setup/setupnextcloud deleted file mode 100755 index 85707aa..0000000 --- a/.local/bin/setup/setupnextcloud +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/zsh - -# 1. Fetch credentials (Enpass logic remains the same) -TOWER=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Tower" 2>&1) -TOWERUN=$(echo "$TOWER" | grep -Po "(?<=login: )\w+") - -# Helper function to wait for a clipboard change -wait_for_copy() { - # We use wl-paste --watch but kill it after the first event - # This mimics the 'clipnotify' behavior of pausing the script - timeout 60s wl-paste --watch sh -c 'kill $PPID' >/dev/null 2>&1 -} - -# 2. Start the process -echo "https://tower.scarif.space" | wl-copy -mkdir -p "$HOME/Tower" - -# Launch Nextcloud (Standard NixOS/Wayland path) -nextcloud & - -# 3. The Sequence -# Wait for you to paste the URL, then copy the username -wait_for_copy -echo "$TOWERUN" | wl-copy - -# Wait for you to paste the username, then copy the password -wait_for_copy -enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort copy "Scarif: Tower" - -# 4. Finalize -read -s -k $'?Press enter when you have synced Nextcloud... \n' - -# Clear clipboard for security -wl-copy --clear - -# Symbolic links (NixOS usually manages fonts via config, but manual links still work) -ln -s "$HOME/Tower/Library/Pictures/Wallpapers/7680x2160" "$HOME/.local/share/wallpapers" \ No newline at end of file diff --git a/.local/bin/setup/setupobsidian b/.local/bin/setup/setupobsidian deleted file mode 100755 index 9f18f5e..0000000 --- a/.local/bin/setup/setupobsidian +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/bash - -ln -sf ~/Tower/Notes/_downloads ~/Downloads/Notes - diff --git a/.local/bin/setup/setupprinter b/.local/bin/setup/setupprinter deleted file mode 100755 index ae5b790..0000000 --- a/.local/bin/setup/setupprinter +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/bash - -sudo pacman --noconfirm --needed -S python-pyqt5 hplip nss-mdns - -sudo sed -i 's/hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns/hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns/' /etc/nsswitch.conf - -sudo systemctl enable --now avahi-daemon - -hp-setup -i 192.168.2.77 - -lpoptions -d DeskJet_3700 - -lpoptions -o PageSize=A4 - diff --git a/.local/bin/setup/setupssh b/.local/bin/setup/setupssh deleted file mode 100755 index e84bcf0..0000000 --- a/.local/bin/setup/setupssh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -echo "Setting up SSH" - -# Extract the login details from enpass -LABS=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "Scarif: Labs" 2>&1) -LABSUN=$(echo "$LABS" | grep -Po "(?<=login: )\w+") -LABSPW=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort pass "Scarif: Labs") - -SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file -TITLE="$USER@$(cat /etc/hostname)" # The title for the SSH key - -# Generate the SSH key if it does not exist -[ ! -f $SSHPATH ] && ssh-keygen -t ed25519 -f "$SSHPATH" -N "" -q - -KEY=$(cat "$SSHPATH.pub") - -# A method to generate the parameters for creating an SSH key on gitea -generate_post_data() { - cat < /dev/null - done - fi -fi - - -# Save the new key in gitea -curl -X POST \ - -s -S \ - -H "Accept: application/json" \ - -H "Content-Type:application/json" \ - --data "$(generate_post_data)" \ - --url "$KEYS_URL" > /dev/null - -HTTP_REPLACE="s/https:\/\/labs\.scarif\.space\//git@labs.scarif.space:/" - -# for dir in $(ls "$HOME/.local/src"); do -# dir="$HOME/.local/src/$dir" -# if [ -d $dir ]; then -# cd "$dir" -# SSH_URL=$(git remote get-url origin | sed "$HTTP_REPLACE") -# git remote set-url origin "$SSH_URL" -# fi -# done - -DOTFILES_SSH_URL=$(git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote get-url origin | sed "$HTTP_REPLACE") -git --git-dir "$HOME/.config/dotfiles/.git" --work-tree="$HOME" remote set-url origin "$DOTFILES_SSH_URL" - diff --git a/.local/bin/setup/setupvpn b/.local/bin/setup/setupvpn deleted file mode 100755 index 33007a0..0000000 --- a/.local/bin/setup/setupvpn +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/bash - -doas systemctl enable --now expressvpn.service - -VPN=$(enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show "ExpressVPN Activation Code" 2>&1) -VPNPW=$(echo "$LABS" | grep -Po "(?<=pass : ).+(?=\")") - -echo "$VPNPW" | xclip -selection clipboard -i - -expressvpn activate - -expressvpn autoconnect true - -expressvpn connect smart - -echo "" | xclip -selection clipboard -i - diff --git a/.local/bin/setup/setupwifi b/.local/bin/setup/setupwifi deleted file mode 100755 index 206b3a7..0000000 --- a/.local/bin/setup/setupwifi +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/bash - -doas tee /etc/NetworkManager/conf.d </dev/null)" in - down) wifiicon=" " ;; - up) wifiicon="$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; -esac - -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)" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox deleted file mode 100755 index c818e12..0000000 --- a/.local/bin/statusbar/sb-mailbox +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Displays number of unread mail and an loading icon if updating. -# When clicked, brings up `neomutt`. - -case $BLOCK_BUTTON in - 1) setsid -f "$TERMINAL" -e neomutt ;; - 2) setsid -f mw sync >/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="" - -[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "$unread$icon" diff --git a/.local/bin/statusbar/sb-mpdup b/.local/bin/statusbar/sb-mpdup deleted file mode 100755 index af81a7d..0000000 --- a/.local/bin/statusbar/sb-mpdup +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# This loop will update the mpd statusbar module whenever a command changes the -# music player's status. mpd must be running on X's start for this to work. - -while : ; do - mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break -done diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music deleted file mode 100755 index 9ef769d..0000000 --- a/.local/bin/statusbar/sb-music +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*//g;/\\[playing\\].*/d" | paste -sd ' ' -;} - -pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & - -case $BLOCK_BUTTON in - 1) mpc status | filter ; setsid -f "$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. --  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 diff --git a/.local/bin/statusbar/sb-news b/.local/bin/statusbar/sb-news deleted file mode 100755 index 4db6a49..0000000 --- a/.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 -Note: 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/.local/bin/statusbar/sb-pacpackages b/.local/bin/statusbar/sb-pacpackages deleted file mode 100755 index e4e5238..0000000 --- a/.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/.local/bin/statusbar/sb-popupgrade b/.local/bin/statusbar/sb-popupgrade deleted file mode 100755 index 29d6230..0000000 --- a/.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 to exit window.\\n\\n" -read -r _ diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume deleted file mode 100755 index af4debf..0000000 --- a/.local/bin/statusbar/sb-volume +++ /dev/null @@ -1,28 +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 "70" ]; then - icon="" -elif [ "$vol" -gt "30" ]; then - icon="" -else - icon="" -fi - -echo "$icon $vol%" diff --git a/.local/bin/tag b/.local/bin/tag deleted file mode 100755 index 8462b99..0000000 --- a/.local/bin/tag +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -err() { echo "Usage: - tag [OPTIONS] file -Options: - -a: artist/author - -t: song/chapter title - -A: album/book title - -n: track/chapter number - -N: total number of tracks/chapters - -d: year of publication - -g: genre - -c: comment -You will be prompted for title, artist, album and track if not given." && exit 1 ;} - -while getopts "a:t:A:n:N:d:g:c:f:" o; do case "${o}" in - a) artist="${OPTARG}" ;; - t) title="${OPTARG}" ;; - A) album="${OPTARG}" ;; - n) track="${OPTARG}" ;; - N) total="${OPTARG}" ;; - d) date="${OPTARG}" ;; - g) genre="${OPTARG}" ;; - c) comment="${OPTARG}" ;; - f) file="${OPTARG}" ;; - *) printf "Invalid option: -%s\\n" "$OPTARG" && err ;; -esac done - -shift $((OPTIND - 1)) - -file="$1" - -[ ! -f "$file" ] && echo "Provide file to tag." && err - -[ -z "$title" ] && echo "Enter a title." && read -r title -[ -z "$artist" ] && echo "Enter an artist." && read -r artist -[ -z "$album" ] && echo "Enter an album." && read -r album -[ -z "$track" ] && echo "Enter a track number." && read -r track - -case "$file" in - *.ogg) echo "Title=$title -Artist=$artist -Album=$album -Track=$track -Total=$total -Date=$date -Genre=$genre -Comment=$comment" | vorbiscomment -w "$file" ;; - *.opus) echo "Title=$title -Artist=$artist -Album=$album -Track=$track -Total=$total -Date=$date -Genre=$genre -Comment=$comment" | opustags -i -S "$file" ;; - *.mp3) eyeD3 -Q --remove-all -a "$artist" -A "$album" -t "$title" -n "$track" -N "$total" -Y "$date" "$file" ;; - *.flac) echo "TITLE=$title -ARTIST=$artist -ALBUM=$album -TRACKNUMBER=$track -TOTALTRACKS=$total -DATE=$date -GENRE=$genre -DESCRIPTION=$comment" | metaflac --remove-all-tags --import-tags-from=- "$file" ;; - *) echo "File type not implemented yet." ;; -esac diff --git a/.local/bin/teardown/teardownandroid b/.local/bin/teardown/teardownandroid deleted file mode 100755 index c53d618..0000000 --- a/.local/bin/teardown/teardownandroid +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/bash - -avdmanager -v delete avd -n main - -doas pacman --noconfirm -Rns jdk11-openjdk maven ant gradle wget - -yay -Rns --noconfirm --needed \ - android-sdk-cmdline-tools-latest \ - android-sdk-build-tools \ - android-sdk-platform-tools \ - android-platform - -[ -d /opt/android-sdk ] && sudo rm -rf /opt/android-sdk - -doas groupdel android-sdk - -yarn global remove nativescript @vue/cli - -[ -d "$HOME/.android" ] && sudo rm -rf "$HOME/.android" -[ -d "$HOME/.local/share/android" ] && sudo rm -rf "$HOME/.local/share/android" - diff --git a/.local/bin/texclear b/.local/bin/texclear deleted file mode 100755 index bd110f3..0000000 --- a/.local/bin/texclear +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Clears the build files of a LaTeX/XeLaTeX build. -# I have vim run this file whenever I exit a .tex file. - -case "$1" in - *.tex) - file=$(readlink -f "$1") - dir=$(dirname "$file") - base="${file%.*}" - find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyg|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete - rm -rdf "$dir/_minted-$(basename -- $base)" - ;; - *) printf "Give .tex file as argument.\\n" ;; -esac