blob: 8536e2bc505a3fe6617301a74bc198bf13ab71e1 (
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
|
{ 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}"
'';
};
waybar.enable = true;
wofi.enable = true;
};
services = {
swayidle = {
enable = true;
timeouts = [
{ timeout = 600; command = "${getExe config.programs.swaylock.package} -fF"; }
];
};
};
systemd.user.services.wl-gammarelay-rs = {
Unit.After = [ "sway-session.target" ];
Install.WantedBy = [ "sway-session.target" ];
Service.ExecStart = getExe pkgs.wl-gammarelay-rs;
};
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 {
command = "waybar";
position = "top";
};
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 busctl --user call rs.wl-gammarelay / rs.wl.gammarelay ToggleInverted";
"${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;
};
};
}
|