Commit Graph

31 Commits

Author SHA1 Message Date
enkore
dec534ce81 Fix errorneous recursive replace mishap 2016-01-27 20:02:51 +01:00
enkore
0743767385 Two line if 2016-01-27 20:00:50 +01:00
enkore
612b8b07eb Update modules to a7583a9
Not updated for various reasons:
clock,
dpms,
gpu_temp,
load,
mail,
mem_bar,
modsde,
net_speed,
pianobar,
pulseaudio,
regex [no named formatters],
runwatch,
shell,
solaar,
temp,
text,
updates,
weather,
whosonlocation,
xkblayout,
zabbix


This might break something: I can't test all these modules. If it does,
file a bug / open a PR / send me a note.
2016-01-27 19:53:33 +01:00
schroeji
f68d790ccc Removed spaces in front of the colons to pass Travis CI. 2015-09-17 10:46:37 +02:00
schroeji
8a3b8c2112 Fixed a race condition which sometimes caused an empty output. 2015-09-16 23:25:34 +02:00
Raphael Scholer
4823d56531 cmus - Use #fffff as default text color
This is the default for most modules.
2015-08-19 18:07:42 +02:00
Raphael Scholer
aaf8eb38ea cmus - Text can now be a different color, when cmus is not running 2015-08-19 18:07:42 +02:00
Raphael Scholer
2eb0abf596 cmus - Make expected result in Cmus.run clearer 2015-08-19 18:07:29 +02:00
Raphael Scholer
1f97408709 cmus - Allow changing of output when cmus is not running
This closes enkore/i3pystatus#226
2015-08-19 18:04:03 +02:00
Raphael Scholer
2b12fb6fe7 cmus - Expose status output mapping as a setting 2015-08-19 07:31:30 +02:00
Raphael Scholer
e979e28aec cmus - One line per from ... import 2015-08-19 07:14:49 +02:00
Raphael Scholer
a1f2636c3c cmus - Make Cmus.run() more pythonic
- Remove duplicate declaration of self.output
- Remove unneccesary stripping of artist and title information. This
  is take care of in the information gathering functions/methods.
- Group code into sections
- Make exit path more obvious
- Make retrival of filename more obvious
- Use more obvious variable names
2015-08-19 06:42:02 +02:00
Raphael Scholer
37c30f645d cmus - Make Cmus._query_cmus more pythonic
- Use string.partition instead of excessive slicing
- Use splitlines instead of split('\n'). This also reduces the times the
  for-loop is run.
2015-08-19 06:15:44 +02:00
Raphael Scholer
e943831b12 cmus - Remove unused class property 2015-08-19 06:00:07 +02:00
Raphael Scholer
6996c0b575 cmus - Update settings information
- Remove duplicate information (available formatters are also listed in
  docstriong)
- Add description for 'color' setting
2015-08-19 05:55:11 +02:00
Raphael Scholer
502000a467 cmus - Simplify extraction of artist and title information
The "fallback" did exactly what the preceeding code did.
2015-08-19 05:28:56 +02:00
Raphael Scholer
5583324c13 cmus - Use run_through_shell() 2015-08-18 21:21:16 +02:00
Raphael Scholer
0daf4ea0c1 cmus - Remove superflous empty line 2015-08-18 21:12:17 +02:00
Raphael Scholer
f93dfcde60 cmus - Replace double quote with single quote 2015-08-18 18:01:50 +02: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
Sergei Turukin
8913450ac2 PEP8 fix, hope wont' break rST parser as well 2014-12-11 13:54:31 +02:00
Sergei Turukin
2a5c0e77a0 Insert blank line to make rST happy 2014-12-11 13:29:14 +02:00
Sergei Turukin
eab6f77bd6 PEP8 fix 2014-12-10 19:19:11 +02:00
Sergei Turukin
d0f76a2d97 PEP8 fix 2014-12-10 18:25:32 +02:00
Sergei Turukin
f263cb55e8 Update format string description 2014-12-10 18:23:25 +02:00
Sergei Turukin
6593c580ae Improve doc for available formatters for cmus module 2014-12-10 18:20:51 +02:00
Sergei Turukin
b89b1c783f PEP8 fixes 2014-12-09 16:56:35 +02:00
Sergei Turukin
a1c66f33b5 Update heuristics for getting artist/title from filename 2014-12-09 16:48:14 +02:00
Sergei Turukin
b1a7dba986 Fix module with no cmus running 2014-10-30 11:59:18 +02:00
Sergei Turukin
1ca35c238e Pep8 formatting 2014-10-23 14:35:06 +03:00
Sergei Turukin
2ae45ec1e7 Add cmus module
Use `cmus-remote` to get info and send commands to `cmus`.
2014-10-22 18:30:40 +03:00