Commit Graph

1087 Commits

Author SHA1 Message Date
facetoe
3fcfb88084 Merge pull request #432 from facetoe/exceptions
Catch some common exceptions
2016-08-13 17:13:54 +08:00
Facetoe
30e2420f08 Revert breaking changes to disk.py
(163af76e89,
73dae9bfec)
2016-08-11 17:23:11 +08:00
Facetoe
6160f83045 Catch exceptions thrown when calling API 2016-08-10 20:51:38 +08:00
Facetoe
3b06134aab Catch exceptions thrown while checking calendar. 2016-08-10 20:51:09 +08:00
enkore
c6e29b2382 Merge pull request #427 from facetoe/required_settings
Ensure required settings are defined correctly.
2016-08-09 12:37:09 +02:00
Facetoe
8d8c0b6812 Update comment 2016-08-09 18:33:28 +08:00
Facetoe
c30365338b Refactor conditional to pass required setting tests.
If a setting is defined in a subclass and is not None do not raise
config error.
2016-08-09 18:20:40 +08:00
Facetoe
73dae9bfec Fix logic fail in disk.py 2016-08-08 16:38:41 +08:00
facetoe
b6122ae2ee Merge pull request #428 from facetoe/disk_metric
Add flexibility in calculating criticality.
2016-08-08 16:27:34 +08:00
facetoe
a816a9c9d7 Merge pull request #426 from facetoe/abc_radio
Add module for streaming ABC radio Australia.
2016-08-08 16:27:13 +08:00
facetoe
45c10d0fe9 Merge pull request #423 from jk0dick/add-modules
* Network multi color
* Add scratchpad module
* Add window_title module
2016-08-07 19:41:29 +08:00
limbe-osc
1f3581bcea bug fix 2016-08-07 19:16:44 +08:00
limbe-osc
25a21a3fe0 minor fix 2016-08-07 18:29:58 +08:00
Facetoe
8adbc0b8cb Add flexibility in calculating criticality.
Support using any of the calculated values for determining whether or not the module should alert.
2016-08-07 12:59:23 +08:00
ncoop
d906151ae2 Documented available callbacks. 2016-08-06 14:32:57 -07:00
ncoop
b179d29abf pep8 compliance. 2016-08-06 14:32:57 -07:00
ncoop
9769d1b7d0 stop method sends stop command to mpd via socket. 2016-08-06 14:32:36 -07:00
Facetoe
5bb40926b8 Ensure required settings are defined correctly.
Possible fix for #424. If a setting has not been overidden in a subclass
or set in the user's config then raise an exception.
2016-08-07 01:16:27 +08:00
Facetoe
952fd22115 Add module for streaming ABC radio Australia. 2016-08-07 00:18:34 +08:00
facetoe
1528f04de0 Merge pull request #410 from richese/clock_refactor
Refactor of `clock` module.
2016-08-06 22:12:15 +08:00
facetoe
36dfe06786 Merge pull request #416 from terminalmage/scores
Add format option, logic to handle suspended MLB games
2016-08-06 22:00:11 +08:00
facetoe
4095e4e051 Merge pull request #419 from ncoop/mpd-except
mpd: Catch KeyError
2016-08-06 21:59:16 +08:00
limbe-osc
5eb1f91151 remove deadbeef 2016-08-06 16:03:28 +08:00
limbe-osc
eb93387290 ci fix 2016-08-06 08:29:25 +08:00
limbe-osc
88b8813bd7 bug fix 2016-08-06 07:08:01 +08:00
limbe-osc
4882714382 merge network colour and network 2016-08-06 07:01:52 +08:00
limbe-osc
b7a73f5b46 add four modules 2016-08-05 22:11:09 +08: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
ncoop
54dfb17ecc Catch KeyError in self.status[status["state"]]. 2016-07-30 08:18:01 -07:00
facetoe
fce59b883c Fix display bug in CpuUsageGraph.
Addresses #417
2016-07-25 19:05:45 +08:00
Erik Johnson
6675f3fa6e Add score to default format string for suspended games 2016-07-24 10:46:11 -05:00
Erik Johnson
b7e0f8bbc4 Add format option, logic to handle suspended MLB games
Tonight's game was the first time I've seen the API return from a
suspended game. I added a separate format option for it.

I've also fixed date/time detection. The API returns different fields for if
a game ended after midnight eastern, and also different ones when a game
is suspended.
2016-07-24 00:50:45 -05:00
facetoe
d2b414f5c6 Support toggling connection on click. 2016-07-24 11:04:44 +08:00
Nicolas Hart
7e299ac270 add doc about access_token auth method 2016-07-24 00:07:40 +02:00
Nicolas Hart
ce0c040fcd Allow use of access_token in github module 2016-07-23 23:12:54 +02:00
Frechdachs
7caa3ecd3e Fix wrong dictionary key
Fixes the problem that one had to use ``{format_all}`` while the documentation clearly states ``{usage_all}``
2016-07-22 19:45:51 +02:00
facetoe
2603a394cd Merge pull request #412 from terminalmage/scores
Catch ConnectionResetError when making API request
2016-07-22 20:30:34 +08:00
Erik Johnson
d0defe0810 Properly identify rain-shortened games as final
These were erroneously being identified as pregame
2016-07-22 00:15:58 -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
Lukáš Mandák
c2f18885be Refactor of clock module.
Reintroduces `pytz` dependency for time zone data.
2016-07-16 15:24:55 +02:00
Erik Johnson
968c17a357 Catch ConnectionResetError when making API request
Caught this traceback in the log when an update failed to complete. Also
added a generic Exception catch-all.
2016-07-15 16:29:53 -05:00
enkore
9c414154fb Merge pull request #384 from rampage644/pomodoro_refactor
Pomodoro module timezone fix
2016-07-14 18:19:45 +02:00
enkore
7962a92a6d Merge pull request #400 from igsha/launcher
Treat i3pystatus as launcher
2016-07-14 18:19:10 +02:00
Erik Johnson
864449ee91 Fix MLB score backend when there is only one game
Apparently their API returns a single dict of game data instead of a
list of game data dicts, when there is just a single game scheduled.
2016-07-12 13:04:38 -05:00
enkore
2f5f3086d2 Merge pull request #379 from drwahl/master
openfiles: module to report open file handle count
2016-07-10 17:37:35 +02:00
enkore
9e9cb8dffc Merge pull request #399 from terminalmage/scores
Update EPL scores backend for offseason
2016-07-10 17:36:23 +02:00
facetoe
1051b76251 Merge pull request #398 from rscholer/imap-socket
imap - Catch socket.gaierror if no internet connection is available.
2016-07-10 21:42:30 +08:00
facetoe
3823cfd653 Merge pull request #407 from terminalmage/weather-icon
Change default weather icon for thunderstorm, add "Fog" weather condition
2016-07-10 14:07:17 +08:00
ncoop
322bcd5942 PEP8 compliance; remove unused IntervalModule. 2016-06-23 21:30:51 -07:00
ncoop
0570b51fa5 Catch AttributeError also. 2016-06-23 21:28:42 -07:00
Erik Johnson
495b736038 Better thunderstorm icon 2016-06-23 11:31:22 -05:00
Erik Johnson
7298b7782b Add "Fog" weather condition 2016-06-23 11:30:18 -05:00
enkore
806ebe9060 Merge pull request #366 from ncoop/iss364
Notification with update summary on_rightclick
2016-06-23 15:16:26 +02:00
facetoe
f3ffb96a17 Merge pull request #396 from asmikhailov/master
Fixed error with empty list
2016-06-23 20:20:16 +08:00
ncoop
2505468515 Notification support for aptget. 2016-06-22 23:57:40 -07:00
ncoop
f03926ed71 Put yaourt docs into code blocks; 80 char width. 2016-06-22 22:44:34 -07:00
ncoop
9d907732f1 Update notifications for pacman, cower, yaourt.
These modules are also runnable directly from terminal.
2016-06-22 22:44:25 -07:00
Erik Johnson
1cc93937e5 Change default weather icon for thunderstorm
I had added this to be able to use a different icon for thunderstorms,
which were at the time not even being detected as a weather condition
and were just falling back to the default (i.e. no colorization nor
icon). However, the only thunder/lightning unicode icon that is widely
available is too tall, leading to the entire module's text being
vertically-aligned on a different plane from the rest of the modules in
the status bar.

This commit changes the default icon to the same one used for "Rainy"
conditions, while preserving it as a distinct weather type so that
others can still use their own icon if they so choose.
2016-06-22 15:30:02 -05:00
Jonathan Gruber
42d8760462 Removed semicolon 2016-06-20 12:04:54 +02:00
Jonathan Gruber
1baaeb3ccc Added uppercase setting 2016-06-20 11:53:18 +02:00
Jonathan Gruber
f2adc64966 Added format string setting 2016-06-20 11:40:46 +02:00
Igor Sharonov
0a3679510e Treat i3pystatus as launcher 2016-06-19 22:18:07 +03:00
Erik Johnson
1f8e11fd6d Update EPL scores backend for offseason
During the offseason, the context URL which provides params used to
locate information on a given game redirects to the EPL mainpage.
This commit properly catches these cases, and also adds some helpful
logging to the ScoresBackend api_request() function.
2016-06-10 00:05:33 -05:00
Raphael Scholer
1b6dd7ea33 imap - Catch socket.gaierror if no internet connection is available 2016-06-09 22:11:43 +02:00
facetoe
b4e21dfd9e Merge pull request #394 from facetoe/pulseaudio_change_sink
Support changing sinks on the fly.
2016-06-08 20:52:58 +08:00
asmikhailov
07dd1bb159 Merged upstream master 2016-06-07 12:10:19 +03:00
facetoe
8140b3b73c Use sink name not index. 2016-06-07 16:24:04 +08:00
facetoe
3dcc2d7d8f Open calendar event on click. 2016-06-06 16:10:26 +08:00
facetoe
0215bdf5f1 Continue on 500/503 errors. 2016-06-06 15:53:54 +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
ncoop
ae1274d5d3 Makes update count algo less wrong. 2016-06-04 21:30:24 -07:00
ncoop
b73dbb1a35 Return early if the check threw an error. 2016-06-04 20:53:12 -07:00
ncoop
5272e10208 Dump data by running as __main__. 2016-06-04 20:32:33 -07:00
ncoop
48273a8205 Unknown update list gives empty string. 2016-06-04 19:54:21 -07:00
ncoop
51675430b1 Notification icon is customizable, and can be None 2016-06-04 19:54:21 -07:00
ncoop
d7d372ff5d Added format_summary option
By default, same as format
2016-06-04 19:54:21 -07:00
ncoop
7fb0794f45 Now returns both the count and a notification body 2016-06-04 19:54:21 -07:00
ncoop
616c68b0f0 Notification displayed on rightclick by default
Notification summary shows the count
Notification icon is `software-update-available`
notif_body concatenates raw or prepared output from all backends

Backends that don't yet output to notif_body should have harmless empty string

Also, linted according to flake8
Corrected typo
2016-06-04 19:54:20 -07:00
enkore
c8c09763c1 Merge pull request #383 from drwahl/temp
temp: add a "display_if" setting
2016-06-04 20:29:58 +02:00
enkore
89424d103c Merge pull request #382 from drwahl/gpu_temp
gpu_temp: add "display_if" setting
2016-06-04 20:29:51 +02:00
colajam93
ecb532a5ac Fix typo 2016-06-04 01:39:31 +09:00
Mehdi ABAAKOUK
2d7b3afaca Fix imap connection lost (#380)
Nothing in imap mail backend reinit the imap connection
when this one is lost, and then the backend always output "socket.error:..."

This change fixes that by cleanup the connection object when
connection is lost so get_connection() will recreate a new one.

This also remove the unless utils.internet() checks already done by
Mail().run()
2016-05-24 12:22:30 +02:00
eBrnd
cee2860138 add weekcal module (#388) 2016-05-24 12:21:06 +02:00
Stefan Tatschner
f059184411 Use CSFR Token in Syncthing module
Fixes #390
2016-05-24 10:24:56 +02:00
enkore
3ab7a58d03 spotify: pass player_name=spotify to playerctl 2016-05-22 22:18:29 +02:00
Sergei Turukin
ccb688c404 Quick fix 2016-05-18 15:49:20 +03:00
Sergei Turukin
cea50cbe5e Fix PEP8 issue 2016-05-18 14:53:59 +03:00
Sergei Turukin
565e4a66d1 Change pomodoro counting logic 2016-05-18 14:51:54 +03:00
Erik Johnson
8f9c878689 Make NHL team wins reflect series wins during playoffs
The win/loss values from the NHL data feed reset in the playoffs, but
don't reflect the current series. Instead, they reflect the current
win/loss total since the beginning of the playoffs.

This commit checks for a key in the API return data indicating that the
game is a playoff game, and if the game is a playoff game the team's
wins will be set to the remainder of the total wins divided by 4 (a team
with 6 overall wins will be assumed to have 2 wins in the current
playoff series).

The team's losses during a playoff series will be set to the amount of
wins for the opposing team.
2016-05-17 09:49:29 -05:00
Sergei Turukin
ae3721ce87 Flake8 fixes 2016-05-17 14:11:26 +03:00
Sergei Turukin
d4f209bfe9 Refactor. 2016-05-17 14:07:41 +03:00
Sergei Turukin
7ec7739055 Refactor
Use integer values for states instead of strings. Feels more optimal.
2016-05-17 14:01:37 +03:00
Sergei Turukin
575f682a61 Using utcnow helps to avoid timezone issues.
On timer start timezone is provided to `datetime.now()` call, but on refresh is not.
That cause a bug with wrong time difference (it include timezone diff). Didn't
dig deep enough to figure out why there is inconsistency with timezones so just
pin timezone info as it's not useful anyway.
2016-05-17 13:54:42 +03:00
David Wahlstrom
b901cec5a6 temp: add a "display_if" setting
Adds a "display_if" setting to temp module.  This is a snippet that will
be evaulated, and if the result is true, it will display the module's
output.
2016-05-11 13:38:28 -07:00
David Wahlstrom
cc3781a6c0 gpu_temp: add "display_if" setting
Adds a "display_if" setting to the gpu_temp module that allows the
output to be squelched unless some snippet has been evaluated as true.
2016-05-11 13:26:38 -07:00
David Wahlstrom
12c74674f2 openfiles: add tests and close files
Added a functional test and included a close() call on files that are
opened when the module/test run.
2016-05-06 09:12:33 -07:00
David Wahlstrom
d1de6c5fa3 openfiles: module to report open file handle count
This module will display the current open file handles and the kernel
setting for max open file handles.  This is particularly useful when
running applications that like to grab a lot of file handles to help
monitor if/when your system may run out of available file handles.
2016-05-06 08:45:34 -07:00
enkore
4611295475 Merge pull request #365 from ncoop/iss359
Stricter criteria for including query output
2016-05-03 09:47:17 +02:00
enkore
b5a4fd2ab0 Merge pull request #373 from terminalmage/scores
Add module to display sports scores
2016-05-03 09:46:01 +02:00
Erik Johnson
da104268ab Catch another odd weather.com weather condition
This properly colorizes when there is a thunderstorm and the weather.com
API response defines the current weather condition as "T-Storm". No idea
why they decide to do this, it's definitely not for brevity as they have
a "Thunderstorms in the Vicinity" weather condition as well. Just a
weird quirk of their API, I guess.
2016-05-02 22:08:12 -05:00