### BITTE DIESE DATEI NUR MIT FOLGENDEM BEFEHL BEARBEITEN ###
# chezmoi edit .config/sway/config

set $mod Mod1

# https://man.archlinux.org/man/sway.5.en
# https://wiki.archlinux.org/title/Sway
# https://i3wm.org/docs/userguide.html
# https://github.com/swaywm/sway/wiki
# https://github.com/swayos/swayos.github.io/blob/main/home/.config/sway/config

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

bar {
    swaybar_command waybar
}

seat seat0 xcursor_theme capitaine-cursors 16

#
# gaps
#
gaps inner 5
smart_gaps off

#
# Titlebars
#
font pango:"Hack Nerd Font" 9
default_border pixel 3
smart_borders on
default_floating_border normal
hide_edge_borders none
titlebar_border_thickness 0

#
# Below is SwayFX extensions
#

{{- if eq .chezmoi.hostname "SpectreOS" }}
blur on
smart_corner_radius on
corner_radius 10
default_dim_inactive 0.2
{{- end }}

# display resoulution

# machine-specific configuration
{{- if eq .chezmoi.hostname "SpectreOS" }}
output HDMI-A-2 pos 0 0 res 1920x1080
output eDP-1 pos 1920 0 res 1920x1080
{{- end }}

{{- if eq .chezmoi.hostname "SpectreOS-deck" }}
output eDP-1 mode 800x1200 transform 90
input 10248:4117:FTS3528:00_2808:1015 map_to_output eDP-1
exec opensdd
{{- end }}

# background
output "*" background ~/desktop-bilder/background.jpg fill

# springen von Workspace zu workspace mit oder ohne container
workspace_auto_back_and_forth yes
#bindsym $mod+z workspace back_and_forth
#bindsym $mod+Shift+z move container to workspace back_and_forth; workspace back_and_forth

#xwayland disable

include /etc/sway/config.d/*
include ~/.config/sway/modules/*

exec notify-send "loaded" "Welcome to sway."