Context
I am running a multi-monitor setup with Hyprland. The following bug prevents me from using the workspaces api, I am forced to use the hyprctl -j commands.
Version:
$ quickshell --version
Quickshell 0.3.0 (revision 4b4fca3224ab977dc515ac0bb78d00b3dfa71e00, distributed by AUR (package: quickshell-git))
$ pacman -Q qt6-base
qt6-base 6.11.1-1
Bug reproduction
- Save the following file to $XDG_CONFIG_HOME/test/shell.qml
import QtQuick
import Quickshell
import Quickshell.Hyprland
ShellRoot {
Variants {
id: variants
model: Quickshell.screens;
Scope {
id: scope
required property var modelData
property ShellScreen screen: modelData
property var monitor: Hyprland.monitorFor(screen)
Connections {
target: monitor
function onActiveWorkspaceChanged() {
console.log(monitor.name);
console.log(monitor.activeWorkspace.id)
}
}
}
}
}
- Make sure you have workspace 1 on the first monitor, workspace 2 on the second monitor (this works with any workspace number, this is for the example)
- Run
qs -c test
- The console prints out monitors and the present workspaces on them
- On a tty in the first monitor, run
hyprctl dispatch 'hl.dsp.focus({ workspace = "2", on_current_monitor = true })' (such that the workspaces swap places)
- Observe that quickshell prints only the monitor and workspace of the destination monitor
- Focus any window on the second monitor
- Observe that quickshell only now does print the second monitor's updated workspace
Desired behavior
Upon swapping the workspaces, both monitors should be affected by the change in the moment of the swap, not when they are focused
Workaround
I use Processes calling hyprctl monitors -j (and others), triggered by Hyprland.onRawEvent signal handler. This provides me with up-to-date data.
Context
I am running a multi-monitor setup with Hyprland. The following bug prevents me from using the workspaces api, I am forced to use the
hyprctl -jcommands.Version:
Bug reproduction
qs -c testhyprctl dispatch 'hl.dsp.focus({ workspace = "2", on_current_monitor = true })'(such that the workspaces swap places)Desired behavior
Upon swapping the workspaces, both monitors should be affected by the change in the moment of the swap, not when they are focused
Workaround
I use
Processes callinghyprctl monitors -j(and others), triggered byHyprland.onRawEventsignal handler. This provides me with up-to-date data.