From f60abcb876db35b605226f5dff657249d49eadd5 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 15 May 2026 13:44:05 -0700 Subject: [PATCH] Propagate hyprexpo selection labels --- dotfiles/config/hypr/hyprland/binds.lua | 10 ++-------- dotfiles/config/hypr/hyprland/core.lua | 9 +++++++-- nixos/flake.lock | 6 +++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dotfiles/config/hypr/hyprland/binds.lua b/dotfiles/config/hypr/hyprland/binds.lua index 4d1ec78a..67408fa2 100644 --- a/dotfiles/config/hypr/hyprland/binds.lua +++ b/dotfiles/config/hypr/hyprland/binds.lua @@ -196,10 +196,6 @@ function M.setup(ctx) end) hl.define_submap("hyprexpo", function() - bind("W", hyprexpo_dispatch("kb_focus", "up"), desc("Focus workspace tile above")) - bind("A", hyprexpo_dispatch("kb_focus", "left"), desc("Focus workspace tile to the left")) - bind("S", hyprexpo_dispatch("kb_focus", "down"), desc("Focus workspace tile below")) - bind("D", hyprexpo_dispatch("kb_focus", "right"), desc("Focus workspace tile to the right")) bind("Up", hyprexpo_dispatch("kb_focus", "up"), desc("Focus workspace tile above")) bind("Left", hyprexpo_dispatch("kb_focus", "left"), desc("Focus workspace tile to the left")) bind("Down", hyprexpo_dispatch("kb_focus", "down"), desc("Focus workspace tile below")) @@ -207,10 +203,8 @@ function M.setup(ctx) bind("Return", hyprexpo_dispatch("kb_confirm"), desc("Select focused workspace tile")) bind("Space", hyprexpo_dispatch("kb_confirm"), desc("Select focused workspace tile")) - for i = 1, max_workspace do - local workspace_id = i - local key = tostring(i % 10) - bind(key, hyprexpo_dispatch("kb_selecti", workspace_id), desc("Select workspace " .. workspace_id)) + for _, token in ipairs({ "a", "s", "d", "f", "g", "q", "w", "e", "r", "t", "z", "x", "c", "v", "b" }) do + bind(string.upper(token), hyprexpo_dispatch("kb_select", token), desc("Select workspace tile " .. token)) end bind("Escape", hyprexpo("off"), desc("Close workspace expo")) diff --git a/dotfiles/config/hypr/hyprland/core.lua b/dotfiles/config/hypr/hyprland/core.lua index 9a959b33..b0454ed8 100644 --- a/dotfiles/config/hypr/hyprland/core.lua +++ b/dotfiles/config/hypr/hyprland/core.lua @@ -254,11 +254,16 @@ function M.setup(ctx) tile_rounding_power = 2.0, label_enable = 1, label_font_size = 28, - label_text_mode = "token", - label_token_map = "1,2,3,4,5,6,7,8,9", + label_text_mode = "id", label_position = "center", label_offset_x = 6, label_offset_y = 6, + selection_label_enable = 1, + selection_label_token_map = "a,s,d,f,g,q,w,e,r,t,z,x,c,v,b", + selection_label_position = "top-right", + selection_label_offset_x = 6, + selection_label_offset_y = 6, + selection_label_color = 0xffedb443, label_show = "always", label_color_default = 0xffffffff, label_color_hover = 0xffeeeeee, diff --git a/nixos/flake.lock b/nixos/flake.lock index 9ca0bb20..85f91325 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -769,11 +769,11 @@ ] }, "locked": { - "lastModified": 1778831952, - "narHash": "sha256-Hp1ip+DnnXIJ1Ezvvyn4t6CVmvlSaExwgnJXFdohMYw=", + "lastModified": 1778877751, + "narHash": "sha256-EWGEw2wvflMzTcKxo5cLYL5Cw4KqYGpRl1nQGp2VpiM=", "owner": "colonelpanic8", "repo": "hyprexpo", - "rev": "b5f1e72e1db92a4326f9b376f39f1d6a85b9a758", + "rev": "bb53c1d9ed635ad88eaf5db287692d9babef9963", "type": "github" }, "original": {