diff options
Diffstat (limited to 'py3status/modules')
24 files changed, 195 insertions, 156 deletions
diff --git a/py3status/modules/battery_level.py b/py3status/modules/battery_level.py index ae8fe33..4b25ea3 100644 --- a/py3status/modules/battery_level.py +++ b/py3status/modules/battery_level.py @@ -2,6 +2,12 @@ """ Display the battery level. +Configuration parameters: + - color_* : None means - get it from i3status config + - format : text with "text" mode. percentage with % replaces {} + - hide_when_full : hide any information when battery is fully charged + - mode : for primitive-one-char bar, or "text" for text percentage ouput + Requires: - the 'acpi' command line @@ -24,13 +30,7 @@ FULL_BLOCK = '█' class Py3status: """ - Configuration parameters: - - color_* : None means - get it from i3status config - - format : text with "text" mode. percentage with % replaces {} - - hide_when_full : hide any information when battery is fully charged - - mode : for primitive-one-char bar, or "text" for text percentage ouput """ - # available configuration parameters cache_timeout = 30 color_bad = None diff --git a/py3status/modules/bitcoin_price.py b/py3status/modules/bitcoin_price.py index 477394f..f530d27 100644 --- a/py3status/modules/bitcoin_price.py +++ b/py3status/modules/bitcoin_price.py @@ -2,6 +2,21 @@ """ Display bitcoin prices using bitcoincharts.com. +Configuration parameters: + - cache_timeout: Should be at least 15 min according to bitcoincharts. + - color_index : Index of the market responsible for coloration, + meaning that the output is going to be green if the + price went up and red if it went down. + default: -1 means no coloration, + except when only one market is selected + - field : Field that is displayed per market, + see http://bitcoincharts.com/about/markets-api/ + - hide_on_error: Display empty response if True, else an error message + - markets : Comma-separated list of markets. Supported markets can + be found at http://bitcoincharts.com/markets/list/ + - symbols : Try to match currency abbreviations to symbols, + e.g. USD -> $, EUR -> € and so on + @author Andre Doser <doser.andre AT gmail.com> """ import json @@ -19,22 +34,7 @@ except ImportError: class Py3status: """ - Configuration parameters: - - cache_timeout: Should be at least 15 min according to bitcoincharts. - - color_index : Index of the market responsible for coloration, - meaning that the output is going to be green if the - price went up and red if it went down. - default: -1 means no coloration, - except when only one market is selected - - field : Field that is displayed per market, - see http://bitcoincharts.com/about/markets-api/ - - hide_on_error: Display empty response if True, else an error message - - markets : Comma-separated list of markets. Supported markets can - be found at http://bitcoincharts.com/markets/list/ - - symbols : Try to match currency abbreviations to symbols, - e.g. USD -> $, EUR -> € and so on """ - # available configuration parameters cache_timeout = 900 color_index = -1 diff --git a/py3status/modules/bluetooth.py b/py3status/modules/bluetooth.py index 3818325..d6e25c8 100644 --- a/py3status/modules/bluetooth.py +++ b/py3status/modules/bluetooth.py @@ -2,6 +2,16 @@ """ Display bluetooth status. +Confiuration parameters: + - format : format when there is a connected device + - format_no_conn : format when there is no connected device + - format_no_conn_prefix : prefix when there is no connected device + - format_prefix : prefix when there is a connected device + +Format of status string placeholders + {name} : device name + {mac} : device MAC address + Requires: - hcitool @@ -20,15 +30,6 @@ BTMAC_RE = re.compile(r'[0-9A-F:]{17}') class Py3status: """ - Confiuration parameters: - - format : format when there is a connected device - - format_no_conn : format when there is no connected device - - format_no_conn_prefix : prefix when there is no connected device - - format_prefix : prefix when there is a connected device - - Format of status string placeholders - {name} : device name - {mac} : device MAC address """ # available configuration parameters cache_timeout = 10 diff --git a/py3status/modules/clementine.py b/py3status/modules/clementine.py index 2c5c66f..0d04f5b 100644 --- a/py3status/modules/clementine.py +++ b/py3status/modules/clementine.py @@ -11,9 +11,10 @@ from subprocess import check_output class Py3status: - + """ + """ # available configuration parameters - cache_timeout = 0 + cache_timeout = 5 def _getMetadatas(self): """ diff --git a/py3status/modules/dpms.py b/py3status/modules/dpms.py index 0753df4..c2d9c4e 100644 --- a/py3status/modules/dpms.py +++ b/py3status/modules/dpms.py @@ -13,6 +13,8 @@ from os import system class Py3status: + """ + """ def __init__(self): """ Detect current state on start. diff --git a/py3status/modules/glpi.py b/py3status/modules/glpi.py index 708ed4f..3c75c75 100644 --- a/py3status/modules/glpi.py +++ b/py3status/modules/glpi.py @@ -2,6 +2,14 @@ """ Display the total number of open tickets from GLPI. +Configuration parameters: + - critical : set bad color above this threshold + - db : database to use + - host : database host to connect to + - password : login password + - user : login user + - warning : set degraded color above this threshold + It features thresholds to colorize the output and forces a low timeout to limit the impact of a server connectivity problem on your i3bar freshness. """ @@ -11,7 +19,8 @@ import MySQLdb class Py3status: - + """ + """ # available configuration parameters critical = 20 db = '' diff --git a/py3status/modules/imap.py b/py3status/modules/imap.py index 47661f1..07190dd 100644 --- a/py3status/modules/imap.py +++ b/py3status/modules/imap.py @@ -2,6 +2,18 @@ """ Display the unread messages count from your IMAP account. +Configuration parameters: + - cache_timeout : how often to run this check + - criterion : status of emails to check for + - hide_if_zero : don't show on bar if 0 + - imap_server : IMAP server to connect to + - mailbox : name of the mailbox to check + - name : format to display + - new_mail_color : what color to output on new mail + - password : login password + - port : IMAP server port + - user : login user + @author obb """ @@ -10,7 +22,8 @@ from time import time class Py3status: - + """ + """ # available configuration parameters cache_timeout = 60 criterion = 'UNSEEN' diff --git a/py3status/modules/keyboard_layout.py b/py3status/modules/keyboard_layout.py index d8eb7cc..f4ad8a9 100644 --- a/py3status/modules/keyboard_layout.py +++ b/py3status/modules/keyboard_layout.py @@ -49,7 +49,8 @@ def setxkbmap(): class Py3status: - + """ + """ # available configuration parameters cache_timeout = 10 color = '' diff --git a/py3status/modules/mpd_status.py b/py3status/modules/mpd_status.py index a30830e..ed6e9ec 100644 --- a/py3status/modules/mpd_status.py +++ b/py3status/modules/mpd_status.py @@ -2,6 +2,21 @@ """ Display information from mpd. +Configuration parameters: + - format : indicator text format + - hide_when_paused / hide_when_stopped : hide any indicator, if + - host : mpd host + - max_width : if text length will be greater - it'll shrink it + - password : mpd password + - port : mpd port + +Format of result string can contain: + {state} - current state from STATE_CHARACTERS + Track information: + {track}, {artist}, {title}, {time}, {album}, {pos} + In additional, information about next track also comes in, + in analogue with current, but with next_ prefix, like {next_title} + Requires: - python-mpd2 (NOT python2-mpd2) # pip install python-mpd2 @@ -25,22 +40,7 @@ STATE_CHARACTERS = { class Py3status: """ - Configuration parameters: - - format : indicator text format - - hide_when_paused / hide_when_stopped : hide any indicator, if - - host : mpd host - - max_width : if text length will be greater - it'll shrink it - - password : mpd password - - port : mpd port - - Format of result string can contain: - {state} - current state from STATE_CHARACTERS - Track information: - {track}, {artist}, {title}, {time}, {album}, {pos} - In additional, information about next track also comes in, - in analogue with current, but with next_ prefix, like {next_title} """ - # available configuration parameters cache_timeout = 2 color = None diff --git a/py3status/modules/net_rate.py b/py3status/modules/net_rate.py index 961578b..705728a 100644 --- a/py3status/modules/net_rate.py +++ b/py3status/modules/net_rate.py @@ -2,6 +2,21 @@ """ Display the current network transfer rate. +Confiuration parameters: + - all_interfaces : ignore self.interfaces, but not self.interfaces_blacklist + - devfile : location of dev file under /proc + - format_no_connection : when there is no data transmitted from the start of the plugin + - hide_if_zero : hide indicator if rate == 0 + - interfaces : comma separated list of interfaces to track + - interfaces_blacklist : comma separated list of interfaces to ignore + - precision : amount of numbers after dot + +Format of status string placeholders: + {down} - download rate + {interface} - name of interface + {total} - total rate + {up} - upload rate + @author shadowprince @license Eclipse Public License """ @@ -17,22 +32,7 @@ UNITS = ["kb/s", "mb/s", "gb/s", "tb/s", ] # list of units, first one - value/I class Py3status: """ - Confiuration parameters: - - all_interfaces : ignore self.interfaces, but not self.interfaces_blacklist - - devfile : location of dev file under /proc - - format_no_connection : when there is no data transmitted from the start of the plugin - - hide_if_zero : hide indicator if rate == 0 - - interfaces : comma separated list of interfaces to track - - interfaces_blacklist : comma separated list of interfaces to ignore - - precision : amount of numbers after dot - - Format of status string placeholders: - interface - name of interface - total - total rate - up - upload rate - down - download rate """ - # available configuration parameters all_interfaces = True cache_timeout = 2 diff --git a/py3status/modules/netdata.py b/py3status/modules/netdata.py index c43ad06..9e81710 100644 --- a/py3status/modules/netdata.py +++ b/py3status/modules/netdata.py @@ -2,6 +2,11 @@ """ Display network speed and bandwidth usage. +Configuration parameters: + - cache_timeout : 0 by default, you usually want continuous monitoring + - low_* / med_* : coloration thresholds + - nic : the network interface to monitor (defaults to eth0) + @author Shahin Azad <ishahinism at Gmail> """ @@ -40,10 +45,6 @@ class GetData: class Py3status: """ - Configuration parameters: - - cache_timeout : 0 by default, you usually want continuous monitoring - - low_* / med_* : coloration thresholds - - nic : the network interface to monitor (defaults to eth0) """ # available configuration parameters cache_timeout = 2 diff --git a/py3status/modules/ns_checker.py b/py3status/modules/ns_checker.py index d21bbb0..f91843e 100644 --- a/py3status/modules/ns_checker.py +++ b/py3status/modules/ns_checker.py @@ -8,6 +8,12 @@ It's also possible to add additional nameservers by appending them in nameserver The default resolver can be overwritten with my_resolver.nameservers parameter. +Configuration parameters: + - domain : domain name to check + - lifetime : resolver lifetime + - nameservers : comma separated list of reference DNS nameservers + - resolvers : comma separated list of DNS resolvers to use + @author nawadanp """ @@ -17,11 +23,6 @@ import socket class Py3status: """ - Configuration parameters: - - domain : domain name to check - - lifetime : resolver lifetime - - nameservers : comma separated list of reference DNS nameservers - - resolvers : comma separated list of DNS resolvers to use """ # available configuration parameters domain = '' diff --git a/py3status/modules/online_status.py b/py3status/modules/online_status.py index 8176d21..7b6d7d6 100644 --- a/py3status/modules/online_status.py +++ b/py3status/modules/online_status.py @@ -2,6 +2,13 @@ """ Display if a connection to the internet is established. +Configuration parameters: + - cache_timeout : how often to run the check + - format_offline : what to display when offline + - format_online : what to display when online + - timeout : how long before deciding we're offline + - url : connect to this url to check the connection status + @author obb """ @@ -15,12 +22,6 @@ except: class Py3status: """ - Configuration parameters: - - cache_timeout : how often to run the check - - format_offline : what to display when offline - - format_online : what to display when online - - timeout : how long before deciding we're offline - - url : connect to this url to check the connection status """ # available configuration parameters cache_timeout = 10 diff --git a/py3status/modules/pingdom.py b/py3status/modules/pingdom.py index f47da68..482fc3f 100644 --- a/py3status/modules/pingdom.py +++ b/py3status/modules/pingdom.py @@ -5,6 +5,15 @@ Display the latest response time of the configured Pingdom checks. We also verify the status of the checks and colorize if needed. Pingdom API doc : https://www.pingdom.com/services/api-documentation-rest/ +Configuration parameters: + - app_key : create an APP KEY on pingdom first + - cache_timeout : how often to refresh the check from pingdom + - checks : comma separated pindgom check names to display + - login : pingdom login + - max_latency : maximal latency before coloring the output + - password : pingdom password + - request_timeout : pindgom API request timeout + Requires: - requests python module from pypi https://pypi.python.org/pypi/requests @@ -16,15 +25,6 @@ from time import time class Py3status: """ - Configuration parameters: - - app_key : create an APP KEY on pingdom first - - cache_timeout : how often to refresh the check from pingdom - - checks : comma separated pindgom check names to display - - login : pingdom login - - max_latency : maximal latency before coloring the output - - password : pingdom password - - request_timeout : pindgom API request timeout - """ # available configuration parameters app_key = '' diff --git a/py3status/modules/player_control.py b/py3status/modules/player_control.py index 1651327..3ee9b7d 100644 --- a/py3status/modules/player_control.py +++ b/py3status/modules/player_control.py @@ -7,6 +7,11 @@ Provides an icon to control simple functions of audio/video players: - stop (left click) - pause (middle click) +Configuration parameters: + - debug: enable verbose logging (bool) (default: False) + - supported_players: supported players (str) (comma separated list) + - volume_tick: percentage volume change on mouse wheel (int) (positive number or None to disable it) + @author Federico Ceratto <federico.ceratto@gmail.com>, rixx @license BSD """ @@ -26,13 +31,8 @@ def log(msg): class Py3status: """ - Configuration parameters: - - debug: enable verbose logging (bool) (default: False) - - supported_players: supported players (str) (comma separated list) - - volume_tick: percentage volume change on mouse wheel (int) (positive number or None to disable it) - """ - + # available configuration parameters debug = False pause_icon = u'❚❚' play_icon = u'▶' diff --git a/py3status/modules/pomodoro.py b/py3status/modules/pomodoro.py index 38f8020..25149a7 100644 --- a/py3status/modules/pomodoro.py +++ b/py3status/modules/pomodoro.py @@ -2,6 +2,17 @@ """ Display and control a Pomodoro countdown. +Configuration parameters: + - display_bar: display time in bars when True, otherwise in seconds + - max_breaks: maximum number of breaks + - num_progress_bars: number of progress bars + - sound_break_end: break end sound (file path) + - sound_pomodoro_end: pomodoro end sound (file path) + - sound_pomodoro_start: pomodoro start sound (file path) + - timer_break: normal break time (seconds) (requires pygame) + - timer_long_break: long break time (seconds) (requires pygame) + - timer_pomodoro: pomodoro time (seconds) (requires pygame) + @author Fandekasp (Adrien Lemaire), rixx, FedericoCeratto """ @@ -21,18 +32,7 @@ PROGRESS_BAR_ITEMS = u"▏▎▍▌▋▊▉" class Py3status: """ - Configuration parameters: - - display_bar: display time in bars when True, otherwise in seconds - - max_breaks: maximum number of breaks - - num_progress_bars: number of progress bars - - sound_break_end: break end sound (file path) - - sound_pomodoro_end: pomodoro end sound (file path) - - sound_pomodoro_start: pomodoro start sound (file path) - - timer_break: normal break time (seconds) (requires pygame) - - timer_long_break: long break time (seconds) (requires pygame) - - timer_pomodoro: pomodoro time (seconds) (requires pygame) """ - # available configuration parameters display_bar = False max_breaks = 4 diff --git a/py3status/modules/scratchpad_counter.py b/py3status/modules/scratchpad_counter.py index 3619cda..0468bcb 100644 --- a/py3status/modules/scratchpad_counter.py +++ b/py3status/modules/scratchpad_counter.py @@ -22,7 +22,8 @@ def find_scratch(tree): class Py3status: - + """ + """ # available configuration parameters cache_timeout = 5 format = "{} ⌫" # format of indicator. {} replaces with count of windows diff --git a/py3status/modules/spaceapi.py b/py3status/modules/spaceapi.py index c4eac58..ac70b2f 100644 --- a/py3status/modules/spaceapi.py +++ b/py3status/modules/spaceapi.py @@ -2,6 +2,14 @@ """ Display if your favorite hackerspace is open or not. +Configuration Parameters: + - cache_timeout: Set timeout between calls in seconds + - closed_color: color if space is closed + - closed_text: text if space is closed, strftime parameters will be translated + - open_color: color if space is open + - open_text: text if space is open, strftime parmeters will be translated + - url: URL to SpaceAPI json file of your space + @author timmszigat @license WTFPL <http://www.wtfpl.net/txt/copying/> """ @@ -15,15 +23,7 @@ import urllib.request class Py3status: """ - Configuration Parameters: - - cache_timeout: Set timeout between calls in seconds - - closed_color: color if space is closed - - closed_text: text if space is closed, strftime parameters will be translated - - open_color: color if space is open - - open_text: text if space is open, strftime parmeters will be translated - - url: URL to SpaceAPI json file of your space """ - # available configuration parameters cache_timeout = 60 closed_color = None diff --git a/py3status/modules/sysdata.py b/py3status/modules/sysdata.py index 34bf97a..f836bc1 100644 --- a/py3status/modules/sysdata.py +++ b/py3status/modules/sysdata.py @@ -70,7 +70,8 @@ class GetData: class Py3status: - + """ + """ # available configuration parameters cache_timeout = 10 med_threshold = 40 diff --git a/py3status/modules/vnstat.py b/py3status/modules/vnstat.py index 5955581..a348f69 100644 --- a/py3status/modules/vnstat.py +++ b/py3status/modules/vnstat.py @@ -2,6 +2,21 @@ """ Display vnstat statistics. +Coloring rules. + +If value is bigger that dict key, status string will turn to color, specified in the value. +Example: +coloring = { + 800: "#dddd00", + 900: "#dd0000", +} +(0 - 800: white, 800-900: yellow, >900 - red) + +Format of status string placeholders: + {down} - download + {total} - total + {up} - upload + Requires: - external program called "vnstat" installed and configured to work. @@ -43,24 +58,7 @@ def get_stat(statistics_type): class Py3status: """ - Coloring rules. - - If value is bigger that dict key, status string will turn to color, specified in the value. - Example: - coloring = { - 800: "#dddd00", - 900: "#dd0000", - } - (0 - 800: white, 800-900: yellow, >900 - red) - - Format of status string. - - Placeholders: - total - total - up - upload - down - download """ - # available configuration parameters cache_timeout = 180 coloring = {} diff --git a/py3status/modules/weather_yahoo.py b/py3status/modules/weather_yahoo.py index 0e5d880..aa35aaa 100644 --- a/py3status/modules/weather_yahoo.py +++ b/py3status/modules/weather_yahoo.py @@ -8,6 +8,12 @@ Based on Yahoo! Weather. forecast, thanks guys ! Find your city code using: http://answers.yahoo.com/question/index?qid=20091216132708AAf7o0g +Configuration parameters: + - cache_timeout : how often to check for new forecasts + - city_code : city code to use + - forecast_days : how many forecast days you want shown + - request_timeout : check timeout + The city_code in this example is for Paris, France => FRXX0076 """ diff --git a/py3status/modules/whoami.py b/py3status/modules/whoami.py index aea11fb..dbce05c 100644 --- a/py3status/modules/whoami.py +++ b/py3status/modules/whoami.py @@ -11,7 +11,8 @@ from time import time class Py3status: - + """ + """ # available configuration parameters cache_timeout = 1800 diff --git a/py3status/modules/window_title.py b/py3status/modules/window_title.py index a24f61c..7d7e306 100644 --- a/py3status/modules/window_title.py +++ b/py3status/modules/window_title.py @@ -33,7 +33,8 @@ def find_focused(tree): class Py3status: - + """ + """ # available configuration parameters cache_timeout = 0.5 max_width = 120 # if width of title is greater, shrink it and add '...' diff --git a/py3status/modules/xrandr.py b/py3status/modules/xrandr.py index ef88925..aea57b6 100644 --- a/py3status/modules/xrandr.py +++ b/py3status/modules/xrandr.py @@ -15,6 +15,28 @@ For convenience, this module also proposes some added features: - Automatically apply this screen combination on start: no need for xorg! - Automatically move workspaces to screens when they are available +Configuration parameters: + - cache_timeout: how often to (re)detect the outputs + - fallback: when the current output layout is not available anymore, + fallback to this layout if available. This is very handy if you + have a laptop and switched to an external screen for presentation + and want to automatically fallback to your laptop screen when you + disconnect the external screen. + - force_on_start: switch to the given combination mode if available + when the module starts (saves you from having to configure xorg) + - format_clone: string used to display a 'clone' combination + - format_extend: string used to display a 'extend' combination + +Dynamic configuration parameters: + - <OUTPUT>_pos: apply the given position to the OUTPUT + Example: DP1_pos = "-2560x0" + Example: DP1_pos = "left-of LVDS1" + Example: DP1_pos = "right-of eDP1" + + - <OUTPUT>_workspaces: comma separated list of workspaces to move to + the given OUTPUT when it is activated + Example: DP1_workspaces = "1,2,3" + Example config: xrandr { force_on_start = "eDP1+DP1" @@ -36,27 +58,6 @@ from time import sleep, time class Py3status: """ - Configuration parameters: - - cache_timeout: how often to (re)detect the outputs - - fallback: when the current output layout is not available anymore, - fallback to this layout if available. This is very handy if you - have a laptop and switched to an external screen for presentation - and want to automatically fallback to your laptop screen when you - disconnect the external screen. - - force_on_start: switch to the given combination mode if available - when the module starts (saves you from having to configure xorg) - - format_clone: string used to display a 'clone' combination - - format_extend: string used to display a 'extend' combination - - Dynamic configuration parameters: - - <OUTPUT>_pos: apply the given position to the OUTPUT - Example: DP1_pos = "-2560x0" - Example: DP1_pos = "left-of LVDS1" - Example: DP1_pos = "right-of eDP1" - - - <OUTPUT>_workspaces: comma separated list of workspaces to move to - the given OUTPUT when it is activated - Example: DP1_workspaces = "1,2,3" """ # available configuration parameters cache_timeout = 10 |
