Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent R's newly opened devices to get the focus

When I open a plot from the R console:

  • I am happy that the device opens on top of the screen so I can see it
  • I am unhappy that the device gets the focus because I can't type any additional commands then before I navigate back to the console.

How do I get only the first of these two behaviours?
Is there a way to open a new R device on top of the screen without loosing the console focus?


[Update]: According to Carl's comment, calling windows(4.5,4.5,restoreConsole=T) before plot does the trick. But this seems to be just a temporary fix for Windows. Any more generic solution? Or X11, Wayland equivalents?

like image 420
iago-lito Avatar asked Nov 09 '22 23:11

iago-lito


1 Answers

Found this solution here.

bringToTop(-1) 
like image 98
MadmanLee Avatar answered Nov 15 '22 06:11

MadmanLee