Przeglądaj źródła

Cinnamon desktop icons should work now

UwU 1 miesiąc temu
rodzic
commit
0e4feeaba6

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "we-manager",
-  "version": "0.9.0",
+  "version": "0.9.1",
   "type": "module",
   "description": "Wallpaper Engine workshop manager",
   "desktopName": "we-manager.desktop",

+ 4 - 1
src/main/index.ts

@@ -8,7 +8,8 @@ import { startWatcher } from './services/watcher.service'
 import { checkOutdatedBackups, recoverInterruptedCopiesIn } from './services/backup.service'
 import { registerAllHandlers } from './ipc'
 import { initDesktopIcons, cleanupDesktopIcons } from './services/desktop-icons.service'
-import { getTrayEnabled, getAutostartPlaylistId, getKillLweOnQuit, getConfiguredBackupPath } from './services/config.service'
+import { getTrayEnabled, getAutostartEnabled, getAutostartMinimized, getAutostartPlaylistId, getKillLweOnQuit, getConfiguredBackupPath } from './services/config.service'
+import { refreshAutostartExec } from './services/autostart.service'
 import { createTray } from './services/tray.service'
 import { initPlaylistPlayer, startPlaylist } from './services/playlist-player.service'
 import { checkEarlierRunEngines, killAllLweProcesses, getLweStatus } from './services/lwe.service'
@@ -226,6 +227,8 @@ app.whenReady().then(async () => {
 
   if (getTrayEnabled()) createTray(win)
 
+  if (getAutostartEnabled()) refreshAutostartExec(getAutostartMinimized())
+
   const autostartPlaylistId = getAutostartPlaylistId()
   if (!resumed && autostartPlaylistId && getLweStatus().installed) {
     try {

+ 17 - 1
src/main/services/autostart.service.ts

@@ -33,6 +33,10 @@ function execWord(word: string): string {
   return quoted.replace(/%/g, '%%')
 }
 
+function execLineFor(minimized: boolean): string {
+  return [...launchCommand(), ...(minimized ? ['--minimized'] : [])].map(execWord).join(' ')
+}
+
 export function setAutostartEnabled(enabled: boolean, minimized: boolean): void {
   if (!isAutostartSupported()) return
 
@@ -46,7 +50,7 @@ export function setAutostartEnabled(enabled: boolean, minimized: boolean): void
 
   fs.mkdirSync(dir, { recursive: true })
 
-  const execLine = [...launchCommand(), ...(minimized ? ['--minimized'] : [])].map(execWord).join(' ')
+  const execLine = execLineFor(minimized)
 
   const contents = [
     '[Desktop Entry]',
@@ -71,3 +75,15 @@ export function getCompositorAutostartLine(): string | null {
 export function isAutostartFileEnabled(): boolean {
   return fs.existsSync(getAutostartDesktopPath())
 }
+
+/** Rewrites the entry when the app moved since autostart was saved */
+export function refreshAutostartExec(minimized: boolean): void {
+  if (!isAutostartSupported()) return
+  try {
+    const contents = fs.readFileSync(getAutostartDesktopPath(), 'utf8')
+    const current = /^Exec=(.*)$/m.exec(contents)?.[1]
+    if (current !== execLineFor(minimized)) setAutostartEnabled(true, minimized)
+  } catch (err) {
+    if ((err as NodeJS.ErrnoException).code !== 'ENOENT') console.error('[Autostart] Failed to refresh entry:', err)
+  }
+}

+ 13 - 0
src/main/services/lwe.service.test.ts

@@ -1,6 +1,11 @@
 import { describe, expect, it, vi } from 'vitest'
 
 vi.mock('electron', () => ({ app: { getPath: () => '/tmp' } }))
+vi.mock('../utils/platform', async (importOriginal) => ({
+  ...(await importOriginal<typeof import('../utils/platform')>()),
+  getScreenGeometry: () => '1920x0x2560x1440',
+  getConnectedScreens: () => ['DP-1']
+}))
 vi.mock('./config.service', () => ({
   getConfiguredWorkshopPath: () => null,
   getLweRepoUrl: () => null,
@@ -38,6 +43,14 @@ describe('parseCustomArgs', () => {
 })
 
 describe('buildLweArgs', () => {
+  it('opens a window the size of the screen in windowed mode', () => {
+    const args = buildLweArgs('/w/a', { screen: 'DP-1', engineFlags: { windowed: true } })
+    expect(args).toContain('--window')
+    expect(args[args.indexOf('--window') + 1]).toBe('1920x0x2560x1440')
+    expect(args).not.toContain('--screen-root')
+    expect(buildLweArgs('/w/a', { screen: 'DP-1' })).toContain('--screen-root')
+  })
+
   it('gives every slot of a split screen its own settings', () => {
     const args = buildLweArgs('/w/a', {
       screen: 'DP-1',

+ 12 - 2
src/main/services/lwe.service.ts

@@ -28,6 +28,7 @@ import {
   invalidateCommandCache,
   whichCommand,
   getConnectedScreens,
+  getScreenGeometry,
   getWaylandDisplay,
   getXdgRuntimeDir,
   isWaylandSession
@@ -904,6 +905,12 @@ export interface LweLaunchOptions {
   forceFresh?: boolean
 }
 
+const FALLBACK_WINDOW = '0x0x1920x1080'
+
+function windowedGeometry(screen?: ScreenTarget): string {
+  return getScreenGeometry(screen && screen !== ALL_SCREENS ? screen : undefined) ?? FALLBACK_WINDOW
+}
+
 export function buildLweArgs(
   wallpaperPath: string,
   options: LweLaunchOptions,
@@ -916,8 +923,11 @@ export function buildLweArgs(
   // before any --screen-root, so they apply to every screen
   if (supportsFlag('--image-filter')) args.push(...imageAdjustmentArgs(options.imageAdjustments))
 
-  if (capture) {
-    args.push('--window', capture.window)
+  const windowGeometry = capture ? capture.window : options.engineFlags?.windowed ? windowedGeometry(options.screen) : null
+  if (windowGeometry) {
+    args.push('--window', windowGeometry)
+    // without it the engine's window is a normal one on top of everything
+    if (!capture && supportsFlag('--window-background')) args.push('--window-background')
   } else if (options.split && options.screen && options.screen !== ALL_SCREENS) {
     // every option after a --screen-slot belongs to that slot
     for (const slot of options.split.slots) {

+ 18 - 1
src/main/utils/platform.test.ts

@@ -11,7 +11,8 @@ const {
   parseHyprctlMonitors,
   parseNameHasOwner,
   parseNiriOutputs,
-  parseSwayOutputs
+  parseSwayOutputs,
+  parseXrandrGeometries
 } = await import('./platform')
 
 function answerCommands(answers: Record<string, string>): void {
@@ -187,3 +188,19 @@ describe.skipIf(process.platform !== 'linux')('hasStatusNotifierHost', () => {
     expect(hasStatusNotifierHost(0)).toBe(true)
   })
 })
+
+describe('parseXrandrGeometries', () => {
+  it('reads connected outputs as XxYxWxH', () => {
+    const out = [
+      'Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 16384 x 16384',
+      'DP-1 connected primary 2560x1440+1920+0 (normal left inverted right x axis y axis) 600mm x 340mm',
+      'HDMI-1 connected 1920x1080+0+0 (normal left inverted right) 510mm x 290mm',
+      'HDMI-2 disconnected (normal left inverted right x axis y axis)',
+      'DP-2 connected (normal left inverted right x axis y axis)'
+    ].join('\n')
+    expect([...parseXrandrGeometries(out)]).toEqual([
+      ['DP-1', '1920x0x2560x1440'],
+      ['HDMI-1', '0x0x1920x1080']
+    ])
+  })
+})

+ 21 - 0
src/main/utils/platform.ts

@@ -153,6 +153,27 @@ export function getConnectedScreens(): string[] {
   return []
 }
 
+/** `NAME connected [primary] WxH+X+Y` lines of xrandr, as the engine's XxYxWxH */
+export function parseXrandrGeometries(output: string): Map<string, string> {
+  const geometries = new Map<string, string>()
+  for (const line of output.split('\n')) {
+    const m = line.match(/^(\S+) connected (?:primary )?(\d+)x(\d+)\+(\d+)\+(\d+)/)
+    if (m) geometries.set(m[1], `${m[4]}x${m[5]}x${m[2]}x${m[3]}`)
+  }
+  return geometries
+}
+
+/** Geometry of the named screen, else of the first one */
+export function getScreenGeometry(screen?: string): string | null {
+  try {
+    const output = execSync(hostShell('xrandr --query 2>/dev/null'), { encoding: 'utf8', timeout: 5000 })
+    const geometries = parseXrandrGeometries(output)
+    return (screen && geometries.get(screen)) || geometries.values().next().value || null
+  } catch {
+    return null
+  }
+}
+
 /** Answer of a NameHasOwner call, from busctl (`b true`) or gdbus (`(true,)`), null when it is neither */
 export function parseNameHasOwner(output: string): boolean | null {
   const m = output.trim().match(/^(?:b\s+|\(\s*)(true|false)\b/)

+ 7 - 0
src/renderer/src/components/settings/PerformanceSettings.tsx

@@ -96,6 +96,13 @@ export default function PerformanceSettings({ defaultFps, onDefaultFpsChanged }:
             <span className="text-sm text-gray-300">{t(label)}</span>
           </label>
         ))}
+        <div>
+          <label className="flex cursor-pointer items-center gap-3">
+            <Toggle on={!!flags.windowed} onClick={() => saveFlags({ ...flags, windowed: !flags.windowed })} />
+            <span className="text-sm text-gray-300">{t('perf.windowed')}</span>
+          </label>
+          <p className="ml-12 mt-1 text-xs text-gray-600">{t('perf.windowedHint')}</p>
+        </div>
         {(desktopEnv === 'kde' || wlroots) && (
           <div>
             <label className="flex cursor-pointer items-center gap-3">

+ 2 - 2
src/renderer/src/constants/engineFlags.ts

@@ -12,8 +12,8 @@ type ChoiceFlag =
   | 'hrtf'
   | 'batteryFps'
   | 'idlePause'
-// kdeBackgroundLayer is global only
-type BooleanFlag = Exclude<keyof EngineFlags, 'fullscreenPause' | 'kdeBackgroundLayer' | ChoiceFlag>
+// kdeBackgroundLayer and windowed are global only
+type BooleanFlag = Exclude<keyof EngineFlags, 'fullscreenPause' | 'kdeBackgroundLayer' | 'windowed' | ChoiceFlag>
 
 export const BOOLEAN_FLAGS: { key: BooleanFlag; label: MessageKey; hint?: MessageKey }[] = [
   { key: 'disableParticles', label: 'flags.disableParticles.label', hint: 'flags.disableParticles.hint' },

+ 2 - 0
src/shared/i18n/locales/de.ts

@@ -571,6 +571,8 @@ export const de: Messages = {
   'perf.backgroundLayer': 'Hintergrundebene verwenden',
   'perf.backgroundLayerHint': 'Zeichnet den Hintergrund in der Background-Ebene des Compositors statt in der Bottom-Ebene. Manche Compositoren (niri) brauchen das.',
   'perf.backgroundLayerKde': 'Ältere Versionen haben das unter KDE immer gemacht. Es ist die Ebene von Plasmas eigenem Desktop, und was von beiden zuletzt erscheint, liegt oben. Bei der Anmeldung startet Plasmas Desktop oft nach dem Hintergrund und verdeckt ihn, lass das also aus, solange die Standardebene keine Probleme macht, z. B. mit "Immer im Hintergrund"-Fenstern.',
+  'perf.windowed': 'In einem Fenster ausführen',
+  'perf.windowedHint': 'Für X11-Desktops, auf denen das Root-Window-Hintergrundbild schwarz bleibt (manche Cinnamon-Setups). Die Engine öffnet stattdessen ein Fenster in Bildschirmgröße, unter allen anderen Fenstern und Desktop-Symbolen, auf jeder Arbeitsfläche und nicht in der Taskleiste. Nur ein Fenster, auf dem ersten Bildschirm.',
   'perf.clickForwarding': 'Klickweiterleitung',
   'perf.clickForwardingHint': 'Lässt eine Desktop-Shell oder eine Compositor-Tastenbelegung die linke Maustaste weitergeben, wenn etwas den Hintergrund verdeckt: Sie schreibt {json} in die Datei des Bildschirms, solange die Taste gedrückt ist, und die Engine ignoriert die Datei, sobald sie älter als 2 Sekunden ist.',
   'perf.deletePreset': 'Voreinstellung löschen',

+ 2 - 0
src/shared/i18n/locales/en.ts

@@ -569,6 +569,8 @@ export const en = {
   'perf.backgroundLayer': 'Use the background layer',
   'perf.backgroundLayerHint': 'Draws the wallpaper in the compositor\'s background layer instead of the bottom one. Some compositors (niri) need it.',
   'perf.backgroundLayerKde': 'Older versions always did this on KDE. It is the layer of Plasma\'s own desktop, and whichever of the two shows up last is drawn on top. At login Plasma\'s desktop often starts after the wallpaper and hides it, so leave this off unless the default layer causes problems for you, e.g. with "keep below others" windows.',
+  'perf.windowed': 'Run in a window',
+  'perf.windowedHint': 'For X11 desktops where the root-window wallpaper stays black (some Cinnamon setups). The engine opens a window with the size of the screen instead, below all other windows and desktop icons, on every workspace and off the taskbar. Only one window, on the first screen.',
   'perf.clickForwarding': 'Click forwarding',
   'perf.clickForwardingHint': 'Lets a desktop shell or compositor binding pass the left mouse button on when something covers the wallpaper: it writes {json} to the file of the screen while the button is held, and the engine ignores the file once it is older than 2 seconds.',
   'perf.deletePreset': 'Delete preset',

+ 2 - 0
src/shared/i18n/locales/es.ts

@@ -571,6 +571,8 @@ export const es: Messages = {
   'perf.backgroundLayer': 'Usar la capa de fondo',
   'perf.backgroundLayerHint': 'Dibuja el fondo en la capa background del compositor en lugar de la capa bottom. Algunos compositores (niri) lo necesitan.',
   'perf.backgroundLayerKde': 'Las versiones anteriores siempre lo hacían en KDE. Es la capa del propio escritorio de Plasma, y el que aparezca último de los dos se dibuja encima. Al iniciar sesión el escritorio de Plasma suele arrancar después del fondo y lo tapa, así que déjalo desactivado salvo que la capa predeterminada te dé problemas, p. ej. con ventanas "mantener por debajo".',
+  'perf.windowed': 'Ejecutar en una ventana',
+  'perf.windowedHint': 'Para escritorios X11 donde el fondo en la ventana raíz se queda negro (algunas configuraciones de Cinnamon). El motor abre en su lugar una ventana del tamaño de la pantalla, debajo de todas las demás ventanas y de los iconos del escritorio, en todos los espacios de trabajo y fuera de la barra de tareas. Solo una ventana, en la primera pantalla.',
   'perf.clickForwarding': 'Reenvío de clics',
   'perf.clickForwardingHint': 'Permite que un shell de escritorio o un atajo del compositor pase el botón izquierdo del ratón cuando algo tapa el fondo: escribe {json} en el archivo de la pantalla mientras se mantiene pulsado el botón, y el motor ignora el archivo cuando tiene más de 2 segundos.',
   'perf.deletePreset': 'Eliminar preajuste',

+ 2 - 0
src/shared/i18n/locales/fr.ts

@@ -571,6 +571,8 @@ export const fr: Messages = {
   'perf.backgroundLayer': 'Utiliser la couche d\'arrière-plan',
   'perf.backgroundLayerHint': 'Dessine le fond d\'écran dans la couche background du compositeur au lieu de la couche bottom. Certains compositeurs (niri) en ont besoin.',
   'perf.backgroundLayerKde': 'Les anciennes versions le faisaient toujours sous KDE. C\'est la couche du bureau de Plasma lui-même, et celui des deux qui apparaît en dernier est dessiné par-dessus. À la connexion, le bureau de Plasma démarre souvent après le fond d\'écran et le cache, alors laissez ceci désactivé sauf si la couche par défaut vous pose problème, p. ex. avec les fenêtres "garder en dessous des autres".',
+  'perf.windowed': 'Exécuter dans une fenêtre',
+  'perf.windowedHint': 'Pour les bureaux X11 où le fond d\'écran sur la fenêtre racine reste noir (certaines configurations de Cinnamon). Le moteur ouvre à la place une fenêtre à la taille de l\'écran, sous toutes les autres fenêtres et les icônes du bureau, sur tous les espaces de travail et hors de la barre des tâches. Une seule fenêtre, sur le premier écran.',
   'perf.clickForwarding': 'Transfert des clics',
   'perf.clickForwardingHint': 'Permet à un shell de bureau ou à un raccourci du compositeur de transmettre le bouton gauche de la souris quand quelque chose recouvre le fond d\'écran : il écrit {json} dans le fichier de l\'écran tant que le bouton est maintenu, et le moteur ignore le fichier dès qu\'il a plus de 2 secondes.',
   'perf.deletePreset': 'Supprimer le préréglage',

+ 2 - 0
src/shared/i18n/locales/it.ts

@@ -571,6 +571,8 @@ export const it: Messages = {
   'perf.backgroundLayer': 'Usa il livello di sfondo',
   'perf.backgroundLayerHint': 'Disegna lo sfondo nel livello background del compositor invece che in quello bottom. Alcuni compositor (niri) ne hanno bisogno.',
   'perf.backgroundLayerKde': 'Le versioni precedenti lo facevano sempre su KDE. È il livello del desktop di Plasma stesso, e quello dei due che compare per ultimo viene disegnato sopra. All\'accesso il desktop di Plasma spesso parte dopo lo sfondo e lo copre, quindi lascialo disattivato a meno che il livello predefinito non ti dia problemi, ad es. con le finestre "mantieni sotto le altre".',
+  'perf.windowed': 'Esegui in una finestra',
+  'perf.windowedHint': 'Per i desktop X11 in cui lo sfondo sulla finestra radice resta nero (alcune configurazioni di Cinnamon). Il motore apre invece una finestra grande quanto lo schermo, sotto tutte le altre finestre e le icone del desktop, su ogni area di lavoro e fuori dalla barra delle applicazioni. Una sola finestra, sul primo schermo.',
   'perf.clickForwarding': 'Inoltro dei clic',
   'perf.clickForwardingHint': 'Permette a una shell desktop o a una scorciatoia del compositor di inoltrare il tasto sinistro del mouse quando qualcosa copre lo sfondo: scrive {json} nel file dello schermo mentre il tasto è premuto, e il motore ignora il file quando ha più di 2 secondi.',
   'perf.deletePreset': 'Elimina preset',

+ 2 - 0
src/shared/i18n/locales/ja.ts

@@ -539,6 +539,8 @@ export const ja: Messages = {
   'perf.backgroundLayer': '背景レイヤーを使う',
   'perf.backgroundLayerHint': '壁紙をコンポジターの bottom レイヤーではなく background レイヤーに描画します。一部のコンポジター (niri) で必要です。',
   'perf.backgroundLayerKde': '以前のバージョンは KDE で常にこうしていました。これは Plasma 自身のデスクトップのレイヤーで、後から表示された方が上に描画されます。ログイン時は Plasma のデスクトップが壁紙より後に起動して隠してしまうことが多いため、既定のレイヤーで問題 (例: 「常に下に表示」ウィンドウ) が出ない限りオフのままにしてください。',
+  'perf.windowed': 'ウィンドウで実行',
+  'perf.windowedHint': 'ルートウィンドウの壁紙が黒いままになる X11 デスクトップ向け (一部の Cinnamon 環境)。代わりにエンジンが画面サイズのウィンドウを開きます。ウィンドウは他のすべてのウィンドウとデスクトップアイコンの下、全ワークスペースに置かれ、タスクバーには表示されません。ウィンドウは 1 つだけで、最初の画面に開きます。',
   'perf.clickForwarding': 'クリックの転送',
   'perf.clickForwardingHint': '何かが壁紙を覆っているときに、デスクトップシェルやコンポジターのバインドが左クリックを壁紙に渡せるようにします: ボタンを押している間、その画面のファイルに {json} を書き込みます。エンジンは 2 秒より古いファイルを無視します。',
   'perf.deletePreset': 'プリセットを削除',

+ 2 - 0
src/shared/i18n/locales/ko.ts

@@ -539,6 +539,8 @@ export const ko: Messages = {
   'perf.backgroundLayer': '배경 레이어 사용',
   'perf.backgroundLayerHint': '배경화면을 컴포지터의 bottom 레이어 대신 background 레이어에 그립니다. 일부 컴포지터(niri)에는 이것이 필요합니다.',
   'perf.backgroundLayerKde': '예전 버전은 KDE에서 항상 이렇게 했습니다. Plasma 자체 바탕 화면의 레이어이며, 둘 중 나중에 나타난 쪽이 위에 그려집니다. 로그인할 때 Plasma 바탕 화면이 배경화면보다 늦게 시작되어 가리는 경우가 많으므로, 기본 레이어가 문제를 일으키지 않는 한(예: "다른 창 아래에 유지" 창) 끄세요.',
+  'perf.windowed': '창으로 실행',
+  'perf.windowedHint': '루트 윈도우의 배경화면이 검게 나오는 X11 데스크톱용입니다 (일부 Cinnamon 환경). 엔진이 대신 화면 크기의 창을 열며, 이 창은 다른 모든 창과 바탕화면 아이콘 아래, 모든 작업 공간에 있고 작업 표시줄에는 나타나지 않습니다. 창은 하나만, 첫 번째 화면에 열립니다.',
   'perf.clickForwarding': '클릭 전달',
   'perf.clickForwardingHint': '무언가가 배경화면을 가릴 때 데스크톱 셸이나 컴포지터 바인딩이 마우스 왼쪽 버튼을 전달할 수 있게 합니다: 버튼을 누르고 있는 동안 해당 화면의 파일에 {json}을(를) 쓰며, 엔진은 2초보다 오래된 파일을 무시합니다.',
   'perf.deletePreset': '프리셋 삭제',

+ 2 - 0
src/shared/i18n/locales/pl.ts

@@ -635,6 +635,8 @@ export const pl: Messages = {
   'perf.backgroundLayer': 'Używaj warstwy tła',
   'perf.backgroundLayerHint': 'Rysuje tapetę w warstwie background kompozytora zamiast w warstwie bottom. Niektóre kompozytory (niri) tego wymagają.',
   'perf.backgroundLayerKde': 'Starsze wersje zawsze tak robiły w KDE. To warstwa pulpitu Plasmy, a to, co pojawi się później, jest rysowane na wierzchu. Przy logowaniu pulpit Plasmy często startuje po tapecie i ją zasłania, więc zostaw to wyłączone, chyba że domyślna warstwa sprawia problemy, np. z oknami "zawsze pod spodem".',
+  'perf.windowed': 'Uruchom w oknie',
+  'perf.windowedHint': 'Dla pulpitów X11, na których tapeta w oknie głównym pozostaje czarna (niektóre konfiguracje Cinnamon). Silnik otwiera zamiast tego okno o rozmiarze ekranu, pod wszystkimi innymi oknami i ikonami pulpitu, na każdym obszarze roboczym i poza paskiem zadań. Tylko jedno okno, na pierwszym ekranie.',
   'perf.clickForwarding': 'Przekazywanie kliknięć',
   'perf.clickForwardingHint': 'Pozwala powłoce pulpitu lub skrótowi kompozytora przekazać lewy przycisk myszy, gdy coś zasłania tapetę: zapisuje {json} do pliku ekranu, dopóki przycisk jest wciśnięty, a silnik ignoruje plik, gdy jest starszy niż 2 sekundy.',
   'perf.deletePreset': 'Usuń ustawienie wstępne',

+ 2 - 0
src/shared/i18n/locales/pt.ts

@@ -571,6 +571,8 @@ export const pt: Messages = {
   'perf.backgroundLayer': 'Usar a camada de fundo',
   'perf.backgroundLayerHint': 'Desenha o papel de parede na camada background do compositor em vez da camada bottom. Alguns compositores (niri) precisam disso.',
   'perf.backgroundLayerKde': 'Versões antigas sempre faziam isso no KDE. É a camada da própria área de trabalho do Plasma, e a que aparecer por último fica por cima. No login a área de trabalho do Plasma muitas vezes inicia depois do papel de parede e o esconde, então deixe desligado a menos que a camada padrão cause problemas, ex.: com janelas "manter abaixo das outras".',
+  'perf.windowed': 'Executar em uma janela',
+  'perf.windowedHint': 'Para desktops X11 em que o papel de parede na janela raiz continua preto (algumas configurações do Cinnamon). O motor abre no lugar uma janela do tamanho da tela, abaixo de todas as outras janelas e dos ícones da área de trabalho, em todas as áreas de trabalho e fora da barra de tarefas. Apenas uma janela, na primeira tela.',
   'perf.clickForwarding': 'Encaminhamento de cliques',
   'perf.clickForwardingHint': 'Permite que um shell de desktop ou um atalho do compositor repasse o botão esquerdo do mouse quando algo cobre o papel de parede: ele escreve {json} no arquivo da tela enquanto o botão está pressionado, e o motor ignora o arquivo quando ele tem mais de 2 segundos.',
   'perf.deletePreset': 'Excluir predefinição',

+ 2 - 0
src/shared/i18n/locales/ru.ts

@@ -635,6 +635,8 @@ export const ru: Messages = {
   'perf.backgroundLayer': 'Использовать фоновый слой',
   'perf.backgroundLayerHint': 'Рисует обои в слое background композитора вместо слоя bottom. Некоторым композиторам (niri) это нужно.',
   'perf.backgroundLayerKde': 'Старые версии всегда так делали в KDE. Это слой собственного рабочего стола Plasma, и сверху оказывается тот, кто появился последним. При входе рабочий стол Plasma часто запускается после обоев и закрывает их, поэтому оставьте это выключенным, если стандартный слой не создаёт проблем, например с окнами "держать ниже остальных".',
+  'perf.windowed': 'Запускать в окне',
+  'perf.windowedHint': 'Для рабочих столов X11, где обои в корневом окне остаются чёрными (некоторые конфигурации Cinnamon). Движок вместо этого открывает окно размером с экран под всеми остальными окнами и значками рабочего стола, на всех рабочих столах и вне панели задач. Только одно окно, на первом экране.',
   'perf.clickForwarding': 'Передача кликов',
   'perf.clickForwardingHint': 'Позволяет оболочке рабочего стола или привязке композитора передавать левую кнопку мыши, когда обои чем-то закрыты: она пишет {json} в файл экрана, пока кнопка нажата, а движок игнорирует файл, если он старше 2 секунд.',
   'perf.deletePreset': 'Удалить пресет',

+ 2 - 0
src/shared/i18n/locales/tr.ts

@@ -571,6 +571,8 @@ export const tr: Messages = {
   'perf.backgroundLayer': 'Arka plan katmanını kullan',
   'perf.backgroundLayerHint': 'Duvar kağıdını birleştiricinin bottom katmanı yerine background katmanına çizer. Bazı birleştiriciler (niri) buna ihtiyaç duyar.',
   'perf.backgroundLayerKde': 'Eski sürümler KDE\'de bunu hep yapıyordu. Bu, Plasma\'nın kendi masaüstünün katmanıdır ve ikisinden hangisi son görünürse üstte çizilir. Oturum açarken Plasma masaüstü çoğu zaman duvar kağıdından sonra başlar ve onu gizler, bu yüzden varsayılan katman size sorun çıkarmadıkça (ör. "diğerlerinin altında tut" pencereleriyle) bunu kapalı bırakın.',
+  'perf.windowed': 'Pencerede çalıştır',
+  'perf.windowedHint': 'Kök penceredeki duvar kağıdının siyah kaldığı X11 masaüstleri için (bazı Cinnamon kurulumları). Motor bunun yerine ekran boyutunda bir pencere açar; pencere tüm diğer pencerelerin ve masaüstü simgelerinin altında, her çalışma alanında ve görev çubuğunun dışındadır. Yalnızca tek pencere, ilk ekranda.',
   'perf.clickForwarding': 'Tıklama iletme',
   'perf.clickForwardingHint': 'Duvar kağıdının üstünde bir şey olduğunda bir masaüstü kabuğunun veya birleştirici kısayolunun sol fare düğmesini iletmesini sağlar: düğme basılıyken ekranın dosyasına {json} yazar ve motor dosya 2 saniyeden eskiyse onu yok sayar.',
   'perf.deletePreset': 'Ön ayarı sil',

+ 2 - 0
src/shared/i18n/locales/zh-CN.ts

@@ -539,6 +539,8 @@ export const zhCN: Messages = {
   'perf.backgroundLayer': '使用背景层',
   'perf.backgroundLayerHint': '把壁纸画在合成器的 background 层而不是 bottom 层。部分合成器 (niri) 需要这样。',
   'perf.backgroundLayerKde': '旧版本在 KDE 上总是这样做。这是 Plasma 自己桌面所在的层,两者中后出现的会画在上面。登录时 Plasma 桌面经常比壁纸晚启动并把它遮住,所以除非默认层给你带来问题 (例如"保持在其他窗口下方"的窗口),请保持关闭。',
+  'perf.windowed': '在窗口中运行',
+  'perf.windowedHint': '适用于根窗口壁纸一直是黑色的 X11 桌面 (部分 Cinnamon 环境)。引擎会改为打开一个与屏幕等大的窗口, 位于所有其他窗口和桌面图标下方, 显示在所有工作区, 不出现在任务栏。只有一个窗口, 位于第一块屏幕。',
   'perf.clickForwarding': '点击转发',
   'perf.clickForwardingHint': '当有东西遮住壁纸时,让桌面 shell 或合成器绑定把鼠标左键传给壁纸: 按住按钮期间向该屏幕的文件写入 {json},文件超过 2 秒后引擎会忽略它。',
   'perf.deletePreset': '删除预设',

+ 2 - 0
src/shared/i18n/locales/zh-TW.ts

@@ -539,6 +539,8 @@ export const zhTW: Messages = {
   'perf.backgroundLayer': '使用背景圖層',
   'perf.backgroundLayerHint': '把桌布畫在合成器的 background 圖層而不是 bottom 圖層。部分合成器 (niri) 需要這樣。',
   'perf.backgroundLayerKde': '舊版在 KDE 上一律這麼做。這是 Plasma 自己桌面所在的圖層,兩者中較晚出現的會畫在上面。登入時 Plasma 桌面經常比桌布晚啟動而把它蓋住,所以除非預設圖層造成問題 (例如「保持在其他視窗下方」的視窗),請保持關閉。',
+  'perf.windowed': '在視窗中執行',
+  'perf.windowedHint': '適用於根視窗桌布一直是黑色的 X11 桌面 (部分 Cinnamon 環境)。引擎會改為開啟一個與螢幕等大的視窗, 位於所有其他視窗和桌面圖示下方, 顯示在所有工作區, 不出現在工作列。只有一個視窗, 位於第一個螢幕。',
   'perf.clickForwarding': '點擊轉送',
   'perf.clickForwardingHint': '當有東西蓋住桌布時,讓桌面 shell 或合成器繫結把滑鼠左鍵傳給桌布: 按住按鈕期間會向該螢幕的檔案寫入 {json},檔案超過 2 秒後引擎會忽略它。',
   'perf.deletePreset': '刪除預設組合',

+ 2 - 0
src/shared/types.ts

@@ -204,6 +204,8 @@ export interface EngineFlags {
   batteryFps?: BatteryFps
   /** --idle-pause */
   idlePause?: IdlePause
+  /** --window sized like the first screen instead of --screen-root, global only */
+  windowed?: boolean
   /** --layer background; key kept for stored configs */
   kdeBackgroundLayer?: boolean
 }