# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
# Logo key. Use Mod1 for Alt.
set $mod Mod4
set $mod Mod4
# Home row direction keys, like vim
# Home row direction keys, like vim
@ -19,6 +13,8 @@ set $term foot
# Note: pass the final command to swaymsg so that the resulting window can be opened
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# on the original workspace that the command was run on.
set $menu wofi -S drun | xargs swaymsg exec --
set $menu wofi -S drun | xargs swaymsg exec --
# Autostart
exec --no-startup-id nm-applet
exec --no-startup-id nm-applet
exec --no-startup-id autotiling
exec --no-startup-id autotiling
exec --no-startup-id lxpolkit
exec --no-startup-id lxpolkit
@ -28,17 +24,14 @@ exec --no-startup-id fcitx5
include /etc/sway/config-vars.d/*
include /etc/sway/config-vars.d/*
### Output configuration
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg {{ wallpaper_path }} fill
output * bg {{ wallpaper_path }} fill
#
# Big curved monitor at home
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
# output eDP-1 resolution 1920x1080 position 2560,0
# output DP-1 resolution 2560x1440 position 0,0
output eDP-1 resolution 1920x1080 position 3440,0
output DP-1 resolution 3440x1440 position 0,0
output DP-1 resolution 3440x1440 position 0,0
# Smol flat monitor at home
output HDMI-A-1 resolution 1920x1080 position 3440,460
# Laptop screen
output eDP-1 resolution 1920x1080 position 3440,0
# You can get the names of your outputs by running: swaymsg -t get_outputs
# You can get the names of your outputs by running: swaymsg -t get_outputs
# Gaps
# Gaps
smart_gaps on
smart_gaps on
@ -46,9 +39,6 @@ gaps inner 3
gaps outer 2
gaps outer 2
### Idle configuration
### Idle configuration
#
# Example configuration:
#
set $lock 'swaylock -f -c 000000'
set $lock 'swaylock -f -c 000000'
exec swayidle -w \
exec swayidle -w \
timeout 300 $lock \
timeout 300 $lock \
@ -59,17 +49,6 @@ exec swayidle -w \
# your displays after another 300 seconds, and turn your screens back on when
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
# Read `man 5 sway-input` for more information about this section.
input type:keyboard {
input type:keyboard {
@ -78,9 +57,7 @@ input type:keyboard {
xkb_options caps:escape
xkb_options caps:escape
}
}
### Key bindings
### Key bindings
#
# Basics:
# Basics:
#
# Start a terminal
# Start a terminal
bindsym $mod+Return exec $term
bindsym $mod+Return exec $term
@ -102,9 +79,8 @@ input type:keyboard {
# Exit sway (logs you out of your Wayland session)
# Exit sway (logs you out of your Wayland session)
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'
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'
#
# Moving around:
# Moving around:
#
# Move your focus around
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$down focus down
@ -126,9 +102,8 @@ input type:keyboard {
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
bindsym $mod+Shift+Right move right
#
# Workspaces:
# Workspaces:
#
# Switch to workspace
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+2 workspace number 2
@ -163,9 +138,8 @@ input type:keyboard {
bindsym Mod1+Shift+z move container to workspace zoom
bindsym Mod1+Shift+z move container to workspace zoom
# Note: workspaces can have any name you want, not just numbers.
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
# We just use 1-10 as the default.
#
# Layout stuff:
# Layout stuff:
#
# You can "split" the current object of your focus with
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
# respectively.
@ -188,9 +162,8 @@ input type:keyboard {
# Move focus to the parent container
# Move focus to the parent container
bindsym $mod+a focus parent
bindsym $mod+a focus parent
#
# Scratchpad:
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# You can send windows there and get them back later.