Obhud (Openbox HUD) for laptop users

Soon after I started using Openbox instead of GNOME, I missed the way GNOME handles laptop-specific keys (volume/brightness up/down, touchpad on/off, switching primary/secondary display). As well the keys usage, as battery low/full and AC connected/disconnected events are being followed by lovely graphical confirmations. That’s why I wrote the obhud Python script. It provides commands to use in key bindings and also in Tint2 battery-related commands, which execute required actions and display confirmations.

The most important commands:

obhud --volume {up} | {down} | {toggle}
obhud --brightness {up} | {down}
obhud --battery {low} | {LOW} | {full}
obhud --ac {connected} | {disconnected}
obhud --touchpad {on} | {off} | {toggle}
obhud --autoconfig {keys} | {tint2} | {all}
obhud --screens {switch} | {switchv} | {single} | {clone} | {right} | {left} | {above} | {below} | {detect}

By just typing $ obhud you’ll access the simple menu:

“Autoconfig” options allow to automate assigning keys in rc.xml and battery commands in Tint2 (default ~/.config/tint2/tint2rc file only). Today I tested them with my ArchLabs installation, and it seems everything went not any worse than on my Arch-powered machine.

You’ll find the project on GitHub. Do not forget to take a look at Wiki. The obhud package you’ll find in AUR.


Wow! Awesome addition. Good work.

1 Like

Top job @nwg



No problem @nwg . Keep it on.

Hope someone will start using it at last. :slight_smile: So far I’ve had a single feedback, since the very beginning - a false bug report.

0.2.2-1: Last night, on a fresh AL installation, I came across a crash caused by unexpected xrandr behaviour. Though I was unable to make it happen tonight, I added a workaround, which hopefully should prevent the script from crashing if it happens to someone else.

Hopefully it s ok now !

Hi @nwg, using obhud means a lot for me, thank you!

After obhud stopped working i found out that unfortunately it can’t do anything as long a folder ~/tmp exists, as it seem to need a file ~/tmp:

% obhud 11:46:51
/bin/sh: /home/entr0py/tmp: Is a folder.
Traceback (most recent call last):
File “hud.py”, line 162, in
File “hud.py”, line 55, in main
File “/usr/lib/python3.7/site-packages/obhud/commands.py”, line 253, in check_dimensions
values.screen_dimensions = measure_screen()
File “/usr/lib/python3.7/site-packages/obhud/commands.py”, line 238, in measure_screen
resolution_string = open(values.tmp, ‘r’).read()
IsADirectoryError: [Errno 21] Is a directory: ‘/home/entr0py/tmp’

1 Like

Good point! The file name could’ve been more specific. :smiley: I’ll change it and publish AUR update tonight. Thanks for the bug report!

1 Like

@entr0py 0.2.3-1 in AUR. Hope I did not screw up anything. :smiley:

~/tmp file replaced with ~/obhud-tmp

1 Like

Thanks, that’s fast!

All fine :smiley:


Thanks again for pointing out the issue.

On my Dell Latitude E6430 with ALPS/PS2 touchpad I use obhud and itś great!!
I have one problem though. I can not get synaptics to work properly. Disable touchpad while typing is one example and I see i in Arch-wiki that synaptics is not maintained anymore and here comes the real problem. When I uninstall synaptics I see that it is a dependency to obhud. Is that possible to change to libinput instead?


I need to take a closer look at this, which will be possible when I’m back home (tomorrow). Thanks for reporting the issue!

1 Like

This seems not to be easy. With synaptics, to turn touchpad on/off, we just need:

touchpad_on = synclient TouchpadOff=0
touchpad_off = synclient TouchpadOff=1

With libinput, after Arch Wiki:

To disable the touchpad, first get its name with xinput list and then disable it with xinput disable name .

First, we would have to parse an output similar to this:

[piotr@asuspro ~]$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ DaKai 2.4G RX Consumer Control          	id=13	[slave  pointer  (2)]
⎜   ↳ DaKai 2.4G RX Mouse                     	id=14	[slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                	id=18	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Asus Wireless Radio Control             	id=7	[slave  keyboard (3)]
    ↳ Video Bus                               	id=8	[slave  keyboard (3)]
    ↳ Video Bus                               	id=9	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=10	[slave  keyboard (3)]
    ↳ DaKai 2.4G RX                           	id=11	[slave  keyboard (3)]
    ↳ DaKai 2.4G RX System Control            	id=12	[slave  keyboard (3)]
    ↳ USB Camera: USB Camera                  	id=15	[slave  keyboard (3)]
    ↳ Asus WMI hotkeys                        	id=16	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=17	[slave  keyboard (3)]
    ↳ DaKai 2.4G RX Consumer Control          	id=19	[slave  keyboard (3)]

Furthermore: the command xinput enable 'ETPS/2 Elantech Touchpad' doesn’t seem to work for me.

If you’d like to get rid of synaptics, and still have obhud on your machine, you’d need a package built for your personal use, w/o synaptics in dependencies. You’d also have to edit ~/.config/obhud and redefine touchpad_on and touchpad_off variables.

Let me know if you need help at building the package.

Hi and sorry for the delay!
I have been very busy and one of the things I have been doing is researching touchpads. My son’s girlfriend sold her old computer to me for 30 bucks! HP ProBook 640 G1. 8GB ram, haswell, 256GB SSD. The reason she sold it was that it is not possible to upgrade to Windows 10 . (it’s always a good thing not to have that problem!)
To make touchpad work well for me (old mac-idiot) synaptics seems to be a must (even if it’s standstill with dev.) So do not work your eyes out for my account! The HUD is a great tool for linux-laptop-users! Thank you!!



Not bad! My daughter’s boyfriend bought a powerful gaming machine recently. I must ask if he’s got a good offer for me. :wink:

Very well. However, I’ll take a look at the code. It would be not bad to make a GTK+ version for sway / Wayland. [edit] No idea why I used to think it didn’t work with sway. :slight_smile:

This “new” laptop (took it with me to work!) is great! The only limit is space. (256 GB SSD). It’s really quick according to my standards!
Booting in 5 sec.



My main drive is 240 GB SSD, and I still have 117 GB of free space. Another disk is 1 TB HDD, but I only use it for backups and testing partitions (ArchLabs, Void, Debian). I put into the place of the DVD drawer.

1 Like