# EndeavourOS sway default config
# will include all configs under $HOME/.config/sway/config.d/
# Use the dropin configs there to change settings, these configs are there:
# autostart - everything to be automatically started with the session
# defaults - default window handling
# input - input device configuration
# workspaces - workspace handling
# keybindings - custom keybindings

# user scripts can be found under `$HOME/.config/sway/scripts/`
# make sure marking them executable to be used in waybar or other tools
# these are the pathes to default used tool setups:
# $HOME/.config/gtklock
# $HOME/.config/rofi
# $HOME/.config/swaync
# $HOME/.config/swayosd
# $HOME/.config/waybar

# setting mod variable to windows key
set $mod Mod4

# Dropin directories directory (these will get sourced into this config
include $HOME/.config/sway/config.d/*
include $HOME/.config/sway/outputs

# Import environment and signal graphical session startup to systemd
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway XDG_RUNTIME_DIR && \
     systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_RUNTIME_DIR && \
     systemctl --user start sway-session.target

# make sure it loads gtk configs
exec_always $HOME/.config/sway/scripts/import-gsettings

# Cursor theme and size
seat seat0 xcursor_theme Qogir-Dark 16

# focus_wrapping
focus_wrapping yes

# focus new windows
focus_on_window_activation focus

# round corners --> needs swayfx: `yay -S swayfx`
#corner_radius 4

# gaps:
# Set inner/outer gaps
gaps inner 3
gaps outer 0

# Smart borders (draw borders around container only if it is not the only container on this workspace)
set $smart_borders off

default_border pixel 1
default_floating_border pixel 2

# qt-app fix for title bar:
for_window [app_id="^.*"] border pixel 1

# Hides vertical and horizontal borders when there's only one window.
hide_edge_borders both

#popup_during_fullscreen leave_fullscreen
#show_marks yes

# turn on mouse following
focus_follows_mouse no

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# configure multiple keyboard layouts and hotkey to switch (Alt+CAPSLOCK in this example)

#execsetxkbmap -layout de,us -option grp:win_space_toggle
#execsetxkbmap -layout de,us -option 'grp:alt_c_toggle'

# start a terminal
set $term kitty
exec_always {
    export TERMINAL=kitty
}

# wallpaper (static set)
exec_always swaybg -i /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png -m fill

# On multi display setup you can also set per display
#exec_always swaybg \
#  -o DP-3 -i /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png -m fill \
#  -o DP-1 -i /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png -m fill
# get your display names (DP-3 DP-1) with `swaymsg -t get_outputs`
