]> git.sur5r.net Git - i3/i3/blob - etc/config
Add workspace vars to support DRY when customizing
[i3/i3] / etc / config
1 # i3 config file (v4)
2 #
3 # Please see https://i3wm.org/docs/userguide.html for a complete reference!
4 #
5 # This config file uses keycodes (bindsym) and was written for the QWERTY
6 # layout.
7 #
8 # To get a config file with the same key positions, but for your current
9 # layout, use the i3-config-wizard
10 #
11
12 # Font for window titles. Will also be used by the bar unless a different font
13 # is used in the bar {} block below.
14 font pango:monospace 8
15
16 # This font is widely installed, provides lots of unicode glyphs, right-to-left
17 # text rendering and scalability on retina/hidpi displays (thanks to pango).
18 #font pango:DejaVu Sans Mono 8
19
20 # Before i3 v4.8, we used to recommend this one as the default:
21 # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
22 # The font above is very space-efficient, that is, it looks good, sharp and
23 # clear in small sizes. However, its unicode glyph coverage is limited, the old
24 # X core fonts rendering does not support right-to-left and this being a bitmap
25 # font, it doesn't scale on retina/hidpi displays.
26
27 # use these keys for focus, movement, and resize directions when reaching for
28 # the arrows is not convenient
29 set $up l
30 set $down k
31 set $left j
32 set $right semicolon
33
34 # use Mouse+Mod1 to drag floating windows to their wanted position
35 floating_modifier Mod1
36
37 # start a terminal
38 bindsym Mod1+Return exec i3-sensible-terminal
39
40 # kill focused window
41 bindsym Mod1+Shift+q kill
42
43 # start dmenu (a program launcher)
44 bindsym Mod1+d exec dmenu_run
45 # There also is the (new) i3-dmenu-desktop which only displays applications
46 # shipping a .desktop file. It is a wrapper around dmenu, so you need that
47 # installed.
48 # bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop
49
50 # change focus
51 bindsym Mod1+$left focus left
52 bindsym Mod1+$down focus down
53 bindsym Mod1+$up focus up
54 bindsym Mod1+$right focus right
55
56 # alternatively, you can use the cursor keys:
57 bindsym Mod1+Left focus left
58 bindsym Mod1+Down focus down
59 bindsym Mod1+Up focus up
60 bindsym Mod1+Right focus right
61
62 # move focused window
63 bindsym Mod1+Shift+$left move left
64 bindsym Mod1+Shift+$down move down
65 bindsym Mod1+Shift+$up move up
66 bindsym Mod1+Shift+$right move right
67
68 # alternatively, you can use the cursor keys:
69 bindsym Mod1+Shift+Left move left
70 bindsym Mod1+Shift+Down move down
71 bindsym Mod1+Shift+Up move up
72 bindsym Mod1+Shift+Right move right
73
74 # split in horizontal orientation
75 bindsym Mod1+h split h
76
77 # split in vertical orientation
78 bindsym Mod1+v split v
79
80 # enter fullscreen mode for the focused container
81 bindsym Mod1+f fullscreen toggle
82
83 # change container layout (stacked, tabbed, toggle split)
84 bindsym Mod1+s layout stacking
85 bindsym Mod1+w layout tabbed
86 bindsym Mod1+e layout toggle split
87
88 # toggle tiling / floating
89 bindsym Mod1+Shift+space floating toggle
90
91 # change focus between tiling / floating windows
92 bindsym Mod1+space focus mode_toggle
93
94 # focus the parent container
95 bindsym Mod1+a focus parent
96
97 # focus the child container
98 #bindsym Mod1+d focus child
99
100 # move the currently focused window to the scratchpad
101 bindsym Mod1+Shift+minus move scratchpad
102
103 # Show the next scratchpad window or hide the focused scratchpad window.
104 # If there are multiple scratchpad windows, this command cycles through them.
105 bindsym Mod1+minus scratchpad show
106
107 # Define workspaces along with their labels
108 #
109 # Customize your workspace labels here.
110 # Example:
111 #
112 # set $ws1 "Terminals" 
113 #
114 # or
115 #
116 # set $ws1 "1: Terminals"
117 #
118 set $ws1 "1"
119 set $ws2 "2"
120 set $ws3 "3"
121 set $ws4 "4"
122 set $ws5 "5"
123 set $ws6 "6"
124 set $ws7 "7"
125 set $ws8 "8"
126 set $ws9 "9"
127 set $ws10 "10"
128
129
130 # switch to workspace
131 bindsym Mod1+1 workspace $ws1
132 bindsym Mod1+2 workspace $ws2
133 bindsym Mod1+3 workspace $ws3
134 bindsym Mod1+4 workspace $ws4
135 bindsym Mod1+5 workspace $ws5
136 bindsym Mod1+6 workspace $ws6
137 bindsym Mod1+7 workspace $ws7
138 bindsym Mod1+8 workspace $ws8
139 bindsym Mod1+9 workspace $ws9
140 bindsym Mod1+0 workspace $ws10
141
142 # move focused container to workspace
143 bindsym Mod1+Shift+1 move container to workspace $ws1
144 bindsym Mod1+Shift+2 move container to workspace $ws2
145 bindsym Mod1+Shift+3 move container to workspace $ws3
146 bindsym Mod1+Shift+4 move container to workspace $ws4
147 bindsym Mod1+Shift+5 move container to workspace $ws5
148 bindsym Mod1+Shift+6 move container to workspace $ws6
149 bindsym Mod1+Shift+7 move container to workspace $ws7
150 bindsym Mod1+Shift+8 move container to workspace $ws8
151 bindsym Mod1+Shift+9 move container to workspace $ws9
152 bindsym Mod1+Shift+0 move container to workspace $ws10
153
154 # reload the configuration file
155 bindsym Mod1+Shift+c reload
156 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
157 bindsym Mod1+Shift+r restart
158 # exit i3 (logs you out of your X session)
159 bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
160
161 # resize window (you can also use the mouse for that)
162 mode "resize" {
163         # These bindings trigger as soon as you enter the resize mode
164
165         # Pressing left will shrink the window’s width.
166         # Pressing right will grow the window’s width.
167         # Pressing up will shrink the window’s height.
168         # Pressing down will grow the window’s height.
169         bindsym $left       resize shrink width 10 px or 10 ppt
170         bindsym $down       resize grow height 10 px or 10 ppt
171         bindsym $up         resize shrink height 10 px or 10 ppt
172         bindsym $right      resize grow width 10 px or 10 ppt
173
174         # same bindings, but for the arrow keys
175         bindsym Left        resize shrink width 10 px or 10 ppt
176         bindsym Down        resize grow height 10 px or 10 ppt
177         bindsym Up          resize shrink height 10 px or 10 ppt
178         bindsym Right       resize grow width 10 px or 10 ppt
179
180         # back to normal: Enter or Escape
181         bindsym Return mode "default"
182         bindsym Escape mode "default"
183         bindsym Mod1+r mode "default"
184 }
185
186 bindsym Mod1+r mode "resize"
187
188 # Start i3bar to display a workspace bar (plus the system information i3status
189 # finds out, if available)
190 bar {
191         status_command i3status
192 }
193
194 #######################################################################
195 # automatically start i3-config-wizard to offer the user to create a
196 # keysym-based config which used their favorite modifier (alt or windows)
197 #
198 # i3-config-wizard will not launch if there already is a config file
199 # in ~/.i3/config.
200 #
201 # Please remove the following exec line:
202 #######################################################################
203 exec i3-config-wizard