From 4af9def94dcebce368fb03065e489c575f7082b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dom=C3=ADnguez?= Date: Tue, 28 Jul 2026 21:33:31 -0400 Subject: [PATCH] Actually add the hyprland.lua file, since i'm an idiot --- .config/hypr/hyprland.lua | 710 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 710 insertions(+) create mode 100644 .config/hypr/hyprland.lua diff --git a/.config/hypr/hyprland.lua b/.config/hypr/hyprland.lua new file mode 100644 index 0000000..3bf35b7 --- /dev/null +++ b/.config/hypr/hyprland.lua @@ -0,0 +1,710 @@ +-- ┌───────────────────────────────────────────────────┐ +-- │ ██████╗ ███████╗████████╗███████╗██████╗ ███████╗ │ +-- │ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗██╔════╝ │ +-- │ ██████╔╝█████╗ ██║ █████╗ ██████╔╝███████╗ │ +-- │ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ ██╔══██╗╚════██║ │ +-- │ ██║ ███████╗ ██║ ███████╗██║ ██║███████║ │ +-- │ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝ │ +-- ├───────────────────────────────────────────────────┤ +-- │ depressing and totally messy hyprland config or │ +-- ├───────────────────────────────────────────────────┤ +-- │ How windows are the only well │ +-- │ managed aspect of my life. │ +-- │---------------------------------------------------│ +-- │ https://git.peterdominguez.art/peter/.dotfiles │ +-- └───────────────────────────────────────────────────┘ +-- +-- + +-- Programs + +-- Generated by hyprlang2lua. Review TODOs before reloading Hyprland. + +local terminal = "kitty" +local menu = "rofi -show drun" + +-- Some default env vars + +hl.env("XCURSOR_SIZE", "24") +hl.env("QT_QPA_PLATFORMTHEME", "qt5ct") + +-- Outputs + +hl.monitor({ + output = "DP-1", + mode = "1920x1080@239.760", + position = "0x0", + scale = "1", +}) + +hl.monitor({ + output = "DP-2", + mode = "1920x1080@239.760", + position = "1920x-417", + scale = "1", + transform = 3, +}) + +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "1", +}) + +-- Input devices + +hl.device({ + name = "usb-hid-keyboard-mouse", + sensitivity = -0.3, +}) + +hl.curve("myBezier", { type = "bezier", points = { { 0, 0.55 }, { 0.45, 1 } } }) +hl.animation({ + leaf = "windows", + enabled = true, + speed = 4, + bezier = "myBezier", +}) +hl.animation({ + leaf = "windowsIn", + enabled = true, + speed = 7, + bezier = "default", + style = "popin 80%", +}) +hl.animation({ + leaf = "windowsOut", + enabled = true, + speed = 7, + bezier = "default", + style = "popin 80%", +}) +hl.animation({ + leaf = "border", + enabled = true, + speed = 20, + bezier = "default", +}) +hl.animation({ + leaf = "borderangle", + enabled = true, + speed = 20, + bezier = "default", +}) +hl.animation({ + leaf = "fade", + enabled = true, + speed = 7, + bezier = "default", +}) +hl.animation({ + leaf = "workspaces", + enabled = true, + speed = 6, + bezier = "default", + style = "slide", +}) + +hl.window_rule({ + name = "windowrule-1", + match = { + class = "libreoffice-writer", + }, + workspace = "2 silent", +}) + +hl.window_rule({ + name = "windowrule-2", + match = { + class = "gimp", + }, + workspace = "3 silent", +}) + +hl.window_rule({ + name = "windowrule-3", + match = { + class = "virt-manager", + }, + workspace = "4 silent", +}) + +hl.window_rule({ + name = "windowrule-4", + match = { + title = "Friends List", + }, + size = "300 500", +}) + +hl.window_rule({ + name = "windowrule-5", + match = { + title = "Steam", + }, + center = true, + size = "1600 900", +}) + +hl.window_rule({ + name = "windowrule-6", + match = { + class = "steam", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-7", + match = { + class = "heroic", + }, + center = true, + float = true, + size = "1600 900", +}) + +hl.window_rule({ + name = "windowrule-9", + match = { + class = "discord", + }, + center = true, + float = true, + size = "1600 900", +}) + +hl.window_rule({ + name = "windowrule-10", + match = { + class = "nmnet", + }, + float = true, + size = "856 656", +}) + +hl.window_rule({ + name = "windowrule-11", + match = { + class = "com.nextcloud.desktopclient.nextcloud", + }, + float = true, + move = "(1450) (34)", +}) + +hl.window_rule({ + name = "windowrule-12", + match = { + class = "openrgb", + }, + float = true, + size = "1600 900", + center = true, +}) + +hl.window_rule({ + name = "windowrule-13", + match = { + class = "org.pulseaudio.pavucontrol", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-14", + match = { + title = "Save File*", + }, + float = true, + size = "1000 600", +}) + +hl.window_rule({ + name = "windowrule-15", + match = { + title = "Open Files", + }, + float = true, + size = "1000 600", +}) + +hl.window_rule({ + name = "windowrule-16", + match = { + title = "Signal", + }, + center = true, +}) + +hl.window_rule({ + name = "windowrule-17", + match = { + class = "org.keepassxc.KeePassXC", + }, + monitor = "DP-1", + workspace = "special:password silent", +}) + +hl.window_rule({ + name = "windowrule-18", + match = { + class = "mpv", + }, + float = true, + monitor = "DP-1", + size = "600 400", + move = "(1310) (670)", +}) + +hl.window_rule({ + name = "windowrule-19", + match = { + class = "org.kde.polkit-kde-authentication-agent-1", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-20", + match = { + class = "alacarte", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-21", + match = { + class = "piper", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-22", + match = { + class = "nwg-look", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-23", + match = { + class = "zenity", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-24", + match = { + class = "galculator", + }, + float = true, + move = "(1592) (740)", +}) + +hl.window_rule({ + name = "windowrule-25", + match = { + class = "org.rncbc.qsynth", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-26", + match = { + class = "qt5ct", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-27", + match = { + class = "kvantummanager", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-28", + match = { + class = "nm-connection-editor", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-29", + match = { + class = "udiskie", + }, + float = true, + size = "334 212", + center = true, +}) + +hl.window_rule({ + name = "windowrule-30", + match = { + class = "gsimplecal", + }, + float = true, + move = "(834) (43)", +}) + +hl.window_rule({ + name = "windowrule-31", + match = { + class = "imv", + }, + float = true, + center = true, +}) + +hl.window_rule({ + name = "windowrule-32", + match = { + class = "org.pwmt.zathura", + }, + float = true, + center = true, +}) + +hl.window_rule({ + name = "windowrule-33", + match = { + fullscreen = 1, + }, + idle_inhibit = "fullscreen", +}) + +hl.window_rule({ + name = "windowrule-34", + match = { + class = "xdg-desktop-portal-gtk", + }, + float = true, +}) + +hl.window_rule({ + name = "windowrule-35", + match = { + class = "blueman-manager", + }, + float = true, + center = true, + move = "(1310) (40)", + size = "600 900", +}) + +local mainMod = "SUPER" + +hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal)) +hl.bind(mainMod .. " + Q", hl.dsp.window.close()) +hl.bind(mainMod .. " + E", hl.dsp.exit()) +hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + P", hl.dsp.exec_cmd(menu)) +hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" })) +hl.bind(mainMod .. " + C", hl.dsp.exec_cmd("galculator")) +hl.bind(mainMod .. " + CTRL + T", hl.dsp.exec_cmd("steam")) +hl.bind(mainMod .. " + R", hl.dsp.exec_cmd("retroarch --appendconfig /home/peter/.config/retroarch/config/retroarch.cfg")) +hl.bind(mainMod .. " + CTRL + Y", hl.dsp.exec_cmd("heroic")) +hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("dunstctl context")) +hl.bind(mainMod .. " + CTRL + P", hl.dsp.exec_cmd("[workspace special:password silent] keepassxc")) + +hl.bind("ALT + R", hl.dsp.submap("resize")) + +hl.define_submap("resize", function() + + hl.bind("right", hl.dsp.window.resize({ x = 10, y = 0, relative = true }), { repeating = true }) + hl.bind("left", hl.dsp.window.resize({ x = -10, y = 0, relative = true }), { repeating = true }) + hl.bind("up", hl.dsp.window.resize({ x = 0, y = -10, relative = true }), { repeating = true }) + hl.bind("down", hl.dsp.window.resize({ x = 0, y = 10, relative = true }), { repeating = true }) + hl.bind("l", hl.dsp.window.resize({ x = 10, y = 0, relative = true }), { repeating = true }) + hl.bind("h", hl.dsp.window.resize({ x = -10, y = 0, relative = true }), { repeating = true }) + hl.bind("k", hl.dsp.window.resize({ x = 0, y = -10, relative = true }), { repeating = true }) + hl.bind("j", hl.dsp.window.resize({ x = 0, y = 10, relative = true }), { repeating = true }) + + hl.bind("escape", hl.dsp.submap("reset")) +end) + +hl.bind("ALT + TAB", hl.dsp.window.cycle_next({ next = true, floating = true })) +hl.bind("ALT + SPACE", hl.dsp.focus({ last = true })) + +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh play_pause")) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh play_pause")) +hl.bind("XF86AudioStop", hl.dsp.exec_cmd("playerctl stop")) +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh next_track")) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh prev_track")) +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh volume_up")) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh volume_down")) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh volume_mute")) + +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh brightness_up")) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("~/.bin/sh/dunstaudio.sh brightness_down")) + +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 .. " + CTRL + left", hl.dsp.window.move({ direction = "l" })) +hl.bind(mainMod .. " + CTRL + right", hl.dsp.window.move({ direction = "r" })) +hl.bind(mainMod .. " + CTRL + up", hl.dsp.window.move({ direction = "u" })) +hl.bind(mainMod .. " + CTRL + down", hl.dsp.window.move({ direction = "d" })) + +hl.bind(mainMod .. " + h", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + l", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + k", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + j", hl.dsp.focus({ direction = "down" })) + +hl.bind(mainMod .. " + CTRL + h", hl.dsp.window.move({ direction = "l" })) +hl.bind(mainMod .. " + CTRL + l", hl.dsp.window.move({ direction = "r" })) +hl.bind(mainMod .. " + CTRL + k", hl.dsp.window.move({ direction = "u" })) +hl.bind(mainMod .. " + CTRL + j", hl.dsp.window.move({ direction = "d" })) + +hl.bind(mainMod .. " + 1", hl.dsp.focus({ workspace = 1 })) +hl.bind(mainMod .. " + 2", hl.dsp.focus({ workspace = 2 })) +hl.bind(mainMod .. " + 3", hl.dsp.focus({ workspace = 3 })) +hl.bind(mainMod .. " + 4", hl.dsp.focus({ workspace = 4 })) +hl.bind(mainMod .. " + 5", hl.dsp.focus({ workspace = 5 })) +hl.bind(mainMod .. " + 6", hl.dsp.focus({ workspace = 6 })) +hl.bind(mainMod .. " + 7", hl.dsp.focus({ workspace = 7 })) +hl.bind(mainMod .. " + 8", hl.dsp.focus({ workspace = 8 })) +hl.bind(mainMod .. " + 9", hl.dsp.focus({ workspace = 9 })) +hl.bind(mainMod .. " + 0", hl.dsp.focus({ workspace = 10 })) +hl.bind(mainMod .. " + minus", hl.dsp.focus({ workspace = 11 })) +hl.bind(mainMod .. " + equal", hl.dsp.focus({ workspace = 12 })) + +hl.bind(mainMod .. " + CTRL + 1", hl.dsp.window.move({ workspace = 1 })) +hl.bind(mainMod .. " + CTRL + 2", hl.dsp.window.move({ workspace = 2 })) +hl.bind(mainMod .. " + CTRL + 3", hl.dsp.window.move({ workspace = 3 })) +hl.bind(mainMod .. " + CTRL + 4", hl.dsp.window.move({ workspace = 4 })) +hl.bind(mainMod .. " + CTRL + 5", hl.dsp.window.move({ workspace = 5 })) +hl.bind(mainMod .. " + CTRL + 6", hl.dsp.window.move({ workspace = 6 })) +hl.bind(mainMod .. " + CTRL + 7", hl.dsp.window.move({ workspace = 7 })) +hl.bind(mainMod .. " + CTRL + 8", hl.dsp.window.move({ workspace = 8 })) +hl.bind(mainMod .. " + CTRL + 9", hl.dsp.window.move({ workspace = 9 })) +hl.bind(mainMod .. " + CTRL + 0", hl.dsp.window.move({ workspace = 10 })) +hl.bind(mainMod .. " + CTRL + minus", hl.dsp.window.move({ workspace = 11 })) +hl.bind(mainMod .. " + CTRL + equal", hl.dsp.window.move({ workspace = 12 })) + +hl.workspace_rule({ + workspace = "1", + monitor = "DP-1", + default = true, +}) + +hl.workspace_rule({ + workspace = "2", + monitor = "DP-1", +}) + +hl.workspace_rule({ + workspace = "3", + monitor = "DP-1", +}) + +hl.workspace_rule({ + workspace = "4", + monitor = "DP-1", +}) + +hl.workspace_rule({ + workspace = "5", + monitor = "DP-2", +}) + +hl.workspace_rule({ + workspace = "6", + monitor = "DP-2", + default = true, +}) + +hl.workspace_rule({ + workspace = "7", + monitor = "DP-2", +}) + +hl.workspace_rule({ + workspace = "8", + monitor = "DP-2", +}) + +hl.workspace_rule({ + workspace = "9", + monitor = "DP-2", +}) + +hl.workspace_rule({ + workspace = "10", + monitor = "DP-2", +}) + +hl.workspace_rule({ + workspace = "11", + monitor = "DP-2", +}) + +hl.workspace_rule({ + workspace = "12", + monitor = "DP-2", +}) + +hl.bind(mainMod .. " + O", hl.dsp.workspace.toggle_special("password")) + +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +hl.bind(mainMod .. " + ALT + l", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + ALT + h", hl.dsp.focus({ workspace = "e-1" })) + +hl.bind(mainMod .. " + ALT + right", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + ALT + left", hl.dsp.focus({ workspace = "e-1" })) + +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag()) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize()) + +hl.bind("Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | swappy -f -")) + +hl.bind(mainMod .. " + SHIFT + n", hl.dsp.exec_cmd("killall dunst || exec dunst")) +hl.bind(mainMod .. " + SHIFT + w", hl.dsp.exec_cmd("killall waybar || exec waybar")) +hl.bind(mainMod .. " + SHIFT + h", hl.dsp.exec_cmd("killall hypridle || exec hypridle")) + +hl.window_rule({ + name = "windowrule-37", + match = { + xwayland = 1, + }, + border_color = "rgb(ff5555)", +}) + +hl.config({ + input = { + kb_layout = "us(altgr-intl)", + kb_variant = ",nodeadkeys", + kb_options = "caps:escape", + follow_mouse = 1, + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + }, + -- Executables + -- Variables + general = { + gaps_in = 5, + gaps_out = 10, + border_size = 2, + layout = "master", + allow_tearing = false, + col = { + active_border = { colors = { "rgb(6272A4)", "rgb(bd93f9)" }, angle = 90 }, + inactive_border = "rgba(44475aaa)", + nogroup_border = "rgba(282a36dd)", + nogroup_border_active = { colors = { "rgb(bd93f9)", "rgb(44475a)" }, angle = 90 }, + }, + }, + decoration = { + rounding = 8, + blur = { + enabled = true, + size = 3, + passes = 1, + new_optimizations = true, + noise = 0.06, + special = true, + contrast = 0.8, + popups = true, + }, + }, + -- Animations + animations = { + enabled = true, + }, + -- Layout + master = { + new_status = "slave", + }, + -- Cursor + cursor = { + hide_on_key_press = true, + no_hardware_cursors = true, + }, + -- Miscellaneous + misc = { + force_default_wallpaper = 0, -- Set to 0 to disable the anime mascot wallpapers + vrr = 2, + }, + -- Window rules + -- Keywords + -- Bindings + -- Resize windows main keybind + -- Start a submap resize + -- Set repeatable binds for resizing the active window + -- Use reset to go back to the global submap + -- Reset the submap + -- Switch between floating and tiled windows + -- Media keys + -- Brightness keys + -- Move focus with Mod + arrow keys + -- Move windows with Mod + arrow keys + -- VI keybindings like God intended + -- Move windows with Mod + vi keys + -- Switch workspaces with Mod + [0-9,-,=] + -- Move active window to a workspace with Mod + CTRL + [0-9,-,=] + -- Workspace monitor assignment + -- Special workspaces + -- Scroll through existing workspaces with Mod + scroll + -- Scroll through existing workspaces with Mod + vi keys + -- Scroll through existing workspaces with Mod + arrow keys + -- Move/resize windows with Mod + LMB/RMB and dragging + -- Screenshot + -- Environment management + -- Dracula theme + group = { + groupbar = { + col = { + active = { colors = { "rgb(bd93f9)", "rgb(44475a)" }, angle = 90 }, + inactive = "rgba(282a36dd)", + }, + }, + }, +}) + +hl.on("hyprland.start", function() + hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") + hl.exec_cmd("udiskie -t &") + hl.exec_cmd("/usr/lib/polkit-kde-authentication-agent-1") + hl.exec_cmd("sleep 1; blueman-applet") + hl.exec_cmd("hyprpaper") + hl.exec_cmd("sunsetr") + hl.exec_cmd("sleep 1; supersonic-desktop", { workspace = "5 silent" }) + hl.exec_cmd("dunst") + hl.exec_cmd("waybar") + hl.exec_cmd("hypridle") + hl.exec_cmd("hyprctl setcursor Dracula-cursors 24") + hl.exec_cmd("firefox", { workspace = "1 silent" }) + hl.exec_cmd("libreoffice --writer --norestore") + hl.exec_cmd("gimp") + hl.exec_cmd("virt-manager") + hl.exec_cmd("kitty --session ~/.config/kitty/session --listen-on=unix:@mykitty", { workspace = "9 silent" }) + hl.exec_cmd("sleep 1; kitty newsboat", { workspace = "10 silent" }) + hl.exec_cmd("kitty btop", { workspace = "7 silent" }) + hl.exec_cmd("sleep 1; kitty", { workspace = "6 silent" }) + hl.exec_cmd("sleep 2; kitty zsh -c \"source ~/.zshrc;nnn -deUxH\"", { workspace = "8 silent" }) + hl.exec_cmd("steam -silent") + hl.exec_cmd("sleep 1; heroic --ozone-platform=wayland") + hl.exec_cmd("keepassxc", { workspace = "special:password silent" }) + hl.exec_cmd("signal-desktop --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations", { workspace = "12 silent" }) + hl.exec_cmd("nextcloud") + hl.exec_cmd("killall nextcloud") + hl.exec_cmd("gammastep -m wayland -O 6500K -g 1.1.0") + hl.exec_cmd("sleep 1; tutanota-desktop --ozone-platform-hint=auto", { workspace = "11" }) + hl.exec_cmd("discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized") + hl.exec_cmd("jellyfin-mpv-shim") +end) + +