Theme-linked glow and terminal, tabs, fonts and layout tweaks
- Real window glow (decoration.glow) plus borders and tab bar take their colours from DMS (hypr/dms/colors.lua); Hyprland reloads when DMS changes the theme. - kitty: colours and tab colours come from DMS (dank-theme/dank-tabs), no more hard-coded palette. - Group (tab) mode: Mod+W tabs the whole workspace, thinner tab bar. - Fullscreen programs keep the DMS bar (Mod+F maximizes, Mod+Shift+F is real fullscreen); per-monitor workspace switching on Mod+Tab. - Less jelly animations, smaller gaps, weaker glow. - JetBrains Mono is the default monospace font (fontconfig + install.sh). - DMS settings: purple theme, popup transparency 0.98. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+73
-17
@@ -1,4 +1,21 @@
|
||||
-- Hyprland 0.57 (Lua). Clean dark work setup; shell = DankMaterialShell.
|
||||
|
||||
pcall(require, "dms.colors") -- DMS theme colours; DMS rewrites that file on every theme change and Hyprland reloads when it does
|
||||
|
||||
-- Theme colours as plain hex, read from the file DMS regenerates (fallbacks = the pink theme).
|
||||
local function dms_hex(key, fallback)
|
||||
local f = io.open(os.getenv("HOME") .. "/.config/hypr/dms/colors.lua")
|
||||
local t = f and f:read("*a") or ""
|
||||
if f then f:close() end
|
||||
return t:match("%f[%w_]" .. key .. '%s*=%s*"rgb%((%x%x%x%x%x%x)%)"') or fallback
|
||||
end
|
||||
local function lighten(hex, k) -- mix a colour with white
|
||||
local function m(c) return math.floor(c + (255 - c) * k + 0.5) end
|
||||
return string.format("%02x%02x%02x", m(tonumber(hex:sub(1, 2), 16)), m(tonumber(hex:sub(3, 4), 16)), m(tonumber(hex:sub(5, 6), 16)))
|
||||
end
|
||||
local primary = dms_hex("active_border", "e91e63")
|
||||
local outline = dms_hex("inactive_border", "9f8c8e")
|
||||
local light = lighten(primary, 0.55)
|
||||
-- Fallback login session: GNOME (via GDM).
|
||||
|
||||
local terminal = "kitty"
|
||||
@@ -44,12 +61,12 @@ end)
|
||||
-----------------------
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 6,
|
||||
gaps_out = 14,
|
||||
gaps_in = 4,
|
||||
gaps_out = 10,
|
||||
border_size = 2,
|
||||
col = {
|
||||
active_border = { colors = { "rgba(e91e63ff)", "rgba(ff6398ff)", "rgba(f8bbd9ff)", "rgba(e91e63ff)" }, angle = 45 },
|
||||
inactive_border = "rgba(3a2a2eaa)",
|
||||
active_border = { colors = { "rgba(" .. primary .. "ff)", "rgba(" .. light .. "ff)", "rgba(" .. primary .. "ff)" }, angle = 45 },
|
||||
inactive_border = "rgba(" .. outline .. "40)",
|
||||
},
|
||||
resize_on_border = true,
|
||||
allow_tearing = false,
|
||||
@@ -63,11 +80,18 @@ hl.config({
|
||||
dim_inactive = true,
|
||||
dim_strength = 0.06,
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 30,
|
||||
enabled = true,
|
||||
range = 20,
|
||||
render_power = 3,
|
||||
color = 0x66e91e63, -- soft pink glow on the focused window
|
||||
color_inactive = 0x66000000,
|
||||
color = 0x55000000,
|
||||
color_inactive = 0x44000000,
|
||||
},
|
||||
glow = { -- light around the focused window, colour follows the DMS theme
|
||||
enabled = true,
|
||||
range = 14,
|
||||
render_power = 3,
|
||||
color = "rgba(" .. primary .. "55)",
|
||||
color_inactive = "rgba(00000000)",
|
||||
},
|
||||
blur = {
|
||||
enabled = true,
|
||||
@@ -79,6 +103,19 @@ hl.config({
|
||||
popups = true,
|
||||
},
|
||||
},
|
||||
group = {
|
||||
auto_group = true, -- a new window opened while a group is focused becomes another tab
|
||||
insert_after_current = true,
|
||||
focus_removed_window = true,
|
||||
col = { border_active = "rgba(" .. primary .. "ff)", border_inactive = "rgba(" .. outline .. "40)" },
|
||||
groupbar = {
|
||||
enabled = true, height = 16, font_size = 10, font_family = "JetBrains Mono",
|
||||
render_titles = true, gradients = true, rounding = 6, gaps_in = 2, gaps_out = 2,
|
||||
indicator_height = 0, scrolling = true, middle_click_close = true,
|
||||
text_color = "rgba(ffffffff)", text_color_inactive = "rgba(b8a4a9ff)",
|
||||
col = { active = "rgba(" .. primary .. "dd)", inactive = "rgba(2a2024cc)" },
|
||||
},
|
||||
},
|
||||
animations = { enabled = true },
|
||||
binds = { workspace_back_and_forth = true },
|
||||
dwindle = { preserve_split = true, force_split = 2 }, -- new window always opens to the right/below
|
||||
@@ -99,14 +136,12 @@ 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("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } })
|
||||
hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } })
|
||||
hl.curve("snappy", { type = "spring", mass = 1, stiffness = 340, damping = 24 })
|
||||
hl.curve("bouncy", { type = "spring", mass = 1, stiffness = 280, damping = 17 })
|
||||
|
||||
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 4, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "borderangle", enabled = true, speed = 60, bezier = "linear", style = "loop" }) -- slowly rotating gradient border
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 3.2, spring = "snappy" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 3.0, spring = "bouncy", style = "popin 88%" })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 3.0, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 2.6, bezier = "easeOutQuint", style = "popin 94%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.2, bezier = "quick", style = "popin 88%" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "quick" })
|
||||
hl.animation({ leaf = "fadeDim", enabled = true, speed = 2.5, bezier = "quick" })
|
||||
@@ -181,13 +216,34 @@ b(mod .. " + SHIFT + SPACE", hl.dsp.window.float({ action = "toggle" }))
|
||||
b(mod .. " + C", hl.dsp.window.center())
|
||||
b(mod .. " + E", hl.dsp.layout("togglesplit"))
|
||||
b(mod .. " + P", hl.dsp.window.pseudo())
|
||||
b(mod .. " + W", hl.dsp.group.toggle())
|
||||
-- Tabs: Mod+W puts every tiled window of this workspace into one tabbed group; press it again to split them back.
|
||||
-- While a group is focused, new windows join it as tabs. Mod+[ / Mod+] or the mouse wheel on the tab bar switch tabs.
|
||||
function HL_toggle_tabs()
|
||||
local a = hl.get_active_window()
|
||||
if not a then return end
|
||||
if a.group and a.group.size > 1 then
|
||||
hl.dispatch(hl.dsp.group.toggle())
|
||||
return
|
||||
end
|
||||
local wins = hl.get_windows({ workspace = a.workspace.id, floating = false, mapped = true })
|
||||
if #wins < 2 then
|
||||
hl.dispatch(hl.dsp.group.toggle()) -- single window: just start a group, the next windows become its tabs
|
||||
return
|
||||
end
|
||||
if not a.group then hl.dispatch(hl.dsp.group.toggle()) end
|
||||
local g = hl.get_window("address:" .. a.address).group
|
||||
for _, w in ipairs(wins) do
|
||||
if w.address ~= a.address and not w.group then g:add(w) end
|
||||
end
|
||||
hl.dispatch(hl.dsp.focus({ window = "address:" .. a.address }))
|
||||
end
|
||||
b(mod .. " + W", HL_toggle_tabs)
|
||||
b("ALT + TAB", hl.dsp.exec_cmd("~/.config/hypr/scripts/prev-window.sh")) -- previous window (press again to go back)
|
||||
b(mod .. " + ALT + TAB", hl.dsp.window.cycle_next()) -- next window on this workspace
|
||||
b(mod .. " + TAB", hl.dsp.focus({ workspace = "e+1" }))
|
||||
b(mod .. " + SHIFT + TAB", hl.dsp.focus({ workspace = "e-1" }))
|
||||
b(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||
b(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
b(mod .. " + TAB", hl.dsp.focus({ workspace = "m+1" })) -- next open workspace on THIS monitor
|
||||
b(mod .. " + SHIFT + TAB", hl.dsp.focus({ workspace = "m-1" }))
|
||||
b(mod .. " + mouse_down", hl.dsp.focus({ workspace = "m+1" }))
|
||||
b(mod .. " + mouse_up", hl.dsp.focus({ workspace = "m-1" }))
|
||||
|
||||
-- workspaces 1..10
|
||||
for i = 1, 10 do
|
||||
|
||||
Reference in New Issue
Block a user