From f51a0faed7bd2881de3c361c852234f3365efcf0 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Thu, 2 Apr 2026 14:38:40 +0100 Subject: Add lsp, formatter, linter for Bash --- nvim/.config/nvim/lsp/bash_language_server.lua | 5 +++++ nvim/.config/nvim/lua/config/lsp.lua | 1 + nvim/.config/nvim/lua/plugins/conform.lua | 2 ++ nvim/.config/nvim/lua/plugins/nvim-lint.lua | 2 ++ 4 files changed, 10 insertions(+) create mode 100644 nvim/.config/nvim/lsp/bash_language_server.lua diff --git a/nvim/.config/nvim/lsp/bash_language_server.lua b/nvim/.config/nvim/lsp/bash_language_server.lua new file mode 100644 index 0000000..d7c9ef1 --- /dev/null +++ b/nvim/.config/nvim/lsp/bash_language_server.lua @@ -0,0 +1,5 @@ +---@type vim.lsp.Config +return { + cmd = { "bash-language-server", "start" }, + filetypes = { "bash", "sh" }, +} diff --git a/nvim/.config/nvim/lua/config/lsp.lua b/nvim/.config/nvim/lua/config/lsp.lua index be37e27..038ba44 100644 --- a/nvim/.config/nvim/lua/config/lsp.lua +++ b/nvim/.config/nvim/lua/config/lsp.lua @@ -1,4 +1,5 @@ vim.lsp.enable({ + "bash_language_server", "intelephense", "lua_ls", "marksman", diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua index 31d0302..bf6ff47 100644 --- a/nvim/.config/nvim/lua/plugins/conform.lua +++ b/nvim/.config/nvim/lua/plugins/conform.lua @@ -6,6 +6,8 @@ require("conform").setup({ markdown = { "prettier" }, nix = { "nixfmt" }, php = { "php_cs_fixer" }, + bash = { "shfmt" }, + sh = { "shfmt" }, }, formatters = { php_cs_fixer = { diff --git a/nvim/.config/nvim/lua/plugins/nvim-lint.lua b/nvim/.config/nvim/lua/plugins/nvim-lint.lua index 7129dab..9df79bf 100644 --- a/nvim/.config/nvim/lua/plugins/nvim-lint.lua +++ b/nvim/.config/nvim/lua/plugins/nvim-lint.lua @@ -5,4 +5,6 @@ require("lint").linters_by_ft = { markdown = { "markdownlint-cli2" }, nix = { "statix" }, php = { "phpcs" }, + bash = { "shellcheck" }, + sh = { "shellcheck" }, } -- cgit v1.2.3-13-gbd6f From df06efee9eac3c9a40b3f820956ec3d6edbbe3a7 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 17 Apr 2026 14:54:23 +0100 Subject: Add lsp, formatter, linter for typescript --- nvim/.config/nvim/lsp/vtsls.lua | 39 +++++++++++++++++++++++ nvim/.config/nvim/lua/config/lsp.lua | 1 + nvim/.config/nvim/lua/plugins/conform.lua | 9 ++++++ nvim/.config/nvim/lua/plugins/nvim-treesitter.lua | 3 ++ 4 files changed, 52 insertions(+) create mode 100644 nvim/.config/nvim/lsp/vtsls.lua diff --git a/nvim/.config/nvim/lsp/vtsls.lua b/nvim/.config/nvim/lsp/vtsls.lua new file mode 100644 index 0000000..544f942 --- /dev/null +++ b/nvim/.config/nvim/lsp/vtsls.lua @@ -0,0 +1,39 @@ +-- https://raw.githubusercontent.com/neovim/nvim-lspconfig/refs/heads/master/lsp/vtsls.lua +---@type vim.lsp.Config +return { + cmd = { 'vtsls', '--stdio' }, + init_options = { + hostInfo = 'neovim', + }, + filetypes = { + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + }, + root_dir = function(bufnr, on_dir) + -- The project root is where the LSP can be started from + -- As stated in the documentation above, this LSP supports monorepos and simple projects. + -- We select then from the project root, which is identified by the presence of a package + -- manager lock file. + local root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' } + -- Give the root markers equal priority by wrapping them in a table + root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } } + or vim.list_extend(root_markers, { '.git' }) + -- exclude deno + local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' }) + local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' }) + local project_root = vim.fs.root(bufnr, root_markers) + if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then + -- deno lock is closer than package manager lock, abort + return + end + if deno_root and (not project_root or #deno_root >= #project_root) then + -- deno config is closer than or equal to package manager lock, abort + return + end + -- project is standard TS, not deno + -- We fallback to the current working directory if no project root is found + on_dir(project_root or vim.fn.getcwd()) + end, +} diff --git a/nvim/.config/nvim/lua/config/lsp.lua b/nvim/.config/nvim/lua/config/lsp.lua index 038ba44..2ddeb6a 100644 --- a/nvim/.config/nvim/lua/config/lsp.lua +++ b/nvim/.config/nvim/lua/config/lsp.lua @@ -4,6 +4,7 @@ vim.lsp.enable({ "lua_ls", "marksman", "nixd", + "vtsls", }) vim.diagnostic.config({ diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua index bf6ff47..365fb2d 100644 --- a/nvim/.config/nvim/lua/plugins/conform.lua +++ b/nvim/.config/nvim/lua/plugins/conform.lua @@ -8,10 +8,19 @@ require("conform").setup({ php = { "php_cs_fixer" }, bash = { "shfmt" }, sh = { "shfmt" }, + javascript = { "biome", "prettier", stop_after_first = true }, + typescript = { "biome", "prettier", stop_after_first = true }, + javascriptreact = { "biome", "prettier", stop_after_first = true }, + typescriptreact = { "biome", "prettier", stop_after_first = true }, }, formatters = { php_cs_fixer = { command = "php-cs-fixer", }, + -- Biome is great because it doesn't require a node_modules folder to work. + biome = { + command = "biome", + args = { "format", "--stdin-file-path", "$FILENAME" }, + }, }, }) diff --git a/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua b/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua index acb3fbd..e646c1b 100644 --- a/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -7,10 +7,13 @@ require("nvim-treesitter").install({ "gitattributes", "gitcommit", "gitignore", + "javascript", "json", "lua", "markdown", "markdown_inline", "nix", "php", + "tsx", + "typescript", }) -- cgit v1.2.3-13-gbd6f From f36addcdfff61845cb0934db7775f51fab607ba0 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 13 Jun 2026 13:16:59 +0100 Subject: Use sops command in se bash function --- bash/.bash_aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/.bash_aliases b/bash/.bash_aliases index 0eafcad..af863cc 100644 --- a/bash/.bash_aliases +++ b/bash/.bash_aliases @@ -59,5 +59,5 @@ se() { mkdir -p "$(dirname "$SECRET_PATH")" fi - nix shell nixpkgs#sops -c sops "$SECRET_PATH" + sops -c sops "$SECRET_PATH" } -- cgit v1.2.3-13-gbd6f From f8136519604b72338eb4d042bf2e69f8e1f31e64 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 13 Jun 2026 14:00:00 +0100 Subject: Ignore result file as these are often from rebuiling NixOS configurations that I don't want to commit --- git/.config/git/gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/git/.config/git/gitignore b/git/.config/git/gitignore index d992b6f..51f1a72 100644 --- a/git/.config/git/gitignore +++ b/git/.config/git/gitignore @@ -1 +1,2 @@ Session.vim +result -- cgit v1.2.3-13-gbd6f From 7c538160f89ecadb8428733f390447be1a5ec78a Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 21 Jun 2026 11:28:06 +0100 Subject: No longer need -c sop for sops command --- bash/.bash_aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/.bash_aliases b/bash/.bash_aliases index af863cc..0099a19 100644 --- a/bash/.bash_aliases +++ b/bash/.bash_aliases @@ -59,5 +59,5 @@ se() { mkdir -p "$(dirname "$SECRET_PATH")" fi - sops -c sops "$SECRET_PATH" + sops "$SECRET_PATH" } -- cgit v1.2.3-13-gbd6f From b2e8d5fc138d1ee9bb0eb0e4e3bf524a45d9fe25 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 21 Jun 2026 17:03:56 +0100 Subject: Remove bin --- bin/.bin/new-episode | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 bin/.bin/new-episode diff --git a/bin/.bin/new-episode b/bin/.bin/new-episode deleted file mode 100755 index c8a2305..0000000 --- a/bin/.bin/new-episode +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -if [ -z "$1" ]; then - echo "Usage: new-episode " - exit 1 -fi - -EP_NUM=$(printf "%03d" "$1") - -# Capture the Name (Shift the first arg so we can join the rest). -shift -RAW_NAME="${*:-untitled}" - -# Create the Title (Capitalize first letter of every word). -# Using a simple sed regex to capitalize words. -EP_TITLE=$(echo "$RAW_NAME" | sed 's/\b./\U&/g') - -# Create the Filename Slug (Lower case and replace spaces with hyphens) -# tr '[:upper:]' '[:lower:]' handles the casing -# tr ' ' '-' handles the spaces -SLUG=$(echo "$RAW_NAME" | tr '[:upper:]' '[:lower:]' | tr ' ' '-') -FILENAME="episode-${EP_NUM}-${SLUG}.php" - -# Generate the file -cat < "$FILENAME" - Date: Sun, 21 Jun 2026 19:01:25 +0100 Subject: Add bookmark management scripts --- bin/.bin/add-bookmark.sh | 36 ++++++++++++++++++ bin/.bin/open-bookmark.sh | 23 ++++++++++++ bookmarks.txt | 2 + dunst/.config/dunst/dunstrc | 56 ++++++++++++++++++++++++++++ install.sh | 3 ++ oxwm/.config/oxwm/config.lua | 16 ++++++-- rofi/.config/rofi/config.rasi | 3 ++ rofi/.config/rofi/themes/nord.rasi | 76 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 212 insertions(+), 3 deletions(-) create mode 100755 bin/.bin/add-bookmark.sh create mode 100755 bin/.bin/open-bookmark.sh create mode 100644 bookmarks.txt create mode 100644 dunst/.config/dunst/dunstrc create mode 100644 rofi/.config/rofi/config.rasi create mode 100644 rofi/.config/rofi/themes/nord.rasi diff --git a/bin/.bin/add-bookmark.sh b/bin/.bin/add-bookmark.sh new file mode 100755 index 0000000..9a8ab6b --- /dev/null +++ b/bin/.bin/add-bookmark.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -euo pipefail + +BOOKMARKS_FILE="$DOTFILES_REPO/bookmarks.txt" + +mkdir -p "$(dirname "$BOOKMARKS_FILE")" +touch "$BOOKMARKS_FILE" + +xdotool key --delay 50 ctrl+l ctrl+c Escape + +sleep 0.15 + +URL=$(xclip -selection clipboard -o) + +if [[ "$URL" =~ ^https?:// ]]; then + NAME=$(zenity --entry \ + --title="Add Bookmark" \ + --text="Enter a name for this bookmark:" \ + --entry-text="" 2>/dev/null) + + if [ -z "$NAME" ]; then + notify-send "Bookmark Cancelled" "No name was provided." + exit 0 + fi + + CLEAN_NAME=$(echo "$NAME" | tr '|' '-') + + if ! grep -q "|$URL$" "$BOOKMARKS_FILE"; then + echo "$CLEAN_NAME|$URL" >>"$BOOKMARKS_FILE" + notify-send "Bookmark Saved" "$CLEAN_NAME\n$URL" + else + notify-send "Bookmark" "This exact URL already exists!" + fi +else + notify-send "Bookmark Error" "Clipboard did not contain a valid URL." +fi diff --git a/bin/.bin/open-bookmark.sh b/bin/.bin/open-bookmark.sh new file mode 100755 index 0000000..67e724b --- /dev/null +++ b/bin/.bin/open-bookmark.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -euo pipefail + +BOOKMARKS_FILE="$DOTFILES_REPO/bookmarks.txt" + +if [ ! -f "$BOOKMARKS_FILE" ] || [ ! -s "$BOOKMARKS_FILE" ]; then + notify-send "Bookmarks" "Your bookmarks file is empty or missing." + exit 1 +fi + +SELECTION=$(cut -d'|' -f1 "$BOOKMARKS_FILE" | rofi -dmenu -p "Go To:") + +if [ -z "$SELECTION" ]; then + exit 0 +fi + +URL=$(grep "^$SELECTION|" "$BOOKMARKS_FILE" | head -n 1 | cut -d'|' -f2) + +if [ -n "$URL" ]; then + firefox "$URL" & +else + notify-send "Error" "Could not resolve the URL for: $SELECTION" +fi diff --git a/bookmarks.txt b/bookmarks.txt new file mode 100644 index 0000000..d6954be --- /dev/null +++ b/bookmarks.txt @@ -0,0 +1,2 @@ +Gemini|https://gemini.google.com/app +davidtsadler.com|https://davidtsadler.com/ diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc new file mode 100644 index 0000000..786d035 --- /dev/null +++ b/dunst/.config/dunst/dunstrc @@ -0,0 +1,56 @@ +[global] + ### Display Settings ### + monitor = 0 + follow = mouse + width = 300 + height = 150 + origin = top-right + offset = 10x50 + scale = 0 + notification_limit = 5 + + ### Progress Bar ### + progress_bar = true + progress_bar_height = 10 + progress_bar_frame_width = 1 + progress_bar_min_width = 150 + progress_bar_max_width = 300 + + ### Styling ### + frame_width = 2 + separator_height = 2 + padding = 8 + horizontal_padding = 8 + text_icon_padding = 0 + + # Official Nord Accent Colors + frame_color = "#88c0d0" # Nord8 (Ice Blue Frame) + separator_color = "#4c566a" # Nord3 + + ### Text Properties ### + font = JetBrains Mono 10 + line_height = 0 + format = "%s\n%b" + alignment = left + show_age_threshold = 60 + ellipsize = middle + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = false + +[urgency_low] + # Nord Night backgrounds with bright snow text + background = "#2e3440" # Nord0 + foreground = "#d8dee9" # Nord4 + timeout = 4 + +[urgency_normal] + background = "#3b4252" # Nord1 + foreground = "#eceff4" # Nord6 + timeout = 6 + +[urgency_critical] + background = "#bf616a" # Nord11 (Aurora Red for warnings) + foreground = "#eceff4" # Nord6 + frame_color = "#bf616a" + timeout = 0 diff --git a/install.sh b/install.sh index 2b82e29..399c1ca 100755 --- a/install.sh +++ b/install.sh @@ -6,10 +6,13 @@ dotfiles=( alacritty bash bat + bin + dunst git lazygit nvim oxwm + rofi ssh starship tmux diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index d899890..80b6d27 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -275,8 +275,18 @@ oxwm.key.bind({ modkey, "Control", "Shift" }, "9", oxwm.tag.toggletag(8)) -- Example: Press Mod4+Space, then release and press T to spawn a terminal without auto starting anything. oxwm.key.chord({ { { modkey }, "Space" }, - { {}, "T" } -}, oxwm.spawn({ "alacritty", "-e", "bash" })) + { {}, "B" } +}, oxwm.spawn({ "firefox" })) + +oxwm.key.chord({ + { { modkey }, "b" }, + { {}, "a" } +}, oxwm.spawn({ "add-bookmark.sh" })) + +oxwm.key.chord({ + { { modkey }, "b" }, + { {}, "o" } +}, oxwm.spawn({ "open-bookmark.sh" })) ------------------------------------------------------------------------------- -- Autostart @@ -286,7 +296,7 @@ oxwm.key.chord({ -- Keycode 108 was found using the exv command and pressing the AltGr key in the popup window. oxwm.autostart("xmodmap -e 'keycode 108 = Super_R' -e 'add mod4 = Super_R'") +oxwm.autostart("dunst") -- oxwm.autostart("picom") -- oxwm.autostart("feh --bg-scale ~/wallpaper.jpg") --- oxwm.autostart("dunst") -- oxwm.autostart("nm-applet") diff --git a/rofi/.config/rofi/config.rasi b/rofi/.config/rofi/config.rasi new file mode 100644 index 0000000..5d67754 --- /dev/null +++ b/rofi/.config/rofi/config.rasi @@ -0,0 +1,3 @@ +configuration { +} +@theme "~/.config/rofi/themes/nord.rasi" diff --git a/rofi/.config/rofi/themes/nord.rasi b/rofi/.config/rofi/themes/nord.rasi new file mode 100644 index 0000000..a98e108 --- /dev/null +++ b/rofi/.config/rofi/themes/nord.rasi @@ -0,0 +1,76 @@ +* { + /* Nord Color Palette Blueprint */ + nord0: #2e3440; /* Polar Night (Base Background) */ + nord1: #3b4252; /* Polar Night (Elevated Background) */ + nord2: #434c5e; /* Polar Night (Selection Element) */ + nord3: #4c566a; /* Polar Night (Comments/Muted Text) */ + nord4: #d8dee9; /* Snow Storm (Primary Text) */ + nord5: #e5e9f0; /* Snow Storm (Bright Text) */ + nord6: #eceff4; /* Snow Storm (Blinding Text) */ + nord7: #8fbcbb; /* Frost (Teal Accent) */ + nord8: #88c0d0; /* Frost (Ice Blue Highlight) */ + nord9: #81a1c1; /* Frost (Flat Blue) */ + nord10: #5e81ac; /* Frost (Deep Blue) */ + + background-color: transparent; + text-color: @nord4; + accent-color: @nord8; + + font: "JetBrains Mono 12"; +} + +window { + background-color: @nord0; + border-color: @accent-color; + border: 2px; + border-radius: 6px; + width: 550px; + location: center; + anchor: center; + padding: 14px; +} + +inputbar { + spacing: 12px; + padding: 0px 0px 10px 0px; + border: 0px 0px 1px 0px; + border-color: @nord3; + children: [ prompt, entry ]; +} + +prompt { + text-color: @accent-color; + font: "JetBrains Mono Bold 12"; +} + +entry { + text-color: @nord5; + placeholder: "Search..."; + placeholder-color: @nord3; +} + +listview { + lines: 12; + columns: 1; + fixed-height: false; + spacing: 4px; + padding: 8px 0px 0px 0px; +} + +element { + padding: 6px 10px; + border-radius: 4px; +} + +element normal text { + text-color: @nord4; +} + +element selected { + background-color: @nord2; /* Highlight bar color */ +} + +element selected text { + text-color: @nord6; /* Text inside the highlight bar */ + font: "JetBrains Mono Bold 12"; +} -- cgit v1.2.3-13-gbd6f From f688a44171dc070c3c877b281bfb6752be883318 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 21 Jun 2026 19:55:08 +0100 Subject: Add power management script --- bin/.bin/power.sh | 22 ++++++++++++++++++++++ oxwm/.config/oxwm/config.lua | 5 +++++ 2 files changed, 27 insertions(+) create mode 100755 bin/.bin/power.sh diff --git a/bin/.bin/power.sh b/bin/.bin/power.sh new file mode 100755 index 0000000..e17bae3 --- /dev/null +++ b/bin/.bin/power.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +declare -A actions +actions[Reboot]="systemctl reboot" +actions[Shutdown]="systemctl poweroff" + +SELECTION=$(printf "Reboot\nShutdown" | rofi -dmenu -p "") + +if [ -z "$SELECTION" ]; then + exit 0 +fi + +if [ -z "${actions[$SELECTION]:-}" ]; then + notify-send "ERROR" "Invalid choice: $SELECTION" + exit 1 +fi + +notify-send "System" "Initiating $SELECTION..." +sleep 0.5 + +${actions[$SELECTION]} diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index 80b6d27..67e037a 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -288,6 +288,11 @@ oxwm.key.chord({ { {}, "o" } }, oxwm.spawn({ "open-bookmark.sh" })) +oxwm.key.chord({ + { { modkey }, "Space" }, + { {}, "p" } +}, oxwm.spawn({ "power.sh" })) + ------------------------------------------------------------------------------- -- Autostart ------------------------------------------------------------------------------- -- cgit v1.2.3-13-gbd6f From e7bad4b453467fd50a3e194878abaa7508bcabdc Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 21 Jun 2026 20:27:26 +0100 Subject: Configure zenity to use a floating window --- oxwm/.config/oxwm/config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index 67e037a..1115575 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -139,6 +139,7 @@ oxwm.gaps.set_outer(0, 0) -- oxwm.rule.add({ instance = "gimp", floating = true }) oxwm.rule.add({ class = "firefox", title = "Library", floating = true }) oxwm.rule.add({ class = "firefox", tag = 2 }) +oxwm.rule.add({ class = "zenity", title = "", floating = true }) -- oxwm.rule.add({ instance = "mpv", floating = true }) -- To find window properties, use xprop and click on the window -- cgit v1.2.3-13-gbd6f From d1c8ae89eff4b5d4357068520feeb5e0311573aa Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 21 Jun 2026 21:18:13 +0100 Subject: Add gtk-3.0 settings --- gtk-3.0/.config/gtk-3.0/settings.ini | 16 ++++++++++++++++ install.sh | 1 + 2 files changed, 17 insertions(+) create mode 100644 gtk-3.0/.config/gtk-3.0/settings.ini diff --git a/gtk-3.0/.config/gtk-3.0/settings.ini b/gtk-3.0/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..5b4a49a --- /dev/null +++ b/gtk-3.0/.config/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-theme-name = Nordic +gtk-icon-theme-name = Nordzy +gtk-font-name = JetBrains Mono 11 +gtk-cursor-theme-name = Adwaita +gtk-cursor-theme-size = 24 +gtk-toolbar-style = GTK_TOOLBAR_BOTH_TEXT +gtk-toolbar-icon-size = GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images = 1 +gtk-menu-images = 1 +gtk-enable-event-sounds = 0 +gtk-enable-input-feedback = 0 +gtk-xft-antialias = 1 +gtk-xft-hinting = 1 +gtk-xft-hintstyle = hintslight +gtk-xft-rgba = rgb diff --git a/install.sh b/install.sh index 399c1ca..5c65c4d 100755 --- a/install.sh +++ b/install.sh @@ -9,6 +9,7 @@ dotfiles=( bin dunst git + gtk-3.0 lazygit nvim oxwm -- cgit v1.2.3-13-gbd6f From e1fc179e3de951b9705450ef911b0ee6a39ec0ee Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 21 Jun 2026 21:35:59 +0100 Subject: Configure Firefox file picker to be a floating window --- oxwm/.config/oxwm/config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index 1115575..4461bf5 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -138,8 +138,9 @@ oxwm.gaps.set_outer(0, 0) -- Examples (uncomment to use): -- oxwm.rule.add({ instance = "gimp", floating = true }) oxwm.rule.add({ class = "firefox", title = "Library", floating = true }) +oxwm.rule.add({ class = "firefox", role = "GtkFileChooserDialog", floating = true }) oxwm.rule.add({ class = "firefox", tag = 2 }) -oxwm.rule.add({ class = "zenity", title = "", floating = true }) +oxwm.rule.add({ class = "zenity", floating = true }) -- oxwm.rule.add({ instance = "mpv", floating = true }) -- To find window properties, use xprop and click on the window -- cgit v1.2.3-13-gbd6f From 358ed237db27ded559ed87c93445d894771b742b Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 27 Jun 2026 19:29:29 +0100 Subject: Remove rounded corners from rofi --- rofi/.config/rofi/themes/nord.rasi | 1 - 1 file changed, 1 deletion(-) diff --git a/rofi/.config/rofi/themes/nord.rasi b/rofi/.config/rofi/themes/nord.rasi index a98e108..53161ad 100644 --- a/rofi/.config/rofi/themes/nord.rasi +++ b/rofi/.config/rofi/themes/nord.rasi @@ -23,7 +23,6 @@ window { background-color: @nord0; border-color: @accent-color; border: 2px; - border-radius: 6px; width: 550px; location: center; anchor: center; -- cgit v1.2.3-13-gbd6f From 767b4dd83b2f9c2bf7f634941d1dbc2652d00c1a Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 27 Jun 2026 19:32:37 +0100 Subject: Replace dmenu with rofi --- oxwm/.config/oxwm/config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index 4461bf5..3818b14 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -179,8 +179,8 @@ oxwm.bar.set_scheme_selected(colors.cyan, colors.bg, colors.purple) -- Basic window management oxwm.key.bind({ modkey }, "Return", oxwm.spawn_terminal()) --- Launch Dmenu -oxwm.key.bind({ modkey }, "D", oxwm.spawn({ "sh", "-c", "dmenu_run -l 10" })) +-- Launch Rofi +oxwm.key.bind({ modkey }, "D", oxwm.spawn({ "sh", "-c", "rofi -show run" })) -- Copy screenshot to clipboard -- oxwm.key.bind({ modkey }, "S", oxwm.spawn({ "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" })) oxwm.key.bind({ modkey }, "Q", oxwm.client.kill()) -- cgit v1.2.3-13-gbd6f From b4c94d4d3b8db95167e611bc5d9e1e8b0ed1fe33 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Tue, 30 Jun 2026 20:28:21 +0100 Subject: Add Bluetooth rofi script --- bin/.bin/bluetooth.sh | 140 +++++++++++++++++++++++++++++++++++++++++++ oxwm/.config/oxwm/config.lua | 10 ++-- 2 files changed, 145 insertions(+), 5 deletions(-) create mode 100755 bin/.bin/bluetooth.sh diff --git a/bin/.bin/bluetooth.sh b/bin/.bin/bluetooth.sh new file mode 100755 index 0000000..5ae5281 --- /dev/null +++ b/bin/.bin/bluetooth.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +set -uo pipefail # Keep -e off so our self-healing logic can handle error codes safely + +# Define the Rofi menu layout. +declare -a order=( + "⚡ Power On Bluetooth" + "🛑 Power Off Bluetooth" + "🔌 Disconnect All Devices" + "---" + "Speaker" + "Earphones" + "Earphones Left" + "Living Room" +) + +# Map profiles to hardware MAC addresses. +declare -A devices +devices[Speaker]="A0:E9:DB:0E:43:79" +devices[Earphones]="98:52:3D:F2:6E:3E" +devices["Earphones Left"]="98:52:3D:F2:36:78" +devices["Living Room"]="42:46:9F:D0:2C:53" + +# Prompt User via Rofi. +MENU_OPTIONS=$(printf "%s\n" "${order[@]}") +SELECTION=$(echo "$MENU_OPTIONS" | rofi -dmenu -p "Bluetooth Menu:") + +# Exit gracefully if the user hits Escape. +if [ -z "$SELECTION" ] || [ "$SELECTION" = "---" ]; then + exit 0 +fi + +if [ "$SELECTION" = "⚡ Power On Bluetooth" ]; then + notify-send "BT" "Powering adapter on..." + bluetoothctl power on + exit 0 +fi + +if [ "$SELECTION" = "🛑 Power Off Bluetooth" ]; then + notify-send "BT" "Powering adapter off..." + bluetoothctl power off + exit 0 +fi + +if [ "$SELECTION" = "🔌 Disconnect All Devices" ]; then + notify-send "BT" "Clearing all active connections..." + for name in "${!devices[@]}"; do + bluetoothctl disconnect "${devices[$name]}" >/dev/null 2>&1 || true + done + notify-send "BT" "All devices disconnected." + exit 0 +fi + +if [ -z "${devices[$SELECTION]:-}" ]; then + notify-send "ERROR" "Invalid choice: $SELECTION" + exit 1 +fi + +TARGET_MAC="${devices[$SELECTION]}" + +# Ensure controller is actually powered up before trying to connect. +if ! bluetoothctl show | grep -q "Powered: yes"; then + notify-send "BT" "Waking up Bluetooth adapter..." + bluetoothctl power on + sleep 2 +fi + +# Force controller runtime options to accept incoming passthroughs. +bluetoothctl pairable on >/dev/null 2>&1 || true +bluetoothctl discoverable on >/dev/null 2>&1 || true + +# Disconnect existing targets to free up the system audio pipelines. +for name in "${!devices[@]}"; do + bluetoothctl disconnect "${devices[$name]}" >/dev/null 2>&1 || true +done + +# Query the machine's local hardware database cache. +DEVICE_CHECK=$(bluetoothctl info "$TARGET_MAC" 2>&1 || true) + +if echo "$DEVICE_CHECK" | grep -q "not available"; then + notify-send "BT: Provisioning" "Device missing from system cache. Probing airwaves..." + + # Run a targeted background scan pass to register device metadata. + bluetoothctl --timeout 5 scan on >/dev/null 2>&1 & + SCAN_PID=$! + sleep 4 + kill "$SCAN_PID" 2>/dev/null || true + wait "$SCAN_PID" 2>/dev/null || true + sleep 1 + + notify-send "BT: Provisioning" "Exchanging encryption keys..." + bluetoothctl pair "$TARGET_MAC" + bluetoothctl trust "$TARGET_MAC" +fi + +# Attempt targeted connection sequence. +notify-send "BT Switch" "Routing audio to $SELECTION..." +CONNECT_OUT=$(bluetoothctl connect "$TARGET_MAC" 2>&1 || true) +echo "$CONNECT_OUT" + +if echo "$CONNECT_OUT" | grep -q "Connection successful"; then + bluetoothctl trust "$TARGET_MAC" >/dev/null 2>&1 || true + + # WirePlumber Sinks Syncing Engine. + CLEAN_MAC="${TARGET_MAC//:/_}" + SINK_NAME=$(wpctl status | grep -o "bluez_output\.[^\ ]*${CLEAN_MAC}[^\ ]*" | head -n 1 || true) + + if [ ! -z "$SINK_NAME" ]; then + wpctl set-default "$SINK_NAME" + # Set a safe volumne just in case we connect to earphones. + wpctl set-volume "$SINK_NAME" 0.10 + fi + + notify-send "BT Switch" "$SELECTION connected successfully!" + +# Handle key synchronization issues seamlessly.... +elif echo "$CONNECT_OUT" | grep -q "br-connection-key-missing"; then + notify-send "BT Error" "Key mismatch! Purging and re-pairing..." + + bluetoothctl remove "$TARGET_MAC" >/dev/null 2>&1 || true + sleep 1 + + bluetoothctl --timeout 5 scan on >/dev/null 2>&1 & + SCAN_PID=$! + sleep 4 + kill "$SCAN_PID" 2>/dev/null || true + wait "$SCAN_PID" 2>/dev/null || true + sleep 1 + + notify-send "BT Recovery" "Put device in pairing mode!" + bluetoothctl pair "$TARGET_MAC" + bluetoothctl trust "$TARGET_MAC" + + if bluetoothctl connect "$TARGET_MAC"; then + notify-send "BT Switch" "$SELECTION repaired and connected!" + else + notify-send "BT ERROR" "Repair fallback routing failed." + fi +else + notify-send "BT ERROR" "Failed to link with $SELECTION. Check pairing state or other devices." +fi diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index 3818b14..09e5909 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -275,11 +275,6 @@ oxwm.key.bind({ modkey, "Control", "Shift" }, "9", oxwm.tag.toggletag(8)) -- Keychords allow you to bind multiple-key sequences (like Emacs or Vim) -- Format: {{modifiers}, key1}, {{modifiers}, key2}, ... -- Example: Press Mod4+Space, then release and press T to spawn a terminal without auto starting anything. -oxwm.key.chord({ - { { modkey }, "Space" }, - { {}, "B" } -}, oxwm.spawn({ "firefox" })) - oxwm.key.chord({ { { modkey }, "b" }, { {}, "a" } @@ -295,6 +290,11 @@ oxwm.key.chord({ { {}, "p" } }, oxwm.spawn({ "power.sh" })) +oxwm.key.chord({ + { { modkey }, "Space" }, + { {}, "b" } +}, oxwm.spawn({ "bluetooth.sh" })) + ------------------------------------------------------------------------------- -- Autostart ------------------------------------------------------------------------------- -- cgit v1.2.3-13-gbd6f From 47834ead372c86e5df0afc6e909aed8b92d8f30c Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Tue, 30 Jun 2026 21:44:21 +0100 Subject: Update bookmarks --- bookmarks.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookmarks.txt b/bookmarks.txt index d6954be..4b45d46 100644 --- a/bookmarks.txt +++ b/bookmarks.txt @@ -1,2 +1,3 @@ -Gemini|https://gemini.google.com/app +gemini|https://gemini.google.com/app davidtsadler.com|https://davidtsadler.com/ +jellyfin|http://192.168.1.11:8096/web -- cgit v1.2.3-13-gbd6f From 796e8cd52879f87220e76d71d512f2cc6a79a715 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Tue, 30 Jun 2026 21:52:14 +0100 Subject: Fix issue with bash formatting treat scripts as sh instead of bash --- nvim/.config/nvim/lua/plugins/conform.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua index 365fb2d..94bdb06 100644 --- a/nvim/.config/nvim/lua/plugins/conform.lua +++ b/nvim/.config/nvim/lua/plugins/conform.lua @@ -22,5 +22,9 @@ require("conform").setup({ command = "biome", args = { "format", "--stdin-file-path", "$FILENAME" }, }, + -- Force shfmt to always use the bash parser variant. + shfmt = { + prepend_args = { "-ln", "bash" }, + }, }, }) -- cgit v1.2.3-13-gbd6f From 926854c96da1b56186b2e9af6bdc61bbcb4e998d Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 4 Jul 2026 12:41:34 +0100 Subject: Add oxwm rule for amiberry to appear on tag 3 --- oxwm/.config/oxwm/config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/oxwm/.config/oxwm/config.lua b/oxwm/.config/oxwm/config.lua index 09e5909..eda0688 100644 --- a/oxwm/.config/oxwm/config.lua +++ b/oxwm/.config/oxwm/config.lua @@ -141,6 +141,7 @@ oxwm.rule.add({ class = "firefox", title = "Library", floating = true }) oxwm.rule.add({ class = "firefox", role = "GtkFileChooserDialog", floating = true }) oxwm.rule.add({ class = "firefox", tag = 2 }) oxwm.rule.add({ class = "zenity", floating = true }) +oxwm.rule.add({ class = "amiberry", tag = 3 }) -- oxwm.rule.add({ instance = "mpv", floating = true }) -- To find window properties, use xprop and click on the window -- cgit v1.2.3-13-gbd6f From 59b81f6414bd1890ef61008378401235f8d33a0b Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 4 Jul 2026 12:42:20 +0100 Subject: Add vasm and vlink bookmarks --- bookmarks.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bookmarks.txt b/bookmarks.txt index 4b45d46..e8e994c 100644 --- a/bookmarks.txt +++ b/bookmarks.txt @@ -1,3 +1,6 @@ gemini|https://gemini.google.com/app davidtsadler.com|https://davidtsadler.com/ jellyfin|http://192.168.1.11:8096/web +nix package|https://search.nixos.org/packages +vasm|http://sun.hasenbraten.de/vasm/ +vlink|http://sun.hasenbraten.de/vlink/index.php?view=main -- cgit v1.2.3-13-gbd6f From fc2b007057dc763de14f9cd7860360bc5c9b646e Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 4 Jul 2026 13:04:01 +0100 Subject: Add motion canvas bookmark --- bookmarks.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/bookmarks.txt b/bookmarks.txt index e8e994c..ae9e13a 100644 --- a/bookmarks.txt +++ b/bookmarks.txt @@ -4,3 +4,4 @@ jellyfin|http://192.168.1.11:8096/web nix package|https://search.nixos.org/packages vasm|http://sun.hasenbraten.de/vasm/ vlink|http://sun.hasenbraten.de/vlink/index.php?view=main +motion canvas|https://motion-canvas.io/ -- cgit v1.2.3-13-gbd6f