Files
nixos/modules/home/music.nix
T
kenji 1c71784ac9 feat(hyprland): Refactor workspaces and add blur effect
Refactor Hyprland configuration to:
- Move Steam and Music from special workspaces to unique, named workspaces for better integration into the regular workflow.
- Update Waybar's workspace module to correctly display icons for these new named workspaces and filter them out from the special workspaces module.
- Implement a global blur effect for inactive windows, with a specific exception to keep Firefox windows fully opaque, enhancing focus on active content.
2026-03-14 08:29:12 -05:00

56 lines
1.5 KiB
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 = [
# TODO: must be an option a user can set of which music player to use
../../apps/jellyfin-tui
../../apps/cava
];
home.packages = [
launch-music
];
wayland.windowManager.hyprland.settings = {
workspace = [
"name:music, on-created-empty:hakase-music-launch"
];
bindd = [
"SUPER, M, Switch to Music, workspace, name:music"
"SUPER SHIFT, M, Move to Music Workspace, movetoworkspace, name:music"
];
windowrulev2 = [
# --- MUSIC RULES (Jellyfin-TUI) ---
"workspace name:music silent, title:^(jellyfin-tui)$"
"workspace name:music silent, initialTitle:^(jellyfin-tui)$"
# --- CAVA RULES ---
"workspace name:music silent, title:^(cava)$"
"workspace name:music silent, initialTitle:^(cava)$"
];
};
}