dev: automated commit - 2025-11-28 18:32:11

This commit is contained in:
Mariano Z. 2025-11-28 18:32:11 -03:00
parent 023988b638
commit d6e088278f
3 changed files with 399 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#!/run/current-system/sw/bin/bash
# Check if scratchpad terminal is already running
if pgrep -f "kitty.*scratchpad" > /dev/null; then
# Get the window ID of the scratchpad terminal
WINDOW_ID=$(niri msg windows | grep -A 10 'app-id="scratchpad"' | head -1 | grep 'Window ID' | cut -d' ' -f3 | cut -d: -f1)
if [ -n "$WINDOW_ID" ]; then
# Focus the existing scratchpad window
niri msg action focus-window "$WINDOW_ID"
else
# If we can't find the window ID, spawn a new one
kitty --class scratchpad --title scratchpad &
fi
else
# Spawn a new scratchpad terminal
kitty --class scratchpad --title scratchpad &
fi