commit 7cc2080a0860f9743e9fa0f5266b87409f3b8b44
parent 7f44500593a4e67add85fe7bf4aac83f9bddb54b
Author: AndrewLockVI <andrew@laack.co>
Date: Sat, 15 Feb 2025 13:11:49 -0600
Updated my scripts to work with x11, commented wayland lines, and added some more to see what I like
Diffstat:
14 files changed, 105 insertions(+), 13 deletions(-)
diff --git a/backupHelper.sh b/backupHelper.sh
@@ -13,8 +13,12 @@ du -s /home/serverBackup
rsync -avzq -e ssh andrew@brgr.heron-peacock.ts.net:/home/shared/ /home/serverBackup/
-echo "BACKUP SIZE (AFTER):"
-du -sh /home/serverBackup
-du -s /home/serverBackup
-echo "=== COMPLETED SUCCESSFULLY ==="
+if [ $? -eq 0 ]; then
+ echo "BACKUP SIZE (AFTER):"
+ du -sh /home/serverBackup
+ du -s /home/serverBackup
+ echo "=== COMPLETED SUCCESSFULLY ==="
+else
+ echo "=== RSYNC FAILED ==="
+fi
diff --git a/dmenu.sh b/dmenu.sh
@@ -2,7 +2,7 @@
background="#000000"
foreground="#ffffff"
-highlight="#44475a"
+highlight="#aaaaaa"
prompt="Run Program:"
dmenu_run -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground" -p "$prompt"
diff --git a/find-music.sh b/find-music.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# I have my music broken down by artist, but there is no reason
+# why if you have it by album that this wouldn't work.
+
+
+background="#000000"
+foreground="#ffffff"
+#highlight="#44475a"
+highlight="#aaaaaa"
+prompt="Select an artist:"
+
+dmenu_cmd="dmenu -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+
+artistDirectory=$1
+out="$1$(ls "$artistDirectory" | sed 's/ /_/g' | eval $dmenu_cmd)"
+out=$(echo "$out" | sed 's/_/\ /g')
+
+
+
+if [[ "$out" == $1 ]]; then
+ echo "NO SELECTION"
+else
+ mpv --shuffle "$out"
+fi
diff --git a/install.sh b/install.sh
@@ -40,6 +40,10 @@ doas apk add py3-pip
# Email Client
doas apk add thunderbird
+# Desktop notifications
+# doas apk add libnotify
+# doas apk add swaync
+
# Audio Controller (yes, it is old, but it was the only thing that worked)
doas apk add pulseaudio
@@ -126,8 +130,6 @@ doas apk add pass-otp
doas apk add imagemagick
doas apk add zbar
-# screenshotting
-doas apk add slurp
doas apk add grim
doas apk add make
@@ -147,3 +149,23 @@ doas apk add sqlite
doas apk add tailscale
doas tailscale up
+
+# DWM setup reqs
+
+# git clone https://git.suckless.org/dwm
+doas apk add xorg-server
+doas apk add libx11-dev
+doas apk add libxft-dev
+doas apk add libxinerama-dev
+# You may want to use this or compile it yourself.
+# doas apk add st
+doas apk add xinit
+doas apk add xf86-input-libinput
+doas apk add arandr
+doas apk add xclip
+
+# screenshots w/ x11.
+doas apk add flameshot
+
+doas apk add xsetroot
+doas apk add xkill
diff --git a/mpv.sh b/mpv.sh
@@ -1,2 +1,4 @@
#!/bin/ash
-mpv --force-window=immediate $(wl-paste)$ && exit
+#mpv --force-window=immediate $(wl-paste)$ && exit
+
+mpv --force-window=immediate $(xclip -o -selection clipboard) && exit
diff --git a/pass.sh b/pass.sh
@@ -20,7 +20,8 @@ password_files=( "${password_files[@]%.gpg}" )
background="#000000"
foreground="#ffffff"
-highlight="#44475a"
+#highlight="#44475a"
+highlight="#aaaaaa"
prompt="Select a password:"
diff --git a/power.sh b/power.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+opts=("suspend" "reboot" "hibernate" "poweroff")
+
+selected_item=$(echo "${opts[@]}" | tr ' ' '\n' | dmenu -p "Select an item:")
+
+# no need to verify a selection was made; no selection just gives an output.
+
+sleep .1
+loginctl $selected_item
diff --git a/search.sh b/search.sh
@@ -3,7 +3,8 @@
background="#000000"
foreground="#ffffff"
-highlight="#44475a"
+highlight="#aaaaaa"
+#highlight="#44475a"
prompt="Search URL: "
dmenu_cmd="dmenu -nb $background -nf $foreground -sb $highlight -sf $foreground -p URL:"
diff --git a/setScreen.sh b/setScreen.sh
@@ -1 +0,0 @@
-swaymsg output DP-8 res 5120x1440
diff --git a/setScreenX.sh b/setScreenX.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output eDP-1 --primary --mode 1920x1200 --pos 0x1440 --rotate normal --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off --output DP-3-1 --off --output DP-3-2 --off --output DP-3-3 --mode 5120x1440 --pos 0x0 --rotate normal
diff --git a/statusbar.sh b/statusbar.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# this is called in a loop that runs in the background from xinitrc.
+
+xsetroot -name "$(date)"
diff --git a/suspend.sh b/suspend.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+sleep .1
+loginctl suspend
diff --git a/tmux.sh b/tmux.sh
@@ -2,7 +2,8 @@
background="#000000"
foreground="#ffffff"
-highlight="#44475a"
+#highlight="#44475a"
+highlight="#aaaaaa"
prompt="Select Tmux Project Directory:"
# exclude git repos which have lots of sub-dirs,
@@ -14,6 +15,7 @@ directory=$(find ~ -type d \
! -path '*/.local/*' \
! -path '*/.cache/*' \
! -path '*/.firefox/*' \
+ ! -path '*/.mozilla/*' \
! -path '*/.git/*' \
| dmenu -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
@@ -30,4 +32,4 @@ if [ ! -d "$directory" ]; then
fi
cd "$directory"
-foot -e tmux new-session -A -s $directory
+st -e tmux new-session -A -s $directory
diff --git a/zathura.sh b/zathura.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+pdfs=$(find ~ -type f -iname '*.pdf')
+
+
+background="#000000"
+foreground="#ffffff"
+#highlight="#44475a"
+highlight="#aaaaaa"
+prompt="Select a pdf:"
+
+dmenu_cmd="dmenu -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+pdf=$(printf '%s\n' "${pdfs[@]}" | eval "$dmenu_cmd" "$@")
+
+if [ -n "$pdf" ]; then
+ zathura $pdf
+fi