2

Whenever I use my shortcut to open the home folder it's always positioned at the bottom left of my screen as shown below.

Bottom left

How can I open it in such a way that it would pop up in the center like this?

Center

Jacob Vlijm
  • 83,767
  • Can we just go to ccsm and change how the window is placed? – diamondburned Apr 02 '17 at 11:31
  • Hi theAnsweris3, did you notice the answer? – Jacob Vlijm Apr 03 '17 at 09:49
  • 4
  • see suggested duplicate, specifically accepted answer. Ubuntu uses compiz to manage windows and there are plugins for that. – Sergiy Kolodyazhnyy Apr 03 '17 at 12:47
  • @SergiyKolodyazhnyy yeah, kind of a dupe, but just not exectly. The answer there fits that question + this one, but not every answer to this question is an answer to that one, hence no exact dupe, this one only asks for one specific situation, and not everyone will want to install ccsm for that. – Jacob Vlijm Apr 03 '17 at 13:11
  • @JacobVlijm procedure for setting up placement and sizing for windows is exactly the same, and answers are made general enough. On the other hand, what is the difference between installing xdotool and ccsm ? Either tool is not in default Ubuntu installation, so "not everyone will want to install ccsm for that" isn't a good argument in this case - user still has to install something. On the other hand, ccsm has advantage in the fact that the tool is specific for Ubuntu, so it would be a far better fit for a solution than xdotool – Sergiy Kolodyazhnyy Apr 03 '17 at 13:28
  • @SergiyKolodyazhnyy I guess I don't need to mention ccsm is a much more sensitive tool then xdotool. I didn't try this one, but many ccsm settings add processor load, while the answer below adds nothing at all. The fact that we are even discussing it proves we don't have an exact dupe here. The only question we have to ask ourselves is if every possible answer here fits the one you mention to be a dupe. It doesn't. Even the one below doesn't. Let's move this discussion to chat if you like further discussion. – Jacob Vlijm Apr 03 '17 at 15:55
  • 1
    @JacobVlijm Unless you have any serious proof, I consider your claim that ccsm adding processor load is empty. I personally run multiple compiz pluginz and never there's been high usage from a compiz process. I don't see what you mean by the fact that ccsm is "sensitive" either. There's plenty of other posts which ask about window placement, which also mention ccsm's plugin, which testifies to the fact that people use it perfectly fine without issues. xdotool doesn't have any issues either, but I don't see your reason to attack ccsm. – Sergiy Kolodyazhnyy Apr 03 '17 at 17:34
  • Does it only happen when opening by using shortcut or happen even when you click the icon? – Anwar Apr 05 '17 at 15:49

2 Answers2

1

The simplest, pragmatic solution

To make sure the window always appears on the same poissition, create a shortcut to get it done:

  1. Install xdotool, to position the window:

    sudo apt install xdotool
    
  2. Add the following command to a keyboard shortcut:

    /bin/bash -c "nautilus ~ && sleep 0.5 && xdotool getactivewindow windowmove 300 300"
    

    Where you need to replace 300 300 by the actual position (x/y) where you want the window to appear: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command above to a shortcut you like.

    enter image description here

Note

This works nicely, but there is a small chance that if your system is heavily occupied, the window will not appear in time so the xdotoolcommand will run in vain. Writing a separate script to prevent this from happening once a year seems overkill though in this situation.

Jacob Vlijm
  • 83,767
1

Window placement is handled by compiz in Unity and to fine control it's behaviour, you need to install ccsm or compizconfig-settings-manager.

Install it with this command

sudo apt-get install compizconfig-settings-manager

Open it and go to Place windows plugin page. Under the section Placement mode select Centered to have the desired effect.

The default selection is smart I think. You can also try Cascade which is the default case in Windows systems afaik.

window placement settings image

Anwar
  • 76,649