Commit Graph

1842 Commits

Author SHA1 Message Date
Facetoe
fc2ae2a387 Fix regression introduced in #595. (#597)
Whenever the connecting to the remote server fails, query DNS and cache the result. This
should reduce the number of DNS requests the internet predicate
generates without changing the behaviour.
2017-07-28 19:06:22 +08:00
Facetoe
351738f33d Reduce overhead of internet predicate. (#595)
* Reduce overhead of internet predicate.

* Use 8.8.8.8 instead of google-public-dns-a.google.com save a DNS lookup.

* Use time.perf_counter instead of time.time().

Allow user to configure check frequency.
2017-07-19 13:52:27 +08:00
Armin F. Gnosa
63485566f1 migrate simple BTC rate queries to bitcoinaverage.com v2 API (#587) 2017-06-27 18:19:19 +02:00
Paul Friedrich
1874f3dda8 added a module to monitor the current status of SABnzbd (#589)
* added a module to monitor the current status of SABnzbd

* added the ability to open SABnzbd inside a browser by rightclicking

* added some error handling

* minor cleanup
2017-06-27 18:18:51 +02:00
Matti Niemenmaa
c6f9202380 core/desktop: don't crash if gi exists but is empty (#314)
Many packages install something into gi/overrides. If the gobject
package itself is not installed, the import of gi succeeds but
require_version is not contained within, resulting in an AttributeError.
2017-06-26 17:36:19 +02:00
Facetoe
1db757a2e2 Fix bug that prevented module errors being displayed in bar (#586)
* Fix bug that prevented errors being shown in bar.

* Add tests to ensure errors are visible in the bar.
2017-06-16 14:34:24 +07:00
Facetoe
4ec39cacb0 Prevent battery module spamming notifications. (#581)
* Prevent battery module spamming notifications.

Raised in #578.

* Fix pep8 issues.
2017-06-15 08:48:52 +07:00
Facetoe
4c0bba59ab weathercom.py: Honour units parameter. (#582)
Potential fix for #577
2017-06-15 08:48:08 +07:00
enkore
c5757fc7c2 Create README.rst 2017-06-12 17:44:00 +02:00
enkore
8e166fdd40 Update README.rst 2017-06-12 17:42:06 +02:00
enkore
d2436728ed Create README.rst 2017-06-12 17:41:37 +02:00
enkore
e5bd198c5e Create README.rst 2017-06-12 17:40:21 +02:00
enkore
cc189b4cc2 Create README.rst 2017-06-12 17:39:16 +02:00
enkore
fb70896545 Create README.rst 2017-06-12 17:36:58 +02:00
enkore
b04f9b7332 Create README.rst 2017-06-12 17:36:41 +02:00
enkore
5e59081f97 docs: highlight module name to use with register 2017-05-21 20:35:06 +02:00
pajowu
2ff5ea0262 Calculate battery percentage from energy instead of average of batteries (#563)
* Calculate battery percentage from energy instead of average of batteries

Average only works if all batteries have the same max energy level. If setups with different sizes the smaller ones influence the percentage overproportianly strong

* check for battery type before calculating percentage, use old way if needed

* translate charge into energy to always calculate correct percentage
2017-05-03 14:36:35 +07:00
Jo De Boeck
a62282f0f2 Add group module which allows cycling trough other modules (#568)
Highly inspired by: https://py3status.readthedocs.io/en/3.5/modules.html#group

Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
2017-05-01 10:23:18 +07:00
Erfan
0ddaa6f984 Update openvpn (#567)
* Update openvpn

openvpn 2.4 has changed their services API so the clients are called openvpn-client now

* auto select service name based on openvpn version

default is the old service names, and if version is 2.4, switched to the new service names

* oops remove whitespace

* Add a config to use new openvpn service names

* remove extra comment

* change the variable name

* oops 😅 forgot to change the option name in settings

* update option description
2017-04-27 15:27:48 +07:00
Raphael Scholer
811ade8160 Use different format strings for each auto-detected network interface (#565)
* network - Use different format strings for each autodetected interface

Introduce format_active_up dictionary. Each key can be a valid globbing pattern
for fnmatch.fnmatch().

Fall back to format_up if no match could be found.

* network - Always honor disabled dynamic_color

Disable the calculation of color values if detect_active is enabled
and dynamic_color is disabled.

This resulted in "#000000" for some reason.
2017-04-23 21:20:11 +07:00
facetoe
c6464aeecb Add option for detecting active interface. (#562) 2017-04-19 23:27:38 +07:00
Alex Corkwell
3c6d2167e5 uptime: Check seconds_alert against raw seconds (#555)
Originally, uptime checked seconds_alert against seconds to determine
whether to use color_alert, but if {days}, {hours}, or {mins} is used in
the format string, seconds is truncated to exclude anything above a day,
hour, or minute respectively.
This caused seconds to always be below a seconds_alert value greater
than a day, for example, if {days} is used, so the alert color was never
used.
Fix this by saving and checking against the raw seconds that were
originally read.
2017-04-15 14:58:00 +07:00
David Wahlstrom
414fbe1e5e Fix weathercom module (#561)
The weathcom module was broken due to referencing a variable that did
not exist.  It appears this was a typo or copy/paste error.  Either way,
this patch fixes that error and the weathcom module works again!
2017-04-13 13:14:35 -05:00
Erik Johnson
0fbc29ef8a I'm an idiot and put my API key in the Weather Underground example (#560)
Just got a usage alert when my laptop wasn't even on.

n00b mistake! I've disabled the API key, and this removes it from the
example in the documentation.
2017-04-05 21:05:01 -05:00
Erik Johnson
5bf3b2b32a Another fix for Weather.com API changes (#559)
It appears that the page data loads in one of two ways. I haven't
figured out what causes either, but this makes it so that we detect both
methods and load the relevant data either way.
2017-03-30 10:36:23 -05:00
Erik Johnson
79e90260a8 Update Weather.com weather backend to reflect API changes (#558)
* Update Weather.com weather backend to reflect API changes

Their API still provides a feed which requires a rotating API key, but
that API key is no longer something we can parse out of the webpage.
Fortunately, the forecast data is compiled server-side anyway and is
present as a blob of javascript that we can parse out of the page and
load as JSON.

* Clarify directions for getting location code
2017-03-29 12:47:52 -05:00
enkore
1a575cd639 2017 2017-03-15 14:20:35 +01:00
Jason Paris
33f6ebbf0a Delete i3pystatusrc.py 2017-03-13 09:48:15 +01:00
Jason Paris
fe5c8df35a removed password 2017-03-13 09:48:15 +01:00
Jason Paris
cc46c208e2 fixed get_redditor() method 2017-03-13 09:48:15 +01:00
Jason Paris
06cac68ae3 updated module to use PRAW 4.3.0 2017-03-13 09:48:15 +01:00
Jason Paris
6e0fe2ec90 upgraded fixed_redditor() to praw 4.3 2017-03-13 09:48:15 +01:00
Thiago Kenji Okada
a0082fb3b1 Need to strip values separated 2017-03-13 09:47:51 +01:00
Thiago Kenji Okada
53b49a4fbd Added brightness value to Redshift module 2017-03-13 09:47:51 +01:00
Thiago Kenji Okada
0cc39bc9d6 Redshift module fixes
Small rewrite in redshift module, removing regex usage in favor of
split()/strip(). I removed the function declaration inside function
declaration too, since it was strange.

Fix some typos in documentation too.
2017-03-13 09:47:51 +01:00
Andrey Astafyev
ec67429456 update ipv6 address handling to work with netifaces >= 0.10.5 2017-03-13 09:47:21 +01:00
Andrey Astafyev
b7324eed6a fixed mistype in song_length formatter 2017-03-13 09:47:21 +01:00
Mathis FELARDOS
883ff41e60 utils/gpu: add support of several GPU 2017-03-13 09:47:03 +01:00
enkore
133643fc6d Merge pull request #546 from alarmschaben/master
add option "freq_divisor" to "network" module, which allows division …
2017-03-13 09:46:37 +01:00
enkore
b0fdbfde3e Merge pull request #550 from kyrias/battery-notif
Battery notification timeout
2017-03-03 22:01:59 +01:00
facetoe
c77d853e14 Merge pull request #552 from sileht/master
pulseaudio: hides some error messages
2017-03-01 17:24:42 +08: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
facetoe
b974196221 Merge pull request #544 from facetoe/temp_fix
Fix bug where sensors reports no maximum.
2017-02-27 20:50:21 +08:00
Johannes Löthberg
123516fe54 battery: Make alert timeout configurable
Fixes #549.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-02-23 13:53:41 +01:00
Johannes Löthberg
96936946fa core/desktop: Use default server timeout
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-02-23 13:51:35 +01:00
enkore
2cfeeca3e2 Merge pull request #548 from enkore/enkore-patch-1
codestyle -E722
2017-02-23 10:56:38 +01:00
enkore
30f84b1a73 codestyle -E722 2017-02-23 10:55:28 +01:00
enkore
e60d3d4027 Merge pull request #547 from rscholer/dpms_status
Fix output when dpms is enabled
2017-02-23 10:54:56 +01:00
Raphael Scholer
22b2d4a6f5
Fix output when dpms is enabled
This fixes #537.
2017-02-23 03:42:50 +01:00
Armin F. Gnosa
e9a4948adb add option "freq_divisor" to "network" module, which allows division of Wi-Fi frequency 2017-02-22 15:45:05 +01:00