local mod = "SUPER" local terminal = "kitty" hl.env("DISPLAY", ":0") hl.env("GRIM_DEFAULT_DIR", "$HOME/Imagens/screenshots") hl.env("LIBVA_DRIVER_NAME", "nvidia") hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") hl.env("NVD_BACKEND", "direct") hl.config({ general = { border_size = 2, col = { active_border = 0xff799df6, inactive_border = 0xffdfdfdf, }, gaps_in = 0, gaps_out = 0, layout = "scrolling", }, input = { follow_mouse = 2, kb_layout = "br,us", kb_options = "compose:ralt,grp:win_space_toggle", repeat_delay = 250, repeat_rate = 40, touchpad = { natural_scroll = true, }, }, xwayland = { force_zero_scaling = true, }, master = { mfact = 0.600000, new_on_top = true, new_status = "inherit", }, scrolling = { fullscreen_on_one_column = true, column_width = 0.6, }, }) hl.gesture({ fingers = 3, direction = "horizontal", action = "scroll_move" }) hl.gesture({ fingers = 3, direction = "down", action = "float", threshold = 0 }) hl.gesture({ fingers = 3, direction = "up", action = "float", threshold = 0 }) hl.gesture({ fingers = 3, direction = "down", mods = mod, action = "close", threshold = 0 }) hl.gesture({ fingers = 4, direction = "horizontal", action = "workspace" }) hl.window_rule({ match = { class = "org.nicotine_plus.Nicotine" }, workspace = "2 silent" }) hl.window_rule({ match = { class = "^io.github.diegopvlk.Cine" }, workspace = "2 silent" }) hl.window_rule({ match = { class = "^org.prismlauncher.PrismLauncher" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "^Minecraft(.-)\n" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "steam" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "^Steam" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "^com.heroicgameslauncher.hgl" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "^SS14.Loader" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "^SS14.Launcher" }, workspace = "3 silent" }) -- SS14 dev hl.window_rule({ match = { class = "^Content.Client" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "^PEAK.exe" }, workspace = "3 silent" }) hl.window_rule({ match = { class = "firefox" }, workspace = "4 silent" }) hl.bind(mod .. " + ALT + q", function() hl.exec_cmd("hyprshutdown") end) hl.bind(mod .. " + TAB", hl.dsp.focus({ workspace = "previous" })) hl.bind(mod .. " + q", hl.dsp.window.close(activewindow)) hl.bind(mod .. " + f", hl.dsp.window.fullscreen({ layout_aware = true })) hl.bind(mod .. " + SHIFT + f", function() hl.dispatch(hl.dsp.window.float()) hl.dispatch(hl.dsp.window.pin()) end) hl.bind(mod .. " + ALT + l", function() hl.exec_cmd("hyprlock") end) hl.bind(mod .. " + j", hl.dsp.layout("focus l")) hl.bind(mod .. " + k", hl.dsp.layout("focus r")) hl.bind(mod .. " + SHIFT + j", hl.dsp.layout("swapcol l")) hl.bind(mod .. " + SHIFT + k", hl.dsp.layout("swapcol r")) hl.bind(mod .. " + Period", hl.dsp.focus({ monitor = "+1" })) hl.bind(mod .. " + Comma", hl.dsp.focus({ monitor = "-1" })) hl.bind(mod .. " + SHIFT + Period", hl.dsp.window.move({ monitor = "+1 silent" })) hl.bind(mod .. " + SHIFT + Comma", hl.dsp.window.move({ monitor = "-1 silent" })) hl.bind(mod .. " + h", hl.dsp.layout("colresize -0.3")) hl.bind(mod .. " + l", hl.dsp.layout("colresize +0.3")) hl.bind(mod .. " + m", hl.dsp.layout("fit active")) hl.bind(mod .. " + e", function() hl.exec_cmd(terminal) end) hl.bind(mod .. " + SHIFT + e", function() hl.exec_cmd("[float] " .. terminal) end) hl.bind(" + F24", function() hl.exec_cmd("kitten quick-access-terminal -o lines=18") end) hl.bind("CTRL + SHIFT + space", function() hl.exec_cmd("anyrun") end) hl.bind(mod .. " + SHIFT + c", function() hl.exec_cmd("cliphist wipe") end) hl.bind(mod .. " + v", function() hl.exec_cmd("cliphist list | anyrun --plugins libstdin.so | cliphist decode | wl-copy") end) hl.bind(" + Print", function() hl.exec_cmd("slurp | grim -g -") end) hl.bind("ALT + Print", function() hl.exec_cmd("grim") end) hl.bind("XF86AudioMute", function() hl.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle") end) hl.bind("XF86AudioLowerVolume", function() hl.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-") end hl.bind("XF86AudioRaiseVolume", function() hl.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+") end) hl.bind("XF86AudioMicMute", function() hl.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle") end) hl.bind("XF86AudioStop", function() hl.exec_cmd("playerctl stop") end) hl.bind("XF86AudioPlay", function() hl.exec_cmd("playerctl play-pause") end) hl.bind("XF86AudioPrev", function() hl.exec_cmd("playerctl previous") end) hl.bind("XF86AudioNext", function() hl.exec_cmd("playerctl next") end) hl.bind("XF86MonBrightnessDown", function() hl.exec_cmd("brightnessctl s 10%-") end) hl.bind("XF86MonBrightnessUp", function() hl.exec_cmd("brightnessctl s 10%+") end) hl.bind("SHIFT + F11", function() hl.exec_cmd("brightnessctl s 10%-") end) hl.bind("SHIFT + F12", function() hl.exec_cmd("brightnessctl s 10%+") end) for i = 1, 4 do local key = i % 10 hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = tostring(i) })) hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = tostring(i) })) end hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) hl.bind(mod .. " + mouse:274", hl.dsp.window.float(), { mouse = true }) hl.on("hyprland.start", function() hl.exec_cmd("anyrun daemon") hl.exec_cmd("ashell") hl.exec_cmd( "dbus-update-activation-environment --systemd --all WAYLAND_DISPLAY XDG_CURRENT_DESKTOP MOZ_ENABLE_WAYLAND PASSWORD_STORE_DIR && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target") hl.exec_cmd("hyprctl setcursor LyraB-cursors 32") hl.exec_cmd("hypridle") hl.exec_cmd("kanshi") hl.exec_cmd("wl-paste -t text --watch cliphist store") hl.exec_cmd("awww-daemon") hl.exec_cmd("$HOME/.local/bin/wall-choose") hl.exec_cmd("xwayland-satellite") end)