Manjaro Openbox

Openbox

From Manjaro
Revision as of 05:08, 14 February 2023 by Krotesk (talk | contribs) (Created page with "После внесения необходимых изменений в файл, сохраните изменения и закройте его.")
Other languages:
English • ‎русский

Обзор

Менеджер окон Openbox спроектирован как высококонфигурируемый и настраиваемый с широкой поддержкой стандартов.


Openbox-wm-18.jpg


Установка Openbox

Для получения информации о том, как установить базовую среду Openbox, ознакомьтесь с инструкцией по установке Openbox.


Настройка привязки клавиш

Openbox создан для настройки, и это включает в себя возможность создания собственных привязок клавиш. Это комбинации нажатий клавиш, которые могут быть использованы для выполнения практически любого действия, обычно гораздо быстрее и непосредственнее, чем другие способы, такие как поиск в меню. Хотя Manjaro Openbox Edition предоставляет удобный графический интерфейс, который можно использовать для изменения или создания пользовательских связок клавиш, некоторыми комбинациями специальных клавиш нелегко управлять через этот интерфейс.

В этом случае необходимо вручную отредактировать файл Openbox rc.xml. Одной из многочисленных функций этого файла является хранение и включение привязок клавиш в среде Openbox. Этот файл находится по адресу <code~/.config/openbox/rc.xml>, и вы можете редактировать его с помощью стандартного текстового редактора.

Пример: яркость экрана

После открытия файла перед вами откроется значительное количество команд, содержащихся в нем. Не беспокойтесь об этом, так как вам нужно будет только добавить новый блок кода, а не изменять то, что уже есть. Код, который необходимо добавить, чтобы обеспечить полное ручное управление яркостью экрана, выглядит следующим образом:

    <keybind key="XF86MonBrightnessUp">
      <action name="Execute">
        <command>xbacklight +10</command>
      </action>
    </keybind>
    <keybind key="XF86MonBrightnessDown">
      <action name="Execute"> 
        <command>xbacklight -10</command>
      </action>
    </keybind>


Предупреждение
Этот код нельзя просто поместить в любое место файла. Для работы он должен быть помещен в определенный раздел. Для этого следуйте приведенным ниже инструкциям.

Чтобы найти правильное место для вставки вышеуказанных команд, рекомендуется использовать функции Найти или Поиск, предоставляемые вашим редактором. Если в вашем текстовом редакторе нет возможности поиска - придется вручную прокрутить страницу вниз примерно до середины (возможно, с помощью клавиши Page Down), чтобы найти следующий код:

</keyboard>

Общая часть кода должна выглядеть следующим образом:

    </keybind>
   </keyboard>
  <mouse>

Once located, the new code above can be inserted between the </keybind> and </keyboard> codes. Press <enter> after the </keybind> code to provide a space to do so. Below is an example where this has taken place. The new code inserted has been highlighted in green for illustrative purposes:

    </keybind>
     <keybind key="XF86MonBrightnessUp">
       <action name="Execute">
         <command>xbacklight +10</command>
       </action>
     </keybind>
     <keybind key="XF86MonBrightnessDown">
       <action name="Execute">
         <command>xbacklight -10</command>
       </action>
    </keybind>
  </keyboard>
  <mouse>

If the command "xbacklight +10" does nothing, find out the minimum value to put instead of 10 by trying to set the brightness to 20, then 40. You can use the following commands:

  • `xbacklight =X` to change the brightness, and
  • `xbacklight -get` to see if the minimum value has been reached.

Once you have made the necessary amendments to the file, save the changes and close it.

Now logout and back in again for the changes to take effect.


Пример: клавиши громкости (ALSA)

Once the file has been opened, you will be presented with a substantial amount of commands contained within it. Don't worry about this, as you will only need to add a new block of code, rather than amend anything that is there. The code that must be added to enable full manual control over the volume (i.e. to raise, lower, and mute it) is as follows:

   <keybind key="XF86AudioRaiseVolume">
     <action name="Execute"> 
       <command>amixer set Master 10%+</command>
     </action>
  </keybind>
   <keybind key="XF86AudioLowerVolume">
     <action name="Execute">
       <command>amixer set Master 10%-</command>
     </action>
   </keybind>
   <keybind key="XF86AudioMute">
     <action name="Execute"> 
       <command>amixer set Master toggle</command>
     </action>
  </keybind>


Warning
This code cannot just be placed anywhere in the file. It must be placed in a particular section in order to work. Please follow the instructions below to do so.

To find the correct place to insert the above commands, it is recommended to use the Find or Search functions provided by your editor. If your text editor does not have the ability to search, it will be necessary to manually scroll down to about the mid-way point (perhaps using the Page Down key) to locate the following code:

</keyboard>

Общая часть кода должна выглядеть следующим образом:

    </keybind>
   </keyboard>
  <mouse>

Once located, the new code above can be inserted between the </keybind> and </keyboard> codes. Press <enter> after the </keybind> code to provide a space to do so. Below is an example where this has taken place. The new code inserted has been highlighted in green for illustrative purposes:

    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute"> 
        <command>amixer set Master 10%+</command>
      </action>
   </keybind>
    <keybind key="XF86AudioLowerVolume">
     <action name="Execute">
        <command>amixer set Master 10%-</command>
      </action>
    </keybind>
    <keybind key="XF86AudioMute">
      <action name="Execute"> 
        <command>amixer set Master toggle</command>
      </action>
   </keybind>
  </keyboard>
  <mouse>

После внесения необходимых изменений в файл, сохраните изменения и закройте его.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.