Question regarding toggling between workspaces

Teresa e Junior teresaejunior at gmail.com
Fri Jul 12 16:14:31 CEST 2019


Em sex, 12 de jul de 2019 às 11:09, Lukasz Majewski
<l.majewski at majess.pl> escreveu:
> So it seems like I need to provide solution for this with some xdotool
> scripting.
>
> I'm wondering if there is any API/way to get the necessary information
> from xfce4? For example to know the previously used workspace/display ?

I was unaware there is a native solution for that. With that option
activated under xfwm4-tweak-settings, you can run a command that will
detect the current desktop and simply press "Ctrl+F(current desktop)":
xdotool key ctrl+F"$(($(xdotool get_desktop)+1))"

Running this command from a terminal with that option activated, I
always return to the previously used desktop. But calling a keyboard
shortcut from another keyboard shortcut is problematic, so you have to
tell xdotool to release Escape first. This works reliably for me:

sh -c 'xdotool keyup Escape; xdotool key --clearmodifiers
ctrl+F"$(($(xdotool get_desktop)+1))"'


More information about the Xfce mailing list