Startseite
Drupal Wiki - DrupalTM als Wiki - 11 Jahre Erfahrung
Intranet-, Knowledgebase- und Qualitätsmanagementsysteme...mehr

  • Neues Passwort anfordern

Ähnliches

  • Eclipse PDT und Zend Studio Probleme unter Ubuntu Karmic (9.10)
  • Using recordmydesktop under Ubuntu (karmic)
  • Qt4 mit Eclipse
  • Exim Smarthost Setup
  • Installation eines VMware ESXi auf einem Hetzner EQ4 / EQ9 mit zusätzlichem Subnetz

Bereiche

  • RSS Feed
  • Index
  • Abteilungen
  • Startseite

Kategorien

  • Entwicklung (16)
    • Git (7)
    • IDE (4)
    • PHP (1)
    • SVN (2)
  • ESXi (5)
    • Backup (1)
    • CLI (2)
    • Raid (1)
  • FH Iserlohn (1)
    • GUI-Programmierung (1)
  • Impressive.media (5)
    • Drupal (4)
    • Drupaliki (2)
  • IT (53)
    • C++ (1)
    • Funambol (1)
    • Linux (31)
      • Debian (11)
      • Ubuntu (9)
    • Open Source (4)
    • Software (13)
      • Linux (13)
    • VMware (8)
    • Zimbra (4)
  • OpenFoam (1)
    • Documentation (1)

Betriebssysteme , Debian , Development , Drupal , Drupaliki , Entwicklungsumgeb.. , EQ4 , ESXi , Git , GUI , Hetzner , HowTo , Impressive.media , Installation , Intranet , Java , KDevelop , Knowledgebase , Lighttpd , Linux , Praktikum , Qualitätsmanagem.. , Shell , SVN , tricks , Ubuntu , VMware , Vorlesung , Wiki , Zimbra
more tags
  • Diskussion
  • PDF
  • Abonnieren

Toggle or rotate through your workspace using a shortcut while having Compiz activated in Gnome

08.01.10 um 01:54 von EugenMayer, (2) Beiträge

1 Using workspace toogle under Gnome with Compiz

While gnome lacks in a command to toggle or rotate through workspaces at all, there seem to be several solutions for Gnome without Compiz using the wmctrl tool. As iam using Gnome with Compiz (normal or extra doenst matter), you can`t switch the workspaces the same way.

You alway will have one workspace when trying "wmctrl -d" and so you can switch the workspace to the next one using "wmctrl -s NUMBER". The solution is to move the viewport instead. As i did not find this solution in the web at all, i thought about writing it down here.

So what we do i creating a workspace toggle (or rotate) for switching to the next workspace on the horizontal direction by using a keyboard or mouse shortcut. When we reach the last workspace, we switch back to the first one. When you have 2 workspaces, this toggle becomes extremly useful.

1.1 wmctrl

First of we need to install a small tool. Its included in the reporsitories, so simply use aptitude

sudo aptitude install wmctrl

1.2 Script

First of you need to create a script with the following content. You can place it in ~/bin/togglews in example

mkdir ~/bin
touch ~/bin/togglews && chmod u+x ~/bin/togglews
vim ~/bin/togglews

Now past this content inside

#!/bin/bash
viewport=`wmctrl -d | awk -F" " '{ print $6}' | awk -F"," '{print $1}'`
geom=`wmctrl -d | awk -F" " '{ print $4}' | awk -F"x" '{print $1}'`
workspaceWidth=`wmctrl -d | awk -F" " '{ print $9}' | awk -F"x" '{print $1}'`

if (( $viewport + $workspaceWidth < $geom )); then
        wmctrl -o $(($viewport+$workspaceWidth)),0
else
        wmctrl -o 0,0
fi

1.3 Shortcut

Now our last step is to finally create a shortcut

gconf-editor

Now go down to the apps -> metacity -> global_keybindings and enter a shortcut for the run_command_1. To find out, what value a specific shortcut could have ( like mine special XF86Back ) use the System -> Settings -> Shortcut Dialog and just try it there.

Now go down to keybinding_commands and change the value for comand_1 to /home/<USER>/bin/togglews

Now close the editor.

Your done. Now you can use the shortcut to toggle(rotate) through your workspaces.

1.4 Devilspie

Be sure to check this small tool included in the ubuntu reporsitories. It lets you define simple rules so that applikations always apear on the same workspace, with the same position and size. Extremly handy

sudo aptitude install devilspie

Look here to see some examples

Links: devilspie to automate position/size/workspace, wmctrl to manipulate windows
Details
DetailsTaxonomien
StatusIn Bearbeitung
Erstellt am08.01.10
IT - Linux
Debian - Gnome - HowTo - Linux - Tools - Ubuntu
  • Diskussionsbeiträge(2)

This is not the same at all.

Verfasst von EugenMayer am 8. Januar 2010 - 16:31.

This is not the same at all. Everybody is aware of those "left and right" shortcuts - but this is not what people want. They want to cycle / toggle trough there desktops using one button.

From the usability aspect this makes a huge difference.

  • Antworten
  • Diskussionsbeiträge(2)

All this is unnecessary with

Verfasst von Gast am 8. Januar 2010 - 13:08.

All this is unnecessary with Compiz. Compiz already has viewport switching capability inbuilt. This is by default bound to Ctr-Alt-Right/Left. I just rebind it to a single key (XF86Back and XF86Forward on my Thinkpad) through CompizConfig Settings Manager.

  • Antworten
  • Diskussionsbeiträge(2)

Kommentar hinzufügen

Abbrechen

Valid XHTML Strict 1.0 and CSS
provided by Impressive.media GbR - Sitemap - Drupal is a Registered Trademark of Dries Buytaert