-- Converted from hyprland.conf to the native Lua config (Hyprland 0.56+, hl API) -- Refer to the wiki for more information: https://wiki.hypr.land/Configuring/ -- Please note not all available settings / options are set here. -- For a full list, see the wiki -- You can split this configuration into multiple files -- Create your files separately and then require them like this: -- require("myColors") ------------------ ---- MONITORS ---- ------------------ -- See https://wiki.hypr.land/configuring/core/monitors/ -- monitor = ,preferred,auto,1 hl.monitor({ output = "", mode = "preferred", position = "auto", scale = 1, }) --------------------- ---- MY PROGRAMS ---- --------------------- -- Set programs that you use local terminal = "alacritty" local fileManager = "dolphin" local menu = "fuzzel" ------------------- ---- AUTOSTART ---- ------------------- -- Autostart necessary processes (like notification daemons, status bars, etc.) -- hl.exec_cmd() spawns asynchronously, so no "&" disown is needed. hl.on("hyprland.start", function () hl.exec_cmd("swayidle -w timeout 300 'swaylock -f -c 000000 && hyprctl dispatch dpms off' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000'") end) --------------------------- ---- ENVIRONMENT VARS ----- --------------------------- -- See https://wiki.hypr.land/configuring/core/environment-variables/ hl.env("XCURSOR_SIZE", "24") hl.env("HYPRCURSOR_SIZE", "24") ----------------------- ----- LOOK AND FEEL ---- ----------------------- -- Refer to https://wiki.hypr.land/configuring/core/config-options/ hl.config({ general = { gaps_in = 2, gaps_out = 1, border_size = 2, col = { -- See https://wiki.hypr.land/configuring/core/config-options/ for info about colors active_border = { colors = { "rgba(33ccffee)", "rgba(00ff99ee)" }, angle = 45 }, inactive_border = "rgba(595959aa)", }, -- Set to true to enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false, -- Please see https://wiki.hypr.land/configuring/extra/tearing/ before you turn this on allow_tearing = false, layout = "master", }, decoration = { rounding = 0, -- Change transparency of focused and unfocused windows active_opacity = 1.0, inactive_opacity = 1.0, dim_inactive = true, dim_strength = 0.2, blur = { enabled = true, size = 3, passes = 1, vibrancy = 0.1696, }, }, animations = { enabled = false, }, }) -- Default curves and animations, see https://wiki.hypr.land/configuring/core/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 = "workspaces", enabled = true, speed = 6, bezier = "default" }) -- See https://wiki.hypr.land/configuring/layouts/master-layout/ for more hl.config({ master = { new_status = "master", }, }) hl.config({ misc = { mouse_move_enables_dpms = true, key_press_enables_dpms = true, force_default_wallpaper = -1, -- Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true, }, }) ---------------- ---- INPUT ---- ---------------- hl.config({ input = { kb_layout = "no", kb_variant = "", kb_model = "", kb_options = "compose:caps", kb_rules = "", follow_mouse = 1, sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. touchpad = { natural_scroll = true, tap_to_click = false, tap_and_drag = false, }, }, }) --------------------- ---- KEYBINDINGS ---- --------------------- local mainMod = "SUPER" -- Sets "Windows" key as main modifier -- Example binds, see https://wiki.hypr.land/configuring/core/binds/ for more hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal)) hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) hl.bind(mainMod .. " + P", hl.dsp.exec_cmd(menu)) -- Move focus with mainMod + arrow keys 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" })) hl.bind(mainMod .. " + Tab", hl.dsp.window.cycle_next({ next = false })) hl.bind(mainMod .. " + SHIFT + Tab", hl.dsp.window.cycle_next()) hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen()) -- Switch workspaces with mainMod + [0-9] -- Move active window to a workspace with mainMod + SHIFT + [0-9] for i = 1, 10 do local key = i % 10 -- 10 maps to key 0 hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i })) hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) end -- Modify master area hl.bind(mainMod .. " + h", hl.dsp.layout("mfact -0.01")) hl.bind(mainMod .. " + l", hl.dsp.layout("mfact 0.01")) hl.bind(mainMod .. " + SHIFT + Return", hl.dsp.layout("swapwithmaster master")) hl.bind(mainMod .. " + comma", hl.dsp.layout("addmaster")) hl.bind(mainMod .. " + period", hl.dsp.layout("removemaster")) hl.bind(mainMod .. " + CTRL + space", hl.dsp.layout("orientationcycle")) -- Move window around hl.bind(mainMod .. " + SHIFT + h", hl.dsp.window.move({ direction = "left" })) hl.bind(mainMod .. " + SHIFT + j", hl.dsp.window.move({ direction = "down" })) hl.bind(mainMod .. " + SHIFT + k", hl.dsp.window.move({ direction = "up" })) hl.bind(mainMod .. " + SHIFT + l", hl.dsp.window.move({ direction = "right" })) -- Example special workspace (scratchpad) hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic")) hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" })) -- Scroll through existing workspaces with mainMod + scroll hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) -- Move/resize windows with mainMod + LMB/RMB and dragging hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) hl.bind(mainMod .. " + CTRL + SHIFT + l", hl.dsp.exec_cmd("swaylock -f -c 000000 && hyprctl dispatch dpms off")) hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s 10%+")) hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 10%-")) -------------------------------- ---- WINDOWS AND WORKSPACES ---- -------------------------------- -- See https://wiki.hypr.land/configuring/core/rules/window-rules/ -- and https://wiki.hypr.land/configuring/core/rules/workspace-rules/ for more local suppressMaximizeRule = hl.window_rule({ name = "suppress-maximize-events", match = { class = ".*" }, suppress_event = "maximize", }) hl.window_rule({ name = "firefox-to-workspace-2", match = { class = "firefox" }, workspace = "2 silent", }) hl.window_rule({ name = "keepassxc-to-workspace-3", match = { class = "org.keepassxc.KeePassXC" }, workspace = "3 silent", }) hl.window_rule({ name = "chromium-to-workspace-2", match = { class = "Chromium" }, workspace = "2 silent", })