@@ -466,71 +466,6 @@ vicious.register. Your function can accept `format` and `warg`
466466arguments , just like workers .
467467
468468
469- ## <a name ="power " ></a>Power and Caching
470-
471- When a lot of widgets are in use they , and awesome , can generate a lot
472- of wake - ups and also be very expensive for system resources . This is
473- especially important when running on battery power . It was a big
474- problem with awesome v2 and widgets that used shell scripts to gather
475- data , and with widget libraries written in languages like Ruby .
476-
477- Lua is an extremely fast and efficient programming language , and
478- Vicious takes advantage of that . But suspending Vicious widgets is one
479- way to prevent them from draining your battery , despite that .
480-
481- Update intervals also play a big role , and you can save a lot of power
482- with a smart approach . Don ' t use intervals like: 5, 10, 30, 60, … to
483- avoid harmonics . If you take the 60 - second mark as an example , all of
484- your widgets would be executed at that point . Instead think about
485- using only prime numbers , in that case you will have only a few
486- widgets executed at any given time interval . When choosing intervals
487- also consider what a widget actually does . Some widget types read
488- files that reside in memory , others call external utilities and some ,
489- like the mbox widget , read big files .
490-
491- Vicious can also cache values returned by widget types . Caching
492- enables you to have multiple widgets using the same widget type . With
493- caching its worker function gets executed only once - which is also
494- great for saving power .
495-
496- * Some widget types keep internal data and if you call one multiple times
497- without caching , the widget that executes it first would modify stored
498- values . This can lead to problems and give you inconsistent data . Remember
499- it for widget types like CPU and Network usage , which compare the old set of
500- data with the new one to calculate current usage .
501-
502- * Widget types that require a widget argument to be passed should be handled
503- carefully . If you are requesting information for different devices then
504- caching should not be used , because you could get inconsistent data .
505-
506-
507- ## Security
508-
509- At the moment only one widget type (Gmail ) requires auth . information
510- in order to get to the data . In the future there could be more , and
511- you should give some thought to the issue of protecting your data . The
512- Gmail widget type by default stores login information in the ~/ .netrc
513- file , and you are advised to make sure that file is only readable by
514- the owner . Other than that we can not force all users to conform to
515- one standard , one way of keeping it secure , like in some keyring .
516-
517- First let ' s clear why we simply don' t encrypt the login information
518- and store it in ciphertext . By exposing the algorithm anyone can
519- reverse the encryption steps . Some claim even that ' s better than
520- plaintext but it ' s just security trough obscurity.
521-
522- Here are some ideas actually worth your time . Users that have KDE (or
523- parts of it ) installed could store their login information into the
524- Kwallet service and request it via DBus from the widget type . It can
525- be done with tools like ` dbus-send` and ` qdbus` . The Gnome keyring
526- should support the same , so those with parts of Gnome installed could
527- use that keyring .
528-
529- Users of GnuPG (and its agent ) could consider encrypting the netrc
530- file with their GPG key . Trough the GPG Passphrase Agent they could
531- then decrypt the file transparently while their session is active .
532-
533-
534469## Usage examples
535470
536471Start with a simple widget , like `date `. Then build your setup from
0 commit comments