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