From 6a9ae98c26760ab49f0038e22ad832769b845ff2 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 19 Aug 2026 19:56:58 +0200 Subject: [PATCH] some fixes in hyprland --- .config/hypr/config/autostart.lua | 41 +++++++++ .config/hypr/config/colors.lua | 22 +++++ .config/hypr/config/environment.lua | 22 +++++ .config/hypr/config/input.lua | 16 ++++ .config/hypr/config/keybinds.lua | 114 +++++++++++++++++++++++++ .config/hypr/config/monitors.lua | 41 +++++++++ .config/hypr/config/swipes.lua | 1 + .config/hypr/config/variables.lua | 112 +++++++++++++++++++++++++ .config/hypr/config/windowrules.lua | 125 ++++++++++++++++++++++++++++ .config/hypr/config/workspaces.lua | 23 +++++ 10 files changed, 517 insertions(+) create mode 100644 .config/hypr/config/autostart.lua create mode 100644 .config/hypr/config/colors.lua create mode 100644 .config/hypr/config/environment.lua create mode 100644 .config/hypr/config/input.lua create mode 100644 .config/hypr/config/keybinds.lua create mode 100644 .config/hypr/config/monitors.lua create mode 100644 .config/hypr/config/swipes.lua create mode 100644 .config/hypr/config/variables.lua create mode 100644 .config/hypr/config/windowrules.lua create mode 100644 .config/hypr/config/workspaces.lua diff --git a/.config/hypr/config/autostart.lua b/.config/hypr/config/autostart.lua new file mode 100644 index 0000000..56b938c --- /dev/null +++ b/.config/hypr/config/autostart.lua @@ -0,0 +1,41 @@ +-- config/autostart.lua +-- Replaces exec-once lines. In Lua config use hl.exec_once(). + +local function once(cmd) + hl.exec_cmd(cmd) +end + +hl.on("hyprland.start", function() + hl.exec_cmd("systemctl --user start hyprland-session.target") + -- ── Bar (QuickShell, replaces waybar) ──────────────────────── + hl.exec_cmd("quickshell -c own") + hl.exec_cmd("awww-daemon") + -- ── System tray / applets ──────────────────────────────────── + hl.exec_cmd("blueman-applet") + once("fcitx5 -d") + once("mako") + once("nm-applet --indicator") + once("/usr/lib/polkit-kde-authentication-agent-1") + -- ── Wallpaper ───────────────────────────────────────────────── + once("waypaper --restore") + -- ── DBus / env plumbing ─────────────────────────────────────── + once("systemctl --user import-environment") + once("dbus-update-activation-environment --systemd") + -- ── Idle daemon ─────────────────────────────────────────────── + once(idlehandler) + -- ── Other tools ─────────────────────────────────────────────── + once("vicinae server") + once("/usr/bin/pypr --debug /tmp/pypr.log") +end) + +hl.on("config.reloaded", function() + hl.exec_cmd("killall quickshell ") + hl.exec_cmd("sleep 0.2; quickshell -c own") +end) + +hl.on("hyprland.shutdown", function() + os.execute("systemctl --user stop hyprland-session.target && sleep 0.1") + -- uses a blocking exec function and sleeps a bit to give things time to close + -- you might also want to kill troublesome/crashing non-systemd background services here: + -- os.execute("pkill wallpaperthing; systemctl --user stop hyprland-session.target && sleep 0.1") +end) diff --git a/.config/hypr/config/colors.lua b/.config/hypr/config/colors.lua new file mode 100644 index 0000000..a76fd48 --- /dev/null +++ b/.config/hypr/config/colors.lua @@ -0,0 +1,22 @@ +-- config/colors.lua +-- Centralised palette +-- Use these Lua globals throughout every other module. +background = "rgb(090A0D)" +foreground = "rgb(B1B2B5)" +color0 = "rgb(484338)" +color1 = "rgb(5C564B)" +color2 = "rgb(54708A)" +color3 = "rgb(8B7C56)" +color4 = "rgb(537FBA)" +color5 = "rgb(E3D096)" +color6 = "rgb(6886F3)" +color7 = "rgb(86898D)" +color8 = "rgb(5E6063)" +color9 = "rgb(5C564B)" +color10 = "rgb(54708A)" +color11 = "rgb(8B7C56)" +color12 = "rgb(537FBA)" +color13 = "rgb(E3D096)" +color14 = "rgb(6886F3)" +color15 = "rgb(86898D)" +wallpaper = "/usr/share/wallpapers/downloaded/pexels-philippedonn-1114690.jpg" diff --git a/.config/hypr/config/environment.lua b/.config/hypr/config/environment.lua new file mode 100644 index 0000000..6df8c73 --- /dev/null +++ b/.config/hypr/config/environment.lua @@ -0,0 +1,22 @@ +-- config/environment.lua +-- Wayland / cursor env vars (mirrors environment.conf) +-- NOTE: In 0.55 Lua config these are set via hl.config({ env = ... }) +-- or directly sourced into the Lua environment before hl.exec_once. + +hl.config({ + env = { + HYPRCURSOR_THEME = "vimix-kanagawa-hyprcursors-lotus", + HYPRCURSOR_SIZE = "34", + XCURSOR_THEME = "vimix-kanagawa-hyprcursors-lotus", + XCURSOR_SIZE = "34", + QT_CURSOR_SIZE = "34", + ELECTRON_OZONE_PLATFORM_HINT = "wayland", + QT_QPA_PLATFORM = "wayland", + SDL_VIDEODRIVER = "wayland", + CLUTTER_BACKEND = "wayland", + XDG_SESSION_TYPE = "wayland", + MOZ_ENABLE_WAYLAND = "1", + NIXOS_OZONE_WL = "1", + WLR_DRM_NO_DIRECT_SCANOUT = "1", + }, +}) diff --git a/.config/hypr/config/input.lua b/.config/hypr/config/input.lua new file mode 100644 index 0000000..a4aeb10 --- /dev/null +++ b/.config/hypr/config/input.lua @@ -0,0 +1,16 @@ +-- config/input.lua + +hl.config({ + input = { + kb_layout = "de", + follow_mouse = 2, + float_switch_override_focus = 2, + numlock_by_default = true, + }, +}) + +-- Per-device config for the G502 +hl.device({ + name = "logitech-gaming-mouse-g502", + sensitivity = 0.9, +}) diff --git a/.config/hypr/config/keybinds.lua b/.config/hypr/config/keybinds.lua new file mode 100644 index 0000000..ca180e5 --- /dev/null +++ b/.config/hypr/config/keybinds.lua @@ -0,0 +1,114 @@ +-- config/keybinds.lua +-- All keybinds, translated from keybinds.conf to the 0.55 Lua API. +-- Modifier shorthand used: "SUPER" = $mainMod. + +local S = "SUPER" + +-- ── Applications ───────────────────────────────────────────── +hl.bind(S .. " + RETURN", hl.dsp.exec_cmd(terminal)) +hl.bind(S .. " + E", hl.dsp.exec_cmd(filemanager)) +hl.bind(S .. " + Q", hl.dsp.window.close()) +hl.bind(S .. " + SHIFT + M", hl.dsp.exec_cmd('loginctl terminate-user ""')) +hl.bind(S .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(S .. " + SPACE", hl.dsp.exec_cmd(applauncher)) +hl.bind(S .. " + F", hl.dsp.window.fullscreen()) +hl.bind(S .. " + Y", hl.dsp.window.pin()) +hl.bind(S .. " + J", hl.dsp.layout("togglesplit")) -- dwindle only + +-- ── Groups ─────────────────────────────────────────────────── +hl.bind(S .. " + K", hl.dsp.group.toggle()) +hl.bind(S .. " + Tab", hl.dsp.group.next( window )) + +-- ── Volume ─────────────────────────────────────────────────── +local vol = "~/.config/hypr/scripts/volume-helper.sh" +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd(vol .. " up"), { repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd(vol .. " down"), { repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd(vol .. " toggle"), { repeating = true }) + +-- ── Playback ───────────────────────────────────────────────── +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause")) +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next")) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous")) + +-- ── Brightness ─────────────────────────────────────────────── +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s +5%"), { repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 5%-"), { repeating = true }) + +-- ── Utilities ──────────────────────────────────────────────── +hl.bind(S .. " + SHIFT + P", hl.dsp.exec_cmd("gnome-calculator")) +hl.bind(S .. " + L", hl.dsp.exec_cmd("~/.config/swaylock/lockscript.sh")) +hl.bind(S .. " + P", hl.dsp.exec_cmd("hyprpicker -a")) +hl.bind(S .. " + C", hl.dsp.exec_cmd("vicinae vicinae://extensions/vicinae/clipboard/history")) + +-- ── Screenshots ────────────────────────────────────────────── +hl.bind(S .. " + PRINT", hl.dsp.exec_cmd("hyprshot -m window")) +hl.bind("PRINT", hl.dsp.exec_cmd("hyprshot -m output")) +hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("hyprshot -m region")) +hl.bind(S .. " + S", hl.dsp.exec_cmd('~/.config/hypr/scripts/record-or-screenshot.sh -d "' .. dmenu .. '"')) + +-- ── Window focus ───────────────────────────────────────────── +hl.bind(S .. " + left", hl.dsp.focus({ direction = "l" })) +hl.bind(S .. " + right", hl.dsp.focus({ direction = "r" })) +hl.bind(S .. " + up", hl.dsp.focus({ direction = "u" })) +hl.bind(S .. " + down", hl.dsp.focus({ direction = "d" })) + +-- ── Window move ────────────────────────────────────────────── +hl.bind(S .. " + SHIFT + left", hl.dsp.window.move({ direction = "l" })) +hl.bind(S .. " + SHIFT + right", hl.dsp.window.move({ direction = "r" })) +hl.bind(S .. " + SHIFT + up", hl.dsp.window.move({ direction = "u" })) +hl.bind(S .. " + SHIFT + down", hl.dsp.window.move({ direction = "d" })) + +-- Mouse drag / resize +hl.bind(S .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(S .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- ── Workspace Move ─────────────────────────────────────────── +hl.bind(S .. " + SHIFT + TAB", hl.dsp.workspace.move({ monitor = "+1" })) + +-- ── Resize submap ──────────────────────────────────────────── +hl.bind(S .. " + SHIFT + R", hl.dsp.submap("resize")) +hl.define_submap("resize", function() + -- Set repeating binds for resizing the active window. + 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 }) + + -- Use `reset` to go back to the global submap + hl.bind("escape", hl.dsp.submap("reset")) +end) + +-- ── Workspace switching ─────────────────────────────────────── +for i = 1, 10 do + local key = tostring(i % 10) + local ws = tostring(i) + hl.bind(S .. " + " .. key, hl.dsp.focus({ workspace = ws })) + hl.bind(S .. " + CTRL + " .. key, hl.dsp.window.move({ workspace = ws, follow = true })) +end + +hl.bind(S .. " + PERIOD", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(S .. " + COMMA", hl.dsp.focus({ workspace = "e-1" })) +hl.bind(S .. " + ALT_L + right", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(S .. " + ALT_L + left", hl.dsp.focus({ workspace = "e-1" })) +hl.bind(S .. " + CTRL + right", hl.dsp.window.move({ workspace = "+1", follow = true })) +hl.bind(S .. " + CTRL + left", hl.dsp.window.move({ workspace = "-1", follow = true })) +hl.bind(S .. " + slash", hl.dsp.focus({ workspace = "previous" })) +hl.bind(S .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { mouse = true }) +hl.bind(S .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { mouse = true }) + +-- Special / scratchpad +hl.bind(S .. " + minus", hl.dsp.window.move({ workspace = "special" })) +hl.bind(S .. " + equal", hl.dsp.workspace.toggle_special()) +hl.bind(S .. " + F1", hl.dsp.workspace.toggle_special({ name = "scratchpad" })) +hl.bind(S .. " + SHIFT + ALT_L + F1", hl.dsp.window.move({ workspace = "special:scratchpad", follow = false })) + +-- Quickshell overview +-- hl.bind(S .. " + TAB", hl.dsp.exec_cmd("qs ipc -c overview call overview toggle")) + +-- ── Monitors ───────────────────────────────────────────────── +-- hl.bind(S .. " + F8", function() monitors.solo() end) +-- hl.bind(S .. " + F9", function() monitors.dual() end) +-- hl.bind(S .. " + F10", function() monitors.triple() end) + +-- QuickShell +hl.bind(S .. " + W", hl.dsp.exec_cmd("echo 1 > /tmp/qs-wallpaper-ipc")) diff --git a/.config/hypr/config/monitors.lua b/.config/hypr/config/monitors.lua new file mode 100644 index 0000000..4a3794d --- /dev/null +++ b/.config/hypr/config/monitors.lua @@ -0,0 +1,41 @@ +-- config/monitors.lua +-- +-- Monitor layout switching via shell script (wlr-randr). +-- hl.monitor({ disabled=false }) cannot re-enable monitors at runtime, +-- so all switching is delegated to monitor-toggle.sh. + +--[[ local layouts = {} +local script = os.getenv("HOME") .. "/.config/hypr/scripts/monitor-toggle.sh" + +function layouts.solo() hl.exec_cmd(script .. " laptop") end +function layouts.dual() hl.exec_cmd(script .. " dual") end +function layouts.triple() hl.exec_cmd(script .. " triple") end + +-- Apply default at startup +layouts.dual() + +-- Expose for keybinds.lua +return layouts + ]] + +hl.monitor({ + output = "eDP-2", + mode = "1920x1080@144", + position = "0x0", + scale = 1, +}) + +hl.monitor({ + output = "HDMI-A-1", + mode = "1920x1080@60", + position = "auto-left", + scale = 1, +}) + +-- hl.monitor({ +-- output = "DP-2", +-- mode = "1920x1080@60", +-- position = "auto-right", +-- scale = 1.2, +-- transform = 1 +--}) diff --git a/.config/hypr/config/swipes.lua b/.config/hypr/config/swipes.lua new file mode 100644 index 0000000..3bd431c --- /dev/null +++ b/.config/hypr/config/swipes.lua @@ -0,0 +1 @@ +hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) diff --git a/.config/hypr/config/variables.lua b/.config/hypr/config/variables.lua new file mode 100644 index 0000000..3c34d27 --- /dev/null +++ b/.config/hypr/config/variables.lua @@ -0,0 +1,112 @@ +-- config/variables.lua +-- Mirrors: variables.conf + decorations.conf + animations.conf + +-- ── Application shortcuts ───────────────────────────────────── +terminal = "kitty" +filemanager = "nemo" +applauncher = "vicinae toggle" +dmenu = "vicinae dmenu --placeholder" +idlehandler = "hypridle" -- switched to hypridle; adjust if needed + +-- ── General ─────────────────────────────────────────────────── +hl.config({ + general = { + gaps_in = 2, + gaps_out = 1, + border_size = 1, + ["col.active_border"] = color4, + ["col.inactive_border"] = color2, + layout = "dwindle", + resize_on_border = true, + extend_border_grab_area = 10, + snap = { enabled = true }, + }, + + group = { + ["col.border_active"] = color6, + ["col.border_inactive"] = color2, + ["col.border_locked_active"] = color3, + ["col.border_locked_inactive"] = color0, + groupbar = { + font_size = 13, + height = 1, + indicator_height = 16, + rounding = 2, + font_family = "Roboto Sans", + text_color = foreground, + text_offset = -8, + font_weight_active = "ultraheavy", + font_weight_inactive = "semibold", + ["col.active"] = color6, + ["col.inactive"] = color2, + ["col.locked_active"] = color3, + ["col.locked_inactive"] = color0, + }, + }, + + -- ── Decorations ─────────────────────────────────────────── + decoration = { + active_opacity = 1.0, + inactive_opacity = 0.7, + rounding = 5, + dim_inactive = true, + dim_strength = 0.1, + blur = { + size = 30, + passes = 2, + xray = true, + noise = 0.01, + }, + shadow = { + enabled = true, + range = 10, + }, + }, + -- ── Misc ────────────────────────────────────────────────── + misc = { + font_family = "Roboto Sans", + splash_font_family = "Roboto Sans", + disable_hyprland_logo = true, + ["col.splash"] = color2, + background_color = background, + enable_swallow = false, + swallow_regex = "^(cachy-browser|firefox|nautilus|nemo|thunar|btrfs-assistant.)$", + focus_on_activate = true, + vrr = 0, + session_lock_xray = true, + middle_click_paste = false, + }, + + render = { + direct_scanout = false, + }, + + dwindle = { + special_scale_factor = 0.8, + preserve_split = true, + }, + + master = { + new_status = "master", + special_scale_factor = 0.8, + }, + + cursor = { + no_hardware_cursors = true, + }, + + binds = { + allow_workspace_cycles = true, + workspace_back_and_forth = true, + workspace_center_on = 1, + movefocus_cycles_fullscreen = true, + window_direction_monitor_fallback = true, + }, +}) + +hl.curve("smooth", { type = "bezier", points = { { 0, 0.05 }, { 0.44, 0.99 } } }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 3, bezier = "smooth", style = "slidefade" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 3, bezier = "smooth", style = "slidefade" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 3, bezier = "default", style = "slidefade" }) +hl.animation({ leaf = "windowsMove", enabled = true, speed = 3, bezier = "default", style = "slidefade" }) +hl.animation({ leaf = "border", enabled = true, speed = 5, bezier = "default" }) diff --git a/.config/hypr/config/windowrules.lua b/.config/hypr/config/windowrules.lua new file mode 100644 index 0000000..74fb923 --- /dev/null +++ b/.config/hypr/config/windowrules.lua @@ -0,0 +1,125 @@ +-- config/windowrules.lua +-- Translated from config_windowrules.conf to hl.window_rule() / hl.layer_rule(). + +-- ── Float rules ─────────────────────────────────────────────── +local float_classes = { + "org.pulseaudio.pavucontrol", + "blueman-manager", + "zenity", + "pomodorolm", + "CachyOSHello", + "Rofi", + "Picture in picture", + "Save File", + "Open File", + "Steam - Self Updater", + "^Extension:.*", +} + +for _, cls in ipairs(float_classes) do + hl.window_rule({ match = { class = cls }, float = true }) +end + +hl.window_rule({ match = { class = "LibreWolf", title = "Picture-in-Picture" }, float = true }) +hl.window_rule({ + match = { class = "^(xdg-desktop-portal-gtk|xdg-desktop-portal-kde|xdg-desktop-portal-hyprland).*" }, + float = true, +}) +hl.window_rule({ + match = { + class = "^(polkit-gnome-authentication-agent-1|hyprpolkitagent|org.kde.polkit-kde-authentication-agent-1).*", + }, + float = true, +}) +hl.window_rule({ match = { class = "Zotero", title = "Progress" }, float = true }) +hl.window_rule({ match = { class = "Zotero", title = "Zotero Settings" }, float = true }) +hl.window_rule({ match = { class = "Zotero", title = "Citation Dialog" }, float = true, center = true, no_anim = true }) +hl.window_rule({ match = { class = "waypaper" }, float = true, center = true }) +hl.window_rule({ match = { title = "calcure" }, float = true, center = true }) +hl.window_rule({ match = { class = "org.gnome.Calculator" }, float = true, center = true }) +hl.window_rule({ + match = { class = "org.gnome.Calendar", title = "Calendar" }, + float = true, + center = true, + animation = "popin", + opacity = "0.8", +}) +hl.window_rule({ match = { class = "steam", title = "Freundesliste" }, float = true, size = { 400, 600 } }) + +-- ── PiP ────────────────────────────────────────────────────── +hl.window_rule({ + match = { title = "Picture-in-Picture" }, + float = true, + size = { 960, 540 }, + move = { "(monitor_w*0.25)", "0" }, +}) + +-- ── Media / misc float + position ──────────────────────────── +hl.window_rule({ + match = { title = "^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp|nwg-look|nwg-displays)$" }, + float = true, +}) +hl.window_rule({ + match = { title = "^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$" }, + move = { "(monitor_w*0.25)", "0" }, + size = { 960, 540 }, +}) +hl.window_rule({ match = { title = "danmufloat" }, pin = true }) +hl.window_rule({ match = { title = "^(danmufloat|termfloat)$" }, rounding = 5 }) + +-- ── Opacity ─────────────────────────────────────────────────── +hl.window_rule({ match = { class = "^(thunar|nemo|dolphin)$" }, opacity = "0.92" }) +hl.window_rule({ match = { class = "^(discord|armcord|webcord)$" }, opacity = "0.96" }) +hl.window_rule({ match = { title = "^(QQ|Telegram)$" }, opacity = "0.95" }) +hl.window_rule({ match = { title = "NetEase Cloud Music Gtk4" }, opacity = "0.95" }) +hl.window_rule({ match = { class = "kitty" }, opacity = "1.0" }) +hl.window_rule({ match = { class = "^(libreoffice.*)$" }, opacity = "1.0 override 1.0 override 1.0" }) +hl.window_rule({ match = { title = "^(.+nvim$)" }, opacity = "0.9" }) +hl.window_rule({ match = { class = "^code$" }, opacity = "0.93" }) + +-- ── Blur / dim exceptions ───────────────────────────────────── +hl.window_rule({ match = { class = "org.mozilla.firefox" }, no_blur = true }) +hl.window_rule({ match = { class = "zen" }, no_dim = true }) + +-- ── Animations ─────────────────────────────────────────────── +hl.window_rule({ match = { class = "^(kitty|Alacritty)$" }, animation = "slide right" }) + +-- ── Floating decoration overrides ──────────────────────────── +hl.window_rule({ + match = { float = true, workspace = "w[fv1-10]" }, + border_size = 2, + border_color = color4, + rounding = 8, +}) +hl.window_rule({ + match = { float = false, workspace = "f[1-10]" }, + border_size = 3, + rounding = 4, +}) + +-- ── Pomodorolm size ────────────────────────────────────────── +hl.window_rule({ match = { class = "pomodorolm" }, size = { 260, 340 } }) + +-- ── Layer rules ─────────────────────────────────────────────── +hl.layer_rule({ match = { namespace = "logout_dialog" }, animation = "slide top" }) +-- QuickShell bar (replaces waybar layer rule) +hl.layer_rule({ match = { namespace = "quickshell" }, animation = "slide down" }) +hl.layer_rule({ match = { namespace = "wallpaper" }, animation = "fade 50%" }) +-- vicinae +hl.layer_rule({ + match = { namespace = "vicinae" }, + blur = true, + animation = "popin", + dim_around = true, + ignore_alpha = 1, +}) +-- screenshare fix +hl.window_rule({ + match = { class = "^(xwaylandvideobridge)$" }, + opacity = "0.0 override 0.0", + no_anim = true, + no_initial_focus = true, + no_focus = true, + no_blur = true, + max_size = { 1, 1 }, +}) diff --git a/.config/hypr/config/workspaces.lua b/.config/hypr/config/workspaces.lua new file mode 100644 index 0000000..58292c1 --- /dev/null +++ b/.config/hypr/config/workspaces.lua @@ -0,0 +1,23 @@ +-- config/windowrules.lua +--hl.workspace_rule({ workspace = "r[0-6]", monitor = "eDP-2" }) +--hl.workspace_rule({ workspace = "r[7-8]", monitor = "HDMI-A-1" }) +--hl.workspace_rule({ workspace = "9", layout = "scrolling", monitor = "DP-2" }) + +for i = 7, 9 do + hl.workspace_rule({ workspace = tostring(i), monitor = "eDP-2", default = true }) +end +for i = 0, 6 do + hl.workspace_rule({ workspace = tostring(i), monitor = "HDMI-A-1", default = true }) +end + +-- Workspace 9: Scolling layout +hl.workspace_rule({ + workspace = "9", + monitor = "DP-2", + layout = "scrolling", + default = true, + layout_opts = { + direction = "down", + column_width = 0.7, + }, +})