Insert workspace before current one #2769
AprilGrimoire
started this conversation in
Ideas
Replies: 2 comments 6 replies
There's a slightly messy way to do this using the IPC, which relies on the fact that named workspaces don't get auto-cleared. The idea is you name the last workspace, position it where you want, focus it, and then un-name it. So something like: #!/bin/bash
# Create workspace 'above' current workspace and focus it
NIRI_WS_INFO=$(niri msg -j workspaces)
LAST_WS_IDX=$(jq 'length' <<< $NIRI_WS_INFO)
CURR_WS_IDX=$(jq '.[] | select(.is_focused == true)' <<< $NIRI_WS_INFO | jq .idx)
niri msg action set-workspace-name _tempws --workspace $LAST_WS_IDX
niri msg action move-workspace-to-index $CURR_WS_IDX --reference _tempws
niri msg action focus-workspace _tempws
niri msg action unset-workspace-name _tempws |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, when I close the last window in a workspace and leave the workspace, I cannot restore the workspaces to the previous state. As in some office suites, I suggest a functionality to insert a workspace before (or after) the current one.
All reactions