From b6b0f19dde3873ac3924b65ceeea384903d4df33 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Fri, 14 Aug 2026 15:01:38 -0400 Subject: [PATCH] chs: re-add drifted files --- dot_claude/settings.json | 10 +++++----- dot_config/niri/exact_config.d/70-binds.kdl | 2 +- dot_local/bin/executable_niri-launch | 11 ++++++++--- dot_local/bin/executable_niri-launch-webapp | 3 +++ dot_omp/private_agent/private_config.yml | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 dot_local/bin/executable_niri-launch-webapp diff --git a/dot_claude/settings.json b/dot_claude/settings.json index b1ca966..4bab892 100644 --- a/dot_claude/settings.json +++ b/dot_claude/settings.json @@ -262,13 +262,13 @@ "matcher": ".*" }, { + "matcher": "tldraw-offline", "hooks": [ { - "command": "sh '/home/prad/skills/tldraw-offline/inject-server-context.sh' SubagentStart", - "type": "command" + "type": "command", + "command": "sh '/home/prad/skills/tldraw-offline/inject-server-context.sh' SubagentStart" } - ], - "matcher": "tldraw-offline" + ] } ], "SubagentStop": [ @@ -310,4 +310,4 @@ "skipAutoPermissionPrompt": true, "skipDangerousModePermissionPrompt": true, "tui": "fullscreen" -} \ No newline at end of file +} diff --git a/dot_config/niri/exact_config.d/70-binds.kdl b/dot_config/niri/exact_config.d/70-binds.kdl index 4dbb3ea..ff6f2e5 100644 --- a/dot_config/niri/exact_config.d/70-binds.kdl +++ b/dot_config/niri/exact_config.d/70-binds.kdl @@ -50,7 +50,7 @@ binds { Super+Shift+Alt+Ctrl+W { spawn "niri-dynamic-workspaces" "switch" "w"; } Super+Shift+Alt+Ctrl+H { spawn "niri-dynamic-workspaces" "switch" "h"; } - Super+Alt+Ctrl+Y { spawn "vicinae" "vicinae://launch/applications/rocks.shy.VacuumTube"; } + Super+Alt+Ctrl+Y { spawn "niri-launch-webapp"; } Super+Alt+Ctrl+X { spawn "niri-dynamic-workspaces" "switch" "x"; } // ─── Monitors ─── (Vertical) diff --git a/dot_local/bin/executable_niri-launch b/dot_local/bin/executable_niri-launch index b77318e..2de0897 100644 --- a/dot_local/bin/executable_niri-launch +++ b/dot_local/bin/executable_niri-launch @@ -11,8 +11,10 @@ declare -A KITTY_CMDS=( # Handle webapp cycling and launching if [[ "$APP" == "webapp" ]]; then - # Cycle through all WebApps - INSTANCES=($(niri msg -j windows | jq -r '.[] | select(.app_id | startswith("WebApp-")) | .id')) + # Cycle all WebApps: Firefox SSAs (WebApp-*) and Chromium/Brave SSAs (chrome-*-Default). + # Falls back to launching YouTube if none are open. Excludes real browsers (chromium/brave-*). + INSTANCES=($(niri msg -j windows | jq -r '.[] | select((.app_id // "") | ascii_downcase | test("^(webapp-|chrome-)")) | .id')) + FALLBACK_APP="webapp-youtube" elif [[ "$APP" == webapp-* ]]; then # Extract the webapp name (e.g., "webapp-claude" -> "Claude") WEBAPP_NAME=$(echo "$APP" | sed 's/webapp-//' | sed 's/.*/\u&/') @@ -21,7 +23,7 @@ elif [[ "$APP" == webapp-* ]]; then if [ -z "$APP_ID" ]; then # No instance running, launch via gtk-launch - DESKTOP_FILE=$(find ~/.local/share/applications -name "WebApp-${WEBAPP_NAME}*.desktop" -print -quit 2>/dev/null) + DESKTOP_FILE=$(find ~/.local/share/applications -iname "WebApp-${WEBAPP_NAME}*.desktop" -print -quit 2>/dev/null) if [ -n "$DESKTOP_FILE" ]; then gtk-launch "$(basename "$DESKTOP_FILE")" else @@ -73,6 +75,9 @@ if [ ${#INSTANCES[@]} -eq 0 ]; then niri msg action spawn -- $DEFAULT_SPAWN exit 0 fi + if [ -n "${FALLBACK_APP:-}" ]; then + exec "$0" "$FALLBACK_APP" + fi # Removed "kitty" from this block so it falls through to the spawn command if [[ "$APP" == "webapp" || "$APP" == "ghostty" ]]; then echo "No ${APP} windows running" diff --git a/dot_local/bin/executable_niri-launch-webapp b/dot_local/bin/executable_niri-launch-webapp new file mode 100644 index 0000000..8ac2e07 --- /dev/null +++ b/dot_local/bin/executable_niri-launch-webapp @@ -0,0 +1,3 @@ +#!/bin/bash +# Cycle through all open WebApps; launch YouTube if none are open. +exec "$(dirname "$(readlink -f "$0")")/niri-launch" webapp diff --git a/dot_omp/private_agent/private_config.yml b/dot_omp/private_agent/private_config.yml index 927ee1a..99eb64f 100644 --- a/dot_omp/private_agent/private_config.yml +++ b/dot_omp/private_agent/private_config.yml @@ -2,4 +2,4 @@ theme: dark: cyberdream symbolPreset: nerd setupVersion: 1 -hideThinkingBlock: true \ No newline at end of file +hideThinkingBlock: false \ No newline at end of file