Noctalia Performance Mode: basic backend and toast.

- Could use a bar widget
- Could use a control center widget
This commit is contained in:
ItsLemmy
2025-11-07 15:58:06 -05:00
parent 53515c23ca
commit 6290340988
13 changed files with 119 additions and 41 deletions
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Die Paneele rasten an der Stange und den Bildschirmrändern ein und sorgen so für ein nahtloses Erscheinungsbild mit stilvollen, umgekehrten Ecken.",
"label": "Paneele an Kanten ausrichten"
},
"settings-panel-attached-to-bar": {
"description": "Richten Sie das Einstellungsfenster an der Leiste aus, um ein einheitliches Erscheinungsbild zu erhalten.",
"label": "Einstellungsfenster an Leiste ausrichten"
},
"panels-overlay": {
"description": "Stellt sicher, dass Panels und die Leiste sichtbar bleiben, auch über Vollbildanwendungen.",
"label": "Panels & Leiste oben behalten"
@@ -1528,6 +1524,10 @@
"description": "Passen Sie das Aussehen, die Haptik und das Verhalten der Benutzeroberfläche an.",
"label": "Aussehen"
},
"settings-panel-attached-to-bar": {
"description": "Richten Sie das Einstellungsfenster an der Leiste aus, um ein einheitliches Erscheinungsbild zu erhalten.",
"label": "Einstellungsfenster an Leiste ausrichten"
},
"shadows": {
"description": "Aktiviert Schlagschatten unter Balken und Panels.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Normaler Modus",
"not-installed": "wlsunset nicht installiert"
},
"noctalia-performance": {
"disabled": "Leistungsmodus deaktiviert",
"enabled": "Leistungsmodus aktiviert",
"label": "Noctalia-Aufführung"
},
"power-profile": {
"changed": "Energieprofil geändert",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Panels lock to the bar and screen edges, creating a seamless look with stylish inverted corners.",
"label": "Snap panels to edges"
},
"settings-panel-attached-to-bar": {
"description": "Keep the Settings window aligned with the bar for a unified look.",
"label": "Snap Settings window to bar"
},
"panels-overlay": {
"description": "Ensures panels and the bar remain visible, even over fullscreen applications.",
"label": "Keep panels & bar on top"
@@ -1528,6 +1524,10 @@
"description": "Customize the look, feel, and behavior of the interface.",
"label": "Appearance"
},
"settings-panel-attached-to-bar": {
"description": "Keep the Settings window aligned with the bar for a unified look.",
"label": "Snap Settings window to bar"
},
"shadows": {
"description": "Enables drop shadows under bars and panels.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Normal mode",
"not-installed": "wlsunset not installed"
},
"noctalia-performance": {
"disabled": "Performance mode disabled",
"enabled": "Performance mode enabled",
"label": "Noctalia performance"
},
"power-profile": {
"changed": "Power profile changed",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Los paneles se fijan a la barra y a los bordes de la pantalla, creando una apariencia impecable con elegantes esquinas invertidas.",
"label": "Ajustar paneles a los bordes"
},
"settings-panel-attached-to-bar": {
"description": "Mantén la ventana de Configuración alineada con la barra para un aspecto unificado.",
"label": "Ajustar Configuración a la barra"
},
"panels-overlay": {
"description": "Garantiza que los paneles y la barra permanezcan visibles, incluso sobre aplicaciones en pantalla completa.",
"label": "Mantener paneles y barra en la parte superior"
@@ -1528,6 +1524,10 @@
"description": "Personaliza la apariencia, el ambiente y el comportamiento de la interfaz.",
"label": "Apariencia"
},
"settings-panel-attached-to-bar": {
"description": "Mantén la ventana de Configuración alineada con la barra para un aspecto unificado.",
"label": "Ajustar Configuración a la barra"
},
"shadows": {
"description": "Habilita sombras paralelas debajo de las barras y los paneles.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Modo normal",
"not-installed": "wlsunset no está instalado"
},
"noctalia-performance": {
"disabled": "Modo de rendimiento desactivado",
"enabled": "Modo de rendimiento activado",
"label": "Actuación de Noctalia"
},
"power-profile": {
"changed": "Perfil de energía cambiado",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Les panneaux se verrouillent sur la barre et les bords de l'écran, créant un aspect homogène avec d'élégants coins inversés.",
"label": "Aligner les panneaux aux bords"
},
"settings-panel-attached-to-bar": {
"description": "Alignez la fenêtre des paramètres sur la barre pour un rendu cohérent.",
"label": "Aligner la fenêtre des paramètres sur la barre"
},
"panels-overlay": {
"description": "Garantit que les panneaux et la barre restent visibles, même au-dessus des applications en plein écran.",
"label": "Garder les panneaux et la barre en haut."
@@ -1528,6 +1524,10 @@
"description": "Personnaliser l'apparence, l'ergonomie et le comportement de l'interface.",
"label": "Apparence"
},
"settings-panel-attached-to-bar": {
"description": "Alignez la fenêtre des paramètres sur la barre pour un rendu cohérent.",
"label": "Aligner la fenêtre des paramètres sur la barre"
},
"shadows": {
"description": "Active les ombres portées sous les barres et les panneaux.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Mode normal",
"not-installed": "wlsunset non installé"
},
"noctalia-performance": {
"disabled": "Mode performance désactivé",
"enabled": "Mode performance activé",
"label": "Performance de Noctalia"
},
"power-profile": {
"changed": "Profil d'alimentation changé",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Os painéis travam na barra e nas bordas da tela, criando uma aparência perfeita com cantos invertidos elegantes.",
"label": "Ajustar Painéis às Bordas"
},
"settings-panel-attached-to-bar": {
"description": "Mantenha a janela de Configurações alinhada com a barra para um visual uniforme.",
"label": "Ajustar Configurações à barra"
},
"panels-overlay": {
"description": "Garante que os painéis e a barra permaneçam visíveis, mesmo sobre aplicativos em tela cheia.",
"label": "Manter Painéis e Barra no Topo"
@@ -1528,6 +1524,10 @@
"description": "Personalize a aparência, a sensação e o comportamento da interface.",
"label": "Aparência"
},
"settings-panel-attached-to-bar": {
"description": "Mantenha a janela de Configurações alinhada com a barra para um visual uniforme.",
"label": "Ajustar Configurações à barra"
},
"shadows": {
"description": "Ativa sombras projetadas sob barras e painéis.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Modo normal",
"not-installed": "wlsunset não está instalado"
},
"noctalia-performance": {
"disabled": "Modo de desempenho desativado",
"enabled": "Modo de desempenho ativado",
"label": "Apresentação de Noctalia"
},
"power-profile": {
"changed": "Perfil de energia alterado",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Paneller çubuğa ve ekran kenarlarına kilitlenerek şık ters köşelerle kusursuz bir görünüm oluşturur.",
"label": "Kenarları Yakala"
},
"settings-panel-attached-to-bar": {
"description": "Ayarlar penceresini çubukla hizalayarak tutarlı bir görünüm sağlayın.",
"label": "Ayarlar penceresini çubuğa hizala"
},
"panels-overlay": {
"description": "Panellerin ve çubuğun, tam ekran uygulamalarda bile görünür kalmasını sağlar.",
"label": "Panelleri ve Çubuğu Üstte Tut"
@@ -1528,6 +1524,10 @@
"description": "Arayüzün görünümünü, hissini ve davranışını özelleştirin.",
"label": "Görünüm"
},
"settings-panel-attached-to-bar": {
"description": "Ayarlar penceresini çubukla hizalayarak tutarlı bir görünüm sağlayın.",
"label": "Ayarlar penceresini çubuğa hizala"
},
"shadows": {
"description": "Çubukların ve panellerin altında gölgelerin etkinleştirilmesini sağlar.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Normal mod",
"not-installed": "wlsunset kurulu değil"
},
"noctalia-performance": {
"disabled": "Performans modu devre dışı bırakıldı",
"enabled": "Performans modu etkinleştirildi",
"label": "Noctalia performansı"
},
"power-profile": {
"changed": "Güç profili değişti",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "Панелі фіксуються до штанги та країв екрана, створюючи бездоганний вигляд зі стильними перевернутими кутами.",
"label": "Прив'язувати панелі до країв"
},
"settings-panel-attached-to-bar": {
"description": "Вирівнюйте вікно налаштувань відносно панелі, щоб зберегти цілісний вигляд.",
"label": "Прив'язувати вікно налаштувань до панелі"
},
"panels-overlay": {
"description": "Забезпечує видимість панелей і панелі завдань, навіть поверх повноекранних програм.",
"label": "Тримати панелі та панель зверху"
@@ -1528,6 +1524,10 @@
"description": "Налаштуйте вигляд, відчуття та поведінку інтерфейсу.",
"label": "Зовнішній вигляд"
},
"settings-panel-attached-to-bar": {
"description": "Вирівнюйте вікно налаштувань відносно панелі, щоб зберегти цілісний вигляд.",
"label": "Прив'язувати вікно налаштувань до панелі"
},
"shadows": {
"description": "Увімкнути тіні під панелями та смугами.",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "Звичайний режим",
"not-installed": "wlsunset не встановлено"
},
"noctalia-performance": {
"disabled": "Режим продуктивності вимкнено.",
"enabled": "Режим продуктивності ввімкнено.",
"label": "Виступ Noctalia"
},
"power-profile": {
"changed": "Профіль живлення змінено",
"profile-name": "\"{profile}\""
+9 -4
View File
@@ -1511,10 +1511,6 @@
"description": "面板锁定到边栏和屏幕边缘,形成无缝外观,并具有时尚的倒角。",
"label": "将面板对齐到边缘"
},
"settings-panel-attached-to-bar": {
"description": "使设置窗口与边栏保持对齐,实现统一的外观。",
"label": "将设置窗口贴合边栏"
},
"panels-overlay": {
"description": "确保面板和栏保持可见,即使在全屏应用程序上也是如此。",
"label": "将面板和栏保持在顶部"
@@ -1528,6 +1524,10 @@
"description": "自定义界面的外观、感觉和行为。",
"label": "外观"
},
"settings-panel-attached-to-bar": {
"description": "使设置窗口与边栏保持对齐,实现统一的外观。",
"label": "将设置窗口贴合边栏"
},
"shadows": {
"description": "启用条形图和面板下的阴影。",
"direction": {
@@ -1734,6 +1734,11 @@
"normal": "正常模式",
"not-installed": "未安装 wlsunset"
},
"noctalia-performance": {
"disabled": "性能模式已禁用",
"enabled": "已启用性能模式",
"label": "夜之颂演出"
},
"power-profile": {
"changed": "电源模式已更改",
"profile-name": "\"{profile}\""
+8 -6
View File
@@ -4,13 +4,15 @@ import QtQuick
import Quickshell
import Quickshell.Io
import qs.Services
Singleton {
id: root
/*
Preset sizes for font, radii, ?
*/
*/
// Font size
property real fontSizeXXS: 8
@@ -65,11 +67,11 @@ Singleton {
property real shadowVerticalOffset: Settings.data.general.shadowOffsetY
// Animation duration (ms)
property int animationFaster: Settings.data.general.animationDisabled ? 0 : Math.round(75 / Settings.data.general.animationSpeed)
property int animationFast: Settings.data.general.animationDisabled ? 0 : Math.round(150 / Settings.data.general.animationSpeed)
property int animationNormal: Settings.data.general.animationDisabled ? 0 : Math.round(300 / Settings.data.general.animationSpeed)
property int animationSlow: Settings.data.general.animationDisabled ? 0 : Math.round(450 / Settings.data.general.animationSpeed)
property int animationSlowest: Settings.data.general.animationDisabled ? 0 : Math.round(750 / Settings.data.general.animationSpeed)
property int animationFaster: (Settings.data.general.animationDisabled || PowerProfileService.noctaliaPerformanceMode) ? 0 : Math.round(75 / Settings.data.general.animationSpeed)
property int animationFast: (Settings.data.general.animationDisabled || PowerProfileService.noctaliaPerformanceMode) ? 0 : Math.round(150 / Settings.data.general.animationSpeed)
property int animationNormal: (Settings.data.general.animationDisabled || PowerProfileService.noctaliaPerformanceMode) ? 0 : Math.round(300 / Settings.data.general.animationSpeed)
property int animationSlow: (Settings.data.general.animationDisabled || PowerProfileService.noctaliaPerformanceMode) ? 0 : Math.round(450 / Settings.data.general.animationSpeed)
property int animationSlowest: (Settings.data.general.animationDisabled || PowerProfileService.noctaliaPerformanceMode) ? 0 : Math.round(750 / Settings.data.general.animationSpeed)
// Delays
property int tooltipDelay: 300
+13 -1
View File
@@ -40,7 +40,7 @@ Item {
function toggle() {
root.withTargetScreen(screen => {
var calendarPanel = PanelService.getPanel("calendarPanel", screen)
calendarPanel.toggle(null, "Clock")
calendarPanel?.toggle(null, "Clock")
})
}
}
@@ -287,6 +287,18 @@ Item {
break
}
}
function toggleNoctaliaPerformance() {
PowerProfileService.toggleNoctaliaPerformance()
}
function enableNoctaliaPerformance() {
PowerProfileService.setNoctaliaPerformance(true)
}
function disableNoctaliaPerformance() {
PowerProfileService.setNoctaliaPerformance(false)
}
}
IpcHandler {
+1 -1
View File
@@ -123,7 +123,7 @@ Singleton {
const data = createData(notification)
addToHistory(data)
if (Settings.data.notifications?.doNotDisturb)
if (Settings.data.notifications?.doNotDisturb || PowerProfileService.noctaliaPerformanceMode)
return
activeMap[data.id] = notification
+23
View File
@@ -13,6 +13,9 @@ Singleton {
readonly property bool available: powerProfiles && powerProfiles.hasPerformanceProfile
property int profile: powerProfiles ? powerProfiles.profile : PowerProfile.Balanced
// Not a power profile but a volatile property to quickly disable shadows, animations, etc..
property bool noctaliaPerformanceMode: false
function getName(p) {
if (!available)
return "Unknown"
@@ -94,4 +97,24 @@ Singleton {
}
}
}
// Noctalia Performance Mode
// - Turning shadow off
// - Turning animation off
// - Do Not Disturb
function toggleNoctaliaPerformance() {
noctaliaPerformanceMode = !noctaliaPerformanceMode
}
function setNoctaliaPerformance(value) {
noctaliaPerformanceMode = value
}
onNoctaliaPerformanceModeChanged: {
if (noctaliaPerformanceMode) {
ToastService.showNotice(I18n.tr("toast.noctalia-performance.label"), I18n.tr("toast.noctalia-performance.enabled"), "seedling")
} else {
ToastService.showNotice(I18n.tr("toast.noctalia-performance.label"), I18n.tr("toast.noctalia-performance.disabled"), "seedling-off")
}
}
}
+2 -1
View File
@@ -1,13 +1,14 @@
import QtQuick
import QtQuick.Effects
import qs.Commons
import qs.Services
// Unified shadow system
Item {
id: root
required property var source
layer.enabled: Settings.data.general.enableShadows
layer.enabled: Settings.data.general.enableShadows && !PowerProfileService.noctaliaPerformanceMode
layer.effect: MultiEffect {
source: root.source
shadowEnabled: true