Skip to content
Open
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
30 changes: 30 additions & 0 deletions modules/bar/workspaces/CompositorData.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,36 @@ Singleton {
// No-op: state is now pushed inline via axctl subscribe events
}

// Force refresh from hyprctl (used by overview after drag-and-drop)
property Process _refreshProcess: Process {
command: ["hyprctl", "clients", "-j"]
stdout: StdioCollector {
onStreamFinished: {
try {
var raw = JSON.parse(text);
if (raw && raw.length > 0)
root.refreshFromJson(raw);
} catch (e) {}
}
}
}

function refreshFromHyprctl() {
_refreshProcess.running = true;
}

function refreshFromJson(raw) {
root.windowList = raw;
let tempWinByAddress = {}
for (var i = 0; i < root.windowList.length; ++i) {
var win = root.windowList[i]
tempWinByAddress[win.address] = win
}
root.windowByAddress = tempWinByAddress
root.addresses = root.windowList.map((win) => win.address)
updateMaps()
}

function updateMaps() {
let occupationMap = {}
let windowsMap = {}
Expand Down
12 changes: 8 additions & 4 deletions modules/dock/DockContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,10 @@ Item {

onClicked: {
let visibilities = Visibilities.getForScreen(root.screen.name);
if (visibilities) {
visibilities.overview = !visibilities.overview;
if (visibilities && visibilities.overview) {
Visibilities.setActiveModule("");
} else {
Visibilities.setActiveModule("overview");
}
}

Expand Down Expand Up @@ -654,8 +656,10 @@ Item {

onClicked: {
let visibilities = Visibilities.getForScreen(root.screen.name);
if (visibilities) {
visibilities.overview = !visibilities.overview;
if (visibilities && visibilities.overview) {
Visibilities.setActiveModule("");
} else {
Visibilities.setActiveModule("overview");
}
}

Expand Down
Loading