diff --git a/hosts/pinwheel/modules/sound/default.nix b/hosts/pinwheel/modules/sound/default.nix index 3e94ade..3b1c716 100644 --- a/hosts/pinwheel/modules/sound/default.nix +++ b/hosts/pinwheel/modules/sound/default.nix @@ -39,10 +39,28 @@ in ", XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-" ", XF86AudioMute, exec, ${toggle-output-mute}" ", XF86AudioMicMute, exec, ${toggle-input-mute}" + + "$mod ALT, LEFT, exec, ${pkgs.playerctl}/bin/playerctl -p playerctld previous" + "$mod ALT, RIGHT, exec, ${pkgs.playerctl}/bin/playerctl -p playerctld next" + "$mod ALT, DOWN, exec, ${pkgs.playerctl}/bin/playerctl -p playerctld play-pause" ]; }; }; - home.packages = [ pkgs.pavucontrol ]; + home.packages = [ + pkgs.pavucontrol + pkgs.playerctl + ]; + }; + + systemd.user.services.playerctld = { + unitConfig = { + Description = "starts playerctld daemon"; + }; + + wantedBy = [ "default.target" ]; + serviceConfig = { + ExecStart = "${pkgs.playerctl}/bin/playerctld"; + }; }; } diff --git a/hosts/pinwheel/modules/spotify/default.nix b/hosts/pinwheel/modules/spotify/default.nix index ef51bc0..cc0dfca 100644 --- a/hosts/pinwheel/modules/spotify/default.nix +++ b/hosts/pinwheel/modules/spotify/default.nix @@ -1,22 +1,6 @@ -{ pkgs, lib, config, ... }: -let - hyprlandEnabled = config.mod.hyprland.enable; -in +{ pkgs, ... }: { home-manager.users.alex = { - home.packages = with pkgs; [ - spotify - playerctl - ]; - - wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled { - settings = { - bind = [ - "$mod ALT, LEFT, exec, ${pkgs.playerctl}/bin/playerctl -p spotify previous" - "$mod ALT, RIGHT, exec, ${pkgs.playerctl}/bin/playerctl -p spotify next" - "$mod ALT, DOWN, exec, ${pkgs.playerctl}/bin/playerctl -p spotify play-pause" - ]; - }; - }; + home.packages = [ pkgs.spotify ]; }; }