fix: move back to previous workspace
It happens, that when we move the ndrop target to another monitor, we stay on the ndrop workspace after switching back to the previous focused workspace. So, after moving to ndrop, we switch one time to the previous one and then to the previous focused.
This commit is contained in:
parent
6c10c2cb7b
commit
0d0ee0853a
1 changed files with 3 additions and 2 deletions
5
ndrop
5
ndrop
|
@ -155,8 +155,8 @@ CLASS="$1"
|
|||
COMMANDLINE="${*:1}"
|
||||
ACTIVE_WORKSPACE=$(active_workspace)
|
||||
ACTIVE_WORKSPACE_ID=$(niri msg --json workspaces | jq -r ".[] | select(.is_focused==true) | .id")
|
||||
ACTIVE_OUTPUT=$(niri msg --json focused-output | jq -r ".name")
|
||||
NDROP_OUTPUT=$(niri msg --json workspaces | jq -r ".[] | select(.name==\"ndrop\") | .output")
|
||||
# ACTIVE_OUTPUT=$(niri msg --json focused-output | jq -r ".name")
|
||||
# NDROP_OUTPUT=$(niri msg --json workspaces | jq -r ".[] | select(.name==\"ndrop\") | .output")
|
||||
|
||||
case "$1" in
|
||||
epiphany)
|
||||
|
@ -225,6 +225,7 @@ if [[ -n ${WINDOW_ID} ]]; then
|
|||
notify_low "ndrop: Matched focused target on active ws '${ACTIVE_WORKSPACE}'; move target to 'ndrop'"
|
||||
fi
|
||||
niri msg action move-window-to-workspace --window-id "${WINDOW_ID}" "ndrop"
|
||||
niri msg action focus-workspace-previous
|
||||
# For good multi-monitor support, we need something like this in niri.
|
||||
# if [[ "$ACTIVE_OUTPUT" != "$NDROP_OUTPUT" ]]; then
|
||||
# niri msg action focus-monitor "${ACTIVE_OUTPUT}"
|
||||
|
|
Loading…
Add table
Reference in a new issue