organize files
This commit is contained in:
22
quickshell/helpers/WorkspaceHelpers.qml
Normal file
22
quickshell/helpers/WorkspaceHelpers.qml
Normal file
@@ -0,0 +1,22 @@
|
||||
import QtQuick
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
// =====================
|
||||
// Helpers
|
||||
// =====================
|
||||
function getWorkspace(id) {
|
||||
var list = Hyprland.workspaces.values;
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
if (list[i].id === id)
|
||||
return list[i];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function isWorkspaceActive(id) {
|
||||
return Hyprland.focusedWorkspace && Hyprland.focusedWorkspace.id === id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user