scripts

Scripts for general automations
git clone git://git.laack.co/scripts.git
Log | Files | Refs

commit d6deca720af8e01d79ad4e9c289b011700b58d33
parent 7c4c3ebf35adbefd0bdcdecf25eef4853056f86f
Author: Andrew Laack <andrew@laack.co>
Date:   Sun, 26 Apr 2026 13:54:09 -0500

Updated backups, pass to csv for exporting, new status with restic backups

Diffstat:
Abackups/backups.sh | 2++
Dbackups/encrypted.sh | 19-------------------
Minstallers/arch-private-installation.sh | 2+-
Minstallers/arch-public-installation.sh | 5++++-
Alynx.sh | 7+++++++
Anewsboat.sh | 7+++++++
Ap2csv.sh | 11+++++++++++
Mstatusbar.sh | 1-
Aweb.sh | 9+++++++++
9 files changed, 41 insertions(+), 22 deletions(-)

diff --git a/backups/backups.sh b/backups/backups.sh @@ -0,0 +1,2 @@ +#!/bin/bash +restic -r sftp:root@andrew-1.selfhost.imbue.com:/backup/ snapshots diff --git a/backups/encrypted.sh b/backups/encrypted.sh @@ -1,19 +0,0 @@ -#!/bin/bash - -# From a system with **full** backups of servers in /home/backup & $HOME/personal-files, encrypts both directories and sends them to the remote - -mkdir -p $HOME/backups - -rm $HOME/backups/hosts.tar.gpg || true -tar -cf $HOME/backups/hosts.tar /home/backup -gpg --batch --yes --passphrase $ENCRYPTION_PW -c $HOME/backups/hosts.tar - - -rm $HOME/backups/personal.tar.gpg || true -tar -cf $HOME/backups/personal.tar.gpg $HOME/personal-files -gpg --batch --yes --passphrase $ENCRYPTION_PW -c $HOME/backups/personal.tar.gpg - -# scp $HOME/backups/personal.tar.gpg -# scp $HOME/backups/hosts.tar.gpg - -# TODAY=$(date +%Y-%m-%d) diff --git a/installers/arch-private-installation.sh b/installers/arch-private-installation.sh @@ -39,7 +39,7 @@ sudo chown andrew /home/backup # CRON (backups scripts) echo "0 8,14 * * * andrew /home/andrew/bin/backup.sh" | sudo tee -a /etc/crontab -echo "0 8,14 * * * andrew /home/andrew/bin/backups/restic.sh" | sudo tee -a /etc/crontab +echo "0 9,15 * * * andrew /home/andrew/bin/backups/restic.sh" | sudo tee -a /etc/crontab # TODO: Is there a way to automatically trust fully this key? # Locally, I ran: diff --git a/installers/arch-public-installation.sh b/installers/arch-public-installation.sh @@ -3,7 +3,9 @@ cd -sudo pacman -S curl git gnome-keyring gcc make xorg-server libxft libxinerama freetype2 pkgconf ttf-fira-code zoxide fzf openssh less arandr pass pass-otp xclip xorg-xsetroot base-devel i3lock pandoc entr ripgrep wget jq man-db btop tmux rsync cronie mpv podman pavucontrol otf-latin-modern proton-vpn-gtk-app proton-vpn-cli tk brightnessctl zip unzip signal-desktop xorg-xset lynx figlet flameshot feh ffmpeg zathura-pdf-mupdf websocat xorg-xhost yt-dlp qemu-full qbittorrent alsa-utils pipewire-alsa pipewire-pulse sshfs iotop lsof neovim wireshark-qt nmap torbrowser-launcher bandwhich ghidra bind-tools whois dunst thunderbird graphviz restic +sudo pacman -S curl git gnome-keyring gcc make xorg-server libxft libxinerama freetype2 pkgconf ttf-fira-code zoxide fzf openssh less arandr pass pass-otp xclip xorg-xsetroot base-devel i3lock pandoc entr ripgrep wget jq man-db btop tmux rsync cronie mpv podman pavucontrol otf-latin-modern proton-vpn-gtk-app proton-vpn-cli tk brightnessctl zip unzip signal-desktop xorg-xset lynx figlet flameshot feh ffmpeg zathura-pdf-mupdf websocat xorg-xhost yt-dlp qemu-full qbittorrent alsa-utils pipewire-alsa pipewire-pulse sshfs iotop lsof neovim wireshark-qt nmap torbrowser-launcher bandwhich ghidra bind-tools whois dunst thunderbird graphviz restic dictd + +# dictd is so useful!!! # REMOVED: # newsboat -- too distracting, I would check it too frequently @@ -87,6 +89,7 @@ makepkg -si rm -rf ~/gitRepos/yay # yay -S librewolf-bin --noconfirm +yay -S lagrange --noconfirm # NOTE: This might not work because of some gpg stuff # if that's the case, go the to site and create an executable script in /usr/bin to run it diff --git a/lynx.sh b/lynx.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +MONTH=$(date "+%Y-%m") +mkdir -p $HOME/personal-files/web/$MONTH + +# if I save a site then it goes to the right place +st -e bash -c 'cd ~/personal-files/web/$(date "+%Y-%m") && lynx; exec bash' diff --git a/newsboat.sh b/newsboat.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +MONTH=$(date "+%Y-%m") +mkdir -p $HOME/personal-files/web/$MONTH + +# if I save a feed item then it goes to the right place +st -e bash -c 'cd ~/personal-files/web/$(date "+%Y-%m") && newsboat; exec bash' diff --git a/p2csv.sh b/p2csv.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +PASSWORDS=$(find ~/gitRepos/passwords -type f -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//') + +echo "Key,Password" + +for PASSWORD in $PASSWORDS; do + echo -n $PASSWORD + echo -n "," + pass show $PASSWORD | head -n 1 | sed 's/\n/ /g' +done diff --git a/statusbar.sh b/statusbar.sh @@ -16,6 +16,5 @@ else xsetroot -name "$(date)" fi - # BARE: #xsetroot -name "$(date)" diff --git a/web.sh b/web.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# web.sh is an executable I use for archiving web content. +# Frequently I find something interesting I want to archive. This opens the directory I +# archive these things in. It doesn't do the archiving, just opens the correct place. + +MONTH=$(date "+%Y-%m") +mkdir -p $HOME/personal-files/web/$MONTH + +st -e bash -c 'cd ~/personal-files/web && nvim $(date "+%Y-%m"); exec bash'