-
Notifications
You must be signed in to change notification settings - Fork 3
/
i3-config.nix
146 lines (119 loc) · 4.44 KB
/
i3-config.nix
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
nixpkgs:
let
workspaceIndicies = [ 1 2 3 4 5 6 7 8 9 10 ];
mappings = mod: ''
${nixpkgs.lib.concatMapStrings
(i: "bindsym ${mod}+${
builtins.toString (nixpkgs.lib.mod i 10)
} workspace ${builtins.toString i}\n")
workspaceIndicies}
${nixpkgs.lib.concatMapStrings
(i: "bindsym ${mod}+Shift+${
builtins.toString (nixpkgs.lib.mod i 10)
} move container to workspace ${builtins.toString i}\n")
workspaceIndicies}
bindsym ${mod}+Shift+q kill
bindsym ${mod}+Up focus up
bindsym ${mod}+Down focus down
bindsym ${mod}+Left focus left
bindsym ${mod}+Right focus right
bindsym ${mod}+i focus up
bindsym ${mod}+k focus down
bindsym ${mod}+j focus left
bindsym ${mod}+l focus right
bindsym ${mod}+Shift+Up move up
bindsym ${mod}+Shift+Down move down
bindsym ${mod}+Shift+Left move left
bindsym ${mod}+Shift+Right move right
bindsym ${mod}+Shift+I move up
bindsym ${mod}+Shift+K move down
bindsym ${mod}+Shift+J move left
bindsym ${mod}+Shift+L move right
bindsym ${mod}+bracketleft focus left
bindsym ${mod}+bracketright focus right
bindsym ${mod}+Shift+bracketleft move left
bindsym ${mod}+Shift+bracketright move right
bindsym ${mod}+Return exec ${nixpkgs.alacritty}/bin/alacritty
bindsym ${mod}+Shift+X exec ${nixpkgs.writeScript "clear-clipboard.sh" ''
echo -n "" | xclip -selection "clipboard"
''}
bindsym ${mod}+d exec ${nixpkgs.rofi}/bin/rofi -show run
bindsym ${mod}+Shift+d exec ${nixpkgs.rofi}/bin/rofi -modi 'drun' -show drun
bindsym ${mod}+slash exec ${nixpkgs.flameshot}/bin/flameshot gui
bindsym ${mod}+period exec ${nixpkgs.rofimoji}/bin/rofimoji
bindsym ${mod}+equal workspace next
bindsym ${mod}+minus workspace prev
bindsym ${mod}+Tab workspace back_and_forth
bindsym ${mod}+Shift+r restart
bindsym ${mod}+n gaps inner all set 0
bindsym ${mod}+g gaps inner all set 10
bindsym ${mod}+r mode resizeAlt
bindsym ${mod}+Shift+space floating toggle
bindsym ${mod}+f fullscreen toggle
bindsym ${mod}+s layout stacking
bindsym ${mod}+w layout tabbed
bindsym ${mod}+e layout toggle split
bindsym ${mod}+u split v
bindsym ${mod}+y split h
'';
resizing = ''
bindsym Down resize grow height 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
'';
in
nixpkgs.writeText "i3-config" ''
font pango:Roboto Mono 8
floating_modifier Mod1
new_window pixel 1
new_float pixel 2
hide_edge_borders none
force_focus_wrapping no
focus_follows_mouse yes
focus_on_window_activation smart
mouse_warping output
workspace_layout default
workspace_auto_back_and_forth no
client.focused #61afef #000000 #ffffff #61afef #61afef
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #f8f8f2 #000000 #ffffff #f8f8f2 #f8f8f2
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
for_window [class="Nautilus"] floating enable
for_window [title="Gnuplot"] floating enable
for_window [class="tk"] floating enable
for_window [class="gksqt"] floating enable
for_window [class="zoom" instance="zoom"] floating enable
for_window [window_role="pop-up"] floating enable
# bindsym Shift+F1 exec light -S 0
# bindsym F1 exec ${nixpkgs.light}/bin/light -U 5
# bindsym F2 exec ${nixpkgs.light}/bin/light -A 5
bindsym XF86AudioNext exec ${nixpkgs.playerctl}/bin/playerctl next
bindsym XF86AudioPause exec ${nixpkgs.playerctl}/bin/playerctl pause
bindsym XF86AudioPrev exec ${nixpkgs.playerctl}/bin/playerctl previous
bindsym XF86AudioRaiseVolume exec amixer set Master 5%+
bindsym XF86AudioLowerVolume exec amixer set Master 5%-
bindsym XF86AudioMute exec amixer set Master 0%
bindsym XF86MonBrightnessDown exec ${nixpkgs.light}/bin/light -U 5
bindsym XF86MonBrightnessUp exec ${nixpkgs.light}/bin/light -A 5
bindsym Mod4+Shift+M mode defaultWin
mode "defaultWin" {
bindsym Mod1+Shift+M mode default
${mappings "Mod4"}
}
${mappings "Mod1"}
mode "resizeAlt" {
${resizing}
bindsym Escape mode default
bindsym Return mode default
}
mode "resizeWin" {
${resizing}
bindsym Escape mode defaultWin
bindsym Return mode defaultWin
}
smart_gaps on
smart_borders on
''