From 3d9d2a5a4bef714ce5c7cdbebb213f41a402b6a9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 2 Jul 2026 16:45:33 -0700 Subject: [PATCH] hypr: enable and configure hyprtasking overview --- dotfiles/config/hypr/hyprland/events.lua | 2 ++ dotfiles/config/hypr/hyprland/settings.lua | 30 +++++++++++++++++++++- dotfiles/config/hypr/hyprland/state.lua | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/dotfiles/config/hypr/hyprland/events.lua b/dotfiles/config/hypr/hyprland/events.lua index 0f774b2c..eac912a3 100644 --- a/dotfiles/config/hypr/hyprland/events.lua +++ b/dotfiles/config/hypr/hyprland/events.lua @@ -42,6 +42,7 @@ function M.setup(ctx) apply_hyprwinview_config() apply_hyprwobbly_config() apply_dynamic_cursors_config() + apply_hyprtasking_config() apply_hyprglass_config() apply_visual_performance_mode() apply_rules() @@ -62,6 +63,7 @@ function M.setup(ctx) hl.on("config.reloaded", apply_hyprwinview_config) hl.on("config.reloaded", apply_hyprwobbly_config) hl.on("config.reloaded", apply_dynamic_cursors_config) + hl.on("config.reloaded", apply_hyprtasking_config) hl.on("config.reloaded", apply_hyprglass_config) hl.on("config.reloaded", apply_visual_performance_mode) hl.on("config.reloaded", apply_rules) diff --git a/dotfiles/config/hypr/hyprland/settings.lua b/dotfiles/config/hypr/hyprland/settings.lua index bd49a55d..f553e44b 100644 --- a/dotfiles/config/hypr/hyprland/settings.lua +++ b/dotfiles/config/hypr/hyprland/settings.lua @@ -89,7 +89,6 @@ function M.setup(ctx) end if enable_hyprtasking and not verify_config then hl.plugin.load("/run/current-system/sw/lib/libhyprtasking.so") - os.execute("hyprctl eval 'hl.config({plugin={hyprtasking={full_render=true}}})' >/dev/null 2>&1 || true") end if enable_hyprexpo and not enable_hyprtasking and not verify_config then hl.plugin.load("/run/current-system/sw/lib/libhyprexpo.so") @@ -334,6 +333,34 @@ function M.setup(ctx) }) end + local function apply_hyprtasking_config() + if verify_config or not enable_hyprtasking then + return + end + + hl.config({ + plugin = { + hyprtasking = { + layout = "grid", + -- hyprtasking reads bg_color as 0xAARRGGBB and forces it opaque, so + -- the stock default (0x000000FF) renders as solid blue. Pin true black. + bg_color = 0xff000000, + gap_size = 10, + -- Active workspace tile is bordered with general:col.active_border, + -- inactive tiles with col.inactive_border; this is the selection + -- highlight and it follows hyprtasking:move. Keep it clearly visible. + border_size = 3, + exit_on_hovered = false, + close_overview_on_reload = false, + grid = { + rows = 3, + cols = 3, + }, + }, + }, + }) + end + local function apply_visual_performance_mode() if verify_config then return @@ -506,6 +533,7 @@ function M.setup(ctx) ctx.apply_hyprglass_config = apply_hyprglass_config ctx.apply_hyprwobbly_config = apply_hyprwobbly_config ctx.apply_dynamic_cursors_config = apply_dynamic_cursors_config + ctx.apply_hyprtasking_config = apply_hyprtasking_config ctx.apply_visual_performance_mode = apply_visual_performance_mode ctx.is_file_chooser_window = is_file_chooser_window ctx.raise_file_chooser_window = raise_file_chooser_window diff --git a/dotfiles/config/hypr/hyprland/state.lua b/dotfiles/config/hypr/hyprland/state.lua index 5919b0a4..b355509e 100644 --- a/dotfiles/config/hypr/hyprland/state.lua +++ b/dotfiles/config/hypr/hyprland/state.lua @@ -65,7 +65,7 @@ return { -- hook fires on every popup commit). Re-enable once fixed upstream. enable_hyprexpo = false, enable_hyprwinview = true, - enable_hyprtasking = false, + enable_hyprtasking = true, enable_workspace_history = true, enable_hyprwobbly = true, -- Disabled 2026-06-28: causes the cursor to intermittently disappear