commit 2ecbb0a2812f4829f644765e3157eb07747137c1
parent 0e539292a4fa0f9b8640ad657d91a3067c623b3e
Author: regexghost <regexghost@protonmail.com>
Date: Mon, 11 May 2026 21:17:40 +0100
added qmount.sh, bookmarks and dmenu-runner
Diffstat:
5 files changed, 73 insertions(+), 1 deletion(-)
diff --git a/panel-scripts/lemonbar-runner.sh b/panel-scripts/lemonbar-runner.sh
@@ -1,3 +1,5 @@
#!/bin/sh
-"$XDG_DATA_HOME/regexghost/panel/lemonbar-bar.sh" | lemonbar -o -0 -f "Fira Code Regular:size=11" -o -2 -f "Font Awesome 7 Free Solid:size=10" -g 1200x26+720+0 -B '#1c1b19'
+. "$XDG_CONFIG_HOME"/regexghost/current-theme.sh
+
+"$XDG_DATA_HOME/regexghost/panel/lemonbar-bar.sh" | lemonbar -o -0 -f "${FONT_FAMILY} Regular:size=11" -o -2 -f "Font Awesome 7 Free Solid:size=10" -g 1200x26+720+0 -B "#${BACKGROUND_BLACK}" -F "#${FOREGROUND_WHITE}"
diff --git a/terminal-scripts/qmount.sh b/terminal-scripts/qmount.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+mount_points="~/Downloads/USBDrive
+~/Downloads/BackupMount"
+root_device="$(/usr/bin/lsblk -l -n --output NAME,MOUNTPOINTS | grep '/$' | sed 's/p[0-9] \///g; s/[0-9] \///g')"
+
+if [ "$1" = "mount" ]; then
+ unmounted="$(/usr/bin/lsblk -l -n --output NAME,FSTYPE,SIZE,MOUNTPOINTS,TYPE | grep "part" | grep -v "/" | grep -v "$root_device" | tr -s " " | cut -d " " -f 1-3)"
+
+ chosen_partition="$(echo "$unmounted" | fzf | cut -d " " -f 1)"
+ chosen_mount_point="$(echo "$mount_points" | fzf | sed "s|~|$HOME|")"
+
+ sudo mount "/dev/${chosen_partition}" "$chosen_mount_point" && notify-send "Mounted Successfully" || notify-send "Mount Failed"
+elif [ "$1" = "unmount" ]; then
+ mounted="$(/usr/bin/lsblk -l -n --output NAME,MOUNTPOINTS | grep "/" | grep -v "$root_device" | tr -s " ")"
+ chosen_path="$(echo "$mounted" | fzf | cut -d " " -f 2-)"
+ sudo umount "$chosen_path" && notify-send "Unmounted Successfully" || notify-send "Unmounting Failed"
+fi
diff --git a/wm-scripts/Makefile b/wm-scripts/Makefile
@@ -4,3 +4,5 @@ normal:
mkdir -p ${PREFIX}
cp altgrtosuper.sh ${PREFIX}/altgrtosuper.sh
cp volume.sh ${PREFIX}/volume.sh
+ cp dmenu-runner.sh ${PREFIX}/dmenu-runner.sh
+ cp bookmarks.sh ${PREFIX}/bookmarks.sh
diff --git a/wm-scripts/bookmarks.sh b/wm-scripts/bookmarks.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env sh
+
+DMENU_SCRIPT="$XDG_DATA_HOME/regexghost/wm-scripts/dmenu-runner.sh"
+BOOKMARKS_FILE="$XDG_DATA_HOME/regexghost/script-data/bookmarks.txt"
+
+output="$(cat "$BOOKMARKS_FILE" | sed 's/DELIM.*//g' | "${DMENU_SCRIPT}" "Select Bookmark:")"
+status=$?
+
+real_bookmark=$(cat "$BOOKMARKS_FILE" | grep "${output}DELIM" | sed 's/.*DELIM//g')
+
+# Return - default
+if [ $status -eq 0 ]; then
+ echo -n $real_bookmark | xclip -selection clipboard
+# Shift+Return - type/open url
+elif [ $status -eq 10 ]; then
+ if echo "$real_bookmark" | grep -q "^http"; then
+ $BROWSER "$real_bookmark"
+ else
+ xdotool type "$real_bookmark"
+ fi
+# Ctrl+a - add new
+elif [ $status -eq 11 ]; then
+ new_bookmark="$(echo "" | "${DMENU_SCRIPT}" "Enter new bookmark:" -pa)"
+ new_alias="$(echo "" | "${DMENU_SCRIPT}" "Enter alias (blank for none):" -pa)"
+ [ "$new_alias" = "" ] && new_alias="$new_bookmark"
+ echo "${new_alias}DELIM${new_bookmark}" >> "$BOOKMARKS_FILE"
+# Ctrl+w - delete
+elif [ $status -eq 12 ]; then
+ yes_or_no="$(echo "No\nYes" | "${DMENU_SCRIPT}" "Delete Bookmark ${output} (?):")"
+ if [ "$yes_or_no" = "Yes" ]; then
+ line="$(grep -n "${output}DELIM${real_bookmark}" $BOOKMARKS_FILE | sed 's/:.*//g')"
+ sed "${line}d" $BOOKMARKS_FILE > /tmp/out
+ mv /tmp/out $BOOKMARKS_FILE
+ fi
+fi
diff --git a/wm-scripts/dmenu-runner.sh b/wm-scripts/dmenu-runner.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. "$XDG_CONFIG_HOME/regexghost/current-theme.sh"
+
+arg1=""
+arg2=""
+for arg; do
+ if [ "$arg" = "-ix" ]; then
+ arg1="-ix"
+ elif [ "$arg" = "-pa" ]; then
+ arg2="-pa"
+ fi
+done
+
+dmenu -i $arg1 $arg2 -p "$1" -l 20 -fn "$FONT_FAMILY: 14" -nb "#${BACKGROUND_BLACK}" -nf "#${FOREGROUND_WHITE}" -pb "#${BACKGROUND_BLACK}" -pf "#${FOREGROUND_WHITE}" -sb "#${BLUE}" -sf "#${BLACK}" -bb "#${GREEN}"