summaryrefslogtreecommitdiff
path: root/appearance.lua
diff options
context:
space:
mode:
Diffstat (limited to 'appearance.lua')
-rw-r--r--appearance.lua120
1 files changed, 120 insertions, 0 deletions
diff --git a/appearance.lua b/appearance.lua
new file mode 100644
index 0000000..45a5240
--- /dev/null
+++ b/appearance.lua
@@ -0,0 +1,120 @@
+-- 外观设置(对应 appearance.conf)
+-- 参考 https://wiki.hypr.land/Configuring/Basics/Variables/
+
+hl.config({
+ general = {
+ -- 边距
+ gaps_in = 4,
+ gaps_out = { top = 0, right = 8, bottom = 8, left = 8 },
+ -- gaps_out = { top = 0, right = 0, bottom = 0, left = 0 },
+
+ -- 边框
+ border_size = 2,
+
+ -- 边框颜色
+ col = {
+ active_border = { colors = { "rgba(EFEFEF32)" }, angle = 45 },
+ inactive_border = "rgba(2A4A7400)",
+ },
+
+ -- 拖动窗口边缘缩放
+ resize_on_border = false,
+
+ -- 允许撕裂
+ allow_tearing = false,
+
+ -- 布局
+ layout = "dwindle", -- dwindle, master
+
+ -- no_focus_fallback = false
+ },
+
+ decoration = {
+ -- 圆角
+ rounding = 4,
+ rounding_power = 5,
+
+ -- 窗口透明度
+ active_opacity = 1.0,
+ inactive_opacity = 1.0,
+
+ -- 阴影
+ shadow = {
+ enabled = true,
+ range = 4,
+ render_power = 4, -- 合法范围 1-4,旧 conf 中的 5 已超出(原值被旧解析器忽略校验)
+ color = "rgba(1a1a1aee)",
+ },
+
+ -- 模糊
+ blur = {
+ enabled = true,
+ size = 4,
+ passes = 3,
+ vibrancy = 0.1696,
+ },
+ },
+
+ -- 动画主开关
+ animations = {
+ enabled = true,
+ },
+
+ dwindle = {
+ -- pseudotile = true -- 伪平铺的主开关,键绑定部分另有绑定
+ preserve_split = true, -- 您可能想要这个
+ },
+
+ -- 参考 https://wiki.hypr.land/Configuring/Master-Layout/
+ master = {
+ new_status = "master",
+ },
+
+ -- 参考 https://wiki.hypr.land/Configuring/Variables/#misc
+ misc = {
+ force_default_wallpaper = -1, -- 设置为 0 或 1 以禁用动漫吉祥物壁纸
+ disable_hyprland_logo = true, -- 如果为 true,则禁用随机的 hyprland 标志 / 动漫女孩背景
+ },
+})
+
+-- 曲线(对应 appearance.conf 中的 bezier)
+-- 参考 https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/#curves
+-- 名称, X0, Y0, X1, Y1
+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 } } })
+
+-- 动画(对应 appearance.conf 中的 animation)
+-- 参考 https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/
+-- 名称, 开关, 速度, 曲线, [样式]
+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 = 3.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 = 1.94, bezier = "easeInOutCubic", style = "slide" })
+hl.animation({ leaf = "workspacesIn", enabled = true, speed = 3, bezier = "easeInOutCubic", style = "slide" })
+hl.animation({ leaf = "workspacesOut", enabled = true, speed = 3, bezier = "easeInOutCubic", style = "slide" })
+hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
+
+-- 图层规则(对应 appearance.conf 中的 layerrule)
+hl.layer_rule({
+ name = "blur-waybar",
+ match = { namespace = "waybar" },
+ blur = true,
+})
+hl.layer_rule({
+ name = "blur-wofi",
+ match = { namespace = "wofi" },
+ blur = true,
+})