-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinds.nix
61 lines (52 loc) · 1.94 KB
/
binds.nix
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
{
delib,
lib,
pkgs,
host,
...
}:
delib.module {
name = "programs.hyprland";
home.ifEnabled = {myconfig, ...}: {
home.packages = [pkgs.hyprshot];
wayland.windowManager.hyprland.settings = {
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bindit = [
", mouse:276, exec, ~/.config/hypr/scripts/clicker.sh 1"
", mouse:275, exec, ~/.config/hypr/scripts/clicker.sh 3"
];
bind =
lib.optional myconfig.programs.fcitx5.enable ''
$mod SHIFT, Space, exec, if [[ "$(fcitx5-remote --check)" -eq "1" ]]; then fcitx5-remote -e; else fcitx5 -d --replace; fi
''
++ lib.optional myconfig.programs.hyprlock.enable ''
$mod, l, exec, hyprlock
''
++ [
"$mod, q, killactive,"
"CTRLALT, Delete, exit,"
"$mod, Return, exec, kitty"
"$mod SHIFT, Return, exec, kitty --title noswallow"
"$mod, v, togglefloating"
"$mod, m, pseudo"
"$mod, j, togglesplit"
"$mod SHIFT, j, swapsplit"
"$mod, f, fullscreen"
"$mod, p, pin"
"$mod SHIFT, n, split:grabroguewindows" # Finds all windows that are in invalid workspaces and moves them to the current workspace.
"$mod, Tab, cyclenext"
"$mod, Tab, bringactivetotop"
"$mod, s, exec, pkill -c slurp; hyprshot --mode output --mode active"
"$mod SHIFT, s, exec, pkill -c slurp; hyprshot --mode region --freeze"
]
++ builtins.concatMap (x: [
"$mod, ${toString (lib.mod x 10)}, split:workspace, ${toString x}"
"$mod SHIFT, ${toString (lib.mod x 10)}, split:movetoworkspacesilent, ${toString x}"
]) (lib.range 1 10)
++ lib.optional (builtins.length host.displays == 2) "$mod, n, split:swapactiveworkspaces, ${(builtins.elemAt host.displays 0).name} ${(builtins.elemAt host.displays 1).name}";
};
};
}