Skip to content
Snippets Groups Projects
Verified Commit ad958c41 authored by Andreas Gerlach's avatar Andreas Gerlach
Browse files

modularize sway config and move them to /etc/ to make it easier for user customization

parent fced8fab
No related branches found
No related tags found
No related merge requests found
Showing
with 345 additions and 6 deletions
......@@ -5,10 +5,9 @@ vt = 1
# The default session, also known as the greeter.
[default_session]
# `agreety` is the bundled agetty/login-lookalike. You can replace `$SHELL`
# with whatever you want started, such as `sway`.
command = "sway --config /etc/greetd/sway-config"
command = "sway --config /etc/greetd/sway"
# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
......
# global variables
include /etc/sway/config.d/00-global-definitions
include /etc/sway/inputs/default-touchpad
include /etc/sway/inputs/default-keyboard-ansi
include /etc/sway/outputs/default
# colorscheme
include /etc/sway/themes/matcha-theme
include /etc/sway/config.d/10-ui-settings
exec "gtkgreet -l -c sway; swaymsg exit"
bindsym $mod+Shift+e exec wlogout --layout /etc/wlogout/user-loggedout --buttons-per-row 3
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
include /etc/sway/config.d/*
exec "gtkgreet -l -c sway; swaymsg exit"
bindsym Mod4+Shift+e exec wlogout --layout /etc/wlogout/user-loggedout --buttons-per-row 3
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
# global variables
include /etc/sway/config.d/00-global-definitions
include /etc/sway/inputs/default-touchpad
include /etc/sway/inputs/default-keyboard-ansi
include /etc/sway/outputs/default
# colorscheme
include /etc/sway/themes/matcha-theme
include /etc/sway/config.d/10-ui-settings
# enable modes
include /etc/sway/config.d/20-normal-mode
include /etc/sway/config.d/30-scratchpad-mode
include /etc/sway/config.d/40-resize-mode
# autostart applications
include /etc/sway/config.d/99-autostart-applications
### 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 termite --config /etc/termite/config
# 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 $appmenu wofi --show drun -i -I | xargs swaymsg exec --
set $menu wofi --show run -i | xargs swaymsg exec --
### Idle configuration
# 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.
#
set $idle 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'
# Statusbar command
set $statusbar waybar
# logout command
set $logout wlogout --layout /etc/wlogout/user-loggedin
default_border pixel 1
hide_edge_borders smart
# Basic color configuration using the Base16 variables for windows and borders.
# Property Name Border BG Text Indicator Child Border
client.focused $base05 $base0C $base00 $base0C $base0C
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused $base01 $base00 $base05 $base01 $base01
client.urgent $base08 $base08 $base00 $base08 $base08
client.placeholder $base00 $base00 $base05 $base00 $base00
client.background $base07
# only enable this if every app you use is compatible with wayland
# xwayland disable
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
include /etc/sway/config.d/*
### 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 termite
# 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 $appmenu wofi --show drun -i -I | xargs swaymsg exec --
set $menu wofi --show run -i | xargs swaymsg exec --
default_border pixel 1
hide_edge_borders smart
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/wallpapers/manjaro-arm/generic/manjaro-arm2.png 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
# }
#
# 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.
# input "9610:30:HAILUCK_CO.,LTD_USB_KEYBOARD_Touchpad" {
input type:touchpad {
dwt enabled
tap enabled
natural_scroll enabled
}
input type:keyboard {
#for ISO model: xkb_layout gb
#xkb_options ctrl:nocaps
}
### Key bindings
#
# Basics:
......@@ -102,7 +23,17 @@ input type:keyboard {
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec wlogout --layout /etc/wlogout/user-loggedin
bindsym $mod+Shift+e exec $logout
bindsym Print exec grimshot save screen
bindsym Alt+Print exec grimshot save win
bindsym $mod+Print exec grimshot save area
bindsym XF86AudioLowerVolume exec amixer -q sset 'Master' 5%-
bindsym XF86AudioMute exec amixer -q sset 'Master' toggle
bindsym XF86AudioRaiseVolume exec amixer -q sset 'Master' 5%+
bindsym XF86MonBrightnessDown exec light -U 5
bindsym XF86MonBrightnessUp exec light -A 5
#
# Moving around:
#
......@@ -179,56 +110,6 @@ input type:keyboard {
# Move focus to the parent container
bindsym $mod+a focus parent
#
# 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+r mode "resize"
bindsym Print exec grimshot save screen
bindsym Alt+Print exec grimshot save win
bindsym $mod+Print exec grimshot save area
bindsym XF86AudioLowerVolume exec amixer -q sset 'Master' 5%-
bindsym XF86AudioMute exec amixer -q sset 'Master' toggle
bindsym XF86AudioRaiseVolume exec amixer -q sset 'Master' 5%+
bindsym XF86MonBrightnessDown exec light -U 5
bindsym XF86MonBrightnessUp exec light -A 5
# colorscheme
include default_theme
#
# Status Bar:
#
......@@ -237,7 +118,7 @@ bar {
position top
# Run waybar instead of swaybar
swaybar_command waybar
swaybar_command $statusbar
colors {
background $base00
......@@ -252,27 +133,3 @@ bar {
binding_mode $base00 $base0A $base00
}
}
# Basic color configuration using the Base16 variables for windows and borders.
# Property Name Border BG Text Indicator Child Border
client.focused $base05 $base0C $base00 $base0C $base0C
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused $base01 $base00 $base05 $base01 $base01
client.urgent $base08 $base08 $base00 $base08 $base08
client.placeholder $base00 $base00 $base05 $base00 $base00
client.background $base07
# only enable this if every app you use is compatible with wayland
# xwayland disable
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id mako --default-timeout 5000 --icons 1 --markup 1 --actions 1 --background-color '#52CBB0'
exec --no-startup-id pamac-tray-appindicator
exec --no-startup-id nm-applet --indicator
exec --no-startup-id blueman-applet
exec --no-startup-id mntray
exec_always import-gtk3-settings.sh \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name
#
# 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+r mode "resize"
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id mako --default-timeout 5000 --icons 1 --markup 1 --actions 1 --background-color $base07
exec --no-startup-id pamac-tray-appindicator
exec --no-startup-id nm-applet --indicator
exec --no-startup-id blueman-applet
exec --no-startup-id mntray
# enable idle mode
exec $idle
# enable gtk3 theming
exec_always import-gtk3-settings.sh \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name
### 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
# Read `man 5 sway-input` for more information about this section.
input type:keyboard {
xkb_layout us
#xkb_options ctrl:nocaps
}
### 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
# Read `man 5 sway-input` for more information about this section.
input type:keyboard {
xkb_layout gb
#xkb_options ctrl:nocaps
}
### 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
# Read `man 5 sway-input` for more information about this section.
input type:touchpad {
dwt enabled
tap enabled
natural_scroll enabled
}
### Output configuration
#
#
# 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
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/wallpapers/manjaro-arm/generic/manjaro-arm2.png fill
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment