181 lines
5.2 KiB
Plaintext
181 lines
5.2 KiB
Plaintext
set $mod Mod4
|
|
set $left d
|
|
set $down h
|
|
set $up t
|
|
set $right n
|
|
|
|
set $term foot
|
|
set $menu wofi | sed 's/%u//' | xargs swaymsg exec --
|
|
set $lock swaylock
|
|
set $exit swaynag -t warning -m 'Exit sway?' -B 'Yes, exit' 'swaymsg exit'
|
|
set $screenshot grim -g "$(slurp)"
|
|
set $colorpicker wl-color-picker
|
|
|
|
set $vienna_lat 48.2
|
|
set $vienna_long 16.4
|
|
set $wlsunset wlsunset -l $vienna_lat -L $vienna_long -t 2500
|
|
|
|
output * background ~/.config/sway/background.png fill #5fb2d0
|
|
|
|
# Idle/screenlock
|
|
exec swayidle -w \
|
|
timeout 300 $lock \
|
|
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
|
before-sleep $lock
|
|
|
|
# Display temperature
|
|
exec $wlsunset
|
|
|
|
# Inputs
|
|
input "type:touchpad" {
|
|
dwt enabled
|
|
tap enabled
|
|
natural_scroll enabled
|
|
}
|
|
|
|
input "type:keyboard" {
|
|
xkb_layout us,at
|
|
xkb_options grp:alt_space_toggle,caps:escape
|
|
repeat_delay 200
|
|
repeat_rate 45
|
|
}
|
|
|
|
# Layout
|
|
gaps outer 2
|
|
gaps inner 10
|
|
default_border pixel 2
|
|
default_floating_border pixel 2
|
|
smart_borders on
|
|
|
|
# Colors
|
|
client.focused #4c7899 #286677 #ffffff #2e9ef4 #5d8aa8
|
|
|
|
# Mouse
|
|
mouse_warping container
|
|
|
|
# Key bindings
|
|
bindsym $mod+Return exec $term
|
|
bindsym $mod+u exec $menu
|
|
bindsym $mod+l exec $lock
|
|
bindsym $mod+c exec $screenshot
|
|
bindsym $mod+p exec $colorpicker
|
|
bindsym $mod+Shift+e exec $exit
|
|
# Kill focused window
|
|
bindsym $mod+Shift+q kill
|
|
# Reload the configuration file
|
|
bindsym $mod+Shift+c reload
|
|
|
|
bindsym $mod+w exec pgrep wlsunset || $wlsunset
|
|
bindsym $mod+Shift+w exec pkill wlsunset
|
|
|
|
# Drag floating windows by holding down $mod and left mouse button.
|
|
# Resize them with right mouse button + $mod.
|
|
# Despite the name, also works for non-floating windows.
|
|
# Change normal to inverse to use left mouse button for resizing and right
|
|
# mouse button for dragging.
|
|
floating_modifier $mod normal
|
|
|
|
# Movement
|
|
bindsym $mod+$left focus left
|
|
bindsym $mod+$down focus down
|
|
bindsym $mod+$up focus up
|
|
bindsym $mod+$right focus 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+$left move left
|
|
bindsym $mod+Shift+$down move down
|
|
bindsym $mod+Shift+$up move up
|
|
bindsym $mod+Shift+$right move right
|
|
bindsym $mod+Shift+Left move left
|
|
bindsym $mod+Shift+Down move down
|
|
bindsym $mod+Shift+Up move up
|
|
bindsym $mod+Shift+Right move right
|
|
|
|
# Workspaces
|
|
bindsym $mod+1 workspace number 1
|
|
bindsym $mod+2 workspace number 2
|
|
bindsym $mod+3 workspace number 3
|
|
bindsym $mod+4 workspace number 4
|
|
bindsym $mod+5 workspace number 5
|
|
bindsym $mod+6 workspace number 6
|
|
bindsym $mod+7 workspace number 7
|
|
bindsym $mod+8 workspace number 8
|
|
bindsym $mod+9 workspace number 9
|
|
bindsym $mod+0 workspace number 10
|
|
bindsym $mod+Shift+1 move container to workspace number 1
|
|
bindsym $mod+Shift+2 move container to workspace number 2
|
|
bindsym $mod+Shift+3 move container to workspace number 3
|
|
bindsym $mod+Shift+4 move container to workspace number 4
|
|
bindsym $mod+Shift+5 move container to workspace number 5
|
|
bindsym $mod+Shift+6 move container to workspace number 6
|
|
bindsym $mod+Shift+7 move container to workspace number 7
|
|
bindsym $mod+Shift+8 move container to workspace number 8
|
|
bindsym $mod+Shift+9 move container to workspace number 9
|
|
bindsym $mod+Shift+0 move container to workspace number 10
|
|
|
|
# Switch the current container between different layout styles
|
|
bindsym $mod+s layout toggle stacking tabbed split
|
|
bindsym $mod+b layout splith
|
|
bindsym $mod+v layout splitv
|
|
|
|
# Make the current focus fullscreen
|
|
bindsym $mod+f fullscreen
|
|
|
|
# Toggle the current focus between tiling and floating mode
|
|
bindsym $mod+Shift+g floating toggle
|
|
|
|
# Swap focus between the tiling area and the floating area
|
|
bindsym $mod+g focus mode_toggle
|
|
|
|
# Move focus to the parent container
|
|
bindsym $mod+a focus parent
|
|
|
|
# Scratchpad:
|
|
# 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
|
|
|
|
# Media
|
|
bindsym XF86AudioRaiseVolume exec ~/.config/sway/helpers/set-sink-volume.sh +5%
|
|
bindsym XF86AudioLowerVolume exec ~/.config/sway/helpers/set-sink-volume.sh -5%
|
|
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+
|
|
bindsym XF86AudioPlay exec playerctl play-pause
|
|
bindsym XF86AudioNext exec playerctl next
|
|
bindsym XF86AudioPrev exec playerctl previous
|
|
|
|
#
|
|
# Resizing containers:
|
|
#
|
|
mode "resize" {
|
|
bindsym $left resize shrink width 10px
|
|
bindsym $down resize grow height 10px
|
|
bindsym $up resize shrink height 10px
|
|
bindsym $right resize grow width 10px
|
|
bindsym Left resize shrink width 10px
|
|
bindsym Down resize grow height 10px
|
|
bindsym Up resize shrink height 10px
|
|
bindsym Right resize grow width 10px
|
|
|
|
# Return to default mode
|
|
bindsym Return mode "default"
|
|
bindsym Escape mode "default"
|
|
}
|
|
bindsym $mod+r mode "resize"
|
|
|
|
bar {
|
|
swaybar_command waybar
|
|
}
|
|
|
|
include /etc/sway/config.d/*
|
|
include ~/.config/sway/config.d/`hostname`
|