Commit graph

284 commits

Author SHA1 Message Date
tobi-wan-kenobi
a6f2e6fc5e [modules/mpd] make mpd port configurable
fixes #941
2022-11-27 17:41:48 +01:00
tobi-wan-kenobi
87a2890b48 [modules/pulsectl] fix case when no devices are available
no devices lead to an exception that completely stopped bumblebee-status
from processing data.

handle this case more gracefully by defaulting to a volume of 0%. if
this proves to be an issue, we can still add error indicators later.

see #940
2022-11-27 12:03:35 +01:00
tfwiii
697c3310a0 publicip - Bug Fix - IP address changes wer being missed if an interface was present but did not have an IPv4 address associated with it. Added exception handling to mitigate this. 2022-10-12 13:52:55 +07:00
tfwiii
cace02909e Bug fix improvements to publicip and util.location
Fixed publicip bug arising from last PR review
Simplified ip change detection code
Added pause after location.reset() call to allow completion before query
util.location - change order of information providers as default was not returning geo coords
2022-10-08 10:42:12 +07:00
tfwiii
605b749e22 Removed debugging prints 2022-10-06 14:21:43 +07:00
tfwiii
61fe7f6d3e Handled fail where core.location does not provide values for latitude and longitude. Added handling for coordinates N, S, E, W. 2022-10-06 13:49:37 +07:00
tobi-wan-kenobi
acb387a685 Merge branch '921-scrolling-status-bar' 2022-09-17 17:04:12 +02:00
tobi-wan-kenobi
d94ee9416a [doc] various updates 2022-09-17 16:07:05 +02:00
Alex Kelly
c637392bd0 Correct battery modules handling of critical/warning states
The logic for the critical/warning handling on the battery modules was
applied BEFORE the discharging-<pct> logic.  This made it  possible for
those discharging states to get applied over a critical/warning and
allow a theme to override the critical/warning colors with a state of
"discharging-10", for example.

This change moves that logic after the discharging state, so that it
will always "win" if critical or warning states are set.

This also adds the "discharging" battery state to the critical/warning
check so the state will apply if the battery is not on AC power, but
would return normal otherwise.  Meaning, if the battery is "critical"
from a percentage check, but is plugged into power, the critical state
is removed.
2022-09-16 15:36:06 -04:00
Alex Kelly
a5e0b01e3b [modules/taskwarrior] add state handling
Sets one of two states:
  "stopped" - Default, no running task
  "active"  - When an active task is running.
2022-09-15 11:48:43 -04:00
tobi-wan-kenobi
97a022e452 [modules/pulsectl] add friendly name support
thanks to @anopheles for figuring out this is still missing
2022-09-14 21:12:01 +02:00
Alex Kelly
54d5e83909 [modules/taskwarrior] Update docstring with show.active stuff 2022-09-12 13:43:10 -04:00
Alex Kelly
754707379a Add active-task display and scrolling
This adds an option allowing you to specify
"taskwarrior.show_active=true" in your bar configuration and will
display the current, active task id and description on the status bar, but will show the
number of pending tasks if one isn't active.

This also adds the scrolling decorator, since task descriptions can be
quite long.
2022-09-12 13:29:19 -04:00
tobi-wan-kenobi
c40f59f7be [modules/scroll] edge case error 2022-09-11 16:00:35 +02:00
tobi-wan-kenobi
3f97ea6a39 [doc] add scroll menu
see #921
2022-09-11 13:16:06 +02:00
tobi-wan-kenobi
21cbbe685d [modules/scroll] add preliminary version of scrolling module
add a scrolling module that can be used to scroll the whole bar to an
arbitrary number of widgets.

its parameter is "width", which determines the number of widgets to
display.

see #921
2022-09-11 13:12:51 +02:00
tobi-wan-kenobi
2287dcab48 [docs] add note for pulsectl being preferred over pulseaudio 2022-09-10 09:13:55 +02:00
tobi-wan-kenobi
a97f46c087 [modules/pulsectl] add documentation 2022-09-10 09:12:03 +02:00
tobi-wan-kenobi
eb11c279f6 [modules/pulsectl] add device name mapping and display 2022-09-10 09:09:16 +02:00
tobi-wan-kenobi
025b1ec2f2 [modules/pulsectl] add optional bar representation 2022-09-10 09:04:52 +02:00
tobi-wan-kenobi
20bc4b3fa6 [modules/pulsectl] add parameter to set an upper limit 2022-09-10 09:02:13 +02:00
tobi-wan-kenobi
ca6bf2e189 [modules/pulsectl] add option to automatically start pulseaudio 2022-09-10 08:57:00 +02:00
tobi-wan-kenobi
003a6efc8e [modules/pulsectl] figure out default devices
make sure the modules always refer to the default devices
2022-09-09 21:40:03 +02:00
tobi-wan-kenobi
a1d94d4355 [modules/pulsectl] add mouse actions
add toggle mute on click and volume up/down on scroll
2022-09-09 21:34:32 +02:00
tobi-wan-kenobi
cc910f1198 [modules/pulsectl] add preliminary version of event-based pulseaudio
add a new module based on pulsectl, with pulsein for microphone and
pulseout for speakers.

should eventually become a drop-in replacement for pasink and pasource.

see #917
2022-09-09 21:21:09 +02:00
tobi-wan-kenobi
28601cf2b7 Revert "Merge branch '917-event-based-pulseaudio'"
This reverts commit 72a888748e, reversing
changes made to d57ef9364a.

This merge causes really high CPU load if using both pasink and
pasource, because those two modules trigger each other, and there's not
a terrible lot I can do about that, unfortunately.
2022-09-09 08:39:05 +02:00
tobi-wan-kenobi
72a888748e Merge branch '917-event-based-pulseaudio'
fixes #917
2022-09-09 08:25:23 +02:00
FraSharp
8d0f8a4177 [modules/pamixer] use -t flag to toggle mute instead of setting volume level to 0
Signed-off-by: FraSharp <s23265@iisve.it>
2022-09-08 12:11:27 +02:00
tobi-wan-kenobi
ee9885a601 [core] fix concurrency issues
* initialize first line of output earlier (before modules are
  initialized, so that module/thread output cannot interfere)
* make sure that update and draw are protected against concurrent access
2022-09-04 16:22:29 +02:00
tobi-wan-kenobi
ee81f6198e [modules/pulseaudio] rate-limit pulseaudio events
attempting a different tack: Reduce the amount of draws that are being
emitted by the pulseaudio module to max. 2/s. That hopefully increases
reactivity and at the same time keeps flickering to a minimum.

see #917
2022-09-04 09:55:33 +02:00
tobi-wan-kenobi
978519e130 [modules/pulseaudio] redraw only
make sure that we only ever redraw see #917
2022-09-01 19:00:06 +02:00
tobi-wan-kenobi
1983408e58 [util] fix location timeouts 2022-08-31 19:12:05 +02:00
tobi-wan-kenobi
0f74b690ca [modules/publicip] add nicer logging 2022-08-31 19:09:04 +02:00
tobi-wan-kenobi
8d2cdebbaf [modules/pulseaudio] fix pactl subscribe thread
calling "draw" too early causes status line to be messed up.

see #917
2022-08-31 19:05:08 +02:00
tobi-wan-kenobi
ae04cc9897 [module/pulseaudio] somewhat experimental immediate update
try to immediately update pulseaudio, if pactl subscribe exists & allows
us to monitor update.

see #913
2022-08-31 07:51:36 +02:00
tobi-wan-kenobi
b1fd18b9af Revert "[module/pulseaudio] somewhat experimental immediate update"
This reverts commit d5d0d6a56c.
2022-08-30 21:50:56 +02:00
tobi-wan-kenobi
d5d0d6a56c [module/pulseaudio] somewhat experimental immediate update
try to immediately update pulseaudio, if pactl subscribe exists & allows
us to monitor update.

see #913
2022-08-30 21:38:48 +02:00
tfwiii
7ee9645437 Added secondary check for potential changes in public IP and a small bug fix arising from reliance on util.location
Added a second check for indications of possible change of public IP address since netifaces does not properly handle all Linux routing tables (ref: http://linux-ip.net/html/routing-tables.html) which can lead to changes being missed if only looking at defauilt route. Consequently an additional check for changes to the network interface names/numbers was added to further help in identifying potentially notable changes. Note that netifaces is no longer being maintained so the underlying issue with its handling of gateways is unlikely to be resolved (https://github.com/al45tair/netifaces). An alternative would be to use direct calls to the OS like 'ip route list table all' (note the difference to 'ip route list all') but this might lead to unpredicatble results between distributions/flavours so probably best to stick with a library for now. all') but this might lead to unpredicatble results between distributions/flavours so probably best to stick with a library for now.

Introduced time.sleep(2) following calls to util.location.reset() since it can take util.location a while to update following a call to .reset() which can cause calls to .location_info() to return unpredicatable/unuseful results.
2022-08-30 02:01:25 +07:00
tobi-wan-kenobi
82e55ec517 [modules/pulseaudio] remove "warning" if "too loud"
Falls in the "meant well, but doesn't really make sense" category: When
the volume exceeds 100%, the widget was shown in "critical" state. Some
headsets, audio cards, etc. do require a high volume setting, however.
And anyhow, it's really up to the user.

fixes #913
2022-08-26 21:14:28 +02:00
Diego Pereyra
2b3b9c0ca0 Undo serialization using picke, added comment on minimum version for google-api-python-client 2022-08-11 12:26:42 -03:00
Diego Pereyra
80efa64614 Support for locale on gcalendar 2022-08-10 12:02:35 -03:00
Diego Pereyra
55f3085c90 Added support for regolith fork of rofication (differs on the comm protocol: \n after command, receive values on csv) 2022-08-08 23:11:05 -03:00
Diego Pereyra
124f13075d Fix for multiple calendars 2022-08-08 21:59:39 -03:00
Diego Pereyra
2ab14d9cd3 Fix save token (using pickle) 2022-08-08 21:59:27 -03:00
tobi-wan-kenobi
470f05150d [module/redshift] allow adjusting the color temperature
add a boolean flag ("adjust") to redshift that allows the user to have
bumblebee-status actually perform the color adjustment (by invoking
redshift in "one-shot" node).

Note that this only updates the color value each time the redshift
module is updated (every 10s, by default), and likely will collide with
any running redshift process.

fixes #908
2022-08-07 10:32:28 +02:00
tobi-wan-kenobi
7a47e9e13d [module/publicip] handle netifaces errors
make sure the monitoring thread doesn't terminate when there are
netifaces errors.

see #909
2022-08-06 09:17:49 +02:00
tobi-wan-kenobi
a7dba79664 [modules/publicip] add default route monitor
(re)add a separate thread that monitors the default route and updates
the module immediately, if the default route changes.

fixes #909
2022-08-05 14:30:50 +02:00
tobi-wan-kenobi
a78403d3e8 [publicip] fix tests and bugs 2022-07-29 14:00:28 +02:00
tobi-wan-kenobi
a1c4b3c65e [modules/spotify] enable scrolling
this change should enable scrolling for the spotify module

(unfortunately, i am unable to fully test this, as i am not using
spotify)

fixes #903
2022-07-29 11:18:07 +02:00
Adamczyk Błażej
8e85eaa018 Fixed a bug in pulseaudio when changing source/sink, e.g. (dis)connecting bluetooth headset. 2022-07-25 09:12:42 +02:00