Commit Graph

33 Commits

Author SHA1 Message Date
Егор
0d7156b5b1 WIP: Fix pycodestyle errors (#653)
* Fix pycodestyle errors

W503 is condracting PEP-8 and was added to the default ignore list by
pycodestyle developers

* Use setup.cfg for pycodestyle ignore parameters

Addresses #651 (kind of). Appending ignores to the default list prevents
us from getting warnings that we don't care about.

* W503 is not in the default ignore list in 2.4.0
2018-08-06 13:29:19 +00:00
Mehdi Abaakouk
d3ae79301b pulseaudio: hides some error messages
When we move the sink of an application, it can fail, then pacmd
print error message on stdout, breaking the i3pystatus json.

This changes hides these messages since their are not really usefull.
2017-03-01 10:03:03 +01:00
Mehdi Abaakouk
d1e8f6f1b7 pulseaudio: allow to configure the sink
When we have multiple sinks, this change allows to have all/some of them
available in i3pystatus and to identify which one is currently the
default. Also it allows to configure if we want that the hook
change_sink move all inputs to the new sink or not.
2016-10-20 09:52:40 +02:00
hcpl
f678565666 Pulseaudio: fix non-working decrease_volume()
Also change switch_mute() and increase_volume() to look similar to
decrease_volume()
2016-10-07 02:25:13 +03:00
Jay Cornwall
91fae807ed Pulseaudio: Wait on child processes to avoid zombies
subprocess.Popen() does not implicitly wait() on the child process.
This leads to transient zombie pactl processes which are only reaped
as new processes are spawned.

Use synchronous subprocess communication to collect child process
return codes immediately and allow them to exit.
2016-07-31 15:17:49 -05:00
Jay Cornwall
1dabaf1c2e Pulseaudio: Update status immediately when volume changes
Volume changes may occur externally (e.g. through pactl bound to media
keys) or through mouse interaction. The new volume is received
asynchronously but can only be outputted at the next status poll,
causing a small delay.

Introduce Module.send_output() to allow a module to send its output
without delay. Invoke this method in the Pulseaudio sink info callback.
2016-07-17 18:12:38 -05:00
facetoe
8140b3b73c Use sink name not index. 2016-06-07 16:24:04 +08:00
facetoe
bdfed7136a Support changing sinks on the fly.
On double click, move all sink inputs to the next available
sink and set as default.
2016-06-06 15:43:15 +08:00
facetoe
b111fd62f1 Clean up code. 2016-03-28 08:46:25 +08:00
facetoe
3422469df0 Fix sink selection bug.
A sink in the SUSPENDED state would never be selected. Not sure if this
solution is correct...
2016-03-27 09:58:45 +08:00
Jo De Boeck
b711ba96ed Pulseaudio: Display/control active sink
Make sink a property which checks which sink is currently active.
Use pactl to control volumes which gets standard insalled with libpulse
which is already a requirement.
2016-03-23 20:46:04 +02:00
Kenny Keslar
7d90574212 Pulseaudio - use execute helper & fix program check 2016-03-02 15:40:16 -05:00
enkore
a356e42c12 Fix pulseaudio creating zombies (#293) 2016-01-05 12:51:39 +01:00
Simon Legner
72386c1fd3 Harmonize documentation wrt formatters 2015-04-07 19:40:28 +02:00
theswitch
bd7ed9704f pulseaudio: subscribe to default sink changes 2015-04-05 16:54:16 +10:00
Matthieu Coudron
d31cc380ef Follow up of https://github.com/enkore/i3pystatus/pull/149#issuecomment-67712619 .
This commit removes and replaces all the old methods 'on_*' by settings
with the same name. The old methods were renamed into more explicit names that can be used for the callbacks like "next_song","mute" etc...
For instance, you can test with:
status.register("clock",
	format=[
	    ("Format 0",'Europe/London'),
	    ("%a %-d Format 1",'Europe/Dublin'),
	    "%a %-d %b %X format 2",
	    ("%a %-d %b %X format 3", 'Europe/Paris'),
	],
	on_leftclick= ["urxvtc"] , # launch urxvtc on left click
	on_rightclick= ["scroll_format", 2] , # update format by steps of 2
	log_level=logging.DEBUG,
	)

This way much code could be removed from other modules, though I did it only for the clock module here.
2014-12-20 15:30:41 +01:00
Alex Timmermann
c2cb417fca fix volume percentage 2014-11-19 15:35:50 +01:00
enkore
b263c66baf Close #133 2014-10-23 12:25:40 +02:00
enkore
f18ee346c8 PEP 8 (I'm bored): pulseaudio 2014-10-14 16:53:09 +02:00
facetoe
556eed9fde Added toggle mute/unmute on left click, increment/decrement volume on
scroll.
2014-10-12 19:30:21 +08:00
facetoe
27182f3196 Added optional volume_bar and colors. 2014-10-12 18:14:47 +08:00
Frank Tackitt
16c6979ca9 Add color settings for muted/unmuted to pulseaudio plugin 2014-10-01 07:19:36 -07:00
Tom X. Tobin
bd66997f2f Support optional "format_muted" setting for audio modules
The alsa and pulseaudio modules now support an optional "format_muted"
setting. If provided, it will be used instead of "format" when the audio
is muted.
2014-06-11 18:58:41 -04:00
enkore
f06a76ad52 PEP8 2014-04-30 14:51:41 +02:00
enkore
aa09079903 Add detached_down option (#26)
And some other stuff I obviously forget to commit last time.
Oh, that's just the RST port... okay :)
2014-01-16 13:39:17 +01:00
enkore
c43a22c46d Optimize imports 2013-10-31 22:33:18 +01:00
enkore
769216392f pulseaudio: change context name to something meaningful 2013-10-23 16:55:22 +02:00
enkore
751f0bbb14 pulseaudio: add muted/unmuted options 2013-10-20 18:37:38 +02:00
enkore
78c01dd3e5 PEP8 2013-10-01 15:22:09 +02:00
enkore
3d796ce48e 3.22: pulseaudio fix -inf/db 2013-08-03 15:05:13 +02:00
enkore
ac2ed844ac Add 'Formatting' chapter to README 2013-08-03 14:40:57 +02:00
enkore
b179a55d28 pulse: db as int, add docs 2013-08-03 14:39:33 +02:00
enkore
f39e4b3684 pulseaudio: remove dependency, add dB volume
I added a minimal version of the bindings directly.

{db} is the volume in decibels relative to 100 % output, i.e.
0 db equal 100 %.
2013-08-03 13:36:44 +02:00