View previous topic :: View next topic |
Author |
Message |
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Fri Jul 26, 2013 2:45 pm Post subject: wmctrl -a For Browsers That Constantly Change Window Title? |
|
|
I am trying to link hotkeys to wmctrl -a window_title to bring windows into focus with a preset hotkeys. But with browsers, the window title is constantly changing when i change webpages. How could I work around this? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Jul 27, 2013 2:41 am Post subject: |
|
|
`man wmctrl` wrote: | Code: | -F Window name arguments (<WIN>) are to be treated as exact window titles that are case sensitive.
Without this options window titles are considered to be case insensitive substrings of the full
window title. |
|
So... the default is substring matching. «wmctrl -a 'Mozilla Firefox'» should work. If not, -x might work better. |
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Sat Jul 27, 2013 11:02 pm Post subject: |
|
|
Funny, the regexp match works with -a. The issue I have is that the browser window title changes to the webpage I am on. So if I have 2 chrome webpages open..."gentoo forums chrome" and "google news chrome" I can't really compensate for it.
Code: | localhost one # wmctrl -l
0x00400009 0 localhost rxvt
0x00600022 -1 localhost N/A
0x00a00009 0 localhost rxvt
0x00c00009 0 localhost rxvt
0x00e00009 0 localhost rxvt
0x01000009 0 localhost rxvt
0x01a00009 0 localhost rxvt
0x01c00009 0 localhost rxvt
0x01e00009 0 localhost emerge: (1 of 1) x11-misc/wmctrl-1.07-r1 Clean Post
0x01800009 0 localhost rxvt
0x01200023 0 localhost Gentoo Forums :: Post a reply - Chromium
0x02000009 0 localhost rxvt
localhost one # |
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Jul 29, 2013 6:05 pm Post subject: |
|
|
In that case, `wmctrl -x -l` will show them with window class names which might work. I don't have chrome installed to test this with though. |
|
Back to top |
|
|
|