commit d660d8725152b7e78fcd6df66e8f66b1c63245fb
parent 0ac7057b4048f1d967daf15db4b7e330add44d8f
Author: regexghost <dev@regexghost.com>
Date: Wed, 19 Aug 2026 16:09:53 +0100
added rustup to apt-install.sh, dmenu-wiki.sh script, bound to Super+Shift+k in jwmrc
Diffstat:
4 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/apt-install.sh b/apt-install.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+# Script to install packages, for Debian 13 (currently)
+# Packages needed for program compiling are installed separately in other-programs.sh
+
# x11
# system utils
# web
@@ -25,6 +28,6 @@ sudo apt install \
fzf fasd trash-cli duf rsync pup aria2 mediainfo xmlstarlet rename jq yq expect \
figlet ncdu pulsemixer gh nnn qalc vim alpine htop btop intel-gpu-tools \
keepassxc-full xfe \
- golang python3-venv groff texinfo \
+ golang python3-venv rustup groff texinfo \
ifuse libimobiledevice-utils android-file-transfer \
tidy wbritish wbritish-huge sqlite3
diff --git a/jwm/.config/jwm/jwmrc b/jwm/.config/jwm/jwmrc
@@ -206,6 +206,8 @@
<Key mask="4" key="s">exec:st -t Soundboard -c soundboard -g 40x30 -e soundboard</Key>
<Key mask="4S" key="c">exec:dunstctl close-all</Key>
<Key mask="4" key="x">exec:~/.local/share/regexghost/wm-scripts/jwm-scratchpad.sh</Key>
+ <Key mask="4S" key="k">exec:~/.local/share/regexghost/wm-scripts/dmenu-wiki.sh</Key>
+
<!-- Mouse bindings -->
<!-- <Mouse context="root" button="4">ldesktop</Mouse> -->
diff --git a/wm-scripts/Makefile b/wm-scripts/Makefile
@@ -12,3 +12,4 @@ normal:
cp jwm-scratchpad.sh ${PREFIX}/jwm-scratchpad.sh
cp snippets.sh ${PREFIX}/snippets.sh
cp launch-stream.sh ${PREFIX}/launch-stream.sh
+ cp dmenu-wiki.sh ${PREFIX}/dmenu-wiki.sh
diff --git a/wm-scripts/dmenu-wiki.sh b/wm-scripts/dmenu-wiki.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Script using dmenu to search wikis
+
+# Example config:
+# `https://en.wikipedia.org/wiki,https://en.wikipedia.org/w/api.php,Wikipedia`
+# `https://wiki.factorio.com,https://wiki.factorio.com/api.php,Factorio Wiki`
+# Basically the format is base-url,api-url,name
+
+WIKI_FILE="$XDG_CONFIG_HOME/regexghost/wiki-list.csv"
+
+DMENU_RUNNER="$XDG_DATA_HOME/regexghost/wm-scripts/dmenu-runner.sh"
+
+wiki_to_search="$(cat "$WIKI_FILE" | cut -d "," -f 3- | "$DMENU_RUNNER" "Select wiki to search" -ix)"
+
+[ "$wiki_to_search" = "" ] && exit
+
+wiki_to_search=$((wiki_to_search+1))
+
+name="$(sed -n "${wiki_to_search}p" "$WIKI_FILE" | cut -d "," -f 3-)"
+url="$(sed -n "${wiki_to_search}p" "$WIKI_FILE" | cut -d "," -f 1)"
+api_url="$(sed -n "${wiki_to_search}p" "$WIKI_FILE" | cut -d "," -f 2)"
+
+search_term="$(echo "" | "$DMENU_RUNNER" "Enter search term (or none for homepage)" -pa)"
+
+status="$?"
+
+[ "$status" = "0" ] || exit
+
+if [ "$search_term" = "" ]; then
+ "$BROWSER" "$url"
+ exit
+fi
+
+search_term="$(echo "$search_term" | sed 's/ /+/g')"
+
+results="$(curl "${api_url}?action=query&format=json&list=search&srsearch=${search_term}" | sed 's/\\n//g')"
+
+titles="$(echo "$results" | jq -r .query.search.[].title)"
+
+if [ "$titles" = "" ] || [ "$title" = "null" ]; then
+ notify-send "No results"
+ exit
+fi
+
+selected_page="$(echo "$titles" | "$DMENU_RUNNER" "Select page" | sed 's/ /_/g')"
+
+[ "$selected_page" = "" ] && exit
+
+"$BROWSER" "${url}/${selected_page}"