move from one xterm and back again using wmctrl
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm running fvwm
and have multiple virtual desktops open. I'd like to be able to write a bash script that would take me from one xterm to another---this part is easy, using wmctrl -a
---and then back again, which is the hard part.
I imagine that if I could execute a command in the new window once I've passed control to it, then the rest would be easy, but as far as I can tell from the documentation, wmctrl doesn't give me the option to do this.
Here's the basic idea of the script I'd like to write
#!/bin/bash
TmpScreen=CAMILLE
CurrScreen=ANDREW
wmctrl -R $TmpScreen
#echo this line on CAMILLE not ANDREW
echo "Type 'GoBack' to return to $CurrScreen" &
#Do something on CAMILLE
#Type GoBack, which would then execute
wmctrl -a $CurrScreen
#Be back to where I started
Is there a way to accomplish this? Any help would be most appreciated
xterm wmctrl fvwm
add a comment |Â
up vote
0
down vote
favorite
I'm running fvwm
and have multiple virtual desktops open. I'd like to be able to write a bash script that would take me from one xterm to another---this part is easy, using wmctrl -a
---and then back again, which is the hard part.
I imagine that if I could execute a command in the new window once I've passed control to it, then the rest would be easy, but as far as I can tell from the documentation, wmctrl doesn't give me the option to do this.
Here's the basic idea of the script I'd like to write
#!/bin/bash
TmpScreen=CAMILLE
CurrScreen=ANDREW
wmctrl -R $TmpScreen
#echo this line on CAMILLE not ANDREW
echo "Type 'GoBack' to return to $CurrScreen" &
#Do something on CAMILLE
#Type GoBack, which would then execute
wmctrl -a $CurrScreen
#Be back to where I started
Is there a way to accomplish this? Any help would be most appreciated
xterm wmctrl fvwm
you should be able to get the current window id withxprop -root _NET_ACTIVE_WINDOW
, and so save it before moving to the new window.
â meuh
Feb 7 at 22:25
Thanks @meuh, I need something in addition though. I need to be able to pass an echo command to the new window, i.e., starting in the Current window, i want to write an echo (containing information from your xprop command) that shows up in the new window
â Leo Simon
Feb 8 at 3:21
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm running fvwm
and have multiple virtual desktops open. I'd like to be able to write a bash script that would take me from one xterm to another---this part is easy, using wmctrl -a
---and then back again, which is the hard part.
I imagine that if I could execute a command in the new window once I've passed control to it, then the rest would be easy, but as far as I can tell from the documentation, wmctrl doesn't give me the option to do this.
Here's the basic idea of the script I'd like to write
#!/bin/bash
TmpScreen=CAMILLE
CurrScreen=ANDREW
wmctrl -R $TmpScreen
#echo this line on CAMILLE not ANDREW
echo "Type 'GoBack' to return to $CurrScreen" &
#Do something on CAMILLE
#Type GoBack, which would then execute
wmctrl -a $CurrScreen
#Be back to where I started
Is there a way to accomplish this? Any help would be most appreciated
xterm wmctrl fvwm
I'm running fvwm
and have multiple virtual desktops open. I'd like to be able to write a bash script that would take me from one xterm to another---this part is easy, using wmctrl -a
---and then back again, which is the hard part.
I imagine that if I could execute a command in the new window once I've passed control to it, then the rest would be easy, but as far as I can tell from the documentation, wmctrl doesn't give me the option to do this.
Here's the basic idea of the script I'd like to write
#!/bin/bash
TmpScreen=CAMILLE
CurrScreen=ANDREW
wmctrl -R $TmpScreen
#echo this line on CAMILLE not ANDREW
echo "Type 'GoBack' to return to $CurrScreen" &
#Do something on CAMILLE
#Type GoBack, which would then execute
wmctrl -a $CurrScreen
#Be back to where I started
Is there a way to accomplish this? Any help would be most appreciated
xterm wmctrl fvwm
asked Feb 7 at 19:00
Leo Simon
17426
17426
you should be able to get the current window id withxprop -root _NET_ACTIVE_WINDOW
, and so save it before moving to the new window.
â meuh
Feb 7 at 22:25
Thanks @meuh, I need something in addition though. I need to be able to pass an echo command to the new window, i.e., starting in the Current window, i want to write an echo (containing information from your xprop command) that shows up in the new window
â Leo Simon
Feb 8 at 3:21
add a comment |Â
you should be able to get the current window id withxprop -root _NET_ACTIVE_WINDOW
, and so save it before moving to the new window.
â meuh
Feb 7 at 22:25
Thanks @meuh, I need something in addition though. I need to be able to pass an echo command to the new window, i.e., starting in the Current window, i want to write an echo (containing information from your xprop command) that shows up in the new window
â Leo Simon
Feb 8 at 3:21
you should be able to get the current window id with
xprop -root _NET_ACTIVE_WINDOW
, and so save it before moving to the new window.â meuh
Feb 7 at 22:25
you should be able to get the current window id with
xprop -root _NET_ACTIVE_WINDOW
, and so save it before moving to the new window.â meuh
Feb 7 at 22:25
Thanks @meuh, I need something in addition though. I need to be able to pass an echo command to the new window, i.e., starting in the Current window, i want to write an echo (containing information from your xprop command) that shows up in the new window
â Leo Simon
Feb 8 at 3:21
Thanks @meuh, I need something in addition though. I need to be able to pass an echo command to the new window, i.e., starting in the Current window, i want to write an echo (containing information from your xprop command) that shows up in the new window
â Leo Simon
Feb 8 at 3:21
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422626%2fmove-from-one-xterm-and-back-again-using-wmctrl%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
you should be able to get the current window id with
xprop -root _NET_ACTIVE_WINDOW
, and so save it before moving to the new window.â meuh
Feb 7 at 22:25
Thanks @meuh, I need something in addition though. I need to be able to pass an echo command to the new window, i.e., starting in the Current window, i want to write an echo (containing information from your xprop command) that shows up in the new window
â Leo Simon
Feb 8 at 3:21