hyprland: configure hyprglass
This commit is contained in:
@@ -40,6 +40,7 @@ function M.setup(ctx)
|
||||
apply_nstack_config()
|
||||
apply_hyprexpo_config()
|
||||
apply_hyprwinview_config()
|
||||
apply_hyprglass_config()
|
||||
apply_rules()
|
||||
hl.exec_cmd("sh -lc '/run/current-system/sw/bin/uwsm finalize HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XAUTHORITY IMALISON_SESSION_TYPE=wayland IMALISON_WINDOW_MANAGER=hyprland || dbus-update-activation-environment --systemd XDG_RUNTIME_DIR WAYLAND_DISPLAY DISPLAY XAUTHORITY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE IMALISON_SESSION_TYPE IMALISON_WINDOW_MANAGER; systemctl --user start hyprland-session.target'")
|
||||
hl.exec_cmd("hypridle")
|
||||
@@ -54,6 +55,7 @@ function M.setup(ctx)
|
||||
hl.on("config.reloaded", apply_nstack_config)
|
||||
hl.on("config.reloaded", apply_hyprexpo_config)
|
||||
hl.on("config.reloaded", apply_hyprwinview_config)
|
||||
hl.on("config.reloaded", apply_hyprglass_config)
|
||||
hl.on("config.reloaded", apply_rules)
|
||||
hl.on("config.reloaded", refresh_shell_workarea_and_scratchpads)
|
||||
hl.on("layer.opened", refresh_shell_workarea_and_scratchpads)
|
||||
|
||||
@@ -17,6 +17,9 @@ function M.setup(ctx)
|
||||
if enable_workspace_history and not verify_config then
|
||||
hl.plugin.load("/run/current-system/sw/lib/libhypr-workspace-history.so")
|
||||
end
|
||||
if enable_hyprglass and not verify_config then
|
||||
hl.plugin.load("/run/current-system/sw/lib/hyprglass.so")
|
||||
end
|
||||
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
@@ -154,6 +157,22 @@ function M.setup(ctx)
|
||||
hl.animation(animation)
|
||||
end
|
||||
|
||||
local function apply_hyprglass_config()
|
||||
if verify_config or not enable_hyprglass then
|
||||
return
|
||||
end
|
||||
|
||||
hl.config({
|
||||
plugin = {
|
||||
hyprglass = {
|
||||
enabled = 0,
|
||||
default_theme = "dark",
|
||||
default_preset = "default",
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
local function apply_rules()
|
||||
if verify_config then
|
||||
return
|
||||
@@ -190,6 +209,14 @@ function M.setup(ctx)
|
||||
match = { class = "^(com\\.mitchellh\\.ghostty\\.dropdown)$" },
|
||||
no_anim = true,
|
||||
})
|
||||
hl.window_rule({
|
||||
match = { class = "^(com\\.mitchellh\\.ghostty\\.dropdown)$" },
|
||||
tag = "+hyprglass_enabled",
|
||||
})
|
||||
hl.window_rule({
|
||||
match = { class = "^(com\\.mitchellh\\.ghostty\\.dropdown)$" },
|
||||
tag = "+hyprglass_theme_light",
|
||||
})
|
||||
hl.window_rule({
|
||||
match = { class = "^(.*[Rr]umno.*)$" },
|
||||
float = true,
|
||||
@@ -215,6 +242,7 @@ function M.setup(ctx)
|
||||
end
|
||||
|
||||
ctx.apply_rules = apply_rules
|
||||
ctx.apply_hyprglass_config = apply_hyprglass_config
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -50,6 +50,7 @@ return {
|
||||
enable_hyprspace = false,
|
||||
enable_hyprwinview = true,
|
||||
enable_workspace_history = true,
|
||||
enable_hyprglass = true,
|
||||
configure_nstack_plugin_from_lua = false,
|
||||
workspace_layouts = {},
|
||||
minimized_windows = {},
|
||||
|
||||
Reference in New Issue
Block a user