230 lines
5.9 KiB
Plaintext
230 lines
5.9 KiB
Plaintext
#### -*-conf-space-*- ####
|
|
## Global Sway Config File ##
|
|
#### ####
|
|
|
|
# This config file is global, anything in this file should work on all devices.
|
|
# Any device-specific configuration should be placed in one of these drop-in
|
|
# locations:
|
|
# - `display-arrangement.conf` -- display arrangement
|
|
# - `workspace-arrangement.conf` -- workspace arrangement
|
|
# - `local-config.d/*.conf` -- additional device-specific configuration files
|
|
# These files should be symlinks managed by `yadm`.
|
|
|
|
### ###
|
|
# Set Variables #
|
|
### ###
|
|
|
|
set $mod Mod4
|
|
set $alt Mod1
|
|
|
|
set $colorprimary '#815986'
|
|
set $colorbackground '#2d272f'
|
|
set $colorwallpaper '#1e1e1e'
|
|
|
|
## ##
|
|
# Configure displays and workspaces #
|
|
## ##
|
|
|
|
## Set Background
|
|
output * bg '#1e1e1e' solid_color
|
|
|
|
## Include Device-Specific Configs
|
|
include display-arrangement.conf
|
|
include workspace-arrangement.conf
|
|
|
|
### ###
|
|
# Window Management Keybinds #
|
|
### ###
|
|
|
|
floating_modifier $mod
|
|
|
|
## Resize Mode
|
|
mode "resize" {
|
|
bindsym {
|
|
# Arrow key bindings
|
|
Left resize shrink width 10 px or 1 ppt
|
|
Right resize grow width 10 px or 1 ppt
|
|
Up resize shrink height 10 px or 1 ppt
|
|
Down resize grow height 10 px or 1 ppt
|
|
|
|
# Emacs bindings
|
|
$mod+b resize shrink width 10 px or 1 ppt
|
|
$mod+f resize grow width 10 px or 1 ppt
|
|
$mod+p resize shrink height 10 px or 1 ppt
|
|
$mod+n resize grow height 10 px or 1 ppt
|
|
|
|
# Escape bindings
|
|
Return mode "default"
|
|
Escape mode "default"
|
|
$mod+r mode "default"
|
|
}
|
|
}
|
|
|
|
## Moving Windows
|
|
bindsym {
|
|
# Arrow key bindings
|
|
$mod+Shift+Left move left
|
|
$mod+Shift+Right move right
|
|
$mod+Shift+Up move up
|
|
$mod+Shift+Down move down
|
|
|
|
# Emacs bindings
|
|
$mod+Shift+b move left
|
|
$mod+Shift+f move right
|
|
$mod+Shift+p move up
|
|
$mod+Shift+n move down
|
|
}
|
|
|
|
## Shifting Focus
|
|
bindsym {
|
|
# Arrow key bindings
|
|
$mod+Left focus left
|
|
$mod+Right focus right
|
|
$mod+Up focus up
|
|
$mod+Down focus down
|
|
|
|
# Emacs bindings
|
|
$mod+b focus left
|
|
$mod+f focus right
|
|
$mod+p focus up
|
|
$mod+n focus down
|
|
}
|
|
|
|
## Containers
|
|
bindsym {
|
|
# Create new containers
|
|
$mod+h split h
|
|
$mod+v split v
|
|
|
|
# Rearrange current container
|
|
$mod+e layout toggle split
|
|
$mod+t layout tabbed
|
|
$mod+s layout stacking
|
|
}
|
|
|
|
## Close focused window
|
|
bindsym $mod+Shift+q kill
|
|
|
|
## Floating and Fullscreen
|
|
bindsym $mod+Space focus mode_toggle
|
|
bindsym $mod+Shift+Space floating toggle
|
|
bindsym $mod+$alt+f fullscreen toggle
|
|
bindsym $mod+$alt+Shift+f fullscreen global
|
|
|
|
### ###
|
|
# Style Configuration #
|
|
### ###
|
|
|
|
## Font
|
|
font pango:JetBrainsMono Nerd Font 8
|
|
|
|
## Borders
|
|
default_border pixel 1
|
|
|
|
## Colors
|
|
client.focused $colorprimary $colorbackground $colorprimary $colorprimary $colorprimary
|
|
client.focused_inactive $colorbackground $colorbackground $colorprimary $colorbackground $colorbackground
|
|
client.unfocused $colorwallpaper $colorwallpaper $colorprimary $colorbackground $colorbackground
|
|
|
|
## Window gaps
|
|
gaps inner 10
|
|
|
|
## GTK theme
|
|
exec_always gsettings set org.gnome.desktop.interface {
|
|
gtk-theme 'Nordic-darker'
|
|
icon-theme 'ePapirus-dark'
|
|
font-name 'JetBrainsMono NF:12'
|
|
}
|
|
|
|
## Terminals
|
|
for_window [app_id="Alacritty"] {
|
|
border normal 1
|
|
client.focused $colorprimary $colorbackground $colorprimary $colorprimary $colorprimary
|
|
client.focused_inactive $colorbackground $colorbackground $colorprimary $colorbackground $colorbackground
|
|
client.unfocused $colorbackground $colorwallpaper $colorprimary $colorbackground $colorbackground
|
|
}
|
|
|
|
### ###
|
|
# Application Keybinds #
|
|
### ###
|
|
|
|
## Reload Sway
|
|
bindsym $mod+Shift+r reload
|
|
|
|
## Default Application Launcher
|
|
bindsym $mod+Return exec default-application-launcher
|
|
|
|
## Terminal Launcher
|
|
bindsym $mod+Shift+Return exec alacritty msg create-window || alacritty
|
|
|
|
## Program Menu
|
|
bindsym $mod+d exec wofi --show drun
|
|
|
|
## Media Controls
|
|
bindsym --locked {
|
|
XF86AudioPlay exec playerctl play-pause
|
|
XF86AudioNext exec playerctl next
|
|
XF86AudioPrev exec playerctl previous
|
|
}
|
|
|
|
## Screen Locking
|
|
bindsym $mod+l exec loginctl lock-session
|
|
|
|
## Notifications
|
|
bindsym $mod+Ctrl+Space exec swaync-client --hide-latest
|
|
bindsym Ctrl+Shift+Space exec swaync-client -t
|
|
|
|
## Screenshotting
|
|
bindsym {
|
|
Shift+Print exec grimshot copy window && notify-send -a 'Screenshot' -u low 'Screenshot taken' 'An image of the selected window has been copied to clipboard'
|
|
Ctrl+Print exec grimshot copy area && notify-send -a 'Screenshot' -u low 'Screenshot taken' 'An image of the selected area has been copied to clipboard'
|
|
Print exec grimshot copy screen && notify-send -a 'Screenshot' -u low 'Screenshot taken' 'An image of the entire screen has been copied to clipboard'
|
|
Mod1+Print exec grimshot copy output && notify-send -a 'Screenshot' -u low 'Screenshot taken' 'An image of the focused output has been copied to clipboard'
|
|
}
|
|
|
|
### ###
|
|
# Input Configuration #
|
|
### ###
|
|
|
|
## Keyboard Settings
|
|
input type:keyboard {
|
|
xkb_numlock enabled
|
|
xkb_options compose:caps
|
|
xkb_file ~/.config/sway/keymap.xkb
|
|
}
|
|
|
|
## Touchpad Settings
|
|
input type:touchpad {
|
|
tap enabled
|
|
natural_scroll enabled
|
|
dwt disabled
|
|
drag enabled
|
|
accel_profile adaptive
|
|
}
|
|
|
|
## Mouse Settings
|
|
input type:pointer {
|
|
accel_profile flat
|
|
natural_scroll disabled
|
|
}
|
|
|
|
### ###
|
|
# Service Management #
|
|
### ###
|
|
|
|
## Import Environment Variables
|
|
exec_always XDG_CURRENT_DESKTOP=sway {
|
|
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP PATH ASDF_DATA_DIR
|
|
dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP PATH ASDF_DATA_DIR
|
|
}
|
|
|
|
## Start Session Target
|
|
exec_always systemctl --user start sway-session.target
|
|
|
|
### ###
|
|
# Generic Local Configuration #
|
|
### ###
|
|
|
|
## Include any relevant files from local-config.d/
|
|
include local-config.d/*.conf
|