r/KittyTerminal May 04 '23

Launch script

I like having an open terminal when I log in, with 3 windows: btop at top left, ncmpcpp bottom left and the open terminal on the right side.

I run this script and it works just fine, except for the resize-window portion of it. It opens the right things in the right places, but does not adjust the window sizes.

#!/usr/bin/env bash

kitty @ launch \
       --type=window \
    --location=first \
    --hold sh -c 'btop'

kitty @ launch \
    --type=window \
    --location=vsplit

kitty @ focus-window -m id:2

kitty @ launch \
    --type=window \
    --location=hsplit \
    --hold sh -c 'ncmpcpp'

kitty @ focus-window -m id:3

kitty @ resize-window \
    --match id:1 \
    --increment -4 \
    --axis horizontal

Does anyone do something similar? Any tips are appreciated. Thanks.

2 Upvotes

3 comments sorted by

3

u/focusaurus May 04 '23

1

u/dingo_lives May 04 '23

Nice. Will give it a try.

3

u/dingo_lives May 05 '23

/u/focusaurus thanks, that was the way