• Script for handling laptop-specific keys in Openbox


    Hi! Recently I’ve fallen in love with Openbox, and spent a lot of time on tuning and tweaking. The only thing I couldn’t achieve was binding the keys and events typical to laptops/netbooks to commands and notifications. I tried executing commands and sending notifications with rc.xml key bindings and Tint2 settings, but I kept dreaming of a system I got used to on GNOME, which I use on my main machine.

    Finally I wrote a Python script which gives quite similar user experience:

    0_1528762011767_preview1.png

    If Openbox lovers are still here, I’d like to ask for help at testing, before pushing it to AUR. Although it works well on my netbook, I might have e.g. forgotten of some dependencies or made other mistakes. Could anybody help?

    You’ll find more info and the script itself on my GitHub.

  • I bet, editing posts still doesn’t work? Just wanted to tell you that the script is already available as the obhud AUR package.

  • @piotr Because i am not so happy with the Openbox in Antergos i am playing and testing Openbox in Archlabs. Learned a lot of Openbox and DE’s in general while playing with it. Using Gnome most of the time for now.

    But soon vacation starts and then i will put some time again in Openbox again because i like it more. Then i will check then your script.

    p.s.: No, editing a post stopt working some months ago.

  • @bartatantergos said in Script for handling laptop-specific keys in Openbox:

    Because i am not so happy with the Openbox in Antergos i am playing and testing Openbox in Archlabs. Learned a lot of Openbox and DE’s in general while playing with it. Using Gnome most of the time for now.

    Well, I built my netbook OS on vanilla Arch and bare-bones Openbox, but later I took a look at Antergos Openbox and liked most of stuff it used. Most of packages were the same as I had chosen myself. I even stole the openbox-menu settings and I’m happy with my dynamic menus. I’d only replace kalu, which is not to my taste, with either pamac, or the script I mentioned here. And of course I’d add obhud. At the moment my main machine, which runs GNOME, and my netbook look and behave like twin brothers. 🙂

  • I thought it would be good to add some configuration to the script. Check details on GitHub.

  • @piotr said in Script for handling laptop-specific keys in Openbox:

    The only thing I couldn’t achieve was binding the keys and events typical to laptops/netbooks to commands and notifications.

    obkey is a GUI interface for adding keybindings…

    Portergos site
    https://github.com/Portergos/portergos-iso

    Still in love with Antergos (default OS)
    I3wm

    Linux newbie since 06/2016

  • @fernandomaroto said in Script for handling laptop-specific keys in Openbox:

    obkey is a GUI interface for adding keybindings

    The problem was not the tool, either graphical or not, but the lack of commands to produce a good looking output. Please have a glance at the description.

  • @piotr said in Script for handling laptop-specific keys in Openbox:

    @fernandomaroto said in Script for handling laptop-specific keys in Openbox:

    obkey is a GUI interface for adding keybindings

    The problem was not the tool, either graphical or not, but the lack of commands to produce a good looking output. Please have a glance at the description.

    Sorry, i was trying to read all (unread) posts in a hurry (there was 40 or more here)
    I thought you were looking for a package, not that you made your own to fit you needs.

    Finally I wrote a Python script which gives quite similar user experience

    Congratulations for your work.

    Portergos site
    https://github.com/Portergos/portergos-iso

    Still in love with Antergos (default OS)
    I3wm

    Linux newbie since 06/2016

  • @fernandomaroto said in Script for handling laptop-specific keys in Openbox:

    Congratulations for your work.

    Thank you! 🙂 Hope someone else will find it useful, too.

  • obhud --touchpad {on} | {off} | {toggle} command added in the 0.1.2-1 version.

  • I’ve just added the --autoconfig options. Use if you’d like obhud to modify config files automagically.

    0_1529709685460_obhud-autocofig.png

    More info here

  • New in 0.1.4 version: switching primary / secondary display:

    Several new commands allow to switch your primary/secondary display setup horizontally or vertically.

    To assign them to keys automatically please re-run obhud --autoconfig keys. This will create 2 keybindings in the rc.xml file:

    Displays key (Super-P equivalent) -> obhud --screens switch

    • switches horizontally in order: single screen -> clone screens -> secondary display right -> secondary display left.

    Shift-Displays key (Shift-Super-P equivalent) -> obhud --screens switchv

    • switches vertically in order: single screen -> clone screens -> secondary display above -> secondary display below.

    Each key press will display a graphical notification similar to this:

    0_1531609042253_a9d25570-4d37-4d3c-b069-ad5ea3572646-image.png

    Note: it makes sense to add a command like obhud --screens right (change to match your preferred setup) to your autoconfig file. In case the secondary display is currently detached, the single setup will be chosen automatically.

    Take a look at Wiki to customize keys to your taste.

  • This post is deleted!
  • New in 0.1.8 version:

    Timer/Stopwatch added. Running obhud --autoconfig tint2 required to add the Tint2 executor.

    This feature creates the executor to display a tiny Timer or Stopwatch directly in the Tint2 panel. Click the executor:

    0_1535282428034_timer-not-set.png

    This will display a simple dialog window:

    0_1535282470483_timer-gui.png

    Click Stopwatch to start the stopwatch:

    0_1535282486360_timer-stopwatch.png

    or enter time and click Start timer:

    0_1535282508942_timer-running.png

    Click Clear&Close to abort current timer / stopwatch.

    When the Timer stops counting down, you’ll hear the alarm sound and see the notification:

    0_1535282520930_timer-alarm.png

    More here: AUR | Github | Wiki

openbox39 keys11 handling1 laptop-specific1 Posts 14Views 477
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.