Commit graph

580 commits

Author SHA1 Message Date
WORD559
841b5e0905 Fixed issue where pulseaudio module could monitor the wrong device if certain pa modules have been loaded (e.g. monitoring 'alsa_output.pci-0000_00_1b.0.analog-stereo.echo-cancel' rather than 'alsa_output.pci-0000_00_1b.0.analog-stereo' 2018-05-12 13:46:51 +01:00
WORD559
705c18dbcd Can force status bar to update early by sending a USR1 signal to the process 2018-05-06 09:31:46 +01:00
Tobias Witek
6cbf866b63 [modules/memory] Use MemAvailable, if present
If the kernel supports it, MemAvailable contains an estimation
of the memory available for usage.

Use this to calculate the amount of free memory (as this seems to
closely match the output of gnome-system-monitor).

fixes #253
2018-05-01 10:01:36 +02:00
Tobias Witek
7af362f5c3 [themes/ionicons] Minor tweaks 2018-04-29 21:11:58 +02:00
Tobias Witek
b858fef834 [tests] Minor adaptions to satisfy tests
* Default value for Theme() constructor
* Don't fail fatally when unable to load taskwarrior module
2018-04-29 20:45:58 +02:00
Tobias Witek
8e80923f14 [core/theme] Add option to override iconset + add experimental icons
Add an option to load a user-specified icon theme (which will override
the theme's icons).

Also, commit a first version of a set of icons from the ionicons set
(see http://ionicons.com/).

see #252
2018-04-29 16:12:39 +02:00
tobi-wan-kenobi
fa9ad10549
Merge pull request #251 from kunalshetye/issue-250
Added a hidden method to hide mpd widget when no music is playing
2018-04-20 16:24:52 +02:00
Kunal Shetye
9514f1fb01 Added a hidden method to hide mpd widget when no music is playing 2018-04-20 06:34:35 +02:00
Tobias Witek
bbe4bfeebc [modules/nic] Do not fail if iwgetid is not available
Instead of throwing an error, simply return an empty SSID. Also, for
these cases, make sure the module doesn't output multiple whitespaces as
the end.

fixes #248
2018-04-14 05:33:35 +02:00
tobi-wan-kenobi
0fa27cca10
Merge pull request #246 from kunalshetye/master
[module/nic] Added option to get the ssid (for wifi networks)
2018-04-14 05:23:11 +02:00
Avindra Goolcharan
56088be995
publicip: use checkip.amazonaws.com in us-east
I'm on the east coast, and on average the amazon endpoint is a bit faster. AWS is also a more well known name.
2018-04-11 21:48:17 -04:00
Kunal Shetye
fb6a9b1f7d Added option to get the ssid (for wifi networks) 2018-04-11 20:42:12 +02:00
tobi-wan-kenobi
8a95cb1b0f
Merge pull request #243 from kunalshetye/master
[module/nic] Added format parameter to control the widget output
2018-04-11 20:14:45 +02:00
Frederic Junod
b2d709ab5f Remove unused yaml import 2018-04-11 12:57:56 +02:00
Kunal Shetye
b23b97625e Added format parameter to control the widget output 2018-04-11 07:30:16 +02:00
Pavle Portic
682dcc775a
[modules/traffic] Add parameter to hide down networks 2018-04-01 19:39:14 +02:00
Tobias Witek
0c03c1c48b [core/config] Skip unavailable modules
If a module cannot be loaded (presumably, because some python modules
are missing), do not show them in the list of available modules.

fixes #237
2018-03-24 08:08:19 +01:00
Frederic Junod
95fab517c6 Update required modules list in README 2018-03-14 08:35:51 +01:00
tobi-wan-kenobi
52312b7331
Merge pull request #231 from torvitas/patch-3
fixes typo in documentation of dnf module
2018-02-14 18:24:03 +01:00
Sascha Marcel Schmidt
3febc0a473
fixes typo in documentation 2018-02-14 12:15:40 +01:00
Sascha Marcel Schmidt
604a795f9e
fixes typo 2018-02-14 12:09:11 +01:00
Tobias Witek
b77fee4af2 [modules/memory] Fix "percentage used" calculation
For some reason, using "used/total" is more accurate than "(total -
free)/total". Probably there's some missing gap of what is counted as
used vs. what is counted as free.

fixes #229
2018-02-12 20:35:50 +01:00
tobi-wan-kenobi
519dc1dafe
Merge pull request #226 from caianrais/brightness-format-fix
[modules/brightness] Fix return format
2018-02-01 18:57:34 +01:00
Tobias Witek
186169343d [engine] do not fail on module import
If a module import fails, simply log a warning. The module, clearly,
cannot be used, though.

fixes #227
2018-02-01 18:44:48 +01:00
Caian R. Ertl
a75c71920e [modules/brightness] Fix return format
What: Fixes the return format in `brightness` module
Why: To remove the initial zero in the brightness indicator when below hundred.
2018-01-31 18:52:16 -02:00
Pierre Dorbais
cc72814b83 [modules] add taskwarrior module 2018-01-30 16:58:09 +01:00
Tobias Witek
cb3a7b826b [modules/datetime] Fall back to en_US.UTF-8
If no default locale is available, fall back to en_US.UTF-8.

see #159
2018-01-21 08:55:42 +01:00
Tobias Witek
be20a36805 [core/theme] Make unittest (hopefully) run through 2018-01-17 19:29:11 +01:00
Tobias Witek
4716481087 [core/theme] Small bugfix (widget needs to have linked module)
This is mainly for the autotests
2018-01-17 18:56:12 +01:00
Tobias Witek
9f77514a1c [core/theme] Add per-module theme override
Allow users to override theme values via parameter, such as:

bumblebee-status -m spacer -p spacer.theme.bg=#ff0000

for a red spacer.

see #223
2018-01-17 18:51:01 +01:00
Tobias Witek
bf84498df3 [core/engine] handle single-module errors
instead of terminating the whole status bar when an error occurs, just
show a (truncated) error for that single widget.

this should also enable auto-recovery if the module returns to a "good"
state, but that hasn't been tested yet.

see #221 and #222
2018-01-12 18:39:36 +01:00
Tobias Witek
04ce2de228 [modules/getcrypto] Handle missing results 2018-01-11 20:32:15 +01:00
Tobias Witek
650e0b933e Revert "[modules/getcrypto] Deal with kraken service downtime"
This reverts commit 3615e60e5b.

Time to go to sleep, so many mistakes...
2018-01-11 20:31:48 +01:00
Tobias Witek
3615e60e5b [modules/getcrypto] Deal with kraken service downtime
see #222
2018-01-11 20:29:45 +01:00
Tobias Witek
5f96b603a8 [modules/battery] fix syntax error
see #221
2018-01-11 20:26:49 +01:00
Tobias Witek
166437649c Revert "[modules/battery] Fix syntax error"
This reverts commit f236c24b92.
2018-01-11 20:26:14 +01:00
Tobias Witek
f236c24b92 [modules/battery] Fix syntax error
see #221
2018-01-11 20:22:30 +01:00
Tobias Witek
bbfb6fc095 [modules/battery] Ignore errors when reading status
Reading status - similar to reading the capacity - might fail, just
ignore that error.

see #221
2018-01-11 20:05:46 +01:00
Tobias Witek
82db0a14c1 [modules/ping] Revert changes reg. interval handling
Similarily to getcrypto, do not use the generic interval handling
for the ping module.

see #220
2018-01-07 20:41:14 +01:00
Tobias Witek
3638aa2420 [modules/various] Use new interval mechanism
Use generic interval mechanism in most of the modules that use slow
updates.

Only exception: getcrypto, as the interval is specified in seconds there
and I want to retain backwards-compatibility.

fixes #220
2018-01-07 20:27:11 +01:00
Tobias Witek
776be11137 [engine] Add generic interval mechanism
Add a generic mechanism to set a specific interval (in minutes, as this
is primarily intended for modules that want to "slow down" updates).

This gives *all* modules the parameter "interval" and allows each module
to set the default interval using the method "interval(<value>) in the
module constructor.

see #220
2018-01-07 20:25:32 +01:00
Tobias Witek
a6b7e329c7 [module/stock] Error message if stock service unavailable
If the stock rate cannot be retrieved for some reason, print an error
message in the log and present the value as "n/a".

fixes #219
2018-01-07 19:37:31 +01:00
Tobias Witek
13d27d4b81 [themes] Do not automatically download symbols.json
In order to use symbol files, symbol.json needs to be created manually
now.

Also, remove symbol usage from the prepackaged themes to avoid
breakage.

fixes #216
2018-01-03 15:58:57 +01:00
Tobias Witek
8f44a1bf63 [modules/redshift] Do not block status line
Redshift might block when no network connectivity is available (if it
tries to determine the location automatically). To avoid this blocking
the whole status line, immediately release the lock in the query thread.
2018-01-01 08:59:21 +01:00
Tobias Witek
bac3d6bc57 [core/theme] Add FontAwesome name resolution
Theme writers are now able to use FontAwesome names and IDs instead of
the symbols itself!

The implementation itself is *slightly* hacky and might get improved in
the future: Upon the first start, a YAML file containing the FontAwesome
symbols is fetched from
https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/src/icons.yml

Note: This is only done once - to retrigger this (i.e. for an update),
please just delete the file and restart bumblebee-status.

Then, in the *icon* theme itself, you can use ${<name or id>} instead of
the actual symbol.

Names and IDs can be found here:
http://fontawesome.io/cheatsheet/

(simply remove the "fa-" prefix)

An example is provided in themes/icons/awesome-fonts.json.

(finally) fixes #20

sorry for taking so long :)
2017-12-29 14:49:13 +01:00
Tobias Witek
2a95e9fcc2 [modules/redshift] Update in separate thread
Move updating of redshift information into a separate thread so that
errors like missing network connectivity do not block the whole status
bar.

fixes #61
2017-12-29 11:18:07 +01:00
Tobias Witek
63ef6b0bf8 [core/themes] Fix new theme code for Python 3.x 2017-11-26 20:05:28 +01:00
Tobias Witek
197c4c92a9 Merge branch 'theme-directories'
fixes #203
2017-11-26 19:57:31 +01:00
Tobias Witek
3fe2088d06 [tests] fix unit tests 2017-11-26 19:56:57 +01:00
Adam Dej
5766fedc46 [modules] Add zpool module 2017-11-25 13:01:59 +01:00
Tobias Witek
56b2981379 [core/themes] Fix exception on missing theme
If no theme is found, raise an exception.

see #203
2017-11-18 14:59:30 +01:00
Tobias Witek
9d81d83d37 Merge branch 'master' into theme-directories 2017-11-18 14:57:41 +01:00
Tobias Witek
15c78cd6a6 [core/themes] Add theme merging from different locations
Theme files with the same name, but in different theme locations, are
now merged together.

see #203
2017-11-18 14:56:44 +01:00
Tobias Witek
9d7fc5c1d4 [core/themes] De-duplicate theme names
List themes only once, even if they are present multiple times in
different locations.

(Yes, I know that list(set(result)) would do the same, but here, I'd
like to not waste memory and be a bit faster).

see #203
2017-11-18 14:51:25 +01:00
Tobias Witek
8a0fae529a Revert "[modules/datetime] Rename datetime to date-time"
This reverts commit 4bc96987db.
2017-11-18 11:26:42 +01:00
Frederic Junod
34ac317bfa Use absolute_import in uptime module 2017-11-18 09:27:12 +01:00
Tobias Witek
4bc96987db [modules/datetime] Rename datetime to date-time
Finally fix the datetime import errors by renaming the bumblebee
datetime module (*bad* idea from the start).

Apologies to everyone for whom it now breaks.
2017-11-13 18:54:54 +01:00
tobi-wan-kenobi
a5154ded73
Merge pull request #205 from ccoors/master
[modules/uptime] Add uptime module
2017-11-13 18:44:42 +01:00
Christian F. Coors
6b61d43648 Add uptime module 2017-11-13 16:04:00 +01:00
Camilo Celis Guzman
c75518e8f7 [modules] added new shortcut module
This modules makes it very easy to create shortcuts as widgets, for which the user can define the command to be executed when left clicking on it. It supports single or multiple shortcuts
2017-11-13 15:54:25 +09:00
Tobias Witek
f72ac0ca99 [core/theme] Add ~/.config/bumblebee-status/themes to theme directories
Allow users to create themes outside the main theme tree.

see #203
2017-11-05 09:08:01 +01:00
tobi-wan-kenobi
3455ad3da4
Merge pull request #199 from cacyss0807/title_bug_fix
[modules/title] fixed runtime exception
2017-10-27 18:21:20 +02:00
Frederic Junod
f75d321b20 Add new hipchat module
Displays the unread messages count for an HipChat user
2017-10-27 15:05:38 +02:00
Camilo Celis Guzman
fb1ce0e9af [modules/title] fixed runtime exception
From i3ipc the find_focused().name can return  a None instead of a string, this will casue a runtime exception
2017-10-27 17:42:10 +09:00
Camilo Celis Guzman
28ee0b474d added format parameter to cpu module 2017-10-25 19:09:04 +09:00
Camilo Celis Guzman
a84e568746 [modules/rotation] create a widget per display once on refresh
* This module only updates some information on the screen when a new
display is added/removed, hence it makes sense to update it only when
the i3-bar is refreshed.
2017-10-25 18:37:54 +09:00
Tobias Witek
57064dcf54 [core/engine] Option to disable workspace wrap
Add a new parameter engine.workspacewrap (default to true) that, if set
to false, makes the workspace change via mouse wheel stop when hitting
the first/last workspace of an output (identical to how i3wm bar itself
behaves).

fixes #188
2017-10-21 13:06:36 +02:00
Tobias Witek
abd58d2fba [core/engine] Add parameter 'engine.workspacewheel'
Add a parameter that allows the user to enable/disable workspace
scrolling via the status bar.

By default, scrolling is enabled, to disable it, add the following
parameter to your bumblebee-status invokation:

-p <other parameters> engine.workspacewheel=false

see #188
2017-10-21 08:46:48 +02:00
Tobias Witek
34d9278c6e [modules/mpd] Add scrollable modifier 2017-10-21 08:21:37 +02:00
max-kov
36e7cc8dbb [modules/mpd] Removed unneeded if statement 2017-10-20 16:39:48 +01:00
max-kov
3c0d53831b [modules/mpd] Fixed song duration parse bug
After listening to an audio stream for longer than 10 minutes "mpc -f "tag artist %artist%\ntag title %title%"" will start producing lines with slightly different separation, which caused the bar to fail.
2017-10-20 12:22:42 +01:00
Frederic Junod
a13e593012 Fix unused-import errors found by pylint 2017-10-18 08:38:26 +02:00
Frederic Junod
70a58715f3 Fix unused-variables errors found by pylint 2017-10-18 08:36:07 +02:00
tobi-wan-kenobi
851be18d72 Merge pull request #192 from fredj/currency_use_ft
[modules/current] Use markets.ft.com instead of fixer.io
2017-10-17 20:20:06 +02:00
Frederic Junod
d341c90c53 [modules/currency] Add symbol for JPY 2017-10-17 19:13:26 +02:00
Frederic Junod
1eb49ab53e [modules/currency] Use a list for the data to preserve the order 2017-10-17 19:03:08 +02:00
Frederic Junod
4b1ba93109 [modules/currency] Use markets.ft.com instead of fixer.io 2017-10-17 19:01:57 +02:00
Frederic Junod
6f28726758 Fix unused-import errors found by pylint 2017-10-17 18:59:28 +02:00
Frederic Junod
5f20fa6134 Fix trailing-whitespace errors found by pylint 2017-10-17 18:59:26 +02:00
Frederic Junod
57204a215e Fix bad-whitespace errors found by pylint 2017-10-17 18:59:23 +02:00
Tobias Witek
7af57c7fc4 [core/input] Handle epoll interrupts
Sometimes epoll poll() calls get interrupted by the system - handle that
more gracefully.
2017-10-17 18:53:58 +02:00
Tobias Witek
c041e33bc0 [core/config] Make unit test go through 2017-10-17 18:53:02 +02:00
Camilo Celis Guzman
3f7f8e29de [modules/rotation] new module to loop through orientations 2017-10-11 20:11:10 +09:00
Tobias Witek
5d1d994dce [core] Add support for custom colorsets (e.g. pywal)
In a theme file, it is now possible to provide an array of "color
definitions", which allow you to use names instead of colors throughout
the theme file.

Currently, only the colorset "wal" is supported, which reads all colors
from the wal JSON file (~/.cache/wal/colors.json) and makes them usable
in the theme (as "foreground", "background", "cursor", "color12", etc.).

An example of this can be found in the theme wal-powerline.

see #185
2017-10-08 08:13:10 +02:00
Avindra Goolcharan
9c52624ecb nvidiagpu.py: remove invalid shebang
This file has no actionable code when executed directly from a shell. It contains only a `class` as it is a bumblebee module.

so the shebang should be removed.
2017-10-06 22:15:46 -04:00
Tobias Witek
7c17516874 [modules/layout-xkb] Gracefully handle missing xkbgroup library
Show "n/a" is xkbgroup is not installed/available

see #177
2017-10-01 05:45:52 +02:00
Tobias Witek
e0e59b863c [modules/xkbgroup] Remove thirdparty xkb, use system xkb
Providing a custom-built xkb module obviously doesn't really work, so
use the system one instead.

see #177
2017-10-01 05:42:29 +02:00
Tobias Witek
855012f05d [modules/layout-xkb] Parameter to show full layout name
If parameter "showname" is specified, do not show the symbol (e.g.
"us"), but the full layout name (e.g. "English (US)").

see #177
2017-09-30 16:26:20 +02:00
Tobias Witek
ad4246d52d [modules/layout-xkb] Use set-xkbmap to switch layouts
Use the data retrieved via xkb and set the new layouts and variants
using set-xkbmap.

see #177
2017-09-30 16:21:51 +02:00
Tobias Witek
0dd8a4ffeb [modules/layout-xkb] Ignore errors 2017-09-30 11:53:28 +02:00
Tobias Witek
9525b18653 [modules/layout-kxb] Add docstring 2017-09-30 11:50:33 +02:00
Tobias Witek
d45b80dc52 [modules] Add layout-xkb using xkbgroup to display current layout
Package xkbgroup as "thirdparty", because it was slightly patched
for python2.x compatibility.

see #177
2017-09-30 11:18:36 +02:00
tobi-wan-kenobi
2384ecd475 Merge pull request #184 from paxy97/module/weather
[modules/weather] Show city in weather module
2017-09-29 17:57:03 +02:00
Pavle Portic
c462bd3472 [modules/weather] Show city in weather module 2017-09-29 14:31:42 +02:00
ibrokemypie
b544393c63 modules/sensors: Try intel scaling current frequency
On intel pstate drivers only the normal frequency is written to /proc/cpuinfo, not accounting for scaling/turbo.
This should fix that, though it needs testing on other computers (AMD, intel without pstate) because I am not
certain that the file only exists on Intel pstate.
2017-09-29 12:16:32 +10:00
Tobias Witek
f3ee6e0c67 [themes] Add non-powerline solarized-dark with awesome fonts
In order to do that, change the theme engine so that a theme can
override settings in the iconsets. Was probably a bug to begin with that
this was not possible.
2017-09-20 08:59:23 +02:00
Tobias Witek
81e1b25687 [modules/memory] Use /proc/meminfo instead of psutil
Try to be more accurate in calculating memory by using the /proc/meminfo
interface directly.

fixes #181
2017-09-20 06:26:39 +02:00
Tobias Witek
18131a3efe [modules/layout] Remove parameter for language configuration
Switch layout module to do full auto-detection by parsing the output of
xrandr -query.

fixes #177
2017-09-19 09:15:36 +02:00
tobi-wan-kenobi
4bbc67a6c4 Merge pull request #178 from chrismullins/fix-github-module
BUG: github module count breaks in python3
2017-09-18 19:53:28 +02:00
Frederic Junod
e70ba50a30 [module/title] Use bumblebee.util.asbool function 2017-09-18 08:30:44 +02:00