Commit graph

261 commits

Author SHA1 Message Date
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
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
Yufan You
c4046d0cd2
[doc]: link to the README instead of manpage 2021-06-11 18:12:13 +08:00
Yufan You
51f68addcd
[modules/playerctl]: BREAKING: use playerctl -f and add playerctl.args
1. Use `playerctl -f` to format, which is more powerful. This also fixes
   #767, which is caused by missing a few fields of the metadata.
2. Add `playerctl.args`, so that users can choose a specific player,
   etc.
3. Display nothing when there's no running player.

This is a breaking change. Users need to change `{title}` to
`{{title}}`.
2021-06-11 17:38:46 +08: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
902288f30d [modules/sensors] do not truncate temperature
use strip() instead of a sub-list to get the value for the temperature.

fixes #787
2021-05-11 11:23:06 +02:00