You are not logged in.
Ok, this is somewhat complicated:
I have a WebApp(I develope) which I use in fullscreen mode. And the App itself opens new windows ... which are not in fullscreen.
So I have to manually activate fullscreen and if I am on my Desktop computer, move it to the second screen.
And I know it is not a lot of work, but it still breaks my workflow and the immersion in the app, so I would like to automate it with a script, if possible:
- need to detect if a new window from chromium (or firefox) opens
- if the url matches xxx, then proceed (optional)
- move window to second screen, if avaiable (dedection part is optional, I can just make 2 scripts, one for laptop, one for desktop)
- make it fullscreen
Now is something like this possible, without having to recompile anything?
That would be awesome ...
Offline
Hello and welcome.
devilspie might be able to do this for you.
Can you install devilspie and run it in a terminal window like this:
devilspie -d
...then start your webapp. Post back what is displayed in the terminal window when you open the webapp.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Oh hello and thanks for the welcome ... but it is not my first time here, but I was inactive for quite some time and my old account was deleted or I forgot the name
Anyway, devilspie's output, for chrome:
Window Title: 'Unbenannt - Chromium'; Application Name: 'Unbenannt - Chromium'; Class: 'Chromium'; Geometry: 1920x1052+0+0
and after opening a window the same:
Window Title: 'Unbenannt - Chromium'; Application Name: 'Unbenannt - Chromium'; Class: 'Chromium'; Geometry: 1920x1052+0+0
And for firefox it is pretty much the same
Window Title: 'Mozilla Firefox'; Application Name: 'Firefox'; Class: 'Firefox'; Geometry: 1920x1052+0+0
so unfortunately he does not give away too much, like url.
(btw. I use manjaro)
Offline
Unfortunately devlispie won't be helpful.
How about creating a link/shortcut that starts the instance and then moves window and maximizes it? Something like:
#!/bin/bash
firefox --new-window www.google.ca
sleep 1
wmctrl -r :ACTIVE: -t 1
wmctrl -s 1
wmctrl -r :ACTIVE: -b toggle,fullscreen
...change the URL to your specific one and play with the sleep command if the window takes time to get drawn to the screen. You can create a link to this script or assign it to a keyboard shortcut.
Note: it requires the wmctrl package. wmctrl will move the window to the second workspace, move you to the second workspace, and then maximize the window.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Wmctrl might do the trick. But there I would be bound to the command line.
But I found that there is devilspie2 or kpie, which work with lua ... I see what I can do with that, but with no working repository I need to compile them, let's see how far I can get.
Thanks for the hint!
Offline
Ok, I am really amazed by devilspie2.
I have not figured it all out, as I just started messing around, but it worked pretty much like expected. Very nice!
Offline
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 539.59 KiB (Peak: 540.87 KiB) ]