KWin Rules Examples/uk: Difference between revisions

From KDE Wiki Sandbox
(Created page with "# Правило для '''Вікна балачки Kopete''' і")
(Created page with "# Правило для '''Kopete'''")
Line 33: Line 33:


# Правило для '''Вікна балачки Kopete''' і
# Правило для '''Вікна балачки Kopete''' і
# A rule for '''Kopete'''
# Правило для '''Kopete'''


The '''Kopete Chat''' rule's matching-criteria is more restrictive than the ''Kopete'' rule as it needs to match a specific Window Role:  the chat window.  Due to [[Special:myLanguage/KWin_Rules#Rule_Evaluation|rule evaluation]] processing, the '''Kopete Chat''' rule must precede the '''Kopete''' rule in the [[Special:myLanguage/KWin_Rules_Examples#Kopete KWin Rule List|KWin Rule list for Kopete]].
The '''Kopete Chat''' rule's matching-criteria is more restrictive than the ''Kopete'' rule as it needs to match a specific Window Role:  the chat window.  Due to [[Special:myLanguage/KWin_Rules#Rule_Evaluation|rule evaluation]] processing, the '''Kopete Chat''' rule must precede the '''Kopete''' rule in the [[Special:myLanguage/KWin_Rules_Examples#Kopete KWin Rule List|KWin Rule list for Kopete]].

Revision as of 09:33, 29 August 2012

Other languages:

Приклади

Зауваження
У першому прикладі докладно описано всі необхідні кроки для створення правил. З метою уникнення непотрібного роздуття об’єму цієї довідки у наступних прикладах буде наведено лише список кроків, специфічних для відповідного прикладу.


Зауваження
Атрибут Пейджер стосується Керування віртуальними стільницями:


Фіксування вікна на стільниці і встановлення інших атрибутів

Зафіксуємо вікно Akregator на Віртуальній стільниці 2. Крім того, нехай програма запускається з вікно бажаного розміру у бажаній позиції. Для кожного атрибута скористаємося параметр Застосувати спочатку, щоб параметри вікна можна було перевизначити у динамічному режимі.

Правило KWin створюється таким чином:

  1. Запустіть Akregator на другій стільниці і встановіть бажані розмір і розташування вікна:

  2. Клацніть правою кнопкою миші на смужці заголовка і виберіть у контекстному меню пункт Налаштувати поведінку вікна...::

  3. Виберіть пункт Правила вікон на лівій панелі і натисніть кнопку Створити...:

  4. Буде показано вікно Зміна параметрів вікон. Вкладку Відповідність вікон буде типово відкрито:

  5. Натисніть кнопку Визначити властивості вікна. З затримкою затримка у 0 с курсор негайно змінить вигляд на перехрестя. Клацніть у довільній точці вікна Akregator (саме вікна, а не смужки заголовка). Буде показано вікно з критеріями вікна програми. Використайте відповідність лише за назвою основного класу, отже решту пунктів можна не позначати. Додаткові дані можна отримати з розділу відповідність вікон:

  6. Натисніть кнопку Гаразд і у попередньому вікні буде заповнено пункти параметрів вікна на вкладці Відповідність вікон. Введіть зрозумілий Опис (цей опис буде показано у вікні Правило KWin):

  7. Увімкніть атрибути вікна: Позицію, Розмір і Стільниця. Початкові значення буде встановлено на основі визначених за допомогою кнопки Визначити властивості вікна і їх можна буде перевизначити:

  8. Натискання кнопки Гаразд у попередньому вікні поверне вас до основного вікна Правила KWin. У списку буде показано нове правило з його описом:

  9. Натисніть Гаразд, щоб закрити вікно.
  10. Ось і все.

Вікно програми на всіх стільницях, всі дочірні вікна мають власні правила

Нехай потрібно, щоб, окрім вікон балачок, вікно Kopete і всі його дочірні вікна було показано на всіх стільницях і не було показано у системному лотку і на панелі пейджера. Дочірні вікна вікон балачки обробляти як батьківські вікна, але показувати пункти цих вікон у системному лотку.

Для кожного атрибута скористайтеся параметром Примусово, щоб значення атрибута не було перевизначено.

З метою отримання описаних вище результатів слід створити два правила:

  1. Правило для Вікна балачки Kopete і
  2. Правило для Kopete

The Kopete Chat rule's matching-criteria is more restrictive than the Kopete rule as it needs to match a specific Window Role: the chat window. Due to rule evaluation processing, the Kopete Chat rule must precede the Kopete rule in the KWin Rule list for Kopete.

Kopete Chat Rule

Assuming a Kopete Chat window is open:

  1. Use Detect Window Properties and select the Kopete Chat window. Check the Window role box to restrict the criteria to chat windows - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description box:

  3. Enable the following attributes:

  4. Click through to complete entry of the rule.
Note
The Skip taskbar attribute is set to No to display the window in the taskbar which loosely translates to: no do not skip taskbar .

Kopete Rule

Assuming Kopete is open:

  1. Use Detect Window Properties and select the Kopete window. Match only by primary class name so leave the check boxes unchecked - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description box:

  3. Enable the following attributes:


  4. Click through to complete entry of the rule.

Kopete KWin Rule List

As mentioned, due to rule evaluation processing, the Kopete Chat rule must precede the Kopete rule:

Suppress a Window from showing on Pager

KNotes currently does not allow for its notes to skip the pager however a rule easily solves this shortcoming.

Assuming a sticky note' window is available:

  1. Use Detect Window Properties and select any sticky note window. Match only by primary class name so leave the check boxes unchecked - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description box:

  3. Enable the Skip Pager attribute with the Force parameter:

  4. Click through to complete entry of the rule.

Force a Window to the Top

To pop an active window to the top, set its Focus stealing prevention attribute to None, typically, in conjunction with the Force parameter:

Multiple Rules per Application

Thunderbird has several different child windows. This example:

  • Pin Thunderbird's main window on Virtual Desktop 1 with a specific size and location on the desktop.
  • Allow the Thunderbird composer window to reside on any desktop and when activated, force focus and pop it to the top of all windows.
  • Pop the Thunderbird reminder to the top and do not give it focus so it isn't inadvertently dismissed.

Each rule's matching criteria is sufficiently restrictive so their order within the main KWin window is not important to affect rule evaluation.

Thunderbird - Main

Assuming the Thunderbird Main window is open, sized and position to suit:

  1. Use Detect Window Properties and select the Thunderbird Main window. Check the Window role box to restrict the criteria to the main window - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description box:

  3. Enable the following attributes:

  4. Click through to complete entry of the rule.

Thunderbird - Composer

Assuming a Thunderbird Composer window is open:

  1. Use Detect Window Properties and select the Thunderbird Compose window. Check the Window role and Window type boxes to restrict the criteria to composition windows - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description box:

  3. Enable the following attributes:

  4. Click through to complete entry of the rule.

Thunderbird - Reminder

Assuming a Thunderbird Reminder window is open:

  1. Use Detect Window Properties and select the Thunderbird Reminder window. Check the Secondary class name and Window Type boxes to restrict the criteria to reminder windows - for additional information see window matching:

  2. Clicking OK in the previous window back-fills the results in the Window Matching tab. Enter a meaningful text in the Description box:

  3. Enable the following attributes:


  4. Click through to complete entry of the rule.