rc

Add initial changes for i3->Sway transfer

Since I'm currently starting to update my system to use Wayland instead of X11, my window manager is pretty fundamental, so I'm changing some settings to make it compatible with Sway.

Author
Maarten Vangeneugden
Date
May 25, 2019, 3:15 p.m.
Hash
8ffaae1ed584b2501ae7318441290cb77c5bff6e
Parent
cb2f4e603f7769f6ed0791c79d1a8b31dc4bfd9d
Modified file
i3/config

i3/config

14 additions and 3 deletions.

View changes Hide changes
1
1
set $mod Mod4
2
2
# Home row direction keys, like vim
3
3
set $left h
4
4
set $down j
5
5
set $up k
6
6
set $right l
7
7
# Your preferred terminal emulator
8
8
set $term urxvt
9
9
# Your preferred application launcher
10
10
set $menu rofi -show run 
11
11
12
12
13
13
# start a terminal
14
14
bindsym $mod+Return exec $term
15
15
16
16
# kill focused window
17
17
bindsym $mod+Shift+q kill
18
18
19
19
# start your launcher
20
20
bindsym $mod+d exec $menu
21
21
22
22
# Start GNU Emacs
23
23
bindsym $mod+m exec emacsclient -nc -s gnuemacs
24
24
25
25
# Scream in chicken
26
26
bindsym $mod+p exec mpv ~/Movies/raaaaah.mp4
27
27
28
28
# Mouse+$mod to drag floating windows
29
29
floating_modifier $mod
30
30
31
31
# Lock screen
32
32
bindsym $mod+i exec i3lock-wrapper
33
33
34
34
# reload the configuration file
35
35
bindsym $mod+Shift+c reload
36
36
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
37
37
bindsym $mod+Shift+r restart
38
38
# exit i3 (logs you out of your X session)
39
39
bindsym $mod+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'"
40
40
#
+
41
# SWAY: Managing outputs
+
42
#output eDP-1 scale 2
+
43
#output eDP-1 pos 0 0 res 3840x2160
+
44
output eDP-1 pos 0 0 res 1920x1080
+
45
+
46
input 1:1:AT_Translated_Set_2_keyboard {
+
47
    xkb_layout us
+
48
    xkb_options caps:swapescape
+
49
    }
+
50
#
41
51
# Moving around:
42
52
#
43
53
    # Move your focus around
44
54
    bindsym $mod+$left focus left
45
55
    bindsym $mod+$down focus down
46
56
    bindsym $mod+$up focus up
47
57
    bindsym $mod+$right focus right
48
58
    # or use $mod+[up|down|left|right]
49
59
    bindsym $mod+Left focus left
50
60
    bindsym $mod+Down focus down
51
61
    bindsym $mod+Up focus up
52
62
    bindsym $mod+Right focus right
53
63
54
64
    # _move_ the focused window with the same, but add Shift
55
65
    bindsym $mod+Shift+$left move left
56
66
    bindsym $mod+Shift+$down move down
57
67
    bindsym $mod+Shift+$up move up
58
68
    bindsym $mod+Shift+$right move right
59
69
    # ditto, with arrow keys
60
70
    bindsym $mod+Shift+Left move left
61
71
    bindsym $mod+Shift+Down move down
62
72
    bindsym $mod+Shift+Up move up
63
73
    bindsym $mod+Shift+Right move right
64
74
#
65
75
# Workspaces:
66
76
#
67
77
    # switch to workspace
68
78
    bindsym $mod+1 workspace 1
69
79
    bindsym $mod+2 workspace 2
70
80
    bindsym $mod+3 workspace 3
71
81
    bindsym $mod+4 workspace 4
72
82
    bindsym $mod+5 workspace 5
73
83
    bindsym $mod+6 workspace 6
74
84
    bindsym $mod+7 workspace 7
75
85
    bindsym $mod+8 workspace 8
76
86
    bindsym $mod+9 workspace 9
77
87
    bindsym $mod+0 workspace 10: Leisure
78
-
    # move focused container to workspace
+
88
    # move focused container to workspace
79
89
    bindsym $mod+Shift+1 move container to workspace 1
80
90
    bindsym $mod+Shift+2 move container to workspace 2
81
91
    bindsym $mod+Shift+3 move container to workspace 3
82
92
    bindsym $mod+Shift+4 move container to workspace 4
83
93
    bindsym $mod+Shift+5 move container to workspace 5
84
94
    bindsym $mod+Shift+6 move container to workspace 6
85
95
    bindsym $mod+Shift+7 move container to workspace 7
86
96
    bindsym $mod+Shift+8 move container to workspace 8
87
97
    bindsym $mod+Shift+9 move container to workspace 9
88
98
    bindsym $mod+Shift+0 move container to workspace 10: Leisure
89
-
    # Note: workspaces can have any name you want, not just numbers.
+
99
    # Note: workspaces can have any name you want, not just numbers.
90
100
    # We just use 1-10 as the default.
91
101
#
92
102
# Layout stuff:
93
103
#
94
104
    # You can "split" the current object of your focus with
95
105
    # $mod+b or $mod+v, for horizontal and vertical splits
96
106
    # respectively.
97
107
    bindsym $mod+b split h
98
108
    bindsym $mod+v split v
99
109
100
110
    # Switch the current container between different layout styles
101
111
    bindsym $mod+s layout stacking
102
112
    bindsym $mod+w layout tabbed
103
113
    bindsym $mod+e layout toggle split
104
114
105
115
    # Make the current focus fullscreen
106
116
    bindsym $mod+f fullscreen toggle
107
117
108
118
    # Toggle the current focus between tiling and floating mode
109
119
    bindsym $mod+Shift+space floating toggle
110
120
111
121
    # Swap focus between the tiling area and the floating area
112
122
    bindsym $mod+space focus mode_toggle
113
123
114
124
    # move focus to the parent container
115
125
    bindsym $mod+a focus parent
116
126
117
127
# I don't use scratchpad, so they're commented out
118
128
#bindsym $mod+Shift+minus move scratchpad
119
129
#bindsym $mod+minus scratchpad show
120
130
121
131
# Resizing containers:
122
132
#
123
133
mode "resize" {
124
134
    # left will shrink the containers width
125
135
    # right will grow the containers width
126
136
    # up will shrink the containers height
127
137
    # down will grow the containers height
128
138
    bindsym $left resize shrink width 10 px or 10 ppt
129
139
    bindsym $down resize grow height 10 px or 10 ppt
130
140
    bindsym $up resize shrink height 10 px or 10 ppt
131
141
    bindsym $right resize grow width 10 px or 10 ppt
132
142
133
143
    # ditto, with arrow keys
134
144
    bindsym Left resize shrink width 10 px or 10 ppt
135
145
    bindsym Down resize grow height 10 px or 10 ppt
136
146
    bindsym Up resize shrink height 10 px or 10 ppt
137
147
    bindsym Right resize grow width 10 px or 10 ppt
138
148
139
149
    # return to default mode
140
150
    bindsym Return mode "default"
141
151
    bindsym Escape mode "default"
142
152
}
143
153
bindsym $mod+r mode "resize"
144
154
145
155
# --recursive allows subdirectories to contain wallpapers as well, which is nice
146
156
# if you want to organize.
147
157
# --randomize chooses a different wallpaper for each screen (and of course,
148
158
# randomizes during startup)
149
159
# --bg-scale scales the wallpaper to fit the screen, so any 16:9 wallpaper is
150
160
# scaled to fit, instead of staying oversized.
151
161
exec_always feh --recursive --randomize --bg-scale ~/.wallpapers/* 
152
162
exec compton -b
153
163
154
164
bar {
155
165
    status_command i3status
156
166
    font pango:Ubunto 10
157
167
    tray_padding 5
158
168
    colors {
159
169
        background #444444
160
170
        focused_workspace #F98C0E #F98C0E #333333
161
171
        active_workspace #19ea12 #19ea12 #FFFFFF
162
172
        inactive_workspace #232323 #111111 #888888
163
173
        urgent_workspace #D50000 #D50000 #FFFFFF
164
174
    }
165
175
}
166
176
167
177
168
178
# Makes my FN buttons work properly.
169
179
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
170
180
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
171
181
bindsym XF86AudioToggle exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
172
-
+
182
bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
+
183
173
184
bindsym XF86MonBrightnessDown exec light -U 5
174
185
bindsym XF86MonBrightnessUp exec light -A 5
175
186
bindsym Print exec scrot  # Printscreen button
176
187
bindsym $mod+Print exec scrot -s  # scrot, but click for window, or drag for rectangle screenshot.
177
188
178
189
179
190
# Font settings
180
191
font pango:Ubuntu Regular 11
181
192
182
193
# Border settings
183
194
hide_edge_borders smart
184
195
default_border normal
185
196
186
197
# Color settings
187
198
188
199
client.focused          #F98C0E #F98C0E #ffffff #F98C0E #F98C0E
189
200
client.focused_inactive #f9be7a #f9be7a #FFFFFF #f9be7a #f9be7a
190
201
client.unfocused        #444444 #444444 #FFFFFF #444444 #444444
191
202
client.urgent           #D50000 #D50000 #ffffff #D50000 #D50000
192
203
#client.placeholder
193
204
194
205
# Stops the mouse defining what the active window is.
195
206
focus_follows_mouse no
196
207
197
208
# i3-gaps configuration
198
209
#
199
210
# i3-gaps can only work properly if title bars are completely disabled, which the
200
211
# next line is responsible for.
201
212
#for_window [class="^.*"] border pixel 5
202
213
203
214
#gaps inner 15
204
215
#gaps outer 5
205
216
# smart_gaps disables gaps if there is only 1 container on the workspace.
206
217
#smart_gaps on
207
218
# smart_borders does the same thing. If set to "on", it will always disable the
208
219
# border if it's the only container on the workspace. If set to "no-gaps", it
209
220
# only disables the border if the gap size to the edge of the screen is 0.
210
221
#smart_borders no_gaps