workspace "1"
workspace "2"
//--input 
input {
    keyboard {
        xkb {
        }

        numlock
    }
    touchpad {
        tap
    }	
    mouse {
    }
    trackpoint {
    }
    focus-follows-mouse
}
//output 
/-output "eDP-1" {
    mode "1920x1080@120.030"
    scale 2
    transform "normal"
    position x=1280 y=0
}

output "HDMI-A-1" {
    mode "2560x1440@144.0"
    scale 1.0
    position x=1920 y=0
}
//--layout
layout {
    gaps 5
    center-focused-column "never"
    preset-column-widths {
        proportion 0.5
        proportion 1.0

    }
    default-column-width { proportion 0.5; }
    focus-ring {
        width 1
        active-color "white"
        inactive-color "#505050"
    }
    border {
        off
        width 4
        active-color "#ffc87f"
        inactive-color "#505050"
        urgent-color "#9b0000"
    }
    shadow {
        off
	softness 30
        spread 5
        offset x=0 y=5
        color "#0007"
    }
    struts {
    }
}
//--gestures
gestures{
   hot-corners {
	   off
   }
}
//--startup
spawn-at-startup "waybar"
spawn-at-startup "~/.config/niri/wallpaper-restore.sh"
spawn-at-startup "awww-daemon"
spawn-at-startup "niri msg action focus-workspace 2"
hotkey-overlay {
    skip-at-startup
}
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
animations {
     slowdown 0.5
}

//--- window rules //
window-rule {
    match app-id=r#"firefox$"# title="^Picture-in-Picture$"
    open-floating true
}

/-window-rule {
    match app-id=r#"^org\.gnome\.World\.Secrets$"#
    match title="~Vaultwarden|bitwarden_rs"
    block-screenshot true
    block-out-from "screen-capture"
    // block-out-from "screencast"
}
/-window-rule {
    corner-radius 0
    clip-to-geometry true
}

window-rule {
   default-column-width {proportion 0.5;}
}

window-rule{
   match app-id="firefox"
   geometry-corner-radius 0 
   clip-to-geometry true
}


//--switch-events
switch-events {
    lid-close { 
    	spawn "hyprlock"
    }
}
//-- keybinds 
binds {
    Mod+Return { spawn "kitty"; }
    Mod+D  { spawn "sh" "-c" "pkill wofi || wofi --show drun"; }
    Mod+L { spawn "hyprlock"; }
    Mod+F { spawn "firefox"; } 
    Mod+B { spawn "~/.local/bin/wallpaper-niri";}
    Mod+P { spawn "~/.config/waybar/scripts/power.sh";}
    Mod+M { spawn "thunderbird";}
    Mod+T { spawn "gnome-text-editor";}
    Mod+S { spawn "signal-desktop";} 
    
    XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
    XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
    XF86AudioMute        allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
    XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+5%"; }
    XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "5%-"; }
    Mod+O repeat=false { toggle-overview; }
    Mod+Q repeat=false { close-window; }

    Mod+Left  { focus-column-left; }
    Mod+Down  { focus-window-down; }
    Mod+Up    { focus-window-up; }
    Mod+Right { focus-column-right; }
    Mod+Shift+Left  { move-column-left; }
    Mod+Shift+Down  { move-window-down; }
    Mod+Shift+Up    { move-window-up; }
    Mod+Shift+Right { move-column-right; }
    Mod+Shift+H     { move-column-left; }
    Mod+Shift+J     { move-window-down; }
    Mod+Shift+K     { move-window-up; }
    Mod+Shift+L     { 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+Page_Down      { focus-workspace-down; }
    Mod+Page_Up        { focus-workspace-up; }
    Mod+U              { focus-workspace-down; }
    Mod+I              { focus-workspace-up; }
    Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
    Mod+Ctrl+Page_Up   { move-column-to-workspace-up; }
    Mod+Ctrl+U         { move-column-to-workspace-down; }
    Mod+Ctrl+I         { move-column-to-workspace-up; }
    Mod+Shift+U         { move-workspace-down; }
    Mod+Shift+I         { move-workspace-up; }
    Mod+WheelScrollRight      { focus-column-right; }
    Mod+WheelScrollLeft       { focus-column-left; }
    Mod+Ctrl+WheelScrollRight { move-column-right; }
    Mod+Ctrl+WheelScrollLeft  { 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+0 { focus-workspace 10;}
    Mod+Shift+1 { move-column-to-workspace 1; }
    Mod+Shift+2 { move-column-to-workspace 2; }
    Mod+Shift+3 { move-column-to-workspace 3; }
    Mod+Shift+4 { move-column-to-workspace 4; }
    Mod+Shift+5 { move-column-to-workspace 5; }
    Mod+Shift+6 { move-column-to-workspace 6; }
    Mod+Shift+7 { move-column-to-workspace 7; }
    Mod+Shift+8 { move-column-to-workspace 8; }
    Mod+Shift+9 { move-column-to-workspace 9; }
    Mod+Shift+0 {move-column-to-workspace 10;}
    Mod+Comma  { consume-window-into-column; }
    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+K { fullscreen-window; }
    Mod+Ctrl+F { expand-column-to-available-width;} 
    Mod+Minus { set-column-width "-10%"; }
    Mod+Equal { set-column-width "+10%"; }
    Mod+Shift+Minus { set-window-height "-10%"; }
    Mod+Shift+Equal { set-window-height "+10%"; }
    Mod+V       { toggle-window-floating; }
    Mod+Shift+V { switch-focus-between-floating-and-tiling; }
    Mod+W { toggle-column-tabbed-display; }

    Mod+Shift+S { screenshot; }
    XF86Explorer { screenshot-screen; }
    XF86Display {spawn "blueman-manager";}
    XF86Tools {spawn "kitty";}
    XF86Search {spawn "sh" "-c" "pkill wofi || wofi --show drun";} 
    Mod+Shift+P { power-off-monitors; }
}
