Im trying to make a selection mode by utilizing submap: when pressing main mod + S, the current border will be changed to red and entering a submap…
But idk how to change border color and display it instantly, i have to focus different window for the border to change…
here is my config code:
local dirs={
{"left","H","l","left"},
{"up","K","u","upper"},
{"down","J","d","lower"},
{"right","L","r","right"}
}
local active_border=hl.get_config("general:col.active_border")
local inactive_border=hl.get_config("general:col.inactive_border")
local selecting_border={colors={"rgba(ff5555ee)","rgba(ff0000ee)"},angle = 45}
hl.bind(main_mod.." + S",function()
hl.config({general={col={active_border=selecting_border}}})
hl.dispatch(hl.dsp.submap("selecting"))
end,{description="enter selecting tab layer"})
hl.define_submap("selecting",function()
local function exit_sm()
hl.config({general={col={active_border=active_border}}})
hl.dispatch(hl.dsp.submap("reset"))
end
hl.bind("escape",exit_sm)
for _,dir in ipairs(dirs) do
hl.bind(dir[1],hl.dsp.focus({direction=dir[3]}),{description="focus the "..dir[4].." tab"})
hl.bind(dir[2],hl.dsp.focus({direction=dir[3]}),{description="focus the "..dir[4].." tab"})
end
end)
pls help me ;-;
Hyprland version
hyprctl version
Hyprland 0.55.2 built from branch v0.55.2 at commit 39d7e209c79d451efab1b21151d5938289da838d clean (version: bump to 0.55.2).
Date: Sat May 16 12:59:19 2026
Tag: v0.55.2, commits: 7319
Libraries:
Hyprgraphics: built against 0.5.1, system has 0.5.1
Hyprutils: built against 0.13.1, system has 0.13.1
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.12.0, system has 0.12.0
Version ABI string: 39d7e209c79d451efab1b21151d5938289da838d_aq_0.12_hu_0.13_hg_0.5_hc_0.1_hlg_0.6
no flags were set