1

Like 98% of the time I open a Terminal or Nautilus, I want to use it snapped to the right/left... especially if I am using more than one instance of them.

Can I configure my Ubuntu to open any instance of Nautilus or Terminal in 'snapped' mode?

I am using Ubuntu 15.10.

5
  • It seems to kinda solve my problem, but it also appears to be a little to much or me. Since Ubuntu is already capable of positioning a window as snapped left or right why do I have to use different code. What does Ubuntu use in the background if I use CTRL+Windows+Left/Right. Can I extend this script with this utilized routine. Nov 28, 2015 at 11:41
  • Most likely not, since the commands are not available as separate "external" command line options of Unity or Compiz. You could simulate the key combination when the window appears, but it would still need a script to wait for the window and synchronize it , and it would be too dirty imo, since it would snap the wrong window if you switch windows in between. Nov 28, 2015 at 11:47
  • Yeah that's what I am currently struggling with, too.. Nov 28, 2015 at 11:52
  • The script is not the problem, synchronizing neither. Dirty or not, give it a shot? Nov 28, 2015 at 11:56
  • The little thing the text mentioned about a little offset between the borders and the actual windows may drive me crazy, but I will give it a shot... Nov 28, 2015 at 12:04

2 Answers 2

1

What you could use is the -geometry option for nautilus shortcut.

For instance, I could set Super+E (which is same as Windows shortcut for opening "My Computer" ) to nautilus --geometry 250x250+0+0 . The geometry option is defined in man X page as WIDTH+HEIGHT+XOFFSET+YOFFSET. +/- can be used and man page defines the corners as:

+0+0 upper left hand corner.

-0+0 upper right hand corner.

-0-0 lower right hand corner.

+0-0 lower left hand corner.

With terminal , that's a little different because gnome-terminal treats geometry option as in rows by columns. So gnome-terminal--geometry="250x250+0+0"` will open a window that is just horribly large.

What you also could do is to alter the .desktop files in /usr/share/applications folder, particularly the Exec= line to have the geometry option, so that launcher icons also can spawn windows with specific size

1
  • In addition on a 1902x1080 display, I found gnome-terminal --geometry 101x56+0+0 to be the perfect fit Nov 30, 2015 at 13:54
0

You could install the Compiz Config Settings Manager:

sudo apt-get install compiz-config-settings-manager

Run it from Dash and then under the Window Manager heading you should find options that let you customize how you want to mange your windows.

Not the answer you're looking for? Browse other questions tagged .