Comments (6)
You're welcome, @mkropat , and thank you for your work!
I couldn't tell the difference between a chromium profile or another using xprop, so making it work could be rather difficult or tricky to implement, I suppose.
At the moment, here's the behaviour of a command like this (the gmail chromium webapp)
jumpapp -c crx_pjkljhegncpnkpknbcohdijeoejaedia chromium-browser --profile-directory=Default --app-id=pjkljhegncpnkpknbcohdijeoejaedia
If this app is the only app running, jumpapp will focus as expected, even if there is a normal chromium instance around
if there is no chromium instance running, jumpapp will launch the webapp as expected
if there is more than one webapp running, jumpapp won't load it again but will just focus on a random chromium webapp window
if there's no webapp window around, but only a normal chromium instance:
Error: found running process for 'chromium-browser', but found no window to jump to
If jumpapp could be made to look on the first field of the WM_CLASS, this would open the chance to call the focus for chrome apps, and also for the custom directory which is the method I use instead of profiles.
On xprop my gmail app (similar to all the other chrome apps) looks like this
WM_CLASS(STRING) = "crx_pjkljhegncpnkpknbcohdijeoejaedia", "Chromium-browser"
Also, if you would want to make a custom chromium webapp for calendar, xprop will show once more
WM_CLASS(STRING) = "calendar.google.com", "Chromium-browser"
Instead of a chromium profile, to differentiate, I'm using a custom directory and launching different instances of chromium like this
chromium-browser --user-data-dir=/home/lupccs/.config/chromium-us3rnam3 --profile-directory=Default
Again, xprop on that window
WM_CLASS(STRING) = "chromium-browser (/home/lupccs/.config/chromium-us3rnam3)", "Chromium-browser"
from jumpapp.
I think jumpapp only looks through the windows of the application you'd want to launch
jumpapp -t title leafpad
focuses the leafpad's window with "(no title)" as a title
jumpapp -t title galculator
launches galculator, cause there are no galculator windows with the word "title" in their title
from jumpapp.
Thanks! I understood it completely the wrong way. That's unfortunate, checking for titles and launching a different command seems to be impossible then.
But even within the same command i can't seem to get it to work:
jumpapp -L google-chrome
lists
0x024001de computername 10991 0 Google-chrome: Inbox (1) - Gmail
0x024001f8 computername 10991 0 Google-chrome: New Tab - Google Chrome
wmctrl -lx
lists
0x024001c2 0 crx_kmhopmchchfpfdcdjodmpfaaphdclmlj.Google-chrome computername Inbox (2) - Gmail
0x024001f8 0 google-chrome.Google-chrome computername New Tab - Google Chrome
I want to focus the crx_kmhop...
instance of chrome if open, otherwise run google-chrome
(with some additional arguments i did not include here for now)
None of the following did bring up the specific (not even any) chrome instance, but they always launch a new one (I tried the following):
jumpapp -t "Google" google-chrome
jumpapp -t "Inbox" google-chrome
jumpapp -t "Gmail" google-chrome
jumpapp -t "crx" google-chrome
Although going by the documentation it is unclear if the following should work, but I tried them anyway:
jumpapp -c "Google" google-chrome
jumpapp -i "Google" google-chrome
jumpapp -c "Gmail" google-chrome
jumpapp -i "Gmail" google-chrome
jumpapp -c "crx" google-chrome
jumpapp -i "crx" google-chrome
Did not work either. Are any of these supposed to work?
from jumpapp.
at the moment I'm using, as you probably already are
wmctrl -xa crx_pjkljhegncpnkpknbcohdijeoejaedia || chromium-browser --profile-directory=Default --app-id=pjkljhegncpnkpknbcohdijeoejaedia
anyway
jumpapp -t "Gmail" chromium-browser
works for me, even though you risk to bring up every window browser that uses the word "gmail", or you risk to miss the gmail app window if some reason the "gmail" word gets lost from the title
the -c option looks for the wrong wm class, the -i option will hardly find the right chrome process
So no, the commands you mention won't work, there's already a request for an enhacement
https://github.com/mkropat/jumpapp/issues/10
from jumpapp.
Many thanks for your detailed explanations, they helped me out greatly. I will keep an eye on jumpapp, but for now I will have to stay with wmctrl/brocket.
from jumpapp.
Good feedback. Also, thanks for bringing the know-how @Lupccs.
It would be cool if jumpapp had a good way to work with Chrome profiles (right now it sucks). At the same time, I don't want to turn jumpapp into the swiss-army knife of dealing with X11 windows. That program already exists—wmctrl. Depending on what people want to do, maybe it's easier to extend wmctrl (or a similar program).
Unless convinced otherwise, I'm not inclined to merge a PR that adds support to "check for titles and launch a different command". But I would be open to an option that says "open this specific Chrome profile". Not that I'm crazy about adding program-specific logic, but I'm OK with an exception for Chrome because it is used so widely and profile switching is such a pain.
It's easy for me to discuss options cause I probably won't be making the change myself 😄 But I wanted to at least leave the option open in case someone was really motivated.
from jumpapp.
Related Issues (20)
- Announcement: Looking for maintainers
- Super button with xbindkeys? HOT 7
- restore minimized client in Awesome
- There seems to be no way to match windows using an exact match HOT 4
- separate multiple terminal instances HOT 1
- change behaviour? HOT 3
- Works differently from terminal HOT 1
- unable to launcher a program if the program is in the process list
- the man page should say Jumps to (focus) the "last" open window for an application HOT 3
- Need to install xdotool on ubuntu 18.04 HOT 1
- Add a --no-launch flag (feature request) HOT 3
- Activity
- wmctrl only reads _NET_WM_NAME
- Wayland compability HOT 2
- -p not working
- Unable to report version HOT 1
- Move app to current desktop and then focus?
- Move to cursor
- found running process for 'masterpdfeditor5', but found no window to jump to
- the ww alternative for kde plasma has now its own github project page https://github.com/academo/ww-run-raise HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jumpapp.