source = ~/.config/hypr/colors.conf

monitor=,preferred,auto,auto
monitor=Unknown-1,disable # Freaking ghost monitor after update
exec-once = exec ~/.config/hypr/launch

input {
    kb_layout = us

    follow_mouse = 1

    touchpad {
        natural_scroll = yes
    }

    kb_options = caps:escape

    sensitivity = -0.5 # -1.0 - 1.0, 0 means no modification.
}

general {
    gaps_in = 5
    gaps_out = 20
    border_size = 3
    layout = dwindle
}

decoration {
    rounding = 10

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)
}

animations {
    enabled=1
    # bezier=overshot,0.05,0.9,0.1,1.1
    bezier=overshot,0.13,0.99,0.29,1.1
    animation=windows,1,4,overshot,slide
    animation=fade,1,10,default
    animation=workspaces,1,6,overshot,slide

    bezier = linear, 0.0, 0.0, 1.0, 1.iii0
    animation = borderangle, 1, 100, linear, loop
}
dwindle {
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    new_is_master = true
}

gestures {
    workspace_swipe = on
}

$mainMod = SUPER
bind = $mainMod, RETURN, exec, foot
bind = $mainMod, Q, killactive,
bind = $mainMod, SPACE, togglefloating,
bind = $mainMod, P, exec, wofi --show drun
bind = $mainMod, F, fullscreen
bind = $mainMod, TAB, pseudo

bind = $mainMod_SHIFT, E, exec, wlogout -b 1 -p layer-shell
bind = $mainMod_SHIFT, Q, exec, gtklock
bind = $mainMod_SHIFT, C, exec, wallpaper

bind = , code:107, exec, screenshot
bind = $mainMod, code:107, exec, screenshot-edit

bindl = , code:127, exec, wpctl set-volume @DEFAULT_SOURCE@ 100%
bindrl = , code:127, exec, wpctl set-volume @DEFAULT_SOURCE@ 0%

# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d

# Move window with mainMod_SHIFT + arrow keys
bind = $mainMod_SHIFT, h, movewindow, l
bind = $mainMod_SHIFT, l, movewindow, r
bind = $mainMod_SHIFT, k, movewindow, u
bind = $mainMod_SHIFT, j, movewindow, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Audio binds
binde=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
binde=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%

# Per device settings
# device:elan-touchpad {
#     accel_profile = adaptive
#     sensitivity = -0.3
# }

# Extra window rules

# Allow hiding xwaylandvideobridge window correctly
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
