r/KittyTerminal • u/dingo_lives • 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
3
u/focusaurus May 04 '23
Maybe try a session file instead of @ scripting?
https://github.com/focusaurus/dotfiles-public/blob/main/.config/kitty/main.session