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

# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox

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

# default env vars.
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = XCURSOR_SIZE,24
env = PATH,$HOME/.local/bin:$HOME/.cargo/bin:$PATH
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORMTHEME,qt5ct:qt6ct
env = GTK_USE_PORTAL,1
env = BROWSER,firefox
env = MOZ_ENABLE_WAYLAND,1
env = EDITOR,nvim

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = se
    kb_variant =
    kb_model =
    kb_options = caps:escape,altwin:swap_lalt_lwin
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    }

    # mouse sensitivity, -1.0 - 1.0, 0 means no modification.
{% if hostname == "sputnik" %}
    sensitivity = -0.9 
{% else %}
    sensitivity = 0
{% end %}
}

# DIY keyboard config
device {
    name = tux-tangentbord1
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options = compose:menu
    kb_rules =
}

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

    gaps_in = 5
    gaps_out = 5
    border_size = 2
    #col.active_border = rgba(f5deb3ff) rgba(f5deb3ee) 45deg orange
    col.active_border = rgba(f65d76ff) rgba(f65d76ee) 45deg akira pink
    col.inactive_border = rgba(595959aa)

    layout = dwindle
}

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

    rounding = 10
    
    blur {
        enabled = true
        size = 3
        passes = 1
    }

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

animations {
    enabled = yes

    # 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 = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

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

# See https://wiki.hyprland.org/Configuring/Window-Rules/
windowrule=float,title:Volume Indicator
windowrule=size 300 100,title:Volume Indicator
windowrule=move 100%-375 75,title:Volume Indicator
windowrule=rounding 35,title:Volume Indicator
windowrule=nofocus,title:Volume Indicator

windowrule=float,title:Jitsi Meet
windowrule=move 100%-375 75,title:Jitsi Meet

windowrule=workspace 1,title:WORKSPACE 1
windowrule=workspace 2,title:WORKSPACE 2
windowrule=workspace 3,title:WORKSPACE 3
windowrule=workspace 4,title:WORKSPACE 4
windowrule=workspace 5,title:WORKSPACE 5
windowrule=workspace 6,title:WORKSPACE 6
windowrule=workspace 7,title:WORKSPACE 7
windowrule=workspace 8,title:WORKSPACE 8
windowrule=workspace 9,title:WORKSPACE 9
windowrule=workspace 10,title:WORKSPACE 10
windowrule=workspace 11,title:WORKSPACE 11
windowrule=workspace 12,title:WORKSPACE 12
windowrule=workspace 13,title:WORKSPACE 13
windowrule=workspace 14,title:WORKSPACE 14
windowrule=workspace 15,title:WORKSPACE 15
windowrule=workspace 16,title:WORKSPACE 16
windowrule=float,title:WORKSPACE 1
windowrule=float,title:WORKSPACE 2
windowrule=float,title:WORKSPACE 3
windowrule=float,title:WORKSPACE 4
windowrule=float,title:WORKSPACE 5
windowrule=float,title:WORKSPACE 6
windowrule=float,title:WORKSPACE 7
windowrule=float,title:WORKSPACE 8
windowrule=float,title:WORKSPACE 9
windowrule=float,title:WORKSPACE 10
windowrule=float,title:WORKSPACE 11
windowrule=float,title:WORKSPACE 12
windowrule=float,title:WORKSPACE 13
windowrule=float,title:WORKSPACE 14
windowrule=float,title:WORKSPACE 15
windowrule=float,title:WORKSPACE 16
windowrule=animation slide,title:WORKSPACE 1
windowrule=animation slide,title:WORKSPACE 2
windowrule=animation slide,title:WORKSPACE 3
windowrule=animation slide,title:WORKSPACE 4
windowrule=animation slide,title:WORKSPACE 5
windowrule=animation slide,title:WORKSPACE 6
windowrule=animation slide,title:WORKSPACE 7
windowrule=animation slide,title:WORKSPACE 8
windowrule=animation slide,title:WORKSPACE 9
windowrule=animation slide,title:WORKSPACE 10
windowrule=animation slide,title:WORKSPACE 11
windowrule=animation slide,title:WORKSPACE 12
windowrule=animation slide,title:WORKSPACE 13
windowrule=animation slide,title:WORKSPACE 14
windowrule=animation slide,title:WORKSPACE 15
windowrule=animation slide,title:WORKSPACE 16


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

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Return, exec, alacritty
bind = $mainMod_SHIFT, Q, killactive, 
#bind = $mainMod, M, exit, 
bind = $mainMod_SHIFT, Plus, exec, screenlock
#bind = $mainMod, E, exec, dolphin
bind = $mainMod, Space, togglefloating, 
bind = $mainMod, D, exec, fuzzel
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, E, togglesplit, # dwindle
bind = $mainMod, F, fullscreen,

{% if hostname == "buran" %}
bindl=,switch:Lid Switch,exec,screenlock
{% end %}

bindl = , xf86audiolowervolume, exec, voldown
bindl = , xf86audioraisevolume, exec, volup
bindl = , xf86audiomute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bindl = , xf86audiomicmute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindl = , xf86monbrightnessdown, exec, brightnessctl --min-value=10 set 10%-
bindl = , xf86monbrightnessup, exec, brightnessctl --min-value=10 set +10%
bindl = , xf86audioplay, exec, playerctl play-pause
bindl = , xf86audionext, exec, playerctl next
bindl = , xf86audioprev, exec, playerctl previous

bind = , Print, exec, scap

# 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

# Switch workspaces with mainMod + [0-9]
# using wmutils instead of builtin workspace ensures eww-bar gets updated
# bind = $mainMod, 1, workspace, 1
bind = $mainMod, 1, exec, wmutils switch-workspace 1
bind = $mainMod, 2, exec, wmutils switch-workspace 2
bind = $mainMod, 3, exec, wmutils switch-workspace 3
bind = $mainMod, 4, exec, wmutils switch-workspace 4
bind = $mainMod, 5, exec, wmutils switch-workspace 5
bind = $mainMod, 6, exec, wmutils switch-workspace 6
bind = $mainMod, 7, exec, wmutils switch-workspace 7
bind = $mainMod, 8, exec, wmutils switch-workspace 8
bind = $mainMod, 9, exec, wmutils switch-workspace 9
bind = $mainMod, 0, exec, wmutils switch-workspace 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 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

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor =, preferred, auto, auto
{% if hostname == "sputnik" %}
monitor = desc:Microstep MSI MAG342CQR DB6H262101804, 3440x1440@100.00000, auto, auto
{% end %}
{% if hostname == "buran" %}
monitor = eDP-1, preferred, 3072x380, 1.8
monitor = eDP-2, preferred, 3072x380, 1.8
monitor = DP-2, 3840x1600@59.99400, 0x0, 1.25
# transform list
# normal (no transforms) -> 0
# 90 degrees -> 1
# 180 degrees -> 2
# 270 degrees -> 3
# flipped -> 4
# flipped + 90 degrees -> 5
# flipped + 180 degrees -> 6
# flipped + 270 degrees -> 7
{% end %}

exec-once=hyprpaper
exec-once=swayidle
exec-once=dunst

exec-once=eww daemon
exec-once=eww open bar0

exec-once=nextcloud
