commit abdec5f5135f7bb0319167e53e2ae520343d9f57
parent 37df1b7549bd23900396868f74802ca950d5198f
Author: AndrewLockVI <andrew@laack.co>
Date: Wed, 19 Feb 2025 13:57:55 -0600
Updated scripts
Diffstat:
10 files changed, 111 insertions(+), 8 deletions(-)
diff --git a/add-bookmark.sh b/add-bookmark.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+file=$HOME/bookmarks/marks.txt
+
+xclip -o -sel clip >> $file
diff --git a/attach.sh b/attach.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# if $1 != '' then we are to assume this is being ran without a terminal
+# session. If this is the case, create a new terminal and tmux session.
+
+
+# running non-interactively
+if [ -n "$1" ]; then
+
+ prompt="Select a session:"
+ background=$1
+ foreground=$2
+ highlight=$3
+ dmenu_cmd="dmenu -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
+ exit 0
+ fi
+
+ st -e tmux attach -t $selection
+
+else
+# running interactively
+ selection=$(tmux ls | awk '{print $1}' | sed 's/:$//' | dmenu)
+
+ if [ -z "$selection" ]; then
+ exit 0
+ fi
+
+ tmux attach -t $selection
+fi
diff --git a/bookmarks.sh b/bookmarks.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# load bookmarks using dmenu
+
+file="$HOME/bookmarks/marks.txt"
+
+selection=$(cat $file| dmenu)
+
+
+if [ -z $selection ]; then
+ exit 0
+fi
+
+
+echo $selection | xclip -selection clipboard
diff --git a/disableScreenOff.sh b/disableScreenOff.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+alias disableOff="xset s off && xset -dpms && xset s noblank"
diff --git a/init-screen.sh b/init-screen.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+# this is a shell script that takes in a given directory and lays out
+# 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:"
+
+# 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)
+
+# 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"
+st &
+
+# use your own url
+qutebrowser --target window "uws.instructure.com"
+
+# wait long enough for browser to load in
+sleep .5s
+
+st -e tmux new-session -A -s $directory &
diff --git a/install.sh b/install.sh
@@ -20,8 +20,8 @@
# why isn't this default?
doas apk add curl
-# open apps
-doas apk add dmenu
+# open apps (this should be installed using my configuration)
+# doas apk add dmenu
# git
doas apk add git
@@ -118,7 +118,7 @@ doas apk add zip
# password manager
# - See my scripts for pass.sh which is taken from the official
# - pass repo and is an integration between pass and dmenu
-# - for searching for passwords. If you user ROFI, similar
+# - for searching for passwords. If you use ROFI, similar
# - functions also exist.
doas apk add gpg
@@ -175,11 +175,12 @@ doas apk add scrot
doas apk add feh
# file manager
-# ranger is not very useful
-# doas apk add ranger
+doas apk add ranger
doas apk add picom
# compiling st
doas apk add ncurses
doas apk add tmux
+
+doas apk add htop
diff --git a/ranger.sh b/ranger.sh
@@ -13,6 +13,9 @@ directory=$(find $input_dir -type d \
! -path '*/.firefox/*' \
! -path '*/.mozilla/*' \
! -path '*/.git/*' \
+ ! -path '*/.git/' \
+ ! -path '*/git/*' \
+ ! -path '*/docker/*' \
| dmenu -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground")
diff --git a/search.sh b/search.sh
@@ -9,10 +9,11 @@ prompt="Search URL: "
dmenu_cmd="dmenu -i -nb $background -nf $foreground -sb $highlight -sf $foreground -p URL:"
-urls=$(awk '{print $1}' ~/.config/qutebrowser/bookmarks/urls)
+#urls=$(awk '{print $1}' ~/.config/qutebrowser/bookmarks/urls)
-url=$(echo "$urls" | $dmenu_cmd)
+urls=$(cat $HOME/bookmarks/marks.txt)
+url=$(echo "$urls" | $dmenu_cmd)
if [ -n "$url" ]; then
qutebrowser --target window "$url"
diff --git a/setScreenX.sh b/setScreenX.sh
@@ -1,2 +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
+xrandr --output eDP-1 --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 --primary --mode 5120x1440 --pos 0x0 --rotate normal
diff --git a/tmux.sh b/tmux.sh
@@ -32,3 +32,4 @@ fi
cd "$directory"
st -e tmux new-session -A -s $directory
+