Commit graph

260 commits

Author SHA1 Message Date
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
Ishaan Bhimwal
a5fbc73c44 fix typo 2022-07-21 11:37:33 +05:30
Tom Watson
2fa7931783 Fixed runaway thread creation (faulty indenting) 2022-07-12 00:19:19 +07:00
Tom Watson
284662a0ba Ran publicip.py through black 2022-07-07 18:38:43 +07:00
Tom Watson
9a6e61173f Updated publicip to automatically update on detecting a change to default route 2022-07-07 18:08:20 +07:00
Tom Watson
a97a7fe507 Updates addressing PR comments
Added location_info() to util/location API to return a dict of all location information. Updated modules/contrib/publicip to use that API. Changed modules/contrib/publicip refresh period back to 60 minutes. Changed /util/location API from 'country_name' back to 'name'
2022-07-06 19:37:29 +07:00
Tom Watson
6f137c4927 Update following PR review
Moved to format string handling of parameters. Minor refactoring.
2022-07-06 17:51:19 +07:00
Tom Watson
218bfa2235 Updated contrib/publicip module and util/location
Added another API endpoint, Added options to display country name, country code, city name and lat/long coordinates, attempt to handle failure to fetch info from API endpoints cleanly
2022-07-06 01:05:25 +07:00
tobi-wan-kenobi
6f4f163a7d [core/layout] use python-only layout detection
remove precompiled binary and make the layout module
fall back to the python implementation.

fixes #883
2022-07-03 14:02:38 +02:00
Sam Tebbs
eabf167c1f Hide battery module if there are no batteries 2022-06-22 09:12:14 +01:00
Antoine Beaupré
16c4ce2ee6
handle missing battery case
I run the same bumblebee-status configuration on my laptop and my
workstation. On my laptop, the upower module works fine: it says "ac"
when plugged in, charging, all that stuff is great.

But on my workstation, it's completely broken: it thinks there's a
battery (which is a mistake: there is no battery at all, apart maybe
from the CMOS battery, but that's not covered by upower), and it
thinks it's discharged, which makes a very noisy warning in the bar.

Now maybe there's something wrong with dbus, Debian, the kernel,
Linux, or some thing else in the stack. All I know is that
`self.power.get_display_device()` returns something like a valid
dbus object here and from there it confuses the heck out of the
module.

So this just adds a function to check if the actual device we're
talking about is actually present, and bails earlier otherwise.

Before: battery logo and "0% 00:00m!", all marked as critical ("red")

After: "ac" with the plugged in logo, not marked critical ("black")
2022-06-20 11:34:12 -04:00
FraSharp
5c166beebf [modules]: introduce pamixer module
Signed-off-by: FraSharp <s23265@iisve.it>
2022-05-26 13:00:40 +02:00
Sam Tebbs
91b1b5e037 Add popup command parameter to the system module 2022-05-20 09:21:26 +01:00
Sam Tebbs
f01179290b Hide progress module if it's inactive 2022-05-13 10:21:31 +01:00
Timoses
a6d2ccc666
Fix logout item using hardcoded command 2022-05-11 19:58:34 +02:00
alexcoder04
3da0f08fcb
arch-update: sleep 1 sec before checking
When waking up from suspend, there is sometimes a delay connecting to
the network, so arch-update gives an error
2022-05-01 12:15:29 +02:00
Samuel Tebbs
d20dacb2dc Fix missing playback_status 2022-04-24 16:09:54 +01:00
Samuel Tebbs
771e7482d7 [modules/playerctl] add 'hide' parameter 2022-04-23 14:44:35 +01:00
arivarton
83d910a7ef Changed __time_format to self.__time_format. 2022-04-08 17:09:28 +02:00
arivarton
a48ddbb2c8 Ran black -t py34 2022-04-08 14:23:22 +02:00
arivarton
8501c406af Google calendar module. 2022-04-08 14:15:28 +02:00
Bernhard B
4d3de3be04 handle util.popup ImportError gracefully
* util.popup requires tkinter to be installed (in order to display
  popups). As most people will probably use the default configuration
  of the pulseaudio module (where the popup is disabled) and in order
  to avoid breaking existing setups, we catch import errors and just log
  them.
2022-03-25 19:41:10 +01:00
Bernhard B
82fa347f2c extended pulseaudio module
* added possibility to show currently selected default device in the
  statusbar (default: off)
* allows to override the left mouse button click with a different
  action (e.g open popup menu to change the current default device)
2022-03-24 21:23:59 +01:00
ishaan
1fc4139b7c add documentation and screenshot for aur-update 2022-03-15 15:56:42 +05:30
ishaan
f513582d44 fix aur-update showing wrong update number 2022-03-15 01:17:57 +05:30