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.

  • 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. – Daniel Hitzel Nov 28 '15 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. – Jacob Vlijm Nov 28 '15 at 11:47
  • Yeah that's what I am currently struggling with, too.. – Daniel Hitzel Nov 28 '15 at 11:52
  • The script is not the problem, synchronizing neither. Dirty or not, give it a shot? – Jacob Vlijm Nov 28 '15 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... – Daniel Hitzel Nov 28 '15 at 12:04

2 Answers2

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

Sergiy Kolodyazhnyy
  • 103,293
  • 19
  • 273
  • 492
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.