Switch desktop with wmctrl
Herbstclient can just switch second monitor if already on expected tag.
This commit is contained in:
parent
3a002f1b8e
commit
c50ac146eb
8
qb
8
qb
|
@ -199,17 +199,19 @@ focus_to_qutebrowser() { # {{{
|
||||||
debug_message "focus_to_qutebrowser − \
|
debug_message "focus_to_qutebrowser − \
|
||||||
Qutebrowser window ID : ${RED}${qutebrowser_window_id}${COLOR_DEBUG} on desktop ID : ${RED}${qutebrowser_desktop_id}${COLOR_DEBUG}."
|
Qutebrowser window ID : ${RED}${qutebrowser_window_id}${COLOR_DEBUG} on desktop ID : ${RED}${qutebrowser_desktop_id}${COLOR_DEBUG}."
|
||||||
|
|
||||||
|
### Switch to Qutebrowser desktop
|
||||||
|
command wmctrl -s "${qutebrowser_desktop_id}"
|
||||||
|
|
||||||
## If HerstluftWM is available
|
## If HerstluftWM is available
|
||||||
if [ "$(command -v herbstclient)" ]; then
|
if [ "$(command -v herbstclient)" ]; then
|
||||||
debug_message "focus_to_qutebrowser − \
|
debug_message "focus_to_qutebrowser − \
|
||||||
Focus with herbstclient."
|
Focus with herbstclient."
|
||||||
### Direct focus to the window id
|
### Focus to the window id
|
||||||
herbstclient jumpto "${qutebrowser_window_id}"
|
herbstclient jumpto "${qutebrowser_window_id}"
|
||||||
else
|
else
|
||||||
debug_message "focus_to_qutebrowser − \
|
debug_message "focus_to_qutebrowser − \
|
||||||
Focus with wmctrl."
|
Focus with wmctrl."
|
||||||
### Switch to Qutebrowser desktop and expected window
|
### Switch expected window
|
||||||
command wmctrl -s "${qutebrowser_desktop_id}"
|
|
||||||
command wmctrl -i -R "${qutebrowser_window_id}"
|
command wmctrl -i -R "${qutebrowser_window_id}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue