Commit graph

366 commits

Author SHA1 Message Date
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
tobi-wan-kenobi
326e2f9318 [core/theme] add support for XDG_DATA_DIRS
read theme information from
$XDG_DATA_DIRS/bumblebee-status/themes

see #821
2022-07-03 13:56:02 +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
ishaan
879744e19c add aur-update 2022-03-14 22:28:00 +05:30
Sadegh Hamedani
c228ca3b12
[contrib/persian_date] refactor using core.datetime module as parent 2022-03-10 11:53:19 +03:30
Sadegh Hamedani
82ca97c65f
[core/datetime] added 'dtlibrary' attribute and 'set_locale' method 2022-03-10 11:52:08 +03:30
tobi-wan-kenobi
fd1eb6e790
Merge pull request #846 from DTan13/main
added module
2022-03-10 02:52:51 +01:00
Bernhard B
d52f713063 Revert "Merge pull request #857 from bbernhard/pactl"
This reverts commit eb51a3c1c7, reversing
changes made to c57daf65ce.

Instead of creating a separate module, the changes will be integrated
into the pulseaudio module.
2022-03-07 20:53:11 +01:00
Dhananjay Tanpure
3de6f9f4b9
Merge branch 'tobi-wan-kenobi:main' into main 2022-03-07 08:58:13 +05:30
Dhananjay Tanpure
e5cdabcc0f
mpd and title 2022-03-07 08:50:30 +05:30
Sadegh Hamedani
9cbc39e462
[contrib] added module persian_date 2022-03-04 18:28:13 +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
tobi-wan-kenobi
eb51a3c1c7
Merge pull request #857 from bbernhard/pactl
Pactl
2022-03-03 20:31:51 +01:00
Bernhard B
33d22c2637 removed debug log from 'pactl' module 2022-02-28 19:20:19 +01:00
Bernhard B
950931e1b9 added new module 'pactl'
* added new module 'pactl' which displays the current default sink and allows to
  select a different default sink from the popup menu.
2022-02-28 19:14:21 +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
Mihai Morariu
283d47ff65 Merge branch 'main' into fix/publicip-exception 2022-02-14 16:19:43 +02:00
tobi-wan-kenobi
3aadab5628 [modules/publicip] handle missing public ip more gracefully
If location does not throw, but reports an empty public IP, return
"n/a".

Since this caused a bug, also add a test for it.

fixes #853
2022-02-14 14:58:01 +01:00
Mihai Morariu
2a77e3a85c Fix exception in location.py. 2022-02-14 15:36:24 +02: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
4f9553f7ea [modules/rss] fix insecure use of tempfile
fixes #850
2022-02-11 13:44:10 +01:00
Dhananjay Tanpure
8867f4f188
added module for blugon 2022-01-20 21:06:17 +00:00
tobi-wan-kenobi
08b5386140 [util/popup] fix endless loop on "close on leave"
When closing a popup window when the mouse leave the area (default
behaviour, unfortunately), the main "show()" got stuck in an infinite
loop.

Fix that by setting running to False when exiting.

fixes #844
2022-01-14 13:39:04 +01:00
tobi-wan-kenobi
8bde6378d4 [modules/arandr] handle case of "no layouts exist
To ensure that arandr works also if no layouts are available, add some
(very simplistic) exception handling.

see #844
2022-01-14 13:29:29 +01:00
Frank Scherrer
30dd0f2efb add updating view on apt-cache on click 2022-01-13 11:05:01 +01:00
Marco Genasci
8a50eb6f81 New module emerge_status
Display information about the currently running emerge process.

Signed-off-by: Marco Genasci <fedeliallalinea@gmail.com>
2022-01-06 08:06:57 +01:00
Lukas Lüftinger
8991bba90e Silence exceptions in the spotify module which may write large amounts of logs to ~/.xsession-errors 2021-12-28 00:34:10 +01:00
Yufan You
973dd6117e
[contrib/playerctl]: don't log when no player is found
`playerctl status` returns 1 when no player is found, which caused
contrib/playerctl to log many times when there's no player.
2021-12-17 18:07:45 +08:00
tobi-wan-kenobi
26e4bdd7eb [modules/progress] improved autohide functionality
Simplify the previous autohide functionality by adding a flag that lets
a module (e.g. progress) indicate that the current state should be
"revealed" (not auto-hidden).

This vastly simplifies the implementation.

see #835
2021-11-06 08:21:08 +01:00
tobi-wan-kenobi
5ad211f862 Revert "[contrib/progress] allow hiding of inactive state"
This reverts commit cbd989309d.
2021-11-06 08:17:18 +01:00
tobi-wan-kenobi
6a3e4761bf Revert "[core/output] fix logic error when using "autohide""
This reverts commit 74ecbb6ca8.
2021-11-06 08:17:11 +01:00
tobi-wan-kenobi
74ecbb6ca8 [core/output] fix logic error when using "autohide"
- when state is critical or warning -> *show* the module
- when state is mayhide -> *hide* the module

see #835
2021-11-05 19:11:45 +01:00
tobi-wan-kenobi
cbd989309d [contrib/progress] allow hiding of inactive state
Add a new "hide-able" state "mayhide" that can be utilized by modules
without warning state. This state indicates that the module *may* be
hidden by autohide, if the user configures it like this.

see #835
2021-11-05 14:00:34 +01:00
tobi-wan-kenobi
f0ab3ef03a [core/config] fix autohide parameter from configuration file
Need to parse the config parameter "autohide" into a list and actually
check whether the current module is in the list.

see #835
2021-11-05 13:57:05 +01:00
Jan Fader
dced20bf89
refactor code to decrease cognitive complexity in update 2021-10-26 19:52:42 +02:00
Jan Fader
fdc9b78967
add new solaar.py for logitech's unifying devices 2021-10-26 19:27:02 +02:00
alexcoder04
6b31cdb698 [modules/sensors] use util.format.asbool() + auto-check only if no path is specified 2021-10-21 14:43:15 +02:00
alexcoder04
0dc6a95ac2 [modules/sensors] auto-determine the correct thermal zone 2021-10-21 13:45:40 +02:00
Thaynã Moretti
b5395fe764 chore: public toggle method 2021-10-11 19:16:14 -03:00
tobi-wan-kenobi
c96d119b0e [core/config] add autohide to configuration file
make it possible to configure a list of automatically hidden modules in
the configuration file (+ add documentation for it).

fixes #822
2021-10-07 15:39:29 +02:00
tobi-wan-kenobi
ed5a4e61e4 [modules/bluetooth] Add more error checking
Do not kill the bar when the dbus-send command fails.

see #818
2021-09-10 12:45:11 +02:00
Tom Saleeba
d4339f6e43 fix: correct mem usage to be mem *io* usage 2021-08-15 22:27:44 -06:00
Soykan Ertürk
05f76c0d9a
Update todo.py 2021-08-14 20:16:45 +03:00
Soykan Ertürk
5a1addec7f
Fixing a small bug on todo module
todo counts new lines (blank lines) as todo and increments todo count. After my fix todo doesn't counts blank lines.
2021-08-14 20:14:54 +03:00
Soykan Ertürk
473d2fbd14
Improving docs
I added tkinter as dependency in requirements.
2021-08-12 22:54:34 +03:00
Tom Saleeba
98c92bb78f feat: add GPU usage % and GPU memory usage % to nvidiagpu 2021-07-24 15:18:04 -06:00
nepoz
5d80a5a1a0 Slight refactoring to try and break apart networkmethod 2021-07-09 00:28:00 -05:00
nepoz
48501fa534 Updated docstring 2021-07-08 23:00:57 -05:00
nepoz
f9017c3a38 Added more tests and exception handling 2021-07-08 22:55:23 -05:00
nepoz
2100a7cfdb Set up initial testing framework for network module 2021-07-08 12:10:46 -05:00
nepoz
3f524ab371 Refactoring, making use of netifaces 2021-07-08 09:04:40 -05:00
nepoz
911230c659 first complete implementation of the network module 2021-07-05 13:54:28 -05:00
nepoz
c7df1926dc Formatting fixes, fixed state management and added some icons 2021-07-05 13:09:17 -05:00
nepoz
448ab6de83 Functional display for wireless connection 2021-07-05 12:34:42 -05:00
nepoz
4987c7d3e2 added stateful behavior 2021-07-05 11:26:46 -05:00
nepoz
f141b95d8f Basic functionaly for dealingn with signal strength 2021-07-05 10:29:37 -05:00
nepoz
1232c4d960 Initial commit -- give basic message about interface being used 2021-07-05 07:55:47 -05:00
Sayan Sil
4485b65722
Use the existing util.cli module 2021-06-30 11:31:42 +05:30
Yufan You
37ccbd7f4a
[modules/playerctl]: support the stopped status 2021-06-26 18:19:24 +08:00
Sayan
e5007a5729 Add active gpu module using optimus-manager 2021-06-24 23:17:35 +05:30