Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Window snap aka 11.04 in 10.04

  1. #1
    Join Date
    Jan 2011
    Beans
    12
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Window snap aka 11.04 in 10.04

    Good time of the day fellow Ubuntu users. I'm wondering if there's any way to get the "window snap" feature in 10.04, i.e. so that windows resize to half-width-full-height when you touch the edge of the screen with the cursor while dragging a window (but not just when you do the latter)? It doesn't seem like that's a Unity specific feature in 11.04. I was messing with it earlier today and snap still worked in gnome when I installed it. Is there a separate package for snap I can install in 10.04?
    Thank you.

  2. #2
    Join Date
    Sep 2009
    Beans
    8,874
    Distro
    Ubuntu Development Release

    Re: Window snap aka 11.04 in 10.04

    Quote Originally Posted by InTheNameOfDelicious View Post
    Good time of the day fellow Ubuntu users. I'm wondering if there's any way to get the "window snap" feature in 10.04, i.e. so that windows resize to half-width-full-height when you touch the edge of the screen with the cursor while dragging a window (but not just when you do the latter)? It doesn't seem like that's a Unity specific feature in 11.04. I was messing with it earlier today and snap still worked in gnome when I installed it. Is there a separate package for snap I can install in 10.04?
    Thank you.
    Argh captain here yee be.
    http://www.omgubuntu.co.uk/2009/11/g...nap-in-ubuntu/





  3. #3
    Join Date
    Jan 2011
    Beans
    12
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Window snap aka 11.04 in 10.04

    Sorry, this doesn't earn you a peace of mein cake.
    That's just a work around with ccsm. I tried it, and only the maximization part worked; the 1/2 width doesn't. Also, with this it would run the command on the active window every time I hold the cursor near the edge. What I'm wondering about is what they use in 11.04. That works even without ccsm installed. I thought that may be a stand alone program.

  4. #4
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: Window snap aka 11.04 in 10.04

    Quote Originally Posted by InTheNameOfDelicious View Post
    Sorry, this doesn't earn you a peace of mein cake.
    That's just a work around with ccsm. I tried it, and only the maximization part worked; the 1/2 width doesn't. Also, with this it would run the command on the active window every time I hold the cursor near the edge. What I'm wondering about is what they use in 11.04. That works even without ccsm installed. I thought that may be a stand alone program.
    Even without ccsm installed compiz itself is used in 11.04, ccsm is only a settings manager for compiz.

    The grid plug-in is used in 11.04, you can enable it in 10.04 as well, but you are restricted to using the keypad controls only as there is no edges tab in 10.04.

    From the same source as linked by wilee-nilee, I had to work on the commands, copying from the webpage apparently changes some of the symbols. Using the comments at the bottom of the page, I adjusted them to get the 2 commands working you are having problems with. I posted the commands in a code box --here-- , the code box should keep the symbols correct for you to compare them with. Actually I think I may have copied the commands from one of the commenters there, not the code posted at the top.

    You are correct about the active window and the edge running the command when you don't mean to. Also if you get that working, try clicking the desktop to take the focus off any window then try out both the edges, you can get some mighty strange effects running with the desktop cube in use as well . Check out the attached screenshot for one of the weird effects it causes. The second screenshot is what it should be like without an edge activated.

    Not a real good solution, but it seems to be that or keypad only use with the grid plugin for 10.04.

    Edit: one extra idea I use with the link from wilee-nilee, is rather than using the edges and the top, I use the four corners instead (I needed an extra "edge" for the fourth command I added to the other UF post above for returning a maximized window to its previous state). Also I don't mention the edges in that link as the OP there only asked about key combinations. This may help a bit with the accidental edge activation you note.
    Attached Images Attached Images
    Last edited by yetiman64; May 9th, 2011 at 01:38 AM. Reason: more info

  5. #5
    Join Date
    Nov 2008
    Location
    Melbourne
    Beans
    167

    Re: Window snap aka 11.04 in 10.04

    Assuming you have grid installed. Then just sudo apt-get install xautomation.

    Put commands in ccsm commands section (preferred) or keyboard shortcuts like:

    xte 'keydown Control_L' 'key Left' 'keyup Control_L'

    For this I have window resize to left half in grid as key combination of ctrl + left.

    xte is in xautomation package and allows automatic imitation of keypresses. http://manpages.ubuntu.com/manpages/...an1/xte.1.html

    What I love about this is you can also still have dragging windows between workspaces still set.

    Cheers

  6. #6
    Join Date
    Nov 2008
    Location
    Melbourne
    Beans
    167

    Re: Window snap aka 11.04 in 10.04

    If you don't have grid installed just install package:

    compiz-fusion-plugins-extra

  7. #7
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: Window snap aka 11.04 in 10.04

    Quote Originally Posted by excetara2 View Post
    If you don't have grid installed just install package:

    compiz-fusion-plugins-extra
    Actually I forgot the grid plugin is in the extra package, thanks excetara2. I have that installed here and by activating the grid plugin I already have CTRL + ALT + <KP#> control of the active window.

    ctrl+alt+kp4 sends the active window to the left half screen.
    ctrl+alt+kp6 sends the active window to the right half screen. and so on down the list.

    What I am wondering is what does the xautomation package actually do? Is it to reassign the key combination to a simpler one only, or does it have some other use ?

    You are right, you can use both the grid and the commands plugins for this together.

  8. #8
    Join Date
    Nov 2008
    Location
    Melbourne
    Beans
    167

    Re: Window snap aka 11.04 in 10.04

    xautomation installs a package for automation of controlling X. In laymen terms, basically xte simulates the keypress even though your not actually doing it. Through the commands this keypress that causes grid to resize the screen can be binded to an edge binding. I find this a lot more stable or I like the way it works better than the wmctrl option. Both work. Here is a more advanced description of xautomation:

    Control X from the command line for scripts, and do "visual scraping" to
    find things on the screen. The control interface allows mouse movement,
    clicking, button up/down, key up/down, etc, and uses the XTest extension so
    you don't have the annoying problems that xse has when apps ignore sent
    events. The visgrep program find images inside of images and reports the
    coordinates, allowing programs to find buttons, etc, on the screen to click
    on.

  9. #9
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: Window snap aka 11.04 in 10.04

    Quote Originally Posted by excetara2 View Post
    xautomation installs a package for automation of controlling X. In laymen terms, basically xte simulates the keypress even though your not actually doing it. Through the commands this keypress that causes grid to resize the screen can be binded to an edge binding. I find this a lot more stable or I like the way it works better than the wmctrl option. Both work. Here is a more advanced description of xautomation:

    Control X from the command line for scripts, and do "visual scraping" to
    find things on the screen. The control interface allows mouse movement,
    clicking, button up/down, key up/down, etc, and uses the XTest extension so
    you don't have the annoying problems that xse has when apps ignore sent
    events. The visgrep program find images inside of images and reports the
    coordinates, allowing programs to find buttons, etc, on the screen to click
    on.
    Ok, thanks, I will try this out and experiment a bit.

  10. #10
    Join Date
    Nov 2008
    Location
    Melbourne
    Beans
    167

    Re: Window snap aka 11.04 in 10.04

    To answer the other part. With the Grid plug-in installed, you can change the key bindings within the Grid plug-in. You don't need an external plug-in to do this. I just preferred the Ctrl+left and Ctrl+right. This is one of my most used commands because I have dual screens. Obvi edge bindings don't work on the inside edges.

    Side Note:
    If you keep doing the command in grid, it resizes 1/2 then 1/4 then 3/4. If I'm coding python or something where want access to terminal to run scripts. I'll do a 1/4 terminal and 3/4 program often.

Page 1 of 2 12 LastLast

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
  •