summaryrefslogtreecommitdiff
path: root/common/home/hyprland/default.nix
blob: 2ef1b0a95ae24108396ff123330f85cba22cad41 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{ pkgs, ... }: {
	enable = true;
	systemd = {
		enable = true;
		variables = [ "--all" ];
	};
	xwayland.enable = true;
	plugins = [ pkgs.hyprlandPlugins.hyprsplit ];
	settings = {
		plugin = {
			hyprsplit = {
				num_workspaces = 10;
				persistent_workspaces = false;
			};
		};
		"$mod" = "SUPER";
		bind = [
			"$mod+Shift, Q, exit"
			"$mod, C, killactive,"
			"$mod+Ctrl, F, togglefloating,"
			"$mod+Ctrl, S, togglesplit,"

			"$mod, Escape, exec, hyprlock"
			"$mod, Space, exec, wofi --show run"
			"$mod, O, exec, openproject"
			"$mod, V, exec, openproject -e nvim"
			"$mod+Shift, S, exec, loadconfig"

			"$mod+Shift, Return, exec, alacritty"
			"$mod+Shift, B, exec, firefox"
			"$mod+Shift, P, exec, wofi-pass"
			"$mod+Shift, O, exec, wofi-pass otp"

			", Print, exec, grimshot copy area"

			"$mod, h, movefocus, l"
			"$mod, l, movefocus, r"
			"$mod, k, movefocus, u"
			"$mod, j, movefocus, d"

			"$mod, f, fullscreen"
			"$mod, Return, layoutmsg, swapwithmaster master"
			"$mod, i, layoutmsg, addmaster"
			"$mod, d, layoutmsg, removemaster"

			"$mod+Shift, h, movewindow, l"
			"$mod+Shift, l, movewindow, r"
			"$mod+Shift, k, movewindow, u"
			"$mod+Shift, j, movewindow, d"

			"$mod, 1, split:workspace, 1"
			"$mod, 2, split:workspace, 2"
			"$mod, 3, split:workspace, 3"
			"$mod, 4, split:workspace, 4"
			"$mod, 5, split:workspace, 5"
			"$mod, 6, split:workspace, 6"
			"$mod, 7, split:workspace, 7"
			"$mod, 8, split:workspace, 8"
			"$mod, 9, split:workspace, 9"
			"$mod, 0, split:workspace, 10"

			"$mod+Shift, 1, split:movetoworkspacesilent, 1"
			"$mod+Shift, 2, split:movetoworkspacesilent, 2"
			"$mod+Shift, 3, split:movetoworkspacesilent, 3"
			"$mod+Shift, 4, split:movetoworkspacesilent, 4"
			"$mod+Shift, 5, split:movetoworkspacesilent, 5"
			"$mod+Shift, 6, split:movetoworkspacesilent, 6"
			"$mod+Shift, 7, split:movetoworkspacesilent, 7"
			"$mod+Shift, 8, split:movetoworkspacesilent, 8"
			"$mod+Shift, 9, split:movetoworkspacesilent, 9"
			"$mod+Shift, 0, split:movetoworkspacesilent, 10"
		];

		binde = [
			"$mod, period, resizeactive, 20 0"
			"$mod, comma, resizeactive, -20 0"
			"$mod+Shift, period, resizeactive, 0 20"
			"$mod+Shift, comma, resizeactive, 0 -20"

			", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
			", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
			", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
			", XF86AudioPlay, exec, playerctl play-pause"

			", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
			", XF86MonBrightnessUp, exec, brightnessctl set +10%"
		];

		bindm = [
			"$mod, mouse:272, movewindow"
		];

		general = {
			gaps_in = 0;
			gaps_out = 0;
			layout = "master";
			border_size = 3;
			"col.active_border" = "rgba(b16286ff)";
			"col.inactive_border" = "rgba(3c3836ff)";
		};

		decoration = {
			rounding = 0;
			shadow = {
				enabled = true;
				range = true;
				render_power = 4;
			};
		};

		animations = {
			enabled = false;
			bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
			animation = [
				"windows, 1, 3, myBezier"
				"windowsOut, 1, 3, default, popin 80%"
				"border, 1, 10, default"
				"borderangle, 1, 8, default"
				"fade, 1, 3, default"
				"workspaces, 1, 3, default"
			];
		};

		dwindle = {
			pseudotile = true;
			preserve_split = true;
		};

		master = {
			new_on_top = true;
			new_status = "master";
		};

		input = {
			kb_options = "caps:escape";

			touchpad = {
				natural_scroll = true;
				clickfinger_behavior = true;
			};
		};

		gestures = {
			workspace_swipe = true;
			workspace_swipe_fingers = 4;
		};

		misc = {
			disable_hyprland_logo = true;
			disable_splash_rendering = true;
			enable_swallow = false;
			swallow_regex = "^(Alacritty)$";
			animate_manual_resizes = true;
		};

		windowrulev2 = [
			"pin,class:^(Hyprland::WinClass::Floating)$"
			"float,class:^(Hyprland::WinClass::Floating)$"
			"center,class:^(Hyprland::WinClass::Floating)$"
		];

		exec-once = [ "signal-desktop" ];
	};
}