3.17: MPD: host parameter
This commit is contained in:
parent
5ee67aaefd
commit
11506f60f8
@ -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': '▷'}`)
|
||||
|
||||
|
||||
|
||||
|
@ -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 = {}
|
||||
|
||||
|
3
setup.py
3
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",
|
||||
|
Loading…
Reference in New Issue
Block a user