Менеджер вікон Openbox
Openbox одночасно надійний і гнучкий менеджер вікон який використовується у багатьох легких дистрибутивах. Хоча він підтримує комбінації клавіш і правила для вікон, я використовую для цих функцій сторонні програми. Не знадобилась також і підтримка меню. Отже, налаштування звелось до максимального спрощення конфігурації. Файли autostart, menu.xml та environment були видалені взагалі.
У файлі rc.xml залишені лише основні налаштування Openbox. Окремі типи налаштувань переміщені в окремі файли на кшталт mouse.xml, keyboard.xml тощо, а в rc.xml зазначено посилання на них. Це дозволило максимально спростити файли конфігурації.
Файл конфігурації Openbox “rc.xml”
<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<followMouse>no</followMouse>
<focusLast>yes</focusLast>
<underMouse>no</underMouse>
<focusDelay>200</focusDelay>
<raiseOnFocus>no</raiseOnFocus>
</focus>
<placement>
<policy>Smart</policy>
<center>yes</center>
<monitor>Primary</monitor>
<primaryMonitor>1</primaryMonitor>
</placement>
<desktops>
<number>1</number>
<firstdesk>1</firstdesk>
<names>
<name>desktop 1</name>
</names>
<popupTime>875</popupTime>
</desktops>
<resize>
<drawContents>yes</drawContents>
<popupShow>Nonpixel</popupShow>
<popupPosition>Center</popupPosition>
<popupFixedPosition>
<x>10</x>
<y>10</y>
</popupFixedPosition>
</resize>
<margins>
<top>0</top>
<bottom>0</bottom>
<left>0</left>
<right>0</right>
</margins>
<dock>
<position>TopLeft</position>
<floatingX>0</floatingX>
<floatingY>0</floatingY>
<noStrut>no</noStrut>
<stacking>Above</stacking>
<direction>Vertical</direction>
<autoHide>no</autoHide>
<hideDelay>300</hideDelay>
<showDelay>300</showDelay>
<moveButton>Middle</moveButton>
</dock>
<xi:include href="theme.xml"/>
<xi:include href="keyboard.xml"/>
<xi:include href="mouse.xml"/>
<xi:include href="applications.xml"/>
</openbox_config>
Допоміжний файл конфігурації theme.xml
<theme>
<name>Greybird</name>
<titleLayout>NLIMC</titleLayout>
<keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify>
<font place="ActiveWindow InactiveWindow ActiveOnScreenDisplay InactiveOnScreenDisplay">
<name>sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuHeader MenuItem ">
<name>sans</name>
<size>8</size>
<weight>normal</weight>
<slant>normal</slant>
</font>
</theme>
Допоміжний файл конфігурації mouse.xml
<mouse>
<dragThreshold>1</dragThreshold>
<doubleClickTime>500</doubleClickTime>
<screenEdgeWarpTime>0</screenEdgeWarpTime>
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
<context name="Titlebar">
<mousebind button="Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximizeFull"/>
</mousebind>
</context>
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Top">
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>top</edge>
</action>
</mousebind>
</context>
<context name="Left">
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>left</edge>
</action>
</mousebind>
</context>
<context name="Right">
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>right</edge>
</action>
</mousebind>
</context>
<context name="Bottom">
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>bottom</edge>
</action>
</mousebind>
</context>
<context name="TRCorner BRCorner TLCorner BLCorner">
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="Client">
<mousebind button="Left Middle Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Shade">
<mousebind button="Left" action="Click">
<action name="ToggleShade"/>
</mousebind>
</context>
<context name="Iconify">
<mousebind button="Left" action="Click">
<action name="Iconify"/>
</mousebind>
</context>
<context name="Maximize">
<mousebind button="Left" action="Click">
<action name="ToggleMaximize"/>
</mousebind>
</context>
<context name="Close">
<mousebind button="Left" action="Click">
<action name="Close"/>
</mousebind>
</context>
</mouse>
Допоміжний файл конфігурації keys.xml
<keyboard>
<!-- LAUNCHERS -->
<keybind key="C-Escape">
<action name="Execute">
<command>jgmenu_run</command>
</action>
</keybind>
<keybind key="W-x">
<action name="Execute">
<command>jumpapp -f lxterminal</command>
</action>
</keybind>
<keybind key="C-Print">
<action name="Execute">
<command>scrot -b -s -e 'xclip -selection clipboard -t image/png -i $f ; rm $f'</command>
</action>
</keybind>
<keybind key="C-Print">
<action name="Execute">
<command>scrot -b -s -e 'xclip -selection clipboard -t image/png -i $f ; gimp $f ; rm $f'</command>
</action>
</keybind>
<keybind key="Print">
<action name="Execute">
<command>scrot -b -e 'xclip -selection clipboard -t image/png -i $f ; rm $f'</command>
</action>
</keybind>
<keybind key="W-r">
<action name="Execute">
<command>jumpapp -f xfreerdp /drive:home,/home/saba -decorations /network:auto +fonts /compression -themes -wallpaper /clipboard /audio-mode:1 /auto-reconnect -glyph-cache /size:1332x768 /u:user /p:@a2094545 /v:168.119.100.64</command>
</action>
</keybind>
<keybind key="W-f">
<action name="Execute">
<command>jumpapp -f pcmanfm</command>
</action>
</keybind>
<keybind key="W-e">
<action name="Execute">
<command>jumpapp -f thunderbird</command>
</action>
</keybind>
<keybind key="W-w">
<action name="Execute">
<command>jumpapp -f firefox</command>
</action>
</keybind>
<keybind key="C-S-c">
<action name="Execute">
<command>jumpapp -f mate-calc</command>
</action>
</keybind>
<keybind key="W-v">
<action name="Execute">
<command>jumpapp -f /opt/viber/Viber</command>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute">
<command>jumpapp -f telegram-desktop</command>
</action>
</keybind>
<keybind key="W-s">
<action name="Execute">
<command>jumpapp -f obsidian</command>
</action>
</keybind>
<!-- VOLUME AND BRIGHTNESS -->
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<command>/home/saba/.config/scripts/volumeControl.sh up</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<command>/home/saba/.config/scripts/volumeControl.sh down</command>
</action>
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>/home/saba/.config/scripts/volumeControl.sh mute</command>
</action>
</keybind>
<keybind key="XF86MonBrightnessUp">
<action name="Execute">
<command>/home/saba/.config/scripts/brightnessControl.sh up</command>
</action>
</keybind>
<keybind key="XF86MonBrightnessDown">
<action name="Execute">
<command>/home/saba/.config/scripts/brightnessControl.sh down</command>
</action>
</keybind>
<!-- WINDOWS MANAGMENT -->
<keybind key="W-Left">
<action name="Unmaximize"/>
<action name="MaximizeVert"/>
<action name="MoveResizeTo">
<width>50%</width>
</action>
<action name="MoveToEdgeWest"/>
</keybind>
<keybind key="W-Right">
<action name="Unmaximize"/>
<action name="MaximizeVert"/>
<action name="MoveResizeTo">
<width>50%</width>
</action>
<action name="MoveToEdgeEast"/>
</keybind>
<keybind key="W-Up">
<action name="ToggleMaximize"/>
<!-- action name="ToggleFullscreen"/ -->
</keybind>
<keybind key="A-F4">
<action name="Close"/>
</keybind>
<keybind key="C-q">
<action name="Close"/>
</keybind>
</keyboard>