commit 7f06e4008521a69c2d132a9a0b98aec3b66840c8
parent 8de4e7423d6ca09e5687bc433a2f257ecf7fe891
Author: AndrewLockVI <andrew@laack.co>
Date: Mon, 24 Feb 2025 20:08:38 -0600
Updated all of my scripts to work with center.
Diffstat:
19 files changed, 87 insertions(+), 71 deletions(-)
diff --git a/abduco.sh b/abduco.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+background=$1
+foreground=$2
+highlight=$3
+prompt="abduco dir:"
+
+# exclude git repos which have lots of sub-dirs,
+# .cache which has a ton of firefox crap
+# .local because I never really go there and lots
+# of crap there too, and finally .firefox.
+
+directory=$(find ~ -type d \
+ ! -path '*/.local/*' \
+ ! -path '*/.cache/*' \
+ ! -path '*/.firefox/*' \
+ ! -path '*/.mozilla/*' \
+ ! -path '*/.git/*' \
+ | dmenu -l 15 -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
+
+# Check if a directory was selected
+if [ -z "$directory" ]; then
+ echo "No directory selected."
+ exit 1
+fi
+
+# Check if the directory exists
+if [ ! -d "$directory" ]; then
+ echo "Directory not found!"
+ exit 1
+fi
+
+cd $directory
+
+# directory name w/o full path
+dirWO=$(echo $directory | sed "s/\// /g"| cut -c 2- | awk '{print $NF}')
+st -e abduco -A "$dirWO" dvtm
diff --git a/add-bookmark.sh b/add-bookmark.sh
@@ -2,7 +2,7 @@
out=$(xclip -o -sel clip)
-selection=$(echo -e "Yes\nNo" | dmenu -p "Are you sure you would like to save $out as a bookmark:")
+selection=$(echo -e "Yes\nNo" | dmenu -l 15 -i -p "save $out:")
if [ $selection != "Yes" ]; then
exit 0
diff --git a/attach.sh b/attach.sh
@@ -7,11 +7,11 @@
# running non-interactively
if [ -n "$1" ]; then
- prompt="Select a session:"
+ prompt="session:"
background=$1
foreground=$2
highlight=$3
- dmenu_cmd="dmenu -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+ dmenu_cmd="dmenu -l 15 -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
selection=$(tmux ls | awk '{print $1}' | sed 's/:$//' | eval $dmenu_cmd)
if [ -z "$selection" ]; then
diff --git a/bookmarks.sh b/bookmarks.sh
@@ -4,7 +4,7 @@
file="$HOME/bookmarks/marks.txt"
-selection=$(cat $file| dmenu)
+selection=$(cat $file| dmenu -p "copy:" -l 15)
if [ -z $selection ]; then
diff --git a/compile.sh b/compile.sh
@@ -2,14 +2,13 @@
# Auto-compilation for tex/md files to pdf using entr.
-inputFile=$1
-outputFile=$2
-
# compile right at the start
-pandoc $1 -o $2
+
+filename="${1%.*}"
+pandoc $1 -o $filename.pdf
# open pdf viewer, non blocking
-zathura $2 &
+zathura $filename.pdf &
# watch for changes, recompile
-echo $1 | entr pandoc $1 -o $2
+echo $1 | entr pandoc $1 -o $filename.pdf
diff --git a/dmenu.sh b/dmenu.sh
@@ -4,6 +4,6 @@ background=$1
foreground=$2
highlight=$3
-prompt="Run Program:"
+prompt="run:"
-dmenu_run -i -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground" -p "$prompt"
+dmenu_run -l 15 -i -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground" -p "$prompt"
diff --git a/dvtm.sh b/dvtm.sh
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-background=$1
-foreground=$2
-highlight=$3
-prompt="Select a directory to start tabbed in:"
-
-# exclude git repos which have lots of sub-dirs,
-# .cache which has a ton of firefox crap
-# .local because I never really go there and lots
-# of crap there too, and finally .firefox.
-
-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")
-
-# Check if a directory was selected
-if [ -z "$directory" ]; then
- echo "No directory selected."
- exit 1
-fi
-
-# Check if the directory exists
-if [ ! -d "$directory" ]; then
- echo "Directory not found!"
- exit 1
-fi
-
-cd $directory
-dirWO=$(echo $directory | sed "s/\// /g"| cut -c 2-)
-st -e abduco -A "$dirWO" dvtm
diff --git a/find-music.sh b/find-music.sh
@@ -10,13 +10,12 @@ highlight=$4
-prompt="Select an artist:"
+prompt="play:"
-dmenu_cmd="dmenu -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+dmenu_cmd="dmenu -l 15 -i -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')
+out="$1$(ls "$artistDirectory" | eval $dmenu_cmd)"
diff --git a/init-screen.sh b/init-screen.sh
@@ -4,7 +4,7 @@
# a basic setup I use for doing school work. This setup has a tmux session on
# the right, qute in the middle, and a basic terminal emulator on the left.
-prompt="Select Project Directory:"
+prompt="init dir:"
# exclude git repos which have lots of sub-dirs,
# .cache which has a ton of firefox crap
@@ -17,7 +17,7 @@ directory=$(find ~ -type d \
! -path '*/.firefox/*' \
! -path '*/.mozilla/*' \
! -path '*/.git/*' \
- | dmenu)
+ | dmenu -p "$prompt" -l 15)
# Check if a directory was selected
if [ -z "$directory" ]; then
@@ -39,5 +39,6 @@ qutebrowser --target window "uws.instructure.com"
# wait long enough for browser to load in
sleep .5s
-st -e dvtm &
+dirWO=$(echo $directory | sed "s/\// /g"| cut -c 2- | awk '{print $NF}')
+st -e abduco -A "$dirWO" dvtm
#st -e tmux new-session -A -s $directory &
diff --git a/install.sh b/install.sh
@@ -92,7 +92,7 @@ doas apk add zathura-pdf-mupdf
# map <right> goForward
# map ys LinkHints.activateModeToCopyLinkUrl
-doas apk add firefox
+#doas apk add firefox
doas apk add qutebrowser
# LaTeX + filetype conversion
@@ -200,7 +200,22 @@ doas apk add dragon
# fuck honorlock, that proprietary spyware.
-doas apk add chromium
+#doas apk add chromium
# dragon
doas apk add gtk+3.0-dev
+doas apk add librewolf
+
+
+#doas apk add bluez
+
+#doas apk add flatpak
+#flatpak install flathub app.zen_browser.zen
+
+doas apk add emacs
+doas apk add emacs-x11
+
+# Kakoune (not worth it for me, maybe for you though!)
+#doas apk add kakoune
+#doas apk add kakoune-lsp
+#doas apk add fzf
diff --git a/mpv.sh b/mpv.sh
@@ -1,4 +1,4 @@
#!/bin/ash
#mpv --force-window=immediate $(wl-paste)$ && exit
-mpv --force-window=immediate $(xclip -o -selection clipboard) && exit
+mpv --force-window=immediate $(xclip -o -selection clipboard)
diff --git a/open-bookmark.sh b/open-bookmark.sh
@@ -4,7 +4,7 @@
file="$HOME/bookmarks/marks.txt"
-selection=$(cat $file| dmenu)
+selection=$(cat $file| dmenu -p "open:" -l 15)
if [ -z $selection ]; then
diff --git a/pass.sh b/pass.sh
@@ -22,10 +22,10 @@ background=$1
foreground=$2
highlight=$3
-prompt="Select a password:"
+prompt="account:"
-dmenu_cmd="dmenu -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+dmenu_cmd="dmenu -l 15 -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
password=$(printf '%s\n' "${password_files[@]}" | eval "$dmenu_cmd" "$@")
diff --git a/power.sh b/power.sh
@@ -4,9 +4,9 @@ background=$1
foreground=$2
highlight=$3
-prompt="Select a power option:"
+prompt="power:"
-dmenu_cmd="dmenu -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+dmenu_cmd="dmenu -l 15 -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
opts=("suspend" "reboot" "hibernate" "poweroff")
diff --git a/ranger.sh b/ranger.sh
@@ -16,7 +16,7 @@ directory=$(find $input_dir -type d \
! -path '*/.git/' \
! -path '*/git/*' \
! -path '*/docker/*' \
- | dmenu -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
+ | dmenu -l 15 -i -p "ranger dir:" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
if [ -n "$directory" ]; then
diff --git a/search.sh b/search.sh
@@ -4,9 +4,9 @@
background=$1
foreground=$2
highlight=$3
-prompt="Search URL: "
+prompt="search:"
-dmenu_cmd="dmenu -i -nb $background -nf $foreground -sb $highlight -sf $foreground -p URL:"
+dmenu_cmd="dmenu -l 15 -i -nb $background -nf $foreground -sb $highlight -sf $foreground -p URL:"
#urls=$(awk '{print $1}' ~/.config/qutebrowser/bookmarks/urls)
diff --git a/tabbed.sh b/tabbed.sh
@@ -3,7 +3,7 @@
background=$1
foreground=$2
highlight=$3
-prompt="Select a directory to start tabbed in:"
+prompt="tabbed dir:"
# exclude git repos which have lots of sub-dirs,
# .cache which has a ton of firefox crap
@@ -16,7 +16,7 @@ directory=$(find ~ -type d \
! -path '*/.firefox/*' \
! -path '*/.mozilla/*' \
! -path '*/.git/*' \
- | dmenu -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
+ | dmenu -l 15 -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
# Check if a directory was selected
if [ -z "$directory" ]; then
diff --git a/tmux.sh b/tmux.sh
@@ -3,7 +3,7 @@
background=$1
foreground=$2
highlight=$3
-prompt="Select Tmux Project Directory:"
+prompt="tmux dir:"
# exclude git repos which have lots of sub-dirs,
# .cache which has a ton of firefox crap
@@ -16,7 +16,7 @@ directory=$(find ~ -type d \
! -path '*/.firefox/*' \
! -path '*/.mozilla/*' \
! -path '*/.git/*' \
- | dmenu -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
+ | dmenu -l 15 -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
# Check if a directory was selected
if [ -z "$directory" ]; then
diff --git a/zathura.sh b/zathura.sh
@@ -6,9 +6,9 @@ pdfs=$(find ~ -type f -iname '*.pdf')
background=$1
foreground=$2
highlight=$3
-prompt="Select a pdf:"
+prompt="pdf:"
-dmenu_cmd="dmenu -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
+dmenu_cmd="dmenu -l 15 -i -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
pdf=$(printf "%s\n" "$pdfs" | eval "$dmenu_cmd" "$@")
if [ -n "$pdf" ]; then