Shell – KDE – Open a window in the center of the screen

kdekde-plasma-5kde-plasma-workspacekonsoleshell

Is it possible to open a window in KDE using a command line (similar to the example below) in the center of the screen? If yes, is it possible set this independently of the screen size?

Example:

konsole --hide-tabbar --hide-menubar -p "TerminalColumns=104;TerminalRows=25" -e 'htop'

Thanks!

Best Answer

Your best bet is to use the KWin facilities:

right click the title bar of your window, select More Actions > Special Window Settings > Size and Position and farkle about a bit.

For example, I bet that

Initial Placement > Force > Centered

 will do exactly what you wish.

There probably are commands to do this from the command line, but I'll have to defer to someone else in that regard.

Cheers, Andy

Related Question