From f37bc2ebb882e5c1359f868e324b03b785a881b1 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 13 Oct 2024 17:53:41 +0200 Subject: [PATCH] Hyprland: Fix bug in the keymappings.info file generation --- home/modules/hyprland/default.nix | 6 ++++-- home/modules/rofi/default.nix | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/home/modules/hyprland/default.nix b/home/modules/hyprland/default.nix index 8f9a4240..e609099a 100644 --- a/home/modules/hyprland/default.nix +++ b/home/modules/hyprland/default.nix @@ -35,10 +35,11 @@ mkBinds = key: actions: builtins.map (mkBind key) actions; # These functions are used to generate the keybindings.info file for Rofi - mkBindHelpKey = key: ''${builtins.replaceStrings ["$mainMod " ", "] ["${cfg.keybindings.main-mod}-" "-"] key}''; + fixupNoMod = key: ''${builtins.replaceStrings ["<-"] ["<"] key}''; + mkBindHelpKey = key: ''${builtins.replaceStrings ["$mainMod" " " ","] ["${cfg.keybindings.main-mod}" "-" ""] key}''; mkBindHelpAction = action: ''${builtins.replaceStrings [","] [""] action}''; mkBindHelp = key: action: "<${mkBindHelpKey key}>: ${mkBindHelpAction action}"; - mkBindsHelp = key: actions: builtins.map (mkBindHelp key) actions; + mkBindsHelp = key: actions: builtins.map fixupNoMod (builtins.map (mkBindHelp key) actions); mkWallpaper = monitor: "${monitor}, ${config.home.homeDirectory}/NixFlake/wallpapers/${cfg.theme}.png"; @@ -48,6 +49,7 @@ always-bind = { # Hyprland control + "$mainMod, A" = ["exec, rofi -drun-show-actions -show drun"]; "$mainMod, Q" = ["killactive"]; "$mainMod, V" = ["togglefloating"]; "$mainMod, F" = ["fullscreen"]; diff --git a/home/modules/rofi/default.nix b/home/modules/rofi/default.nix index fa26b0fb..9d4799e1 100644 --- a/home/modules/rofi/default.nix +++ b/home/modules/rofi/default.nix @@ -28,7 +28,6 @@ in { }; in { bindings = { - "$mainMod, A" = ["exec, rofi -drun-show-actions -show drun"]; "$mainMod, escape" = ["exec, \"${power-menu}\""]; }; };