LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   WHAT is the "command" to switch workspaces (gsb-2.30 slackware-13.1) (http://www.linuxquestions.org/questions/linux-desktop-74/what-is-the-command-to-switch-workspaces-gsb-2-30-slackware-13-1-a-836383/)

WetFroggy 10-05-2010 03:00 PM

WHAT is the "command" to switch workspaces (gsb-2.30 slackware-13.1)
 
using : gsb-2.30 slackware-13.1
not using : KDE (or qt)
xfce exists somewhere on here, as I use it as root's desktop

1) The workspace selector applet, doesn't have any edit ability to change (or even add default) shortcut key combinations.

2) In 'gconf-editor', there does not seem to be anything really related to selecting a workspace.

3) Keyboard Selector, does NOT have any reference to workspace, so setting the default shortcut keys, is impossible.

Add (custom shortcut) name (description of shortcut) & command .. so that leaves me with, what is this 'mythical' command to change to a specific workspace?

I am unable to locate any information on this required command.
:banghead:

malekmustaq 10-05-2010 03:32 PM

Quote:

xfce exists somewhere on here, as I use it as root's desktop
Good. Xfce is very light and well ordered interface.

Quote:

1) The workspace selector applet, doesn't have any edit ability to change (or even add default) shortcut key combinations.
Use Ctl+F1 through F4 to switch from one work space to the next.

Quote:

2) In 'gconf-editor', there does not seem to be anything really related to selecting a workspace.
I have not yet delved much about the rich hack-able opportunities in Xfce yet, but I have in past enjoyed much of hacking its interface to my own taste: this is the best thing that xfce offers: for allowing the user to configure the interface to his own desire.

Meantime you can use the applet in setting how many work spaces you like. Menu -> Settings -> Settings manager -> Work spaces and margins: (set how many) then Close. Point mouse anywhere at the desktop then scroll the center wheel of the mouse to shift/change from one space to the next.

Hope this helps.

Good luck and enjoy.

malekmustaq 10-05-2010 03:32 PM

Quote:

xfce exists somewhere on here, as I use it as root's desktop
Good. Xfce is very light and well ordered interface.

Quote:

1) The workspace selector applet, doesn't have any edit ability to change (or even add default) shortcut key combinations.
Use Ctl+F1 through F4 to switch from one work space to the next.

Quote:

2) In 'gconf-editor', there does not seem to be anything really related to selecting a workspace.
I have not yet delved much about the rich hack-able opportunities in Xfce yet, but I have in past enjoyed much of hacking its interface to my own taste: this is the best thing that xfce offers: for allowing the user to configure the interface to his own desire.

Meantime you can use the applet in setting how many work spaces you like. Menu -> Settings -> Settings manager -> Work spaces and margins: (set how many) then Close. Point mouse anywhere at the desktop then scroll the center wheel of the mouse to shift/change from one space to the next.

Hope this helps.

Good luck and enjoy.

gammahermit 10-11-2010 10:14 AM

If I understand right you are using Xfce and trying to set/change the keyboard shortcut to switch the workspace. I think the problem is that you are in the keyboard settings program. Which only allows you to start a program not bind internal window manager functions.

If you go to menu->settings->window manager then the keyboard tab it will list all of the actions and their shortcuts and allow you to change them.

talfiq 10-17-2011 10:32 AM

go to Applications Menu -> Settings -> Windows Manager.. there is option for keyboard shortcuts there... quite tricky unlike the other windows manager KDE/Gnome for e.g

WetFroggy 01-28-2012 01:42 AM

Forgot my original reason for this post (I migrated away to xfce) but I believe what I was asking, was if there was a command prompt issuable command - although I'm pretty sure there wasn't, as workspace switching seemed to be just handled entirely by the gui's code.

Anyhow, thank you for everyone who tried to help me out here. The help was appreciated! :D

Knightron 01-28-2012 06:46 AM

Hey, did you get your problem solved. If you are having issues with your workspaces, it may be because of compiz if you have that installed

macemoneta 01-28-2012 01:36 PM

Here's a little script called 'desktop', that I wrote to switch workspaces / desktops. You call it with the (zero based) workspace you want to switch to. You'll need the wmctrl command installed, which should be in most distribution's repositories.

Code:

#!/bin/bash
#-------------------------------------------------------------------------------
#
# desktop
#
# Author:  Mace Moneta
# Version:  1.1
# Created:  01/13/2010
# Modified: 10/04/2010
#
# Description: Switch to the requested desktop
#
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#      ************************** Variables **************************
#-------------------------------------------------------------------------------
# Desktop number passed?
dt=$1
if [ "$dt" == "" ]
then
  echo "Error: missing desktop number"
  exit
fi

#-------------------------------------------------------------------------------
#      ************************* Subroutines *************************
#-------------------------------------------------------------------------------
function dsktop () {
  if [ $COMPIZ -eq 1 ]
  then
      # The target desktop number (begins with 0)
      TVPN=$(( $1 % ${NF} ))
      # The X coordinate of the target viewport
      TVPX=$(( ${TVPN} * ${WW} ))
      # Change to the target viewport
      /usr/bin/wmctrl -o ${TVPX},0
  else
      /usr/bin/wmctrl -s $1
  fi
}

#-------------------------------------------------------------------------------
#      ************************* Mainline ****************************
#-------------------------------------------------------------------------------

# Disable globbing
set -f noglob

# Is compiz running?
COMPIZ=0
window_manager="`/usr/bin/wmctrl -m | /bin/grep -i compiz`"
if [ "$window_manager" != "" ]
then
  COMPIZ=1
fi

# The information about the desktop
INFO=$(/usr/bin/wmctrl -d | /bin/grep "\*")

# The width of the desktop
DW=$(echo "${INFO}" | /bin/awk '{sub(/x[0-9]+/, "", $4); print $4}')

# The width of the workarea
WW=$(echo "${INFO}" | /bin/awk '{sub(/x[0-9]+/, "", $9); print $9}')

# The number of faces on the cube
NF=$(($DW/$WW))

dsktop $dt
/bin/sleep 2
exit

For example, to switch to the first desktop:
Code:

desktop 0
To switch to the second desktop:
Code:

desktop 1


All times are GMT -5. The time now is 03:09 AM.