/r/openbox

Photograph via snooOG

This is the home of the subreddit for the Openbox Window Manager which runs on Linux and BSD.

/r/openbox

3,238 Subscribers

38

Who's going to be using Openbox throughout 2025?

14 Comments
2024/12/01
13:33 UTC

3

stupid post, but...

i can't seem to understand where to *theme* openbox. i've already went through rc.xml and barely found anything that might help.

if someone can point me to the correct area in the file or explain what i'm doing wrong, it would be much appreciated <3

2 Comments
2024/09/21
12:20 UTC

2

How to change DPI in hires screen?

I am new to Openbox. I have 4K screen and the texts are too tiny. How do I increase the DPI?

2 Comments
2024/09/16
20:27 UTC

2

How do I make the right click menu transparent?

Thanks.

5 Comments
2024/09/06
14:11 UTC

2

What are the currently best-working themes and icon sets out there? [Please read on, this is not another Best Of question]

So I hit a bit of a stumbling block here. I'm using my own environment based around Openbox, on Arch Linux. I tend towards GTK (2,3,4) but there's also a lot of Qt (5,6) apps.

For the longest time I have used the Papirus icon theme and the Arc UI theme for both GTK and Qt applications and this has worked well enough, i.e. I get a homogenous look across my desktop and all icons are themed properly, down to all systray and menu icons.

Now I'm getting a bit bored with that look and want something else, and it seems whatever theme I choose I cannot get that consistent look anymore.

Most importantly the icons. What theme would you recommend, not in terms of looks but in terms of adaptiveness (i.e. symlinks catering to all possible DE scenarios and proper Inherits) and completeness?

I have tried Breeze and Yaru and Colloid, but all these icon sets suffer from the above.

The GTK themes are not quite as bad, bit I have trouble integrating them with Qt. I chose Kvantum for that, it seems the least hassle, but the Kvantum Yaru theme lacks a dark variant, and Ihad to user-install the Colloid themes fromthe KDE store. Not that I'm opposed to that, but I just have the feeling I'm missing something.

One problematic factor could be that ArchLinux has only very few themes in its official repositories and has moved a lot of stuff to the AUR, which makes choices overwhelming.

tl;dr: What are the most current and complete Icon, GTK and Qt themes i can use for a homogenous desktop look?

4 Comments
2024/09/02
19:35 UTC

2

Window focus cycle with "monitor" option

Hello everyone. 🙂

Since I really wanted something like i3wm (at the very least I do want the ability to switch between monitors and to cycle between windows of the same monitor) and the closest thing I found is the BurntSushi openbox-multihead repository (I tried that and it crashes, didn't investigate if that was due to some misconfiguration on my part) I decided to fork the danakj repository and to implement that myself.

I realized the best way to do this is to add a monitor option to the NextWindow and PreviousWindow.

This option accepts the monitor number to cycle through or the string same to indicate to use the same monitor as the active window. Of course, if you do no use this option the behaviour stays the same as before.

Here's an example of my rc.xml file:

...
    <keybind key="W-C-Left W-C-KP_Left W-C-h">
      <action name="NextWindow">
        <monitor>2</monitor>
        <finalactions>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="W-C-Right W-C-KP_Right W-C-l">
      <action name="NextWindow">
        <monitor>1</monitor>
        <finalactions>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="A-S-Tab W-C-Up W-C-KP_Up W-C-k">
      <action name="PreviousWindow">
        <monitor>same</monitor>
        <finalactions>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="A-Tab W-C-Down W-C-KP_Down W-C-j">
      <action name="NextWindow">
        <monitor>same</monitor>
        <finalactions>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
...

If you want to give my fork a try here's the link.

Disclaimer: I am NOT a C programmer, also I did a minimal test of these changes so try it at your risk. 😁

5 Comments
2024/08/07
00:22 UTC

1

How can I use xdg autostart and openbox autostart at the same time?

I've noticed that when I add an autostart file in my openbox config directory, no programs in xdg directories start. They do work when the autostart file is moved/renamed, but I want to have both working at the same time. Is that possible?

6 Comments
2024/08/01
20:34 UTC

12

Openbox + xfce4-panel

2 Comments
2024/08/01
06:09 UTC

2

Volume/brightness bar?

Hi, I was wondering if maybe there's a program that pops up a bar when you press the brightness/volume keys? Something like what windows and most DEs do.

5 Comments
2024/07/30
09:21 UTC

17

Openbox with XFCE4-PANEL

2 Comments
2024/07/30
07:58 UTC

2

Unable to access the official website

Hi,

I'm trying to reach the official website but I'm getting "403 Forbidden" error.

I tried both on Firefox and Chromium.

Does somebody can visit the openbox website or is it unreachable for everyone ? And is there another way to access the website ?

I want to access the wiki.

Thanks,

Jeudi

6 Comments
2024/07/22
10:25 UTC

3

What's a good "foundation" distro for Openbox?

I'm looking for some recommendations for a solid distro to use as the base upon which I'd install Openbox. I've tried (and liked) BunsenLabs, but I'd like something more mainstream. My basic requirements are pretty simple:

  • Acceptably current software packages. I don't need the bleeding edge, but I'd rather not wait years for up-to-date software either.
  • Already includes solid utilities (network, sound, battery, sleep/hibernate, etc.)
  • Good community support.

I was thinking either Debian or Lubuntu, but I'm open to others. I wish there was a distro that had the base platform configured (i.e., bullet #2 above) but didn't come with office apps, a browser, etc. I'd rather not go through the hassle of uninstalling those and installing my own preferences.

Thanks!

9 Comments
2024/07/21
20:21 UTC

3

"Previous window position" shortcut

Hello all,

I love Openbox and the customization abilities it has. I set up all my window management shortcuts a long time ago, and the only one I couldn't come up with a solution for was a more general version of "unmaximize" that would, in addition to returning a maximized window to its previous size and position, return ANY window to its previous size and position. Today I decided to give it another go but it still has problems.

The procedure I thought up:

  1. Any time the window is repositioned with a shortcut (maximized, tiled, centered, etc.) I have Openbox first call a script "recordgeom.sh" that appends the window size and position to a .csv file, then reposition it.

  2. When I run my "previous" shortcut (Super+A), Openbox calls a script "fetchgeom.sh" that matches the window ID to the aforementioned .csv file and repositions it to the size and position listed.

The problem is that for whatever reason Openbox seems to be recording the position to the .csv file AFTER it repositions the window, and so the shortcut usually does nothing as the "previous" window position listed is usually the current position of the window.

Here is my "recordgeom.sh", "fetchgeom.sh", and a fragment of the rc.xml file where I have the shortcuts.

/home/asuka/.local/bin/recordgeom.sh

#!/bin/bash 
#these five lines save the window x, y, width, height, id as variables
line2=$(echo `xdotool getwindowfocus getwindowgeometry | grep -P -o "[0-9]+" | head -n2 | tail -n1`)
line3=$(echo `xdotool getwindowfocus getwindowgeometry | grep -P -o "[0-9]+" | head -n3 | tail -n1`)
line4=$(echo `xdotool getwindowfocus getwindowgeometry | grep -P -o "[0-9]+" | head -n5 | tail -n1`)
line5=$(echo `xdotool getwindowfocus getwindowgeometry | grep -P -o "[0-9]+" | head -n6 | tail -n1`)
windowid=$(echo `xdotool getwindowfocus`)
#this line concatenates the variables into a single line and appends it to the .csv file
echo -e """${windowid},0,${line2},${line3},${line4},${line5}""" >> /home/asuka/prevwindows.csv
#this line sorts the .csv file and removes all previous lines with the same window id
echo "`tac /home/asuka/prevwindows.csv | sort -u -t, -r -k1,1 | tac`" > /home/asuka/prevwindows.csv

/home/asuka/.local/bin/fetchgeom.sh

#!/bin/bash
#this line grabs the matching line of the .csv file and saves it to a variable
geom=$(awk -F, '$1 == "'`xdotool getwindowfocus`'" {print $0}' /home/asuka/prevwindows.csv)
#these four lines grab the x, y, width, and height from that line
xpos=$(echo $geom | cut -d ',' -f 3-3)
ypos=$(echo $geom | cut -d ',' -f 4-4)
width=$(echo $geom | cut -d ',' -f 5-5)
height=$(echo $geom | cut -d ',' -f 6-6)
#this line uses wmctrl to reposition the active window to the coordinates found 
wmctrl -ia `xdotool getwindowfocus` -e 1,$xpos,$ypos,$width,$height

Note that wmctrl has some issues with window borders that mean it often places windows a few pixels off, but I'm reasonably confident I can solve that on my own.

/home/asuka/.config/openbox/rc.xml (excerpt)

#this is a shortcut I use in one tiling layout, just an example of how these are written
<keybind key="W-t">
  <action name="Execute">
    <execute>recordgeom.sh</execute>
  </action>
  <action name="Unmaximize"/>
  <action name="MoveResizeTo">
    <x>815</x>
    <y>0</y>
    <width>1085</width>
    <height>337</height>
  </action>
</keybind>

#this is the "previous position" shortcut
<keybind key="W-0x26">
  <action name="Execute">
    <execute>fetchgeom.sh</execute>
  </action>
</keybind>

Any help is very much appreciated. I realize not that many of us still use Openbox, so I don't know where else I'd ask.

4 Comments
2024/07/18
00:08 UTC

2

Open box not issuing dark theme properly

I have a fresh install of open box on my raspberry pi zero W, and I have attempted to use a dark theme with it to suit my needs. I had made a python program for it that uses a dark theme and everywhere, Windows, any other Linux DE etc, it is black/dark, however it seems to be forced white by open box. Every dark theme that is supposed to change the active window background color to black is instead white.

7 Comments
2024/07/12
15:25 UTC

2

How to check Window Position?

I am trying to create some remaps for positioning the currently open window. What I want to achieve is something like this:

Demonstration #1

  1. window is open and spans the whole screen
  2. press W+Down and the window should span the lower half of the screen only
  3. press W+Down again and the window should return to span the whole screen

(same idea for W+Up/Right/Left)

Demonstration #2

window is open and spans the whole screen

  1. press W+Down and the window should span the lower half of the screen only
  2. press W+Left after it and the window should span the lower left part of the screen only
  3. press W+Right after that and the window should span the lower half of the screen

(same idea for the other remaps)

Demonstration #3

window is open and spans the whole screen

  1. press W+Down and the window should span the lower half of the screen only
  2. press W+Left after it and the window should span the lower left part of the screen only
  3. press W+Left again after that and the window should span the left half of the screen

(same idea for the other remaps)

What I've reached to is the code attached below.

Now the problem is in Demonstration #3 because I don't know how to detect the position of the window when it is unmaximized both horizontally and vertically, i.e. whether it is in the bottom left or in the bottom right of the screen.

I think the position must be known because suppose that the window is in the bottom left, pressing W+left should maximize the window vertically. But if the window is in the bottom right, then pressing W+left should maximize the window horizontally.

So any idea how to check that?
If not possible, do you have any idea about a workaround to achieve what I described?

Thanks a lot in advance.

    <keybind key="W-Up">
        <action name="Raise"/>
            <action name="If"><query target="default"><maximized>no</maximized><maximizedhorizontal>yes</maximizedhorizontal></query>
            <then>
                <action name="Maximize"/>
            </then>
            <else>
                <action name="ToggleMaximize"><direction>vertical</direction></action>
                <action name="MoveResizeTo"><y>0</y><width>50%</width><height>50%</height></action>
            </else>
        </action>
    </keybind>


    <keybind key="W-Down">
        <action name="Raise"/>
            <action name="If"><query target="default"><maximized>no</maximized><maximizedhorizontal>yes</maximizedhorizontal></query>
            <then>
                <action name="Maximize"/>
            </then>
            <else>
                <action name="ToggleMaximize"><direction>vertical</direction></action>
                <action name="MoveResizeTo"><y>-0</y><width>50%</width><height>50%</height></action>
            </else>
        </action>
    </keybind>


    <keybind key="W-Right">
        <action name="Raise"/>
            <action name="If"><query target="default"><maximized>no</maximized><maximizedvertical>yes</maximizedvertical></query>
            <then>
                <action name="Maximize"/>
            </then>
            <else>
                <action name="ToggleMaximize"><direction>horizontal</direction></action>
                <action name="MoveResizeTo"><x>-0</x><width>50%</width><height>50%</height></action>
            </else>
        </action>
    </keybind>

    <keybind key="W-Left">
        <action name="Raise"/>
            <action name="If"><query target="default"><maximized>no</maximized><maximizedvertical>yes</maximizedvertical></query>
            <then>
                <action name="Maximize"/>
            </then>
            <else>
                <action name="ToggleMaximize"><direction>horizontal</direction></action>
                <action name="MoveResizeTo"><x>0</x><width>50%</width><height>50%</height></action>
            </else>
        </action>
    </keybind>
3 Comments
2024/07/09
00:43 UTC

4

Openbox themes doesn't work properly.

https://preview.redd.it/xec6mqefqkad1.png?width=663&format=png&auto=webp&s=0039dd472a7991546509809e68a01312851e069d

Hello, this is my first time using openbox as WM in DE, but now, I want to customize it a little bit, and I have trouble when it come to proper scaling the function buttons, someone have any solution?

2 Comments
2024/07/04
22:01 UTC

6

Greylooks theme pack for Openbox (and also for GTK2/3)

I've created a pack of themes for Openbox and GTK2/3 for my personal usage and decided to publish them.

Standalone Openbox themes: https://github.com/vbrand1984/greylooks-openbox

Openbox+GTK themes together: https://github.com/vbrand1984/greylooks

Also, my dotfiles which utilize this theming.

2 Comments
2024/07/01
11:07 UTC

3

Everything is small on a high res monitor (Xorg)

This is an issue that I first encountered in KDE and that persisted to here. I have a 3027x1920 screen, and everything on it is tiny. I'm assuming that it's an Xorg problem, but I have no idea what to do about it. I'd also prefer not to change the resolution if possible.

5 Comments
2024/06/09
09:29 UTC

1

Issue on multi-monitor

So I'm not really sure if this is the right place to post this, but I recently migrated from Win10 to Openbox on Arch. It's been going good but I have a slight issue with my dual monitor setup, I have margins around each border when I Maximize Full, I get margins on each side besides the side against each monitor, is there a solution for this I haven't saw yet?

1 Comment
2024/06/02
05:53 UTC

4

Firefox does not use the same borders/title bars as other applications

I recently reinstalled Arch Linux and firefox does not have the same look as the other applications. Am I missing a package which would correct this?

https://preview.redd.it/z6xl6mlh0t3d1.png?width=657&format=png&auto=webp&s=8062e41e2a53b951ec975ac63614e7f86cbb2e6f

https://preview.redd.it/yhh0ktrm0t3d1.png?width=1210&format=png&auto=webp&s=4d8448a1820f09fdb611580f0c79de8b29becced

Edit: I solved it by going into the title bar settings and enabling the title bar :')

5 Comments
2024/05/31
18:20 UTC

9

A fast alternative to the picom X11 compositor - fastcompmgr

Since the early days of compton, every new release made my desktop feel somewhat slower; picom, unfortunately, continues this sad tradition. That's why I travelled back in time to an early version of compton (which added shadows on argb windows), cherry picked some later compton commits to get rid of spurious segfaults and memleaks, and made that version even faster, based on profiling. Since then moving and resizing windows or scrolling complex web pages is finally smooth again. You may want check it out here: https://github.com/tycho-kirchner/fastcompmgr.

CPU usages by compositor:

Compositormoveresizescroll
fastcompmgr6.7%4.4%1.5%
xcompmgr7.8%4.9%1.6%
compton26.4%6.8%17.1%
picom29.3%8.1%23.1%
0 Comments
2024/05/05
11:11 UTC

6

Openbox theme syntax for vim

AFAIK there is no official vim syntax plugin for Openbox theming files. Several years ago I stumbled upon a vim syntax file for Openbox themes. Recently, I heavily reworked the plugin and decided to publish it.

Enjoy: https://github.com/vbrand1984/ob3-vim-syntax

EDIT: I've changed my github username, corrected the link here.

0 Comments
2024/04/24
04:09 UTC

3

Window Position Insanity

I am in LOVE with Openbox, how lean and fast it is, but I have been having maddening issues with just getting windows to open where I want them, and to stay where I want them. I was hoping somebody could offer some help.

I have a 3 monitor setup, left and right are 1920x1080 and middle is 2560x1440. I am launching openbox via .xinitrc with the command: exec dbus-launch --exit-with-session openbox-session

Here are the application rules section from my rc.xml: https://pastebin.com/f0TEZxwt

The Discord rule seems to work. It gets placed consistently on the right monitor where I want it at the right size, confirmed by xwininfo. Confoundingly, the Steam Friend's List rule does not, despite following all the same conventions. Triple checked the window title and class with obxprop. The first rule intended to match any Steam window and put it on the middle monitor also does not work, as all of the non-Friends List Steam windows appear on the left monitor.

I found the documentation kind of unclear when it comes to describing window positions. I can't tell if it wants me to describe it like the Discord rule I have where a monitor number is provided and a relative position on that monitor is used, or if I should forgo the monitor number tag and just supply a "global" position as if all monitors are one big screen. It says the <monitor> tag is used for xinerama setups which my understanding is, that's antiquated and I probably am not using it. Yet the Discord rule has been working so I have been going with that.

Some other strange issues I'm having is that after I manually move the main Steam window to the middle monitor and maximize it, if I then minimize it then restore it, it will not unminimize to the same place. Sometimes it moves a lot, to be almost completely on another monitor and sometimes it only moves a few pixels. I really can't make heads or tails of it. Also if I attempt to drag a Steam window by its "titlebar" (they override OB's decorations) but it isn't focused, it will not drag. They essentially require two clicks to drag this way. One to focus it, then another to start dragging. All other applications can be dragged normally when they aren't focused.

Any help is appreciated. I am happy to post any more config file contents or command outputs for troubleshooting. I just don't know where to go from here or if I should give up hope since openbox itself is kind of antiquated at this point...

1 Comment
2024/04/22
23:33 UTC

3

Keybinding configuration for window tiling / edge snapping

I wanted a light way to be able to tile windows to regions easily. This doesn't do the full job a TWM would do but gets the job done for six unmaximized regions and one maximize, like so:

+---------+---------+
| W-S-Lft | W-S-Rgt |
+---------+---------+    Puts the window in a quarter corner.
| W-C-Lft | W-C-Rgt |
+---------+---------+

+---------+---------+
|         |         |
+ W-Left  | W-Right |    Tiles it left or right. No up or down yet.
|         |         |
+---------+---------+

+---------+---------+
|                   |
+        W-Up       |    Maximizes the window
|                   |
+---------+---------+

I haven't been able to bind the mouse yet, tell me if you have any luck. Here are the lines to put in rc.xml.

<keybind key="W-Left">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>100%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Right">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>100%</height>
        <x>50%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-Up">
      <action name="Maximize"/>
    </keybind>
    <keybind key="W-S-Right">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>50%</x>
        <y>0%</y>
      </action>
    </keybind>
    <keybind key="W-C-Right">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>50%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-C-Left">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>0%</x>
        <y>50%</y>
      </action>
    </keybind>
    <keybind key="W-S-Left">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <height>50%</height>
        <x>0%</x>
        <y>0%</y>
      </action>
    </keybind>

As you can see, I couldn't bind two arrow keys at once to tile windows to corners. This is why i used Shift for Up and Control for Down. This config also overrides window switching with arrow keys, be careful. But it wasn't that useful anyways. If you want a keyboard-only WM, use a TWM.

Hope it helps. This can be especially helpful for laptops, as screen real-estate is limited sometimes.

5 Comments
2024/04/21
17:59 UTC

2

what bar should i use on openbox?

im doing a pink, purple, red, and black theme. i want a light weight bar that is not tint 2 that can have an app launcher on it.

5 Comments
2024/04/20
01:03 UTC

3

I wish to use Openbox standalone, is there a way to get a taskbar on the wm?

6 Comments
2024/04/15
18:24 UTC

1

obmenu-generator gives an errror and doesn't work

This is the error it gives: Can't locate Linux/DesktopFiles.pm in u/INC (you may need to install the Linux::DesktopFiles module) (@INC contains: /home/me/.cpan/build /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /usr/local/bin/obmenu-generator line 35.

BEGIN failed--compilation aborted at /usr/local/bin/obmenu-generator line 35.

I run the latest version of Linux Mint. I do not know much about Linux, can this be fixed easily? I've been searching for a while and copy pasting commands but no luck. I just don't understand what it is saying, but it seems to be about Pearl, which I have no clue what that is, some kind of coding language? I've used Openbox before in the past and this has never happened to me.

1 Comment
2024/04/12
05:49 UTC

2

openbox.org

Hey there!

Can someone please bring me up to speed regarding the official openbox site, which now seems to exclusively hosts "The Canadian Conference on Computational Geometry"?

After many years I was just going to get ready to use openbox on an old laptop, but the vanishing of it's official website pretty much halted my motivation. I'm aware that openbox hasn't been actively developed for a long time, but this seems to be the final nail in it's coffin, isn't it? Someone able to confirm or –hopefully– somehow contradict this?

Thanks!

7 Comments
2024/04/10
13:40 UTC

Back To Top