Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #7256
| From | J G Miller <miller@yoyo.ORG> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | How to use wmctrl to switch to a window on another workspace with an EMWH compliant window manager |
| Date | 2013-02-07 15:58 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <kf0iv1$naa$4@dont-email.me> (permalink) |
| References | <ker7qi$r6o$4@dont-email.me> <kevd7s$9gq$1@dont-email.me> |
On Thursday, February 7th, 2013, at 05:14:37h +0000, Chris Glurr asked:
> ] If the -p option is specified the next column will contain the
> ] PID for the window as a decimal integer.
> ] Getting a list of windows with PID and geometry information.
> ] wmctrl -p -G -l
>
> But HOW does it "list the windows"?
If you are not prepared to install it and try it, why not
read the article at
<http://www.linuxjournal.COM/magazine/hack-and-automate-your-desktop-wmctrl>
and more examples at
<http://spiralofhope.COM/wmctrl-examples.html>
> I don't wan't names. I want to know which W,T to switch to.
So use wmctrl to do that for you?
First get the window name with wmctrl -l, then use
wmctrl -a <WIN>
to activate the window by *switching to its desktop* and raising it.
> I need this mainly for keeping track of multiple `mc`.
So what you must do (in order to use wmctrl) is to run
mc in an X terminal emulator eg using xterm, or
better rxvt, or perhaps urxvt (for nicer xft font handling)
with a different title for each instance using the
-title or -T parameter or possibly with a different application
name using -n.
Then in your script you would use wmctrl -l to get a list
of windows, filter that with the string (passed as the parameter
to the script) to find the specific instance, extract the
window name or numeric id, then use wmctrl -a to activate
that window and move to its desktop.
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Who knows `ps` well? Avoid9Pdf@gmail.com - 2013-01-29 08:53 +0000
Re: Who knows `ps` well? J G Miller <miller@yoyo.ORG> - 2013-01-29 14:00 +0000
Re: Who knows `ps` well? J G Miller <miller@yoyo.ORG> - 2013-02-02 17:10 +0000
Re: Who knows `ps` well? Avoid9Pdf@gmail.com - 2013-02-03 13:11 +0000
Re: Who knows `ps` well? J G Miller <miller@yoyo.ORG> - 2013-02-03 15:06 +0000
Re: Who knows `ps` well? Avoid9Pdf@gmail.com - 2013-02-05 09:36 +0000
Re: Who knows `ps` well? J G Miller <miller@yoyo.ORG> - 2013-02-05 15:17 +0000
Re: Who knows `ps` well? Avoid9Pdf@gmail.com - 2013-02-06 18:50 +0000
Re: Who knows `ps` well? Avoid9Pdf@gmail.com - 2013-02-07 05:14 +0000
How to use wmctrl to switch to a window on another workspace with an EMWH compliant window manager J G Miller <miller@yoyo.ORG> - 2013-02-07 15:58 +0000
Re: Who knows `ps` well? Chris Davies <chris-usenet@roaima.co.uk> - 2013-01-29 17:19 +0000
Re: Who knows `ps` well? Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2013-02-05 08:09 -0800
csiph-web