-- Hyprland Lua config — https://wiki.hypr.land/Configuring/Start/
-- User-side files are required from ~/.config/hypr/ alongside this file.

require("monitors")
require("envvars")
require("input")
require("binds")
require("windowrules")
require("autostart")

--------------------
---- MY PROGRAMS ---
--------------------

local terminal    = "kitty"
local fileManager = "thunar"
local editor      = "kitty nvim"
local menu        = "vicinae toggle"

---------------------
---- LOOK & FEEL ----
---------------------

hl.config({
    general = {
        gaps_in  = 3,
        gaps_out = 6,
        border_size = 4,
        col = {
            active_border   = { colors = { "rgb(E40046)", "rgb(f50505)", "rgb(E40046)", "rgb(f50505)", "rgb(E40046)" }, angle = 35 },
            inactive_border = "rgb(5018dd)",
        },
        resize_on_border = false,
        allow_tearing    = false,
        layout           = "dwindle",
    },
    group = {
        col = {
            border_active          = "rgb(E40046)",
            border_inactive        = "rgb(5018dd)",
            border_locked_active   = "rgb(f50505)",
            border_locked_inactive = "rgb(5018dd)",
        },
        groupbar = {
            font_family       = "Agave NerdFont",
            font_size         = 20,
            height            = 25,
            round_only_edges  = false,
            indicator_height  = 25,
            stacked           = false,
            text_color        = "rgb(E40046)",
            priority          = 3,
            rounding          = 13,
            col = {
                active          = "rgb(E40046)",
                inactive        = "rgb(5018dd)",
                locked_active   = "rgb(E40046)",
                locked_inactive = "rgb(5018dd)",
            },
        },
    },
    decoration = {
        rounding        = 20,
        active_opacity  = 1,
        inactive_opacity = 0.8,
        blur = {
            enabled  = true,
            size     = 3,
            passes   = 3,
            vibrancy = 0.1696,
        },
    },
    animations = {
        enabled = true,
    },
    dwindle = {
        preserve_split       = true,
        special_scale_factor = 0.95,
    },
    master = {
        new_status           = "master",
        special_scale_factor = 0.95,
    },
    misc = {
        force_default_wallpaper = 0,
        disable_hyprland_logo   = true,
    },
})

-----------------
---- ANIMATIONS --
-----------------

hl.curve("myBezier", { type = "bezier", points = { {0.05, 0.9}, {0.1, 1.05} } })

hl.animation({ leaf = "windows",          enabled = true, speed = 7,  bezier = "myBezier" })
hl.animation({ leaf = "windowsOut",       enabled = true, speed = 7,  bezier = "default",  style = "popin 80%" })
hl.animation({ leaf = "border",           enabled = true, speed = 10, bezier = "default" })
hl.animation({ leaf = "borderangle",      enabled = true, speed = 8,  bezier = "default" })
hl.animation({ leaf = "fade",             enabled = true, speed = 7,  bezier = "default" })
hl.animation({ leaf = "specialWorkspace", enabled = true, speed = 10, bezier = "default",  style = "slidevert" })

--------------
---- DEVICE ---
--------------

hl.device({
    name        = "epic-mouse-v1",
    sensitivity = -0.5,
})
