ref: 0e2472fea6f560f7fb788183ac668f29e4dfecf4 dotfiles/.config/sway/config -rw-r--r-- 5.9 KiB View raw
                                                                                
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.

# Logo key
set $mod Mod4
set $term termite
set $launcher dmenu_path | fzf | xargs swaymsg exec

set $wallpaper /home/simon/.background
set $wallpaper_lock /home/simon/.background-lock

set $bg #000000
set $bgf #000000
set $bga #000000
set $fg #ffffff
set $fgi #888888
set $fgu #555555
set $btf #000000

set $font_family DejaVu Sans Mono
set $font_size 11

default_orientation auto
# Drag windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
floating_modifier $mod
gaps inner 0
hide_edge_borders smart
#smart_gaps on
#new_window none

output * bg $wallpaper fill

# start a terminal
bindsym $mod+Return exec $term
# kill focused window
bindsym $mod+Shift+q kill
# start your launcher
bindsym $mod+Space exec termite --name launcher -e "sh -c \'$launcher\'"

# reload the configuration file
bindsym $mod+Alt+c reload
# exit sway
bindsym $mod+Alt+q exit
bindsym $mod+Alt+p exec systemctl poweroff
bindsym $mod+Alt+s exec systemctl suspend

# Move your focus around with $mod+[h|j|k|l], like vim
#bindsym $mod+h focus left
#bindsym $mod+j focus down
#bindsym $mod+k focus up
#bindsym $mod+l focus right
# or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# _move_ the focused window with the same, but add Shift
#bindsym $mod+Shift+h move left
#bindsym $mod+Shift+j move down
#bindsym $mod+Shift+k move up
#bindsym $mod+Shift+l move right
# ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Ctrl+Right move worspace to output right

# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10

bindsym $mod+b splith
bindsym $mod+v splitv

# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# Make the current focus fullscreen
bindsym $mod+Ctrl+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+f floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+f focus mode_toggle

# move focus to the parent container
bindsym $mod+a focus parent

# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show

# passwords
bindsym $mod+p exec passmenu $menu_args
# volume controls (special keys on keyboard)
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# music controls (special keys on keyboard)
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioStop exec playerctl stop
# lockscreen
# (sleep before entering idle state to let the user lift keys)
bindsym $mod+l exec "swaylock -f -i $wallpaper_lock --scaling fill; sleep 1; pkill -USR1 swayidle"
bindsym --locked $mod+l exec "sleep 1; pkill -USR1 swayidle"
# screenshots
bindsym $mod+g exec grim $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png')
bindsym $mod+Shift+g slurp | grim -g - $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png')

bindsym $mod+n mode notifications
mode notifications {
	bindsym Escape mode default
	bindsym Return exec makoctl invoke; exec makoctl dismiss; mode default
	bindsym d exec makoctl dismiss; mode default
	bindsym Shift+d exec makoctl dismiss -a; mode default
}

bindsym $mod+r mode stewdio
mode stewdio {
	bindsym Escape mode default
	bindsym Space stewdio play
	bindsym s stewdio skip
	bindsym f stewdio fav
	bindsym q stewdio dmenu-queue
}

font pango:$font_family $font_size
client.focused $bgf $bgf $fg $bgf $bgf
client.focused_inactive $bga $bga $fgi $bga $bga
client.unfocused $bg $bg $fgu $bg $bg

bar {
	status_command i3status
	position top
	font pango:$font_family, Font Awesome 5 Free $font_size
	separator_symbol "  "
	colors {
		statusline $fg
		background $bg
		focused_background $bgf
		focused_workspace $bgf $bgf $fg
		active_workspace $bga $bga $fg
		inactive_workspace $bg $bg $fgi
	}
}

for_window [app_id="^launcher$"] floating enable, border none

input * {
	xkb_layout us
	xkb_variant altgr-intl
	xkb_options caps:escape,compose:menu,level3:ralt_switch
}

input "1386:222:Wacom_Bamboo_16FG_4x5_Pen" {
	map_from_region 0.0x0.6 0.4x1
}

exec mako >/tmp/mako.log 2>&1
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec kanshi >/tmp/kanshi.log 2>&1
exec swayidle timeout 0 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'

include ~/.config/sway/conf.d/*
include ~/.config/sway/`hostname`/*

exec systemd-notify --ready || true