summaryrefslogtreecommitdiff
path: root/home/wayland/hyprland/binds.nix
blob: 8dc9ec8aa6a17d9c0a30da92fadcd35f34a4f2c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
let
  workspaces = builtins.concatLists (builtins.genList (
      x: let
        ws = let
          c = (x + 1) / 10;
        in
          builtins.toString (x + 1 - (c * 10));
      in [
        "$mod, ${ws}, workspace, ${toString (x + 1)}"
        "$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
      ]
    )
    5);
in {
  wayland.windowManager.hyprland.settings = {
    bindm = [
      "$mod, mouse:272, movewindow"
      "$mod, mouse:273, resizewindow"
    ];

    bind =
      [
        "$mod, RETURN, exec, foot"
        "$mod, D, exec, wofi -f --show=drun --lines=5"
# --prompt=\"\""
        "$mod SHIFT, D, exec, grimblast --freeze copy area"
#        "$mod SHIFT, F, exec, grimblast copysave output ~/.screenshots/$(date +'%s_hypr.png')"
#        "$mod SHIFT, G, exec, grimblast copy active"
#        "$mod CTRL, P, exec, swayidle timeout 2 'sleep 1; hyprctl dispatcher dpms off' resume 'hyprctl dispatcher dpms on & pkill swayidle'"

        "$mod SHIFT, Q, killactive,"
        "$mod CTRL, E, exit,"
        "$mod, SPACE, togglesplit,"
        "$mod, F, fullscreen,"
        "$mod, V, togglefloating,"
        "$mod, P, pseudo,"

        "$mod, H, movefocus, l"
        "$mod, L, movefocus, r"
        "$mod, K, movefocus, u"
        "$mod, J, movefocus, d"

        "$mod SHIFT, H, movewindow, l"
        "$mod SHIFT, L, movewindow, r"
        "$mod SHIFT, K, movewindow, u"
        "$mod SHIFT, J, movewindow, d"

        "$mod SUPER, H, resizeactive, -10 0"
        "$mod SUPER, L, resizeactive, 10 0"
        "$mod SUPER, K, resizeactive, 0 -10"
        "$mod SUPER, J, resizeactive, 0 10"

#        "$mod, E, togglegroup"
#        "$mod SHIFT, E, lockactivegroup, toggle"
#        "$mod, TAB, changegroupactive, f"
#        "$mod SHIFT, TAB, changegroupactive, b"
#        "$mod CTRL, L, moveoutofgroup, r"
#       "$mod CTRL, H, moveoutofgroup, l"

#        "$mod, Prior, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
#        "$mod, Next, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
      ]
      ++ workspaces;
  };
}