diff --git a/README.md b/README.md index a467b08..e0be4ae 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ __Settings:__ * `alert_format_body` — (default: `Battery {battery_ident} has only {percentage:.2f}% ({remaining_hm}) remaining!`) * `alert_percentage` — (default: `10`) * `path` — (default: `None`) -* `status` — A dictionary mapping ('DIS', 'CHR', 'FULL') to alternative names (default: `{'FULL': 'FULL', 'CHR': 'CHR', 'DIS': 'DIS'}`) +* `status` — A dictionary mapping ('DIS', 'CHR', 'FULL') to alternative names (default: `{'CHR': 'CHR', 'DIS': 'DIS', 'FULL': 'FULL'}`) @@ -288,12 +288,15 @@ Available formatters: * len (Length of current playlist) * status +Left click on the module play/pauses, right click (un)mutes. + __Settings:__ +* `host` — (default: `localhost`) * `port` — MPD port (default: `6600`) * `format` — (default: `{title} {status}`) -* `status` — Dictionary mapping pause, play and stop to output (default: `{'pause': '▷', 'play': '▶', 'stop': '◾'}`) +* `status` — Dictionary mapping pause, play and stop to output (default: `{'stop': '◾', 'play': '▶', 'pause': '▷'}`) diff --git a/i3pystatus/mpd.py b/i3pystatus/mpd.py index dff3a2c..d97f533 100644 --- a/i3pystatus/mpd.py +++ b/i3pystatus/mpd.py @@ -23,11 +23,13 @@ class MPD(IntervalModule): interval = 1 settings = ( + ("host"), ("port", "MPD port"), "format", ("status", "Dictionary mapping pause, play and stop to output") ) + host = "localhost" port = 6600 format = "{title} {status}" status = { @@ -48,7 +50,7 @@ class MPD(IntervalModule): ) def run(self): - with socket.create_connection(("localhost", self.port)) as s: + with socket.create_connection((self.host, self.port)) as s: s.recv(8192) fdict = {} diff --git a/setup.py b/setup.py index 8826687..dd67cf4 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name="i3pystatus", - version="3.16", + version="3.17", description="Like i3status, this generates status line for i3bar / i3wm", url="http://github.com/enkore/i3pystatus", license="MIT", @@ -15,7 +15,6 @@ setup(name="i3pystatus", "Programming Language :: Python :: 3", "Topic :: Desktop Environment :: Window Managers", ], - packages=[ "i3pystatus", "i3pystatus.core",