NPill: Restored the old horizontal NPill

This commit is contained in:
LemmyCook 2025-09-14 18:07:43 -04:00
parent 19312d94c3
commit 7e965262f5
8 changed files with 58 additions and 87 deletions

View file

@ -28,6 +28,7 @@ Item {
return {}
}
readonly property bool isBarVertical: Settings.data.bar.position === "left" || Settings.data.bar.position === "right"
readonly property string displayMode: (widgetSettings.displayMode !== undefined) ? widgetSettings.displayMode : widgetMetadata.displayMode
// Used to avoid opening the pill on Quickshell startup
@ -79,9 +80,11 @@ Item {
icon: getIcon()
autoHide: false // Important to be false so we can hover as long as we want
text: {
return ""
var monitor = getMonitor()
return monitor ? Math.round(monitor.brightness * 100) : ""
}
suffix: text.length > 0 ? "%" : "-"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: {