From 9d18d477d57dc322bc23883e3dde1a47601c37a3 Mon Sep 17 00:00:00 2001 From: Aiden Gerbrandt Date: Thu, 29 Jan 2026 17:55:26 -0600 Subject: [PATCH] update --- home/aiden/.config/niri/outputs.kdl | 32 +----- home/aiden/.config/noctalia/plugins.json | 2 +- .../plugins/privacy-indicator/BarWidget.qml | 103 +++++++++++------- .../plugins/privacy-indicator/i18n/hu.json | 21 ++++ .../plugins/privacy-indicator/i18n/ku.json | 21 ++++ .../plugins/privacy-indicator/i18n/pl.json | 21 ++++ .../plugins/privacy-indicator/i18n/zh-TW.json | 21 ++++ .../plugins/privacy-indicator/manifest.json | 6 +- .../plugins/screen-recorder/BarWidget.qml | 35 ++++-- .../noctalia/plugins/screen-recorder/Main.qml | 1 + .../plugins/screen-recorder/Settings.qml | 15 +++ .../plugins/screen-recorder/i18n/de.json | 2 + .../plugins/screen-recorder/i18n/en.json | 2 + .../plugins/screen-recorder/manifest.json | 4 +- .../plugins/update-count/BarWidget.qml | 100 +++++++++-------- .../noctalia/plugins/update-count/README.md | 1 + .../plugins/update-count/Settings.qml | 62 +++++------ .../plugins/update-count/i18n/hu.json | 47 ++++++++ .../plugins/update-count/i18n/ku.json | 47 ++++++++ .../plugins/update-count/i18n/pl.json | 47 ++++++++ .../plugins/update-count/i18n/zh-TW.json | 47 ++++++++ .../plugins/update-count/manifest.json | 2 +- .../plugins/update-count/updaterConfigs.json | 8 +- home/aiden/.config/noctalia/settings.json | 20 +++- 24 files changed, 501 insertions(+), 166 deletions(-) create mode 100644 home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/hu.json create mode 100644 home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/ku.json create mode 100644 home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/pl.json create mode 100644 home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/zh-TW.json create mode 100644 home/aiden/.config/noctalia/plugins/update-count/i18n/hu.json create mode 100644 home/aiden/.config/noctalia/plugins/update-count/i18n/ku.json create mode 100644 home/aiden/.config/noctalia/plugins/update-count/i18n/pl.json create mode 100644 home/aiden/.config/noctalia/plugins/update-count/i18n/zh-TW.json diff --git a/home/aiden/.config/niri/outputs.kdl b/home/aiden/.config/niri/outputs.kdl index 5b836a1..85833d5 100644 --- a/home/aiden/.config/niri/outputs.kdl +++ b/home/aiden/.config/niri/outputs.kdl @@ -1,30 +1,13 @@ //Acer 1080p -output "DP-3" { - mode "1920x1080" - transform "normal" - position x=0 y=0 - scale 1.0 -} -output "DP-4" { +output "Acer Technologies G246HYL LZ5AA0012413" { mode "1920x1080" transform "normal" position x=0 y=0 scale 1.0 } + //LG 2K -output "DP-5" { - mode "2560x1440" - transform "normal" - position x=1920 y=0 - scale 1.0 -} -output "DP-6" { - mode "2560x1440" - transform "normal" - position x=1920 y=0 - scale 1.0 -} -output "DP-7" { +output "LG Electronics LG ULTRAGEAR 101NTLELA752" { mode "2560x1440" transform "normal" position x=1920 y=0 @@ -32,18 +15,13 @@ output "DP-7" { } //HP 1080p -//output "DP-4" { -// mode "1920x1080" -// transform "normal" -// position x=4480 y=0 -// scale 1.0 -//} -output "HDMI-A-1" { +output "Hewlett Packard HP 27vx 3CM53800Q2" { mode "1920x1080" transform "normal" position x=4480 y=0 scale 1.0 } + //Built-in display output "eDP-1" { mode "1920x1080" diff --git a/home/aiden/.config/noctalia/plugins.json b/home/aiden/.config/noctalia/plugins.json index 0766f9c..967f3cd 100644 --- a/home/aiden/.config/noctalia/plugins.json +++ b/home/aiden/.config/noctalia/plugins.json @@ -2,7 +2,7 @@ "sources": [ { "enabled": true, - "name": "Official Noctalia Plugins", + "name": "Noctalia Plugins", "url": "https://github.com/noctalia-dev/noctalia-plugins" } ], diff --git a/home/aiden/.config/noctalia/plugins/privacy-indicator/BarWidget.qml b/home/aiden/.config/noctalia/plugins/privacy-indicator/BarWidget.qml index 91cb16f..41ec71e 100644 --- a/home/aiden/.config/noctalia/plugins/privacy-indicator/BarWidget.qml +++ b/home/aiden/.config/noctalia/plugins/privacy-indicator/BarWidget.qml @@ -9,7 +9,7 @@ import qs.Modules.Bar.Extras import qs.Services.UI import qs.Widgets -Rectangle { +Item { id: root property var pluginApi: null @@ -18,8 +18,13 @@ Rectangle { property string widgetId: "" property string section: "" - readonly property string barPosition: Settings.data.bar.position + // Bar positioning properties + readonly property string screenName: screen ? screen.name : "" + readonly property string barPosition: Settings.getBarPositionForScreen(screenName) readonly property bool isVertical: barPosition === "left" || barPosition === "right" + readonly property real barHeight: Style.getBarHeightForScreen(screenName) + readonly property real capsuleHeight: Style.getCapsuleHeightForScreen(screenName) + readonly property real barFontSize: Style.getBarFontSizeForScreen(screenName) property bool micActive: false property bool camActive: false @@ -44,12 +49,14 @@ Rectangle { readonly property bool isVisible: !hideInactive || micActive || camActive || scrActive property real margins: removeMargins ? 0 : Style.marginM * 2 - implicitWidth: isVertical ? Style.capsuleHeight : Math.round(layout.implicitWidth + margins) - implicitHeight: isVertical ? Math.round(layout.implicitHeight + margins) : Style.capsuleHeight + + readonly property real contentWidth: isVertical ? Style.capsuleHeight : Math.round(layout.implicitWidth + margins) + readonly property real contentHeight: isVertical ? Math.round(layout.implicitHeight + margins) : Style.capsuleHeight + + implicitWidth: contentWidth + implicitHeight: contentHeight Layout.alignment: Qt.AlignVCenter - radius: Style.radiusM - color: Style.capsuleColor visible: root.isVisible opacity: root.isVisible ? 1.0 : 0.0 @@ -221,6 +228,54 @@ Rectangle { return parts.length > 0 ? parts.join("\n") : ""; } + Rectangle { + id: visualCapsule + x: Style.pixelAlignCenter(parent.width, width) + y: Style.pixelAlignCenter(parent.height, height) + width: root.contentWidth + height: root.contentHeight + radius: Style.radiusM + color: Style.capsuleColor + border.color: Style.capsuleBorderColor + border.width: Style.capsuleBorderWidth + + Item { + id: layout + + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + + implicitWidth: iconsLayout.implicitWidth + implicitHeight: iconsLayout.implicitHeight + + GridLayout { + id: iconsLayout + + columns: root.isVertical ? 1 : 3 + rows: root.isVertical ? 3 : 1 + + rowSpacing: root.iconSpacing + columnSpacing: root.iconSpacing + + NIcon { + visible: micActive || !root.hideInactive + icon: micActive ? "microphone" : "microphone-off" + color: root.micColor + } + NIcon { + visible: camActive || !root.hideInactive + icon: camActive ? "camera" : "camera-off" + color: root.camColor + } + NIcon { + visible: scrActive || !root.hideInactive + icon: scrActive ? "screen-share" : "screen-share-off" + color: root.scrColor + } + } + } + } + MouseArea { anchors.fill: parent acceptedButtons: Qt.RightButton @@ -234,40 +289,4 @@ Rectangle { } onExited: TooltipService.hide() } - - Item { - id: layout - - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - - implicitWidth: iconsLayout.implicitWidth - implicitHeight: iconsLayout.implicitHeight - - GridLayout { - id: iconsLayout - - columns: root.isVertical ? 1 : 3 - rows: root.isVertical ? 3 : 1 - - rowSpacing: root.iconSpacing - columnSpacing: root.iconSpacing - - NIcon { - visible: micActive || !root.hideInactive - icon: micActive ? "microphone" : "microphone-off" - color: root.micColor - } - NIcon { - visible: camActive || !root.hideInactive - icon: camActive ? "camera" : "camera-off" - color: root.camColor - } - NIcon { - visible: scrActive || !root.hideInactive - icon: scrActive ? "screen-share" : "screen-share-off" - color: root.scrColor - } - } - } } diff --git a/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/hu.json b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/hu.json new file mode 100644 index 0000000..59606eb --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/hu.json @@ -0,0 +1,21 @@ +{ + "settings": { + "hideInactive": { + "desc": "Mikrofon, kamera és képernyő ikonok elrejtése, ha éppen nincsenek használatban.", + "label": "Inaktív állapotok elrejtése" + }, + "iconSpacing": { + "desc": "Állítsa be az ikonok közötti távolságot.", + "label": "Ikon távolság" + }, + "removeMargins": { + "desc": "Távolítsd el a widget összes külső margóját.", + "label": "Margók eltávolítása" + } + }, + "tooltip": { + "cam-on": "Kamera: {apps}", + "mic-on": "Mikrofon: {apps}", + "screen-on": "Képernyőmegosztás: {apps}" + } +} diff --git a/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/ku.json b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/ku.json new file mode 100644 index 0000000..aa0c8b7 --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/ku.json @@ -0,0 +1,21 @@ +{ + "settings": { + "hideInactive": { + "desc": "Îkonên mîkrofon, kamera û ekranê dema ku neçalak bin veşêre.", + "label": "Rewşa neçalak veşêre" + }, + "iconSpacing": { + "desc": "Cihê di navbera îkonan de diyar bike.", + "label": "Dûrahiya îkonan" + }, + "removeMargins": { + "desc": "Hemû marjînalên derveyî yên widgetê rake.", + "label": "Derdestên derxînin" + } + }, + "tooltip": { + "cam-on": "Kamera: {apps}", + "mic-on": "Mîkrofon: {apps}", + "screen-on": "Parvekirina ekranê: {apps}" + } +} diff --git a/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/pl.json b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/pl.json new file mode 100644 index 0000000..b24a019 --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/pl.json @@ -0,0 +1,21 @@ +{ + "settings": { + "hideInactive": { + "desc": "Ukryj ikony mikrofonu, kamery i ekranu, gdy są nieaktywne.", + "label": "Ukryj nieaktywne stany" + }, + "iconSpacing": { + "desc": "Ustaw odstęp między ikonami.", + "label": "Odstępy ikon" + }, + "removeMargins": { + "desc": "Usuń wszystkie zewnętrzne marginesy widżetu.", + "label": "Usuń marginesy" + } + }, + "tooltip": { + "cam-on": "Kamera: {apps}", + "mic-on": "Mikrofon: {apps}", + "screen-on": "Udostępnianie ekranu: {apps}" + } +} diff --git a/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/zh-TW.json b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/zh-TW.json new file mode 100644 index 0000000..3c1addb --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/privacy-indicator/i18n/zh-TW.json @@ -0,0 +1,21 @@ +{ + "settings": { + "hideInactive": { + "desc": "當麥克風, 攝影機及螢幕分享沒有啟動時就直接隱藏", + "label": "隱藏未啟動的狀態" + }, + "iconSpacing": { + "desc": "設定圖示之間的留空", + "label": "圖示間距" + }, + "removeMargins": { + "desc": "移除小工具外面的所有邊距", + "label": "移除邊距" + } + }, + "tooltip": { + "cam-on": "攝影機: {apps}", + "mic-on": "麥克風: {apps}", + "screen-on": "螢幕分享: {apps}" + } +} diff --git a/home/aiden/.config/noctalia/plugins/privacy-indicator/manifest.json b/home/aiden/.config/noctalia/plugins/privacy-indicator/manifest.json index d1a9fa5..ff17bbc 100644 --- a/home/aiden/.config/noctalia/plugins/privacy-indicator/manifest.json +++ b/home/aiden/.config/noctalia/plugins/privacy-indicator/manifest.json @@ -1,12 +1,14 @@ { "id": "privacy-indicator", "name": "Privacy Indicator", - "version": "1.0.10", + "version": "1.0.13", "minNoctaliaVersion": "3.6.0", - "author": "Noctalia Team ", + "author": "Noctalia Team", + "official": true, "license": "MIT", "repository": "https://github.com/noctalia-dev/noctalia-plugins", "description": "A privacy indicator widget that shows when microphone, camera or screen sharing is active.", + "tags": ["Bar", "Privacy", "Indicator"], "entryPoints": { "barWidget": "BarWidget.qml", "settings": "Settings.qml" diff --git a/home/aiden/.config/noctalia/plugins/screen-recorder/BarWidget.qml b/home/aiden/.config/noctalia/plugins/screen-recorder/BarWidget.qml index 1eb7bb8..df05153 100644 --- a/home/aiden/.config/noctalia/plugins/screen-recorder/BarWidget.qml +++ b/home/aiden/.config/noctalia/plugins/screen-recorder/BarWidget.qml @@ -15,6 +15,29 @@ NIconButton { property string section: "" readonly property var mainInstance: pluginApi?.mainInstance + readonly property bool hideInactive: + pluginApi?.pluginSettings?.hideInactive ?? + pluginApi?.manifest?.metadata?.defaultSettings?.hideInactive ?? + false + + readonly property bool shouldShow: !hideInactive || (mainInstance?.isRecording ?? false) || (mainInstance?.isPending ?? false) + + visible: true + opacity: shouldShow ? 1.0 : 0.0 + implicitWidth: shouldShow ? baseSize : 0 + implicitHeight: shouldShow ? baseSize : 0 + + Behavior on opacity { + NumberAnimation { duration: Style.animationNormal } + } + + Behavior on implicitWidth { + NumberAnimation { duration: Style.animationNormal } + } + + Behavior on implicitHeight { + NumberAnimation { duration: Style.animationNormal } + } enabled: mainInstance?.isAvailable ?? false icon: "camera-video" @@ -49,11 +72,7 @@ NIconButton { } onRightClicked: { - var popupMenuWindow = PanelService.getPopupMenuWindow(screen); - if (popupMenuWindow) { - popupMenuWindow.showContextMenu(contextMenu); - contextMenu.openAtItem(root, screen); - } + PanelService.showContextMenu(contextMenu, root, screen); } @@ -69,10 +88,8 @@ NIconButton { ] onTriggered: action => { - var popupMenuWindow = PanelService.getPopupMenuWindow(screen); - if (popupMenuWindow) { - popupMenuWindow.close(); - } + contextMenu.close(); + PanelService.closeContextMenu(screen); if (action === "widget-settings") { BarService.openPluginSettings(screen, pluginApi.manifest); diff --git a/home/aiden/.config/noctalia/plugins/screen-recorder/Main.qml b/home/aiden/.config/noctalia/plugins/screen-recorder/Main.qml index 6283dd0..79b71b0 100644 --- a/home/aiden/.config/noctalia/plugins/screen-recorder/Main.qml +++ b/home/aiden/.config/noctalia/plugins/screen-recorder/Main.qml @@ -54,6 +54,7 @@ Item { } // Settings shortcuts + readonly property bool hideInactive: pluginApi?.pluginSettings?.hideInactive ?? false readonly property string directory: pluginApi?.pluginSettings?.directory || "" readonly property string filenamePattern: pluginApi?.pluginSettings?.filenamePattern || "recording_yyyyMMdd_HHmmss" readonly property string frameRate: pluginApi?.pluginSettings?.frameRate || "60" diff --git a/home/aiden/.config/noctalia/plugins/screen-recorder/Settings.qml b/home/aiden/.config/noctalia/plugins/screen-recorder/Settings.qml index 4d6e12e..9806b37 100644 --- a/home/aiden/.config/noctalia/plugins/screen-recorder/Settings.qml +++ b/home/aiden/.config/noctalia/plugins/screen-recorder/Settings.qml @@ -11,6 +11,11 @@ ColumnLayout { property var pluginApi: null + property bool editHideInactive: + pluginApi?.pluginSettings?.hideInactive ?? + pluginApi?.manifest?.metadata?.defaultSettings?.hideInactive ?? + false + property string editDirectory: pluginApi?.pluginSettings?.directory || pluginApi?.manifest?.metadata?.defaultSettings?.directory || @@ -77,6 +82,7 @@ ColumnLayout { return } + pluginApi.pluginSettings.hideInactive = root.editHideInactive pluginApi.pluginSettings.directory = root.editDirectory pluginApi.pluginSettings.filenamePattern = root.editFilenamePattern pluginApi.pluginSettings.frameRate = root.editFrameRate @@ -137,6 +143,15 @@ ColumnLayout { defaultValue: pluginApi?.manifest?.metadata?.defaultSettings?.copyToClipboard ?? false } + // Hide When Inactive Toggle + NToggle { + label: pluginApi.tr("settings.general.hide-when-inactive") + description: pluginApi.tr("settings.general.hide-when-inactive-description") + checked: root.editHideInactive + onToggled: root.editHideInactive = checked + defaultValue: pluginApi?.manifest?.metadata?.defaultSettings?.hideInactive ?? false + } + NDivider { Layout.fillWidth: true } diff --git a/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/de.json b/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/de.json index 44225d4..226e5d9 100644 --- a/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/de.json +++ b/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/de.json @@ -34,6 +34,8 @@ "general": { "copy-to-clipboard": "In die Zwischenablage kopieren", "copy-to-clipboard-description": "Kopiere die Datei nach Abschluss der Aufnahme in die Zwischenablage.", + "hide-when-inactive": "Bei Inaktivität ausblenden", + "hide-when-inactive-description": "Widget in Statusleiste ausblenden, wenn keine Aufnahme stattfindet", "output-folder": "Ausgabeordner", "output-folder-description": "Ordner, in dem Bildschirmaufnahmen gespeichert werden", "show-cursor": "Cursor anzeigen", diff --git a/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/en.json b/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/en.json index a396991..5f4d240 100644 --- a/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/en.json +++ b/home/aiden/.config/noctalia/plugins/screen-recorder/i18n/en.json @@ -35,6 +35,8 @@ "general": { "copy-to-clipboard": "Copy to clipboard", "copy-to-clipboard-description": "Copy the file to clipboard after recording finishes.", + "hide-when-inactive": "Hide when inactive", + "hide-when-inactive-description": "Hide the bar indicator when not recording", "output-folder": "Output folder", "output-folder-description": "Folder where screen recordings will be saved", "show-cursor": "Show cursor", diff --git a/home/aiden/.config/noctalia/plugins/screen-recorder/manifest.json b/home/aiden/.config/noctalia/plugins/screen-recorder/manifest.json index 1e3e2e3..0e33aa1 100644 --- a/home/aiden/.config/noctalia/plugins/screen-recorder/manifest.json +++ b/home/aiden/.config/noctalia/plugins/screen-recorder/manifest.json @@ -1,9 +1,10 @@ { "id": "screen-recorder", "name": "Screen Recorder", - "version": "1.0.8", + "version": "1.1.2", "minNoctaliaVersion": "3.6.0", "author": "Noctalia Team", + "official": true, "license": "MIT", "repository": "https://github.com/noctalia-dev/noctalia-plugins", "description": "Hardware-accelerated screen recording using gpu-screen-recorder with customizable video and audio settings", @@ -22,6 +23,7 @@ }, "metadata": { "defaultSettings": { + "hideInactive": false, "directory": "", "filenamePattern": "recording_yyyyMMdd_HHmmss", "frameRate": "60", diff --git a/home/aiden/.config/noctalia/plugins/update-count/BarWidget.qml b/home/aiden/.config/noctalia/plugins/update-count/BarWidget.qml index 37dc85c..107fa7e 100644 --- a/home/aiden/.config/noctalia/plugins/update-count/BarWidget.qml +++ b/home/aiden/.config/noctalia/plugins/update-count/BarWidget.qml @@ -6,7 +6,7 @@ import qs.Commons import qs.Widgets import qs.Services.UI -Rectangle { +Item { id: root property var pluginApi: null @@ -18,14 +18,6 @@ Rectangle { readonly property string barPosition: Settings.data.bar.position readonly property bool isVertical: barPosition === "left" || barPosition === "right" - implicitWidth: isVertical ? Style.capsuleHeight : layout.implicitWidth + Style.marginS * 2 - implicitHeight: isVertical ? layout.implicitHeight + Style.marginS * 2 : Style.capsuleHeight - - color: root.hovered ? Color.mHover : Style.capsuleColor - radius: Style.radiusM - border.color: Style.capsuleBorderColor - border.width: Style.capsuleBorderWidth - property string currentIconName: pluginApi?.pluginSettings?.currentIconName || pluginApi?.manifest?.metadata?.defaultSettings?.currentIconName property bool hideOnZero: pluginApi?.pluginSettings.hideOnZero || pluginApi?.manifest?.metadata.defaultSettings?.hideOnZero readonly property bool isVisible: (root.pluginApi?.mainInstance?.updateCount > 0) || !root.hideOnZero @@ -33,57 +25,73 @@ Rectangle { // also set opacity to zero when invisible as we use opacity to hide the barWidgetLoader opacity: root.isVisible ? 1.0 : 0.0 + readonly property real contentWidth: isVertical ? Style.capsuleHeight : layout.implicitWidth + Style.marginS * 2 + readonly property real contentHeight: isVertical ? layout.implicitHeight + Style.marginS * 2 : Style.capsuleHeight + + implicitWidth: contentWidth + implicitHeight: contentHeight // // ------ Widget ------ // - Item { - id: layout - anchors.centerIn: parent + Rectangle { + id: visualCapsule + x: Style.pixelAlignCenter(parent.width, width) + y: Style.pixelAlignCenter(parent.height, height) + width: root.contentWidth + height: root.contentHeight + color: root.hovered ? Color.mHover : Style.capsuleColor + radius: Style.radiusM + border.color: Style.capsuleBorderColor + border.width: Style.capsuleBorderWidth - implicitWidth: grid.implicitWidth - implicitHeight: grid.implicitHeight + Item { + id: layout + anchors.centerIn: parent - GridLayout { - id: grid - columns: root.isVertical ? 1 : 2 - rowSpacing: Style.marginS - columnSpacing: Style.marginS + implicitWidth: grid.implicitWidth + implicitHeight: grid.implicitHeight - NIcon { - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - icon: root.currentIconName - color: root.hovered ? Color.mOnHover : Color.mOnSurface - } + GridLayout { + id: grid + columns: root.isVertical ? 1 : 2 + rowSpacing: Style.marginS + columnSpacing: Style.marginS - NText { - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - text: root.pluginApi?.mainInstance?.updateCount.toString() - color: root.hovered ? Color.mOnHover : Color.mOnSurface - pointSize: Style.barFontSize + NIcon { + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + icon: root.currentIconName + color: root.hovered ? Color.mOnHover : Color.mOnSurface + } + + NText { + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + text: root.pluginApi?.mainInstance?.updateCount.toString() + color: root.hovered ? Color.mOnHover : Color.mOnSurface + pointSize: Style.barFontSize + } } } + } - MouseArea { - anchors.fill: parent - hoverEnabled: true - cursorShape: root.pluginApi?.mainInstance?.updateCount > 0 ? Qt.PointingHandCursor : Qt.ArrowCursor + MouseArea { + anchors.fill: parent + hoverEnabled: true + cursorShape: root.pluginApi?.mainInstance?.updateCount > 0 ? Qt.PointingHandCursor : Qt.ArrowCursor - onClicked: { - if (root.pluginApi?.mainInstance?.updateCount > 0) - root.pluginApi?.mainInstance?.startDoSystemUpdate(); - } + onClicked: { + if (root.pluginApi?.mainInstance?.updateCount > 0) + root.pluginApi?.mainInstance?.startDoSystemUpdate(); + } + onEntered: { + root.hovered = true; + buildTooltip(); + } - onEntered: { - root.hovered = true; - buildTooltip(); - } - - onExited: { - root.hovered = false; - TooltipService.hide(); - } + onExited: { + root.hovered = false; + TooltipService.hide(); } } diff --git a/home/aiden/.config/noctalia/plugins/update-count/README.md b/home/aiden/.config/noctalia/plugins/update-count/README.md index f3b6c03..16dd905 100644 --- a/home/aiden/.config/noctalia/plugins/update-count/README.md +++ b/home/aiden/.config/noctalia/plugins/update-count/README.md @@ -36,6 +36,7 @@ Configure the plugin in Noctalia settings: - **Noctalia Shell**: 3.6.0 or later. - **Update backend**: one of the supported package managers defined in `updaterConfigs.json` (recommended, but not required). + - **Paru/Yay**: Default `updaterConfigs.json` requires `checkupdates` ## Technical Details diff --git a/home/aiden/.config/noctalia/plugins/update-count/Settings.qml b/home/aiden/.config/noctalia/plugins/update-count/Settings.qml index 7ab77c0..37bc58d 100644 --- a/home/aiden/.config/noctalia/plugins/update-count/Settings.qml +++ b/home/aiden/.config/noctalia/plugins/update-count/Settings.qml @@ -70,16 +70,26 @@ ColumnLayout { } } - RowLayout { - Layout.fillWidth: true - spacing: Style.marginL + ColumnLayout { + spacing: Style.marginM - NLabel { - label: pluginApi?.tr("settings.updateInterval.label") - description: pluginApi?.tr("settings.updateInterval.desc") + RowLayout { + Layout.fillWidth: true + spacing: Style.marginM + + NLabel { + label: pluginApi?.tr("settings.updateInterval.label") + description: pluginApi?.tr("settings.updateInterval.desc") + } + + NText { + text: root.updateIntervalMinutes.toString().padStart(3, " ") + " minutes" + color: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mOnPrimary + } } NSlider { + Layout.fillWidth: true from: 5 to: 300 value: root.updateIntervalMinutes @@ -88,11 +98,6 @@ ColumnLayout { root.updateIntervalMinutes = value; } } - - NText { - text: root.updateIntervalMinutes.toString().padStart(3, " ") + " minutes" - color: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mOnPrimary - } } NDivider { @@ -145,28 +150,23 @@ ColumnLayout { } ColumnLayout { - RowLayout { - NText { - Layout.fillWidth: true - text: pluginApi?.tr("settings.currentNumUpdatesCmd.label") - color: Settings.data.colorSchemes.darkMode ? Color.mSecondary : Color.mOnSecondary - } - NText { - text: root.customCmdGetNumUpdates || pluginApi?.mainInstance?.updater.cmdGetNumUpdates || "NA" - color: Settings.data.colorSchemes.darkMode ? Color.mTertiary : Color.mOnTertiary - } + NText { + text: pluginApi?.tr("settings.currentNumUpdatesCmd.label") + color: Settings.data.colorSchemes.darkMode ? Color.mSecondary : Color.mOnSecondary + } + NLabel { + description: `> ${root.customCmdGetNumUpdates || pluginApi?.mainInstance?.updater.cmdGetNumUpdates || "NA"}` + } + } + + ColumnLayout { + NText { + text: pluginApi?.tr("settings.currentUpdateCmd.label") + color: Settings.data.colorSchemes.darkMode ? Color.mSecondary : Color.mOnSecondary } - RowLayout { - NText { - Layout.fillWidth: true - text: pluginApi?.tr("settings.currentUpdateCmd.label") - color: Settings.data.colorSchemes.darkMode ? Color.mSecondary : Color.mOnSecondary - } - NText { - text: root.customCmdDoSystemUpdate || pluginApi?.mainInstance?.updater.cmdDoSystemUpdate || "NA" - color: Settings.data.colorSchemes.darkMode ? Color.mTertiary : Color.mOnTertiary - } + NLabel { + description: `> ${root.customCmdDoSystemUpdate || pluginApi?.mainInstance?.updater.cmdDoSystemUpdate || "NA"}` } } diff --git a/home/aiden/.config/noctalia/plugins/update-count/i18n/hu.json b/home/aiden/.config/noctalia/plugins/update-count/i18n/hu.json new file mode 100644 index 0000000..0337c39 --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/update-count/i18n/hu.json @@ -0,0 +1,47 @@ +{ + "settings": { + "changeIcon": { + "label": "Ikon kiválasztása" + }, + "currentCommands": { + "label": "Jelenleg beállított parancsok" + }, + "currentIconName": { + "desc": "Jelenleg beállított ikon neve.", + "label": "Ikonazonosító" + }, + "currentNumUpdatesCmd": { + "label": "Frissítések száma" + }, + "currentUpdateCmd": { + "label": "Rendszerfrissítés" + }, + "customCmdDoSystemUpdate": { + "desc": "A rendszerfrissítés végrehajtásához használt shell parancs.", + "label": "Egyedi rendszerfrissítési parancs", + "placeholder": "e.g., yay -Syu" + }, + "customCmdGetNumUpdates": { + "desc": "Shell parancs, amelynek egyetlen egész számot kell kiírnia, ami a rendelkezésre álló frissítések számát jelöli.", + "label": "Egyéni frissítésszám parancs", + "placeholder": "e.g., yay -Quq 2>/dev/null | wc -l" + }, + "hideWidget": { + "desc": "Akkor rejtse el a widgetet, ha a rendelkezésre álló frissítések száma 0.", + "label": "Elrejtés nulla frissítés esetén" + }, + "terminal": { + "desc": "A rendszerfrissítés végrehajtásához használt terminálparancs. Opcionális: {} a frissítési parancshoz.", + "label": "Terminálemulátor", + "placeholder": "pl.: foot -e, hyprctl dispatch exec '[float] kitty -e {}'-plural" + }, + "updateInterval": { + "desc": "Lekérdezési időtartam a frissítések ellenőrzéséhez", + "label": "Frissítések ellenőrzésének gyakorisága" + } + }, + "tooltip": { + "noUpdatesAvailable": "Nincsenek észlelt frissítések", + "updatesAvailable": "Kattintson a beállított rendszerfrissítési parancs futtatásához" + } +} diff --git a/home/aiden/.config/noctalia/plugins/update-count/i18n/ku.json b/home/aiden/.config/noctalia/plugins/update-count/i18n/ku.json new file mode 100644 index 0000000..dc34af4 --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/update-count/i18n/ku.json @@ -0,0 +1,47 @@ +{ + "settings": { + "changeIcon": { + "label": "Îkon Hilbijêre" + }, + "currentCommands": { + "label": "Niha emrên hatine sazkirin" + }, + "currentIconName": { + "desc": "Navê îkona ku niha hatiye vesazkirin.", + "label": "Nasnameya Îkonê" + }, + "currentNumUpdatesCmd": { + "label": "Hejmara nûvekirinê" + }, + "currentUpdateCmd": { + "label": "Nûkirina sîstemê" + }, + "customCmdDoSystemUpdate": { + "desc": "Fermana şêlê ya ku ji bo pêkanîna nûvekirina pergalê tê bikaranîn.", + "label": "Fermana Nûvekirina Sîstemê ya Xweser", + "placeholder": "mînak, yay -Syu" + }, + "customCmdGetNumUpdates": { + "desc": "Fermana shellê ya ku divê yek hejmarek temam derxe ku hejmara nûvekirinên berdest nîşan dide.", + "label": "Fermana Jimartinê ya Hejmara Nûvekirinê ya Xweser", + "placeholder": "mînak, yay -Quq 2>/dev/null | wc -l" + }, + "hideWidget": { + "desc": "Demaşê widgetê gava jimara nûkirinên berdest 0 be.", + "label": "Veşartin li ser Nûkirinên Sifir" + }, + "terminal": { + "desc": "Fermana termînalê ya ku ji bo pêkanîna fermana nûvekirina pergalê tê bikaranîn. Vebijêrkî: {} ji bo fermana nûvekirinê.", + "label": "Emulatorê Termînalê", + "placeholder": "mînak, foot -e, hyprctl dispatch exec '[float] kitty -e {}'" + }, + "updateInterval": { + "desc": "Demê dûrî ji bo kontrolên nûvekirinê", + "label": "Demê Kontrolkirina Nûvekirinê" + } + }, + "tooltip": { + "noUpdatesAvailable": "Tu nûvekirin hatin dîtin", + "updatesAvailable": "Bitikîne da fermana nûkirina pergalê ya hatî vesazkirin bimeşîne" + } +} diff --git a/home/aiden/.config/noctalia/plugins/update-count/i18n/pl.json b/home/aiden/.config/noctalia/plugins/update-count/i18n/pl.json new file mode 100644 index 0000000..0927ec5 --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/update-count/i18n/pl.json @@ -0,0 +1,47 @@ +{ + "settings": { + "changeIcon": { + "label": "Wybierz ikonę" + }, + "currentCommands": { + "label": "Obecnie skonfigurowane polecenia" + }, + "currentIconName": { + "desc": "Aktualnie skonfigurowana nazwa ikony.", + "label": "Identyfikator ikony" + }, + "currentNumUpdatesCmd": { + "label": "Liczba aktualizacji" + }, + "currentUpdateCmd": { + "label": "Aktualizacja systemu" + }, + "customCmdDoSystemUpdate": { + "desc": "Polecenie powłoki używane do przeprowadzania aktualizacji systemu.", + "label": "Niestandardowe polecenie aktualizacji systemu", + "placeholder": "np. yay -Syu" + }, + "customCmdGetNumUpdates": { + "desc": "Polecenie powłoki, które musi zwrócić pojedynczą liczbę całkowitą reprezentującą liczbę dostępnych aktualizacji.", + "label": "Własna komenda aktualizująca liczbę", + "placeholder": "np. yay -Quq 2>/dev/null | wc -l" + }, + "hideWidget": { + "desc": "Ukryj widżet, gdy liczba dostępnych aktualizacji wynosi 0.", + "label": "Ukryj przy braku aktualizacji" + }, + "terminal": { + "desc": "Polecenie terminala używane do wykonywania polecenia aktualizacji systemu. Opcjonalne: {} dla polecenia aktualizacji.", + "label": "Emulator terminala", + "placeholder": "np. foot -e, hyprctl dispatch exec '[float] kitty -e {}'" + }, + "updateInterval": { + "desc": "Interwał odpytywania dla sprawdzania aktualizacji", + "label": "Interwał sprawdzania aktualizacji" + } + }, + "tooltip": { + "noUpdatesAvailable": "Nie wykryto aktualizacji", + "updatesAvailable": "Kliknij, aby uruchomić skonfigurowane polecenie aktualizacji systemu" + } +} diff --git a/home/aiden/.config/noctalia/plugins/update-count/i18n/zh-TW.json b/home/aiden/.config/noctalia/plugins/update-count/i18n/zh-TW.json new file mode 100644 index 0000000..adb5aad --- /dev/null +++ b/home/aiden/.config/noctalia/plugins/update-count/i18n/zh-TW.json @@ -0,0 +1,47 @@ +{ + "settings": { + "changeIcon": { + "label": "選取圖示" + }, + "currentCommands": { + "label": "現在所設定的指令" + }, + "currentIconName": { + "desc": "現在所設定的圖示名稱", + "label": "圖示識別" + }, + "currentNumUpdatesCmd": { + "label": "更新數量" + }, + "currentUpdateCmd": { + "label": "系統更新" + }, + "customCmdDoSystemUpdate": { + "desc": "用來執行系統更新的 shell 指令", + "label": "自訂系統更新指令", + "placeholder": "例如: yay -Syu" + }, + "customCmdGetNumUpdates": { + "desc": "所使用的 shell 指令必須要輸出用來表示數量的整數值 (int)", + "label": "自訂更新數量指令", + "placeholder": "例如: yay -Quq 2>/dev/null | wc -l" + }, + "hideWidget": { + "desc": "當可以更新的套件數量是0時隱藏小工具", + "label": "零更新時隱藏" + }, + "terminal": { + "desc": "用來執行系統更新指令用的終端機指令; 可選用: 以 {} 作為更新指令", + "label": "終端機", + "placeholder": "例如 foot -e, hyprctl dispatch exec '[float] kitty -e {}'" + }, + "updateInterval": { + "desc": "確認更新的時間間格", + "label": "更新檢查間格" + } + }, + "tooltip": { + "noUpdatesAvailable": "沒有偵測到更新", + "updatesAvailable": "點擊以執行設定好的系統更新指令" + } +} diff --git a/home/aiden/.config/noctalia/plugins/update-count/manifest.json b/home/aiden/.config/noctalia/plugins/update-count/manifest.json index b142c1b..ec94246 100644 --- a/home/aiden/.config/noctalia/plugins/update-count/manifest.json +++ b/home/aiden/.config/noctalia/plugins/update-count/manifest.json @@ -1,7 +1,7 @@ { "id": "update-count", "name": "Update Count", - "version": "1.0.9", + "version": "1.0.11", "minNoctaliaVersion": "3.6.0", "author": "BukoMoon", "license": "GPLv3", diff --git a/home/aiden/.config/noctalia/plugins/update-count/updaterConfigs.json b/home/aiden/.config/noctalia/plugins/update-count/updaterConfigs.json index c4209ee..b89713e 100644 --- a/home/aiden/.config/noctalia/plugins/update-count/updaterConfigs.json +++ b/home/aiden/.config/noctalia/plugins/update-count/updaterConfigs.json @@ -1,14 +1,14 @@ [ { "name": "yay", - "cmdCheck": "command -v yay >/dev/null 2>&1", - "cmdGetNumUpdates": "yay -Qu 2>/dev/null | wc -l", + "cmdCheck": "command -v checkupdates >/dev/null 2>&1 && command -v yay >/dev/null 2>&1", + "cmdGetNumUpdates": "(checkupdates 2>/dev/null; yay -Qua 2>/dev/null) | wc -l", "cmdDoSystemUpdate": "yay -Syu" }, { "name": "paru", - "cmdCheck": "command -v paru >/dev/null 2>&1", - "cmdGetNumUpdates": "paru -Qu 2>/dev/null | wc -l", + "cmdCheck": "command -v checkupdates >/dev/null 2>&1 && command -v paru >/dev/null 2>&1", + "cmdGetNumUpdates": "(checkupdates 2>/dev/null; paru -Qua 2>/dev/null) | wc -l", "cmdDoSystemUpdate": "paru -Syu" }, { diff --git a/home/aiden/.config/noctalia/settings.json b/home/aiden/.config/noctalia/settings.json index 10c1858..e02f74e 100644 --- a/home/aiden/.config/noctalia/settings.json +++ b/home/aiden/.config/noctalia/settings.json @@ -1,6 +1,8 @@ { "appLauncher": { "autoPasteClipboard": false, + "clipboardWatchImageCommand": "wl-paste --type image --watch cliphist store", + "clipboardWatchTextCommand": "wl-paste --type text --watch cliphist store", "clipboardWrapText": true, "customLaunchPrefix": "", "customLaunchPrefixEnabled": false, @@ -32,12 +34,15 @@ }, "bar": { "backgroundOpacity": 0.93, + "barType": "simple", "capsuleOpacity": 1, "density": "comfortable", "exclusive": true, "floating": false, + "frameRadius": 12, + "frameThickness": 8, "hideOnOverview": false, - "marginHorizontal": 5, + "marginHorizontal": 10, "marginVertical": 5, "monitors": [ ], @@ -104,14 +109,19 @@ { "characterCount": 10, "colorizeIcons": false, + "emptyColor": "secondary", "enableScrollWheel": true, + "focusedColor": "primary", "followFocusedScreen": false, "groupedBorderOpacity": 1, "hideUnoccupied": true, "iconScale": 0.8, "id": "Workspace", "labelMode": "name", + "occupiedColor": "secondary", + "reverseScroll": false, "showApplications": false, + "showBadge": true, "showLabelsOnlyWhenOccupied": true, "unfocusedIconsOpacity": 1 }, @@ -387,8 +397,10 @@ }, "general": { "allowPanelsOnScreenWithoutBar": true, + "allowPasswordWithFprintd": false, "animationDisabled": false, "animationSpeed": 1, + "autoStartAuth": false, "avatarImage": "/home/aiden/.face", "boxRadiusRatio": 1, "compactLockScreen": false, @@ -544,7 +556,7 @@ "showHeader": true, "showNumberLabels": true }, - "settingsVersion": 44, + "settingsVersion": 46, "systemMonitor": { "cpuCriticalThreshold": 90, "cpuPollingInterval": 3000, @@ -588,6 +600,10 @@ { "enabled": true, "id": "niri" + }, + { + "enabled": true, + "id": "btop" } ], "enableUserTheming": false