# Monitors
# -----------------------------------------

# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,auto
monitor=DP-1,3440x1440@100,0x0,1
monitor=HDMI-A-1,1920x1080@60,760x-1080,1

# Variables
# -----------------------------------------

# colors
$color_border = rgb(1a1c2d)
$color_active_border = $color_border
$color_inactive_border = $color_border

# Set programs that you use
$terminal = ghostty
$menu = wofi --show drun
$run_prog = wofi --show run
$screenshot = grim -g "$(slurp)" - | wl-copy

# Settings
# -----------------------------------------

# Some default env vars.
env = XCURSOR_SIZE,22
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
env = WLR_NO_HARDWARE_CURSORS,1


general {
    gaps_in = 0,0,-1,-1
    gaps_out = -1
    border_size = 1
    col.active_border = $color_active_border
    col.inactive_border = $color_inactive_border
    layout = dwindle
    allow_tearing = false
}

input {
    kb_layout = pnx-us-se
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1
}

cursor {
    enable_hyprcursor = true

    # Dont hide my cursor!
    hide_on_key_press = false
}

decoration {
    blur {
        enabled = false
        size = 1
        passes = 2
    }
    shadow {
        enabled = false
    }
}

animations {
    enabled = yes
    animation = windows, 1, 2, default
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 0, 0, default
    animation = borderangle, 0, 0, default
    animation = fade, 0, 0, default
    animation = workspaces, 1, 1, default
}

dwindle {
    pseudotile = no # master switch for pseudotiling.
    preserve_split = yes
}

gestures {
    workspace_swipe = off
}

misc {
    # disable the anime mascot wallpapers
    force_default_wallpaper = 0
    # Disable hyperland logo and splash
    disable_hyprland_logo = true
    disable_splash_rendering = true
    # Set background color instead.
    background_color = 0x000000
    # Disable autoreload as i can reload myself.
    disable_autoreload = true
}

debug {
    overlay = false
    disable_logs = false
}

# Workspaces and windows
# -----------------------------------------

workspace = 1, monitor:DP-1, default: true
workspace = 2, monitor:DP-1
workspace = 3, monitor:DP-1
workspace = 4, monitor:DP-1
workspace = 5, monitor:DP-1
workspace = 6, monitor:DP-1
workspace = 7, monitor:DP-1
workspace = 8, monitor:DP-1
workspace = 9, monitor:HDMI-A-1, default: true

windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
windowrulev2 = workspace 2, class:firefox
windowrulev2 = workspace 9, class:org.telegram.desktop.*

# Keybinds
# -----------------------------------------

$mainMod = SUPER

bind = $mainMod, Return, exec, $terminal
bind = $mainMod, S, exec, $screenshot
bind = $mainMod, X, killactive,
#bind = $mainMod, M, exit,
bind = $mainMod, F, togglefloating,
bind = $mainMod, D, exec, $menu
bind = $mainMod, P, exec, $run_prog
bind = $mainMod, V, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, H, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, L, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, K, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, J, movefocus, 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

# 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

# Example special workspace (scratchpad)
#bind = $mainMod, S, togglespecialworkspace, magic
#bind = $mainMod SHIFT, S, movetoworkspace, special:magic

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

# Autostart
# -------------

# set wallpaper
exec-once=swaybg -i ~/.local/share/wallpapers/current

# Bar
exec-once=waybar

# Programs
exec-once=nm-applet
exec-once=nextcloud
exec-once=telegram
