Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mango_layouts/panel.luau
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local function onPickAt(index)
local slot = pickSlots[index]
if slot == nil then return end
selectedLayout = slot.sym
noctalia.runAsync("mmsg dispatch setlayout," .. slot.entry.name)
noctalia.runAsync("mmsg -d setlayout," .. slot.entry.name)
panel.close()
end

Expand Down Expand Up @@ -142,7 +142,7 @@ function onOpen(context)
selectedLayout = ""
render()
noctalia.runAsync(
"mmsg get all-monitors | jq -r '.monitors[] | select(.active == true and .last_open_surface != null) | .layout_symbol'",
'mmsg -g | awk -v active="" \'/selmon 1/{active=$1} $1==active && $2=="layout"{print $3}\'',
function(result)
if result == nil or result.exitCode ~= 0 then return end
local sym = result.stdout:gsub("%s+", "")
Expand Down
2 changes: 1 addition & 1 deletion mango_layouts/widget.luau
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local custom_color = noctalia.getConfig("custom_color")
function update()
noctalia.setUpdateInterval(1000)
noctalia.runAsync(
"mmsg get all-monitors | jq -r '.monitors[] | select(.active == true) | .layout_symbol'",
'mmsg -g | awk -v active="" \'/selmon 1/{active=$1} $1==active && $2=="layout"{print $3}\'',
function(result)
if result and result.exitCode == 0 then
local sym = result.stdout:gsub("%s+", "")
Expand Down
Loading