pinwheel: Update music and use naviterm
This commit is contained in:
50
hosts/pinwheel/modules/music/default.nix
Normal file
50
hosts/pinwheel/modules/music/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hyprlandEnabled = config.mod.hyprland.enable;
|
||||
in
|
||||
{
|
||||
home-manager.users.alex = {
|
||||
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
|
||||
settings = {
|
||||
bind =
|
||||
let
|
||||
prev = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify previous";
|
||||
next = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify next";
|
||||
in
|
||||
[
|
||||
", XF86AudioPrev, exec, ${prev}"
|
||||
", XF86AudioNext, exec, ${next}"
|
||||
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause"
|
||||
", XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spoitfy play-pause"
|
||||
|
||||
"$mod ALT, LEFT, exec, ${prev}"
|
||||
"$mod ALT, RIGHT, exec, ${next}"
|
||||
"$mod ALT, DOWN, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.playerctl
|
||||
pkgs.spotify
|
||||
inputs.naviterm.packages.${pkgs.system}.default
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.services.playerctld = {
|
||||
unitConfig = {
|
||||
Description = "starts playerctld daemon";
|
||||
};
|
||||
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.playerctl}/bin/playerctld";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user