local mod = "SUPER" -- keybinds local commands = { { "return", "ghostty" }, { "d", "wofi --show drun -iIG" }, { "l", "popup pulsemixer" }, { "u", "popup qalc" }, { "k", "popup note" }, { "j", "ocr" }, } hl.bind(mod .. " + v", hl.dsp.window.close()) hl.bind(mod .. " + 0", hl.dsp.exit()) hl.bind(mod .. " + g", hl.dsp.group.toggle()) hl.bind(mod .. " + h", hl.dsp.group.next()) hl.bind(mod .. " + semicolon", hl.dsp.window.fullscreen()) hl.bind(mod .. " + SHIFT + l", hl.dsp.workspace.toggle_special("keepass")) hl.bind("print", hl.dsp.exec_cmd("screenshot")) hl.bind("SHIFT + print", hl.dsp.exec_cmd("grim - | swappy -f -")) hl.bind(mod .. " + space", hl.dsp.window.float()) local mov_keys = { { "n", "left" }, { "e", "down" }, { "i", "up" }, { "o", "right" } } local wss = { { 1, "a" }, { 2, "r" }, { 3, "s" }, { 4, "t" }, { 5, "q" }, { 6, "w" }, { 7, "f" }, { 8, "p" }, { 9, "z" }, { 10, "x" }, { 11, "c" }, } hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) for _, p in ipairs(commands) do local key = p[1] local cmd = p[2] hl.bind(mod .. " + " .. key, hl.dsp.exec_cmd(cmd)) end for _, p in ipairs(mov_keys) do local key = p[1] local dir = p[2] hl.bind(mod .. " + " .. key, hl.dsp.focus({ direction = dir })) hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ direction = dir })) end for _, p in ipairs(wss) do local i = p[1] local key = p[2] hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i })) hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i, follow = false })) end -- window rules hl.window_rule({ match = { class = "term-popup" }, float = true, }) --keepassxc hl.window_rule({ match = { initial_title = ".* \\[Locked\\] - KeePassXC", }, workspace = "special:keepass" }) hl.window_rule({ match = { class = "org.keepassxc.KeePassXC", initial_title = "negative:.* \\[Locked\\] - KeePassXC", }, float = true }) -- looks local active_col = { colors = { "rgba(aaaaeeff)", "rgba(eeaaeeff)" }, angle = 45 } local inactive_col = 0xff333333 hl.config({ general = { gaps_in = 9, gaps_out = 15, border_size = 2, col = { active_border = active_col, inactive_border = inactive_col } }, decoration = { rounding = 10, blur = { enabled = true, size = 3, } }, group = { col = { border_active = active_col, border_inactive = inactive_col }, groupbar = { enabled = false } }, }) -- animations hl.curve("decel", { type = "bezier", points = { { 0.05, 0.1 }, { 0.1, 1 } } }) hl.animation({ leaf = "windows", enabled = true, speed = 2, bezier = "decel", style = "popin 80%" }) hl.animation({ leaf = "windowsOut", enabled = true, speed = 2, bezier = "decel", style = "popin 80%" }) hl.animation({ leaf = "workspaces", enabled = true, speed = 2, bezier = "decel", style = "slidefade 5%" }) hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "decel" }) -- setup hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "1", }) hl.config({ input = { kb_layout = "us", kb_variant = "colemak_dh", kb_model = "", kb_options = "caps:escape", kb_rules = "", repeat_rate = 50, repeat_delay = 300, follow_mouse = 1, sensitivity = 0.5, -- -1.0 - 1.0, 0 means no modification. accel_profile = "flat", touchpad = { disable_while_typing = false, }, }, }) hl.on("hyprland.start", function() hl.exec_cmd("wayland-init") hl.exec_cmd("wallpaper") hl.exec_cmd("eww open bar-eDP") hl.exec_cmd("keepassxc") end) hl.env("XDG_CURRENT_DESKTOP", "Hyprland") hl.env("XDG_SESSION_TYPE", "wayland") hl.env("XDG_SESSION_DESKTOP", "Hyprland") hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1") hl.env("QT_QPA_PLATFORM", "wayland;xcb") hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1") hl.env("GDK_BACKEND", "wayland,x11,*") hl.env("SDL_VIDEODRIVER", "wayland")