blob: 47fb69bffd3f0a3b74256fc0f5a0c5c38af9e66f (
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
{ config, lib, pkgs, ... }:
with lib; {
config = mkIf (!config.home.isolation.active) {
home.pointerCursor = {
package = pkgs.gnome.adwaita-icon-theme;
gtk.enable = true;
name = "Adwaita";
x11.enable = true;
};
programs = {
firefox = {
enable = true;
package = pkgs.firefox.override {
nativeMessagingHosts = [ pkgs.passff-host ];
};
profiles."main.profile" = {
id = 0;
name = "default";
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
decentraleyes
darkreader
old-reddit-redirect
passff
privacy-badger
ublock-origin
umatrix
];
};
};
swaylock = {
enable = true;
settings = {
color = "222222";
font-size = 24;
show-failed-attempts = true;
};
};
tmux = {
enable = true;
aggressiveResize = true;
clock24 = true;
escapeTime = 10;
terminal = "xterm-256color";
keyMode = "vi";
plugins = [
{
plugin = pkgs.local.tmux-pass;
extraConfig = ''
set -g @pass-key BSpace
set -g @pass-copy-to-clipboard on
set -g @pass-window-size 15
set -g @pass-hide-pw-from-preview 'on'
set -g @pass-hide-preview on
'';
}
];
extraConfig = ''
set -g mouse on
set -ga update-environment " LIFT_PID"
set -g set-titles on
set -g renumber-windows on
set -sa terminal-overrides ',xterm-termite:RGB'
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y"
bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
'';
};
wofi.enable = true;
};
services = {
swayidle = {
enable = true;
timeouts = [
{ timeout = 600; command = "${getExe config.programs.swaylock.package} -fF"; }
];
};
};
wayland.windowManager.sway = {
enable = true;
config = {
modifier = "Mod4";
focus.followMouse = false;
fonts = {
size = 11.0;
names = [ "DejaVu Sans Mono" ];
style = "Bold Semi-Condensed";
};
bars = singleton {
mode = "dock";
hiddenState = "hide";
position = "top";
workspaceButtons = true;
workspaceNumbers = true;
statusCommand = getExe pkgs.i3status;
trayOutput = "primary";
colors = {
background = "#000000";
statusline = "#ffffff";
separator = "#666666";
focusedWorkspace = {
border = "#4c7899";
background = "#285577";
text = "#ffffff";
};
activeWorkspace = {
border = "#333333";
background = "#5f676a";
text = "#ffffff";
};
inactiveWorkspace = {
border = "#333333";
background = "#222222";
text = "#888888";
};
urgentWorkspace = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
};
bindingMode = {
border = "#2f343a";
background = "#900000";
text = "#ffffff";
};
};
};
keybindings =
let
mod = config.wayland.windowManager.sway.config.modifier;
wofi = config.programs.wofi.package;
inherit (pkgs.local) st tmux-lift;
in
mkOptionDefault {
"${mod}+a" = "focus parent";
"${mod}+c" = "focus child";
"${mod}+d" = "exec --no-startup-id ${getExe wofi} -S run";
"${mod}+i" = "exec ${getExe pkgs.xcalib} -invert -alter";
"${mod}+o" = "exec ${getExe config.programs.swaylock.package} -fF";
"${mod}+Return" = "exec ${getExe st} -e ${getExe tmux-lift}";
"${mod}+Shift+e" = "exec ${getExe pkgs.xorg.setxkbmap} latam";
"${mod}+Shift+u" = "exec ${getExe pkgs.xorg.setxkbmap} us";
};
startup = [
{
command = "${getExe pkgs.xautolock} -time 10 -locker '${pkgs.i3lock-color}/bin/i3lock-color -fe -c222222'";
}
];
window.commands = [
# (No) Title Bars
{
command = "border pixel 5";
criteria.class = "^.*";
}
{
command = "floating enabled";
criteria.class = "floating";
}
];
};
extraSessionCommands = ''
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
swaynag.enable = true;
systemd.enable = true;
xwayland = true;
};
};
}
|