RSS

Schlagwort-Archive: lubuntu

Lubuntu 12.04: Begriffs-Wirr-Warr "Lightdm", "Openbox", "LXDE" :-()

Lubuntu 12.04: Begriffs-Wirr-Warr "Lightdm", "Openbox", "LXDE" :-()

Eine Neuerung des Lubuntu-Upgrades auf 12.04 (siehe: „Lubuntu LXDE: Lubuntu 12.04 ist da!„) ist der neue Displaymanager „Lightdm„, der bereits ab der Version 11.10 für Ubuntu eingesetzt wird. Bis 11.10 war für Lubuntu der Displaymanager „lxdm“ im Einsatz.  Da fragt sich unsereiner doch, was heißt denn das konkret, was ist eigentlich ein Displaymanager ?

Displaymanager

Ein Displaymanager ist für die grafische Anmeldung an einem X11 basierten Unix System zuständig. Ist ein Displaymanager aktiviert, so wird der XServer bereits vor der eigentlichen Anmeldung gestartet. Statt einen Displaymanager zu nutzen, kann man sich auch in der Konsole einloggen und dann mit startx den XServer starten. Also immer dann, wenn das X11 nicht von einem Benutzer aus der Shell heraus gestartet wird, sondern sofort nach dem Booten zur Verfügung stehen soll, kommen Displaymanager zum Einsatz.

Der Displaymanager ist nicht beschränkt auf den lokalen Rechner. Der Displaymanager kann auch Displays auf anderen Rechner verwalten. Damit wird der lokale Rechner zu einem X-Terminal degradiert und ist nun nicht mehr für die Ausführung sondern nur noch für die Darstellung der Anwendungen zuständig. Dies ermöglicht auch den Einsatz von leistungsschwächeren Systemen für anspruchsvollere Software, die dann auf einem leistungsstarken Rechner laufen kann.

Vor Unbuntu 11.10 gab es für jedes Ubuntu-basiertes Derivat einen eigenen Displaymanager (Ubuntu und Xubuntu: GDM, Kubuntu: KDM, Lubuntu LXDM).

Fenstermanager (Windowmanager)

Der Fenstermanager wird vom Displaymanager gestartet und (engl. window manager) ermöglicht es dem Anwender die Größe, Position und das Aussehen von Fenstern festzulegen. Daneben sorgt er noch für weitere Funktionen (z. B. Verkleinern (Icon), Vollbild und Schließen).

Exkurs:Der Displaymanager startet den Prozess xinit, der die Datei .xinitrc im Heimatverzeichnis des Benutzers ausführt und anschließend endet. Ist keine Datei .xinitrc im Heimatverzeichnis des angemeldeten Benutzers vorhanden, wird die Systemdatei /usr/X11/lib/X11/xinit/xinitrc verwendet. Die Besonderheit ist: der Windowmanager wird über den „exec“ Systembefehl gestartet und tritt damit an die Stelle des xinit-Prozesses ==> wird der Windowsmanager beendet, wird auch die X-Session beendet!

Beispiele: twm (Tab Window Manager), fvwm, fvwm2 und fvwm95, kwm, sawfish oder icewm, etc. (siehe auch: http://en.wikipedia.org/wiki/X_window_manager)

Für Freunde von Lubuntu bzw. LXDE ist openbox der Standard-Fenstermanager.

Composition-Manager (Compositing window manager)

Eine Erweiterung der klassischen Fenstermanager sind die sog. Composition-Manager bzw. Composition-Window-Manager. Sie erlauben die Verwendung von 3D-effenkten, Transparenz, Animation, etc.

Die bekanntesten dieser Zunft sind:

(siehe auch: http://en.wikipedia.org/wiki/Compositing_window_manager)

 

Desktop-Umgebung (Desktop-Environment)

Auf dem Fenstermanager setzt die Desktop-Umgebung bzw. Arbeitsumgebung auf, sie wird oft mit dem Fenstermanager verwechselt. Die bekanntesten Vertreter dieser Klasse sind wohl „KDE“ und „Gnome“. Für Ubuntu ist das „Unity„, für Lubuntu ist das „LXDE“ und für Linux Mint „Cinnamon“ bzw. „MATE„.

„…sorgt für die technische Umsetzung der sogenannten Schreibtischmetapher (die Grafische Benutzeroberfläche wird in Anlehnung an den Büroarbeitsplatz „Desktop“ genannt, was im englischen Schreibtischoberfläche bedeutet). Die Desktop-Umgebung ist entweder fix vorgegeben (Beispiel Microsoft Windows) oder flexibel gekoppelt (Beispiel Linux mit Arbeitsumgebungen wie GNOMEKDE Plasma WorkspacesXfceLXDEEnlightenmentÉtoiléEDEMATE oder ROX Desktop).“ (aus Wikipedia: http://de.wikipedia.org/wiki/Arbeitsumgebung, 09.02.2013).

Als Basis für die Entwicklung von Applikationen, gibt es hier im Wesentlichen zwei Lager: QT für KDE und GTK für Gnome, LXDE etc. Ein Vergleich der beiden Toolkits/Development Frameworks ist u.a. unter http://www.wikivs.com/wiki/GTK_vs_Qt zu finden. Der große Vorteil von QT ist die Portabilität, ein Vergleich auf der vorher genannten Seite zeigt folgende Eigenschaften:

Allerdings ist die allgemeine (inklusiver meiner) Meinung, dass QT-Anwendungen schwergewichtiger sind, d.h. mehr Hardware-Ressourcen werden verbraucht. Wer über die entsprechende Hardware verfügt, sollte sich trotzdem mit dem Kriterium der Stabilität der unterschiedlichen Desktop-Environments auseinandersetzen.

Meine, ausdrücklich subjektive Meinung, hierzu ist: KDE ist sehr sexy, aber sehr instabil, Gnome ist schneller und stabiler und LXDE ist schnell, stabil und ressourcenschonend. Wie gesagt, meine Meinung.

Genauere Informationen sind zu finden unter http://en.wikipedia.org/wiki/Comparison_of_X_Window_System_desktop_environments.

Übersicht

Ich versuche hier mal eine Übersicht zu geben, weise aber darauf hin, dass mir bei dem ganzen Begriff-Wirr-Warr ein Fehler unterlaufen sein kann (für Hinweise wäre ich sehr dankbar):

OS/Distribution Desktop-Umgebung Fenstermanager (composite) Fenstermanager (2D) Standard
Ubuntu Unity (ab 11.04), vorher GNOME Compiz Metacity
Lubuntu LXDE xcompmgrcompton (Fork von xcompmgr),
oder für mehr Effekte Cairo Composite Manager
Openbox
Xubuntu Xfce Xfce Composite-Effekte Openbox
Kubuntu KDE Plasma KWin KWin
Linux Mint (ab 13) Cinnamon oder MATE Muffin oder Mutter Metacity
  GNOME2   Metacity
  GNOME3 aka GNOME Shell Mutter Metacity

 

Fazit

Um dem Begriffs-Wirrwarr entgegenzuwirken, heißt das beispielsweise für Lubuntu: der Displaymanager ist (ab 12.04) „Lightdm“, der Fenstermanager „Openbox“ und die Desktop-Umgebung „LXDE“. Falls die verwendete Grafikkate Compositing erlaubt, kann u.a. der xcompmgr eingesetzt werden.

Wenn man sich diesen Artikel „verinnerlicht“ hat, ist es ziemlich egal, ob als Displaymanager der „Lightdm“ oder der „lxdm“ eingesetzt wird, die eigentliche Arbeit und das Aussehen wird eh vom Fenstermanager und Desktop-Environment bestimmt. Und hier ist es wichtig – meiner Meinung nach – das Richtige für die vorhandene Hardware auszuwählen. Ich hoffe ich konnte diesbezüglich genug Informationen an Euch weitergeben, um die Auswahl zu erleichtern.

In diesem Sinne…

Lubuntu was recently upgraded to version 12.04 (have a look at blog (in german): „Lubuntu LXDE: Lubuntu 12.04 ist da!„). A new display manager will be used, called  „Lightdm„. This display manager is already in use for Ubuntu, since version 11.10. In the past „lxdm“ was used for Lubuntu. So the question is „what is a display manager and what it is used for ?“. I guess this is a good chance for myself, to get more farmiliar with the terms „display manager“, „window manager“ and „desktop environment“. If you are also interested in, please continue to read…

display manager

Let’s put it into one general message: „a display manager is used for the graphical login on a X11 based unix system“. If you use a display manager then the xserver will be started prior the login takes place. If you don’t want that, then you can start the system in a console mode, login an start the xserver manually by type in startx command. This means that an automatically start of the X11 environment implies the usage of a display manager.

But, that’s not all, a display manager allows you to remotely login to a X11 running workstation via the network. This offers you the availability to port your „heavy“ applications onto a powerful hardware where all the  computationally intensive work takes place, but you still can have a look at it on a ligthweight workstation using remote login. X11 offers you this possibility and a display manager allows you to remotely login.

window manager

A window manager gets started by the display manager after a user successfully loged in. A window manager is responsible for calculating the size, position and look of the windows. Additionally it provides futher functionality like minimize, maximize and close a window etc.

exkursion: all display managers are starting the process xinit, which is reading the config file .xinitrc – either in the home folder of the user (if it exists) or in /usr/X11/lib/X11/xinit/xinitrc. In all cases it will use the exec system call, which means that it will substitute the current process with its own code an therefore: if the window manager will end up, the xsession will end up as well!

Examples for window managers: twm (Tab Window Manager), fvwm, fvwm2 und fvwm95, kwm, sawfish oder icewm, etc. (see also: http://en.wikipedia.org/wiki/X_window_manager)

Hint: for Lubuntu and LXDE friends openbox is the default window manager.

desktop environment

Upon the window manager the desktop environment is placed. It is often wrongly named as window manager. The most favourite candidates are  „KDE“ and „Gnome“. For Lubuntu it is „LXDE“.

In order to develip applications for these environments, the most common approaches are QT for KDE and GTK for Gnome, LXDE etc. You will find a goog comparison between these two develipment frameworks/libraries on http://www.wikivs.com/wiki/GTK_vs_Qt zu finden.

As you can see in the following table, one of the biggest advantages of QT is its portablitiy:

But don’t forget its disadvantages, like the usage of hardware resources. When you tend to use the newest available versions, you have to be aware of the instability. But it is (in my opinion) well designed and beautiful to see. So you have to make a decision what is more important for you.

My personal opinion is: KDE is „sexy“ but sometimes very unreliable, GNOME is some kind of faster and more reliable, but less „sexy“. I prefer LXDE, because it is (in my opinion) the most reliable and fast environment currently available – but this is only my opinion.

For further information, please have a look at: http://en.wikipedia.org/wiki/Comparison_of_X_Window_System_desktop_environments.

Conclusion

With a look at Lubuntu (from version 12.o4 onwards), I’ve learned that that „Lightdm“ is a display manager, „Openbox“ is a window manager and the desktop environment is called  „LXDE“. I hope I could help you to understand this – sometimes – confusing and difficult terms.

Furthermore, since this is my first translated article, I hope you understood it and were not be confussed. Please give me a hint if I did something wrong in a technical or grammatical sense or something else.

Thanks in advance…

 
15 Kommentare

Verfasst von - Mai 1, 2012 in Linux

 

Schlagwörter: , , , , , , , , , ,

Lubuntu LXDE: Lubuntu 12.04 ist da!

Lubuntu LXDE: Lubuntu 12.04 ist da!

Jetzt ist es endlich soweit, „Lubuntu“ ist auch in der Version 12.04 erhältlich, Codename: „Precise Pangolin“. Das heißt wohl soviel wie „„Präzises Schuppentier“. Naja, mehr oder weniger einfallsreich, geistreich bzw. sinnbefreit, aber egal – darum geht es hier ja nicht.

Die erste Besonderheit, gegenüber dem Flagschiff „Ubuntu 12.04“ ist die Tatsache, dass „Lubuntu 12.04“ nicht als LTS-Version angeboten wird, also nur für die kommenden 18 Monate unterstützt bzw. supported wird.

Die verfügbaren Applikationen sind unter http://packages.ubuntu.com/precise/lubuntu-desktop zu finden. Folgende Informationen konnte ich dem Link „Upgrading_from_Lubuntu_11.10“  entnehmen:

  • Als Displaymanager wird zukünftig „lightdm“ eingesetzt.
  • pcmanfm (File-Manager) wird von 0.9.9 auf 0.9.10 aktualisiert
  • openbox bleibt der Window-Manager (ein Glück)
  • Chromium wird der Standard-Browser
  • der „Hibernate“-Mode wurde deaktiviert, aufgrund seiner Unzuverlässigkeit, will man ihn dennoch aktivieren, sollte man die Informationen des folgenden Links berücksichtigen: https://help.ubuntu.com/12.04/ubuntu-help/power-hibernate.html
  • die Powermanagement-Tools „pm-utils“ sind verbessert worden
  • auf Backports kann einfacher zugegriffen werden
  • Linux-Kernel: 3.2.14 (bei mir aktuell auf Lubuntu 11.10: 3.0.0-17) bringt eine Reihe von Neuerungen und Verbesserungen
  • Es gibt eine neues Theme „Ozone“, das noch nicht ganz fertiggestellt ist (https://wiki.ubuntu.com/Lubuntu/Artwork/Incoming/Precise/Ozone).
  • und einiges mehr…

 

Update 11.10 > 12.04:

Um ein 11.10 System auf 12.04 zu aktualiseren, sei folgender Link empfohlen:  „Upgrading_from_Lubuntu_11.10

Hinweis:

„The update manager GUI will offer you 12.04 Lubuntu (it shows as Ubuntu, but updates Lubuntu); Alternatively, launch LXTerminal and enter

sudo do-release-upgrade -d

Please note the importance of upgrading apt and dpkg on a mixed 32 bit & 64 bit architecture (e.g. Skype on a 64bit installation) below.“

 

Fazit:

Ich werde wohl erst einmal 1-2 Monate warten und sehen was sich tut bzw. die Neuigkeiten auf „http://lubuntu.net/“ verfolgen, bevor ich mein System aktualisiere. Ich bin mit dem was ich habe eigentlich ziemlich zufrieden und kann an den neuen Features nicht erkennen, dass ich sie unbedingt brauche.

Für alle, die es nicht abwarten können und den Schritt in eine neue Zukunft wagen: Ich würde mich über Euer Feedback freuen. Was sind Eure Erfahrungen, habt Ihr Euer System komplett aktualisert oder seid ihr über ein VM-Image gegangen. Alle Kommentare, Hilfen und Kritiken sind willkommen!

 

In diesem Sinne 😉

 

Links:

http://lubuntu.net/

https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/Lubuntu#Upgrading_from_Lubuntu_11.10

 
Ein Kommentar

Verfasst von - April 27, 2012 in Linux

 

Schlagwörter: , ,

Lubuntu LXDE: Alternatives Panel „Tint2“

Lubuntu LXDE: Alternatives Panel „Tint2“

LXPanel“ ist das Standardpanel von LXDE. Ich bin mit diesem Panel sehr zufrieden, es ist schnell, läuft stabil und man kann es „schick“ gestalten. Das ist natürlich Ansichtssache, das mit dem „schick“, es gibt deshalb auch Alternativen, u.a. das „Tint2“ Panel.

Einen ersten Eindruck kann man sich von den Default-Themes verschaffen (bitte anklicken):

Die Themes kann man relativ leicht umgestalten und es ist mit den entsprechenden Tools auch nicht schwer sich eigene Themes zu erstellen.

Installation

Befehl:

sudo apt-get install tint2

Konfiguration

Vorher sollte man „LXPanel“ Prozess beenden!

Konfigurationsdatei: „~/.config/tint2/tint2rc“

Beispieldateien befinden sich bei Lubuntu unter „/usr/share/doc/tint2/examples

Zwei Tools sind mir ins Auge gestochen (aua ;-)), die die Konfiguration erleichtern:

tint2conf“ und „tintwizard.py„. „tint2conf“ wird bei der Installation mitgeliefert.  Ich persönlich bevorzuge aber den „tintwizard„. Man kann das Tool unter http://code.google.com/p/tintwizard/downloads/list herunterladen. Danach entpacken und einfach „tintwizard.py“ aufrufen.

Schriftarten, Position, Farben etc. können direkt angepasst und getestet werden. Dazu muss man nur die Einstellungen anpassen und danach die folgenden Tasten drücken:

Starten

Es gibt nicht viele Optionen, die für den Start von „Tint2“ zur Verfügung stehen:

tint2

oder

tint2 -c </path_to_config_file>

Also einfach im Terminal mit „tint2“ bzw. „tint2 &“ starten und sich freuen 🙂

 
Ein Kommentar

Verfasst von - April 21, 2012 in Linux

 

Schlagwörter: , , , , , ,

Lubuntu LXDE: Alternatives Panel "Tint2"

Lubuntu LXDE: Alternatives Panel "Tint2"

LXPanel“ ist das Standardpanel von LXDE. Ich bin mit diesem Panel sehr zufrieden, es ist schnell, läuft stabil und man kann es „schick“ gestalten. Das ist natürlich Ansichtssache, das mit dem „schick“, es gibt deshalb auch Alternativen, u.a. das „Tint2“ Panel.

Einen ersten Eindruck kann man sich von den Default-Themes verschaffen (bitte anklicken):

Die Themes kann man relativ leicht umgestalten und es ist mit den entsprechenden Tools auch nicht schwer sich eigene Themes zu erstellen.

Installation

Befehl:

sudo apt-get install tint2

Konfiguration

Vorher sollte man „LXPanel“ Prozess beenden!

Konfigurationsdatei: „~/.config/tint2/tint2rc“

Beispieldateien befinden sich bei Lubuntu unter „/usr/share/doc/tint2/examples

Zwei Tools sind mir ins Auge gestochen (aua ;-)), die die Konfiguration erleichtern:

tint2conf“ und „tintwizard.py„. „tint2conf“ wird bei der Installation mitgeliefert.  Ich persönlich bevorzuge aber den „tintwizard„. Man kann das Tool unter http://code.google.com/p/tintwizard/downloads/list herunterladen. Danach entpacken und einfach „tintwizard.py“ aufrufen.

Schriftarten, Position, Farben etc. können direkt angepasst und getestet werden. Dazu muss man nur die Einstellungen anpassen und danach die folgenden Tasten drücken:

Starten

Es gibt nicht viele Optionen, die für den Start von „Tint2“ zur Verfügung stehen:

tint2

oder

tint2 -c </path_to_config_file>

Also einfach im Terminal mit „tint2“ bzw. „tint2 &“ starten und sich freuen 🙂

 
Ein Kommentar

Verfasst von - April 21, 2012 in Linux

 

Schlagwörter: , , , , , ,

Lubuntu: Synaptic Touchpad konfigurieren

Lubuntu: Synaptic Touchpad konfigurieren

Kommandozeile

Mit „Lubuntu“ wird das Konfigurationstool „synclient“ für das Synaptic-Touchpad ausgeliefert, welches man von der Kommandozeile aus starten kann.

Mit dem Befehl „synclient -l“ kann man sich die aktuellen Einstellungen anschauen:

Um einen bestimmten Parameter zu ändern, gibt man folgenden Befehl ein:
synclient <Paramtername>=<Wert>

Beispiel:
Um das Touchpad auszuschalten, gibt man folgenden Befehl ein:
synclient TouchpadOff=1

Um es wieder einzuschalten, gibt man folgenden Befehl ein:
synclient TouchpadOff=0

GUI

Für alle Freunde der Oberfläche gibt es das Tool „gsynaptics„, dass man unter Lubuntu mit folgenden Befehl installieren kann:

sudo apt-get install gsynaptics

Nach der Installation kann die Anwendung mit folgendem Befehl gestartet werden:

gpointing-device-settings

Danach erscheint folgende GUI:

Mich persönlich nervt in der Standard-Einstellung der Synaptic-Touchpads, das Tapping, also wenn man mindestens zweimal auf das Touchpad kommt, wird die aktuelle Stelle auf dem Bildschirm markiert oder irgendeine Aktion ausgelöst. Geht es Euch ebenso, könnt‘ Ihr das mit der folgenden Einstellung ausschalten:

Desweiteren kommt man oft mit der Handfläche auf das Touchpad, was „unkalkulierbare“ Reaktionen hervorrufen kann. Um dieses „Feature“ auszuschalten, sollte man folgende Einstellung aktivieren:

 

Links:

http://j19.video2.blip.tv/10570008036594/Llelectronics-LubuntuScreencastTouchpadConfiguration461.webm

 
Hinterlasse einen Kommentar

Verfasst von - April 20, 2012 in Allgemein

 

Schlagwörter: , , , ,

LXDE: Keybindings/Hotkeys definieren

LXDE: Keybindings/Hotkeys definieren

Motivation

Ich persönlich bin kein wirklicher Freund sogenannter „Hotkeys“, also irgendwelcher Tastenkombinationen, die irgendwelche Funktionen ausführen. Früher gab es für fast jede Anwendung eigene „Hotkeys“, etwa für „Word“ oder „WordPerfect“. Natürlich waren die „Hotkeys“, für die gleichen Aufgaben, unterschiedlich und ich denke, in jener Computer-Urzeit, habe sich meine Abneigung gegenüber diesen vermeintlichen Helfern herausgebildet.

Trotzdem muss ich sagen, dass ich „Hotkeys“ verwende, wenn ich sie selbst definieren kann. Ich definiere sie dann nach meiner eigenen Logik, die einen Sinn für mich macht und die ich mir vor allem merken kann. Unter LXDE, Lubuntu bzw. Openbox, definiert man diese „Hotkeys“ mit sog. „Keybindings“.

Keybindings/Hotkeys

Keybindings werden beim Openbox Window Manager systemweit unter „/usr/share/lxde/openbox/rc.xml“ und benutzerspezifisch unter „$HOME/.config/openbox/rc.xml“ (bei Lubuntu unter „$HOME/.config/openbox/lubuntu-rc.xml„) konfiguriert. Eine beispielhafte Definition sieht so aus:

<keyboard>
  <keybind key="A-F4">
    <action name="Close"/>
  </keybind>
  <keybind key="A-Escape">
    <action name="Lower"/>
    <action name="FocusToBottom"/>
    <action name="Unfocus"/>
  </keybind>
  <keybind key="A-space">
    <action name="ShowMenu"><menu>client-menu</menu></action>
  </keybind>
</keyboard>

Ein einzelnes Keybinding könnte wie folgt definiert sein:

 <keybind key="A-F4">
    <action name="Close"/>
  </keybind>

Die wesentlichen Elemente sind „key“ und „action„.

Key

Ein Key ist eine einzelne Taste oder eine Tastenkombination. Eine Tastenkombination wird durch einen Modifier-Key eingeleitet und durch den eigentlichen Key ergänzt. Es gibt folgende Modifier-Keys:

Modifier-Key Taste
S Umschalttaste (Shift)
C Steuerungstaste (Strg bzw. Ctrl)
A Alt Taste
W Super Key (Windows Taste)
M Meta Key
H Hyper Key

 

Keys sind die eigentlichen Tasten, ist man sich nicht sicher, kann man speziell bei Sonderzeichen und Umlauten das Kommandozeilen-Tool „xev“ zu Hilfe nehmen. Beispiel: „xev“ Ausgabe beim Drücken eines „ä“:

KeyRelease event, serial 41, synthetic NO, window 0x3c00001,
    root 0xaf, subw 0x0, time 86008948, (501,8), root:(646,216),
    state 0x0, keycode 48 (keysym 0xe4, adiaeresis), same_screen YES,
    XLookupString gives 2 bytes: (c3 a4) "ä"
    XFilterEvent returns: False

In der Zeile „keycode 48 (keysym 0xe4, adiaeresis)“ ist „adiaeresis“ die Information, die wir für die Definition des Keybindings benötigen. Beispiel: Durch Drücken von „Ctrl+ä“ soll das Hauptmenü gestartet werden. Ich gebe zu, daß diese Kombination vollkommen sinnbefreit ist, soll aber auch nur zu Demonstrationszwecken dienen. Die Definition wäre dann:

<keyboard>
  ...
  <keybind key="C-adiaeresis">
    <action name="ShowMenu">
      <menu>root-menu</menu>
    </action>
  </keybind>
  ...
</keyboard>

Nachdem alle Definitionen erledigt sind, speichert man die Datei und meldet sich erneut an. Danach sollten die neuen Keybindings funktionieren, drückt man also auf „Ctrl+ä“, erscheint folgendes Menü:

 

Action

Der zweite Teil einer Keybindings-Definiton enthält die „Action“, also was passieren soll, wenn die Taste/Tastenkombination gedrückt wurde.

Eine Auflistung und Beschreibung aller verfügbaren Actions ist unter http://openbox.org/wiki/Help:Actions zu finden. Abgesehen davon, gibt es die Action „Execute“, mit der man direkt Kommandos ausführen kann. Beispielsweise wird durch folgende Definition den „Chromium-Browser“ starten (sofern er denn installiert ist):

<keybind key="A-b">
<action name="Execute">
<command>chromium</command>
</action>
</keybind>

Drückt man Ab- und Anmelden die Tastenkombination „Alt+b“, erscheint der „Chromium-Browser“, wie erwartet.

 

Key-Chains

Key-Chains kennt man beispielsweise vom Emacs Editor. Eine einleitende Taste/Tastenkombination und danach eine weitere Taste. Damit ist eine Kategorisierung möglich. Beispiel: Man will alle Hotkeys, die sich auf den Desktop beziehen mit „Ctrl+d“ einleiten und danach durch eine weitere Taste die eigentliche „Action“ definieren, wie „m“ für „Menü“, „n“ für nächstes Fenster, „v“ für vorheriges Fenster etc.

Die entsprechende Definition sähe dann wie folgt aus:

<keybind key="C-d">
    <keybind key="v">
      <action name="PreviousWindow"/>
    </keybind>
    <keybind key="n">
      <action name="NextWindow"/>
    </keybind>
  </keybind>

Nützliche Helfer

Einige nützliche X11 Kommandos (Kommandozeile):

xev: zeigt X11 Events an. Hiermit kann man beispielsweise Keycodes ermitteln etc.
xprop: Eigenschaften von Fenstern und Schriften anzeigen
xwininfo: Informationen zu einem Fenster (Geometrie, Position, etc. ermitteln)

 

Fazit

Auch hier zeigt sich wieder der Vorteil eines „einfachen“ Window-Managers. Ohne große Umstände kann man fast alles konfigurieren und seinen Bedürfnissen anpassen.

 

Links

http://openbox.org/wiki/Help:Bindings
http://home.roadrunner.com/~computertaijutsu/fluxopen.html

 
4 Kommentare

Verfasst von - April 20, 2012 in Linux

 

Schlagwörter: , , , , , , ,

Lubuntu LXDE: Neue .conkyrc für den Systemmonitor Conky

Lubuntu LXDE: Neue .conkyrc für den Systemmonitor Conky

Seitdem ich Conky installiert habe (siehe Artikel: „Lubuntu LXDE: Systemmonitor Conky installieren„), komme ich nicht mehr davon weg, am Aussehen meines Desktops zu feilen. Mein aktueller Desktop sieht so aus, aber da geht noch was 😉

Wem das gefällt, der kann gerne die .conkyrc und die zusätzlich notwendige Skriptdatei „exaile_conky.py“ kopieren. Zusätzlich benötigt man die Schriftarten „weather.ttf“ (Download, Entpacken und , „wef_____.ttf “ nach „weather.ttf“ umbenennen), „Poky.ttf“ (Dowload, Entpacken und „Ponky.ttf“ in das Font-Verzeichnis kopieren), „PIZZADUDEBULLETS.ttf“ und „digirtu.ttf“ (sind ebenfalls im Download von „Putty.ttf“ enthalten). Ich habe mir die Font-Dateien in das Verzeichnis „~/.fonts/fonts“ kopiert und anschließend den Befehl „fc-cache“ im Home-Verzeichnis ausgeführt. Sollte das nicht reichen, ist evtl. eine Neuanmeldung oder ein Neustart des Systems notwendig – vom vielen Probieren bin ich mir da nicht mehr ganz sicher 😉

Für das Wetter benötigt man noch ConkyForecast – herunterladen und installieren. Die Datei „~/.conkyForecast.config“ muss noch angepasst werden, hier meine Datei:

CACHE_FOLDERPATH = /tmp/
CONNECTION_TIMEOUT = 5
EXPIRY_MINUTES = 30
TIME_FORMAT = %H:%M
DATE_FORMAT = %d/%m/%Y
LOCALE =de_DE
XOAP_PARTNER_ID =
XOAP_LICENCE_KEY =
MAXIMUM_DAYS_FORECAST = 7
BASE_XOAP_URL = http://xml.weather.com/weather/local/GMXX0003?cc=*&dayf=10&link=xoap&prod=xoap&par=&key=&unit=m

Wichtig ist hier den Loaction-Code „GMXX0003“ durch den eigenen zu ersetzen: Aufrufen von http://www.weather.com und nach der eigenen Stadt suchen. Am Ende der URL ist dann der entsprechende Location-Code zu finden.

Die Audio-Anzeige ist für den Audioplayer „Exaile“ angepasst, nur wenn der läuft, wird diese auch angezeigt!

Anbei noch die beiden anderen Dateien…

~/.conkyrc:

# Use Xft?
use_spacer none
use_xft yes
xftfont Terminus:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1.0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type desktop
background no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 350
maximum_width 350
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color white
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 10
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
# Use short unit
short_units on

# Colors
default_color DCDCDC #Gainsboro
color0 7FFF00 #Chartreuse
color1 FFA07A #LightSalmon
color2 FF8C00 #Darkorange
color3 778899 #LightSlateGrey
color4 FFD700 #Gold
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red

TEXT
${image ~/Bilder/lubuntu.png -p 28,29 -s 45x45}
${image ~/Bilder/Profil.jpg -p 298,29 -s 45x45}
${voffset 0}
${goto 99}Kernel: $kernel $machine
${goto 99}Uptime: $uptime_short
${goto 99}Users logon: $user_number

${goto 33}${font :style=Bold:pixelsize=12}BAT${voffset -6}${goto 70}${font Poky:pixelsize=22}T${font}${color 98FB98}${voffset -8} ${battery_bar 6,150 BAT0}${color}  ${battery BAT0} 

${goto 33}${font :style=Bold:pixelsize=12}CPU1${voffset -8} ${font Poky:pixelsize=22}P${font} ${voffset -5}${freq_g 1} GHz ${alignc}${voffset -7} ${cpugraph  CPU1 20,80 FFF6CD FF0B00 -t}
${voffset -30}${goto 246}${font :style=Bold:pixelsize=14}${cpu CPU1}%${font}
${voffset 15}${goto 33}${font :style=Bold:pixelsize=12}CPU2${voffset -8} ${font Poky:pixelsize=22}P${font} ${voffset -5}${freq_g 2} GHz ${alignc}${voffset -7} ${cpugraph  CPU2 20,80 FFF6CD FF0B00 -t}${alignr 20}${voffset -12}${font weather:pixelsize=32}zx${font}${voffset -32}  ${font :style=Bold:pixelsize=14}${acpitemp} C
${voffset -4}${goto 246}${font :style=Bold:pixelsize=12}${cpu CPU2}%${font}

${voffset 5}${goto 34}${font :style=Bold:pixelsize=12}MEM${font}${voffset -8} ${font Poky:pixelsize=22}a${font} ${voffset -5}  RAM: $mem v $memmax
${goto 100}${color A0CCFF}${membar 4,180}${color}
${goto 100}Swap: $swap v $swapmax
${goto 100}Load: ${color C7FF8E}$loadavg${color}
${goto 100}Processes: ${color C7FF8E}$processes${color}
${voffset 5}${goto 100}HIGHEST CPU${goto 238}HIGHEST MEM
${goto 100}${color #ddaa00}${top name 1}${goto 238}${color #ddaa00}${top_mem name 1}${color}
${goto 100}${color lightgrey}${top name 2}${goto 238}${top_mem name 2}${color}
${goto 100}${color lightgrey}${top name 3}${goto 238}${top_mem name 3}${color}

${if_up wlan0}
${voffset -8}${goto 33}${font :style=Bold:pixelsize=12}NET${font}${voffset -10} ${font Poky:pixelsize=22}Y${font}
${goto 100}${color lightgrey}${voffset -20}essid: '${wireless_essid wlan0}'   ${wireless_bitrate wlan0} ${color 9FFCC0}${wireless_link_bar 4,40 wlan0}${color}
${goto 100}${color lightgrey}IP: ${addr wlan0}${color}
${goto 100}Total:  down:${totaldown wlan0} / up:${totalup wlan0}
${endif}

${goto 33}${font :style=Bold:pixelsize=12} HD${font}${voffset -10} ${font Poky:pixelsize=22}y${font}
${voffset -20}${goto 100}Root: ${fs_free /} / ${fs_size /}
${goto 100}${color 83A1FF}${fs_bar 4,150 /}${color}

${voffset 5}${goto 33}${font :style=Bold:pixelsize=12}DAY${font}${voffset -12} ${font Poky:pixelsize=22}d${font}
${voffset -25}${alignc 40}${font Digital Readout Thick Upright:size=46}${time %H:%M:%S}${font}
${voffset 2}${alignc -25}${time %A %d %B %Y}, KW: ${time %U}

${if_up wlan0}
${voffset 5}${goto 33}${font :style=Bold:pixelsize=12}Wetter${font}${voffset -12} ${font Poky:pixelsize=22}w${font}
${voffset -30}${goto 150}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=GMXX0003 --datatype=HT}${font}
${voffset -35}${goto 260}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=GMXX0003 --datatype=WF}${font}
# Tage
${voffset 10}${alignc 10}${font Terminus:italic:size=8}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=1 --shortweekday} ${alignc -28}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=2 --shortweekday} ${alignc -69}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=3 --shortweekday} ${alignc -104}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=4 --shortweekday}${font}
# Pics
${voffset 0}${alignc 35}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=GMXX0003 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
#Temperaturanzeige
${voffset 0}${font DejaVu Sans:size=7}${alignc -20}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -54}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -80}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignc -110}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
${else}${if_up eth0}
${voffset -8}${goto 33}${font :style=Bold:pixelsize=12}Wetter${font}${voffset -12} ${font Poky:pixelsize=22}w${font}
${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=GMXX0003 --datatype=WF}${font}
${voffset -50}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=GMXX0003 --datatype=HT}${font}
${voffset 0}${alignc 43}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=1 --shortweekday} ${alignc 8}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=2 --shortweekday} ${alignc -29}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=3 --shortweekday} ${alignc -64}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=4 --shortweekday}
${voffset 0}${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=GMXX0003 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
${voffset 0}${font DejaVu Sans:size=7}${alignc 10}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -14}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -40}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 70}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
${endif}
${endif}
${if_running exaile}
${voffset -8}${goto 33}${font :style=Bold:pixelsize=12}Audio${font}${voffset -12} ${font Poky:pixelsize=22}l${font}
${voffset -18}${goto 120}${exec  /home/juergen/scripts/exaile_conky.py ART}/${exec  /home/juergen/scripts/exaile_conky.py ALB}
${voffset 4}${goto 120}${color 83A1FF}${font PizzaDude Bullets:size=14}${exec  /home/juergen/scripts/exaile_conky.py STA}${font} ${font Terminus:italic:size=8}${color 83A1FF}${exec  /home/juergen/scripts/exaile_conky.py TTL}${font}
${voffset 4}${goto 120}${color grey}POS ${exec  /home/juergen/scripts/exaile_conky.py POS} / ${exec /home/juergen/scripts/exaile_conky.py LNG} / ${exec  /home/juergen/scripts/exaile_conky.py PROG} % ${color lightblue}${execbar  /home/juergen/scripts/exaile_conky.py PROG} #size bar - see > default_bar_size
${voffset 16}${goto 120}${color grey}VOL ${exec /home/juergen/scripts/exaile_conky.py VOL} % ${execbar /home/juergen/scripts/exaile_conky.py VOL}
${endif}

~/scripts/exaile_conky.py:

#!/usr/bin/env python

import sys, dbus
import Image
from StringIO import StringIO

try:
    datar = sys.argv[1]
except:
    print "script parameter missing"
    sys.exit()
bus = dbus.SessionBus()
try:

    remote_object = bus.get_object("org.exaile.Exaile","/org/exaile/Exaile")
    iface = dbus.Interface(remote_object, "org.exaile.Exaile")
    if iface.IsPlaying():

        if datar == "POS": #Current position sec
            output = iface.CurrentPosition()
            print  output

        if  datar == "PROG": #play progress in percent
            output = iface.CurrentProgress()
            print  output

        if  datar == "STA": #status play/pause
            output = iface.GetState()
            if output == "playing": #blinking play button
               put = iface.CurrentPosition()
               put = put.replace(':', '')
               if (not int(put)%2 ):
		    print "V"
               else:
                    print  "X"

            elif output == "paused":
               print "Z"
            else:
              print "I"

        if  datar == "VOL": #volume
            output = iface.GetVolume()
            output = output.split('.')
            output = output[0]
            print output

        if  datar == "TTL": #title song
            output = iface.GetTrackAttr("title")
            print  output.encode('utf8')

        if  datar == "ALB": #album
            output = iface.GetTrackAttr("album")
            print  output.encode('utf8')

        if  datar == "ART": #artist
            output = iface.GetTrackAttr("artist")
            print  output.encode('utf8')

        if  datar == "LNG": #combo information about lenghtprogressfull lenght
            length = iface.GetTrackAttr("__length")
            if len(length) > 0:
                output1 = float(length)
                output = '%d:%02d' % (output1 // 60, output1 % 60)
            else:
                output = "-:--"

            print output

        if  datar == "TIK": #play progress in percent
            output = iface.CurrentPosition()
            output = output.replace(':', '')
            if (not int(output)%2 ):
		print "G"
            else:
                print  ""

#            dbusArray = iface.GetCoverData()
#            coverdata = "".join(chr(byte) for byte in dbusArray)
#            if coverdata:
#                im = Image.open(StringIO(coverdata))
#                im.show()

    else:
            print "q"
except dbus.exceptions.DBusException:
        print "I"

Viel Spass damit 🙂

Übrigens, für eigene Ideen zu Conky, Links und Tipps wäre ich dankbar!

Links:

http://puna.upf.edu/node/44

http://www.webupd8.org/2011/09/htc-like-clock-weather-conky.html

REW: Lubuntu LXDE: Systemmonitor Conky installierenSince I have installed conky (see post: „Lubuntu LXDE: Systemmonitor Conky installieren„), I allways wanted to improve the design. My current desktop looks like the following screenshot, but it is improvable and I will work on it 🙂

If you like it, you can can copy the .conkyrc and the exaile_conky.py file. Additionally you need the font „weather.ttf“ (download, decompress and rename  „wef_____.ttf “ to „weather.ttf“), „Poky.ttf“ (download, decompress and copy „Ponky.ttf“ to the font folder), „PIZZADUDEBULLETS.ttf“ and „digirtu.ttf“ (are part of  „Putty.ttf“).

I’ve copied all font files to folder „~/.fonts/fonts“ and afterwards I executed the command „fc-cache“ in my home folder. If this is not sufficient you should logout and login or maybe restart linux – to be honest from all the tests I am not really sure 😉

If you want to include the weather forecat you need ConkyForecast. Download and install it and edit the file „~/.conkyForecast.config“ as follows:

CACHE_FOLDERPATH = /tmp/
CONNECTION_TIMEOUT = 5
EXPIRY_MINUTES = 30
TIME_FORMAT = %H:%M
DATE_FORMAT = %d/%m/%Y
LOCALE =de_DE
XOAP_PARTNER_ID =
XOAP_LICENCE_KEY =
MAXIMUM_DAYS_FORECAST = 7
BASE_XOAP_URL = http://xml.weather.com/weather/local/GMXX0003?cc=*&dayf=10&link=xoap&prod=xoap&par=&key=&unit=m

It is important, that you substitude the location code „GMXX0003“ with your own. To do this you have to call http://www.weather.com and search for your home town. At the end of the returned url you will find the location code.

For the audio player I’ve adapted the output: Only if „Exaile“ is running, it will be shown!

The remaining two files…

~/.conkyrc:

# Use Xft?
use_spacer none
use_xft yes
xftfont Terminus:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1.0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type desktop
background no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 350
maximum_width 350
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 4
# border width
border_width 1
# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color white
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 10
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
# Use short unit
short_units on

# Colors
default_color DCDCDC #Gainsboro
color0 7FFF00 #Chartreuse
color1 FFA07A #LightSalmon
color2 FF8C00 #Darkorange
color3 778899 #LightSlateGrey
color4 FFD700 #Gold
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red

TEXT
${image ~/Bilder/lubuntu.png -p 28,29 -s 45x45}
${image ~/Bilder/Profil.jpg -p 298,29 -s 45x45}
${voffset 0}
${goto 99}Kernel: $kernel $machine
${goto 99}Uptime: $uptime_short
${goto 99}Users logon: $user_number

${goto 33}${font :style=Bold:pixelsize=12}BAT${voffset -6}${goto 70}${font Poky:pixelsize=22}T${font}${color 98FB98}${voffset -8} ${battery_bar 6,150 BAT0}${color}  ${battery BAT0} 

${goto 33}${font :style=Bold:pixelsize=12}CPU1${voffset -8} ${font Poky:pixelsize=22}P${font} ${voffset -5}${freq_g 1} GHz ${alignc}${voffset -7} ${cpugraph  CPU1 20,80 FFF6CD FF0B00 -t}
${voffset -30}${goto 246}${font :style=Bold:pixelsize=14}${cpu CPU1}%${font}
${voffset 15}${goto 33}${font :style=Bold:pixelsize=12}CPU2${voffset -8} ${font Poky:pixelsize=22}P${font} ${voffset -5}${freq_g 2} GHz ${alignc}${voffset -7} ${cpugraph  CPU2 20,80 FFF6CD FF0B00 -t}${alignr 20}${voffset -12}${font weather:pixelsize=32}zx${font}${voffset -32}  ${font :style=Bold:pixelsize=14}${acpitemp} C
${voffset -4}${goto 246}${font :style=Bold:pixelsize=12}${cpu CPU2}%${font}

${voffset 5}${goto 34}${font :style=Bold:pixelsize=12}MEM${font}${voffset -8} ${font Poky:pixelsize=22}a${font} ${voffset -5}  RAM: $mem v $memmax
${goto 100}${color A0CCFF}${membar 4,180}${color}
${goto 100}Swap: $swap v $swapmax
${goto 100}Load: ${color C7FF8E}$loadavg${color}
${goto 100}Processes: ${color C7FF8E}$processes${color}
${voffset 5}${goto 100}HIGHEST CPU${goto 238}HIGHEST MEM
${goto 100}${color #ddaa00}${top name 1}${goto 238}${color #ddaa00}${top_mem name 1}${color}
${goto 100}${color lightgrey}${top name 2}${goto 238}${top_mem name 2}${color}
${goto 100}${color lightgrey}${top name 3}${goto 238}${top_mem name 3}${color}

${if_up wlan0}
${voffset -8}${goto 33}${font :style=Bold:pixelsize=12}NET${font}${voffset -10} ${font Poky:pixelsize=22}Y${font}
${goto 100}${color lightgrey}${voffset -20}essid: '${wireless_essid wlan0}'   ${wireless_bitrate wlan0} ${color 9FFCC0}${wireless_link_bar 4,40 wlan0}${color}
${goto 100}${color lightgrey}IP: ${addr wlan0}${color}
${goto 100}Total:  down:${totaldown wlan0} / up:${totalup wlan0}
${endif}

${goto 33}${font :style=Bold:pixelsize=12} HD${font}${voffset -10} ${font Poky:pixelsize=22}y${font}
${voffset -20}${goto 100}Root: ${fs_free /} / ${fs_size /}
${goto 100}${color 83A1FF}${fs_bar 4,150 /}${color}

${voffset 5}${goto 33}${font :style=Bold:pixelsize=12}DAY${font}${voffset -12} ${font Poky:pixelsize=22}d${font}
${voffset -25}${alignc 40}${font Digital Readout Thick Upright:size=46}${time %H:%M:%S}${font}
${voffset 2}${alignc -25}${time %A %d %B %Y}, KW: ${time %U}

${if_up wlan0}
${voffset 5}${goto 33}${font :style=Bold:pixelsize=12}Wetter${font}${voffset -12} ${font Poky:pixelsize=22}w${font}
${voffset -30}${goto 150}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=GMXX0003 --datatype=HT}${font}
${voffset -35}${goto 260}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=GMXX0003 --datatype=WF}${font}
# Tage
${voffset 10}${alignc 10}${font Terminus:italic:size=8}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=1 --shortweekday} ${alignc -28}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=2 --shortweekday} ${alignc -69}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=3 --shortweekday} ${alignc -104}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=4 --shortweekday}${font}
# Pics
${voffset 0}${alignc 35}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=GMXX0003 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
#Temperaturanzeige
${voffset 0}${font DejaVu Sans:size=7}${alignc -20}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -54}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -80}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignc -110}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
${else}${if_up eth0}
${voffset -8}${goto 33}${font :style=Bold:pixelsize=12}Wetter${font}${voffset -12} ${font Poky:pixelsize=22}w${font}
${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=GMXX0003 --datatype=WF}${font}
${voffset -50}${font Weather:size=40}y${font} ${voffset -38}${font Arial Black:size=26}${execi 600 conkyForecast --location=GMXX0003 --datatype=HT}${font}
${voffset 0}${alignc 43}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=1 --shortweekday} ${alignc 8}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=2 --shortweekday} ${alignc -29}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=3 --shortweekday} ${alignc -64}${execpi 600 conkyForecast --location=GMXX0003 --datatype=DW --startday=4 --shortweekday}
${voffset 0}${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=GMXX0003 --datatype=WF --startday=1 --endday=4 --spaces=1}${font}
${voffset 0}${font DejaVu Sans:size=7}${alignc 10}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -14}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -40}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 70}${execpi 600 conkyForecast --location=GMXX0003 --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=GMXX0003 --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
${endif}
${endif}
${if_running exaile}
${voffset -8}${goto 33}${font :style=Bold:pixelsize=12}Audio${font}${voffset -12} ${font Poky:pixelsize=22}l${font}
${voffset -18}${goto 120}${exec  /home/juergen/scripts/exaile_conky.py ART}/${exec  /home/juergen/scripts/exaile_conky.py ALB}
${voffset 4}${goto 120}${color 83A1FF}${font PizzaDude Bullets:size=14}${exec  /home/juergen/scripts/exaile_conky.py STA}${font} ${font Terminus:italic:size=8}${color 83A1FF}${exec  /home/juergen/scripts/exaile_conky.py TTL}${font}
${voffset 4}${goto 120}${color grey}POS ${exec  /home/juergen/scripts/exaile_conky.py POS} / ${exec /home/juergen/scripts/exaile_conky.py LNG} / ${exec  /home/juergen/scripts/exaile_conky.py PROG} % ${color lightblue}${execbar  /home/juergen/scripts/exaile_conky.py PROG} #size bar - see > default_bar_size
${voffset 16}${goto 120}${color grey}VOL ${exec /home/juergen/scripts/exaile_conky.py VOL} % ${execbar /home/juergen/scripts/exaile_conky.py VOL}
${endif}

~/scripts/exaile_conky.py:

#!/usr/bin/env python

import sys, dbus
import Image
from StringIO import StringIO

try:
    datar = sys.argv[1]
except:
    print "script parameter missing"
    sys.exit()
bus = dbus.SessionBus()
try:

    remote_object = bus.get_object("org.exaile.Exaile","/org/exaile/Exaile")
    iface = dbus.Interface(remote_object, "org.exaile.Exaile")
    if iface.IsPlaying():

        if datar == "POS": #Current position sec
            output = iface.CurrentPosition()
            print  output

        if  datar == "PROG": #play progress in percent
            output = iface.CurrentProgress()
            print  output

        if  datar == "STA": #status play/pause
            output = iface.GetState()
            if output == "playing": #blinking play button
               put = iface.CurrentPosition()
               put = put.replace(':', '')
               if (not int(put)%2 ):
		    print "V"
               else:
                    print  "X"

            elif output == "paused":
               print "Z"
            else:
              print "I"

        if  datar == "VOL": #volume
            output = iface.GetVolume()
            output = output.split('.')
            output = output[0]
            print output

        if  datar == "TTL": #title song
            output = iface.GetTrackAttr("title")
            print  output.encode('utf8')

        if  datar == "ALB": #album
            output = iface.GetTrackAttr("album")
            print  output.encode('utf8')

        if  datar == "ART": #artist
            output = iface.GetTrackAttr("artist")
            print  output.encode('utf8')

        if  datar == "LNG": #combo information about lenghtprogressfull lenght
            length = iface.GetTrackAttr("__length")
            if len(length) > 0:
                output1 = float(length)
                output = '%d:%02d' % (output1 // 60, output1 % 60)
            else:
                output = "-:--"

            print output

        if  datar == "TIK": #play progress in percent
            output = iface.CurrentPosition()
            output = output.replace(':', '')
            if (not int(output)%2 ):
		print "G"
            else:
                print  ""

#            dbusArray = iface.GetCoverData()
#            coverdata = "".join(chr(byte) for byte in dbusArray)
#            if coverdata:
#                im = Image.open(StringIO(coverdata))
#                im.show()

    else:
            print "q"
except dbus.exceptions.DBusException:
        print "I"

Have fun with it 🙂

By the way, if would really appreciate if you could send me your ideas!

Links:

http://puna.upf.edu/node/44

http://www.webupd8.org/2011/09/htc-like-clock-weather-conky.html

REW: Lubuntu LXDE: Systemmonitor Conky installieren

 
3 Kommentare

Verfasst von - April 8, 2012 in Linux

 

Schlagwörter: , ,

 
Erstelle eine Website wie diese mit WordPress.com
Jetzt starten