rc

Update Sway config for screenshots

Author
Maarten Vangeneugden
Date
July 30, 2019, 4:29 p.m.
Hash
344479ab9946a4698073ff3332af1c1e1c4229dd
Parent
1330a8afdf35d7dce4ffd7f59cfed79fc625827b
Modified file
i3/config

i3/config

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