Commit graph

85 commits

Author SHA1 Message Date
tobi-wan-kenobi
fded39fa81 [modules/pulsectl] make device names case sensitive
A previous change accidentially changed the "pretty" device name mapping
to be required to be in lowercase (rather than the exact name of the
devices. Restore previous functionality.

fixes #989
2023-09-11 09:36:47 +02:00
Pavle Portic
9e6e656fa8
Add device filter support to pulsectl popup menu 2023-09-06 22:34:38 +02:00
Pavle Portic
37b5646d65
Allow adjusting the font size of tk popups 2023-09-06 12:11:57 +02:00
tobi-wan-kenobi
14f19c897a [modules/pulsectl] add default device selection
re-enable functionality to add a popup that allows the user to select
the default source/sink.

fixes #965
2023-05-11 08:45:03 +02: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
tobi-wan-kenobi
acb387a685 Merge branch '921-scrolling-status-bar' 2022-09-17 17:04:12 +02: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
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
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
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
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
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
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
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
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
Sadegh Hamedani
82ca97c65f
[core/datetime] added 'dtlibrary' attribute and 'set_locale' method 2022-03-10 11:52:08 +03:30
tobi-wan-kenobi
7d33171749 [core/input] methods can be event callbacks
When registering an event (especially mouse events), if the parameter
is a valid method in the Module, execute that with the event as
parameter.

Add this in the core.spacer module as an example.

fixes #858
see #857
2022-03-04 09:35:43 +01:00
Lukas Lüftinger
928f8258aa fix case of Kelvin SI unit in redshift widget 2022-02-20 12:29:49 +01:00
tobi-wan-kenobi
03731136b6 [modules/nic] fix missing check for None 2022-02-15 16:34:02 +01:00
Pi-Yueh Chuang
4784be4076
typo in nic.py: minium -> minimum 2022-02-12 12:54:31 -05:00
Christopher Kepes
5c390be25c [modules/nic] Added strength indicator for wifi signals 2022-02-12 11:06:10 +01:00
tobi-wan-kenobi
4b6b4b9052 [core] add custom minimizer capability
Add a new set of parameters to allow modules to be customly minimized.

It works like this: If a module has the parameter "minimize" set to a
true value, it will *not* use the built-in minimizer, and instead look
for "minimized" parameters (e.g. if date has the "format" parameter, it
would look for "minimized.format" when in minimized state). This allows
the user to have different parametrization for different states.

Also, using the "start-minimized" parameter allows for modules to start
minimized.

Note: This is hinging off the *module*, not the *widget* (the current,
hard-coded hiding is per-widget). This means that modules using this
method will only show a single widget - the first one - when in
minimized state. The module author has to account for that.

see #791
2021-05-24 12:56:02 +02:00
tobi-wan-kenobi
dfd23a44de [modules/layout] add a new - generic - layout module
Add a new module "layout" that will eventually evolve into the only
keyboard layout module.

Right now, it uses an external binary (get-kbd-layout) to determine the
layout of a keyboard device (because I did not manage to call libX11
with ctypes correctly).

see #788
see #790
2021-05-16 21:09:58 +02:00
tobi-wan-kenobi
10c169af8a [modules/core/cpu] optionally add per-cpu widget
if the parameter "percpu" is set to true, create one widget per cpu, and
also handle warning/error state on a per-widget basis.

see #785
2021-04-27 17:17:13 +02:00
tobi-wan-kenobi
8001ed3ada [modules/cpu] Add per-cpu mode
By explicitly setting "cpu.percpu=True" as parameter, it is now possible
to get the CPU utilization on a per-cpu basis.

Future extension: One widget per CPU (add ID of CPU and add
warning/error state on a per CPU basis)

see #785
2021-04-27 17:16:54 +02:00
tobi-wan-kenobi
868502d62e [modules/keys] add missing modules
forgot to add in the previous commit
2021-03-13 14:04:42 +01:00
tobi-wan-kenobi
406eadeac7 [modules/time] update once per second
fixes #676
2021-01-17 15:35:39 +01:00
Florian Eich
3c08eafa4a Add TiB to disk units, add SI unit option for disk space 2020-12-02 19:08:45 +01:00
tobi-wan-kenobi
a8d1254e06 [modules/nic] Make regex for SSID a raw string 2020-12-01 15:58:55 +01:00
Florian Eich
de01d96b91 Change iw call in module nic from link to info 2020-12-01 00:19:17 +01:00
tobi-wan-kenobi
d0ee1b06e4 [modules/nic] make exclude list regular expression capable
Allow the usage of regexps in the exclude list, but keep the "this is a
prefix" logic for backwards compatibility.

should address (see #738)
2020-11-30 17:21:17 +01:00