Загрузка данных



-- ==========================================
-- AKAI | Hyprland 0.56.2
-- Black / Red minimal Japanese rice
-- ==========================================

local terminal = "kitty"
local browser = "firefox"
local fileManager = "dolphin"
local launcher = "rofi -show drun"
local mainMod = "SUPER"

-- MONITOR: preferred resolution at 170 Hz
hl.monitor({
    output = "",
    mode = "preferred@170",
    position = "auto",
    scale = "auto",
})

-- CURSOR
hl.env("XCURSOR_SIZE", "24")
hl.env("HYPRCURSOR_SIZE", "24")

-- APPEARANCE
hl.config({
    general = {
        gaps_in = 5,
        gaps_out = 12,
        border_size = 2,
        col = {
            active_border = {
                colors = {"rgba(ff1744ff)", "rgba(800020ff)"},
                angle = 45,
            },
            inactive_border = "rgba(292929cc)",
        },
        resize_on_border = true,
        allow_tearing = false,
        layout = "dwindle",
    },

    decoration = {
        rounding = 8,
        rounding_power = 2,
        active_opacity = 1.0,
        inactive_opacity = 0.94,

        shadow = {
            enabled = true,
            range = 8,
            render_power = 3,
            color = 0xee000000,
        },

        blur = {
            enabled = true,
            size = 4,
            passes = 2,
            vibrancy = 0.12,
        },
    },

    animations = {
        enabled = true,
    },

    dwindle = {
        preserve_split = true,
    },

    master = {
        new_status = "master",
    },

    misc = {
        force_default_wallpaper = 0,
        disable_hyprland_logo = true,
    },

    input = {
        kb_layout = "us,ru",
        kb_variant = "",
        kb_model = "",
        kb_options = "grp:alt_shift_toggle",
        kb_rules = "",
        follow_mouse = 1,
        sensitivity = 0,

        touchpad = {
            natural_scroll = false,
        },
    },
})

-- ANIMATIONS
hl.curve("akaiEase", {
    type = "bezier",
    points = {{0.16, 1}, {0.3, 1}},
})

hl.curve("akaiSmooth", {
    type = "bezier",
    points = {{0.65, 0}, {0.35, 1}},
})

hl.animation({
    leaf = "global",
    enabled = true,
    speed = 8,
    bezier = "default",
})

hl.animation({
    leaf = "windows",
    enabled = true,
    speed = 4,
    bezier = "akaiEase",
})

hl.animation({
    leaf = "windowsIn",
    enabled = true,
    speed = 3,
    bezier = "akaiEase",
    style = "popin 85%",
})

hl.animation({
    leaf = "windowsOut",
    enabled = true,
    speed = 2,
    bezier = "akaiSmooth",
})

hl.animation({
    leaf = "fade",
    enabled = true,
    speed = 3,
    bezier = "akaiSmooth",
})

hl.animation({
    leaf = "workspaces",
    enabled = true,
    speed = 3,
    bezier = "akaiEase",
})

hl.animation({
    leaf = "border",
    enabled = true,
    speed = 5,
    bezier = "akaiEase",
})

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

-- KEYBINDINGS

-- Applications
hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + V", hl.dsp.exec_cmd(browser))
hl.bind(mainMod .. " + SPACE", hl.dsp.exec_cmd(launcher))
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))

-- Window actions
hl.bind(mainMod .. " + C", hl.dsp.window.close())
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
hl.bind(mainMod .. " + T", hl.dsp.window.float({action = "toggle"}))
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))

-- Move active window left / right
hl.bind(mainMod .. " + Z",
    hl.dsp.window.move({direction = "left"}))
hl.bind(mainMod .. " + X",
    hl.dsp.window.move({direction = "right"}))

-- Focus direction
hl.bind(mainMod .. " + LEFT",
    hl.dsp.focus({direction = "left"}))
hl.bind(mainMod .. " + RIGHT",
    hl.dsp.focus({direction = "right"}))
hl.bind(mainMod .. " + UP",
    hl.dsp.focus({direction = "up"}))
hl.bind(mainMod .. " + DOWN",
    hl.dsp.focus({direction = "down"}))

-- Workspaces 1-9
for i = 1, 9 do
    hl.bind(mainMod .. " + " .. i,
        hl.dsp.focus({workspace = i}))

    hl.bind(mainMod .. " + SHIFT + " .. i,
        hl.dsp.window.move({workspace = i}))
end

-- Special workspace
hl.bind(mainMod .. " + S",
    hl.dsp.workspace.toggle_special("magic"))

hl.bind(mainMod .. " + SHIFT + S",
    hl.dsp.window.move({workspace = "special:magic"}))

-- Scroll workspaces
hl.bind(mainMod .. " + mouse_down",
    hl.dsp.focus({workspace = "e+1"}))

hl.bind(mainMod .. " + mouse_up",
    hl.dsp.focus({workspace = "e-1"}))

-- Mouse move / resize
hl.bind(mainMod .. " + mouse:272",
    hl.dsp.window.drag(), {mouse = true})

hl.bind(mainMod .. " + mouse:273",
    hl.dsp.window.resize(), {mouse = true})

-- Audio
hl.bind("XF86AudioRaiseVolume",
    hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"),
    {locked = true, repeating = true})

hl.bind("XF86AudioLowerVolume",
    hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
    {locked = true, repeating = true})

hl.bind("XF86AudioMute",
    hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
    {locked = true})

hl.bind("XF86AudioMicMute",
    hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"),
    {locked = true})

-- Brightness
hl.bind("XF86MonBrightnessUp",
    hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"),
    {locked = true, repeating = true})

hl.bind("XF86MonBrightnessDown",
    hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"),
    {locked = true, repeating = true})

-- Media
hl.bind("XF86AudioNext",
    hl.dsp.exec_cmd("playerctl next"), {locked = true})

hl.bind("XF86AudioPrev",
    hl.dsp.exec_cmd("playerctl previous"), {locked = true})

hl.bind("XF86AudioPlay",
    hl.dsp.exec_cmd("playerctl play-pause"), {locked = true})

hl.bind("XF86AudioPause",
    hl.dsp.exec_cmd("playerctl play-pause"), {locked = true})

-- WINDOW RULES
hl.window_rule({
    name = "akai-suppress-maximize",
    match = {class = ".*"},
    suppress_event = "maximize",
})

hl.window_rule({
    name = "akai-xwayland-drag-fix",
    match = {
        class = "^$",
        title = "^$",
        xwayland = true,
        float = true,
        fullscreen = false,
        pin = false,
    },
    no_focus = true,
})

-- END AKAI