27 responses to “Snap Windows to Sides like Windows 7 Using Compiz”

  1. Stephen Boggs

    Nuts. It didn't work. I'm a "newbie" at this so I probably need to look for extremely detailed directions. Thanks though! Good practice for me working in the Terrifying Terminal. :-)

    1. Travis

      did you run the first command to get compiz? It didn't work for me at first, I already had compiz, so I didn't do the first command. So I done everything else, and it didn't work. So I ran the first command, and the only thing that it installed was "wmctrl", so your probably missing "wmctrl". So just run sudo apt-get install compizconfig-settings-manager wmctrl, it will say only wmctrl needs to be installed, then it should work, like mine.

  2. dustin

    Yep, did not work here either. Not sure is it has something to do with another compiz setting

    1. m6arate

      did you check that you changed the mouse ID correctly (for all 3 scripts)? I set the values for my laptop touchpad, and it works there, but when I plug in a USB mouse it doesn't work. (as I would expect)

      1. coral

        Why is mike's MOUSE = "11", is it zero-indexed…I have id = 11, so should I put MOUSE = "10"?

    2. Travis

      did you run the first command to get compiz? It didn't work for me at first, I already had compiz, so I didn't do the first command. So I done everything else, and it didn't work. So I ran the first command, and the only thing that it installed was "wmctrl", so your probably missing "wmctrl". So just run sudo apt-get install compizconfig-settings-manager wmctrl, it will say only wmctrl needs to be installed, then it should work, like mine.

  3. sukiminna

    i dont think grid plugin is exactly the same since you have to press certain keys to get it done.
    this snap windows to side works jus by dragging a windows to side of screen.

    btw i tried this. works fine
    thanks mike

  4. sukiminna

    i post a video of it in action. check it out :)
    http://www.youtube.com/watch?v=WywdLQAoZ5g

  5. Tom

    Another noob here. I really need help trying to use ubuntu 10.04.It works great off the live cd.I can download my broadcom drivers and get online,so I installed ubuntu over windows. Everything BUT my wireless works and I can't download the drivers .Besides hardwiring my laptop to go online, is there anything else I can do?

  6. Tom

    Sorry about being off subject, mybad.

  7. Sajib

    Do you know how to import :P the effect that is seen each time a window is open/closed in windows 7?

  8. maycatdecal

    I'm vietnamese very excited to be familiar with you and I like to learn many things from the you.

  9. CallicoJack

    Thanks! Great tutorial! It’s very useful on my enormous wide-screen monitor.

    One mistake…what is “cd mkdir .scripts cd .scripts”? It was pretty obvious to me what this was supposed to do, but it could be giving some Linux-inexpierenced people problems. So for them…

    Should be (from your home directory, which is where you’ll probably be by default when you open your terminal):

    mkdir .scripts

    (This creates a folder called “.scripts”…same as opening your file manager, right-clicking, and clicking on “Create New Folder”, and naming the new folder “.scripts”. Starting a folder or file name with a dot (.) makes it “hidden”. Then…)

    cd ./.scripts

    (“cd” to change directory, just like clicking on a folder in your file manager. But first you’d have to press CTR H, or click on “Show Hidden Files” in the “View” menu, or you won’t see it, since it starts with a “.” and is therefore hidden. “./” is for whatever directory you’re currently in, so if you’re in /home/Myusername, typing “./.scripts” is the same as typing “/home/Myusername/.scripts”.)

    If you’re having trouble, just make sure you followed the steps correctly…make sure you have the necessary packages (software) installed, make sure the commands did what they were supposed to…

    I was very confused when the right snap would work, but not the left. Until I opened the script file and saw that it was a blank page. Guess I forget to save it. Oops! The same thing would happen if missed a key a misspelled the file name somewhere along the line, or something like that.

  10. CFX

    Hi thanks Great work.
    but only the left side snap not working plz help

  11. Tokin

    Change the following in the left sh file
    if [ "$(/usr/bin/X11/xinput --query-state $MOUSE | grep "valuator[0]=." | sed s/"valuator[0]="//)" -le 10 ]

    to:

    if [ "$(/usr/bin/X11/xinput --query-state $MOUSE | grep "valuator[0]=." | sed s/"valuator[0]="//)" -ge $TEMPWIDTH ]

    1. shugo

      Using mouse ID for touchpad right snap worked but not top and left. Using mouse ID for USB mouse right and top snap worked but left still failed. This change didn't help in either case. Initially I thought the left or top panel might interfere with the script, however moving the left panel to right didn't alter the situation. It seems like more people have problem with left snap. Will you be looking into this more carefully?

      In anycase, I enjoy right and top snaps. Many thanks!

  12. Deepak

    One small step for man, one giant leap for Ubuntu…

    Great step-by-step tutorial. It works perfectly for me (Ubuntu 10.10 )

  13. Ubuntu Tips « other tongue

    [...] 7-like snapping windows to half/full screen size: http://www.mikesubuntu.com/2010/06/snap-windows-to-sides-like-windows-7-using-compiz/I have tried this on Ubuntu 10.10, and it works beautifully. GA_googleAddAttr("AdOpt", "1"); [...]

  14. schwiz

    worked great for me on 10.10 except since I have two monitors the snap takes up more than half of the screen. Trying to find the documentation I need to edit the scripts to fix this. Snap to top works perfect with two monitors though!

  15. zeddock

    Same here. Two monitors. What options do we have?

  16. Krymz

    I'm having the problem with dual monitors also.

  17. zilporcal

    Is there a way to set multiple values for the mouse ID in the scripts? I'm on a laptop, so I have the track pad, plus a USB mouse and a graphics tablet. I have it set to the mouse because I use that most often, but it'd be nice if it worked for all three.

  18. John

    The snap on the right side works fine. But the max and left side wont work. I am using Ubuntu 10.10 on an Acer Aspire 5534.

    Thanks in advance.

  19. Thorion

    I tried doing this on Fedora 14 x84_64. Only notable change was that when I installed xinput, it didn't place it in /usr/bin/X11/xinput. So, I opened each script with gedit and replaced all instances of "/usr/bin/X11/xinput" with just "xinput". It works great now, thanks a lot!

  20. Windows 7 to Ubuntu 11.04: Prologue – Part II « The Geek Chronicle
  21. Windows 7 to Ubuntu 11.04: Prologue – Part II | Geek Chronicle
  22. Alexandre

    Class! Like a boss! Simply worked perfectly. Thank you!

Leave a Reply

CommentLuv badge