chs: re-add drifted files

This commit is contained in:
Prad Nukala committed 2026-08-14 14:35:19 -04:00
1 parent e78ba5ab49
commit ec151d2349
6 files changed
+32 -12

No files matched your search

+12
View File
@@ -51,12 +51,24 @@ elif [[ "$APP" == kitty-* ]]; then
elif [[ "$APP" == "ghostty" ]]; then
# Cycle through Ghostty terminals (case-insensitive app_id match)
INSTANCES=($(niri msg -j windows | jq -r '.[] | select(.app_id | test("ghostty"; "i")) | .id'))
elif [[ "$APP" == "browser" ]]; then
# Cycle through all browsers (brave/chromium/firefox), launch default if none
INSTANCES=($(niri msg -j windows | jq -r '.[] | select((.app_id // "") | ascii_downcase | test("^(brave|chromium|firefox)")) | .id'))
DEFAULT_SPAWN="brave-origin-nightly"
elif [[ "$APP" == "terminal" ]]; then
# Cycle through all terminals (ghostty/kitty/alacritty), launch default if none
INSTANCES=($(niri msg -j windows | jq -r '.[] | select((.app_id // "") | ascii_downcase | test("kitty|alacritty|ghostty")) | .id'))
DEFAULT_SPAWN="kitty"
else
INSTANCES=($(niri msg -j windows | jq -r ".[] | select(.app_id==\"${APP}\") | .id"))
fi
# Launch if no instances
if [ ${#INSTANCES[@]} -eq 0 ]; then
if [ -n "${DEFAULT_SPAWN:-}" ]; then
niri msg action spawn -- $DEFAULT_SPAWN
exit 0
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"