-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgnome.nix
More file actions
144 lines (127 loc) · 4.64 KB
/
gnome.nix
File metadata and controls
144 lines (127 loc) · 4.64 KB
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
# Misc Gnome settings
#
# Primarily keybindings for Gnome Shell and more
#
# It's not always trivial to find where a binding is bound. Using `gsettings`
# it's possible to list all bindings and their values.
#
# Example:
#
# for schema in $(gsettings list-schemas | grep -E 'keybindings|media-keys')
# do
# gsettings list-recursively $schema
# done
{ lib, specialArgs, ... }:
let
gnome = specialArgs.nixosConfig.services.xserver.desktopManager.gnome;
in
{
config = lib.mkIf gnome.enable {
dconf.settings = {
"org.gnome.settings-daemon.plugins.media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/"
];
};
# Launch Alacritty in Tmux
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Super>Return";
command = "alacritty -e tmux";
name = "Terminal (tmux)";
};
# Launch Alacritty
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift><Super>Return";
command = "alacritty";
name = "Terminal";
};
# Launch `nixon run`
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
binding = "<Super>x";
command = "nixon";
name = "Nixon";
};
# Launch `nixon project`
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = {
binding = "<Shift><Super>x";
command = "nixon project";
name = "Nixon";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = {
binding = "<Shift><Super>s";
command = "rofi -show ssh -normal-window";
name = "Rofi SSH";
};
# Gnome interface
"org/gnome/desktop/interface" = {
enable-animations = false;
};
# Preferences
"org/gnome/desktop/wm/preferences" = {
# Workspaces
num-workspaces = 10;
};
# Keybindings
"org/gnome/desktop/wm/keybindings" = {
# Disable annoying window context menu binding
activate-window-menu = [ ];
# Move windows to workspace
move-to-workspace-1 = [ "<Shift><Super>1" ];
move-to-workspace-2 = [ "<Shift><Super>2" ];
move-to-workspace-3 = [ "<Shift><Super>3" ];
move-to-workspace-4 = [ "<Shift><Super>4" ];
move-to-workspace-5 = [ "<Shift><Super>5" ];
move-to-workspace-6 = [ "<Shift><Super>6" ];
move-to-workspace-7 = [ "<Shift><Super>7" ];
move-to-workspace-8 = [ "<Shift><Super>8" ];
move-to-workspace-9 = [ "<Shift><Super>9" ];
move-to-workspace-10 = [ "<Shift><Super>0" ];
# Relative move
move-to-workspace-left = [ "<Shift><Super>p" ];
move-to-workspace-right = [ "<Shift><Super>n" ];
# Switch to workspace
switch-to-workspace-1 = [ "<Super>1" ];
switch-to-workspace-2 = [ "<Super>2" ];
switch-to-workspace-3 = [ "<Super>3" ];
switch-to-workspace-4 = [ "<Super>4" ];
switch-to-workspace-5 = [ "<Super>5" ];
switch-to-workspace-6 = [ "<Super>6" ];
switch-to-workspace-7 = [ "<Super>7" ];
switch-to-workspace-8 = [ "<Super>8" ];
switch-to-workspace-9 = [ "<Super>9" ];
switch-to-workspace-10 = [ "<Super>0" ];
# Relative switch
switch-to-workspace-left = [ "<Super>p" ];
switch-to-workspace-right = [ "<Super>n" ];
# Disable input source switching bindings
switch-input-source = [ ];
switch-input-source-backward = [ ];
};
# Mutter
"org/gnome/mutter" = {
check-alive-timeout = 60000;
dynamic-workspaces = false;
};
# Gnome shell
"org/gnome/shell/keybindings" = {
# Disable default bindings
focus-active-notification = [ ];
# I don't wanna launch pinned apps
switch-to-application-1 = [ ];
switch-to-application-2 = [ ];
switch-to-application-3 = [ ];
switch-to-application-4 = [ ];
switch-to-application-5 = [ ];
switch-to-application-6 = [ ];
switch-to-application-7 = [ ];
switch-to-application-8 = [ ];
switch-to-application-9 = [ ];
switch-to-application-10 = [ ];
};
};
};
}