Create Alt+tab window, refactor sortedDesktopApplications so they are inside a ListModel instead of a Map()
This commit is contained in:
34
shell.qml
34
shell.qml
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user