This commit is contained in:
Lysec
2026-03-01 21:55:22 +01:00
80 changed files with 987 additions and 363 deletions
+4
View File
@@ -836,6 +836,10 @@
"appearance-use-separate-opacity-label": "Use separate bar opacity",
"appearance-widget-spacing-description": "Adjust the spacing between each widget in the bar.",
"appearance-widget-spacing-label": "Widget spacing",
"behavior-workspace-scroll-description": "Choose what the mouse wheel does on empty areas of the bar.",
"behavior-workspace-scroll-label": "Bar mouse wheel action",
"behavior-wheel-wrap-description": "When enabled, scrolling continues from the last item to the first.",
"behavior-wheel-wrap-label": "Wrap around",
"monitor-configure-widgets": "Configure widgets",
"monitor-override-settings": "Override global settings",
"monitor-override-settings-description": "Use custom settings for this monitor.",
+7 -1
View File
@@ -69,6 +69,9 @@
}
]
},
"mouseWheelAction": "none",
"reverseScroll": false,
"mouseWheelWrap": true,
"screenOverrides": []
},
"general": {
@@ -346,7 +349,10 @@
"deadOpacity": 0.6,
"animationSpeed": 1,
"sitOnFrame": false,
"showFrameIndicator": true
"showDockIndicator": false,
"indicatorThickness": 3,
"indicatorColor": "primary",
"indicatorOpacity": 0.6
},
"network": {
"wifiEnabled": true,
+75 -11
View File
@@ -233,6 +233,15 @@
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.bar.appearance-capsule-color-label",
"descriptionKey": "panels.bar.appearance-capsule-color-description",
"widget": "NColorChoice",
"tab": 4,
"tabLabel": "panels.bar.title",
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.bar.appearance-capsule-opacity-label",
"descriptionKey": "panels.bar.appearance-capsule-opacity-description",
@@ -341,13 +350,40 @@
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.bar.behavior-workspace-scroll-label",
"descriptionKey": "panels.bar.behavior-workspace-scroll-description",
"widget": "NComboBox",
"tab": 4,
"tabLabel": "panels.bar.title",
"subTab": 2,
"subTabLabel": "common.behavior"
},
{
"labelKey": "panels.general.reverse-scrolling-label",
"descriptionKey": "panels.general.reverse-scrolling-description",
"widget": "NToggle",
"tab": 4,
"tabLabel": "panels.bar.title",
"subTab": 2,
"subTabLabel": "common.behavior"
},
{
"labelKey": "panels.bar.behavior-wheel-wrap-label",
"descriptionKey": "panels.bar.behavior-wheel-wrap-description",
"widget": "NToggle",
"tab": 4,
"tabLabel": "panels.bar.title",
"subTab": 2,
"subTabLabel": "common.behavior"
},
{
"labelKey": "panels.bar.monitor-override-settings",
"descriptionKey": "panels.bar.monitor-override-settings-description",
"widget": "NToggle",
"tab": 4,
"tabLabel": "panels.bar.title",
"subTab": 2,
"subTab": 3,
"subTabLabel": "common.monitors"
},
{
@@ -664,14 +700,41 @@
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.dock.appearance-frame-indicator-label",
"descriptionKey": "panels.dock.appearance-frame-indicator-description",
"labelKey": "panels.dock.appearance-dock-indicator-label",
"descriptionKey": "panels.dock.appearance-dock-indicator-description",
"widget": "NToggle",
"tab": 5,
"tabLabel": "panels.dock.title",
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.dock.appearance-indicator-thickness-label",
"descriptionKey": "panels.dock.appearance-indicator-thickness-description",
"widget": "NToggle",
"tab": 5,
"tabLabel": "panels.dock.title",
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.dock.appearance-indicator-color-label",
"descriptionKey": "panels.dock.appearance-indicator-color-description",
"widget": "NColorChoice",
"tab": 5,
"tabLabel": "panels.dock.title",
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.dock.appearance-indicator-opacity-label",
"descriptionKey": "panels.dock.appearance-indicator-opacity-description",
"widget": "NValueSlider",
"tab": 5,
"tabLabel": "panels.dock.title",
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.osd.background-opacity-label",
"descriptionKey": "panels.dock.appearance-background-opacity-description",
@@ -807,6 +870,15 @@
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "common.select-icon-color",
"descriptionKey": null,
"widget": "NColorChoice",
"tab": 5,
"tabLabel": "panels.dock.title",
"subTab": 0,
"subTabLabel": "common.appearance"
},
{
"labelKey": "panels.general.profile-picture-label",
"descriptionKey": "panels.general.profile-picture-description",
@@ -847,14 +919,6 @@
"tabLabel": "common.general",
"subTab": null
},
{
"labelKey": "panels.general.reverse-scrolling-label",
"descriptionKey": "panels.general.reverse-scrolling-description",
"widget": "NToggle",
"tab": 0,
"tabLabel": "common.general",
"subTab": null
},
{
"labelKey": "panels.general.keybinds-title",
"descriptionKey": "panels.general.keybinds-description",
+8 -8
View File
@@ -125,10 +125,7 @@
"visualizerType": "linear",
"textColor": "none",
"compactMode": false,
"panelShowAlbumArt": true,
"panelShowVisualizer": true,
"compactShowAlbumArt": true,
"compactShowVisualizer": false
"panelShowAlbumArt": true
},
"Microphone": {
"displayMode": "onhover",
@@ -254,28 +251,31 @@
"desktop": {
"Clock": {
"showBackground": true,
"roundedCorners": true,
"clockStyle": "digital",
"clockColor": "none",
"useCustomFont": false,
"customFont": "",
"format": "HH:mm\\nd MMMM yyyy"
},
"MediaPlayer": {
"showBackground": true,
"roundedCorners": true,
"visualizerType": "linear",
"hideMode": "visible",
"showButtons": true,
"showAlbumArt": true,
"showVisualizer": true,
"roundedCorners": true
"showVisualizer": true
},
"Weather": {
"showBackground": true
"showBackground": true,
"roundedCorners": true
},
"SystemStat": {
"showBackground": true,
"roundedCorners": true,
"statType": "CPU",
"diskPath": "/",
"roundedCorners": true,
"layout": "bottom"
}
}
+7 -2
View File
@@ -256,7 +256,9 @@ Singleton {
}
]
}
property string mouseWheelAction: "none"
property bool reverseScroll: false
property bool mouseWheelWrap: true
// Per-screen overrides for position and widgets
// Format: [{ "name": "HDMI-1", "position": "left" }, { "name": "DP-1", "position": "bottom", "widgets": {...} }]
property list<var> screenOverrides: []
@@ -546,7 +548,10 @@ Singleton {
property double deadOpacity: 0.6
property real animationSpeed: 1.0 // Speed multiplier for hide/show animations (0.1 = slowest, 2.0 = fastest)
property bool sitOnFrame: false
property bool showFrameIndicator: true
property bool showDockIndicator: false
property int indicatorThickness: 3
property string indicatorColor: "primary"
property real indicatorOpacity: 0.6
}
// network
+120 -19
View File
@@ -7,6 +7,7 @@ import Quickshell.Wayland
import qs.Commons
import qs.Modules.Bar.Extras
import qs.Modules.Notification
import qs.Services.Compositor
import qs.Services.UI
import qs.Widgets
@@ -180,6 +181,13 @@ Item {
Item {
id: bar
// Wheel scroll handling (empty bar area)
property int barWheelAccumulatedDelta: 0
property bool barWheelCooldown: false
readonly property string barWheelAction: {
return Settings.data.bar.mouseWheelAction || "none";
}
// Position and size the bar content based on orientation
x: (root.barPosition === "right") ? (parent.width - root.barHeight) : 0
y: (root.barPosition === "bottom") ? (parent.height - root.barHeight) : 0
@@ -263,6 +271,69 @@ Item {
return -1;
}
function isPointOverWidget(xPos, yPos) {
var widgets = BarService.getAllWidgetInstances(null, screen.name);
for (var i = 0; i < widgets.length; i++) {
var widget = widgets[i];
if (!widget || !widget.visible || widget.widgetId === "Spacer") {
continue;
}
var localPos = mapToItem(widget, xPos, yPos);
if (root.barIsVertical) {
if (localPos.y >= -Style.marginS && localPos.y <= widget.height + Style.marginS) {
return true;
}
} else {
if (localPos.x >= -Style.marginS && localPos.x <= widget.width + Style.marginS) {
return true;
}
}
}
return false;
}
function switchWorkspaceByOffset(offset) {
if (!root.screen || CompositorService.workspaces.count === 0)
return;
var screenName = root.screen.name.toLowerCase();
var candidates = [];
for (var i = 0; i < CompositorService.workspaces.count; i++) {
var ws = CompositorService.workspaces.get(i);
var matchesScreen = CompositorService.globalWorkspaces || (ws.output && ws.output.toLowerCase() === screenName);
if (matchesScreen)
candidates.push(ws);
}
if (candidates.length <= 1)
return;
var current = -1;
for (var j = 0; j < candidates.length; j++) {
if (candidates[j].isFocused) {
current = j;
break;
}
}
if (current < 0)
current = 0;
var next = current + offset;
if (Settings.data.bar.mouseWheelWrap) {
next = next % candidates.length;
if (next < 0)
next = candidates.length - 1;
} else {
if (next < 0 || next >= candidates.length)
return;
}
if (next === current)
return;
CompositorService.switchToWorkspace(candidates[next]);
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton
@@ -270,26 +341,8 @@ Item {
preventStealing: true
onClicked: mouse => {
if (mouse.button === Qt.RightButton) {
// Check if click is over any widget
var widgets = BarService.getAllWidgetInstances(null, screen.name);
for (var i = 0; i < widgets.length; i++) {
var widget = widgets[i];
if (!widget || !widget.visible || widget.widgetId === "Spacer") {
continue;
}
// Map click position to widget's coordinate space
var localPos = mapToItem(widget, mouse.x, mouse.y);
if (root.barIsVertical) {
if (localPos.y >= -Style.marginS && localPos.y <= widget.height + Style.marginS) {
if (bar.isPointOverWidget(mouse.x, mouse.y))
return;
}
} else {
if (localPos.x >= -Style.marginS && localPos.x <= widget.width + Style.marginS) {
return;
}
}
}
// Click is on empty bar background - open control center
var controlCenterPanel = PanelService.getPanel("controlCenterPanel", screen);
@@ -304,6 +357,54 @@ Item {
}
}
// Debounce timer for wheel interactions
Timer {
id: barWheelDebounce
interval: 150
repeat: false
onTriggered: {
bar.barWheelCooldown = false;
bar.barWheelAccumulatedDelta = 0;
}
}
// Scroll on empty bar area to switch workspaces
WheelHandler {
id: barWheelHandler
target: bar
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
enabled: bar.barWheelAction !== "none"
onWheel: function (event) {
if (bar.barWheelCooldown)
return;
if (bar.isPointOverWidget(event.x, event.y))
return;
var dy = event.angleDelta.y;
var dx = event.angleDelta.x;
var useDy = Math.abs(dy) >= Math.abs(dx);
var delta = useDy ? dy : dx;
bar.barWheelAccumulatedDelta += delta;
var step = 120;
if (Math.abs(bar.barWheelAccumulatedDelta) >= step) {
var direction = bar.barWheelAccumulatedDelta > 0 ? -1 : 1;
if (Settings.data.bar.reverseScroll)
direction *= -1;
if (bar.barWheelAction === "workspace") {
bar.switchWorkspaceByOffset(direction);
} else if (bar.barWheelAction === "content") {
CompositorService.scrollWorkspaceContent(direction);
}
bar.barWheelCooldown = true;
barWheelDebounce.restart();
bar.barWheelAccumulatedDelta = 0;
event.accepted = true;
}
}
}
Loader {
anchors.fill: parent
sourceComponent: root.barIsVertical ? verticalBarComponent : horizontalBarComponent
+12 -8
View File
@@ -194,20 +194,21 @@ Item {
acceptedButtons: Qt.LeftButton | Qt.RightButton
cursorShape: Qt.PointingHandCursor
onEntered: {
if (root.tooltipContent) {
if (!getBatteryPanel()?.isPanelOpen && root.tooltipContent) {
TooltipService.show(root, root.tooltipContent, BarService.getTooltipDirection(root.screen?.name));
}
tooltipRefreshTimer.start();
}
}
onExited: {
tooltipRefreshTimer.stop();
TooltipService.hide();
}
onClicked: mouse => {
TooltipService.hide();
if (mouse.button === Qt.RightButton) {
PanelService.showContextMenu(contextMenu, nBattery, screen);
} else {
openBatteryPanel();
toggleBatteryPanel();
}
}
}
@@ -238,22 +239,25 @@ Item {
forceClose: root.displayMode === "icon-only" || !root.isReady
customBackgroundColor: root.isCharging ? Color.mPrimary : ((root.isLowBattery || root.isCriticalBattery) ? Color.mError : "transparent")
customTextIconColor: root.isCharging ? Color.mOnPrimary : ((root.isLowBattery || root.isCriticalBattery) ? Color.mOnError : "transparent")
tooltipText: root.tooltipContent
onClicked: openBatteryPanel()
tooltipText: !getBatteryPanel()?.isPanelOpen ? root.tooltipContent : ""
onClicked: toggleBatteryPanel()
onRightClicked: PanelService.showContextMenu(contextMenu, pill, screen)
}
// ==================== SHARED ====================
function openBatteryPanel() {
function getBatteryPanel() {
var panel = PanelService.getPanel("batteryPanel", screen);
if (panel) {
panel.panelID = {
showPowerProfiles: widgetSettings.showPowerProfiles !== undefined ? widgetSettings.showPowerProfiles : widgetMetadata.showPowerProfiles,
showNoctaliaPerformance: widgetSettings.showNoctaliaPerformance !== undefined ? widgetSettings.showNoctaliaPerformance : widgetMetadata.showNoctaliaPerformance
};
panel.toggle(root);
}
return panel;
}
function toggleBatteryPanel() {
getBatteryPanel()?.toggle(root);
}
}
+3
View File
@@ -110,6 +110,9 @@ Item {
PanelService.showContextMenu(contextMenu, pill, screen);
}
tooltipText: {
if (PanelService.getPanel("bluetoothPanel", screen)?.isPanelOpen) {
return "";
}
if (pill.text !== "") {
return pill.text;
}
+2 -1
View File
@@ -163,7 +163,8 @@ Item {
forceClose: displayMode === "alwaysHide"
tooltipText: {
var monitor = brightnessMonitor;
if (!monitor || !monitor.brightnessControlAvailable || isNaN(monitor.brightness))
var panel = PanelService.getPanel("brightnessPanel", screen);
if (panel?.isPanelOpen || !monitor || !monitor.brightnessControlAvailable || isNaN(monitor.brightness))
return "";
return I18n.tr("tooltips.brightness-at", {
"brightness": Math.round(monitor.brightness * 100)
+7 -1
View File
@@ -49,7 +49,13 @@ NIconButton {
// If we have a custom path and not using distro logo, use the theme icon.
// If using distro logo, don't use theme icon.
icon: (customIconPath === "" && !useDistroLogo) ? customIcon : ""
tooltipText: I18n.tr("tooltips.open-control-center")
tooltipText: {
if (PanelService.getPanel("controlCenterPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.open-control-center");
}
}
tooltipDirection: BarService.getTooltipDirection(screen?.name)
baseSize: Style.getCapsuleHeightForScreen(screen?.name)
applyUiScale: false
+15
View File
@@ -221,13 +221,22 @@ Item {
if (showExecTooltip && hasExec) {
if (leftClickExec !== "") {
lines.push(I18n.tr("bar.custom-button.left-click-label") + `: ${leftClickExec}`);
} else {
lines.push(I18n.tr("bar.custom-button.left-click-label") + ": " + I18n.tr("actions.widget-settings"));
}
if (rightClickExec !== "") {
lines.push(I18n.tr("bar.custom-button.right-click-label") + `: ${rightClickExec}`);
} else {
lines.push(I18n.tr("bar.custom-button.right-click-label") + ": " + I18n.tr("actions.widget-settings"));
}
if (middleClickExec !== "") {
lines.push(I18n.tr("bar.custom-button.middle-click-label") + `: ${middleClickExec}`);
} else {
lines.push(I18n.tr("bar.custom-button.middle-click-label") + ": " + I18n.tr("actions.widget-settings"));
}
if (wheelMode === "unified" && wheelExec !== "") {
lines.push(I18n.tr("bar.custom-button.wheel-label") + `: ${wheelExec}`);
} else if (wheelMode === "separate") {
@@ -514,6 +523,9 @@ Item {
Quickshell.execDetached(["sh", "-lc", rightClickExec]);
Logger.i("CustomButton", `Executing command: ${rightClickExec}`);
}
if (!rightClickUpdateText) {
BarService.openWidgetSettings(screen, section, sectionWidgetIndex, widgetId, widgetSettings);
}
if (!textStream && rightClickUpdateText) {
runTextCommand();
}
@@ -524,6 +536,9 @@ Item {
Quickshell.execDetached(["sh", "-lc", middleClickExec]);
Logger.i("CustomButton", `Executing command: ${middleClickExec}`);
}
if (!middleClickUpdateText) {
BarService.openWidgetSettings(screen, section, sectionWidgetIndex, widgetId, widgetSettings);
}
if (!textStream && middleClickUpdateText) {
runTextCommand();
}
+18 -25
View File
@@ -39,17 +39,17 @@ Item {
readonly property real barFontSize: Style.getBarFontSizeForScreen(screenName)
// Widget settings
readonly property string hideMode: (widgetSettings.hideMode !== undefined) ? widgetSettings.hideMode : "hidden"
readonly property bool hideWhenIdle: (widgetSettings.hideWhenIdle !== undefined) ? widgetSettings.hideWhenIdle : (widgetMetadata.hideWhenIdle !== undefined ? widgetMetadata.hideWhenIdle : false)
readonly property bool showAlbumArt: (widgetSettings.showAlbumArt !== undefined) ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
readonly property bool showArtistFirst: (widgetSettings.showArtistFirst !== undefined) ? widgetSettings.showArtistFirst : widgetMetadata.showArtistFirst
readonly property bool showVisualizer: (widgetSettings.showVisualizer !== undefined) ? widgetSettings.showVisualizer : widgetMetadata.showVisualizer
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType !== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
readonly property string scrollingMode: (widgetSettings.scrollingMode !== undefined) ? widgetSettings.scrollingMode : widgetMetadata.scrollingMode
readonly property bool showProgressRing: (widgetSettings.showProgressRing !== undefined) ? widgetSettings.showProgressRing : widgetMetadata.showProgressRing
readonly property bool useFixedWidth: (widgetSettings.useFixedWidth !== undefined) ? widgetSettings.useFixedWidth : widgetMetadata.useFixedWidth
readonly property real maxWidth: (widgetSettings.maxWidth !== undefined) ? widgetSettings.maxWidth : Math.max(widgetMetadata.maxWidth, screen ? screen.width * 0.06 : 0)
readonly property string textColorKey: (widgetSettings.textColor !== undefined) ? widgetSettings.textColor : widgetMetadata.textColor
readonly property string hideMode: widgetSettings.hideMode !== undefined ? widgetSettings.hideMode : widgetMetadata.hideMode
readonly property bool hideWhenIdle: widgetSettings.hideWhenIdle !== undefined ? widgetSettings.hideWhenIdle : widgetMetadata.hideWhenIdle
readonly property bool showAlbumArt: widgetSettings.showAlbumArt !== undefined ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
readonly property bool showArtistFirst: widgetSettings.showArtistFirst !== undefined ? widgetSettings.showArtistFirst : widgetMetadata.showArtistFirst
readonly property bool showVisualizer: widgetSettings.showVisualizer !== undefined ? widgetSettings.showVisualizer : widgetMetadata.showVisualizer
readonly property string visualizerType: widgetSettings.visualizerType !== undefined ? widgetSettings.visualizerType : widgetMetadata.visualizerType
readonly property string scrollingMode: widgetSettings.scrollingMode !== undefined ? widgetSettings.scrollingMode : widgetMetadata.scrollingMode
readonly property bool showProgressRing: widgetSettings.showProgressRing !== undefined ? widgetSettings.showProgressRing : widgetMetadata.showProgressRing
readonly property bool useFixedWidth: widgetSettings.useFixedWidth !== undefined ? widgetSettings.useFixedWidth : widgetMetadata.useFixedWidth
readonly property real maxWidth: widgetSettings.maxWidth !== undefined ? widgetSettings.maxWidth : Math.max(widgetMetadata.maxWidth, screen ? screen.width * 0.06 : 0)
readonly property string textColorKey: widgetSettings.textColor !== undefined ? widgetSettings.textColor : widgetMetadata.textColor
readonly property color textColor: Color.resolveColorKey(textColorKey)
// Dimensions
@@ -96,16 +96,6 @@ Item {
}
}
readonly property string tooltipText: {
var text = title;
var controls = [];
controls.push("Left click to open player.");
controls.push("Right click for options.");
if (MediaService.canGoPrevious)
controls.push("Middle click for previous.");
return controls.length ? `${text}\n\n${controls.join("\n")}` : text;
}
// Layout
// For horizontal bars, height is always capsuleHeight (no animation needed to prevent jitter)
// For vertical bars, collapse to 0 when hidden
@@ -395,22 +385,25 @@ Item {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton | Qt.ForwardButton | Qt.BackButton
onClicked: mouse => {
TooltipService.hide();
if (mouse.button === Qt.LeftButton) {
PanelService.getPanel("mediaPlayerPanel", screen)?.toggle(container);
} else if (mouse.button === Qt.RightButton) {
TooltipService.hide();
PanelService.showContextMenu(contextMenu, container, screen);
} else if (mouse.button === Qt.MiddleButton && hasPlayer) {
MediaService.playPause();
TooltipService.hide();
} else if (mouse.button === Qt.ForwardButton && hasPlayer) {
MediaService.next();
} else if (mouse.button === Qt.BackButton && hasPlayer) {
MediaService.previous();
}
}
onEntered: {
if (isVertical || scrollingMode === "never") {
if ((isVertical || scrollingMode === "never") && !PanelService.getPanel("mediaPlayerPanel", screen)?.isPanelOpen) {
TooltipService.show(root, title, BarService.getTooltipDirection(root.screen?.name));
}
}
+8 -2
View File
@@ -143,13 +143,19 @@ Item {
suffix: "%"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: I18n.tr("tooltips.microphone-volume-at", {
tooltipText: {
if (PanelService.getPanel("audioPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.microphone-volume-at", {
"volume": (() => {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const displayVolume = Math.min(maxVolume, AudioService.inputVolume);
return Math.round(displayVolume * 100);
})()
})
});
}
}
onWheel: function (delta) {
// As soon as we start scrolling to adjust volume, hide the tooltip
+3
View File
@@ -131,6 +131,9 @@ Item {
PanelService.showContextMenu(contextMenu, pill, screen);
}
tooltipText: {
if (PanelService.getPanel("networkPanel", screen)) {
return "";
}
try {
if (NetworkService.ethernetConnected) {
const d = NetworkService.activeEthernetDetails || ({});
+7 -1
View File
@@ -59,7 +59,13 @@ NIconButton {
applyUiScale: false
customRadius: Style.radiusL
icon: NotificationService.doNotDisturb ? "bell-off" : "bell"
tooltipText: NotificationService.doNotDisturb ? I18n.tr("tooltips.open-notification-history-enable-dnd") : I18n.tr("tooltips.open-notification-history-enable-dnd")
tooltipText: {
if (PanelService.getPanel("notificationHistoryPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.open-notification-history-enable-dnd");
}
}
tooltipDirection: BarService.getTooltipDirection(screen?.name)
colorBg: Style.capsuleColor
colorFg: Color.resolveColorKey(iconColorKey)
+6 -1
View File
@@ -37,7 +37,12 @@ NIconButton {
applyUiScale: false
customRadius: Style.radiusL
icon: "power"
tooltipText: I18n.tr("tooltips.session-menu")
tooltipText: {
if (PanelService.getPanel("sessionMenuPanel", screen)?.isPanelOpen)
return "";
else
return I18n.tr("tooltips.session-menu");
}
tooltipDirection: BarService.getTooltipDirection(screenName)
colorBg: Style.capsuleColor
colorFg: Color.resolveColorKey(iconColorKey)
+7 -1
View File
@@ -34,7 +34,13 @@ NIconButton {
readonly property color iconColor: Color.resolveColorKey(valueIconColor)
icon: "settings"
tooltipText: !PanelService.getPanel("settingsPanel", screen)?.isPanelOpen ? I18n.tr("tooltips.open-settings") : ""
tooltipText: {
if (PanelService.getPanel("settingsPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.open-settings");
}
}
tooltipDirection: BarService.getTooltipDirection(screen?.name)
baseSize: Style.getCapsuleHeightForScreen(screen?.name)
applyUiScale: false
+2
View File
@@ -924,9 +924,11 @@ Item {
}
}
onEntered: {
if (!PanelService.getPanel("systemStatsPanel", screen).isPanelOpen) {
TooltipService.show(root, buildTooltipContent(), BarService.getTooltipDirection(root.screen?.name));
tooltipRefreshTimer.start();
}
}
onExited: {
tooltipRefreshTimer.stop();
TooltipService.hide();
+7 -1
View File
@@ -349,7 +349,13 @@ Item {
visible: root.drawerEnabled && dropdownItems.length > 0 && BarService.getPillDirection(root)
width: isVertical ? barHeight : capsuleHeight
height: isVertical ? capsuleHeight : barHeight
tooltipText: I18n.tr("tooltips.open-tray-dropdown")
tooltipText: {
if (PanelService.getPanel("trayDrawerPanel", root.screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.open-tray-dropdown");
}
}
tooltipDirection: BarService.getTooltipDirection(root.screen?.name)
baseSize: capsuleHeight
applyUiScale: false
+8 -2
View File
@@ -136,13 +136,19 @@ Item {
suffix: "%"
forceOpen: displayMode === "alwaysShow"
forceClose: displayMode === "alwaysHide"
tooltipText: I18n.tr("tooltips.volume-at", {
tooltipText: {
if (PanelService.getPanel("audioPanel", screen)?.isPanelOpen) {
return "";
} else {
I18n.tr("tooltips.volume-at", {
"volume": (() => {
const maxVolume = Settings.data.audio.volumeOverdrive ? 1.5 : 1.0;
const displayVolume = Math.min(maxVolume, AudioService.volume);
return Math.round(displayVolume * 100);
})()
})
});
}
}
onWheel: function (delta) {
// Hide tooltip as soon as the user starts scrolling to adjust volume
+7 -1
View File
@@ -37,7 +37,13 @@ NIconButton {
applyUiScale: false
customRadius: Style.radiusL
icon: "wallpaper-selector"
tooltipText: I18n.tr("tooltips.wallpaper-selector")
tooltipText: {
if (PanelService.getPanel("wallpaperPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.wallpaper-selector");
}
}
tooltipDirection: BarService.getTooltipDirection(screen?.name)
colorBg: Style.capsuleColor
colorFg: Color.resolveColorKey(iconColorKey)
+3 -1
View File
@@ -181,7 +181,7 @@ Item {
}
function switchByOffset(offset) {
if (localWorkspaces.count === 0)
if (localWorkspaces.count <= 1)
return;
var current = getFocusedLocalIndex();
if (current < 0)
@@ -189,6 +189,8 @@ Item {
var next = (current + offset) % localWorkspaces.count;
if (next < 0)
next = localWorkspaces.count - 1;
if (next === current)
return;
const ws = localWorkspaces.get(next);
if (ws && ws.idx !== undefined)
CompositorService.switchToWorkspace(ws);
+1 -1
View File
@@ -104,7 +104,7 @@ Rectangle {
}
NText {
text: root.weatherReady && !Settings.data.location.hideWeatherTimezone ? ` (${LocationService.data.weather.timezone_abbreviation})` : ""
text: root.weatherReady && !Settings.data.location.hideWeatherTimezone ? `${Settings.data.location.hideWeatherCityName ? "" : " "}(${LocationService.data.weather.timezone_abbreviation})` : ""
pointSize: Style.fontSizeXS
color: Qt.alpha(Color.mOnPrimary, 0.7)
}
@@ -21,8 +21,9 @@ Item {
readonly property bool isDragging: internal.isDragging
readonly property bool isScaling: internal.isScaling
property bool showBackground: (widgetData && widgetData.showBackground !== undefined) ? widgetData.showBackground : true
property bool roundedCorners: (widgetData && widgetData.roundedCorners !== undefined) ? widgetData.roundedCorners : true
// All Desktop widgets have these settings, but fallback just in case
property bool showBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : (widgetMetadata?.showBackground ?? true)
property bool roundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : (widgetMetadata?.roundedCorners ?? true)
property real widgetScale: 1.0
property real minScale: 0.5
@@ -14,12 +14,12 @@ DraggableDesktopWidget {
readonly property color clockTextColor: Color.resolveColorKey(clockColor)
readonly property real fontSize: Math.round(Style.fontSizeXXXL * 2.5 * widgetScale)
readonly property real widgetOpacity: (widgetData && widgetData.opacity !== undefined) ? widgetData.opacity : 1.0
readonly property string clockStyle: (widgetData && widgetData.clockStyle !== undefined) ? widgetData.clockStyle : (widgetMetadata.clockStyle !== undefined ? widgetMetadata.clockStyle : "digital")
readonly property string clockColor: (widgetData && widgetData.clockColor !== undefined) ? widgetData.clockColor : (widgetMetadata.clockColor !== undefined ? widgetMetadata.clockColor : "none")
readonly property bool useCustomFont: (widgetData && widgetData.useCustomFont !== undefined) ? widgetData.useCustomFont : (widgetMetadata.useCustomFont !== undefined ? widgetMetadata.useCustomFont : false)
readonly property string customFont: (widgetData && widgetData.customFont !== undefined) ? widgetData.customFont : ""
readonly property string format: (widgetData && widgetData.format !== undefined) ? widgetData.format : (widgetMetadata.format !== undefined ? widgetMetadata.format : "HH:mm\\nd MMMM yyyy")
readonly property real widgetOpacity: widgetData.opacity !== undefined ? widgetData.opacity : 1.0
readonly property string clockStyle: widgetData.clockStyle !== undefined ? widgetData.clockStyle : widgetMetadata.clockStyle
readonly property string clockColor: widgetData.clockColor !== undefined ? widgetData.clockColor : widgetMetadata.clockColor
readonly property bool useCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont
readonly property string customFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.customFont
readonly property string format: widgetData.format !== undefined ? widgetData.format : widgetMetadata.format
readonly property real contentPadding: Math.round((clockStyle === "minimal" ? Style.marginL : Style.marginXL) * widgetScale)
implicitWidth: contentLoader.item ? Math.round((contentLoader.item.implicitWidth || contentLoader.item.width || 0) + contentPadding * 2) : 0
+107 -47
View File
@@ -80,8 +80,10 @@ Loader {
readonly property int showDelay: 100
readonly property int hideAnimationDuration: Math.max(0, Math.round(Style.animationFast / (Settings.data.dock.animationSpeed || 1.0)))
readonly property int showAnimationDuration: Math.max(0, Math.round(Style.animationFast / (Settings.data.dock.animationSpeed || 1.0)))
readonly property int peekHeight: 1
readonly property int indicatorThickness: 3
readonly property int peekThickness: 1
readonly property int indicatorThickness: Settings.data.dock.indicatorThickness || 3
readonly property string indicatorColorKey: Settings.data.dock.indicatorColor || "primary"
readonly property real indicatorOpacity: Settings.data.dock.indicatorOpacity !== undefined ? Settings.data.dock.indicatorOpacity : 0.6
readonly property int iconSize: Math.round(12 + 24 * (Settings.data.dock.size ?? 1))
readonly property int floatingMargin: Settings.data.dock.floatingRatio * Style.marginL
readonly property int maxWidth: modelData ? modelData.width * 0.8 : 1000
@@ -100,10 +102,18 @@ Loader {
readonly property real barMarginH: Settings.data.bar.floating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0
readonly property real barMarginV: Settings.data.bar.floating ? Math.ceil(Settings.data.bar.marginVertical) : 0
readonly property int barHeight: Style.getBarHeightForScreen(modelData?.name)
readonly property bool staticPanelOpen: {
if (!isStaticMode)
return false;
var panel = getStaticDockPanel();
if (panel && panel.isPanelOpen !== undefined)
return panel.isPanelOpen;
return false;
}
readonly property int peekEdgeLength: {
const edgeSize = isVertical ? Math.round(modelData?.height || maxHeight) : Math.round(modelData?.width || maxWidth);
const minLength = Math.max(1, Math.round(edgeSize * ((isStaticMode && Settings.data.dock.showFrameIndicator && Settings.data.bar.barType === "framed" && hasBar) ? 0.1 : 0.25)));
return Math.max(minLength, frameIndicatorLength);
const minLength = Math.max(1, Math.round(edgeSize * (Settings.data.dock.showDockIndicator ? 0.1 : 0.25)));
return Math.max(minLength, dockIndicatorLength);
}
readonly property int peekCenterOffsetX: {
if (isVertical)
@@ -139,16 +149,14 @@ Loader {
}
return Math.max(0, Math.round((edgeSize - peekEdgeLength) / 2));
}
readonly property bool showFrameIndicator: {
if (!isStaticMode || !Settings.data.dock.showFrameIndicator || Settings.data.bar.barType !== "framed" || !hasBar)
readonly property bool showDockIndicator: {
if (!Settings.data.dock.showDockIndicator || (!autoHide && !isStaticMode) || !hidden)
return false;
var panel = getStaticDockPanel();
if (panel && panel.isPanelOpen !== undefined)
return !panel.isPanelOpen;
return hidden;
return !staticPanelOpen;
}
readonly property int dockItemCount: dockApps.length + (Settings.data.dock.showLauncherIcon ? 1 : 0)
readonly property int frameIndicatorLength: {
readonly property bool indicatorVisible: showDockIndicator && dockIndicatorLength > 0
readonly property int dockIndicatorLength: {
if (dockItemCount <= 0)
return 0;
const spacing = Style.marginS;
@@ -617,13 +625,7 @@ Loader {
interval: showDelay
onTriggered: {
if (autoHide) {
if (isStaticMode) {
if (dockItemCount <= 0)
return;
const panel = getStaticDockPanel();
if (panel && !panel.isPanelOpen)
panel.open();
} else {
if (!isStaticMode) {
dockLoaded = true; // Load dock immediately
}
hidden = false; // Then trigger show animation
@@ -648,7 +650,7 @@ Loader {
// PEEK WINDOW
Loader {
active: (barIsReady || !hasBar) && modelData && (Settings.data.dock.monitors.length === 0 || Settings.data.dock.monitors.includes(modelData.name)) && (autoHide || isStaticMode)
active: (barIsReady || !hasBar) && modelData && (Settings.data.dock.monitors.length === 0 || Settings.data.dock.monitors.includes(modelData.name))
sourceComponent: PanelWindow {
id: peekWindow
@@ -662,32 +664,15 @@ Loader {
focusable: false
color: "transparent"
// When bar is at same edge, position peek window past the bar so it receives mouse events
margins.top: isVertical ? peekCenterOffsetY : (dockPosition === "top" && barAtSameEdge && !showFrameIndicator ? (barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginVertical : 0)) : 0)
margins.bottom: dockPosition === "bottom" && barAtSameEdge && !showFrameIndicator ? (barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginVertical : 0)) : 0
margins.left: !isVertical ? peekCenterOffsetX : (dockPosition === "left" && barAtSameEdge && !showFrameIndicator ? (barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginHorizontal : 0)) : 0)
margins.right: dockPosition === "right" && barAtSameEdge && !showFrameIndicator ? (barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginHorizontal : 0)) : 0
margins.top: peekCenterOffsetY
margins.left: peekCenterOffsetX
WlrLayershell.namespace: "noctalia-dock-peek-" + (screen?.name || "unknown")
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.exclusionMode: ExclusionMode.Ignore
// Larger peek area when bar is at same edge, normal 1px otherwise
implicitHeight: isVertical ? peekEdgeLength : ((showFrameIndicator || barAtSameEdge) ? indicatorThickness : peekHeight)
implicitWidth: isVertical ? ((showFrameIndicator || barAtSameEdge) ? indicatorThickness : peekHeight) : peekEdgeLength
Rectangle {
anchors.fill: parent
radius: indicatorThickness
color: Qt.alpha(Color.mPrimary, 0.6)
opacity: showFrameIndicator && frameIndicatorLength > 0 ? 1 : 0
visible: opacity > 0
Behavior on opacity {
NumberAnimation {
duration: Style.animationFast
easing.type: Easing.InOutQuad
}
}
}
implicitHeight: isVertical ? peekEdgeLength : peekThickness
implicitWidth: isVertical ? peekThickness : peekEdgeLength
MouseArea {
id: peekArea
@@ -696,7 +681,7 @@ Loader {
onEntered: {
peekHovered = true;
if (isStaticMode && !autoHide) {
if (isStaticMode) {
if (dockItemCount <= 0)
return;
const panel = getStaticDockPanel();
@@ -704,10 +689,6 @@ Loader {
panel.open();
return;
}
if (isStaticMode) {
showTimer.start();
return;
}
if (hidden) {
showTimer.start();
}
@@ -724,6 +705,85 @@ Loader {
}
}
// DOCK INDICATOR WINDOW
Loader {
active: (barIsReady || !hasBar) && modelData && (Settings.data.dock.monitors.length === 0 || Settings.data.dock.monitors.includes(modelData.name))
sourceComponent: PanelWindow {
id: dockIndicatorWindow
screen: modelData
// Dynamic anchors based on dock position
anchors.top: dockPosition === "top" || isVertical
anchors.bottom: dockPosition === "bottom"
anchors.left: dockPosition === "left" || !isVertical
anchors.right: dockPosition === "right"
focusable: false
color: "transparent"
property real targetIndicatorOffsetX: peekCenterOffsetX
property real targetIndicatorOffsetY: peekCenterOffsetY
property real animatedIndicatorOffsetX: targetIndicatorOffsetX
property real animatedIndicatorOffsetY: targetIndicatorOffsetY
onTargetIndicatorOffsetXChanged: animatedIndicatorOffsetX = targetIndicatorOffsetX
onTargetIndicatorOffsetYChanged: animatedIndicatorOffsetY = targetIndicatorOffsetY
Behavior on animatedIndicatorOffsetX {
NumberAnimation {
duration: Style.animationNormal
easing.type: Easing.InOutQuad
}
}
Behavior on animatedIndicatorOffsetY {
NumberAnimation {
duration: Style.animationNormal
easing.type: Easing.InOutQuad
}
}
margins.top: animatedIndicatorOffsetY
margins.left: animatedIndicatorOffsetX
WlrLayershell.namespace: "noctalia-dock-indicator-" + (screen?.name || "unknown")
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
implicitHeight: isVertical ? peekEdgeLength : indicatorThickness
implicitWidth: isVertical ? indicatorThickness : peekEdgeLength
Behavior on implicitWidth {
NumberAnimation {
duration: Style.animationNormal
easing.type: Easing.InOutQuad
}
}
Behavior on implicitHeight {
NumberAnimation {
duration: Style.animationNormal
easing.type: Easing.InOutQuad
}
}
Rectangle {
id: indicatorRect
anchors.fill: parent
radius: indicatorThickness
color: Qt.alpha(Color.resolveColorKey(indicatorColorKey), indicatorOpacity)
opacity: indicatorVisible ? 1 : 0
visible: opacity > 0
Behavior on opacity {
NumberAnimation {
duration: Style.animationNormal
easing.type: Easing.InOutQuad
}
}
}
}
}
// Force dock reload when position changes to fix anchor/layout issues
// Force dock reload when position/mode changes to fix anchor/layout issues
property bool _reloading: false
@@ -792,7 +852,7 @@ Loader {
readonly property int extraRight: (!isVertical && !exclusive && barOnRight) ? barHeight : 0
// Add +2 buffer for fractional scaling issues
width: dockContent.dockContainer.width + extraLeft + extraRight + (root.isVertical ? 2 : Style.margin2XL * 6)
width: dockContent.dockContainer.width + extraLeft + extraRight + 2
height: dockContent.dockContainer.height + extraTop + extraBottom + 2
anchors.horizontalCenter: isVertical ? undefined : parent.horizontalCenter
+1 -1
View File
@@ -19,7 +19,7 @@ Item {
required property int extraRight
property alias dockContainer: dockContainer
readonly property bool isStaticMode: Settings.data.dock.dockType === "static"
readonly property string tooltipDirection: dockRoot.dockPosition === "top" ? "bottom" : "top"
readonly property string tooltipDirection: dockRoot.dockPosition === "left" ? "right" : (dockRoot.dockPosition === "right" ? "left" : (dockRoot.dockPosition === "top" ? "bottom" : "top"))
Rectangle {
id: dockContainer
+24 -3
View File
@@ -56,11 +56,25 @@ SmartPanel {
}
}
onAnyAppHoveredChanged: {
if (anyAppHovered) {
hoverCloseTimer.stop();
} else if (!panelHovered && !menuHovered && !dockHovered && !isDockHovered) {
hoverCloseTimer.restart();
}
}
onClosed: {
hoverCloseTimer.stop();
isDockHovered = false;
}
onOpened: {
if (!panelHovered && !menuHovered) {
hoverCloseTimer.restart();
}
}
panelAnchorTop: dockPosition === "top"
panelAnchorBottom: dockPosition === "bottom"
panelAnchorLeft: dockPosition === "left"
@@ -492,7 +506,7 @@ SmartPanel {
id: hoverCloseTimer
interval: hideDelay
onTriggered: {
if (root.menuHovered || (root.currentContextMenu && root.currentContextMenu.visible)) {
if (root.dockHovered || root.isDockHovered || root.anyAppHovered || root.menuHovered || (root.currentContextMenu && root.currentContextMenu.visible)) {
restart();
return;
}
@@ -509,9 +523,14 @@ SmartPanel {
property real contentPreferredWidth: Math.round(dockContainerWrapper.width) - (isVertical ? frameThickness : 0)
property real contentPreferredHeight: Math.round(dockContainerWrapper.height) - (!isVertical ? frameThickness : 0)
// Detect hover over panel content (including DockContent)
Item {
id: hoverArea
anchors.fill: dockContainerWrapper
anchors.margins: -frameThickness
// Detect hover over dock area including frame thickness
HoverHandler {
id: dockHoverHandler
id: dockHoverArea
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
onHoveredChanged: {
root.panelHovered = hovered;
@@ -519,6 +538,7 @@ SmartPanel {
root.isDockHovered = true;
hoverCloseTimer.stop();
} else {
root.isDockHovered = false;
if (root.menuHovered || (root.currentContextMenu && root.currentContextMenu.visible)) {
hoverCloseTimer.stop();
} else {
@@ -527,6 +547,7 @@ SmartPanel {
}
}
}
}
Item {
id: dockContainerWrapper
+2 -2
View File
@@ -1224,9 +1224,9 @@ Rectangle {
// Icon badge or Image preview or Emoji
Item {
// Use consistent 65% sizing for all items
// Size image at 65% of cell dimensions.
Layout.preferredWidth: Math.round(gridEntry.width * 0.65)
Layout.preferredHeight: Math.round(gridEntry.width * 0.65)
Layout.preferredHeight: Math.round(gridEntry.height * 0.65)
Layout.alignment: Qt.AlignHCenter
// Icon background
@@ -562,6 +562,7 @@ SmartPanel {
property int listIndex: index
property string notificationId: model.id
property string appName: model.appName || ""
property bool isExpanded: scrollView.expandedId === notificationId
property bool canExpand: summaryText.truncated || bodyText.truncated
property real swipeOffset: 0
@@ -777,6 +778,19 @@ SmartPanel {
notificationDelegate.pendingLink = "";
return;
}
// Focus sender window (and invoke default action if available)
var actions = notificationDelegate.actionsList;
var hasDefault = actions.some(function (a) {
return a.identifier === "default";
});
if (hasDefault) {
NotificationService.focusSenderWindow(notificationDelegate.appName);
NotificationService.invokeAction(notificationDelegate.notificationId, "default");
} else {
NotificationService.focusSenderWindow(notificationDelegate.appName);
}
root.close();
}
onCanceled: {
notificationDelegate.isSwiping = false;
@@ -934,6 +948,8 @@ SmartPanel {
// Capture modelData in a property to avoid reference errors
property var actionData: modelData
onClicked: {
NotificationService.focusSenderWindow(notificationDelegate.appName);
root.close();
NotificationService.invokeAction(notificationDelegate.notificationId, actionData.identifier);
}
}
@@ -17,7 +17,7 @@ ColumnLayout {
// Local state
property bool valueShowIcon: widgetData.showIcon !== undefined ? widgetData.showIcon : widgetMetadata.showIcon
property string valueHideMode: "hidden" // Default to 'Hide When Empty'
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
@@ -65,6 +65,7 @@ ColumnLayout {
root.valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
NColorChoice {
@@ -74,6 +75,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
NToggle {
@@ -85,6 +87,7 @@ ColumnLayout {
root.valueShowIcon = checked;
saveSettings();
}
defaultValue: widgetMetadata.showIcon
}
NToggle {
@@ -97,6 +100,7 @@ ColumnLayout {
saveSettings();
}
visible: root.valueShowIcon
defaultValue: widgetMetadata.colorizeIcons
}
NTextInput {
@@ -107,6 +111,7 @@ ColumnLayout {
placeholderText: widgetMetadata.maxWidth
text: valueMaxWidth
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.maxWidth)
}
NToggle {
@@ -118,6 +123,7 @@ ColumnLayout {
valueUseFixedWidth = checked;
saveSettings();
}
defaultValue: widgetMetadata.useFixedWidth
}
NComboBox {
@@ -138,6 +144,7 @@ ColumnLayout {
}
]
currentKey: valueScrollingMode
defaultValue: widgetMetadata.scrollingMode
onSelected: key => {
valueScrollingMode = key;
saveSettings();
@@ -35,6 +35,7 @@ ColumnLayout {
text: widgetData.width || widgetMetadata.width
placeholderText: I18n.tr("placeholders.enter-width-pixels")
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.width)
}
NColorChoice {
@@ -46,6 +47,7 @@ ColumnLayout {
root.valueColorName = key;
saveSettings();
}
defaultValue: widgetMetadata.colorName
}
NToggle {
@@ -56,5 +58,6 @@ ColumnLayout {
valueHideWhenIdle = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideWhenIdle
}
}
@@ -18,7 +18,7 @@ ColumnLayout {
// Local state
property string valueDisplayMode: widgetData.displayMode !== undefined ? widgetData.displayMode : widgetMetadata.displayMode
property string valueDeviceNativePath: widgetData.deviceNativePath !== undefined ? widgetData.deviceNativePath : "__default__"
property string valueDeviceNativePath: widgetData.deviceNativePath !== undefined ? widgetData.deviceNativePath : widgetMetadata.deviceNativePath
property bool valueShowPowerProfiles: widgetData.showPowerProfiles !== undefined ? widgetData.showPowerProfiles : widgetMetadata.showPowerProfiles
property bool valueShowNoctaliaPerformance: widgetData.showNoctaliaPerformance !== undefined ? widgetData.showNoctaliaPerformance : widgetMetadata.showNoctaliaPerformance
property bool valueHideIfNotDetected: widgetData.hideIfNotDetected !== undefined ? widgetData.hideIfNotDetected : widgetMetadata.hideIfNotDetected
@@ -50,6 +50,7 @@ ColumnLayout {
root.valueDeviceNativePath = key;
saveSettings();
}
defaultValue: widgetMetadata.deviceNativePath
}
NComboBox {
@@ -84,6 +85,7 @@ ColumnLayout {
root.valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NToggle {
@@ -94,6 +96,7 @@ ColumnLayout {
valueHideIfNotDetected = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideIfNotDetected
}
NToggle {
@@ -104,6 +107,7 @@ ColumnLayout {
valueHideIfIdle = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideIfIdle
}
NDivider {
@@ -118,6 +122,7 @@ ColumnLayout {
valueShowPowerProfiles = checked;
saveSettings();
}
defaultValue: widgetMetadata.showPowerProfiles
}
NToggle {
@@ -128,5 +133,6 @@ ColumnLayout {
valueShowNoctaliaPerformance = checked;
saveSettings();
}
defaultValue: widgetMetadata.showNoctaliaPerformance
}
}
@@ -50,6 +50,7 @@ ColumnLayout {
root.valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -59,6 +60,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -67,5 +69,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -56,6 +56,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -65,6 +66,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -73,6 +75,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
NToggle {
@@ -20,10 +20,10 @@ ColumnLayout {
// Local state
property string valueClockColor: widgetData.clockColor !== undefined ? widgetData.clockColor : widgetMetadata.clockColor
property bool valueUseCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : (widgetMetadata.customFont !== undefined ? widgetMetadata.customFont : "")
property string valueFormatHorizontal: widgetData.formatHorizontal !== undefined ? widgetData.formatHorizontal : (widgetMetadata.formatHorizontal !== undefined ? widgetMetadata.formatHorizontal : "")
property string valueFormatVertical: widgetData.formatVertical !== undefined ? widgetData.formatVertical : (widgetMetadata.formatVertical !== undefined ? widgetMetadata.formatVertical : "")
property string valueTooltipFormat: widgetData.tooltipFormat !== undefined ? widgetData.tooltipFormat : (widgetMetadata.tooltipFormat !== undefined ? widgetMetadata.tooltipFormat : "")
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.customFont
property string valueFormatHorizontal: widgetData.formatHorizontal !== undefined ? widgetData.formatHorizontal : widgetMetadata.formatHorizontal
property string valueFormatVertical: widgetData.formatVertical !== undefined ? widgetData.formatVertical : widgetMetadata.formatVertical
property string valueTooltipFormat: widgetData.tooltipFormat !== undefined ? widgetData.tooltipFormat : widgetMetadata.tooltipFormat
readonly property color textColor: Color.resolveColorKey(valueClockColor)
@@ -77,6 +77,7 @@ ColumnLayout {
valueClockColor = key;
saveSettings();
}
defaultValue: widgetMetadata.clockColor
}
NToggle {
@@ -88,6 +89,7 @@ ColumnLayout {
valueUseCustomFont = checked;
saveSettings();
}
defaultValue: widgetMetadata.useCustomFont
}
NSearchableComboBox {
@@ -105,6 +107,7 @@ ColumnLayout {
valueCustomFont = key;
saveSettings();
}
defaultValue: Settings.data.ui.fontDefault
}
NDivider {
@@ -148,6 +151,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.formatHorizontal
}
Item {
@@ -173,6 +177,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.formatVertical
}
NTextInput {
@@ -193,6 +198,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.tooltipFormat
}
}
@@ -42,6 +42,7 @@ ColumnLayout {
valueUseDistroLogo = checked;
saveSettings();
}
defaultValue: widgetMetadata.useDistroLogo
}
NToggle {
@@ -52,6 +53,7 @@ ColumnLayout {
valueEnableColorization = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableColorization
}
NColorChoice {
@@ -63,6 +65,7 @@ ColumnLayout {
valueColorizeSystemIcon = key;
saveSettings();
}
defaultValue: widgetMetadata.colorizeSystemIcon
}
RowLayout {
@@ -24,12 +24,12 @@ ColumnLayout {
property int valueMaxTextLengthVertical: widgetData?.maxTextLength?.vertical ?? widgetMetadata?.maxTextLength?.vertical
property string valueHideMode: (widgetData.hideMode !== undefined) ? widgetData.hideMode : widgetMetadata.hideMode
property bool valueShowIcon: (widgetData.showIcon !== undefined) ? widgetData.showIcon : widgetMetadata.showIcon
property bool valueShowExecTooltip: widgetData.showExecTooltip !== undefined ? widgetData.showExecTooltip : (widgetMetadata.showExecTooltip !== undefined ? widgetMetadata.showExecTooltip : true)
property bool valueShowTextTooltip: widgetData.showTextTooltip !== undefined ? widgetData.showTextTooltip : (widgetMetadata.showTextTooltip !== undefined ? widgetMetadata.showTextTooltip : true)
property bool valueEnableColorization: widgetData.enableColorization || false
property string valueColorizeSystemIcon: widgetData.colorizeSystemIcon !== undefined ? widgetData.colorizeSystemIcon : widgetMetadata.colorizeSystemIcon || "none"
property string valueIpcIdentifier: widgetData.ipcIdentifier !== undefined ? widgetData.ipcIdentifier : widgetMetadata.ipcIdentifier || ""
property string valueGeneralTooltipText: widgetData.generalTooltipText !== undefined ? widgetData.generalTooltipText : widgetMetadata.generalTooltipText || ""
property bool valueShowExecTooltip: widgetData.showExecTooltip !== undefined ? widgetData.showExecTooltip : widgetMetadata.showExecTooltip
property bool valueShowTextTooltip: widgetData.showTextTooltip !== undefined ? widgetData.showTextTooltip : widgetMetadata.showTextTooltip
property bool valueEnableColorization: widgetData.enableColorization !== undefined ? widgetData.enableColorization : widgetMetadata.enableColorization
property string valueColorizeSystemIcon: widgetData.colorizeSystemIcon !== undefined ? widgetData.colorizeSystemIcon : widgetMetadata.colorizeSystemIcon
property string valueIpcIdentifier: widgetData.ipcIdentifier !== undefined ? widgetData.ipcIdentifier : widgetMetadata.ipcIdentifier
property string valueGeneralTooltipText: widgetData.generalTooltipText !== undefined ? widgetData.generalTooltipText : widgetMetadata.generalTooltipText
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -107,6 +107,7 @@ ColumnLayout {
saveSettings();
}
visible: textCommandInput.text !== ""
defaultValue: widgetMetadata.showIcon
}
NToggle {
@@ -117,6 +118,7 @@ ColumnLayout {
valueEnableColorization = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableColorization
}
NColorChoice {
@@ -128,6 +130,7 @@ ColumnLayout {
valueColorizeSystemIcon = key;
saveSettings();
}
defaultValue: widgetMetadata.colorizeSystemIcon
}
NTextInput {
@@ -138,6 +141,7 @@ ColumnLayout {
text: valueGeneralTooltipText
onTextChanged: valueGeneralTooltipText = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.generalTooltipText
}
NToggle {
@@ -149,6 +153,7 @@ ColumnLayout {
valueShowExecTooltip = checked;
saveSettings();
}
defaultValue: widgetMetadata.showExecTooltip
}
NToggle {
@@ -160,6 +165,7 @@ ColumnLayout {
valueShowTextTooltip = checked;
saveSettings();
}
defaultValue: widgetMetadata.showTextTooltip
}
NTextInput {
@@ -170,6 +176,7 @@ ColumnLayout {
text: valueIpcIdentifier
onTextChanged: valueIpcIdentifier = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.ipcIdentifier
}
RowLayout {
@@ -183,6 +190,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.leftClickExec || widgetMetadata.leftClickExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.leftClickExec
}
NToggle {
@@ -197,6 +205,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.leftClickUpdateText
}
}
@@ -211,6 +220,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.rightClickExec || widgetMetadata.rightClickExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.rightClickExec
}
NToggle {
@@ -225,6 +235,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.rightClickUpdateText
}
}
@@ -239,6 +250,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData.middleClickExec || widgetMetadata.middleClickExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.middleClickExec
}
NToggle {
@@ -253,6 +265,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.middleClickUpdateText
}
}
@@ -268,6 +281,7 @@ ColumnLayout {
internalChecked = checked;
saveSettings();
}
defaultValue: widgetMetadata.wheelMode === "separate"
}
ColumnLayout {
@@ -286,6 +300,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.wheelExec || widgetMetadata?.wheelExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.wheelExec
}
NToggle {
@@ -300,6 +315,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.wheelUpdateText
}
}
@@ -319,6 +335,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.wheelUpExec || widgetMetadata?.wheelUpExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.wheelUpExec
}
NToggle {
@@ -333,6 +350,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.wheelUpUpdateText
}
}
@@ -347,6 +365,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-command")
text: widgetData?.wheelDownExec || widgetMetadata?.wheelDownExec
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.wheelDownExec
}
NToggle {
@@ -361,6 +380,7 @@ ColumnLayout {
checked = isChecked;
saveSettings();
}
defaultValue: widgetMetadata.wheelDownUpdateText
}
}
}
@@ -384,6 +404,7 @@ ColumnLayout {
valueMaxTextLengthHorizontal = value;
saveSettings();
}
defaultValue: widgetMetadata.maxTextLength.horizontal
}
NSpinBox {
@@ -396,6 +417,7 @@ ColumnLayout {
valueMaxTextLengthVertical = value;
saveSettings();
}
defaultValue: widgetMetadata.maxTextLength.vertical
}
NToggle {
@@ -407,6 +429,7 @@ ColumnLayout {
valueTextStream = checked;
saveSettings();
}
defaultValue: widgetMetadata.textStream
}
NToggle {
@@ -418,6 +441,7 @@ ColumnLayout {
valueParseJson = checked;
saveSettings();
}
defaultValue: widgetMetadata.parseJson
}
NTextInput {
@@ -428,6 +452,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.command-example")
text: widgetData?.textCommand || widgetMetadata.textCommand
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.textCommand
}
NTextInput {
@@ -439,6 +464,7 @@ ColumnLayout {
placeholderText: I18n.tr("placeholders.enter-text-to-collapse")
text: widgetData?.textCollapse || widgetMetadata.textCollapse
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.textCollapse
}
NTextInput {
@@ -450,6 +476,7 @@ ColumnLayout {
placeholderText: String(widgetMetadata.textIntervalMs)
text: widgetData && widgetData.textIntervalMs !== undefined ? String(widgetData.textIntervalMs) : ""
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.textIntervalMs)
}
NComboBox {
@@ -476,5 +503,6 @@ ColumnLayout {
saveSettings();
}
visible: textCommandInput.text !== "" && valueTextStream == true
defaultValue: widgetMetadata.hideMode
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -31,6 +31,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -39,5 +40,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -54,6 +54,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NToggle {
@@ -64,6 +65,7 @@ ColumnLayout {
valueShowIcon = checked;
saveSettings();
}
defaultValue: widgetMetadata.showIcon
}
NColorChoice {
@@ -73,6 +75,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -81,5 +84,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -42,6 +42,7 @@ ColumnLayout {
valueUseDistroLogo = checked;
saveSettings();
}
defaultValue: widgetMetadata.useDistroLogo
}
NToggle {
@@ -52,6 +53,7 @@ ColumnLayout {
valueEnableColorization = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableColorization
}
NColorChoice {
@@ -63,6 +65,7 @@ ColumnLayout {
valueColorizeSystemIcon = key;
saveSettings();
}
defaultValue: widgetMetadata.colorizeSystemIcon
}
RowLayout {
@@ -49,6 +49,7 @@ ColumnLayout {
valueShowCapsLock = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCapsLock
}
NIcon {
@@ -86,6 +87,7 @@ ColumnLayout {
valueShowNumLock = checked;
saveSettings();
}
defaultValue: widgetMetadata.showNumLock
}
NIcon {
@@ -123,6 +125,7 @@ ColumnLayout {
valueShowScrollLock = checked;
saveSettings();
}
defaultValue: widgetMetadata.showScrollLock
}
NIcon {
@@ -162,5 +165,6 @@ ColumnLayout {
valueHideWhenOff = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideWhenOff
}
}
@@ -16,20 +16,20 @@ ColumnLayout {
signal settingsChanged(var settings)
// Local state
property string valueHideMode: "hidden" // Default to 'Hide When Empty'
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
// Deprecated: hideWhenIdle now folded into hideMode = "idle"
property bool valueHideWhenIdle: (widgetData && widgetData.hideWhenIdle !== undefined) ? widgetData.hideWhenIdle : (widgetMetadata && widgetMetadata.hideWhenIdle !== undefined ? widgetMetadata.hideWhenIdle : false)
property bool valueShowAlbumArt: (widgetData && widgetData.showAlbumArt !== undefined) ? widgetData.showAlbumArt : (widgetMetadata && widgetMetadata.showAlbumArt !== undefined ? widgetMetadata.showAlbumArt : false)
property bool valuePanelShowAlbumArt: (widgetData && widgetData.panelShowAlbumArt !== undefined) ? widgetData.panelShowAlbumArt : (widgetMetadata && widgetMetadata.panelShowAlbumArt !== undefined ? widgetMetadata.panelShowAlbumArt : true)
property bool valueShowArtistFirst: (widgetData && widgetData.showArtistFirst !== undefined) ? widgetData.showArtistFirst : (widgetMetadata && widgetMetadata.showArtistFirst !== undefined ? widgetMetadata.showArtistFirst : true)
property bool valueShowVisualizer: (widgetData && widgetData.showVisualizer !== undefined) ? widgetData.showVisualizer : (widgetMetadata && widgetMetadata.showVisualizer !== undefined ? widgetMetadata.showVisualizer : false)
property string valueVisualizerType: (widgetData && widgetData.visualizerType) || (widgetMetadata && widgetMetadata.visualizerType) || "linear"
property string valueScrollingMode: (widgetData && widgetData.scrollingMode) || (widgetMetadata && widgetMetadata.scrollingMode) || "hover"
property int valueMaxWidth: (widgetData && widgetData.maxWidth !== undefined) ? widgetData.maxWidth : (widgetMetadata && widgetMetadata.maxWidth !== undefined ? widgetMetadata.maxWidth : 145)
property bool valueUseFixedWidth: (widgetData && widgetData.useFixedWidth !== undefined) ? widgetData.useFixedWidth : (widgetMetadata && widgetMetadata.useFixedWidth !== undefined ? widgetMetadata.useFixedWidth : false)
property bool valueShowProgressRing: (widgetData && widgetData.showProgressRing !== undefined) ? widgetData.showProgressRing : (widgetMetadata && widgetMetadata.showProgressRing !== undefined ? widgetMetadata.showProgressRing : true)
property bool valueHideWhenIdle: widgetData.hideWhenIdle !== undefined ? widgetData.hideWhenIdle : widgetMetadata.hideWhenIdle
property bool valueShowAlbumArt: widgetData.showAlbumArt !== undefined ? widgetData.showAlbumArt : widgetMetadata.showAlbumArt
property bool valuePanelShowAlbumArt: widgetData.panelShowAlbumArt !== undefined ? widgetData.panelShowAlbumArt : widgetMetadata.panelShowAlbumArt
property bool valueShowArtistFirst: widgetData.showArtistFirst !== undefined ? widgetData.showArtistFirst : widgetMetadata.showArtistFirst
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : widgetMetadata.showVisualizer
property string valueVisualizerType: widgetData.visualizerType !== undefined ? widgetData.visualizerType : widgetMetadata.visualizerType
property string valueScrollingMode: widgetData.scrollingMode !== undefined ? widgetData.scrollingMode : widgetMetadata.scrollingMode
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
property bool valueShowProgressRing: widgetData.showProgressRing !== undefined ? widgetData.showProgressRing : widgetMetadata.showProgressRing
property bool valueCompactMode: widgetData.compactMode !== undefined ? widgetData.compactMode : widgetMetadata.compactMode
property string valueTextColor: (widgetData && widgetData.textColor !== undefined) ? widgetData.textColor : (widgetMetadata && widgetMetadata.textColor !== undefined ? widgetMetadata.textColor : "none")
property string valueTextColor: widgetData.textColor !== undefined ? widgetData.textColor : widgetMetadata.textColor
Component.onCompleted: {
if (widgetData && widgetData.hideMode !== undefined) {
@@ -82,6 +82,7 @@ ColumnLayout {
root.valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
NToggle {
@@ -92,6 +93,7 @@ ColumnLayout {
valueShowAlbumArt = checked;
saveSettings();
}
defaultValue: widgetMetadata.showAlbumArt
}
NToggle {
@@ -102,6 +104,7 @@ ColumnLayout {
valueShowArtistFirst = checked;
saveSettings();
}
defaultValue: widgetMetadata.showArtistFirst
}
NToggle {
@@ -112,6 +115,7 @@ ColumnLayout {
valueShowVisualizer = checked;
saveSettings();
}
defaultValue: widgetMetadata.showVisualizer
}
NComboBox {
@@ -138,6 +142,7 @@ ColumnLayout {
saveSettings();
}
minimumWidth: 200
defaultValue: widgetMetadata.visualizerType
}
NTextInput {
@@ -148,6 +153,7 @@ ColumnLayout {
placeholderText: widgetMetadata.maxWidth
text: valueMaxWidth
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.maxWidth)
}
NToggle {
@@ -158,6 +164,7 @@ ColumnLayout {
valueUseFixedWidth = checked;
saveSettings();
}
defaultValue: widgetMetadata.useFixedWidth
}
NToggle {
@@ -168,6 +175,7 @@ ColumnLayout {
valueShowProgressRing = checked;
saveSettings();
}
defaultValue: widgetMetadata.showProgressRing
}
NColorChoice {
@@ -176,6 +184,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
NComboBox {
@@ -201,6 +210,7 @@ ColumnLayout {
saveSettings();
}
minimumWidth: 200
defaultValue: widgetMetadata.scrollingMode
}
NDivider {
@@ -222,6 +232,7 @@ ColumnLayout {
valuePanelShowAlbumArt = checked;
saveSettings();
}
defaultValue: widgetMetadata.panelShowAlbumArt
}
NToggle {
@@ -232,5 +243,6 @@ ColumnLayout {
valueCompactMode = checked;
saveSettings();
}
defaultValue: widgetMetadata.compactMode
}
}
@@ -53,6 +53,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -62,6 +63,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -70,6 +72,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
// Middle click command
@@ -80,5 +83,6 @@ ColumnLayout {
text: valueMiddleClickCommand
onTextChanged: valueMiddleClickCommand = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.middleClickCommand
}
}
@@ -50,6 +50,7 @@ ColumnLayout {
root.valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -59,6 +60,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -67,5 +69,6 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -40,6 +40,7 @@ ColumnLayout {
valueShowUnreadBadge = checked;
saveSettings();
}
defaultValue: widgetMetadata.showUnreadBadge
}
NColorChoice {
@@ -49,6 +50,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -60,6 +62,7 @@ ColumnLayout {
saveSettings();
}
visible: valueShowUnreadBadge
defaultValue: widgetMetadata.unreadBadgeColor
}
NToggle {
@@ -70,7 +73,8 @@ ColumnLayout {
valueHideWhenZero = checked;
saveSettings();
}
visible: !valueHideWhenZeroUnread
enabled: !valueHideWhenZeroUnread
defaultValue: widgetMetadata.hideWhenZero
}
NToggle {
@@ -81,5 +85,6 @@ ColumnLayout {
valueHideWhenZeroUnread = checked;
saveSettings();
}
defaultValue: widgetMetadata.hideWhenZeroUnread
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -18,7 +18,7 @@ ColumnLayout {
signal settingsChanged(var settings)
// Local state
property string valueIconColor: widgetData.iconColor !== undefined ? widgetData.iconColor : (widgetData.colorName !== undefined ? widgetData.colorName : widgetMetadata.iconColor)
property string valueIconColor: widgetData.iconColor !== undefined ? widgetData.iconColor : widgetMetadata.iconColor
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -33,5 +33,6 @@ ColumnLayout {
root.valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
}
@@ -30,5 +30,6 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
valueDefault: widgetMetadata.iconColor
}
}
@@ -29,5 +29,6 @@ ColumnLayout {
text: widgetData.width || widgetMetadata.width
placeholderText: I18n.tr("placeholders.enter-width-pixels")
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.width)
}
}
@@ -72,6 +72,7 @@ ColumnLayout {
valueCompactMode = checked;
saveSettings();
}
defaultValue: widgetMetadata.compactMode
}
NColorChoice {
@@ -81,6 +82,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -90,6 +92,7 @@ ColumnLayout {
saveSettings();
}
visible: !valueCompactMode
defaultValue: widgetMetadata.textColor
}
NToggle {
@@ -102,6 +105,7 @@ ColumnLayout {
saveSettings();
}
visible: !valueCompactMode
defaultValue: widgetMetadata.useMonospaceFont
}
NToggle {
@@ -115,6 +119,7 @@ ColumnLayout {
}
visible: !valueCompactMode
enabled: !isVerticalBar && valueUseMonospaceFont
defaultValue: widgetMetadata.usePadding
}
NDivider {
@@ -131,6 +136,7 @@ ColumnLayout {
valueShowCpuUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCpuUsage
}
NToggle {
@@ -143,6 +149,7 @@ ColumnLayout {
valueShowCpuFreq = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCpuFreq
}
NToggle {
@@ -155,6 +162,7 @@ ColumnLayout {
valueShowCpuTemp = checked;
saveSettings();
}
defaultValue: widgetMetadata.showCpuTemp
}
NToggle {
@@ -167,6 +175,7 @@ ColumnLayout {
valueShowLoadAverage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showLoadAverage
}
NToggle {
@@ -180,6 +189,7 @@ ColumnLayout {
saveSettings();
}
visible: SystemStatService.gpuAvailable
defaultValue: widgetMetadata.showGpuTemp
}
NToggle {
@@ -192,6 +202,7 @@ ColumnLayout {
valueShowMemoryUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showMemoryUsage
}
NToggle {
@@ -205,6 +216,7 @@ ColumnLayout {
saveSettings();
}
visible: valueShowMemoryUsage
defaultValue: widgetMetadata.showMemoryAsPercent
}
NToggle {
@@ -217,6 +229,7 @@ ColumnLayout {
valueShowSwapUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showSwapUsage
}
NToggle {
@@ -229,6 +242,7 @@ ColumnLayout {
valueShowNetworkStats = checked;
saveSettings();
}
defaultValue: widgetMetadata.showNetworkStats
}
NDivider {
@@ -245,6 +259,7 @@ ColumnLayout {
valueShowDiskUsage = checked;
saveSettings();
}
defaultValue: widgetMetadata.showDiskUsage
}
NToggle {
@@ -257,6 +272,7 @@ ColumnLayout {
valueShowDiskUsageAsPercent = checked;
saveSettings();
}
defaultValue: widgetMetadata.showDiskUsageAsPercent
}
NToggle {
@@ -269,6 +285,7 @@ ColumnLayout {
valueShowDiskAvailable = checked;
saveSettings();
}
defaultValue: widgetMetadata.showDiskAvailable
}
NComboBox {
@@ -288,5 +305,6 @@ ColumnLayout {
valueDiskPath = key;
saveSettings();
}
defaultValue: widgetMetadata.diskPath
}
}
@@ -18,7 +18,7 @@ ColumnLayout {
readonly property bool isVerticalBar: Settings.data.bar.position === "left" || Settings.data.bar.position === "right"
// Local state
property string valueHideMode: "hidden"
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
property bool valueOnlyActiveWorkspaces: widgetData.onlyActiveWorkspaces !== undefined ? widgetData.onlyActiveWorkspaces : widgetMetadata.onlyActiveWorkspaces
property bool valueOnlySameOutput: widgetData.onlySameOutput !== undefined ? widgetData.onlySameOutput : widgetMetadata.onlySameOutput
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
@@ -75,6 +75,7 @@ ColumnLayout {
root.valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
NToggle {
@@ -86,6 +87,7 @@ ColumnLayout {
root.valueOnlySameOutput = checked;
saveSettings();
}
defaultValue: widgetMetadata.onlySameOutput
}
NToggle {
@@ -97,6 +99,7 @@ ColumnLayout {
root.valueOnlyActiveWorkspaces = checked;
saveSettings();
}
defaultValue: widgetMetadata.onlyActiveWorkspaces
}
NToggle {
@@ -108,6 +111,7 @@ ColumnLayout {
root.valueColorizeIcons = checked;
saveSettings();
}
defaultValue: widgetMetadata.colorizeIcons
}
NToggle {
@@ -119,6 +123,7 @@ ColumnLayout {
root.valueShowPinnedApps = checked;
saveSettings();
}
defaultValue: widgetMetadata.showPinnedApps
}
NValueSlider {
@@ -128,7 +133,9 @@ ColumnLayout {
from: 0.5
to: 1
stepSize: 0.01
showReset: true
value: root.valueIconScale
defaultValue: widgetMetadata.iconScale
onMoved: value => {
root.valueIconScale = value;
saveSettings();
@@ -146,6 +153,7 @@ ColumnLayout {
saveSettings();
}
enabled: !isVerticalBar
defaultValue: widgetMetadata.showTitle
}
NTextInput {
@@ -157,6 +165,7 @@ ColumnLayout {
text: widgetData.titleWidth || widgetMetadata.titleWidth
placeholderText: I18n.tr("placeholders.enter-width-pixels")
onEditingFinished: saveSettings()
defaultValue: String(widgetMetadata.titleWidth)
}
NToggle {
@@ -169,6 +178,7 @@ ColumnLayout {
root.valueSmartWidth = checked;
saveSettings();
}
defaultValue: widgetMetadata.smartWidth
}
NValueSlider {
@@ -179,7 +189,9 @@ ColumnLayout {
from: 10
to: 100
stepSize: 5
showReset: true
value: root.valueMaxTaskbarWidth
defaultValue: widgetMetadata.maxTaskbarWidth
onMoved: value => {
root.valueMaxTaskbarWidth = Math.round(value);
saveSettings();
@@ -48,6 +48,7 @@ ColumnLayout {
root.valueDrawerEnabled = checked;
saveSettings();
}
defaultValue: widgetMetadata.drawerEnabled
}
NColorChoice {
@@ -59,6 +60,7 @@ ColumnLayout {
saveSettings();
}
visible: root.valueDrawerEnabled
defaultValue: widgetMetadata.chevronColor
}
NToggle {
@@ -70,6 +72,7 @@ ColumnLayout {
root.valueColorizeIcons = checked;
saveSettings();
}
defaultValue: widgetMetadata.colorizeIcons
}
NToggle {
@@ -81,6 +84,7 @@ ColumnLayout {
root.valueHidePassive = checked;
saveSettings();
}
defaultValue: widgetMetadata.hidePassive
}
ColumnLayout {
@@ -53,6 +53,7 @@ ColumnLayout {
valueDisplayMode = key;
saveSettings();
}
defaultValue: widgetMetadata.displayMode
}
NColorChoice {
@@ -62,6 +63,7 @@ ColumnLayout {
valueIconColor = key;
saveSettings();
}
defaultValue: widgetMetadata.iconColor
}
NColorChoice {
@@ -70,6 +72,7 @@ ColumnLayout {
valueTextColor = key;
saveSettings();
}
defaultValue: widgetMetadata.textColor
}
// Middle click command
@@ -80,5 +83,6 @@ ColumnLayout {
text: valueMiddleClickCommand
onTextChanged: valueMiddleClickCommand = text
onEditingFinished: saveSettings()
defaultValue: widgetMetadata.middleClickCommand
}
}
@@ -197,7 +197,9 @@ ColumnLayout {
from: 0
to: 1
stepSize: 0.01
showReset: true
value: valueUnfocusedIconsOpacity
defaultValue: widgetMetadata.unfocusedIconsOpacity
onMoved: value => {
valueUnfocusedIconsOpacity = value;
saveSettings();
@@ -212,7 +214,9 @@ ColumnLayout {
from: 0
to: 1
stepSize: 0.01
showReset: true
value: valueGroupedBorderOpacity
defaultValue: widgetMetadata.groupedBorderOpacity
onMoved: value => {
valueGroupedBorderOpacity = value;
saveSettings();
@@ -227,7 +231,9 @@ ColumnLayout {
from: 0.5
to: 1
stepSize: 0.01
showReset: true
value: valueIconScale
defaultValue: widgetMetadata.iconScale
onMoved: value => {
valueIconScale = value;
saveSettings();
@@ -20,15 +20,15 @@ ColumnLayout {
QtObject {
id: _settings
property string icon: (widgetData && widgetData.icon !== undefined) ? widgetData.icon : (widgetMetadata && widgetMetadata.icon ? widgetMetadata.icon : "")
property string onClicked: (widgetData && widgetData.onClicked !== undefined) ? widgetData.onClicked : (widgetMetadata && widgetMetadata.onClicked ? widgetMetadata.onClicked : "")
property string onRightClicked: (widgetData && widgetData.onRightClicked !== undefined) ? widgetData.onRightClicked : (widgetMetadata && widgetMetadata.onRightClicked ? widgetMetadata.onRightClicked : "")
property string onMiddleClicked: (widgetData && widgetData.onMiddleClicked !== undefined) ? widgetData.onMiddleClicked : (widgetMetadata && widgetMetadata.onMiddleClicked ? widgetMetadata.onMiddleClicked : "")
property string icon: widgetData.icon !== undefined ? widgetData.icon : widgetMetadata.icon
property string onClicked: widgetData.onClicked !== undefined ? widgetData.onClicked : widgetMetadata.onClicked
property string onRightClicked: widgetData.onRightClicked !== undefined ? widgetData.onRightClicked : widgetMetadata.onRightClicked
property string onMiddleClicked: widgetData.onMiddleClicked !== undefined ? widgetData.onMiddleClicked : widgetMetadata.onMiddleClicked
property ListModel _stateChecksListModel: ListModel {}
property string stateChecksJson: "[]"
property string generalTooltipText: (widgetData && widgetData.generalTooltipText !== undefined) ? widgetData.generalTooltipText : (widgetMetadata && widgetMetadata.generalTooltipText ? widgetMetadata.generalTooltipText : "")
property bool enableOnStateLogic: (widgetData && widgetData.enableOnStateLogic !== undefined) ? widgetData.enableOnStateLogic : (widgetMetadata && widgetMetadata.enableOnStateLogic !== undefined ? widgetMetadata.enableOnStateLogic : false)
property bool showExecTooltip: (widgetData && widgetData.showExecTooltip !== undefined) ? widgetData.showExecTooltip : (widgetMetadata && widgetMetadata.showExecTooltip !== undefined ? widgetMetadata.showExecTooltip : true)
property string generalTooltipText: widgetData.generalTooltipText !== undefined ? widgetData.generalTooltipText : widgetMetadata.generalTooltipText
property bool enableOnStateLogic: widgetData.enableOnStateLogic !== undefined ? widgetData.enableOnStateLogic : widgetMetadata.enableOnStateLogic
property bool showExecTooltip: widgetData.showExecTooltip !== undefined ? widgetData.showExecTooltip : widgetMetadata.showExecTooltip
function populateStateChecks() {
try {
@@ -143,6 +143,7 @@ ColumnLayout {
_settings.generalTooltipText = text;
saveSettings();
}
defaultValue: widgetMetadata.generalTooltipText
}
NToggle {
@@ -154,6 +155,7 @@ ColumnLayout {
_settings.showExecTooltip = checked;
saveSettings();
}
defaultValue: widgetMetadata.showExecTooltip
}
NTextInput {
@@ -166,6 +168,7 @@ ColumnLayout {
_settings.onClicked = text;
saveSettings();
}
defaultValue: widgetMetadata.onClicked
}
NTextInput {
@@ -178,6 +181,7 @@ ColumnLayout {
_settings.onRightClicked = text;
saveSettings();
}
defaultValue: widgetMetadata.onRightClicked
}
NTextInput {
@@ -190,6 +194,7 @@ ColumnLayout {
_settings.onMiddleClicked = text;
saveSettings();
}
defaultValue: widgetMetadata.onMiddleClicked
}
NDivider {}
@@ -204,6 +209,7 @@ ColumnLayout {
_settings.enableOnStateLogic = checked;
saveSettings();
}
defaultValue: widgetMetadata.enableOnStateLogic
}
ColumnLayout {
@@ -16,11 +16,11 @@ ColumnLayout {
signal settingsChanged(var settings)
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : true
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
property string valueClockStyle: widgetData.clockStyle !== undefined ? widgetData.clockStyle : widgetMetadata.clockStyle
property string valueClockColor: widgetData.clockColor !== undefined ? widgetData.clockColor : widgetMetadata.clockColor
property bool valueUseCustomFont: widgetData.useCustomFont !== undefined ? widgetData.useCustomFont : widgetMetadata.useCustomFont
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : ""
property string valueCustomFont: widgetData.customFont !== undefined ? widgetData.customFont : widgetMetadata.custonFont
property string valueFormat: widgetData.format !== undefined ? widgetData.format : widgetMetadata.format
// Track the currently focused input field
@@ -97,39 +97,18 @@ ColumnLayout {
valueClockStyle = key;
saveSettings();
}
defaultValue: widgetMetadata.clockStyle
}
NComboBox {
NColorChoice {
label: I18n.tr("common.select-color")
description: I18n.tr("common.select-color-description")
model: [
{
"name": I18n.tr("common.none"),
"key": "none"
},
{
"key": "primary",
"name": I18n.tr("common.primary")
},
{
"key": "secondary",
"name": I18n.tr("common.secondary")
},
{
"key": "tertiary",
"name": I18n.tr("common.tertiary")
},
{
"key": "error",
"name": I18n.tr("common.error")
}
]
currentKey: valueClockColor
onSelected: key => {
valueClockColor = key;
saveSettings();
}
minimumWidth: 200
defaultValue: widgetMetadata.clockColor
}
NToggle {
@@ -141,6 +120,7 @@ ColumnLayout {
valueUseCustomFont = checked;
saveSettings();
}
defaultValue: widgetMetadata.useCustomFont
}
NSearchableComboBox {
@@ -158,6 +138,8 @@ ColumnLayout {
valueCustomFont = key;
saveSettings();
}
enabled: valueClockStyle === "minimal"
defaultValue: Settings.data.ui.fontDefault
}
NDivider {
@@ -203,6 +185,7 @@ ColumnLayout {
});
}
}
defaultValue: widgetMetadata.format
}
}
@@ -290,6 +273,7 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
@@ -302,5 +286,6 @@ ColumnLayout {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
}
@@ -14,12 +14,12 @@ ColumnLayout {
signal settingsChanged(var settings)
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property string valueVisualizerType: (widgetData.visualizerType && widgetData.visualizerType !== "") ? widgetData.visualizerType : (widgetMetadata.visualizerType || "linear")
property string valueVisualizerType: widgetData.visualizerType ? widgetData.visualizerType : widgetMetadata.visualizerType
property string valueHideMode: widgetData.hideMode !== undefined ? widgetData.hideMode : widgetMetadata.hideMode
property bool valueShowButtons: widgetData.showButtons !== undefined ? widgetData.showButtons : (widgetMetadata.showButtons !== undefined ? widgetMetadata.showButtons : true)
property bool valueShowAlbumArt: widgetData.showAlbumArt !== undefined ? widgetData.showAlbumArt : (widgetMetadata.showAlbumArt !== undefined ? widgetMetadata.showAlbumArt : true)
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : (widgetMetadata.showVisualizer !== undefined ? widgetMetadata.showVisualizer : true)
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : (widgetMetadata.roundedCorners !== undefined ? widgetMetadata.roundedCorners : true)
property bool valueShowButtons: widgetData.showButtons !== undefined ? widgetData.showButtons : widgetMetadata.showButtons
property bool valueShowAlbumArt: widgetData.showAlbumArt !== undefined ? widgetData.showAlbumArt : widgetMetadata.showAlbumArt
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : widgetMetadata.showVisualizer
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -42,6 +42,7 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
@@ -53,6 +54,7 @@ ColumnLayout {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
NToggle {
@@ -64,6 +66,7 @@ ColumnLayout {
valueShowAlbumArt = checked;
saveSettings();
}
defaultValue: widgetMetadata.showAlbumArt
}
NToggle {
@@ -75,6 +78,7 @@ ColumnLayout {
valueShowVisualizer = checked;
saveSettings();
}
defaultValue: widgetMetadata.showVisualizer
}
NToggle {
@@ -86,6 +90,7 @@ ColumnLayout {
valueShowButtons = checked;
saveSettings();
}
defaultValue: widgetMetadata.showButtons
}
NComboBox {
@@ -112,6 +117,7 @@ ColumnLayout {
valueVisualizerType = key;
saveSettings();
}
defaultValue: widgetMetadata.visualizerType
}
NComboBox {
@@ -137,5 +143,6 @@ ColumnLayout {
valueHideMode = key;
saveSettings();
}
defaultValue: widgetMetadata.hideMode
}
}
@@ -18,8 +18,8 @@ ColumnLayout {
property string valueStatType: widgetData.statType !== undefined ? widgetData.statType : widgetMetadata.statType
property string valueDiskPath: widgetData.diskPath !== undefined ? widgetData.diskPath : widgetMetadata.diskPath
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : (widgetMetadata.roundedCorners !== undefined ? widgetMetadata.roundedCorners : true)
property string valueLayout: widgetData.layout !== undefined ? widgetData.layout : (widgetMetadata.layout !== undefined ? widgetMetadata.layout : "side")
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
property string valueLayout: widgetData.layout !== undefined ? widgetData.layout : widgetMetadata.layout
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
@@ -67,6 +67,7 @@ ColumnLayout {
valueStatType = key;
saveSettings();
}
defaultValue: widgetMetadata.statType
}
NComboBox {
@@ -86,6 +87,7 @@ ColumnLayout {
valueDiskPath = key;
saveSettings();
}
defaultValue: widgetMetadata.diskPath
}
NDivider {
@@ -101,6 +103,7 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
@@ -113,6 +116,7 @@ ColumnLayout {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
NDivider {
@@ -139,5 +143,6 @@ ColumnLayout {
valueLayout = key;
saveSettings();
}
defaultValue: widgetMetadata.layout
}
}
@@ -14,10 +14,12 @@ ColumnLayout {
signal settingsChanged(var settings)
property bool valueShowBackground: widgetData.showBackground !== undefined ? widgetData.showBackground : widgetMetadata.showBackground
property bool valueRoundedCorners: widgetData.roundedCorners !== undefined ? widgetData.roundedCorners : widgetMetadata.roundedCorners
function saveSettings() {
var settings = Object.assign({}, widgetData || {});
settings.showBackground = valueShowBackground;
settings.roundedCorners = valueRoundedCorners;
settingsChanged(settings);
}
@@ -30,5 +32,19 @@ ColumnLayout {
valueShowBackground = checked;
saveSettings();
}
defaultValue: widgetMetadata.showBackground
}
NToggle {
Layout.fillWidth: true
visible: valueShowBackground
label: I18n.tr("panels.desktop-widgets.clock-rounded-corners-label")
description: I18n.tr("panels.desktop-widgets.clock-rounded-corners-description")
checked: valueRoundedCorners
onToggled: checked => {
valueRoundedCorners = checked;
saveSettings();
}
defaultValue: widgetMetadata.roundedCorners
}
}
+7 -1
View File
@@ -189,10 +189,15 @@ ColumnLayout {
checked: subTabBar.currentIndex === 1
}
NTabButton {
text: I18n.tr("common.monitors")
text: I18n.tr("common.behavior")
tabIndex: 2
checked: subTabBar.currentIndex === 2
}
NTabButton {
text: I18n.tr("common.monitors")
tabIndex: 3
checked: subTabBar.currentIndex === 3
}
}
Item {
@@ -214,6 +219,7 @@ ColumnLayout {
moveWidgetBetweenSections: root._moveWidgetBetweenSections
onOpenPluginSettings: manifest => pluginSettingsDialog.openPluginSettings(manifest)
}
BehaviorSubTab {}
MonitorsSubTab {
addMonitor: root.addMonitor
removeMonitor: root.removeMonitor
@@ -0,0 +1,62 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qs.Commons
import qs.Services.Compositor
import qs.Widgets
ColumnLayout {
id: root
spacing: Style.marginL
Layout.fillWidth: true
readonly property string effectiveWheelAction: Settings.data.bar.mouseWheelAction || "none"
NComboBox {
Layout.fillWidth: true
label: I18n.tr("panels.bar.behavior-workspace-scroll-label")
description: I18n.tr("panels.bar.behavior-workspace-scroll-description")
model: {
var items = [
{
"key": "none",
"name": "Nothing"
},
{
"key": "workspace",
"name": "Workspace"
}
];
if (CompositorService.isNiri) {
items.push({
"key": "content",
"name": "Content"
});
}
return items;
}
currentKey: root.effectiveWheelAction
defaultValue: Settings.getDefaultValue("bar.mouseWheelAction")
onSelected: key => Settings.data.bar.mouseWheelAction = key
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("panels.general.reverse-scrolling-label")
description: I18n.tr("panels.general.reverse-scrolling-description")
checked: Settings.data.bar.reverseScroll
defaultValue: Settings.getDefaultValue("bar.reverseScroll")
onToggled: checked => Settings.data.bar.reverseScroll = checked
visible: Settings.data.bar.mouseWheelAction !== "none"
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("panels.bar.behavior-wheel-wrap-label")
description: I18n.tr("panels.bar.behavior-wheel-wrap-description")
checked: Settings.data.bar.mouseWheelWrap
defaultValue: Settings.getDefaultValue("bar.mouseWheelWrap")
onToggled: checked => Settings.data.bar.mouseWheelWrap = checked
visible: Settings.data.bar.mouseWheelAction === "workspace"
}
}
@@ -106,12 +106,46 @@ ColumnLayout {
NToggle {
Layout.fillWidth: true
visible: Settings.data.dock.dockType === "static" && Settings.data.bar.barType === "framed"
label: I18n.tr("panels.dock.appearance-frame-indicator-label")
description: I18n.tr("panels.dock.appearance-frame-indicator-description")
checked: Settings.data.dock.showFrameIndicator
defaultValue: Settings.getDefaultValue("dock.showFrameIndicator")
onToggled: checked => Settings.data.dock.showFrameIndicator = checked
label: I18n.tr("panels.dock.appearance-dock-indicator-label")
description: I18n.tr("panels.dock.appearance-dock-indicator-description")
checked: Settings.data.dock.showDockIndicator
defaultValue: Settings.getDefaultValue("dock.showDockIndicator")
onToggled: checked => Settings.data.dock.showDockIndicator = checked
}
NToggle {
Layout.fillWidth: true
visible: Settings.data.dock.showDockIndicator
label: I18n.tr("panels.dock.appearance-indicator-thickness-label")
description: I18n.tr("panels.dock.appearance-indicator-thickness-description")
checked: (Settings.data.dock.indicatorThickness || 3) >= 6
defaultValue: (Settings.getDefaultValue("dock.indicatorThickness") || 3) >= 6
onToggled: checked => Settings.data.dock.indicatorThickness = checked ? 6 : 3
}
NColorChoice {
Layout.fillWidth: true
visible: Settings.data.dock.showDockIndicator
label: I18n.tr("panels.dock.appearance-indicator-color-label")
description: I18n.tr("panels.dock.appearance-indicator-color-description")
currentKey: Settings.data.dock.indicatorColor || "primary"
defaultValue: Settings.getDefaultValue("dock.indicatorColor")
onSelected: key => Settings.data.dock.indicatorColor = key
}
NValueSlider {
Layout.fillWidth: true
visible: Settings.data.dock.showDockIndicator
label: I18n.tr("panels.dock.appearance-indicator-opacity-label")
description: I18n.tr("panels.dock.appearance-indicator-opacity-description")
from: 0.1
to: 1
stepSize: 0.01
showReset: true
value: Settings.data.dock.indicatorOpacity
defaultValue: Settings.getDefaultValue("dock.indicatorOpacity")
onMoved: value => Settings.data.dock.indicatorOpacity = value
text: Math.floor(Settings.data.dock.indicatorOpacity * 100) + "%"
}
NValueSlider {
@@ -169,10 +169,6 @@ ColumnLayout {
Layout.fillWidth: true
visible: !Settings.data.general.animationDisabled
RowLayout {
spacing: Style.marginL
Layout.fillWidth: true
NValueSlider {
Layout.fillWidth: true
label: I18n.tr("panels.user-interface.animation-speed-label")
@@ -180,26 +176,12 @@ ColumnLayout {
from: 0
to: 2.0
stepSize: 0.01
showReset: true
value: Settings.data.general.animationSpeed
defaultValue: Settings.getDefaultValue("general.animationSpeed")
onMoved: value => Settings.data.general.animationSpeed = Math.max(value, 0.05)
text: Math.round(Settings.data.general.animationSpeed * 100) + "%"
}
Item {
Layout.preferredWidth: 30 * Style.uiScaleRatio
Layout.preferredHeight: 30 * Style.uiScaleRatio
NIconButton {
icon: "restore"
baseSize: Style.baseWidgetSize * 0.8
tooltipText: I18n.tr("panels.user-interface.animation-speed-reset")
onClicked: Settings.data.general.animationSpeed = Settings.getDefaultValue("general.animationSpeed")
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
}
@@ -29,10 +29,6 @@ ColumnLayout {
spacing: Style.marginXXS
Layout.fillWidth: true
RowLayout {
spacing: Style.marginL
Layout.fillWidth: true
NValueSlider {
Layout.fillWidth: true
label: I18n.tr("panels.general.screen-corners-radius-label")
@@ -40,25 +36,11 @@ ColumnLayout {
from: 0
to: 2
stepSize: 0.01
showReset: true
value: Settings.data.general.screenRadiusRatio
defaultValue: Settings.getDefaultValue("general.screenRadiusRatio")
onMoved: value => Settings.data.general.screenRadiusRatio = value
text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%"
}
Item {
Layout.preferredWidth: 30 * Style.uiScaleRatio
Layout.preferredHeight: 30 * Style.uiScaleRatio
NIconButton {
icon: "restore"
baseSize: Style.baseWidgetSize * 0.8
tooltipText: I18n.tr("panels.general.screen-corners-radius-reset")
onClicked: Settings.data.general.screenRadiusRatio = Settings.getDefaultValue("general.screenRadiusRatio")
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
@@ -59,6 +59,7 @@ ColumnLayout {
from: 500
to: 10000
stepSize: 100
showReset: true
value: Settings.data.wallpaper.transitionDuration
onMoved: value => Settings.data.wallpaper.transitionDuration = value
text: (Settings.data.wallpaper.transitionDuration / 1000).toFixed(1) + "s"
@@ -71,6 +72,7 @@ ColumnLayout {
description: I18n.tr("panels.wallpaper.look-feel-edge-smoothness-description")
from: 0.0
to: 1.0
showReset: true
value: Settings.data.wallpaper.transitionEdgeSmoothness
onMoved: value => Settings.data.wallpaper.transitionEdgeSmoothness = value
text: Math.round(Settings.data.wallpaper.transitionEdgeSmoothness * 100) + "%"
@@ -32,6 +32,7 @@ WIDGET_TYPES = (
"NTextInput",
"NCheckbox",
"NLabel",
"NColorChoice",
"HookRow",
)
@@ -55,6 +55,7 @@ def main():
'--json', 'calendar',
'--json', 'description',
'--json', 'location',
'--json', 'repeat-pattern',
khal_start,
duration
]
@@ -375,6 +375,13 @@ Singleton {
}
}
// Scrollable workspace content (Niri)
function scrollWorkspaceContent(direction) {
if (backend && backend.scrollWorkspaceContent) {
backend.scrollWorkspaceContent(direction);
}
}
// Get current workspace
function getCurrentWorkspace() {
for (var i = 0; i < workspaces.count; i++) {
+9
View File
@@ -456,6 +456,15 @@ Item {
}
}
function scrollWorkspaceContent(direction) {
try {
var action = direction < 0 ? "focus-column-left" : "focus-column-right";
Quickshell.execDetached(["niri", "msg", "action", action]);
} catch (e) {
Logger.e("NiriService", "Failed to scroll workspace content:", e);
}
}
function focusWindow(window) {
try {
Quickshell.execDetached(["niri", "msg", "action", "focus-window", "--id", window.id.toString()]);
+14 -32
View File
@@ -46,7 +46,6 @@ Item {
return;
try {
I3.refreshWorkspaces();
I3.dispatch('(["input"])');
Qt.callLater(() => {
safeUpdateWorkspaces();
queryWindowWorkspaces();
@@ -235,16 +234,6 @@ Item {
}
}
Timer {
id: keyboardLayoutUpdateTimer
interval: 1000
running: true
repeat: true
onTriggered: {
queryKeyboardLayout();
}
}
function queryKeyboardLayout() {
swayInputsProcess.running = true;
}
@@ -459,22 +448,17 @@ Item {
function handleInputEvent(ev) {
try {
let beforeParenthesis;
const parenthesisPos = ev.lastIndexOf('(');
if (parenthesisPos === -1) {
beforeParenthesis = ev;
} else {
beforeParenthesis = ev.substring(0, parenthesisPos);
}
const layoutNameStart = beforeParenthesis.lastIndexOf(',') + 1;
const layoutName = ev.substring(layoutNameStart);
const eventData = JSON.parse(ev);
if (eventData.change == "xkb_layout" && eventData.input != null) {
const input = eventData.input;
if (input.type == "keyboard" && input.xkb_active_layout_name != null) {
const layoutName = input.xkb_active_layout_name;
KeyboardLayoutService.setCurrentLayout(layoutName);
Logger.d("HyprlandService", "Keyboard layout switched:", layoutName);
Logger.d("SwayService", "Keyboard layout switched:", layoutName);
}
}
} catch (e) {
Logger.e("HyprlandService", "Error handling activelayout:", e);
Logger.e("SwayService", "Error handling input event:", e);
}
}
@@ -516,16 +500,14 @@ Item {
if (event.type === "output") {
Qt.callLater(queryDisplayScales);
}
}
}
if (event.type == "get_inputs") {
I3IpcListener {
subscriptions: ["input"]
onIpcEvent: function (event) {
handleInputEvent(event.data);
}
// Query window workspaces on relevant events
if (event.type === "window" || event.type === "workspace") {
Qt.callLater(queryWindowWorkspaces);
}
}
}
// Public functions
+15 -2
View File
@@ -403,6 +403,16 @@ Singleton {
}
}
IpcHandler {
target: "monitors"
function on() {
CompositorService.turnOnMonitors();
}
function off() {
CompositorService.turnOffMonitors();
}
}
IpcHandler {
target: "darkMode"
function toggle() {
@@ -556,9 +566,12 @@ Singleton {
}
}
function random() {
function random(screen: string) {
if (Settings.data.wallpaper.enabled) {
WallpaperService.setRandomWallpaper();
if (!screen || screen === "all" || screen.trim().length === 0) {
screen = undefined;
}
WallpaperService.setRandomWallpaper(screen);
}
}
+16
View File
@@ -131,12 +131,15 @@ Singleton {
function parseEvents(text) {
const result = [];
const duplicates = new Set();
for (const line of text.split("\n")) {
if (!line.trim())
continue;
const dayEvents = JSON.parse(line);
for (const event of dayEvents) {
if (event["repeat-pattern"] !== "") {
// if there is a repeat pattern, the event must be included each time
result.push({
uid: event.uid,
calendar: event.calendar,
@@ -146,6 +149,19 @@ Singleton {
location: event.location,
description: event.description
});
} else if (!duplicates.has(event.uid)) {
// in any other cases, we must remove duplicates using the uid of the event
result.push({
uid: event.uid,
calendar: event.calendar,
summary: event.title,
start: parseTimestamp(event["start-long-full"]),
end: parseTimestamp(event["end-long-full"]),
location: event.location,
description: event.description
});
duplicates.add(event.uid);
}
}
}
+4
View File
@@ -189,6 +189,10 @@ Singleton {
"name": "vencord",
"path": "~/.config/Vencord"
},
{
"name": "vencord-flatpak",
"path": "~/.var/app/com.discordapp.Discord/config/Vencord"
},
{
"name": "betterdiscord",
"path": "~/.config/BetterDiscord"
+1 -4
View File
@@ -203,10 +203,7 @@ Singleton {
"visualizerType": "linear",
"textColor": "none",
"compactMode": false,
"panelShowAlbumArt": true,
"panelShowVisualizer": true,
"compactShowAlbumArt": true,
"compactShowVisualizer": false
"panelShowAlbumArt": true
},
"Microphone": {
"displayMode": "onhover",
+7 -4
View File
@@ -55,28 +55,31 @@ Singleton {
property var widgetMetadata: ({
"Clock": {
"showBackground": true,
"roundedCorners": true,
"clockStyle": "digital",
"clockColor": "none",
"useCustomFont": false,
"customFont": "",
"format": "HH:mm\\nd MMMM yyyy"
},
"MediaPlayer": {
"showBackground": true,
"roundedCorners": true,
"visualizerType": "linear",
"hideMode": "visible",
"showButtons": true,
"showAlbumArt": true,
"showVisualizer": true,
"roundedCorners": true
"showVisualizer": true
},
"Weather": {
"showBackground": true
"showBackground": true,
"roundedCorners": true
},
"SystemStat": {
"showBackground": true,
"roundedCorners": true,
"statType": "CPU",
"diskPath": "/",
"roundedCorners": true,
"layout": "bottom"
}
})
+11 -2
View File
@@ -430,10 +430,11 @@ Singleton {
}
// -------------------------------------------------------------------
function setRandomWallpaper() {
function setRandomWallpaper(screen) {
Logger.d("Wallpaper", "setRandomWallpaper");
if (Settings.data.wallpaper.enableMultiMonitorDirectories) {
if (screen === undefined) {
// Pick a random wallpaper per screen
for (var i = 0; i < Quickshell.screens.length; i++) {
var screenName = Quickshell.screens[i].name;
@@ -444,13 +445,21 @@ Singleton {
changeWallpaper(randomPath, screenName);
}
}
} else {
// Pick a random wallpaper for the specified screen
var wallpaperList = getWallpapersList(screen);
if (wallpaperList.length > 0) {
var randomPath = _pickUnusedRandom(screen, wallpaperList);
changeWallpaper(randomPath, screen);
}
}
} else {
// Pick a random wallpaper common to all screens
// We can use any screenName here, so we just pick the primary one.
var wallpaperList = getWallpapersList(Screen.name);
if (wallpaperList.length > 0) {
var randomPath = _pickUnusedRandom("all", wallpaperList);
changeWallpaper(randomPath, undefined);
changeWallpaper(randomPath, screen);
}
}
}