NimbUx
Posts: 215
Joined: Fri Jan 03, 2020 10:33 am

[SOLVED] Control terminal window from Bash command line ?

Sun Aug 09, 2020 5:21 pm

Under RaspiOS+LXDE+Terminal+Bash : do we have a command (Bash-internal or otherwise) to minimise/iconify the current terminal window ?
Similarly command lines that would maximise, (un)roll, restore the terminal window? Or even move/size/position the window at set coordinates (x,y) and size (W,H) ?

Thanks...
Last edited by NimbUx on Mon Aug 10, 2020 10:49 am, edited 1 time in total.

trejan
Posts: 2327
Joined: Tue Jul 02, 2019 2:28 pm

Re: Control terminal window from Bash command line ?

Sun Aug 09, 2020 5:22 pm

xdotool will do what you want.

User avatar
scruss
Posts: 3325
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Control terminal window from Bash command line ?

Sun Aug 09, 2020 5:58 pm

as will wmctrl.

Note that lxterminal doesn't seem to like console-resize escape sequences.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

NimbUx
Posts: 215
Joined: Fri Jan 03, 2020 10:33 am

Re: Control terminal window from Bash command line ?

Sun Aug 09, 2020 8:46 pm

Thank both of you guys, appreciate the replies ! I just apt-get install'd xdotool and seems to do all I wanted (and more, indeed).

@Scruss: ...well, maybe not for the resizing and moving thing; fortunately I mentionned them for completeness sake mainly, my actual need currently is to minimise the lxterm, from commandline; following code does it right :

Code: Select all

$ xdotool getactivewindow windowminimize --sync

Return to “Raspberry Pi OS”