Skip to main content

Openbox

Openbox is a lightweight, powerful, and highly configurable stacking window manager. It allows you to change almost every aspect of how you interact with your desktop and invent completely new ways to use and control it. It's the default window manager in Archcraft.

video

Openbox Premium

The Ultimate Openbox Configuration With Extra Functionality And Themes (25 Pre-Made + Infinite Auto Generated Themes With pywal)

Get Openbox Premium From ko-fi And Support Archcraft Development.

Installation

Since Openbox is the default window manager of Archcraft, It comes pre-installed. But if you choose another window manager (let's say bspwm) during installation of Archcraft or you ever want to install/reinstall Openbox again, Then :

Open a terminal and run the following command to install the regular version of Openbox :

$ sudo pacman -Sy archcraft-openbox
Archcraft Prime

Openbox Premium comes pre-installed on Archcraft Prime ISO

Configuration

Openbox is pre-configured in Archcraft. In this section, We'll see how the Openbox window manager is configured, what tools and utilities are used to make it look and work like a complete desktop environment.

Config Structure

The configuration structure of Openbox WM in Archcraft looks something like this:

~/.config
├── alacritty : terminal config
├── dconf : dconf database for plank config
├── dunst : dunst config for notifications
├── nitrogen : nitrogen config for setting wallpapers
├── obmenu-generator : obmenu-generator config for menus
├── openbox : openbox config
│   ├── scripts : scripts used for openbox
│   ├── themes : all themes (polybar, rofi configs)
│   ├── autostart : startup file
│   ├── environment : script path and other env variables
│   ├── menu-STYLE.xml : menu file(s)
│   └── rc.xml : main config file
├── xfce4 : xfce config specific for openbox
│   └── xfconf :
│   └── xfce-perchannel-xml :
│   └── xfce4-terminal.xml : xfce terminal config
│   └── xsettings.xml : theme, icons and fonts config
└── picom.conf : compositor config

Terminal

Alacritty is the default terminal. In the Openbox window manager, alacritty is launched with its default config file. If you need to change anything, make sure you modify the config files in ~/.config/alacritty directory. These are the following config files you can modify to change the behaviour of your terminal:

~/.config/alacritty/alacritty.toml : Main configuration file
~/.config/alacritty/colors.toml : Colors configurations
~/.config/alacritty/fonts.toml : Fonts configurations

If you need any help with alacritty config, run : man 5 alacritty in terminal.

tip

XFCE Terminal is also installed as an alternate terminal in Openbox. If alacritty doesn't work for you (see the reasons in FAQs), use this one.

warning

When you change the theme, the colors.toml and fonts.toml file get overwritten by the theme script.

When you change the color-scheme via the openbox menu Preferences > Terminal Colors, the colors.toml file gets overwritten.

When you change the fonts via the openbox menu Preferences > Change Font > Terminal, the fonts.toml file gets overwritten.

Notification

Dunst is used as a notification daemon for notifications in Openbox. In the Openbox window manager, dunst is launched with its default config file, which is ~/.config/dunst/dunstrc. So, If you need to modify anything, make sure you edit this file.

If you need any help with dunst config, run : man 5 dunst in terminal.

warning

When you change the theme, the fonts and colors in dunstrc file get overwritten by the theme script.

When you change the fonts via the openbox menu Preferences > Change Font > Notifications, the fonts in dunstrc file get overwritten.

Wallpaper

Nitrogen sets the wallpaper in the Openbox. If you want to change the wallpaper, just use Nitrogen application or you can go to openbox menu Preferences > Change Wallpaper

Statusbar

There are two statusbar available in Archcraft's Openbox window manager, Polybar and Tint2. To switch between them, Use openbox menu Preferences > Panel / Bar.

The configurations for both polybar and tint2 can be found inside the currently applied theme's directory, which is inside the themes directory of Openbox ~/.config/openbox/themes

Let's say that the currently applied theme is default and you want to modify the polybar settings, or perhaps want to add/remove modules, then you need to edit the following files :

~/.config/openbox/themes/default/polybar/config.ini : Main config file
~/.config/openbox/themes/default/polybar/colors.ini : Colors config file
~/.config/openbox/themes/default/polybar/modules.ini : Modules config file

If you need any help with polybar config, visit : polybar wiki

Same goes for tint2, Edit the ~/.config/openbox/themes/default/tint2/tint2rc file to modify the settings, add/remove items, etc.

If you need any help with tint2 config, run : man tint2 in the terminal.

warning

When you change the theme, the fonts in config.ini file and colors.ini file of polybar get overwritten by the theme script.

When you change the fonts via the openbox menu Preferences > Change Font > Status Bar, the fonts in config.ini file of polybar get overwritten.

Launchers and Applets

Rofi is used for application launchers, command runner and various applets. To modify the rofi config, edit ~/.config/rofi/config.rasi file.

If you need any help with rofi config, run : man rofi in terminal.

The scripts for rofi that are used in Openbox can be found it ~/.config/openbox/scripts directory. These are the following scripts that uses rofi to provide the launchers and applets in Openbox :

rofi-askpass : rofi based sudo frontend to get root password
rofi-bluetooth : bluetooth applet to quickly connect to BT devices
rofi-launcher : an application launcher, cmd runner, file manager and task manager
rofi-music : music applet, that controls MPD with mpc
rofi-powermenu : power menu, with confirmation dialog
rofi-runner : quickly lets you run a command
rofi-screenshot : screenshot applet that works with maim

If you want to modify any applet or perhaps want to extend the functionality of the applet, just edit these scripts.

The configuration of each script can be found inside the currenty applied theme's directory, which is inside the themes directory of Openbox ~/.config/openbox/themes

Let's say that the currently applied theme is default and you want to modify the looks of launcher, then you need to edit the ~/.config/openbox/themes/default/rofi/launcher.rasi file. Same goes for every other applet, Edit the respective file in the same directory.

If you need any help with rofi theming, run : man rofi-theme in terminal.

To change the colors and fonts of the launchers and applets, Edit the ~/.config/openbox/themes/<THEME>/rofi/shared/colors.rasi and ~/.config/openbox/themes/<THEME>/rofi/shared/fonts.rasi files.

warning

When you change the theme, the shared/colors.rasi and shared/fonts.rasi files get overwritten by the theme script.

When you change the fonts via the openbox menu Preferences > Change Font > Launchers, the shared/fonts.rasi file gets overwritten.

Compositor

Picom is used for compositing. It's a lightweight compositor with shadowing, advanced blurring and fading. In Openbox, picom is launched with its default config file, which is ~/.config/picom.conf.

If you need to change anything related to picom, you have two methods:

  • Edit the picom config file directly.
  • Use the openbox menu Preferences > Compositor

If you need any help with picom config, check the picom's default config file in /etc/xdg/picom.conf

info

If you're having screen-tearing issues, using glx backend can solve this issue.
If you're facing lagging, hangs and freezes, try switching between xrender and glx backend.

warning

When you change the theme, things like backend, shadows, blurring in picom.conf file gets overwritten by theme script.

Window Manager

The configuration of Openbox is available in ~/.config/openbox. To configure Openbox window manager, these are the files that are used :

Openbox specific config files

autostart : provides autostart mechanism. Edit this file to run your apps on startup.
environment : used to export and set env variables. Edit this file to set ENV vars.
menu-STYLE.xml : defines the type and behaviour of the desktop menu, accessible by right-clicking the background. Edit this file to add/remove menu entries.
rc.xml : main configuration file, responsible for determining the behaviour and settings of the overall session. Edit this file to add/remove keybindings, mousebinding, window rules, etc.

Other files to extend functionality

~/.config/obmenu-generator : generates dynamic applications menu
/usr/share/archcraft/openbox/pipemenus : pipe menus for various operations
/usr/share/archcraft/openbox/icons : icons used for openbox menu

If you need any help with openbox configuration, visit : openbox wiki

warning

When you change the theme, things like theme, fonts, button layout, padding and menu style in rc.xml file gets overwritten by the theme script.

Keybindings

Here's a list of some important keybinds you need to know for operating Openbox easily in Archcraft. To see all the keybinds, Right click on the desktop and go to Keybinds. If you want to modify or add new keybinds, Edit ~/.config/openbox/rc.xml file.

Applications

KeysAction
super + ReturnOpen terminal (alacritty)
super + TOpen terminal in fullscreen mode
super + FOpen file manager (thunar)
super + EOpen text editor (geany)
super + WOpen web browser (firefox)
KeysAction
alt + F1Open application launcher
superOpen application launcher
super + NOpen network manager applet
super + BOpen bluetooth applet
super + MOpen music applet
super + XOpen powermenu applet
super + SOpen screenshots applet
super + ROpen command runner
super + SpaceOpen root menu
alt + SpaceOpen client menu
alt + shift + SpaceOpen client list combined menu
alt + ctrl + SpaceOpen openbox application menu

Hardware Keys

KeysAction
PrintTake screenshot
alt + PrintTake screenshot in 5 seconds delay
shift + PrintTake screenshot in 10 seconds delay
ctrl + PrintTake screenshot of currently focused window
super + PrintTake screenshot of selected area
XF86AudioRaiseVolumeIncrease volume
XF86AudioLowerVolumeDecrease volume
XF86AudioMuteToggle mute speakers
XF86AudioMicMuteToggle mute microphone
XF86Audio + Next/Prev/Play/StopMedia controls (MPD)
XF86MonBrightnessUpIncrease display brightness
XF86MonBrightnessDownDecrease display brightness

Workspaces

KeysAction
super + 1/2/3/4/5Switch to respective workspace
super + shift + 1/2/3/4/5Send active window to respective workspace
ctrl + alt + Left/RightSwitch to previous/next workspace
super + shift + Left/RightSend active window to previous/next workspace
super + EqualAdd new desktop
super + MinusRemoved last desktop
super + DToggle show desktop

Window Management

KeysAction
super + TabSwitch between applications (All workspaces)
alt + TabSwitch between applications (Current workspaces)
super + alt + Up/Down/Left/RightMove active window Up/Down/Left/Right relatively
super + ctrl + Up/Down/Left/RightResize active window relatively
super + alt + RToggle interactive resize
super + alt + MToggle interactive move
super + Left/RightMove window to the left/right edge of the screen
super + Up/DownMaximize/Center window respectively
super + shift + Up/DownMove window to the up/down edge of the screen
super + H/J/K/LMove window to TopLeft/BottomLeft/TopRight/BottomRight
super + shift + H/J/K/LTile window to TopLeft/BottomLeft/TopRight/BottomRight
super + C/QClose application
alt + F4Close application
alt + F5Iconify/Minimize current application
alt + F6Toggle maximize
alt + F7Toggle shade
alt + F8Toggle decorations
alt + F9Toggle omnipresent/sticky
alt + F10Toggle fullscreen
alt + F11Toggle always on top
alt + F12Toggle always on bottom

Window Manager

KeysAction
ctrl + shift + RReconfigure Openbox WM
ctrl + shift + BackSpaceRestart Openbox WM
ctrl + alt + DeleteExit Openbox WM

Misc Keys

KeysAction
ctrl + alt + TOpen alternate (xfce) terminal
ctrl + alt + VOpen vim in terminal
ctrl + alt + ROpen ranger in terminal
ctrl + alt + HOpen htop in terminal
ctrl + alt + MOpen ncmpcpp with album art in terminal
ctrl + alt + LTrigger lockscreen
super + PRun colorpicker
super + EscapeRun xkill

Screenshots

Desktop

Here's few screenshots of Openbox desktop. These'll give you an idea of the experience of Openbox in Archcraft.

Desktop 1Desktop 2Desktop 3Desktop 4Desktop 5Desktop 6
imgimgimgimgimgimg
Desktop 7Desktop 8Desktop 9Desktop 10Desktop 11Desktop 12
imgimgimgimgimgimg

Themes

To Change the theme/style, Right click on the desktop and go to Preferences > Change Style

There are 10 styles available in regular Openbox.

Theme 1Theme 2Theme 3Theme 4Theme 5
imgimgimgimgimg
Theme 6Theme 7Theme 8Theme 9Theme 10
imgimgimgimgimg

FAQs

How to update my config to new configs?

When a new version of Archcraft Openbox get released, And you update the system by sudo pacman -Syu or you update the Openbox package by sudo pacman -S archcraft-openbox, New config files get installed as openbox_pacnew_YYYY-MM-DD in your ~/.config directory.

To use new configs, backup your old ~/.config/openbox directory and move ~/.config/openbox_pacnew_YYYY-MM-DD to ~/.config/openbox and login again.

For Openbox Premium, download the updated package from ko-fi (for free) and just install it to update to new configs.

How to open apps as root in openbox?

To open apps as root, Go to openbox menu Apps As Root, select the app and type your root password to open the app.

How to change desktop theme in openbox?

To change desktop theme, Go to openbox menu Preferences > Change Style and select the theme you want to use.

How to change GTK theme, icons and cursor?

To change GTK theme, icons and fonts in Openbox session, use xfce4-appearance-settings application.
You can open this app either via openbox menu Preferences > Appearance Settings or type Appearance in app launcher.

To change the openbox theme, use obconf app.
You can open this app either via openbox menu Preferences > Openbox > Settings or type obconf in app launcher.

How to manage multiple monitors and resolution in Openbox?

If you use multiple monitors with Openbox window manager, you can manage them via two methods :

  1. Run launcher and type either Manager Monitors or archcraft-randr and use the app.
  2. Go to openbox menu Preferences > Display / Monitor and use the menu.
Why Alacritty is not working on my computer?

Since Alacritty is a OpenGL based terminal emulator, It may not work on some computer hardwares. You can make it work on such computers by following these methods :

  1. Open alacritty with LIBGL_ALWAYS_SOFTWARE=1 variable. Edit the keybindings/script launching alacritty and replace alacritty with LIBGL_ALWAYS_SOFTWARE=1 alacritty
  2. Edit /usr/share/applications/Alacritty.desktop desktop file and replace Exec=alacritty with Exec=env LIBGL_ALWAYS_SOFTWARE=1 alacritty