{ config, lib, ... }: { wayland.windowManager.sway = { config = { # monitors output = (builtins.listToAttrs (map (mon: { name = if mon.desc == "" then mon.port else mon.desc; value = { dpms = "on"; scale = toString mon.scale; render_bit_depth = toString mon.bitdepth; } // lib.optionalAttrs mon.position.enabled { position = "${toString mon.position.x} ${toString mon.position.y}"; } // lib.optionalAttrs mon.size.enabled { mode = "${toString mon.size.x}x${toString mon.size.y}"; }; }) config.monitors)) // { # wallpaper "*" = { bg = "${config.theme.wallpaper} fill"; }; }; # inputs input = { "*" = { xkb_layout = "us"; xkb_options = "compose:ralt"; xkb_numlock = "enable"; }; "type:touchpad" = { tap = "enabled"; natural_scroll = "enabled"; middle_emulation = "enabled"; }; }; startup = # autostart apps map (command: { inherit command; always = false; }) config.autoRun; # colors colors = let base = "#${config.theme.colors.base}"; surface = "#${config.theme.colors.surface}"; primary = "#${config.theme.colors.primary}"; text = "#${config.theme.colors.text}"; white = "#${config.theme.colors.bright.white}"; error = "#${config.theme.colors.error}"; in rec { background = base; focused = { border = primary; background = base; indicator = white; childBorder = primary; inherit text; }; focusedInactive = { border = surface; background = base; indicator = surface; childBorder = surface; inherit text; }; unfocused = focusedInactive; urgent = { border = error; background = error; indicator = error; childBorder = error; inherit text; }; placeholder = unfocused; }; window = { titlebar = false; border = config.theme.borderWidth; }; floating = { titlebar = false; border = config.theme.borderWidth; modifier = "Mod4 normal"; }; gaps = { inner = config.theme.innerGap; outer = config.theme.outerGap; }; modes = {}; bars = []; }; extraConfig = '' # gestures bindgesture swipe:right workspace prev bindgesture swipe:left workspace next # swayfx corner_radius ${toString config.theme.outerRadius} smart_corner_radius ${toString config.theme.outerRadius} blur ${ if config.theme.blur then "enabled" else "disabled" } blur_radius 10 blur_passes 3 ''; }; }