Create Alt+tab window, refactor sortedDesktopApplications so they are inside a ListModel instead of a Map()

This commit is contained in:
2025-10-13 16:51:26 -03:00
parent f80abc48ae
commit 22c6bbf8ba
5 changed files with 189 additions and 25 deletions

View File

@@ -1,20 +1,13 @@
//@ pragma UseQApplication
import Quickshell
import qs.Widgets
import qs.Common
import qs.Services
ShellRoot {
// Bar {
// modelData: Quickshell.screens.values[0]
// barComponentsLeft: ["NotificationsWidget.qml"]
// barComponentsCenter: ["Workspaces.qml"]
// barComponentsRight: ["AudioWidget.qml", "SysTrayWidget.qml", "ClockWidget.qml"]
// }
id: root
// Bar {
// panelMonitor: "DP-2"
// barComponentsLeft: []
// barComponentsCenter: ["Workspaces.qml"]
// barComponentsRight: ["AudioWidget.qml", "ClockWidget.qml"]
// }
property bool createWindow: false
Variants {
model: Quickshell.screens
@@ -25,4 +18,21 @@ ShellRoot {
barComponentsRight: ["AudioWidget.qml", "SysTrayWidget.qml", "ClockWidget.qml"]
}
}
Shortcuts {
name: "showAltTab"
onPressed: {
root.createWindow = !root.createWindow;
}
}
LazyLoader {
id: windowLoader
active: root.createWindow
component: WindowSwitcher {
onClear: root.createWindow = false
}
}
}