Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wmctrl -a For Browsers That Constantly Change Window Title?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Fri Jul 26, 2013 2:45 pm    Post subject: wmctrl -a For Browsers That Constantly Change Window Title? Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Jul 27, 2013 2:41 am    Post subject: Reply with quote

`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
View user's profile Send private message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Sat Jul 27, 2013 11:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Jul 29, 2013 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum