-- hyprland config -- setup monitors hl.monitor({ output = "eDP-1", mode = "preferred", position = "auto-right", scale = 1, }) hl.monitor({ output = "", mode = "preferred", position = "auto-left", scale = "auto", }) -- set default environment variables hl.env("XCURSOR_SIZE", "24") hl.env("HYPRCURSOR_SIZE", "24") -- look and feel hl.config({ general = { layout = "master", gaps_in = 0, gaps_out = 0, border_size = 2, resize_on_border = false, allow_tearing = false, col = { active_border = "rgba(dd0000aa)", inactive_border = "rgba(595959aa)", }, }, decoration = { rounding = 0, rounding_power = 1, shadow = { enabled = false }, blur = { enabled = false }, }, animations = { enabled = false }, misc = { -- keep the wallpaper force_default_wallpaper = -1, disable_hyprland_logo = false, }, }) -- setup keyboard input hl.config({ input = { kb_layout = "us", kb_variant = "", kb_model = "", kb_options = "caps:ctrl_modifier", kb_rules = "", follow_mouse = 1, sensitivity = 0, touchpad = { natural_scroll = false }, }, }) -- keybindings local mainMod = "SUPER" hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd("kitty")) hl.bind(mainMod .. " + X", hl.dsp.exec_cmd("wofi")) hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'")) -- monitor bindings hl.bind("CTRL + ALT + S", hl.dsp.exec_cmd("~/bin/monitor 0")) hl.bind("CTRL + ALT + D", hl.dsp.exec_cmd("~/bin/monitor 1")) hl.bind("CTRL + ALT + L", hl.dsp.exec_cmd("hyprlock")) -- hl bindings hl.bind(mainMod .. " + C", hl.dsp.window.close()) hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({mode="fullscreen", action="toggle"})) -- directions hl.bind(mainMod .. " + left", hl.dsp.focus({direction = "left"})) hl.bind(mainMod .. " + down", hl.dsp.focus({direction = "down"})) hl.bind(mainMod .. " + up", hl.dsp.focus({direction = "up"})) hl.bind(mainMod .. " + right", hl.dsp.focus({direction = "right"})) hl.bind(mainMod .. " + H", hl.dsp.focus({direction = "left"})) hl.bind(mainMod .. " + J", hl.dsp.focus({direction = "down"})) hl.bind(mainMod .. " + K", hl.dsp.focus({direction = "up"})) hl.bind(mainMod .. " + L", hl.dsp.focus({direction = "right"})) 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"})) -- create workspace and move commands 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 -- 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 }) -- setup FN special keys 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, repeating = true }) hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true }) 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 }) hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })