Commit graph

702 commits

Author SHA1 Message Date
Tobias Witek
80892477f6 [modules/xrandr] Subscribe to i3 output events, if possible
If i3-py is available, use it to subscribe to output events to reload
the widget list whenever the outputs change.

fixes #359
2019-02-09 11:00:12 +01:00
Tobias Witek
a198b8d9e3 [modules/xrandr] Add refresh widget when autoupdate==False
If polling displays via xrandr is disabled, show an additional widget
that allows the user to manually refresh the widget list.

see #359
2019-02-08 20:11:48 +01:00
Tobias Witek
8511e57ed2 [modules/xrandr] Optionally disable polling
Add option to disable display polling via xrandr to work around kernel
issues that cause persistent lags.

see #359
2019-02-08 20:06:12 +01:00
Frederic Junod
9cb127ee21 Remove hipchat module 2019-01-31 15:44:31 +01:00
Tobias Witek
47eeac00a0 Revert "Merge branch 'partial-update-on-input'"
This reverts commit a2cc828e58, reversing
changes made to 87f185e62b.
2019-01-26 19:40:08 +01:00
Tobias Witek
a2cc828e58 Merge branch 'partial-update-on-input' 2019-01-23 20:06:17 +01:00
Tobias Witek
87f185e62b [modules/git] Nicer formatting of stati
Add separate widgets for each state, so that each state can have a
custom icon *and* a custom coloring.
2019-01-23 19:56:16 +01:00
Tobias Witek
1698e4ad4c [modules/git] Make CI (hopefully) run through
OK, so I cannot configure Travis to install pygit2, obviously. Instead,
I'll make the "git" module run though even if pygit2 is not installed.

Hope that satisfies you, Travis!
2019-01-20 19:27:04 +01:00
Tobias Witek
e6aabe5605 [CI] More package crazyness 2019-01-20 18:45:47 +01:00
Tobias Witek
5738aac1ce [modules/git] Add some status icons
Add icons for:
* local modifications
* local delete
* local add
2019-01-20 14:43:27 +01:00
Tobias Witek
212966945c [modules/git] Fix recursion error
Endless loop caused by stupid bug when trying to find the root git
repository.
2019-01-20 14:17:10 +01:00
Tobias Witek
580bc554ba [modules] Add new module to display git information
This module uses xcwd to retrieve the directory of the currently focused
window and, if any of the parent directories is a git repository,
displays basic information about the repository.

Right now, only the current branch name is displayed.
2019-01-20 14:09:42 +01:00
Tobias Witek
aab259b826 [modules/pulseaudio] More exact enforcement of limits
If increasing would exceed the volume, set it to exactly the limit
instead. Also, if channels have different volumes, ensure that the
higher channel does not exceed the volume.

fixes #354
2019-01-20 09:09:11 +01:00
Tobias Witek
b377a93e49 [core] Add debug output for partial bar update
see #353
2019-01-20 07:34:27 +01:00
Tobias Witek
d9df96adcb Merge branch 'master' into partial-update-on-input
To make sure that all conflicts are resolved and because the
autohide feature is so nice.
2019-01-19 14:56:25 +01:00
Tobias Witek
7b07ef538a [core] Add "autohide" for distraction-free programming
Add a new parameter "-a|--autohide" that allows you to specify a
list of module names (or aliases) that will be hidden from the bar
*unless* their state is either warning or critical.
2019-01-19 14:51:48 +01:00
Tobias Witek
23be352ec3 [core/engine] Ensure that full updates still take place regularly
Ensure that a full update still happens, even if continuous scrolling
triggers new events (and therefore, partial updates) all the time.

see #353
2019-01-19 14:18:48 +01:00
Tobias Witek
2b91ce5861 [core/output] Refactor full/partial refresh
Creating the "raw", cached widget data out of the widget object was done
two places now.

see  #353
2019-01-19 14:12:32 +01:00
Tobias Witek
3d9279c444 [core] Update only affected widgets on input event
When receiving an input event, only update affected widgets, identified by
their instance ID.

see #353
2019-01-19 14:07:17 +01:00
Tobias Witek
44a50c0b36 [modules/pulseaudio] Fix failing test case (wrong types) 2019-01-19 07:47:21 +01:00
Tobias Witek
3d9e170da3 [modules/pulseaudio] Add optional upper limit for volume
Add a new parameter "limit" that, if set, specifies an upper limit for
the volume.

Note: This is only enforced at the time of *setting* the volume, so you
can still use other applications, such as pavucontrol, to exceed that
limit and bumblebee-status will simply *display* the new value, not
reset to the limit.

fixes #354
2019-01-19 07:42:11 +01:00
Michael Kwardakov
6531038bc5 Describe requirement for nic module 2019-01-18 13:49:07 +03:00
tobi-wan-kenobi
7ed7d48db1
Merge pull request #351 from rad4day/master
[modules/spaceapi] Performance optimization - JSON
2019-01-17 19:28:55 +01:00
Tobias Manske
f53cd062ae
[modules/spaceapi] Performance optimization - JSON
The module now flattens the JSON structure when it is received from the
API endpoint instead of every time the statusbar is updated. This should
make the module much more performant.

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2019-01-17 01:03:11 +01:00
Tobias Witek
b8d05b435f [modules/redshift] Minor refactoring 2019-01-16 20:13:28 +01:00
Michael Kwardakov
f2052c21be Fix ending newline from mocp on some systems 2019-01-16 07:42:44 +03:00
Michael Kwardakov
18b0e793cb mocp toggles shuffle on right click 2019-01-14 12:03:47 +03:00
Michael Kwardakov
29d427e6a1 Make mocp understand formats
Slight init optimization
2019-01-14 11:51:51 +03:00
Michael Kwardakov
d21a27ca5a
Update dependencies 2019-01-12 20:30:40 +03:00
tobi-wan-kenobi
2060ee7c34
Merge pull request #346 from qba10/master
[modules/apt] Add APT update checking module
2019-01-07 21:40:34 +01:00
Piotr Piórkowski
1860b7abb3
[modules/apt] Add APT update checking module 2019-01-07 20:56:13 +01:00
tobi-wan-kenobi
aa8167ed25
Merge pull request #345 from rad4day/master
[modules/spaceapi] rewrite
2019-01-07 20:23:17 +01:00
Tobias Manske
521b382131
[modules/spaceapi] Improve documentation / help text 2019-01-07 01:41:40 +01:00
Tobias Manske
ab309f873b
[modules/spaceapi] Python2.7 compatability 2019-01-07 01:19:34 +01:00
Tobias Manske
54024f1ddd
[modules/spaceapi] Reload on left mouse button
Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2019-01-06 22:57:25 +01:00
Tobias Manske
e95652fc05
[modules/spaceapi] format string to json parser
Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2019-01-05 19:34:21 +01:00
Tobias Manske
0be81ec1f7
[modules/spaceapi] rewrote module to use threading
Also I'm not catching every exception anymore.

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2019-01-04 15:39:55 +01:00
WORD559
130fa0ea4f Commented out @scrollable for spotify module -- does not work for some reason, see PR #343 2018-12-29 16:42:21 +00:00
WORD559
8ea9762472 Modified behaviour of bumblebee.output.scrollable to allow for custom scroll speed and toggling "bouncing" of text, and applied it to deadbeef and spotify 2018-12-28 21:27:38 +00:00
Tobias Manske
5203cd88a3
[modules/spaceapi] Fix ArgumentException
This ArgumentException was caused by me failing to rename one occurence
of a parameter when refactoring code. This went under my radar as the
API I'm usually testing against, was offline at that time, too. So I
expceted to see an Error. Just not this one.

Well, the fix comes late, but better late than never :)

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2018-12-24 12:46:08 +01:00
Martin Wallgren
279411176e [modules/layout-xkb] use XKeyboard to set layout
XKeyboard has support for setting the layout directly. There is no need
to explicitly execute an external command.
2018-12-04 13:18:50 +01:00
Tobias Witek
1850ceefdc [core] input: add logging for input events
to debug input event issues (which seem to become more frequent), add
some input event logging.

see #336
2018-12-03 20:17:18 +01:00
927589452
c29a1e1a8c
Update battery_all.py
added battery device for pinebooks
2018-11-26 13:02:46 +01:00
Tobias Witek
7d55bdce6c [engine/output] Use (experimental) custom widget padding
When padding a widget, instead of using the "min_width" field of the
i3bar protocol, which seems to "swallow" click events, perform a custom
padding by simply extending the right-hand side with spaces.

fixes #334
2018-11-25 17:50:05 +01:00
Tobias Witek
22419b813f [modules/brightness] Use 'light' instead of 'xbacklight'
If available, use 'light' for setting the background light, as per
suggestion of RiadhAmami - thanks!

fixes #332
2018-11-24 10:56:27 +01:00
Martin Morlot
876ff7dd76 Fix the remaing time so that it displays the time for all batteries and not just one battery 2018-11-17 21:29:18 +01:00
Tobias Witek
5f8becfb55 [modules/battery_all] Some small code simplifications
Make update routine smaller by creating a single, static widget.
2018-11-17 18:32:21 +01:00
Tobias Witek
e4a97eca10 [modules/battery_all] Remove showdevice parameter
Showing the device name doesn't add anything for the battery_all module,
as it combines all batteries.
2018-11-17 18:26:19 +01:00
Martin Morlot
1bd85ce8d1 My first commit: the battery all 2018-11-17 16:36:09 +01:00
Tobias Witek
354dc0fbcd [modules/sensors2] Fix tests
Forgot an import
2018-11-17 13:56:07 +01:00
Tobias Witek
0d9b3113f4 [modules/sensors2] Alternate sensor module
Show all sensor data reported by sensors -u and color widget with
warning/critical if sensor limits are exceeded.

fixes #326
2018-11-17 13:38:35 +01:00
dustypaws
6ad9724a54
Update pulseaudio.py 2018-11-16 12:46:36 +01:00
dustypaws
b92d3423af
Set state to critical if volume is set over 100%
..."warning" would suffice but eh!

Useful for headphone users. Or at least I think so... :)
2018-11-16 12:43:19 +01:00
Tobias Witek
bc569a11af [modules/sensors] Fix regex
fixes #308
2018-11-13 18:23:53 +01:00
Tobias Witek
2994d0efa0 [modules/battery] Better display for "unknown" charge status
Some laptops, such as Dells, may display an unknown charge state when
the battery is attached to a docking station, but discharging (because
of configuration settings for longevity of the battery).

Show that nicer.
2018-11-09 18:19:05 +01:00
tobi-wan-kenobi
e5a003f961
Merge pull request #321 from jeffeb3/reduce_min_size_cpus.py
Use the parameter format to determine the minwidth
2018-11-09 16:44:41 +01:00
Tobias Witek
c514d965cb [modules/xrandr] Do not overwrite i3 config by default
Require user to explicitly enable overwriting of i3 config files before
starting to automatically assemble the i3 config from a template and a
set of display-related config files.

fixes #322
2018-11-09 16:48:00 +01:00
Jeff Eberl
bf5e814e45 Use the parameter format to determine the minwidth, instead of the default format. 2018-11-08 20:15:45 -07:00
Tobias Witek
2f7931753e [modules/sensors] Add parameter "match_pattern" to find correct adapter
Instead of providing match_number, it is now possible to specify a
second pattern that matches directly *before* the "match" value.

fixes #308
2018-11-08 18:56:26 +01:00
Tobias Witek
c39e2077e3 [modules/sensors] Add support for JSON-formatted sensors output
sensors -j give JSON output, which is much easier to parse than
raw output.

Use this, together with the "path" parameter, to allow robust reading of
sensor values.

fixes #308
2018-11-07 16:46:49 +01:00
Tobias Witek
7b12f678d6 [core/theme] Support loading of themes by file name
If the theme name provided by the user is a file, load the theme from
there.

Note: This change automatically enables a theme to load iconsets from a
file name, instead of using a iconset name.

fixes #319
2018-11-06 21:09:26 +01:00
Tobias Witek
3e39f443ef [core/input] More robust event reading
Regular i3bar events *can* contain the character [, so a better
mechanism for detecting the initial opening [ is required. For now, do a
minimal change that requires the line to *start* with [. This should
never be the case for i3bar events, which are always JSON objects.

fixes #318
2018-11-06 17:51:48 +01:00
tobi-wan-kenobi
7a12a07a7c
Merge pull request #317 from alexmohr/BatteryImprovements
Improved battery module for 2 batteries
2018-11-03 19:15:29 +01:00
Alex
17d1113141 changed default parameter for tests 2018-11-03 18:27:19 +01:00
Tobias Witek
eddc563052 [modules/datetime] Use hardcoded application for left-click
Open app "calendar" by default when left-clicking the datetime widget.
2018-11-03 18:23:00 +01:00
Alex
9b4d1c52e6 Improved battery module for 2 batteries 2018-11-03 17:52:02 +01:00
Alex
a2804e92f6 Removed open parameter 2018-11-03 17:38:39 +01:00
Alex
1b6568016a Merge branch 'city' 2018-11-02 10:06:16 +01:00
Alex
f021250e41 Using util function for boolean param 2018-11-02 10:04:43 +01:00
Alex
8bb718fef8 Merge branch 'date-click' 2018-11-02 00:56:44 +01:00
Alex
6de12a0e96 Added support for date time click 2018-11-02 00:55:24 +01:00
Alex
19e6abc8ca Added option to disable city display 2018-11-01 22:15:00 +01:00
Alex
85bcc7164f Fixed status for unknown charge state 2018-11-01 21:58:07 +01:00
Frederic Junod
6df041754c [module/weather] Use json function from requests response
Instead of using the json library
2018-10-31 16:26:47 +01:00
tobi-wan-kenobi
d2795fd99b
Merge pull request #309 from kelp/kelp-arch-update-fix
Return 0 as an int rather than a string.
2018-10-29 17:53:47 +01:00
Frederic Junod
ab4e0019cf Remove immediate param in github and hipchat update function
Not needed after 3638aa2420
2018-10-29 11:32:02 +01:00
Travis Cole
0d8585a2ab Return 0 as an int rather than a string.
This was causing an ocassional crash in bumblebee/engine.py threshold_state
when checkupdates fails, perhaps due to wifi not being up yet.

For me this showed up regularly on login.
2018-10-28 14:03:59 -07:00
Tobias Manske
8eaded9405
[module/spaceapi] fix freeze on unreachable API
The statusbar was freezing for several minutes if it could not reach
the API endpoint. This is because of a missing timeout statement in
the call to python.requests's get function.

- Added spaceapi.timeout parameter
- Added timeout to requests

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2018-10-26 00:17:13 +02:00
Tobias Witek
0a03fc859e [module/traffic] Make speed calculation work with fractionals
thanks to @ilmagico for noticing this, fractonal intervals are
supported, so they should calculate the throughput correctly.

fixes #306
2018-10-23 18:10:55 +02:00
Tobias Witek
cb04cf6de6 [modules/traffic] Calculate speed per second instead of per interval
Divide speed by timediff between current and previous measurement to get
the rate per second.

fixes #306
2018-10-22 18:34:58 +02:00
Tobias Witek
a579f32879 [modules/docker] Return n/a when docker is not available
When the docker python module is not available, return n/a
instead of error'ing out.
2018-10-18 19:35:48 +02:00
Jorge Lopez
e767f9b393 [modules/docker] Add basic docker list module 2018-10-18 12:14:06 +02:00
Tobias Manske
defdc7f077
[modules/spaceapi] refactor, add comments, use interval function
Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2018-10-05 21:39:48 +02:00
Tobias Manske
095b27436e
[modules/spaceapi] convert from urllib2 to requests
better python2 support

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2018-10-05 17:54:43 +02:00
Tobias Manske
969d2f35cd
[module/spaceapi] Add Space API module
SpaceAPI is a API for hackerspaces. Hackerspaces announce their state
and location using a predefined json framework. Users can use this data
to make sure the space is opened before they decide to go there.

The module was created because the author felt the need to know if his
hometown's space was open or not.

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2018-10-05 17:25:52 +02:00
Tobias Witek
20f48d4535 [module/datetime] Add more error handling to locale setting
If setting a locale fails with an exception, set to en_US.UTF-8 by
default.

fixes #159
2018-10-01 19:30:44 +02:00
Tobias Witek
7af04b0556 [modules/sensors] Use thermal zone, if specified on commandline
fixes #298
2018-09-24 18:15:04 +02:00
Tobias Witek
e80ae8b91e [core] Add option to draw widgets right-to-left
fixes #295
2018-09-22 14:40:32 +02:00
Tobias Witek
7152bb17f2 [core] Generic collapsible widgets
Each widget can now be collapsed and expanded using the middle mouse
click, by default.
2018-09-15 14:40:52 +02:00
Aaron Moser
ba934dc675 Add xkcd module
Added a module that opens a random xkcd comic when clicked.
2018-09-11 16:49:57 +02:00
tobi-wan-kenobi
440b5379dd
Merge pull request #291 from lucassouto/master
Add module arch-update
2018-09-09 08:11:09 +02:00
lucassouto
63bb771df2 Fix for previous versions of python 2018-09-08 18:59:55 -03:00
Lucas Souto
edee95b57a Fix code for lint 2018-09-07 22:38:15 -03:00
Lucas Souto
17131c5bdc Merge branch 'master' of git://github.com/tobi-wan-kenobi/bumblebee-status 2018-09-07 22:22:07 -03:00
Lucas Souto
c617a478bf Add module arch-update 2018-09-07 22:21:57 -03:00
Rémi Dupré
384f23c34f
Module progress: added states 2018-09-07 17:14:40 +02:00
Rémi Dupré
56426ee0a6
Added parameters to module "progress" to change bar design, changed
format keys
2018-09-07 16:48:03 +02:00
Rémi Dupré
870d4d75d5
Using progress's speed measures 2018-09-07 16:36:09 +02:00
Rémi Dupré
090306d37c
Added module progress 2018-09-07 16:17:09 +02:00
WORD559
a969fc0b75 Added parameter to pulseaudio module that allows users to specify the percentage change of the volume when scrolling on the module. 2018-09-01 14:40:18 +01:00