feat(hyprland): hyprland music controls

This commit is contained in:
Zhongheng Liu 2025-01-10 21:25:34 +02:00
commit ae1dbae7c9
Signed by: steven
GPG key ID: 805A28B071DAD84B
5 changed files with 11 additions and 10 deletions

View file

@ -25,7 +25,7 @@ in
"$mod, E, exec, ${config.defaultApplications.fileManager}"
# foot terminal
"$mod, Return, exec, ${terminalCmd} ${config.myShells.defaultShell}"
"$mod SHIFT, Return, exec, [float] ${terminalCmd} ${config.myShells.defaultShell}"
"$mod SHIFT, Return, exec, ${terminalCmd} --title=floats ${config.myShells.defaultShell}"
# cmdline utilities
/*
@ -43,7 +43,7 @@ in
"$mod, L, movefocus, r"
]
++ (
if config.services.mpd.enable then [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpc}/bin/ncmpc -h 127.0.0.1" ] else [ ]
if config.services.mpd.enable then [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpcpp}/bin/ncmpcpp" ] else [ ]
)
++ (
if config.services.swaync.enable

View file

@ -39,9 +39,8 @@
repeat_delay = 250;
accel_profile = "flat";
};
exec-once = config.myAutostartCommands ++ import ./hypr_autostart.nix {
inherit config;
};
exec-once = config.myAutostartCommands
++ (import ./hypr_autostart.nix { inherit config; inherit pkgs; });
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
@ -49,9 +48,7 @@
focus_on_activate = true; # see if fixes mako daemon not focusing
};
"$mod" = "SUPER";
binde = import ./xf86_binds.nix {
inherit pkgs;
};
binde = import ./xf86_binds.nix { inherit pkgs; };
bind = import ./binds.nix {
inherit config;
inherit pkgs;

View file

@ -1,8 +1,10 @@
{ config }:
{ config, pkgs }:
let
term = config.defaultApplications.terminal;
shell = config.myShells.defaultShell;
in
[
"${term} --title=autorun ${shell}"
"${pkgs.mpris-notifier}/bin/mpris-notifier"
"${pkgs.mpd-discord-rpc}/bin/mpd-discord-rpc"
]

View file

@ -1,6 +1,6 @@
[
"workspace special silent, class:^(foot.*)$, title:autorun"
"float, tag:floats"
"float, title:floats"
"float, title:ncmpc"
"size 50% 50%, title:ncmpc"
"immediate, class:^(cs2)$"

View file

@ -3,6 +3,8 @@
}: [
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
", XF86AudioStop, exec, ${pkgs.playerctl}/bin/playerctl stop"
", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next"
", XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous"
", XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0%"