hyprland: migrate to Lua config, add pc/laptop profiles
hyprlang has been deprecated since Hyprland 0.55 and is dropped after 1-2 releases; this box runs 0.56.2. Migrate Hyprland's own config to Lua and split the machine-specific parts into profiles. Config: - hyprland.lua entry point; the .conf tree is left in place as a rollback path (Hyprland prefers hyprland.lua and only decides at startup). - Each require() is its own Lua scope, so hyprlang's global "$VAR" no longer crosses files: vars.lua / apps.lua / theme/colors.lua return tables. - hypridle, hyprlock, plugins/* and pyprland.toml stay hyprlang -- the other hypr* tools keep it. Profiles (configs/profiles/): - pc -> DP-1 / HDMI-A-1 / DP-2, all 1920x1080 - laptop -> eDP-1 3072x1920@120 scale 2.0, DP-1, HDMI-A-1 mirroring eDP-1 - Each owns its monitors and workspace-to-monitor mapping; common.lua generates the 30 workspace rules from the three outputs. - Selected by $HYPR_PROFILE, else hostname (mainPC -> pc), else laptop. Fixes: - pyprland.toml called swww, which is not installed; the wallpaper backend here is awww. The rotation timer failed silently and both outputs stayed at color: 000000. - XF86InputRaiseVolume / XF86InputLowerVolume are not real keysyms (no XF86Input* family in xkbcommon). They were dead in .conf too; hyprlang ignored them silently, hl.bind rejects them. Commented out. - SUPER+SHIFT+R was bound twice (notification reload + bar reload). hyprlang ran both; in Lua the second would shadow the first, so they are merged. - The waybar layer rule set no effects and was a no-op; dropped. - Polkit autostart now picks hyprpolkitagent or polkit-gnome by what is installed, so one file works on both machines. Verified with `Hyprland --verify-config` on both profiles (config ok). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StGBghPW9Dm7z7uj2VNWHr
This commit is contained in:
81
hypr/theme/decoration.lua
Normal file
81
hypr/theme/decoration.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
-- Was: theme/decoration.conf
|
||||
|
||||
local c = require("theme.colors")
|
||||
|
||||
-- The old 4-stop 45deg gradient, reused for windows and groups.
|
||||
local activeGradient = {
|
||||
colors = {
|
||||
c.rgba("text", "ee"),
|
||||
c.rgba("lavender", "69"),
|
||||
c.rgba("lavender", "69"),
|
||||
c.rgba("text", "ee"),
|
||||
},
|
||||
angle = 45,
|
||||
}
|
||||
|
||||
local inactiveBorder = c.rgba("lavender", "69")
|
||||
|
||||
hl.config({
|
||||
general = {
|
||||
border_size = 2,
|
||||
col = {
|
||||
active_border = activeGradient,
|
||||
inactive_border = inactiveBorder,
|
||||
},
|
||||
|
||||
gaps_in = 3,
|
||||
gaps_out = 5,
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 7,
|
||||
|
||||
active_opacity = 0.92,
|
||||
inactive_opacity = 0.90,
|
||||
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 5,
|
||||
passes = 4,
|
||||
ignore_opacity = true,
|
||||
new_optimizations = true,
|
||||
xray = false,
|
||||
noise = 0.0,
|
||||
popups = true,
|
||||
},
|
||||
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 30,
|
||||
scale = 2,
|
||||
render_power = 5,
|
||||
color = c.rgb("crust"),
|
||||
color_inactive = c.rgb("surface0"),
|
||||
},
|
||||
|
||||
dim_inactive = false,
|
||||
dim_strength = 0.05,
|
||||
},
|
||||
|
||||
group = {
|
||||
col = {
|
||||
border_active = activeGradient,
|
||||
border_inactive = inactiveBorder,
|
||||
border_locked_active = activeGradient,
|
||||
border_locked_inactive = inactiveBorder,
|
||||
},
|
||||
|
||||
groupbar = {
|
||||
col = {
|
||||
active = c.rgba("lavender", "CC"),
|
||||
inactive = c.rgba("subtext1", "99"),
|
||||
locked_active = c.rgba("maroon", "CC"),
|
||||
locked_inactive = c.rgba("subtext1", "99"),
|
||||
},
|
||||
font_family = "JetBrainsMono Nerd Font",
|
||||
font_size = 14,
|
||||
text_color = c.rgb("crust"),
|
||||
height = 16,
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user