notify-send & df
März 17, 2006
Howto um auf Tastendruck, mit hilfe von notify-send, den verfügbaren Speicherplatz auf der Festplatte anzuzeigen.
Für Ubuntu Dapper Drake …
Als erste werden notify-send und xbindkey benötigt …
sudo aptitude install libnotify xbindkeys
nun das script erstellen
touch notify_disk
vi notify_disk
mein script sieht so aus …
#!/bin/bash
foo=`df -l -h -T | grep /`
v1=`echo $foo | cut -d ‘ ‘ -f 1`
v2=`echo $foo | cut -d ‘ ‘ -f 3`
v3=`echo $foo | cut -d ‘ ‘ -f 5`
v4=`echo $foo | cut -d ‘ ‘ -f 6`
notify-send „es sind auf „$v1″ noch „$v3″ von „$v2″ frei („$v4″)“
speichern und ausführbar machen …
chmod a+x notify_disk
ich hab das ganze nach /usr/local/bin/ kopiert … muss nicht aber kann …
sudo cp notify_disk /usr/local/bin/
nun noch in die locale .xbindkeysrc die tastenkombination eintragen … bei mir Ctrl+Alt+p
„notify_send“
m:0xc + c:33
Control+Alt + p
so nun noch xbindkey starten und mit Ctrl+Alt+p sollte nun ein notifycationpopup auf gehen …
Das sollen ersteinmal die Basics sein … man kann ja noch das Icon usw ändern aber dazu später mehr …
März 3, 2009 um 20:47 -- 1236113235
A very nice website !! Very well Done !!! instructions for an origami mouse raunchy redheads photos tampon string kingdom hearts rom for gba ranchi zeps bbs peavy mart catholic hymns lyrics giantess garden wikkipedia cherish and cali marie marty crisp undertakers wwe entrance music ambermodel lsmagazine avs actress talbot the incredibles walkthrough fort worth star telegram obituaries ibanez sr400 lebron james pregnant girlfriend sophia arden
März 20, 2009 um 08:03 -- 1237536192
This is the coolest La Cocina. alana soares galleries phaze ddl stardoll fun questionnaires for friends to fill out pokemoncrater xxxdessert household of faith lyrics parentalvideos pooped panties lauranubiles
März 30, 2009 um 09:58 -- 1238407094
Hello and congratulations! tuscany wine tours professional golf mini tours custom cruising travel trailers for sale tucson my travel light com italy walking tours costing 2450 travel agents uk win u2 vertigo tour tickets used travel trailers for sale in houston texas cruises from vancouver to alaska
Juni 30, 2009 um 12:58 -- 1246366712
Halli hallo!
Dein Howto ist eine gute Idee um sich mal schnell die Speicherverteilung anzuschauen. Mir ist eine Idee gekommen, wie man Dein Skript zu einem ganz abartigen Einzeiler verkürzen kann:
notify-send -t 10000 ‘Speicherverwaltung’ „$(df -lhT | grep /dev/[sh]d.. | tr -s ‘ ‘ | sed -r „s/([^ ]+) .* ([^ ]+) .* ([^ ]+) ([^ ]+)/Es sind auf \“\1\“ noch \3 von \2 frei\n (eingehängt als \“\4\“).’/“)“
Lauffähig unter Bash, getestet unter Gentoo Linux. Viel Spaß damit!