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
165
166
167
168
169
{
config,
inputs,
lib,
pkgs,
...
}:
let
inherit (config) wayland;
inherit (lib) mkOptionDefault;
DOCK_R = "Lenovo Group Limited T23d-10 V90B7ALM";
DOCK_L = "Lenovo Group Limited T23d-10 V90B7AL8";
ws_2 = "'2 dev'";
ws_3 = "'3 web'";
ws_4 = "'4 com'";
inherit (wayland.windowManager.sway.config) modifier;
in
{
config = {
#gtk = {
#enable = true;
#cursorTheme = {
# name = "adwaita";
# size = 20;
#};
#iconTheme = {
# name = "Papirus-Dark";
# package = pkgs.papirus-icon-theme;
#};
#theme = {
# name = "adwaita";
# package = pkgs.gnome-themes-extra;
#};
#};
#qt = {
# enable = true;
# platformTheme.name = "adwaita";
# style.name = "adwaita";
#};
home = {
packages = with pkgs; [
grim
slurp
wl-clipboard
];
sessionVariables = {
WLR_RENDERER = "vulkan"; # Fixes element-desktop flickering
};
};
programs = {
feh.enable = true;
};
wayland = {
systemd.target = "sway-session.target";
windowManager.sway = {
enable = true;
extraConfig = ''
exec element-desktop
'';
#extraOptions = [ "--unsupported-gpu" ];
config = {
assigns = {
"${ws_2}" = [ { "app_id" = "code"; } ];
"${ws_3}" = [ { "app_id" = "librewolf"; } ];
"${ws_4}" = [ { "app_id" = "Element"; } ];
};
bars = [
{
command = "waybar";
mode = "hide";
}
];
#colors = {
# focused = {
# background = "#B2A4D4";
# border = "#B2A4D4";
# indicator = "#ffffff";
# childBorder = "#B2A4D4";
# text = "#000000";
# };
#};
gaps = {
inner = 2;
#outer = 2;
};
input = {
"12951:6505:ZSA_Technology_Labs_Moonlander_Mark_I".xkb_variant = "''";
"type:keyboard" = {
xkb_layout = "gb";
xkb_variant = "colemak_dh";
};
"type:touchpad" = {
tap = "enabled";
natural_scroll = "enabled";
};
};
keybindings = mkOptionDefault {
"${modifier}+2" = "workspace ${ws_2}";
"${modifier}+3" = "workspace ${ws_3}";
"${modifier}+4" = "workspace ${ws_4}";
"${modifier}+Shift+2" = "move container to workspace ${ws_2}";
"${modifier}+Shift+3" = "move container to workspace ${ws_3}";
"${modifier}+Shift+4" = "move container to workspace ${ws_4}";
"${modifier}+Shift+Delete" = "exec 'swaymsg exit'";
"${modifier}+Delete" = "exec 'swaylock -f --grace 0'";
"--locked XF86MonBrightnessDown" =
"exec '${pkgs.brightnessctl}/bin/brightnessctl set --min-value=19200 10%-'";
"--locked XF86MonBrightnessUp" = "exec '${pkgs.brightnessctl}/bin/brightnessctl set 10%+'";
"--locked XF86AudioRaiseVolume" =
"exec '${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 5%+'";
"--locked XF86AudioLowerVolume" =
"exec '${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 5%-'";
"--locked XF86AudioMute" = "exec '${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle'";
"Print" = "exec '${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim'";
"${modifier}+Tab" = "exec ${pkgs.swayr}/bin/swayr switch-window";
};
menu = "${pkgs.fuzzel}/bin/fuzzel";
modifier = "Mod4";
output."*" = {
bg = "${inputs.self.resources.void.background} fill";
};
terminal = "kitty";
window.titlebar = false;
workspaceOutputAssign =
(map
(n: {
output = DOCK_L;
workspace = n;
})
[
"6"
"7"
"8"
"9"
"10"
]
)
++
map
(n: {
output = DOCK_R;
workspace = n;
})
[
"1"
ws_2
ws_3
ws_4
"5"
];
};
wrapperFeatures.gtk = true;
#xwayland = false;
};
};
};
}