layout {
    gaps 5
    background-color "transparent"
    always-center-single-column
    center-focused-column "never"

    preset-column-widths {
        proportion 0.33333
        proportion 0.5
        proportion 0.66667
    }

    default-column-width { proportion 0.5; }

    focus-ring {
        // off
        width 1
        active-color "#ffffff33"
    }

    border {
        off
        width 1
        active-color "#555"
        inactive-color "#222"
    }

    shadow {
        off
        softness 20
        spread 5
        offset x=0 y=5
    }

    tab-indicator {
        width 2
        gap -5
        gaps-between-tabs 5
        corner-radius 10
        active-color "#fff"
        inactive-color "#ffffff55"
    }

    insert-hint {
        color "#ffffff22"
    }
}

//cursor {
//	xcursor-theme "Plasma-Overdose"
//	xcursor-size 64
//}

prefer-no-csd

screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"

layer-rule {
    match namespace="^swww-daemon$"
    place-within-backdrop true
}

overview {
    workspace-shadow {
        off
    }
}

animations {
    window-open {
        spring damping-ratio=1.0 stiffness=700 epsilon=0.0001
    }
    window-close {
        spring damping-ratio=1.0 stiffness=700 epsilon=0.1
    }
    window-resize {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.001
    }
    window-movement {
        spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
    }
    workspace-switch {
        spring damping-ratio=1.0 stiffness=800 epsilon=0.00001
    }
    horizontal-view-movement {
        spring damping-ratio=1.0 stiffness=700 epsilon=0.0001
    }
}

// Open the Firefox picture-in-picture player as floating by default.
window-rule {
    match app-id=r#"firefox$"# title="^Picture-in-Picture$"
    open-floating true
}

// Example: enable rounded corners for all windows.
window-rule {
    geometry-corner-radius 20
    clip-to-geometry true
}

window-rule {
    geometry-corner-radius 20
    clip-to-geometry true
}

window-rule {
    match app-id="kitty"
    opacity 0.9
}

window-rule {
    match app-id="Code"
    opacity 0.9
}

layer-rule {
    match namespace="^quickshell-overview$"
}

binds {
        // Core Noctalia binds
    Mod+Space { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
    Mod+S { spawn "noctalia-shell" "ipc" "call" "sidePanel" "toggle"; }
    Mod+Comma { spawn "noctalia-shell" "ipc" "call" "settings" "toggle"; }

    // Audio controls
    XF86AudioRaiseVolume { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; }
    XF86AudioLowerVolume { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; }
    XF86AudioMute { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; }

    // Brightness controls
    XF86MonBrightnessUp { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; }
    XF86MonBrightnessDown { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; }

    // Utility shortcuts
    //Mod+V { spawn "noctalia-shell" "ipc" "call" "launcher" "clipboard"; }
    //Mod+C { spawn "noctalia-shell" "ipc" "call" "launcher" "calculator"; }
    Mod+L { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; }

    // Mod-Shift-/, which is usually the same as Mod-?,
    // shows a list of important hotkeys.
    Mod+Shift+Slash { show-hotkey-overlay; }

    // Suggested binds for running programs: terminal, app launcher, screen locker.
    Mod+T { spawn "kitty"; }
    //Mod+Enter { spawn "kitty"; }
    Mod+D { spawn "ignis" "toggle-window" "Launcher"; }
    //Mod+L { spawn "hyprlock"; }
    Mod+E { spawn "nautilus"; }
    Mod+Escape { spawn "ignis" "toggle-window" "PowerMenu"; }
    Mod+I { spawn "ignis" "toggle-window" "Settings"; }

    // Example volume keys mappings for PipeWire & WirePlumber.
    // The allow-when-locked=true property makes them work even when the session is locked. 
    //XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
    //XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
    //XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
    XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }

    Mod+Q { close-window; }

    Mod+Left  { focus-column-left; }
    Mod+Down  { focus-window-down; }
    Mod+Up    { focus-window-up; }
    Mod+Right { focus-column-right; }

    Mod+Ctrl+Left  { move-column-left; }
    Mod+Ctrl+Down  { move-window-down; }
    Mod+Ctrl+Up    { move-window-up; }
    Mod+Ctrl+Right { move-column-right; }

    Mod+Home { focus-column-first; }
    Mod+End  { focus-column-last; }
    Mod+Ctrl+Home { move-column-to-first; }
    Mod+Ctrl+End  { move-column-to-last; }

    Mod+Shift+Left  { focus-monitor-left; }
    Mod+Shift+Down  { focus-monitor-down; }
    Mod+Shift+Up    { focus-monitor-up; }
    Mod+Shift+Right { focus-monitor-right; }

    Mod+Shift+Ctrl+Left  { move-column-to-monitor-left; }
    Mod+Shift+Ctrl+Down  { move-column-to-monitor-down; }
    Mod+Shift+Ctrl+Up    { move-column-to-monitor-up; }
    Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }

    Mod+Page_Down      { focus-workspace-down; }
    Mod+Page_Up        { focus-workspace-up; }
    Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
    Mod+Ctrl+Page_Up   { move-column-to-workspace-up; }

    Mod+Shift+Page_Down { move-workspace-down; }
    Mod+Shift+Page_Up   { move-workspace-up; }

    Mod+WheelScrollDown      cooldown-ms=150 { focus-workspace-down; }
    Mod+WheelScrollUp        cooldown-ms=150 { focus-workspace-up; }
    Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
    Mod+Ctrl+WheelScrollUp   cooldown-ms=150 { move-column-to-workspace-up; }

    Mod+WheelScrollRight      { focus-column-right; }
    Mod+WheelScrollLeft       { focus-column-left; }
    Mod+Ctrl+WheelScrollRight { move-column-right; }
    Mod+Ctrl+WheelScrollLeft  { move-column-left; }

    // Usually scrolling up and down with Shift in applications results in
    // horizontal scrolling; these binds replicate that.
    Mod+Shift+WheelScrollDown      { focus-column-right; }
    Mod+Shift+WheelScrollUp        { focus-column-left; }
    Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
    Mod+Ctrl+Shift+WheelScrollUp   { move-column-left; }

    Mod+1 { focus-workspace 1; }
    Mod+2 { focus-workspace 2; }
    Mod+3 { focus-workspace 3; }
    Mod+4 { focus-workspace 4; }
    Mod+5 { focus-workspace 5; }
    Mod+6 { focus-workspace 6; }
    Mod+7 { focus-workspace 7; }
    Mod+8 { focus-workspace 8; }
    Mod+9 { focus-workspace 9; }
    Mod+Ctrl+1 { move-column-to-workspace 1; }
    Mod+Ctrl+2 { move-column-to-workspace 2; }
    Mod+Ctrl+3 { move-column-to-workspace 3; }
    Mod+Ctrl+4 { move-column-to-workspace 4; }
    Mod+Ctrl+5 { move-column-to-workspace 5; }
    Mod+Ctrl+6 { move-column-to-workspace 6; }
    Mod+Ctrl+7 { move-column-to-workspace 7; }
    Mod+Ctrl+8 { move-column-to-workspace 8; }
    Mod+Ctrl+9 { move-column-to-workspace 9; }

    Mod+BracketLeft  { consume-or-expel-window-left; }
    Mod+BracketRight { consume-or-expel-window-right; }

    // Consume one window from the right to the bottom of the focused column.
    //Mod+Comma  { consume-window-into-column; }
    // Expel the bottom window from the focused column to the right.
    Mod+Period { expel-window-from-column; }

    Mod+R { switch-preset-column-width; }
    Mod+Shift+R { switch-preset-window-height; }
    Mod+Ctrl+R { reset-window-height; }
    Mod+F { maximize-column; }
    Mod+Shift+F { fullscreen-window; }
    Mod+C { center-column; }
    Mod+W { toggle-column-tabbed-display; }

    Mod+Minus { set-column-width "-10%"; }
    Mod+Equal { set-column-width "+10%"; }

    // Finer height adjustments when in column with other windows.
    Mod+Shift+Minus { set-window-height "-10%"; }
    Mod+Shift+Equal { set-window-height "+10%"; }

    // Move the focused window between the floating and the tiling layout.
    Mod+V       { toggle-window-floating; }
    Mod+Shift+V { switch-focus-between-floating-and-tiling; }

    Mod+Shift+S { screenshot; }
    Ctrl+Print { screenshot-screen; }
    Alt+Print { screenshot-window; }

    Mod+Shift+Alt+R { spawn "ignis" "run-command" "recorder-record-screen"; }
    Mod+Alt+R { spawn "ignis" "run-command" "recorder-record-portal"; }
    Ctrl+Shift+Escape { spawn "missioncenter"; }
}

hotkey-overlay {
    skip-at-startup
}

input {
    touchpad {
        tap
	natural-scroll
    }
    keyboard {
	xkb {
	    layout "pl"
        }
    }
}

output "eDP-1" {
    mode "2880x1800@120.000"
    //mode "1440x900@120.000"
    //scale 1.0
    scale 2.0
}
//spawn-at-startup "ignis" "init"
spawn-at-startup "swww-daemon"
spawn-at-startup "kanshi"
spawn-at-startup "noctalia-shell"
