Something went wrong. Try again.
A Quickshell workspace overview for Hyprland.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154pragma Singletonpragma ComponentBehavior: Bound
import QtQuickimport QtCoreimport Quickshellimport Quickshell.Io
Singleton { id: root
function optionValue(path, fallback) { let current = root.settingsData;
for (let i = 0; i < path.length; i++) { if (current === null || current === undefined) return fallback;
current = current[path[i]]; }
return current === undefined || current === null ? fallback : current; }
function parseSettingsData() { try { const content = settingsFile.text();
if (!content || content.trim().length === 0) return ({});
return JSON.parse(content); } catch (error) { console.warn(`Failed to parse overview settings json: ${error}`); return ({}); } }
property string configDirectory: StandardPaths.standardLocations(StandardPaths.ConfigLocation)[0] property var settingsData: ({})
FileView { id: settingsFile path: `${root.configDirectory}/overzicht/settings.json` blockLoading: true watchChanges: true onLoadedChanged: if (loaded) root.settingsData = root.parseSettingsData() onFileChanged: { reload(); root.settingsData = root.parseSettingsData(); } }
Component.onCompleted: settingsData = parseSettingsData()
property QtObject options: QtObject { property QtObject appearance: QtObject { property QtObject rounding: QtObject { property int unsharpen: root.optionValue(["appearance", "rounding", "unsharpen"], 2) property int verysmall: root.optionValue(["appearance", "rounding", "verysmall"], 8) property int small: root.optionValue(["appearance", "rounding", "small"], 12) property int normal: root.optionValue(["appearance", "rounding", "normal"], 17) property int large: root.optionValue(["appearance", "rounding", "large"], 23) property int full: root.optionValue(["appearance", "rounding", "full"], 9999) property int screenRounding: root.optionValue(["appearance", "rounding", "screenRounding"], large) property int windowRounding: root.optionValue(["appearance", "rounding", "windowRounding"], 18) }
property QtObject font: QtObject { property QtObject family: QtObject { property string main: root.optionValue(["appearance", "font", "family", "main"], "sans-serif") property string title: root.optionValue(["appearance", "font", "family", "title"], "sans-serif") property string expressive: root.optionValue(["appearance", "font", "family", "expressive"], "sans-serif") }
property QtObject pixelSize: QtObject { property int smaller: root.optionValue(["appearance", "font", "pixelSize", "smaller"], 12) property int small: root.optionValue(["appearance", "font", "pixelSize", "small"], 15) property int normal: root.optionValue(["appearance", "font", "pixelSize", "normal"], 16) property int larger: root.optionValue(["appearance", "font", "pixelSize", "larger"], 19) property int huge: root.optionValue(["appearance", "font", "pixelSize", "huge"], 22) } }
property QtObject animation: QtObject { property QtObject duration: QtObject { property int elementMove: root.optionValue(["appearance", "animation", "duration", "elementMove"], 500) property int elementMoveEnter: root.optionValue(["appearance", "animation", "duration", "elementMoveEnter"], 400) property int elementMoveFast: root.optionValue(["appearance", "animation", "duration", "elementMoveFast"], 200) } }
property QtObject sizes: QtObject { property real elevationMargin: root.optionValue(["appearance", "sizes", "elevationMargin"], 10) } }
property QtObject overview: QtObject { property int rows: root.optionValue(["overview", "rows"], 2) property int columns: root.optionValue(["overview", "columns"], 4) property real scale: root.optionValue(["overview", "scale"], 0.12) property bool enable: root.optionValue(["overview", "enable"], true) property bool hideEmptyRows: root.optionValue(["overview", "hideEmptyRows"], false) property bool closeOnFocusLoss: root.optionValue(["overview", "closeOnFocusLoss"], true) property bool useWorkspaceMap: root.optionValue(["overview", "useWorkspaceMap"], false) property var workspaceMap: root.optionValue(["overview", "workspaceMap"], []) property bool orderRightLeft: root.optionValue(["overview", "orderRightLeft"], false) property bool orderBottomUp: root.optionValue(["overview", "orderBottomUp"], false) property bool previewsEnabled: root.optionValue(["overview", "previewsEnabled"], true) property string previewMode: root.optionValue(["overview", "previewMode"], "live") property bool includeInactiveMonitorPreviews: root.optionValue(["overview", "includeInactiveMonitorPreviews"], true) property int previewRecaptureDelayMs: root.optionValue(["overview", "previewRecaptureDelayMs"], 60) property string emptyWorkspaceWallpaper: root.optionValue(["overview", "emptyWorkspaceWallpaper"], "") property real workspaceSpacing: root.optionValue(["overview", "workspaceSpacing"], 5) property real backgroundPadding: root.optionValue(["overview", "backgroundPadding"], 10) property real workspaceNumberBaseSize: root.optionValue(["overview", "workspaceNumberBaseSize"], 250) property bool romanNumerals: root.optionValue(["overview", "romanNumerals"], false) property QtObject effects: QtObject { property bool enableBackdrop: root.optionValue(["overview", "effects", "enableBackdrop"], false) property real backdropOpacity: root.optionValue(["overview", "effects", "backdropOpacity"], 0.28) property real panelOpacity: root.optionValue(["overview", "effects", "panelOpacity"], 0.92) property real workspaceOpacity: root.optionValue(["overview", "effects", "workspaceOpacity"], 0.86) property real emptyWorkspaceWallpaperOverlayOpacity: root.optionValue(["overview", "effects", "emptyWorkspaceWallpaperOverlayOpacity"], 0.18) property real windowOverlayOpacity: root.optionValue(["overview", "effects", "windowOverlayOpacity"], 0.22) } }
property QtObject windowPreview: QtObject { property bool showIcons: root.optionValue(["windowPreview", "showIcons"], true) property real iconToWindowRatio: root.optionValue(["windowPreview", "iconToWindowRatio"], 0.25) property real iconToWindowRatioCompact: root.optionValue(["windowPreview", "iconToWindowRatioCompact"], 0.45) property real xwaylandIndicatorToIconRatio: root.optionValue(["windowPreview", "xwaylandIndicatorToIconRatio"], 0.35) property real inactiveMonitorOpacity: root.optionValue(["windowPreview", "inactiveMonitorOpacity"], 0.4) property bool cropToFill: root.optionValue(["windowPreview", "cropToFill"], false) property bool smoothTooltipMovement: root.optionValue(["windowPreview", "smoothTooltipMovement"], true) property QtObject tooltipAnimations: QtObject { property QtObject expandCollapse: QtObject { property bool enable: root.optionValue(["windowPreview", "tooltipAnimations", "expandCollapse", "enable"], true) } property QtObject fade: QtObject { property bool enable: root.optionValue(["windowPreview", "tooltipAnimations", "fade", "enable"], true) property int duration: root.optionValue(["windowPreview", "tooltipAnimations", "fade", "duration"], 200) } } }
property QtObject hacks: QtObject { property int arbitraryRaceConditionDelay: root.optionValue(["hacks", "arbitraryRaceConditionDelay"], 150) property int hyprlandEventDebounceMs: root.optionValue(["hacks", "hyprlandEventDebounceMs"], 40) } }}