commit c14d9cce052cc820ee6b838bf41cf7ae7031471f
parent eca21d15bc97b229c0e6bec048ffc51788edf55f
Author: AndrewLockVI <andrew@laack.co>
Date: Thu, 13 Feb 2025 22:31:30 -0600
Updated install, password, and dmenu scripts. I also added a search script to open a web browser and use bookmarks for dmenu list as well as a project opener using tmux
Diffstat:
5 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/dmenu.sh b/dmenu.sh
@@ -1,9 +1,8 @@
-#!/bin/ash
+#!/bin/bash
background="#000000"
foreground="#ffffff"
highlight="#44475a"
-border="#6272a4"
-prompt="Open"
+prompt="Run Program:"
dmenu_run -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground" -p "$prompt"
diff --git a/install.sh b/install.sh
@@ -138,11 +138,15 @@ doas apk add g++
doas apk add cmake
# control brightness of (laptop) screen
-sudo apk add brightnessctl
+doas apk add brightnessctl
# watch file, allows tex compilation without vimtex
-sudo apk add entr
+doas apk add entr
+
+# for script to get browser history
+doas apk add sqlite
# tailscale
doas apk add tailscale
doas tailscale up
+
diff --git a/pass.sh b/pass.sh
@@ -21,8 +21,7 @@ password_files=( "${password_files[@]%.gpg}" )
background="#000000"
foreground="#ffffff"
highlight="#44475a"
-border="#6272a4"
-prompt="Open"
+prompt="Select a password:"
dmenu_cmd="dmenu -nb \"$background\" -nf \"$foreground\" -sb \"$highlight\" -sf \"$foreground\" -p \"$prompt\""
diff --git a/search.sh b/search.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+
+background="#000000"
+foreground="#ffffff"
+highlight="#44475a"
+prompt="Search URL: "
+
+dmenu_cmd="dmenu -nb $background -nf $foreground -sb $highlight -sf $foreground -p URL:"
+
+
+urls=$(awk '{print $1}' ~/.config/qutebrowser/bookmarks/urls)
+
+url=$(echo "$urls" | $dmenu_cmd)
+
+
+if [ -n "$url" ]; then
+ qutebrowser "$url"
+fi
diff --git a/tmux.sh b/tmux.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+background="#000000"
+foreground="#ffffff"
+highlight="#44475a"
+prompt="Select Tmux Project Directory:"
+
+# 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 '*/.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"
+foot -e tmux new-session -A -s $directory