NoctaliaPerformance: add performance toggle (disables shadows & animations)

This commit is contained in:
Ly-sec
2025-11-08 09:13:48 +01:00
parent 3fafc57f36
commit 061b92697c
11 changed files with 52 additions and 2 deletions
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "Nachtlicht ist aktiviert.\nLinksklick zum Wechseln des Modus.\nRechtsklick für Einstellungen.",
"night-light-forced": "Nachtlicht ist erzwungen.\nLinksklick zum Wechseln des Modus.\nRechtsklick für Einstellungen.",
"night-light-not-installed": "Nachtlicht ist nicht verfügbar.\nwlsunset ist nicht installiert.",
"noctalia-performance-disabled": "Noctalia-Leistungsmodus ist deaktiviert.\nLinksklick zum Aktivieren.",
"noctalia-performance-enabled": "Noctalia-Leistungsmodus ist aktiviert.\nLinksklick zum Deaktivieren.",
"open-control-center": "Kontrollzentrum öffnen",
"open-notification-history-disable-dnd": "Benachrichtigungsverlauf öffnen\nRechtsklick um 'Nicht stören' zu deaktivieren.",
"open-notification-history-enable-dnd": "Benachrichtigungsverlauf öffnen\nRechtsklick um 'Nicht stören' zu aktivieren.",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "Night light is enabled.\nLeft click to cycle mode.\nRight click to access settings.",
"night-light-forced": "Night light is forced.\nLeft click to cycle mode.\nRight click to access settings.",
"night-light-not-installed": "Night light is not available.\nwlsunset is not installed.",
"noctalia-performance-disabled": "Noctalia performance mode is disabled.\nLeft click to enable.",
"noctalia-performance-enabled": "Noctalia performance mode is enabled.\nLeft click to disable.",
"open-control-center": "Open control center",
"open-notification-history-disable-dnd": "Open notification history\nRight-click to disable \"Do not disturb\".",
"open-notification-history-enable-dnd": "Open notification history\nRight-click to enable \"Do not disturb\".",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "Luz nocturna activada.\nClic izquierdo para cambiar de modo.\nClic derecho para acceder a la configuración.",
"night-light-forced": "Luz nocturna forzada.\nClic izquierdo para cambiar de modo.\nClic derecho para acceder a la configuración.",
"night-light-not-installed": "Luz nocturna no disponible.\nwlsunset no está instalado.",
"noctalia-performance-disabled": "El modo de rendimiento de Noctalia está desactivado.\nClic izquierdo para activar.",
"noctalia-performance-enabled": "El modo de rendimiento de Noctalia está activado.\nClic izquierdo para desactivar.",
"open-control-center": "Abrir el centro de control",
"open-notification-history-disable-dnd": "Abrir historial de notificaciones\nClic derecho para desactivar \"No molestar\".",
"open-notification-history-enable-dnd": "Abrir historial de notificaciones\nClic derecho para activar \"No molestar\".",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "L'éclairage nocturne est activé.\nClic gauche pour changer de mode.\nClic droit pour accéder aux paramètres.",
"night-light-forced": "L'éclairage nocturne est forcé.\nClic gauche pour changer de mode.\nClic droit pour accéder aux paramètres.",
"night-light-not-installed": "L'éclairage nocturne n'est pas disponible.\nwlsunset n'est pas installé.",
"noctalia-performance-disabled": "Le mode performance Noctalia est désactivé.\nClic gauche pour activer.",
"noctalia-performance-enabled": "Le mode performance Noctalia est activé.\nClic gauche pour désactiver.",
"open-control-center": "Ouvrir le centre de contrôle",
"open-notification-history-disable-dnd": "Ouvrir l'historique des notifications\nClic droit pour désactiver \"Ne pas déranger\".",
"open-notification-history-enable-dnd": "Ouvrir l'historique des notifications\nClic droit pour activer \"Ne pas déranger\".",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "Luz noturna ativada.\nClique esquerdo para alternar o modo.\nClique direito para acessar as configurações.",
"night-light-forced": "Luz noturna forçada.\nClique esquerdo para alternar o modo.\nClique direito para acessar as configurações.",
"night-light-not-installed": "Luz noturna não disponível.\nwlsunset não está instalado.",
"noctalia-performance-disabled": "O modo de desempenho Noctalia está desativado.\nClique esquerdo para ativar.",
"noctalia-performance-enabled": "O modo de desempenho Noctalia está ativado.\nClique esquerdo para desativar.",
"open-control-center": "Abrir central de controle",
"open-notification-history-disable-dnd": "Abrir histórico de notificações\nClique direito para desativar \"Não perturbe\".",
"open-notification-history-enable-dnd": "Abrir histórico de notificações\nClique direito para ativar \"Não perturbe\".",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "Gece ışığı etkin.\nMod arasında geçiş yapmak için sol tık.\nAyarlara erişmek için sağ tık.",
"night-light-forced": "Gece ışığı zorla.\nMod arasında geçiş yapmak için sol tık.\nAyarlara erişmek için sağ tık.",
"night-light-not-installed": "Gece ışığı mevcut değil.\nwlsunset yüklü değil.",
"noctalia-performance-disabled": "Noctalia performans modu devre dışı.\nEtkinleştirmek için sol tıklayın.",
"noctalia-performance-enabled": "Noctalia performans modu etkin.\nDevre dışı bırakmak için sol tıklayın.",
"open-control-center": "Kontrol merkezini aç",
"open-notification-history-disable-dnd": "Bildirim geçmişini aç\n\"Rahatsız etmeyi\" devre dışı bırakmak için sağ tık.",
"open-notification-history-enable-dnd": "Bildirim geçmişini aç\n\"Rahatsız etmeyi\" etkinleştirmek için sağ tık.",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "Нічне світло увімкнено.\nЛівий клік для циклічного режиму.\nПравий клік для доступу до налаштувань.",
"night-light-forced": "Нічне світло примусово.\nЛівий клік для циклічного режиму.\nПравий клік для доступу до налаштувань.",
"night-light-not-installed": "Нічне світло недоступне.\nwlsunset не встановлено.",
"noctalia-performance-disabled": "Режим продуктивності Noctalia вимкнено.\nЛівий клік для увімкнення.",
"noctalia-performance-enabled": "Режим продуктивності Noctalia увімкнено.\nЛівий клік для вимкнення.",
"open-control-center": "Відкрити центр керування",
"open-notification-history-disable-dnd": "Відкрити історію сповіщень\nПравий клік для вимкнення \"Не турбувати\".",
"open-notification-history-enable-dnd": "Відкрити історію сповіщень\nПравий клік для увімкнення \"Не турбувати\".",
+2
View File
@@ -1798,6 +1798,8 @@
"night-light-enabled": "夜间模式已启用。\n左键点击循环模式。\n右键点击访问设置。",
"night-light-forced": "夜间模式已强制启用。\n左键点击循环模式。\n右键点击访问设置。",
"night-light-not-installed": "夜间模式不可用。\nwlsunset 未安装。",
"noctalia-performance-disabled": "Noctalia 性能模式已禁用。\n左键点击以启用。",
"noctalia-performance-enabled": "Noctalia 性能模式已启用。\n左键点击以禁用。",
"open-control-center": "打开控制中心",
"open-notification-history-disable-dnd": "打开通知历史记录\n右键点击禁用\"勿扰模式\"。",
"open-notification-history-enable-dnd": "打开通知历史记录\n右键点击启用\"勿扰模式\"。",
@@ -0,0 +1,30 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Quickshell
import Quickshell.Wayland
import qs.Commons
import qs.Modules.Panels.Settings
import qs.Services
import qs.Widgets
NIconButton {
id: root
property ShellScreen screen
density: Settings.data.bar.density
baseSize: Style.capsuleHeight
applyUiScale: false
colorBg: PowerProfileService.noctaliaPerformanceMode ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
colorFg: PowerProfileService.noctaliaPerformanceMode ? Color.mOnPrimary : Color.mOnSurface
colorBorder: Color.transparent
colorBorderHover: Color.transparent
icon: PowerProfileService.noctaliaPerformanceMode ? "rocket" : "rocket-off"
tooltipText: PowerProfileService.noctaliaPerformanceMode ? I18n.tr("tooltips.noctalia-performance-enabled") : I18n.tr("tooltips.noctalia-performance-disabled")
tooltipDirection: BarService.getTooltipDirection()
onClicked: {
PowerProfileService.toggleNoctaliaPerformance()
}
}
+4
View File
@@ -25,6 +25,7 @@ Singleton {
"MediaMini": mediaMiniComponent,
"Microphone": microphoneComponent,
"NightLight": nightLightComponent,
"NoctaliaPerformance": noctaliaPerformanceComponent,
"NotificationHistory": notificationHistoryComponent,
"PowerProfile": powerProfileComponent,
"ScreenRecorder": screenRecorderComponent,
@@ -218,6 +219,9 @@ Singleton {
property Component nightLightComponent: Component {
NightLight {}
}
property Component noctaliaPerformanceComponent: Component {
NoctaliaPerformance {}
}
property Component notificationHistoryComponent: Component {
NotificationHistory {}
}
+2 -2
View File
@@ -112,9 +112,9 @@ Singleton {
onNoctaliaPerformanceModeChanged: {
if (noctaliaPerformanceMode) {
ToastService.showNotice(I18n.tr("toast.noctalia-performance.label"), I18n.tr("toast.noctalia-performance.enabled"), "seedling")
ToastService.showNotice(I18n.tr("toast.noctalia-performance.label"), I18n.tr("toast.noctalia-performance.enabled"), "rocket")
} else {
ToastService.showNotice(I18n.tr("toast.noctalia-performance.label"), I18n.tr("toast.noctalia-performance.disabled"), "seedling-off")
ToastService.showNotice(I18n.tr("toast.noctalia-performance.label"), I18n.tr("toast.noctalia-performance.disabled"), "rocket-off")
}
}
}