From 16d2ca17b194a23006e3529e69d48e07bccc50da Mon Sep 17 00:00:00 2001 From: venus Date: Sun, 31 May 2026 02:47:45 -0500 Subject: [PATCH] added window rules consolidated variables and gt vicinae launcher --- basic/inputs.conf | 33 ------- basic/keybinds.lua | 26 ++++-- basic/looks.conf | 106 --------------------- basic/plugins.conf | 133 --------------------------- basic/{permissions.lua => vars.lua} | 26 ++++++ basic/windows.conf | 106 --------------------- basic/windows.lua | 93 +++++++++++++++++++ hyprland.lua | 42 ++++----- basic/workspaces.conf => plugins.lua | 0 9 files changed, 155 insertions(+), 410 deletions(-) delete mode 100644 basic/inputs.conf delete mode 100644 basic/looks.conf delete mode 100644 basic/plugins.conf rename basic/{permissions.lua => vars.lua} (55%) delete mode 100644 basic/windows.conf create mode 100644 basic/windows.lua rename basic/workspaces.conf => plugins.lua (100%) diff --git a/basic/inputs.conf b/basic/inputs.conf deleted file mode 100644 index 15da435..0000000 --- a/basic/inputs.conf +++ /dev/null @@ -1,33 +0,0 @@ -############# -### INPUT ### -############# - -# https://wiki.hypr.land/Configuring/Variables/#input -input { - kb_layout = us - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = true - } -} - cursor_inactive_timeout = 0.1 -# See https://wiki.hypr.land/Configuring/Gestures -gesture = 3, horizontal, workspace -# gesture = 3, vertical, hyprexpo:expo, toggle - - -# Example per-device config -# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more -device { - name = epic-mouse-v1 - sensitivity = -0.5 -} - diff --git a/basic/keybinds.lua b/basic/keybinds.lua index 0a39ff5..55a5c60 100644 --- a/basic/keybinds.lua +++ b/basic/keybinds.lua @@ -88,13 +88,20 @@ hl.bind(mainMod .. " + SHIFT + S ", hl.dsp.window.move({ workspace = "special:m hl.bind(mainMod .. " + SHIFT + B ", hl.dsp.window.move({ workspace = "special:book" })) -- TODO Rework this with lua -hl.bind(mainMod .. " + D ", hl.dsp.exec_cmd("vesktop")) -hl.bind(mainMod .. " + E ", hl.dsp.exec_cmd(email)) -hl.bind(mainMod .. " + G ", hl.dsp.exec_cmd("steam -forcedesktopscaling 0.5")) -hl.bind(mainMod .. " + D ", hl.dsp.workspace.toggle_special("discord ")) -hl.bind(mainMod .. " + E ", hl.dsp.workspace.toggle_special("email ")) -hl.bind(mainMod .. " + G ", hl.dsp.workspace.toggle_special("gaming ")) -hl.bind(mainMod .. " + N ", hl.dsp.workspace.toggle_special("notes ")) +hl.bind(mainMod .. " + D " ,hl.dsp.workspace.toggle_special("discord ")) +hl.bind(mainMod .. " + E " ,function () + hl.dispatch(hl.dsp.workspace.toggle_special("email")) + hl.exec_cmd(email) +end) +hl.bind(mainMod .. " + G " ,function () + hl.dispatch(hl.dsp.workspace.toggle_special("gaming")) + hl.exec_cmd("steam -forcedesktopscaling 0.5") +end) +hl.bind(mainMod .. " + N " ,function () + hl.dispatch(hl.dsp.workspace.toggle_special("notes")) + -- TODO dont run if obsidian alr running + -- hl.exec_cmd(notes) +end) -- 8. Move/resize windows with mainMod + LMB/RMB and dragging hl.bind(mainMod .. " + mouse:272 ", hl.dsp.window.drag(), {mouse = true}) @@ -118,7 +125,7 @@ hl.bind(mainMod .. " + SPACE " ,hl.dsp.exec_cmd("playerctl play-pause")) ---- 10. Application launching --- hl.bind(mainMod, hl.dsp.exec_cmd(menu)) +hl.bind(mainMod .. " + SUPER_L", hl.dsp.exec_cmd(launcher .. " toggle"), { release = true }) hl.bind(mainMod .. " + F " ,hl.dsp.exec_cmd(browser)) hl.bind("ALT + C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper openPanel")) hl.bind("code:148" ,hl.dsp.exec_cmd("kitty --class calc-term -o 'confirm_os_window_close 0' /home/venus/.cargo/bin/mathypad ")) @@ -260,5 +267,8 @@ end) --hl.define_submap("reset ---- 13. Misc tools. +--- 14. Gestures +hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) +-- hl.gesture({ fingers = 2, direction = "pinch", action = "cursor_zoom", zoom_level = 2, mode = "mult"}) --hl.bind(ALT, SPACE, hl.dsp.exec_cmd( $menu) diff --git a/basic/looks.conf b/basic/looks.conf deleted file mode 100644 index 43eb12c..0000000 --- a/basic/looks.conf +++ /dev/null @@ -1,106 +0,0 @@ -##################### -### LOOK AND FEEL ### -##################### - -# Refer to https://wiki.hypr.land/Configuring/Variables/ - -# https://wiki.hypr.land/Configuring/Variables/#general -general { - gaps_in = 5 - gaps_out = 10 -} - -decoration { - rounding = 20 - rounding_power = 2 - - shadow { - enabled = true - range = 4 - render_power = 3 - color = rgba(1a1a1aee) - } - - blur { - enabled = true - size = 3 - passes = 2 - vibrancy = 0.1696 - } -} -# https://wiki.hypr.land/Configuring/Variables/#animations -animations { - enabled = yes, please :) - - # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves - # NAME, X0, Y0, X1, Y1 - bezier = easeOutQuint, 0.23, 1, 0.32, 1 - bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 - bezier = linear, 0, 0, 1, 1 - bezier = almostLinear, 0.5, 0.5, 0.75, 1 - bezier = quick, 0.15, 0, 0.1, 1 - - # Default animations, see https://wiki.hypr.land/Configuring/Animations/ - # NAME, ONOFF, SPEED, CURVE, [STYLE] - animation = global, 1, 10, default - animation = border, 1, 5.39, easeOutQuint - animation = windows, 1, 4.79, easeOutQuint - animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% - animation = windowsOut, 1, 1.49, linear, popin 87% - animation = fadeIn, 1, 1.73, almostLinear - animation = fadeOut, 1, 1.46, almostLinear - animation = fade, 1, 3.03, quick - animation = layers, 1, 3.81, easeOutQuint - animation = layersIn, 1, 4, easeOutQuint, fade - animation = layersOut, 1, 1.5, linear, fade - animation = fadeLayersIn, 1, 1.79, almostLinear - animation = fadeLayersOut, 1, 1.39, almostLinear - animation = workspaces, 1, 1.94, almostLinear, fade - animation = workspacesIn, 1, 1.21, almostLinear, fade - animation = workspacesOut, 1, 1.94, almostLinear, fade - animation = zoomFactor, 1, 7, quick -} - -# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ -# "Smart gaps" / "No gaps when only" -# uncomment all if you wish to use that. -# workspace = w[tv1], gapsout:0, gapsin:0 -# workspace = f[1], gapsout:0, gapsin:0 -# windowrule { -# name = no-gaps-wtv1 -# match:float = false -# match:workspace = w[tv1] -# -# border_size = 0 -# rounding = 0 -# } -# -# windowrule { -# name = no-gaps-f1 -# match:float = false -# match:workspace = f[1] -# -# border_size = 0 -# rounding = 0 -# } - -# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more -# dwindle { -# pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below -# preserve_split = true # You probably want this -# } - -# See https://wiki.hypr.land/Configuring/Master-Layout/ for more -master { - new_status = master -} - -# https://wiki.hypr.land/Configuring/Variables/#misc -misc { - force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( -} - - - - diff --git a/basic/plugins.conf b/basic/plugins.conf deleted file mode 100644 index acef366..0000000 --- a/basic/plugins.conf +++ /dev/null @@ -1,133 +0,0 @@ -##################### -### PLUGINS ### -##################### - -# .config/hypr/plugins.conf -plugin { - hyprexpo { - columns = 2 - gap_size = 5 - bg_col = rgb(111111) - workspace_method = first 1 # [center/first] [workspace] e.g. first 1 or center m+1 - # gesture_distance = 300 # how far is the "max" for the gesture - skip_empty = true - } - hy3 { - # disable gaps when only one window is onscreen - # 0 - always show gaps - # 1 - hide gaps with a single window onscreen - # 2 - 1 but also show the window border - no_gaps_when_only = 1 # default: 0 - - # policy controlling what happens when a node is removed from a group, - # leaving only a group - # 0 = remove the nested group - # 1 = keep the nested group - # 2 = keep the nested group only if its parent is a tab group - node_collapse_policy = 2 # default: 2 - - # offset from group split direction when only one window is in a group - # group_inset = > # default: 10 - - # if a tab group will automatically be created for the first window spawned in a workspace - tab_first_window = false - - # tab group settings - tabs { - # height of the tab bar - height = 22 # default: 22 - - # padding between the tab bar and its focused node - # padding = # default: 6 - - # the tab bar should animate in/out from the top instead of below the window - # from_top = # default: false - - # radius of tab bar corners - # radius = # default: 6 - - # tab bar border width - # border_width = # default: 2 - - # render the window title on the bar - # render_text = # default: true - - # center the window title - # text_center = # default: true - - # font to render the window title with - # text_font = # default: Sans - - # height of the window title - # text_height = # default: 8 - - # left padding of the window title - # text_padding = # default: 3 - - # active tab bar segment colors - # col.active = # default: rgba(33ccff40) - # col.active.border = # default: rgba(33ccffee) - # col.active.text = # default: rgba(ffffffff) - - # active tab bar segment colors for bars on an unfocused monitor - # col.active_alt_monitor = # default: rgba(60606040) - # col.active_alt_monitor.border = # default: rgba(808080ee) - # col.active_alt_monitor.text = # default: rgba(ffffffff) - - # # focused tab bar segment colors (focused node in unfocused container) - # col.focused = # default: rgba(60606040) - # col.focused.border = # default: rgba(808080ee) - # col.focused.text = # default: rgba(ffffffff) - - # # inactive tab bar segment colors - # col.inactive = # default: rgba(30303020) - # col.inactive.border = # default: rgba(606060aa) - # col.inactive.text = # default: rgba(ffffffff) - - # # urgent tab bar segment colors - # col.urgent = # default: rgba(ff223340) - # col.urgent.border = # default: rgba(ff2233ee) - # col.urgent.text = # default: rgba(ffffffff) - - # # urgent tab bar segment colors - # col.locked = # default: rgba(90903340) - # col.locked.border = # default: rgba(909033ee) - # col.locked.text = # default: rgba(ffffffff) - - # # if tab backgrounds should be blurred - # # Blur is only visible when the above colors are not opaque. - # blur = # default: true - - # opacity multiplier for tabs - # Applies to blur as well as the given colors. - # opacity = # default: 1.0 - } - - # autotiling settings - autotile { - # enable autotile - # enable = # default: false - - # make autotile-created groups ephemeral - # ephemeral_groups = # default: true - - # if a window would be squished smaller than this width, a vertical split will be created - # -1 = never automatically split vertically - # 0 = always automatically split vertically - # = pixel width to split at - # trigger_width = # default: 0 - - # if a window would be squished smaller than this height, a horizontal split will be created - # -1 = never automatically split horizontally - # 0 = always automatically split horizontally - # = pixel height to split at - # trigger_height = # default: 0 - - # a space or comma separated list of workspace ids where autotile should be enabled - # it's possible to create an exception rule by prefixing the definition with "not:" - # workspaces = 1,2 # autotiling will only be enabled on workspaces 1 and 2 - # workspaces = not:1,2 # autotiling will be enabled on all workspaces except 1 and 2 - # workspaces = # default: all - } - } -} diff --git a/basic/permissions.lua b/basic/vars.lua similarity index 55% rename from basic/permissions.lua rename to basic/vars.lua index 8978346..771f8fd 100644 --- a/basic/permissions.lua +++ b/basic/vars.lua @@ -1,3 +1,4 @@ + ------------------- --- PERMISSIONS --- ------------------- @@ -16,3 +17,28 @@ +----------------- +----- INPUT ----- +---------------- + +-- https://wiki.hypr.land/Configuring/Variables/#input +hl.config = { + input = { + kb_layout = "us", + -- kb_variant = + -- kb_model = + -- kb_options = + -- kb_rules = + follow_mouse = 1, + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + + touchpad = { + natural_scroll = true + }, + cursor = { + inactive_timeout = 0.1, + }, + }, +} + + diff --git a/basic/windows.conf b/basic/windows.conf deleted file mode 100644 index 432a6eb..0000000 --- a/basic/windows.conf +++ /dev/null @@ -1,106 +0,0 @@ -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hypr.land/Configuring/Window-Rules/ for more -# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules -windowrule{ - name = scrcpy - match:class = scrcpy - border_size = 5 - float = true - dim_around = true - move = 5 40 -} -windowrule{ - name = compiler-window - match:tag = compiler - border_color = rgba(ccaaffee) - # col.inactive_border = rgba(333333aa) - border_size = 2 - float = false -} - -# put vesktop in a special workspace -# windowrule{ -# name = discord -# match:class = vesktop -# workspace = special:discord -# } -# windowrule{ -# name = obsidian -# match:class = obsidian -# workspace = special:obsidian -# } -windowrule{ - name = gaming - match:class = steam - workspace = special:gaming -} - -# windowrule{ -# name = thunderbird -# match:class = org.mozilla.Thunderbird -# workspace = special:email -# } - -windowrule { - # Ignore maximize requests from all apps. You'll probably like this. - name = suppress-maximize-events - match:class = .* - suppress_event = maximize -} - -windowrule { - # Fix some dragging issues with XWayland - name = fix-xwayland-drags - match:class = ^$ - match:title = ^$ - match:xwayland = true - match:float = true - match:fullscreen = false - match:pin = false - no_focus = true -} - -xwayland { - force_zero_scaling = true -} - -# Hyprland-run windowrule -windowrule { - name = move-hyprland-run - - match:class = hyprland-run - - move = 20 monitor_h-120 - float = yes -} - -windowrule { - name = calc-term - match:class = calc-term - pseudo = yes - float = yes - center = true - opacity = 1 - # move = cursor_x-10 cursor_y-10 - size = monitor_w*.4 monitor_h*.4 - -} - -windowrule{ - name = btop - match:class = btop - float = yes - size = monitor_w*.9 monitor_h*.8 - dim_around = true - -} -windowrule{ - name = popup-term - match:class = popup-term - float = yes - size = monitor_w*.9 monitor_h*.8 - dim_around = true -} diff --git a/basic/windows.lua b/basic/windows.lua new file mode 100644 index 0000000..7c1d1fb --- /dev/null +++ b/basic/windows.lua @@ -0,0 +1,93 @@ +--############################# +--## WINDOWS AND WORKSPACES ### +--############################# + +-- See https://wiki.hypr.land/Configuring/Window-Rules/ for more +-- See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules +hl.window_rule({ + name = "scrcpy", + match = {class = "scrcpy"}, + border_size = 5, + float = true, + dim_around = true, + move = {5, 40}, +}) + +hl.window_rule({ + name = "compiler-window", + match = { tag = "compiler"}, + ["col.active_border"] = "0xccaaffee", + border_size = 2, + float = false, +}) + +hl.window_rule({ + name = "gaming", + match = { + class = "steam", + initialClass = "steam" + }, + workspace = "special:gaming" +}) + + +hl.window_rule( { + -- Ignore maximize requests from all apps. You'll probably like this. + name = "suppress-maximize-events", + match = {class = ".*"}, + suppress_event = "maximize", +}) + +hl.window_rule( { + -- Fix some dragging issues with XWayland + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false + }, + no_focus = true, +}) + +-- xwayland { +-- force_zero_scaling = true +-- }) + +-- Hyprland-run hl.window_rule( +hl.window_rule( { + name = "move-hyprland-run", + match = {class = "hyprland-run"}, + move = {20, "(monitor_h-120)"}, + float = true +}) + +hl.window_rule( { + name = "calc-term", + match = {class = "calc-term"}, + pseudo = true, + float = true, + center = true, + opacity = 1, + -- move = cursor_x-10 cursor_y-10 + size ={"(monitor_w*.4)", "(monitor_h*.4)"} + +}) + +hl.window_rule({ + name = "btop", + match = {class = "btop"}, + float = false, + dim_around = true, + size = {"(monitor_w*.9)" ,"(monitor_h*.8)"}, + +}) +hl.window_rule({ + name = "popup-term", + match = {class = "popup-term"}, + float = true + size = {"(monitor_w*.9)" ,"(monitor_h*.8)"}, + dim_around = true +}) diff --git a/hyprland.lua b/hyprland.lua index 0743695..861a2ef 100644 --- a/hyprland.lua +++ b/hyprland.lua @@ -2,26 +2,30 @@ --- STARTUP --- ---------------- -_G.terminal = "kitty" -_G.fileManager = "dolphin" -_G.menu = "qs -c noctalia-shell ipc call launcher toggle" -_G.browser = "firefox" -_G.menuBar = "qs -c noctalia-shell" -_G.shellWrapper = "qs -c noctalia-shell" -_G.blkmanager = "udiskie" -_G.email = "thunderbird" +_G.terminal = "kitty" +_G.fileManager = "dolphin" +_G.menu = "qs -c noctalia-shell ipc call launcher toggle" +_G.launcher = "vicinae " +_G.browser = "firefox" +_G.menuBar = "qs -c noctalia-shell" +_G.shellWrapper = "qs -c noctalia-shell" +_G.blkmanager = "udiskie" +_G.email = "thunderbird" +_G.notes = "obsidian" hl.on("hyprland.start", function() hl.exec_cmd(menuBar) hl.exec_cmd("systemctl") --user start hyprpolkitagent) hl.exec_cmd(blkmanager) + hl.exec_cmd(launcher .. "server") --no-window) TODO set up sddm to unlock keychain hl.exec_cmd("hyprpm reload -n") hl.exec_cmd("kdeconnectd") -- hl.exec_cmd("hyprshell run &") hl.exec_cmd("[workspace special:discord silent] vesktop -m") hl.exec_cmd("[workspace special:email silent]" .. email) - hl.exec_cmd("[workspace special:notes silent] obsidian") - hl.exec_cmd("protonmail-bridge") --no-window) + hl.exec_cmd("[workspace special:notes silent]" .. notes) + hl.exec_cmd("[workspace special:gaming silent] steam --forcedesktopscaling 0.5") + hl.exec_cmd("protonmail-bridge") --no-window) TODO set up sddm to unlock keychain end) hl.config({ @@ -40,17 +44,7 @@ local basic = base .. "/basic" require("basic/looks") require("basic/keybinds") ---require("basic/windows.lua") ---require("basic/plugins.lua") ---require("basic/inputs.lua") -require("basic/permissions") ---require(base .. "/monitors.lua") ---require(base .. "/noctalia/noctalia-colors.lua") -----wayland rules in basic/windows.lua - ---require("base/noctalia/noctalia-colors.lua") - - ---require("/home/venus/.luaig/hypr/noctalia/noctalia-colors.conf") - - +require("basic/vars") +--require("basic/windows") +require("plugins") +--require("monitors.lua") diff --git a/basic/workspaces.conf b/plugins.lua similarity index 100% rename from basic/workspaces.conf rename to plugins.lua