Harmonize documentation wrt formatters

This commit is contained in:
Simon Legner 2015-04-07 19:40:28 +02:00
parent e92e93f0e7
commit 72386c1fd3
14 changed files with 45 additions and 34 deletions

View File

@ -20,9 +20,9 @@ class CpuUsage(IntervalModule):
.. rubric:: Available formatters .. rubric:: Available formatters
* {usage} usage average of all cores * `{usage}` usage average of all cores
* {usage_cpu*} usage of one specific core. replace "*" by core number starting at 0 * `{usage_cpu*}` usage of one specific core. replace "*" by core number starting at 0
* {usage_all} usage of all cores separate. usess natsort when available(relevant for more than 10 cores) * `{usage_all}` usage of all cores separate. usess natsort when available(relevant for more than 10 cores)
""" """

View File

@ -15,8 +15,8 @@ class CpuUsageBar(CpuUsage, ColorRangeModule):
.. rubric:: Available formatters .. rubric:: Available formatters
* {usage_bar} usage average of all cores * `{usage_bar}` usage average of all cores
* {usage_bar_cpuN} usage of one specific core. replace "N" by core number starting at 0 * `{usage_bar_cpu*}` usage of one specific core. replace "*" by core number starting at 0
""" """
format = "{usage_bar}" format = "{usage_bar}"

View File

@ -14,10 +14,10 @@ class CpuUsageGraph(CpuUsage, ColorRangeModule):
.. rubric:: Available formatters .. rubric:: Available formatters
* {cpu_graph} graph of cpu usage. * `{cpu_graph}` graph of cpu usage.
* {usage} usage average of all cores * `{usage}` usage average of all cores
* {usage_cpu*} usage of one specific core. replace "*" by core number starting at 0 * `{usage_cpu*}` usage of one specific core. replace "*" by core number starting at 0
* {usage_all} usage of all cores separate. usess natsort when available(relevant for more than 10 cores) * `{usage_all}` usage of all cores separate. usess natsort when available(relevant for more than 10 cores)
""" """
settings = ( settings = (

View File

@ -12,8 +12,8 @@ class Github(IntervalModule):
Formatters: Formatters:
* `{unread}` - contains the value of unread_marker when there are pending notifications * `{unread}` contains the value of unread_marker when there are pending notifications
* `{unread_count}` - number of unread notifications, empty if 0 * `{unread_count}` number of unread notifications, empty if 0
""" """
max_error_len = 50 max_error_len = 50

View File

@ -7,7 +7,7 @@ class Keyboard_locks(IntervalModule):
""" """
Shows the status of CAPS LOCK, NUM LOCK and SCROLL LOCK Shows the status of CAPS LOCK, NUM LOCK and SCROLL LOCK
Available formatters: .. rubric:: Available formatters
* `{caps}` the current status of CAPS LOCK * `{caps}` the current status of CAPS LOCK
* `{num}` the current status of NUM LOCK * `{num}` the current status of NUM LOCK
@ -17,8 +17,7 @@ class Keyboard_locks(IntervalModule):
interval = 1 interval = 1
settings = ( settings = (
("format", "Format string. " ("format", "Format string"),
"Available formaters are {core} and {usage}."),
("caps_on", "String to show in {caps} when CAPS LOCK is on"), ("caps_on", "String to show in {caps} when CAPS LOCK is on"),
("caps_off", "String to show in {caps} when CAPS LOCK is off"), ("caps_off", "String to show in {caps} when CAPS LOCK is off"),
("num_on", "String to show in {num} when NUM LOCK is on"), ("num_on", "String to show in {num} when NUM LOCK is on"),

View File

@ -8,12 +8,18 @@ except ImportError:
class Load(IntervalModule): class Load(IntervalModule):
""" """
Shows system load Shows system load
.. rubric:: Available formatters
* `{avg1}` the load average of the last minute
* `{avg5}` the load average of the last five minutes
* `{avg15}` the load average of the last fifteen minutes
* `{tasks}` the number of tasks (e.g. 1/285, which indiciates that one out of 285 total tasks is runnable)
""" """
format = "{avg1} {avg5}" format = "{avg1} {avg5}"
settings = ( settings = (
("format", "format",
"format string used for output. {avg1}, {avg5} and {avg15} are the load average of the last one, five and fifteen minutes, respectively. {tasks} is the number of tasks (i.e. 1/285, which indiciates that one out of 285 total tasks is runnable)."),
("color", "The text color"), ("color", "The text color"),
("critical_limit", "Limit above which the load is considered critical, defaults to amount of cores."), ("critical_limit", "Limit above which the load is considered critical, defaults to amount of cores."),
("critical_color", "The critical color"), ("critical_color", "The critical color"),

View File

@ -29,7 +29,7 @@ class Mem(IntervalModule):
settings = ( settings = (
("format", "format string used for output."), ("format", "format string used for output."),
("divisor", ("divisor",
"divide all byte values by this value, default 1024**2(mebibytes"), "divide all byte values by this value, default is 1024**2 (megabytes)"),
("warn_percentage", "minimal percentage for warn state"), ("warn_percentage", "minimal percentage for warn state"),
("alert_percentage", "minimal percentage for alert state"), ("alert_percentage", "minimal percentage for alert state"),
("color", "standard color"), ("color", "standard color"),

View File

@ -10,7 +10,7 @@ class MPD(IntervalModule):
""" """
Displays various information from MPD (the music player daemon) Displays various information from MPD (the music player daemon)
Available formatters (uses :ref:`formatp`) .. rubric:: Available formatters (uses :ref:`formatp`)
* `{title}` (the title of the current song) * `{title}` (the title of the current song)
* `{album}` (the album of the current song, can be an empty string (e.g. for online streams)) * `{album}` (the album of the current song, can be an empty string (e.g. for online streams))

View File

@ -221,6 +221,7 @@ class Network(IntervalModule, ColorRangeModule):
.. rubric:: Available formatters .. rubric:: Available formatters
Network Traffic Formatters: Network Traffic Formatters:
* `{interface}` the configured network interface * `{interface}` the configured network interface
* `{kbs}` Float representing kb\s * `{kbs}` Float representing kb\s
* `{network_graph}` Unicode graph representing network usage * `{network_graph}` Unicode graph representing network usage
@ -230,6 +231,7 @@ class Network(IntervalModule, ColorRangeModule):
* `{packets_recv}` bytes received per second (divided by divisor) * `{packets_recv}` bytes received per second (divided by divisor)
Network Information Formatters: Network Information Formatters:
* `{interface}` same as setting * `{interface}` same as setting
* `{v4}` IPv4 address * `{v4}` IPv4 address
* `{v4mask}` subnet mask * `{v4mask}` subnet mask
@ -240,6 +242,7 @@ class Network(IntervalModule, ColorRangeModule):
* `{mac}` MAC of interface * `{mac}` MAC of interface
Wireless Information Formatters: Wireless Information Formatters:
* `{essid}` ESSID of currently connected wifi * `{essid}` ESSID of currently connected wifi
* `{freq}` Current frequency * `{freq}` Current frequency
* `{quality}` Link quality in percent * `{quality}` Link quality in percent

View File

@ -20,7 +20,7 @@ class NowPlaying(IntervalModule):
Left click on the module play/pauses, right click goes to the next track. Left click on the module play/pauses, right click goes to the next track.
Available formatters (uses :ref:`formatp`) .. rubric:: Available formatters (uses :ref:`formatp`)
* `{title}` (the title of the current song) * `{title}` (the title of the current song)
* `{album}` (the album of the current song, can be an empty string (e.g. for online streams)) * `{album}` (the album of the current song, can be an empty string (e.g. for online streams))

View File

@ -15,7 +15,7 @@ class PulseAudio(Module, ColorRangeModule):
- Requires amixer for toggling mute and incrementing/decrementing volume on scroll. - Requires amixer for toggling mute and incrementing/decrementing volume on scroll.
- Depends on the PyPI colour module - https://pypi.python.org/pypi/colour/0.0.5 - Depends on the PyPI colour module - https://pypi.python.org/pypi/colour/0.0.5
.. rubric:: Available formatters: .. rubric:: Available formatters
* `{volume}` volume in percent (0...100) * `{volume}` volume in percent (0...100)
* `{db}` volume in decibels relative to 100 %, i.e. 100 % = 0 dB, 50 % = -18 dB, 0 % = -infinity dB * `{db}` volume in decibels relative to 100 %, i.e. 100 % = 0 dB, 50 % = -18 dB, 0 % = -infinity dB

View File

@ -14,13 +14,13 @@ class pyLoad(IntervalModule):
.. rubric:: Available formatters .. rubric:: Available formatters
* `{captcha}` (see captcha_true and captcha_false, which are the values filled in for this formatter) * `{captcha}` see captcha_true and captcha_false, which are the values filled in for this formatter
* `{progress}` (average over all running downloads) * `{progress}` average over all running downloads
* `{progress_all}` (percentage of completed files/links in queue) * `{progress_all}` percentage of completed files/links in queue
* `{speed}` (kilobytes/s) * `{speed}` kilobytes/s
* `{download}` (downloads enabled, also see download_true and download_false) * `{download}` downloads enabled, also see download_true and download_false
* `{total}` (number of downloads) * `{total}` number of downloads
* `{free_space}` (free space in download directory in gigabytes) * `{free_space}` free space in download directory in gigabytes
""" """
interval = 5 interval = 5

View File

@ -12,7 +12,10 @@ class RunWatch(IntervalModule):
You can use this to check if a specific application, You can use this to check if a specific application,
such as a VPN client or your DHCP client is running. such as a VPN client or your DHCP client is running.
Available formatters are {pid} and {name}. .. rubric:: Available formatters
* {pid}
* {name}
""" """
format_up = "{name}" format_up = "{name}"

View File

@ -7,13 +7,13 @@ class Uname(Module):
""" """
uname(1) like module. uname(1) like module.
Formatters: .. rubric:: Available formatters
- {sysname}: operating system name * `{sysname}` operating system name
- {nodename}: name of machine on network (implementation-defined) * `{nodename}` name of machine on network (implementation-defined)
- {release}: operating system release * `{release}` operating system release
- {version}: operating system version * `{version}` operating system version
- {machine}: hardware identifier * `{machine}` hardware identifier
""" """
format = "{sysname} {release}" format = "{sysname} {release}"