From a743e93ce1c73eb8ed09bb2d3c58c64209445057 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Mon, 11 May 2026 20:32:31 +0545 Subject: [PATCH] migrate to lua --- config/hypr/configs/animations.lua | 27 ++ config/hypr/configs/keybinds.lua | 112 +++++++++ config/hypr/configs/misc.lua | 68 +++++ config/hypr/configs/monitor_and_env.lua | 29 +++ config/hypr/configs/settings.lua | 0 config/hypr/configs/startup_apps.lua | 16 ++ config/hypr/configs/visuals.lua | 13 + config/hypr/configs/windowrules.lua | 234 ++++++++++++++++++ config/hypr/hyprland.lua | 14 ++ .../{ => old}/UserConfigs/ENVariables.conf | 0 .../{ => old}/UserConfigs/LaptopDisplay.conf | 0 .../hypr/{ => old}/UserConfigs/Laptops.conf | 0 .../hypr/{ => old}/UserConfigs/Monitors.conf | 0 .../{ => old}/UserConfigs/Startup_Apps.conf | 0 .../UserConfigs/UserDecorationAnimations.conf | 0 .../{ => old}/UserConfigs/UserKeybinds.conf | 0 .../{ => old}/UserConfigs/UserSettings.conf | 0 .../{ => old}/UserConfigs/WindowRules.conf | 0 .../{ => old}/UserConfigs/WorkspaceRules.conf | 0 config/hypr/{ => old}/configs/Keybinds.conf | 0 config/hypr/{ => old}/hyprland.conf | 0 config/hypr/{ => old}/scripts/changelayout.sh | 0 config/matugen/config.toml | 12 +- 23 files changed, 517 insertions(+), 8 deletions(-) create mode 100644 config/hypr/configs/animations.lua create mode 100644 config/hypr/configs/keybinds.lua create mode 100644 config/hypr/configs/misc.lua create mode 100644 config/hypr/configs/monitor_and_env.lua create mode 100644 config/hypr/configs/settings.lua create mode 100644 config/hypr/configs/startup_apps.lua create mode 100644 config/hypr/configs/visuals.lua create mode 100644 config/hypr/configs/windowrules.lua create mode 100644 config/hypr/hyprland.lua rename config/hypr/{ => old}/UserConfigs/ENVariables.conf (100%) rename config/hypr/{ => old}/UserConfigs/LaptopDisplay.conf (100%) rename config/hypr/{ => old}/UserConfigs/Laptops.conf (100%) rename config/hypr/{ => old}/UserConfigs/Monitors.conf (100%) rename config/hypr/{ => old}/UserConfigs/Startup_Apps.conf (100%) rename config/hypr/{ => old}/UserConfigs/UserDecorationAnimations.conf (100%) rename config/hypr/{ => old}/UserConfigs/UserKeybinds.conf (100%) rename config/hypr/{ => old}/UserConfigs/UserSettings.conf (100%) rename config/hypr/{ => old}/UserConfigs/WindowRules.conf (100%) rename config/hypr/{ => old}/UserConfigs/WorkspaceRules.conf (100%) rename config/hypr/{ => old}/configs/Keybinds.conf (100%) rename config/hypr/{ => old}/hyprland.conf (100%) rename config/hypr/{ => old}/scripts/changelayout.sh (100%) diff --git a/config/hypr/configs/animations.lua b/config/hypr/configs/animations.lua new file mode 100644 index 00000000..6c5d737f --- /dev/null +++ b/config/hypr/configs/animations.lua @@ -0,0 +1,27 @@ +-- Animations + +hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } }) +hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } }) +hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } }) +hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } } }) +hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } }) + +hl.curve("myBezier", { type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } }) + +hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" }) +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windows", enabled = true, speed = 4.79, bezier = "easeOutQuint" }) +hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", style = "popin 87%" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" }) +hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" }) +hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" }) +hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" }) +hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" }) +hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" }) +hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" }) +hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" }) +hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 5, bezier = "myBezier", style = "slide" }) +hl.animation({ leaf = "workspacesIn", enabled = true, speed = 5, bezier = "myBezier", style = "slide" }) +hl.animation({ leaf = "workspacesOut", enabled = true, speed = 5, bezier = "myBezier", style = "slide" }) +hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" }) diff --git a/config/hypr/configs/keybinds.lua b/config/hypr/configs/keybinds.lua new file mode 100644 index 00000000..59f538e4 --- /dev/null +++ b/config/hypr/configs/keybinds.lua @@ -0,0 +1,112 @@ +-- Keybinds + +local terminal = "kitty" +local filemanager = "thunar" +local telegram = "materialgram" +local browser = "zen-browser" + +local mainMod = "SUPER" + +hl.bind(mainMod .. " + SHIFT + C", hl.dsp.window.close()) +hl.bind(mainMod .. " + C", hl.dsp.window.kill()) +hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.fullscreen({ action = "toggle" })) +hl.bind(mainMod .. " + F", function() + hl.dispatch(hl.dsp.window.float({ action = "toggle" })) + hl.dispatch(hl.dsp.window.center()) +end) + +-- Testing +hl.bind("ALT + F12", hl.dsp.exec_cmd("notify-send 'Test notification' \"Here's a really long message to test truncation and wrapping\\nYou can middle click or flick this notification to dismiss it!\" -a 'terminal' -A \"Test1=I got it!\" -A \"Test2=Another action\"")) +hl.bind("ALT + Equal", hl.dsp.exec_cmd("notify-send 'hmm' ${SLURP_ARGS}")) + +local message_cmd = "notify-send \"Hello\" \"FIRE IN THE HOLE‼️🗣️🔥🕳️\" -i \"/home/sankalp/.face.icon\" -A \"🗣️\" -A \"🔥\" -A \"🕳️\" -a \"Source Code\"" +hl.bind(mainMod .."+ ALT + N", hl.dsp.exec_cmd(message_cmd)) + +hl.bind(mainMod .. " + return", hl.dsp.exec_cmd(terminal)) +hl.bind("ALT + SHIFT + return", hl.dsp.exec_cmd(terminal .. " --title float_kitty --single-instance")) +hl.bind("ALT + E", hl.dsp.exec_cmd("uwsm app -- " .. filemanager)) +hl.bind(mainMod .. " + B", hl.dsp.exec_cmd("uwsm app -- " .. browser)) +hl.bind("ALT + T", hl.dsp.exec_cmd("uwsm app -- " .. telegram)) + +hl.bind(mainMod .. " + SHIFT + Y", hl.dsp.exec_cmd("grimblast save active ~/Pictures/Screenshots/")) +hl.bind(mainMod .. " + CTRL + L", hl.dsp.exec_cmd("pidof hyprlock || hyprlock -q")) +hl.bind(mainMod .. " + CTRL + P", hl.dsp.exec_cmd("systemctl poweroff")) +hl.bind(mainMod .. " + CTRL + R", hl.dsp.exec_cmd("systemctl reboot")) + +hl.bind(mainMod .. " + P", hl.dsp.window.pseudo()) +hl.bind(mainMod .. " + SHIFT + P", hl.dsp.layout("togglesplit")) + +-- Cycle through existing workspaces +hl.bind("ALT + SHIFT + D", hl.dsp.focus({ workspace = "e+1" })) +hl.bind("ALT + SHIFT + A", hl.dsp.focus({ workspace = "e-1" })) + +-- Scrolling / Layout +hl.bind("ALT + D", hl.dsp.layout("move +col")) +hl.bind("ALT + A", hl.dsp.layout("move -col")) +hl.bind(mainMod .. " + SHIFT + period", hl.dsp.layout("movewindowto r")) +hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.layout("movewindowto l")) +hl.bind(mainMod .. " + SHIFT + up", hl.dsp.layout("movewindowto u")) +hl.bind(mainMod .. " + SHIFT + down", hl.dsp.layout("movewindowto d")) +hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.layout("swapcol l")) + +-- Scroll through existing workspaces with mainMod + scroll +hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Move window -- +hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" })) +hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" })) +hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" })) +hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" })) + +-- Focus to different window -- +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" })) + +-- Switch workspaces with mainMod + [0-9] +-- Move active window to a workspace with mainMod + SHIFT + [0-9] +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 })) + hl.bind("SHIFT + ALT + " .. key, function() + hl.dispatch("movetoworkspacesilent", i) + end) +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 }) + +-- Laptop 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("xf86Sleep", hl.dsp.exec_cmd("systemctl suspend"), { locked = true }) + +-- Playerctl +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 }) diff --git a/config/hypr/configs/misc.lua b/config/hypr/configs/misc.lua new file mode 100644 index 00000000..1c3780bf --- /dev/null +++ b/config/hypr/configs/misc.lua @@ -0,0 +1,68 @@ +-- Misc + +hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) +hl.gesture({ fingers = 3, direction = "vertical", action = "workspace" }) +hl.gesture({ fingers = 4, direction = "down", action = "float" }) + +hl.config({ + input = { + kb_layout = us, + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + repeat_rate = 50, + repeat_delay = 300, + left_handed = 0, + + follow_mouse = 1, + + sensitivity = 0.2, + accel_profile = "flat", + + touchpad = { + natural_scroll = 0, + disable_while_typing = 1, + clickfinger_behavior = 0, + middle_button_emulation = 1, + tap_to_click = 1, + drag_lock = 0, + }, + numlock_by_default = true, + }, + + dwindle = { + preserve_split = true, + smart_resizing = true, + use_active_for_splits = true, + smart_split = false, + default_split_ratio = 1.0, + split_bias = 0, + precise_mouse_move = false, + special_scale_factor = 0.8, + }, + + master = { + new_status = "slave", + new_on_top = false, + new_on_active = "none", + orientation = "left", + mfact = 0.55, + slave_count_for_center_master = 2, + center_master_fallback = "left", + smart_resizing = true, + drop_at_cursor = true, + always_keep_position = false, + }, + + scrolling = { + column_width = 0.50, + fullscreen_on_one_column = true, + direction = "right", + follow_focus = true, + }, + + debug = { + disable_logs = false, + }, +}) diff --git a/config/hypr/configs/monitor_and_env.lua b/config/hypr/configs/monitor_and_env.lua new file mode 100644 index 00000000..023a85c5 --- /dev/null +++ b/config/hypr/configs/monitor_and_env.lua @@ -0,0 +1,29 @@ +-- Monitors + +hl.monitor({ + output = "eDP-1", + mode = "preferred", + position = "auto", + scale = 1, +}) + +-- Env Vars + +hl.env("XCURSOR_SIZE", "6") +hl.env("CLUTTER_BACKEND", "wayland") +hl.env("GDK_BACKEND", "wayland,x11,*") +hl.env("QT_QPA_PLATFORM", "wayland;xcb") +hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1") +hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1") +hl.env("QT_QPA_PLATFORMTHEME", "qt5ct") +hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") +hl.env("GDK_SCALE", "1") +hl.env("QT_SCALE_FACTOR", "1") +hl.env("MOZ_ENABLE_WAYLAND", "1") +hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") +hl.env("ELECTRON_ARGS", "--enable-features=UseOzonePlatform --ozone-platform=wayland") + +-- nvidia +hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") +hl.env("LIBVA_DRIVER_NAME", "nvidia") +hl.env("SDL_VIDEODRIVER", "wayland") diff --git a/config/hypr/configs/settings.lua b/config/hypr/configs/settings.lua new file mode 100644 index 00000000..e69de29b diff --git a/config/hypr/configs/startup_apps.lua b/config/hypr/configs/startup_apps.lua new file mode 100644 index 00000000..4936607d --- /dev/null +++ b/config/hypr/configs/startup_apps.lua @@ -0,0 +1,16 @@ +-- Startup + +hl.on("hyprland.start", function() + local cmds = { + "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP", + "gsettings set org.gnome.desktop.interface cursor-theme Bibata-Modern-Ice", + "hyprctl setcursor Bibata-Modern-Ice 6", + "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1", + "udiskie", + } + + for i = 1, #cmds do + local cmd = cmds[i] + hl.exec_cmd(cmd) + end +end) diff --git a/config/hypr/configs/visuals.lua b/config/hypr/configs/visuals.lua new file mode 100644 index 00000000..c47e7053 --- /dev/null +++ b/config/hypr/configs/visuals.lua @@ -0,0 +1,13 @@ +-- Visuals +hl.config({ + general = { + allow_tearing = false, + resize_on_border = false, + }, + + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + }, +}) diff --git a/config/hypr/configs/windowrules.lua b/config/hypr/configs/windowrules.lua new file mode 100644 index 00000000..d9810796 --- /dev/null +++ b/config/hypr/configs/windowrules.lua @@ -0,0 +1,234 @@ +local function apply_window_rule(rule) + if hl.window_rule then + hl.window_rule(rule) + end +end + +-- 1. Tag Assignments (Class regex -> Tag) +local tags = { + browser = { + "^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$", + "^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$", + "^(chrome-.+-Default)$", + "^([Cc]hromium)$", + "^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$", + "^([Bb]rave-browser(-beta|-dev|-unstable)?)$", + "^([Tt]horium-browser|[Cc]achy-browser)$", + "^(zen-alpha|zen|zen-browser)$", + }, + notif = { "^(swaync-control-center|swaync-notification-window|swaync-client|class)$" }, + terminal = { "^(ghostty|wezterm|Alacritty|kitty|Kitty)$" }, + email = { + "^([Tt]hunderbird|org.mozilla.Thunderbird)$", + "^(eu.betterbird.Betterbird)$", + "^(org.gnome.Evolution)$", + }, + projects = { + "^(codium|codium-url-handler|VSCodium)$", + "^(VSCode|code|code-url-handler)$", + "^(jetbrains-.+)$", + "^(dev.zed.Zed|antigravity)$", + }, + screenshare = { "^(com.obsproject.Studio)$" }, + im = { + "^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$", + "^([Ff]erdium)$", + "^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$", + "^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop|materialgram)$", + "^(teams-for-linux)$", + "^(im.riot.Riot|Element)$", + }, + games = { "^(gamescope)$", "^(steam_app_\\d+)$" }, + gamestore = { "^([Ss]team)$", "^(com.heroicgameslauncher.hgl)$" }, + ["file-manager"] = { "^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$", "^(app.drey.Warp)$" }, + wallpaper = { "^([Ww]aytrogen)$" }, + multimedia = { "^([Aa]udacious)$" }, + multimedia_video = { "^([Mm]pv|vlc)$" }, + settings = { + "^(wihotspot(-gui)?)$", + "^([Bb]aobab|org.gnome.[Bb]aobab)$", + "^(gnome-disks|wihotspot(-gui)?)$", + "^(file-roller|org.gnome.FileRoller)$", + "^(nm-applet|nm-connection-editor|blueman-manager)$", + "^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$", + "^(qt5ct|qt6ct|[Yy]ad|nwg-look)$", + "^(org.kde.polkit-kde-authentication-agent-1)$", + "^([Rr]ofi)$", + "^(btrfs-assistant)$", + "^(timeshift-gtk)$", + }, + viewer = { + "^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$", + "^(evince|zathura)$", + "^(eog|org.gnome.Loupe|imv|imv-dir)$", + }, +} + +for tag, patterns in pairs(tags) do + for _, pattern in ipairs(patterns) do + apply_window_rule({ match = { class = pattern }, tag = "+" .. tag }) + end +end + +-- Manual Tags/Rules +apply_window_rule({ match = { xdg_tag = "^(proton-game)$" }, tag = "+games" }) +apply_window_rule({ match = { title = "^([Ll]utris)$" }, tag = "+gamestore" }) +apply_window_rule({ match = { title = "^(ROG Control)$" }, tag = "+settings" }) +apply_window_rule({ match = { title = "(Kvantum Manager)" }, tag = "+settings" }) +apply_window_rule({ match = { class = "(xdg-desktop-portal-gtk)" }, tag = "+settings" }) + +-- 3. Floating, Centered, and Sized Rules +local simple_rules = { + { match = { class = "([Zz]oom|onedriver|onedriver-launcher)" }, float = true }, + { match = { class = "^(mpv|com.github.rafostar.Clapper)$" }, float = true }, + { match = { class = "^([Qq]alculate-gtk)$" }, float = true }, + { match = { title = "^(Authentication Required)$" }, float = true, center = true }, + { + match = { + class = "^(xfce-polkit|mate-polkit|polkit-mate-authentication-agent-1)$", + title = "^(Authentication required|Authentication Required)$", + }, + float = true, + center = true, + size = "(monitor_w*0.35) (monitor_h*0.35)", + }, + { match = { class = "(codium|codium-url-handler|VSCodium)", title = "negative:(.*codium.*|.*VSCodium.*)" }, float = true }, + { match = { class = "^(com.heroicgameslauncher.hgl)$", title = "negative:(Heroic Games Launcher)" }, float = true }, + { match = { class = "^([Ss]team)$", title = "negative:^([Ss]team)$" }, float = true }, + { + match = { title = "^(Add Folder to Workspace)$" }, + float = true, + center = true, + size = "(monitor_w*0.7) (monitor_h*0.6)", + }, + { match = { title = "^(Save As)$" }, float = true, center = true, size = "(monitor_w*0.7) (monitor_h*0.6)" }, + { match = { initial_title = "(Open Files)" }, float = true, size = "(monitor_w*0.7) (monitor_h*0.6)" }, + { match = { class = "^(yad)$" }, float = true, center = true, size = "(monitor_w*0.2) (monitor_h*0.2)" }, + { match = { class = "^(hyprland-donate-screen)$" }, float = true, center = true }, + { match = { class = "^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$" }, center = true }, + { match = { class = "^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$" }, center = true }, + { match = { class = "^(nm-connection-editor)$" }, center = true }, + { match = { class = "^(nm-applet)$", title = "^(Wi-Fi Network Authentication Required)$" }, center = true }, + { match = { fullscreen = true }, idle_inhibit = "fullscreen" }, + { match = { fullscreen = 1 }, idle_inhibit = "fullscreen" }, + { match = { class = ".*" }, idle_inhibit = "fullscreen" }, + { match = { title = ".*" }, idle_inhibit = "fullscreen" }, + { match = { class = "^(gedit|org.gnome.TextEditor|mousepad)$" }, opacity = "0.8 0.7" }, + { match = { class = "^(deluge)$" }, opacity = "0.9 0.8" }, + { match = { class = "^(seahorse)$" }, opacity = "0.9 0.8" }, + { match = { class = "^(jetbrains-.*)$" }, no_initial_focus = true }, + { match = { title = "^(wind.*)$" }, no_initial_focus = true }, + { match = { class = "^([Tt]hunar)$" }, workspace = 4 }, +} + +for _, rule in ipairs(simple_rules) do + apply_window_rule(rule) +end + +-- 4. Named/Complex Rules +local special_rules = { + { + name = "Picture-in-Picture", + match = { title = "^[Pp]icture-in-[Pp]icture$" }, + float = true, + move = "72% 7%", + opacity = "0.95 0.75", + pin = true, + keep_aspect_ratio = true, + size = "(monitor_w*0.3) (monitor_h*0.3)", + }, + { + name = "NVIDIA Settings", + match = { + class = "^(nvidia-settings)$", + title = "^(NVIDIA Settings)$", + initial_class = "^(nvidia-settings)$", + initial_title = "^(NVIDIA Settings)$", + }, + float = true, + center = true, + size = "(monitor_w*0.6) (monitor_h*0.6)", + }, + { + name = "Ferdium", + match = { class = "^([Ff]erdium)$" }, + float = true, + center = true, + size = "(monitor_w*0.6) (monitor_h*0.7)", + }, + { + name = "Calculators", + match = { class = "(org.gnome.Calculator|qalculate-gtk)" }, + float = true, + center = true, + size = "(monitor_w*0.55) (monitor_h*0.45)", + }, + { + name = "Thunar Dialogs", + match = { class = "([Tt]hunar)", title = "negative:(.*[Tt]hunar.*)" }, + float = true, + center = true, + }, + { + name = "Bitwarden", + match = { + class = "^(Bitwarden)$", + title = "^(Bitwarden)$", + initial_class = "^(Bitwarden)$", + initial_title = "^(Bitwarden)$", + }, + float = true, + center = true, + size = "(monitor_w*0.6) (monitor_h*0.6)", + }, + { + name = "hyprland audio panel", + match = { + class = "^(hyprpwcenter)$", + title = "^(Pipewire Control Center)$", + initial_class = "^(hyprpwcenter)$", + initial_title = "^(Pipewire Control Center)$", + }, + float = true, + center = true, + size = "(monitor_w*0.6) (monitor_h*0.6)", + }, + { + name = "EasyEffects", + match = { + class = "^(com.github.wwmm.easyeffects)$", + title = "^(Easy Effects)$", + initial_class = "^(com.github.wwmm.easyeffects)$", + initial_title = "^(Easy Effects)$", + }, + float = true, + center = true, + size = "(monitor_w*0.6) (monitor_h*0.65)", + }, + { + name = "Floating Terminal", + match = { title = "^(float_kitty)$" }, + float = true, + center = true, + size = "(monitor_w*0.6) (monitor_h*0.6)", + }, +} + +for _, rule in ipairs(special_rules) do + apply_window_rule(rule) +end + +-- 5. Layer Rules +local layer_rules = { + { match = { namespace = "hyprpicker" }, no_anim = true }, + { match = { namespace = "selection" }, no_anim = true }, + { match = { namespace = "noanim" }, no_anim = true }, + { match = { namespace = "fabric" }, no_anim = true }, + { match = { namespace = "gtk-layer-shell" }, ignore_alpha = 0 }, +} + +for _, rule in ipairs(layer_rules) do + if hl.layer_rule then + hl.layer_rule(rule) + end +end diff --git a/config/hypr/hyprland.lua b/config/hypr/hyprland.lua new file mode 100644 index 00000000..9c471b60 --- /dev/null +++ b/config/hypr/hyprland.lua @@ -0,0 +1,14 @@ +require("configs.monitor_and_env") +require("configs.visuals") +-- require("configs.animations") +require("configs.keybinds") +require("configs.windowrules") +require("configs.startup_apps") +require("configs.misc") + + +dofile("/home/sankalp/.config/Modus/config/hypr/modus.lua") + +hl.on("hyprland.start", function() + hl.exec_cmd("uwsm app -- $(python /home/sankalp/.config/Modus/main.py)") +end) \ No newline at end of file diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/old/UserConfigs/ENVariables.conf similarity index 100% rename from config/hypr/UserConfigs/ENVariables.conf rename to config/hypr/old/UserConfigs/ENVariables.conf diff --git a/config/hypr/UserConfigs/LaptopDisplay.conf b/config/hypr/old/UserConfigs/LaptopDisplay.conf similarity index 100% rename from config/hypr/UserConfigs/LaptopDisplay.conf rename to config/hypr/old/UserConfigs/LaptopDisplay.conf diff --git a/config/hypr/UserConfigs/Laptops.conf b/config/hypr/old/UserConfigs/Laptops.conf similarity index 100% rename from config/hypr/UserConfigs/Laptops.conf rename to config/hypr/old/UserConfigs/Laptops.conf diff --git a/config/hypr/UserConfigs/Monitors.conf b/config/hypr/old/UserConfigs/Monitors.conf similarity index 100% rename from config/hypr/UserConfigs/Monitors.conf rename to config/hypr/old/UserConfigs/Monitors.conf diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/old/UserConfigs/Startup_Apps.conf similarity index 100% rename from config/hypr/UserConfigs/Startup_Apps.conf rename to config/hypr/old/UserConfigs/Startup_Apps.conf diff --git a/config/hypr/UserConfigs/UserDecorationAnimations.conf b/config/hypr/old/UserConfigs/UserDecorationAnimations.conf similarity index 100% rename from config/hypr/UserConfigs/UserDecorationAnimations.conf rename to config/hypr/old/UserConfigs/UserDecorationAnimations.conf diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/old/UserConfigs/UserKeybinds.conf similarity index 100% rename from config/hypr/UserConfigs/UserKeybinds.conf rename to config/hypr/old/UserConfigs/UserKeybinds.conf diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/old/UserConfigs/UserSettings.conf similarity index 100% rename from config/hypr/UserConfigs/UserSettings.conf rename to config/hypr/old/UserConfigs/UserSettings.conf diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/old/UserConfigs/WindowRules.conf similarity index 100% rename from config/hypr/UserConfigs/WindowRules.conf rename to config/hypr/old/UserConfigs/WindowRules.conf diff --git a/config/hypr/UserConfigs/WorkspaceRules.conf b/config/hypr/old/UserConfigs/WorkspaceRules.conf similarity index 100% rename from config/hypr/UserConfigs/WorkspaceRules.conf rename to config/hypr/old/UserConfigs/WorkspaceRules.conf diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/old/configs/Keybinds.conf similarity index 100% rename from config/hypr/configs/Keybinds.conf rename to config/hypr/old/configs/Keybinds.conf diff --git a/config/hypr/hyprland.conf b/config/hypr/old/hyprland.conf similarity index 100% rename from config/hypr/hyprland.conf rename to config/hypr/old/hyprland.conf diff --git a/config/hypr/scripts/changelayout.sh b/config/hypr/old/scripts/changelayout.sh similarity index 100% rename from config/hypr/scripts/changelayout.sh rename to config/hypr/old/scripts/changelayout.sh diff --git a/config/matugen/config.toml b/config/matugen/config.toml index ae1f7394..c46c85e0 100644 --- a/config/matugen/config.toml +++ b/config/matugen/config.toml @@ -31,8 +31,8 @@ input_path = "~/.config/matugen/templates/qtct-colors.conf" output_path = "~/.config/qt6ct/colors/matugen.conf" [templates.hyprland] -input_path = "~/mine/config/matugen/templates/hyprland-colors.conf" -output_path = "~/mine/config/hypr/colors.conf" +input_path = "~/.config/Modus/config/matugen/templates/hyprland-colors.lua" +output_path = "~/.config/Modus/config/hypr/colors.lua" [templates.kitty] input_path = "~/.config/matugen/templates/kitty-colors.conf" @@ -47,10 +47,6 @@ output_path = "~/.config/telegram-desktop/themes/material-you.tdesktop-theme" input_path = "~/.config/matugen/templates/discord.css" output_path = "~/.config/vesktop/themes/quickCss.css" -[templates.cava] -input_path = "~/.config/matugen/templates/cava" -output_path = "~/.config/cava/config" - [templates.yazi] input_path = "~/.config/matugen/templates/colors-yazi.toml" output_path = "~/.config/yazi/theme.toml" @@ -65,8 +61,8 @@ output_path = "~/.config/Modus/styles/colors.css" post_hook = "fabric-cli exec modus 'app.set_css()' &" [templates.modus1] -input_path = "~/mine/config/matugen/templates/modus.css" -output_path = "~/mine/styles/colors.css" +input_path = "~/Projects/dev/new-modus/config/matugen/templates/modus.css" +output_path = "~/Projects/dev/new-modus/src/shared/styles/colors.css" post_hook = "fabric-cli exec modus1 'app.set_css()' &" [config.custom_colors.red]