{ pkgs, ... }: { home.packages = with pkgs; [ (writeShellScriptBin "music-launcher" '' # Launch Jellyfin TUI first uwsm app -- /usr/bin/env ghostty --class=jellyfin-tui --title=jellyfin-tui -e jellyfin-tui & # Wait for window to appear sleep 0.5 # Focus the window to apply layout rules (Required for layoutmsg) # This ensures the preselect command applies to this specific window ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow title:jellyfin-tui # Force the next window to be placed to the right (Side-by-Side / Horizontal) # Change to 'preselect d' for Top/Bottom split ${pkgs.hyprland}/bin/hyprctl dispatch layoutmsg preselect r # Launch Cava uwsm app -- /usr/bin/env ghostty --class=cava --title=cava -e cava & '') ]; }