commit 992d173aabdb9ea57b6c09802c00e5808e04709f
parent c11437a8700d02514e88baf1289b2c8e5fbc3b38
Author: AndrewLockVI <andrew@laack.co>
Date: Mon, 17 Feb 2025 21:37:57 -0600
Added script to open directory with tabbed
Diffstat:
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/install.sh b/install.sh
@@ -2,6 +2,7 @@
# alpine base install via 'setup-alpine'
# desktop setup via 'setup-desktop' (sway)
# Make sure to uncomment second line of /etc/apk/repositories
+# install st, dwm, and tabbed if you are intending to replicate my dwm/x11 setup.
# Make sure to run this script as YOUR user, not root. Your user
# will need doas privileges, but if you run this as root setting the default
@@ -48,7 +49,8 @@ doas apk add thunderbird
doas apk add pulseaudio
# Session Manager
-doas apk add tmux
+# I use tabbed now instead
+# doas apk add tmux
# Control Sound
doas apk add pavucontrol
@@ -173,5 +175,6 @@ doas apk add scrot
doas apk add feh
# file manager
-doas apk add ranger
+# ranger is not very useful
+# doas apk add ranger
doas apk add picom
diff --git a/tabbed.sh b/tabbed.sh
@@ -0,0 +1,35 @@
+#!/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"
+
+tabbed -r 2 st -w ''