Files
Dotfiles/dot_config/hypr/hyprland.lua.tmpl
T

113 lines
3.1 KiB
Cheetah

-- Hyprland configuration (Lua) — https://wiki.hypr.land/Configuring/Start/
hl.config({ autogenerated = false })
hl.on("hyprland.start", function()
-- DMS_STARTUP_BEGIN
hl.exec_cmd("dbus-update-activation-environment --systemd --all")
hl.exec_cmd("systemctl --user start hyprland-session.target")
-- DMS_STARTUP_END
-- Auto Start Applications
{{ if or (eq .system "desktop") (eq .system "laptop") }}
hl.exec_cmd("dcal run -d --hidden")
hl.exec_cmd("kdeconnectd")
{{ end }}
{{ if eq .system "desktop" }}
hl.exec_cmd("feishin")
hl.exec_cmd("vesktop")
{{ end }}
end)
hl.config({
input = {
kb_layout = "us",
numlock_by_default = true,
follow_mouse = 1,
repeat_delay = 300,
touchpad = {
tap_to_click = true,
natural_scroll = true,
{{ if eq .system "laptop" }}
disable_while_typing = true,
{{ end }}
},
},
general = {
gaps_in = 4,
gaps_out = 4,
border_size = 1,
layout = "dwindle",
},
decoration = {
rounding = 12,
active_opacity = 1.0,
inactive_opacity = 0.97,
dim_inactive = true,
dim_strength = 0.1,
shadow = {
enabled = true,
range = 30,
render_power = 5,
offset = "0 5",
color = "rgba(00000070)",
},
blur = {
enabled = true,
size = 8,
},
},
dwindle = {
preserve_split = true,
},
master = {
mfact = 0.5,
},
})
hl.animation({ leaf = "windowsIn", enabled = true, speed = 3, bezier = "default" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 3, bezier = "default" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 5, bezier = "default" })
hl.animation({ leaf = "windowsMove", enabled = true, speed = 4, bezier = "default" })
hl.animation({ leaf = "fade", enabled = true, speed = 3, bezier = "default" })
hl.animation({ leaf = "border", enabled = true, speed = 3, bezier = "default" })
hl.layer_rule({ match = { namespace = "^(quickshell)$" }, no_anim = true })
hl.layer_rule({ match = { namespace = "^dms:.*" }, no_anim = true })
-- Workspaces rules
{{ if eq .system "desktop" }}
hl.workspace_rule({ workspace = "1", monitor = "HDMI-A-1" })
hl.workspace_rule({ workspace = "2", monitor = "HDMI-A-1" })
hl.workspace_rule({ workspace = "3", monitor = "DP-2" })
hl.workspace_rule({ workspace = "4", monitor = "DP-2" })
hl.workspace_rule({ workspace = "5", monitor = "DP-2" })
hl.workspace_rule({ workspace = "6", monitor = "HDMI-A-2" })
hl.workspace_rule({ workspace = "7", monitor = "HDMI-A-2" })
{{ else if eq .system "laptop" }}
hl.workspace_rule({ workspace = "1", monitor = "eDP-1" })
hl.workspace_rule({ workspace = "2", monitor = "eDP-1" })
hl.workspace_rule({ workspace = "3", monitor = "eDP-1" })
hl.workspace_rule({ workspace = "4", monitor = "eDP-1" })
hl.workspace_rule({ workspace = "5", monitor = "eDP-1" })
{{ end }}
-- Env vars
hl.env("XDG_MENU_PREFIX", "plasma-")
hl.env("QT_QPA_PLATFORM", "wayland")
hl.env("QT_QPA_PLATFORMTHEME", "gtk3")
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
hl.env("TERMINAL", "ghostty")
hl.env("EDITOR", "nvim")
hl.env("VISUAL", "nvim")
-- Dank Material Shell
require("dms.colors")
require("dms.outputs")
require("dms.layout")
require("dms.cursor")
require("dms.binds")
require("dms.binds-user")
require("dms.windowrules")