Results 1 to 7 of 7

Thread: Simple lxde lubuntu aero snap with working obkey keyboard editor

  1. #1
    Join Date
    Aug 2005
    Beans
    177

    Wink Simple lxde lubuntu aero snap with working obkey keyboard editor

    Aero snap is actually pretty cool, and I despise Windows so that says a lot for the feature... In lxde / lubuntu its not really available.

    So after scouring the internet again I came up with a pretty cool solution.

    OBKEY is optional if you don't wish to install it you can skip over this section and jump down to the "time for aero snap feature"

    *****

    Editing keyboard shortcuts is easy in lxde with obkey.. however obkey doesn't work out of the box with lubuntu... but a minor tweak gets it going.

    download the best version for you from here or maybe try sudo apt-get install obkey ... it might be in there... depending on your system and repos.

    After install go to your run menu or in the terminal and paste the following

    gksu leafpad /usr/bin/obkey

    find the line

    /.config/openbox/rc.xml

    change it to

    /.config/openbox/lubuntu-rc.xml

    save file and close

    *****

    OK now although obkey is install and working.. we are not actually going to use it to setup aerosnap.... why not? because its a bit too hard to explain but its nice to have and you will use it at the end. (kinda)

    *****

    Time for the aero snap feature

    open run or a terminal and enter the following

    gksu leafpad ~/.config/openbox/lubuntu-rc.xml

    find the line

    <chainQuitKey>C-g</chainQuitKey>

    underneath that line copy and paste the following

    Code:
    <!-- Aero Snap for Openbox Begin Code-->
        <keybind key="W-Left">        # HalfLeftScreen
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>0</y>
            <height>97%</height>
            <width>50%</width>
          </action>
        </keybind>
        <keybind key="W-Right">        # HalfRightScreen
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>-0</x>
            <y>0</y>
            <height>97%</height>
            <width>50%</width>
          </action>
        </keybind>
        <keybind key="W-Up">        # HalfUpperScreen
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>0</y>
            <width>100%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="W-Down">        # HalfLowerScreen
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>-0</y>
            <width>100%</width>
            <height>50%</height>
          </action>
        </keybind>
    <!-- Aero Snap for Openbox End Code-->
    *****Minor update applied so the panel does not cover any portion of the expanded windows, code above has been updated*****


    save and close

    now open up obkey (preferences menu) and you will notice four new entries for the super key and arrows..

    go ahead and close it,,, (obkey is really easy to edit your shortcuts although we really didn't use it in this situation but it is nice to have)

    *****

    Now open run or copy and paste this in the terminal: openbox --restart

    Now how do you use it?? Well you can't drag you windows to a corner and expect them to snap in place... It won't work but what you can do is pretty sweet even though it manual

    Select any window and hold the super key (windows key) and press either left, right, up or down...

    and you'll get the hint immediately..

    work very well,

    ad no extra bloat to the system either..

    enjoy.



    *****
    I will be providing a series of easy solutions and linking to them below

    lxde simple weather

    lxde wallpaper changer
    expose feature for lubuntu
    Last edited by ronniew; October 26th, 2012 at 10:53 AM.

  2. #2
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,496
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Simple lxde lubuntu aero snap with working obkey keyboard editor

    Quote Originally Posted by ronniew View Post
    ...
    Now open run or copy and paste this in the terminal: openbox --restart
    ...
    I use
    Code:
    openbox --reconfigure
    de gustibus et coloribus non est disputandum -- Wiktionary

  3. #3
    Join Date
    Aug 2005
    Beans
    177

    Re: Simple lxde lubuntu aero snap with working obkey keyboard editor

    did openbox --restart not work? if not I'll change the above instruction to what you used.

  4. #4
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,496
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Simple lxde lubuntu aero snap with working obkey keyboard editor

    Quote Originally Posted by ronniew View Post
    did openbox --restart not work? if not I'll change the above instruction to what you used.
    Sorry, I never tried that. It just so happened that I've usually seen the code I use recommended to get changes to lubuntu-rc.xml to take effect and have been using that. Maybe the two are equivalent?

    One more point, I've been messing with various things in Lubuntu 12.10 to get things the way I want and haven't yet needed to install obkey.
    de gustibus et coloribus non est disputandum -- Wiktionary

  5. #5
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    5,496
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Simple lxde lubuntu aero snap with working obkey keyboard editor

    This is what openbox --help has:
    Code:
    [06:13 PM] ~ $ openbox --help
    Syntax: openbox [options]
    
    Options:
      --help              Display this help and exit
      --version           Display the version and exit
      --replace           Replace the currently running window manager
      --config-file FILE  Specify the path to the config file to use
      --sm-disable        Disable connection to the session manager
    
    Passing messages to a running Openbox instance:
      --reconfigure       Reload Openbox's configuration
      --restart           Restart Openbox
      --exit              Exit Openbox
    
    Debugging options:
      --sync              Run in synchronous mode
      --startup CMD       Run CMD after starting
      --debug             Display debugging output
      --debug-focus       Display debugging output for focus handling
      --debug-session     Display debugging output for session management
      --debug-xinerama    Split the display into fake xinerama screens
    
    Please report bugs at http://bugzilla.icculus.org
    BTW, both "UnmaximizeFull" and "Unmaximize" seem to work equally well. Do you know of any difference that may be significant?

    Since Lubuntu 12.10 has Openbox 3.5, I was searching for documentation for 3.5, but most of what I found is for 3.4.

    Edit: It was 3.5. For some reason, I thought it was 3.4
    And 3.5 has Unmaximize rather than UnmaximizeFull and that seems logical to me.
    Last edited by vasa1; October 26th, 2012 at 02:00 PM.
    de gustibus et coloribus non est disputandum -- Wiktionary

  6. #6
    Join Date
    Jun 2011
    Beans
    47
    Distro
    Lubuntu

    Re: Simple lxde lubuntu aero snap with working obkey keyboard editor

    Thank you for the guide, waiting patiently for this to be published on http://lubuntublog.blogspot.com/p/tips-tricks.html

    One question: Is it possible to restore a snapped window to its original size and position, or just any size but place it in the center of the screen instead?

  7. #7
    Join Date
    Oct 2009
    Beans
    25

    Re: Simple lxde lubuntu aero snap with working obkey keyboard editor

    Quote Originally Posted by vanlong441 View Post
    Thank you for the guide, waiting patiently for this to be published on http://lubuntublog.blogspot.com/p/tips-tricks.html

    One question: Is it possible to restore a snapped window to its original size and position, or just any size but place it in the center of the screen instead?
    I think this is not possible, using this trick, as LXDE doesn't really recognize the "snapped left" as another STATE, it sees it the same as if you had manually moved it there, so there's nowhere to restore to. I assume the other wm's are maintaining two states for each window (snappedOrMaxed, userState) so you can go between the two... Once you use this method it is as if you have dragged the window there with your mouse...

    This is a far from perfect solution, but I added another keybinding using the author's method, that makes a 50%x50% window somewhere close to the middle of the screen.

    <keybind key="W-space "> # middleScreen
    <action name="UnmaximizeFull"/>
    <action name="MoveResizeTo">
    <x>500</x>
    <y>300</y>
    <height>50%</height>
    <width>50%</width>
    </action>
    </keybind>

    It isn't perfect, but on my resolution it's not too bad.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •