Keep one main Kitty instance and open new tabs into it from Hyprland keybinds.
- Starts the first Kitty as a UWSM service with a fixed socket and window class.
- Subsequent runs open a new Kitty tab in that main window.
- Focuses the newly created Kitty tab after launching.
- Rewrites the first
-dargument to--cwdforkitty @ launchcompatibility.
- Hyprland running under UWSM
- Kitty with remote control (the script enables socket-only control on first launch)
- Python 3.13+ (project requirement)
git clone https://github.com/Reagent992/hyprland_scripts.git
cd hyprland_scripts
chmod u+x kitty_launch.pykitty_launch.py [kitty arguments...]# hyprland.conf
$kitty_main = /path/to/kitty_launch.py
bind = SUPER, T, exec, [workspace 2] $kitty_main
bind = SUPER, Y, exec, [workspace 2] $kitty_main yazi
bind = SUPER, N, exec, [workspace 2] $kitty_main -d ~/dev/foo nvimEdit constants in kitty_launch.py if you want to customize behavior:
MAIN_KITTY_CLASScontrols the Hyprland class used to find and focus the main window.KITTY_SOCKET_NAMEcontrols the socket name under/tmp.DEBUGenables logging to/tmp/kitty_launch.log.
- If nothing happens, make sure
HYPRLAND_INSTANCE_SIGNATUREis set (Hyprland under UWSM). - Check logs in
/tmp/kitty_launch.logfor socket errors and command failures.
