Files
nixos/modules/home/music.nix
T
2025-12-27 22:20:53 -06:00

34 lines
877 B
Nix

{pkgs, ...}: let
launch-music = pkgs.writeShellScriptBin "hakase-music-launch" ''
echo "--- Launching Music Apps ---"
echo "Launching jellyfin-tui..."
uwsm app -- /usr/bin/env ghostty --class=jellyfin-tui --title=jellyfin-tui -e jellyfin-tui &
PID_JELLY=$!
echo "Jellyfin launched with PID $PID_JELLY"
echo "Waiting for window..."
sleep 0.1
echo "Focusing jellyfin-tui..."
hyprctl dispatch focuswindow title:jellyfin-tui
echo "Preselecting down..."
hyprctl dispatch layoutmsg preselect d
echo "Launching cava..."
uwsm app -- /usr/bin/env ghostty --class=cava --title=cava -e cava &
PID_CAVA=$!
echo "Cava launched with PID $PID_CAVA"
echo "Launch script completed."
'';
in {
imports = [
../../apps/jellyfin-tui/home.nix
../../apps/cava/home.nix
];
home.packages = [
launch-music
];
}