To change focus to your workspace 1, just enter xdotool set_desktop 1 The following commands will only work if you have at least 1 other workspace. To list the number of current workspaces, enter xdotool get_num_desktops ( The solution is most useful for Xubuntu/Lubuntu users, or those who are not running compiz,etc.) You may have to specify the commands in a different way like desgua suggests above, but for me the set_desktop and set_desktop_for_window commands proved most useful on a non-compiz system.) Note: With some window managers, or if you are using compiz, you may need to use xdotool commands such as set_desktop_viewport and get_desktop_viewport. I find it can be very interesting and creative to string together commands from man xdotool the commands I have formulated below might be useful in scripts. It is beautifully simple to achieve what you want with xdotool, which has multiple options for managing different workspaces (also known as 'desktops' within the program documentation). The following are equivalent: wmctrl -o 0,0 In other words it changes the "workspace" where the actual pixel is belonging to. If I want to go to my "workspace" 9, the command is: wmctrl -o 2732,1536 If I want to go to my "workspace" 8, the command is: wmctrl -o 1366,1536 Then, if I want to go to my "workspace" 4, the command is: wmctrl -o 0,768 If I want to go to my "workspace" 1, the command is: wmctrl -o 0,0 So this is how it works: we take the whole Workspace and divide for the numbers of "workspaces" we "think" we have. I was at what was supposed to be "workspace" 2, but actually I was at viewport (VP) 1366,0 (4098 / 3 = 1366) as showed by the output above. This means that actually I have one Workspace of 4098 x 2304 instead of what I "think" I have (nine "workspaces", 3 x 3). Trick InstructionsĬheck the output of wmctrl -d For example, mine is: 0 * DG: 4098x2304 VP: 1366,0 WA: 0,23 1366x745 N/A If you are using Compiz, you will have to do a trick because Compiz "workspaces" are actually Viewports of a single Workspace. Wmctrl -s to change to a specific workspace. Wmctrl -d to show all of your workspaces.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |