From c784a8122f7369e45e39511bf9d3750f2f24fa6c Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 12 Jul 2024 12:42:38 -0400 Subject: [PATCH] hyprland: Simplify mpv commands --- home/hyprland.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/home/hyprland.nix b/home/hyprland.nix index 7ea98d05..b6f0981c 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -3,6 +3,7 @@ let inherit (pkgs) polkit_gnome callPackage; inherit (lib) mkForce; + inherit (vars) notifySend; opacity = "0.95"; super = "SUPER"; @@ -215,11 +216,11 @@ in "${super}_SHIFT, O, exec, eww close overlay || eww open overlay" "${super}, F1, exec, killall rofi || rofi -show drun" "${super}, F2, togglespecialworkspace" - "${super}, comma, exec, playerctl -p mpv position \"5-\" && ${vars.notifySend} \"Minus 5 seconds\" \"$(playerctl -p mpv position)\"" - "${super}, period, exec, playerctl -p mpv position \"5+\" && ${vars.notifySend} \"Plus 5 seconds\" \"$(playerctl -p mpv position)\"" - "${super}_SHIFT, comma, exec, playerctl -p mpv previous && ${vars.notifySend} \"Previous track\" \"$(playerctl -p mpv metadata xesam:title)\"" - "${super}_SHIFT, period, exec, playerctl -p mpv next && ${vars.notifySend} \"Next track\" \"$(playerctl -p mpv metadata xesam:title)\"" - "${super}, slash, exec, playerctl -p mpv play-pause && ${vars.notifySend} \"mpv\" \"$(playerctl -p mpv status)\"" + ''${super}, comma, exec, playerctl -p mpv position "5-" && ${notifySend} "Minus 5 seconds" "$(playerctl -p mpv position)"'' + ''${super}, period, exec, playerctl -p mpv position "5+" && ${notifySend} "Plus 5 seconds" "$(playerctl -p mpv position)"'' + ''${super}_SHIFT, comma, exec, playerctl -p mpv previous && ${notifySend} "Previous track" "$(playerctl -p mpv metadata xesam:title)"'' + ''${super}_SHIFT, period, exec, playerctl -p mpv next && ${notifySend} "Next track" "$(playerctl -p mpv metadata xesam:title)"'' + ''${super}, slash, exec, playerctl -p mpv play-pause && ${notifySend} "mpv" "$(playerctl -p mpv status)"'' "${super}, M, focusmonitor, +1" "${super}_SHIFT, M, focusmonitor, -1"