# This is an example Hyprland config file.
#
# Refer to the wiki for more information.

#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=HDMI-A-1, preferred, 0x360, 1
workspace=HDMI-A-1, 1
monitor=DP-1, highrr, 4480x0, 1
workspace=DP-1, 11
monitor=DP-2, highrr, 1920x0, 1
workspace=DP-2, 21

# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
exec-once=zsh $HOME/.config/hypr/autostart.sh
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# Set programs that you use
$terminal = kitty
$fileManager = nemo
$tcmd = krusader
$menu = rofi -show drun
$lock = swaylock --screenshots --effect-pixelate 20 --effect-vignette 0.5:0.5 --fade-in 0.2
$editor = neovide
$browser = firefox

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

# Nvidia
env = _JAVA_AWT_WM_NONREPARENTING,1
env = _JAVA_OPTIONS,-Dawt.useSystemAAFontSettings=on
env = XDG_SESSION_TYPE,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_DESKTOP,Hyprland
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = GBM_BACKEND,nvidia-drm
env = WLR_NO_HARDWARE_CURSORS,1
env = SSH_AUTH_SOCK, "$XDG_RUNTIME_DIR/ssh-agent.socket"
env = QT_IM_MODULE, fcitx
env = XMODIFIERS=@im=fcitx
env = GLFW_IM_MODULE, ibus


# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = pl
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = true
    }

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

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 10
    gaps_out = 20
    border_size = 0
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 10

    inactive_opacity = 0.95
    active_opacity = 0.97

    blur {
        enabled = true
        size = 3
        passes = 2
        
        vibrancy = 0.1696
    }
    
    drop_shadow = true
    shadow_range = 15
    shadow_render_power = 3
    col.shadow = rgba(00000055)
}

animations {
    enabled = true

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = true # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = true
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = false
}

misc {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
# device {
#     name = epic-mouse-v1
#     sensitivity = -0.5
# }

# Example windowrule v1
# windowrule = float, ^(kitty)$
windowrule=opacity 1.0 override 1.0, ^(firefox)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.

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)$

windowrulev2 = float,class:^(flameshot)$
windowrulev2 = pin,class:^(flameshot)$

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod SHIFT, RETURN, exec, $terminal
# bind = $mainMod, Q, exec, $terminal
bind = $mainMod, Q, killactive,
# bind = $mainMod, C, killactive,
bind = $mainMod SHIFT, Q, exit,
# bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $tcmd
bind = $mainMod, N, exec, $fileManager
bind = $mainMod, W, exec, $editor
bind = $mainMod, Z, exec, $terminal
bind = $mainMod, B, exec, $browser
bind = $mainMod, V, togglefloating,
bind = $mainMod SHIFT, L, exec, $lock
# bind = $mainMod, R, exec, $menu
bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
# bind = $mainMod, J, togglesplit, # dwindle

# Move focus with mainMod + vim keys
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d

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

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

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

bind = $mainMod, code:60, focusmonitor, -1 # code 60 is a dot (.)
bind = $mainMod, Backspace, focusmonitor, +1
bind = $mainMod SHIFT, BackSpace, movewindow, mon:+1

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

# bind = $mainMod, code:59, changemonitor, e-1
# bind = $mainMod, code:60, changemonitor, e+1

# bind = $mainMod SHIFT, code:59, changemonitorsilent, e-1
# bind = $mainMod SHIFT, code:60, changemonitorsilent, e+1

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

bind=,XF86AudioMicMute,exec,amixer set Capture toggle
bind=,XF86AudioMute,exec,amixer set Master toggle
bind=,XF86AudioRaiseVolume,exec,amixer set Master playback 5%+
bind=,XF86AudioLowerVolume,exec,amixer set Master playback 5%-
bind=,XF86MonBrightnessUp,exec,brightnessctl set 10%+
bind=,XF86MonBrightnessDown,exec,brightnessctl set 10%-
# bind=CTRL,XF86Launch2,exec,hyprctl keyword monitor "eDP-1,1920x1080@60,0x0,1"
# bind=SHIFT,XF86Launch2,exec,hyprctl keyword monitor "eDP-1,1920x1080@60,0x0,1.5"
bind=SHIFT,XF86MonBrightnessDown,exec,brightnessctl set 1%
bind=SHIFT,XF86MonBrightnessUp,exec,brightnessctl set 100%

# Discord toggle mute
# bind = SUPER ALT, F2, pass, ^discord$

# Screenshot a window
bind = $mainMod, PRINT, exec, hyprshot -m window
# Screenshot a monitor
bind = , PRINT, exec, hyprshot -m output
# Screenshot a region
bind = $mainMod SHIFT, S, exec, hyprshot -m region
