274 lines
8.0 KiB
Plaintext
274 lines
8.0 KiB
Plaintext
|
# Default config for sway
|
||
|
#
|
||
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||
|
#
|
||
|
# Read `man 5 sway` for a complete reference.
|
||
|
|
||
|
### Variables
|
||
|
#
|
||
|
# Logo key. Use Mod1 for Alt.
|
||
|
set $mod Mod4
|
||
|
# Home row direction keys, like vim
|
||
|
set $left h
|
||
|
set $down j
|
||
|
set $up k
|
||
|
set $right l
|
||
|
# Your preferred terminal emulator
|
||
|
set $term alacritty
|
||
|
# Your preferred application launcher
|
||
|
# 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.
|
||
|
set $menu dmenu_path | bemenu -l 10 | xargs swaymsg exec --
|
||
|
set $search "rofi -modi window -show window"
|
||
|
|
||
|
set $mon1 DP-1
|
||
|
set $mon2 HDMI-A-1
|
||
|
|
||
|
output $mon2 pos 0 0
|
||
|
output $mon1 pos 1920 0
|
||
|
|
||
|
output $mon2 mode 1920x1080@144.091Hz
|
||
|
|
||
|
### Output configuration
|
||
|
#
|
||
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||
|
#output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||
|
output * bg /home/sheldonmlee/wallpaper/wallpaper fill
|
||
|
#
|
||
|
# Example configuration:
|
||
|
#
|
||
|
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||
|
#
|
||
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||
|
|
||
|
### Idle configuration
|
||
|
#
|
||
|
# Example configuration:
|
||
|
#
|
||
|
exec swayidle -w \
|
||
|
timeout 300 'swaylock -f -c 000000' \
|
||
|
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||
|
before-sleep 'swaylock -f -c 000000'
|
||
|
|
||
|
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||
|
# 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.
|
||
|
|
||
|
### Input configuration
|
||
|
#
|
||
|
# Example configuration:
|
||
|
#
|
||
|
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||
|
# dwt enabled
|
||
|
# tap enabled
|
||
|
# natural_scroll enabled
|
||
|
# middle_emulation enabled
|
||
|
# }
|
||
|
#
|
||
|
input 1133:50503:Logitech_USB_Receiver accel_profile flat
|
||
|
# 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.
|
||
|
|
||
|
### Key bindings
|
||
|
#
|
||
|
# Basics:
|
||
|
#
|
||
|
# Start a terminal
|
||
|
bindsym $mod+Return exec $term
|
||
|
|
||
|
# Kill focused window
|
||
|
bindsym $mod+w kill
|
||
|
|
||
|
# Start your launcher
|
||
|
bindsym $mod+space exec $menu
|
||
|
bindsym $mod+e exec $search
|
||
|
|
||
|
# 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
|
||
|
|
||
|
# Reload the configuration file
|
||
|
bindsym $mod+Control+r reload
|
||
|
|
||
|
# 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+Control+q exec swaymsg exit
|
||
|
|
||
|
# Lock Sway
|
||
|
bindsym $mod+Escape exec swaylock -f -c 000000
|
||
|
#
|
||
|
# Moving around:
|
||
|
#
|
||
|
# Move your focus around
|
||
|
bindsym $mod+$left focus left
|
||
|
bindsym $mod+$down focus down
|
||
|
bindsym $mod+$up focus up
|
||
|
bindsym $mod+$right 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+$left move left
|
||
|
bindsym $mod+Shift+$down move down
|
||
|
bindsym $mod+Shift+$up move up
|
||
|
bindsym $mod+Shift+$right 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
|
||
|
#
|
||
|
# Workspaces:
|
||
|
#
|
||
|
# Switch to workspace
|
||
|
bindsym $mod+a workspace number 1:a
|
||
|
bindsym $mod+r workspace number 2:r
|
||
|
bindsym $mod+s workspace number 3:s
|
||
|
bindsym $mod+t workspace number 4:t
|
||
|
bindsym $mod+z workspace number 5:z
|
||
|
bindsym $mod+x workspace number 6:x
|
||
|
bindsym $mod+c workspace number 7:c
|
||
|
bindsym $mod+v workspace number 8:v
|
||
|
# Move focused container to workspace
|
||
|
bindsym $mod+Shift+a move container to workspace number 1:a
|
||
|
bindsym $mod+Shift+r move container to workspace number 2:r
|
||
|
bindsym $mod+Shift+s move container to workspace number 3:s
|
||
|
bindsym $mod+Shift+t move container to workspace number 4:t
|
||
|
bindsym $mod+Shift+z move container to workspace number 5:z
|
||
|
bindsym $mod+Shift+x move container to workspace number 6:x
|
||
|
bindsym $mod+Shift+c move container to workspace number 7:c
|
||
|
bindsym $mod+Shift+v move container to workspace number 8:v
|
||
|
# Note: workspaces cran have any name you want, not just numbers.
|
||
|
# We just use 1-10 as the default.
|
||
|
|
||
|
# bind workspaces to monitor
|
||
|
workspace 1:a output $mon1
|
||
|
workspace 2:r output $mon1
|
||
|
workspace 3:s output $mon1
|
||
|
workspace 4:t output $mon1
|
||
|
workspace 5:z output $mon2
|
||
|
workspace 6:x output $mon2
|
||
|
workspace 7:c output $mon2
|
||
|
workspace 8:v output $mon2
|
||
|
|
||
|
#
|
||
|
#
|
||
|
# Monitors:
|
||
|
#
|
||
|
bindsym $mod+comma focus output left
|
||
|
bindsym $mod+period focus output right
|
||
|
bindsym $mod+shift+comma move workspace to output left
|
||
|
bindsym $mod+shift+period move workspace to output right
|
||
|
#
|
||
|
# Layout stuff:
|
||
|
#
|
||
|
# You can "split" the current object of your focus with
|
||
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
||
|
# respectively.
|
||
|
bindsym $mod+d splith
|
||
|
bindsym $mod+b splitv
|
||
|
|
||
|
# Switch the current container between different layout styles
|
||
|
bindsym $mod+u layout stacking
|
||
|
bindsym $mod+y layout tabbed
|
||
|
bindsym $mod+n layout toggle split
|
||
|
|
||
|
# Make the current focus fullscreen
|
||
|
bindsym $mod+f fullscreen
|
||
|
|
||
|
# Toggle the current focus between tiling and floating mode
|
||
|
bindsym $mod+Control+space floating toggle
|
||
|
|
||
|
# Swap focus between the tiling area and the floating area
|
||
|
bindsym $mod+m focus mode_toggle
|
||
|
|
||
|
# Move focus to the parent container
|
||
|
bindsym $mod+p focus parent
|
||
|
bindsym $mod+shift+p focus child
|
||
|
#
|
||
|
# Scratchpad:
|
||
|
#
|
||
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||
|
# You can send windows there and get them back later.
|
||
|
|
||
|
# 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
|
||
|
#
|
||
|
# Resizing containers:
|
||
|
#
|
||
|
mode "resize" {
|
||
|
# left will shrink the containers width
|
||
|
# right will grow the containers width
|
||
|
# up will shrink the containers height
|
||
|
# down will grow the containers height
|
||
|
bindsym $left resize shrink width 10px
|
||
|
bindsym $down resize grow height 10px
|
||
|
bindsym $up resize shrink height 10px
|
||
|
bindsym $right resize grow width 10px
|
||
|
|
||
|
# Ditto, with arrow keys
|
||
|
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+Control+Return mode "resize"
|
||
|
|
||
|
mode "gaming" {
|
||
|
bindsym $mod+g mode "default"
|
||
|
}
|
||
|
bindsym $mod+g mode "gaming"
|
||
|
#
|
||
|
# Status Bar:
|
||
|
#
|
||
|
# Read `man 5 sway-bar` for more information about this section.
|
||
|
font pango:SourceCodePro 11px
|
||
|
bar {
|
||
|
position top
|
||
|
|
||
|
# When the status_command prints a new line to stdout, swaybar updates.
|
||
|
# The default just shows the current date and time.
|
||
|
status_command slstatus -s
|
||
|
|
||
|
colors {
|
||
|
background #002b36
|
||
|
#statusline #ffffff
|
||
|
#background #323232
|
||
|
#inactive_workspace #32323200 #32323200 #5c5c5c
|
||
|
}
|
||
|
}
|
||
|
|
||
|
bindsym $mod+Control+h gaps horizontal current plus 200
|
||
|
bindsym $mod+Control+l gaps horizontal current minus 200
|
||
|
bindsym $mod+shift+f gaps horizontal current toggle 400
|
||
|
|
||
|
smart_gaps inverse_outer
|
||
|
|
||
|
default_border pixel 3
|
||
|
|
||
|
exec dunst
|
||
|
|
||
|
exec alacritty
|
||
|
exec firefox
|
||
|
exec discord
|
||
|
|
||
|
assign [class="firefox"] workspace 2:r
|
||
|
for_window [class="discord"] move container to workspace 3:s
|
||
|
assign [class="Steam"] workspace 4:t
|
||
|
|
||
|
include /etc/sway/config.d/*
|