You are not logged in.

#1 2018-06-13 00:58:16

nwg
Member
Registered: 2018-04-06
Posts: 6

obhud - a Python script for handling laptop-specific keys in Openbox

Hi,

Recently I installed Openbox on older of my notebooks, and fell in love with it. However, I missed visual confirmation of pressing laptop-specific keys, as well as notification on battery and AC status changes. Firstly I used commands & notify-send in key bindings and Tint2 settings, but it didn't look well. In result, I wrote a Python script, which gathers all in several simple commands, and gives slightly gnomish UI. If you (Openbox users) could take a look at the project on GitHub, install the obhud AUR package and give some feedback, I'd be grateful.

Thanks in advance!

Offline

#2 2018-06-30 15:29:31

alfalfa
Member
Registered: 2017-06-30
Posts: 63
Website

Re: obhud - a Python script for handling laptop-specific keys in Openbox

It is indeed an interesting project, I also found the battery manager and volume control feature were kind of lacking for custom DE and decided to make my own. About your code, I would recommend to use the subprocess module rather than os.system as is it deprecated. Also, to make it less invasive, instead of modifying openbox rc file you might want to directly monitor the output of system files, or the output from the acpi package. Great name btw smile

Offline

#3 2018-06-30 20:50:54

nwg
Member
Registered: 2018-04-06
Posts: 6

Re: obhud - a Python script for handling laptop-specific keys in Openbox

Thank you!

alfalfa wrote:

I would recommend to use the subprocess module rather than os.system as is it deprecated.

The script is just a simple replacement to what I had initially written in bash + several enhancements. Surely it may be improved in many ways. Thanks for the suggestion.

alfalfa wrote:

Also, to make it less invasive, instead of modifying openbox rc file you might want to directly monitor the output of system files, or the output from the acpi package.

Well, I find making key bindings a daily routine in Openbox, and also one of its strongest features. The autoconfig options, aimed at lazy people, I added mostly to learn how to parse xml in Python. One can always make it manually smile

Offline

Board footer

Powered by FluxBB