omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Super+J (togglesplit) errors on scrolling layout: 'no such layoutmsg for scrolling'

Open khru opened this issue 3 months ago • 6 comments

Description

When a workspace is set to the scrolling layout (via Super+L), pressing Super+J throws a runtime error:

Runtime error in lua: ?.? no such layoutmsg for scrolling

The Super+J binding calls hl.dsp.layout("togglesplit"), which is a layout message that only exists in the dwindle layout. The scrolling layout does not handle this message.

Steps to reproduce

  1. Press Super+L to toggle the workspace layout to scrolling
  2. Press Super+J
  3. Error appears

Expected behavior

Either:

  • The togglesplit binding is a no-op on non-dwindle layouts (no error), or
  • The binding is conditional and only works on dwindle workspaces

Workaround

Delete the workspace layout file:

rm ~/.local/state/omarchy/workspace-layouts/<workspace-id>.lua

Or toggle back to dwindle with Super+L.

System details

  • Omarchy version: 4.0.1-1
  • Layout: scrolling (workspace-specific)
  • Default binding in /usr/share/omarchy/default/hypr/bindings/tiling.lua line 4:
    o.bind("SUPER + J", "Toggle window split", hl.dsp.layout("togglesplit"))
    

Suggested fix

The binding could check the current workspace layout before dispatching togglesplit, or the error could be silently ignored for unsupported layouts.

khru avatar Aug 25 '26 14:08 khru

I think there’s already an open pr on this: https://github.com/basecamp/omarchy/pull/6924

You can fix this locally by adding a few lines of code to the bindings.lua file:

local function toggle_split()
	local layout = hl.get_active_workspace().tiled_layout
	if layout == "dwindle" then
		return hl.dispatch(hl.dsp.layout("togglesplit"))
	else
    os.execute([[omarchy-notification-send -g 󱂬 "Splitting is available only in dwindle layout"]])
		return nil
	end
end

replace("SUPER + J", "Toggle window split", toggle_split)

SamSyntax avatar Aug 25 '26 17:08 SamSyntax

Having the same issue here.

Tsurgcom avatar Aug 26 '26 11:08 Tsurgcom

I have an alternate fix here https://github.com/basecamp/omarchy/pull/7171

fayimora avatar Aug 27 '26 10:08 fayimora

Open PR #8939 addresses this layout-specific togglesplit error. It dispatches togglesplit only when the active tiled layout is dwindle and shows a notification for unsupported layouts instead of surfacing a Lua runtime error. This is the current tested version of the fix.

rookepoole avatar Sep 01 '26 09:09 rookepoole

Same issue experienced.

kenmellem avatar Sep 19 '26 22:09 kenmellem

Automated duplication check: this issue looks similar to #7556, which covers the same Super+J togglesplit errors on scrolling workspaces. I keep that one open and close this one to keep the discussion in one place.

If you feel this is the wrong decision, please open the issue again with a note on the difference.

bjarneo avatar Sep 20 '26 20:09 bjarneo