]> git.r.bdr.sh - rbdr/dotfiles/blob - config/sway/config
0a98e215fd5f97ac6d3048fb431cf73ce91d1b34
[rbdr/dotfiles] / config / sway / config
1 # Default config for sway
2 #
3 # Copy this to ~/.config/sway/config and edit it to your liking.
4 #
5 # Read `man 5 sway` for a complete reference.
6
7 ### Variables
8 #
9 # Logo key. Use Mod1 for Alt.
10 set $mod Mod4
11 # Home row direction keys, like vim
12 set $left h
13 set $down j
14 set $up k
15 set $right l
16 # Your preferred terminal emulator
17 set $term kitty
18
19 # Theme Variables
20 set $font "InputSansCompressed Light 12"
21 set $highlight #00FFFF
22 set $prompt #00FF00
23
24 # Font
25 font pango:InputSansCompressed Light 12
26
27 # class / border / bg / fg / indicator / child_border
28 client.focused #00FFFF #000000 #FFFFFF #00FF00 #00FFFF
29 client.focused_inactive #00FFFF #000000 #666666 #00FF00 #00FFFF
30 client.unfocused #666666 #000000 #888888 #666666 #666666
31 client.urgent #FF00FF #000000 #FFFFFF #00FF00 #FF00FF
32
33 gaps outer 10
34 gaps inner 10
35
36 # Your preferred application launcher
37 # Note: pass the final command to swaymsg so that the resulting window can be opened
38 # on the original workspace that the command was run on.
39 set $menu bemenu-run --fn $font -p "$" --tf "$prompt" --hf "$highlight" --sf "$highlight" --scf "$highlight" | xargs swaymsg exec
40
41 ### Output configuration
42 #
43 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
44 exec swaybg -o \* -i ~/Pictures/wallpapers/lisa-congdon/Quilt_No._4_800x800.webp -m tile
45 # output HDMI-A-1 resolution 1920x1080 position 1920,0
46 #
47 # You can get the names of your outputs by running: swaymsg -t get_outputs
48
49 ### Idle configuration
50 #
51 # Example configuration:
52 #
53 # exec swayidle -w \
54 # timeout 300 'swaylock -f -c 000000' \
55 # timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
56 # before-sleep 'swaylock -f -c 000000'
57 #
58 # This will lock your screen after 300 seconds of inactivity, then turn off
59 # your displays after another 300 seconds, and turn your screens back on when
60 # resumed. It will also lock your screen before your computer goes to sleep.
61
62 ### Input configuration
63 #
64 # Example configuration:
65 #
66 # input "2:14:SynPS/2_Synaptics_TouchPad" {
67 # dwt enabled
68 # tap enabled
69 # natural_scroll enabled
70 # middle_emulation enabled
71 # }
72 #
73 # You can get the names of your inputs by running: swaymsg -t get_inputs
74 # Read `man 5 sway-input` for more information about this section.
75
76 input * {
77 xkb_options ctrl:nocaps
78 }
79
80 ### Key bindings
81 #
82 # Basics:
83 #
84 # Start a terminal
85 bindsym $mod+Return exec $term
86
87 # Kill focused window
88 bindsym $mod+Shift+q kill
89
90 # Start your launcher
91 bindsym $mod+d exec $menu
92
93 # Drag floating windows by holding down $mod and left mouse button.
94 # Resize them with right mouse button + $mod.
95 # Despite the name, also works for non-floating windows.
96 # Change normal to inverse to use left mouse button for resizing and right
97 # mouse button for dragging.
98 floating_modifier $mod normal
99
100 # Reload the configuration file
101 bindsym $mod+Shift+c reload
102
103 # Exit sway (logs you out of your Wayland session)
104 bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
105 #
106 # Moving around:
107 #
108 # Move your focus around
109 bindsym $mod+$left focus left
110 bindsym $mod+$down focus down
111 bindsym $mod+$up focus up
112 bindsym $mod+$right focus right
113 # Or use $mod+[up|down|left|right]
114 bindsym $mod+Left focus left
115 bindsym $mod+Down focus down
116 bindsym $mod+Up focus up
117 bindsym $mod+Right focus right
118
119 # Move the focused window with the same, but add Shift
120 bindsym $mod+Shift+$left move left
121 bindsym $mod+Shift+$down move down
122 bindsym $mod+Shift+$up move up
123 bindsym $mod+Shift+$right move right
124 # Ditto, with arrow keys
125 bindsym $mod+Shift+Left move left
126 bindsym $mod+Shift+Down move down
127 bindsym $mod+Shift+Up move up
128 bindsym $mod+Shift+Right move right
129 #
130 # Workspaces:
131 #
132 # Switch to workspace
133 bindsym $mod+1 workspace number 1
134 bindsym $mod+2 workspace number 2
135 bindsym $mod+3 workspace number 3
136 bindsym $mod+4 workspace number 4
137 bindsym $mod+5 workspace number 5
138 bindsym $mod+6 workspace number 6
139 bindsym $mod+7 workspace number 7
140 bindsym $mod+8 workspace number 8
141 bindsym $mod+9 workspace number 9
142 bindsym $mod+0 workspace number 10
143 # Move focused container to workspace
144 bindsym $mod+Shift+1 move container to workspace number 1
145 bindsym $mod+Shift+2 move container to workspace number 2
146 bindsym $mod+Shift+3 move container to workspace number 3
147 bindsym $mod+Shift+4 move container to workspace number 4
148 bindsym $mod+Shift+5 move container to workspace number 5
149 bindsym $mod+Shift+6 move container to workspace number 6
150 bindsym $mod+Shift+7 move container to workspace number 7
151 bindsym $mod+Shift+8 move container to workspace number 8
152 bindsym $mod+Shift+9 move container to workspace number 9
153 bindsym $mod+Shift+0 move container to workspace number 10
154 # Note: workspaces can have any name you want, not just numbers.
155 # We just use 1-10 as the default.
156 #
157 # Layout stuff:
158 #
159 # You can "split" the current object of your focus with
160 # $mod+b or $mod+v, for horizontal and vertical splits
161 # respectively.
162 bindsym $mod+b splith
163 bindsym $mod+v splitv
164
165 # Switch the current container between different layout styles
166 bindsym $mod+s layout stacking
167 bindsym $mod+w layout tabbed
168 bindsym $mod+e layout toggle split
169
170 # Make the current focus fullscreen
171 bindsym $mod+f fullscreen
172
173 # Toggle the current focus between tiling and floating mode
174 bindsym $mod+Shift+space floating toggle
175
176 # Swap focus between the tiling area and the floating area
177 bindsym $mod+space focus mode_toggle
178
179 # Move focus to the parent container
180 bindsym $mod+a focus parent
181 #
182 # Scratchpad:
183 #
184 # Sway has a "scratchpad", which is a bag of holding for windows.
185 # You can send windows there and get them back later.
186
187 # Move the currently focused window to the scratchpad
188 bindsym $mod+Shift+minus move scratchpad
189
190 # Show the next scratchpad window or hide the focused scratchpad window.
191 # If there are multiple scratchpad windows, this command cycles through them.
192 bindsym $mod+minus scratchpad show
193 #
194 # Resizing containers:
195 #
196 mode "resize" {
197 # left will shrink the containers width
198 # right will grow the containers width
199 # up will shrink the containers height
200 # down will grow the containers height
201 bindsym $left resize shrink width 10px
202 bindsym $down resize grow height 10px
203 bindsym $up resize shrink height 10px
204 bindsym $right resize grow width 10px
205
206 # Ditto, with arrow keys
207 bindsym Left resize shrink width 10px
208 bindsym Down resize grow height 10px
209 bindsym Up resize shrink height 10px
210 bindsym Right resize grow width 10px
211
212 # Return to default mode
213 bindsym Return mode "default"
214 bindsym Escape mode "default"
215 }
216 bindsym $mod+r mode "resize"
217
218 #
219 # Status Bar:
220 #
221 # Read `man 5 sway-bar` for more information about this section.
222 bar {
223 position top
224
225 # When the status_command prints a new line to stdout, swaybar updates.
226 # The default just shows the current date and time.
227 status_command while ~/.config/sway/status.sh; do sleep 1; done
228
229 colors {
230 statusline #ffffff
231 background #000000
232 # class / border / bg / fg
233 focused_workspace #00FFFF #00FFFF #000000
234 inactive_workspace #666666 #000000 #666666
235 active_workspace #00FF00 #000000 #00FF00
236 urgent_workspace #FF00FF #FF00FF #000000
237 }
238 }
239
240 include /etc/sway/config.d/*