~ruther/nixos-config

1ea3cb3395b00b4e2cdc38ca461705d325140744 — Frantisek Bohacek 1 year, 4 months ago a4114f7
refactor: generate workspace keybindings
1 files changed, 7 insertions(+), 32 deletions(-)

M modules/desktop/gnome/home.nix
M modules/desktop/gnome/home.nix => modules/desktop/gnome/home.nix +7 -32
@@ 53,45 53,20 @@
      button-layout = ":minimize,close";
      num-workspaces = 9;
    };
    "org/gnome/shell/keybindings" = {
      switch-to-application-1 = ["@as []"];
      switch-to-application-2 = ["@as []"];
      switch-to-application-3 = ["@as []"];
      switch-to-application-4 = ["@as []"];
      switch-to-application-5 = ["@as []"];
      switch-to-application-6 = ["@as []"];
      switch-to-application-7 = ["@as []"];
      switch-to-application-8 = ["@as []"];
      switch-to-application-9 = ["@as []"];
    };
    "org/gnome/desktop/wm/keybindings" = {
      switch-to-workspace-1 = ["<Super>1"];
      switch-to-workspace-2 = ["<Super>2"];
      switch-to-workspace-3 = ["<Super>3"];
      switch-to-workspace-4 = ["<Super>4"];
      switch-to-workspace-5 = ["<Super>5"];
      switch-to-workspace-6 = ["<Super>6"];
      switch-to-workspace-7 = ["<Super>7"];
      switch-to-workspace-8 = ["<Super>8"];
      switch-to-workspace-9 = ["<Super>9"];

    # "org/gnome/shell/keybindings" = builtins.listToAttrs (builtins.map (i: { name = "switch-to-application-${i}"; value = ["@as []"]; }) (builtins.genList (y: y + 1) 9));
    "org/gnome/shell/keybindings" = builtins.listToAttrs (builtins.map (i: { name = "switch-to-application-${builtins.toString i}"; value = ["@as []"]; }) (builtins.genList (y: y + 1) 9));
    "org/gnome/desktop/wm/keybindings" =
      builtins.listToAttrs (builtins.map (i: { name = "switch-to-workspace-${builtins.toString i}"; value = ["<Super>${builtins.toString i}"]; }) (builtins.genList (y: y + 1) 9)) //
      builtins.listToAttrs (builtins.map (i: { name = "move-to-workspace-${builtins.toString i}"; value = ["<Shift><Super>${builtins.toString i}"]; }) (builtins.genList (y: y + 1) 9)) //
      {
      move-to-workspace-left = ["<Super><Shift>a"];
      move-to-workspace-right = ["<Super><Shift>d"];

      move-to-workspace-1 = ["<Super><Shift>1"];
      move-to-workspace-2 = ["<Super><Shift>2"];
      move-to-workspace-3 = ["<Super><Shift>3"];
      move-to-workspace-4 = ["<Super><Shift>4"];
      move-to-workspace-5 = ["<Super><Shift>5"];
      move-to-workspace-6 = ["<Super><Shift>6"];
      move-to-workspace-7 = ["<Super><Shift>7"];
      move-to-workspace-8 = ["<Super><Shift>8"];
      move-to-workspace-9 = ["<Super><Shift>9"];

      close = ["<Super>w" "<Alt>F4"];
      toggle-fullscreen = ["<Super>f"];

      panel-run-dialog = "<Super>semicolon";
      panel-run-dialog = ["@as []"];
    };

    "org/gnome/settings-daemon/plugins/power" = {

Do not follow this link