mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Merge pull request #811 from shouya/main
Show workspaces from the focused screen
This commit is contained in:
@@ -373,6 +373,10 @@
|
||||
"description": "Arbeitsbereiche ohne Fenster nicht anzeigen.",
|
||||
"label": "Unbesetzte ausblenden"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Zeigt Arbeitsbereiche vom aktuell fokussierten Bildschirm an, statt vom Bildschirm, auf dem sich die Leiste befindet.",
|
||||
"label": "Fokussiertem Bildschirm folgen"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Wählen Sie, wie Arbeitsbereichs-Beschriftungen angezeigt werden.",
|
||||
"label": "Beschriftungsmodus"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Don't display workspaces without windows.",
|
||||
"label": "Hide unoccupied"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Display workspaces from the currently focused screen, rather than the screen where the bar is located.",
|
||||
"label": "Follow Focused Screen"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Choose how workspace labels are displayed.",
|
||||
"label": "Label Mode"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "No mostrar espacios de trabajo sin ventanas.",
|
||||
"label": "Ocultar desocupados"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Mostrar espacios de trabajo de la pantalla actualmente enfocada, en lugar de la pantalla donde se encuentra la barra.",
|
||||
"label": "Seguir Pantalla Enfocada"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Elegir cómo se muestran las etiquetas de los espacios de trabajo.",
|
||||
"label": "Modo de etiqueta"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Ne pas afficher les espaces de travail sans fenêtres.",
|
||||
"label": "Masquer les inoccupés"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Afficher les espaces de travail de l'écran actuellement ciblé, plutôt que de l'écran où se trouve la barre.",
|
||||
"label": "Suivre l'Écran Ciblé"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Choisir comment les étiquettes d'espace de travail sont affichées.",
|
||||
"label": "Mode d'étiquette"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Werkruimten zonder vensters niet weergeven.",
|
||||
"label": "Ongebruikte verbergen"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Werkruimten weergeven van het momenteel gefocuste scherm, in plaats van het scherm waar de balk zich bevindt.",
|
||||
"label": "Gefocust Scherm Volgen"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Kies hoe labels van werkruimten worden weergegeven.",
|
||||
"label": "Labelmodus"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Não exibir áreas de trabalho sem janelas.",
|
||||
"label": "Ocultar desocupados"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Exibir áreas de trabalho da tela atualmente em foco, em vez da tela onde a barra está localizada.",
|
||||
"label": "Seguir Tela em Foco"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Escolher como os rótulos de espaço de trabalho são exibidos.",
|
||||
"label": "Modo de rótulo"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Не отображать рабочие пространства без окон.",
|
||||
"label": "Скрыть незанятые"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Отображать рабочие пространства с текущего активного экрана, а не с экрана, на котором расположена панель.",
|
||||
"label": "Следовать за Активным Экраном"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Выберите, как отображаются метки рабочих пространств.",
|
||||
"label": "Режим метки"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Penceresi olmayan çalışma alanlarını gösterme.",
|
||||
"label": "Dolu olmayanları gizle"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Çubuğun bulunduğu ekran yerine, şu anda odaklanmış ekrandaki çalışma alanlarını göster.",
|
||||
"label": "Odaklanmış Ekranı Takip Et"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Çalışma alanı etiketlerinin nasıl gösterileceğini seçin.",
|
||||
"label": "Etiket Modu"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "Не відображати робочі простори без вікон.",
|
||||
"label": "Приховати незайняті"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "Відображати робочі простори з поточного активного екрана, а не з екрана, на якому розташована панель.",
|
||||
"label": "Слідувати за Активним Екраном"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "Виберіть, як відображаються мітки робочих просторів.",
|
||||
"label": "Режим міток"
|
||||
|
||||
@@ -373,6 +373,10 @@
|
||||
"description": "不显示没有窗口的工作区。",
|
||||
"label": "隐藏未占用"
|
||||
},
|
||||
"follow-focused-screen": {
|
||||
"description": "显示当前焦点屏幕的工作区,而不是任务栏所在屏幕的工作区。",
|
||||
"label": "跟随焦点屏幕"
|
||||
},
|
||||
"label-mode": {
|
||||
"description": "选择工作区标签的显示方式。",
|
||||
"label": "标签模式"
|
||||
|
||||
@@ -46,6 +46,7 @@ Item {
|
||||
|
||||
readonly property string labelMode: (widgetSettings.labelMode !== undefined) ? widgetSettings.labelMode : widgetMetadata.labelMode
|
||||
readonly property bool hideUnoccupied: (widgetSettings.hideUnoccupied !== undefined) ? widgetSettings.hideUnoccupied : widgetMetadata.hideUnoccupied
|
||||
readonly property bool followFocusedScreen: (widgetSettings.followFocusedScreen !== undefined) ? widgetSettings.followFocusedScreen : widgetMetadata.followFocusedScreen
|
||||
readonly property int characterCount: isVertical ? 2 : ((widgetSettings.characterCount !== undefined) ? widgetSettings.characterCount : widgetMetadata.characterCount)
|
||||
|
||||
property bool isDestroying: false
|
||||
@@ -162,10 +163,20 @@ Item {
|
||||
|
||||
function refreshWorkspaces() {
|
||||
localWorkspaces.clear();
|
||||
|
||||
var focusedOutput = null;
|
||||
if (followFocusedScreen) {
|
||||
for (var i = 0; i < CompositorService.workspaces.count; i++) {
|
||||
const ws = CompositorService.workspaces.get(i);
|
||||
if (ws.isFocused) focusedOutput = ws.output.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
if (screen !== null) {
|
||||
for (var i = 0; i < CompositorService.workspaces.count; i++) {
|
||||
const ws = CompositorService.workspaces.get(i);
|
||||
if (ws.output.toLowerCase() === screen.name.toLowerCase()) {
|
||||
if ((followFocusedScreen && ws.output.toLowerCase() == focusedOutput) ||
|
||||
(!followFocusedScreen && ws.output.toLowerCase() == screen.name.toLowerCase())) {
|
||||
if (hideUnoccupied && !ws.isOccupied && !ws.isFocused) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ ColumnLayout {
|
||||
|
||||
property string valueLabelMode: widgetData.labelMode !== undefined ? widgetData.labelMode : widgetMetadata.labelMode
|
||||
property bool valueHideUnoccupied: widgetData.hideUnoccupied !== undefined ? widgetData.hideUnoccupied : widgetMetadata.hideUnoccupied
|
||||
property bool valueFollowFocusedScreen: widgetData.followFocusedScreen !== undefined ? widgetData.followFocusedScreen : widgetMetadata.followFocusedScreen
|
||||
property int valueCharacterCount: widgetData.characterCount !== undefined ? widgetData.characterCount : widgetMetadata.characterCount
|
||||
|
||||
function saveSettings() {
|
||||
@@ -21,6 +22,7 @@ ColumnLayout {
|
||||
settings.labelMode = valueLabelMode;
|
||||
settings.hideUnoccupied = valueHideUnoccupied;
|
||||
settings.characterCount = valueCharacterCount;
|
||||
settings.followFocusedScreen = valueFollowFocusedScreen;
|
||||
return settings;
|
||||
}
|
||||
|
||||
@@ -51,6 +53,13 @@ ColumnLayout {
|
||||
minimumWidth: 200
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("bar.widget-settings.workspace.follow-focused-screen.label")
|
||||
description: I18n.tr("bar.widget-settings.workspace.follow-focused-screen.description")
|
||||
checked: valueFollowFocusedScreen
|
||||
onToggled: checked => valueFollowFocusedScreen = checked
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("bar.widget-settings.workspace.hide-unoccupied.label")
|
||||
description: I18n.tr("bar.widget-settings.workspace.hide-unoccupied.description")
|
||||
|
||||
@@ -223,6 +223,7 @@ Singleton {
|
||||
"Workspace": {
|
||||
"allowUserSettings": true,
|
||||
"labelMode": "index",
|
||||
"followFocusedScreen": false,
|
||||
"hideUnoccupied": false,
|
||||
"characterCount": 2
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user