Commit graph

26 commits

Author SHA1 Message Date
Tobias Witek
e80ae8b91e [core] Add option to draw widgets right-to-left
fixes #295
2018-09-22 14:40:32 +02:00
Tobias Witek
290f95d6b4 [core] Collapse modules by using middle mouse
When pressing the middle mouse button (and it's not assigned to any
other functionality), the module (i.e. all widgets of that module) will
disappear and be replaced with the module's icon (or prefix, as
fallback) and an ellipsis.

fixes #264
2018-05-30 10:42:31 +02:00
WORD559
705c18dbcd Can force status bar to update early by sending a USR1 signal to the process 2018-05-06 09:31:46 +01:00
Tobias Witek
8e80923f14 [core/theme] Add option to override iconset + add experimental icons
Add an option to load a user-specified icon theme (which will override
the theme's icons).

Also, commit a first version of a set of icons from the ionicons set
(see http://ionicons.com/).

see #252
2018-04-29 16:12:39 +02:00
Tobias Witek
10df79ce9a [core] Disable debugging if "-d" is not specified
Do not print any debugging messages unless "-d" has been specified on
the commandline.
Also, introduce two "special" logfiles "stdout" and "stderr" to log to
stdout and stderr, respectively.

fixes #213
2017-12-19 18:29:39 +01:00
Tobias Witek
9365e5b18a [core] Set default encoding to utf-8
Have another go at all my fun utf-8 issues.

This *should* fix #180

And hopefully still fixes #176
2017-09-18 20:14:17 +02:00
Tobias Witek
dfb1e39421 [core + modules/cmus] Have another go at fixing unicode issues
Override sys.stdout and sys.stderr in an attempt to enforce utf-8
encoding. Probably this will cause all kinds of weird issues down the
line, but at least, it seems to solve the immediate issue.

fixes #176
2017-09-16 12:22:20 +02:00
Tobias Witek
93768e3380 [doc] Updated README.md + small logging refactor
* Fix minor grammatical errors in README.md
* Make logfile configuration a bit nicer
2017-08-20 10:59:39 +02:00
Tobias Witek
ba843355eb [engine/popup] Make tkinter module optional
If tkinter is not available, status bar should still work as expected
(but all the popup functionality will not work and likely throw errors).
2017-06-16 15:36:56 +02:00
Tobias Witek
7d13268f66 [engine] Report current module when error occurs
Keep track of the latest updated module in the engine part, so that the
module causing an exception can be reported correctly.

fixes #110
2017-06-10 14:08:49 +02:00
Tobias Witek
9b0c9a49e8 [core] Cleanly abort on ctrl+c
During debugging, being able to cleanly (i.e. without backtrace) exit
using ctrl+c is a very welcome functionality :)
2017-05-13 20:28:11 +02:00
tobi-wan-kenobi
dc3881d99e [core] Make logging work in (hopefully) all situations
* Unless debugging has been enabled, log to stderr (i.e. do *not* try to
open a file)
* When debugging into a file, choose a location that is likely to be
writeable by the user (i.e. the user's home directory)
* Location of the logfile can also be specified
    
fixes #62
2017-04-04 15:15:50 +02:00
Tobias Witek
0e502cef25 [bumblebee-status] Add missing import for error module 2017-04-02 08:56:44 +02:00
Tobias Witek
251f8d2e9f [core] Add debugging capabilities
* If an exception is thrown, catch it and show a (somewhat) nice error
  message in the i3bar instead of the normal content
* Add a flag "-d" for debugging into a debug log. Currently, this only
  logs commandline calls as they occur and their return values, as well
  as exceptions.

fixes #58
2017-04-02 08:31:23 +02:00
Tobi-wan Kenobi
225d471c6a [modules/cpu] Add configurable warning and critical thresholds
The cpu module now has cpu.warning and cpu.critical thresholds. If the
CPU utilization is higher than any of those values, the widget's state
changes to warning or critical, respectively.

see #23
2016-12-10 08:09:13 +01:00
Tobi-wan Kenobi
e72c25b0bc [core] Add input processing
Create infrastructure for input event handling and add i3bar event
processing. For each event, callbacks can be registered in the input
module.
Modules and widgets both identify themselves using a unique ID (the
module name for modules, a generated UUID for the widgets). This ID is
then used for registering the callbacks. This is possible since both
widgets and modules are statically allocated & do not change their IDs.

Callback actions can be either callable Python objects (in which case
the event is passed as parameter), or strings, in which case the string
is interpreted as a shell command.

see #23
2016-12-09 19:29:16 +01:00
Tobi-wan Kenobi
64f5fc100e [core/theme] Add prefix/postfix methods
Add a way to specify prefix and postfix strings to the full text of a
widget's text. Currently, the theme does not fill those yet.

see #23
2016-12-08 11:31:20 +01:00
Tobi-wan Kenobi
8855f1155b [core/errors] Add custom exceptions
Add custom exceptions and add error handling to the engine's module
loading logic. I.e. when a non-existent module is loaded, an exception
is thrown now.

see #23
2016-12-04 16:23:44 +01:00
Tobi-wan Kenobi
b6eb3ee8e6 [output/i3bar] Add flush method
flush() terminates a single iteration of widget drawing.

see #23
2016-12-04 16:14:43 +01:00
Tobi-wan Kenobi
cf1693548b [engine] Add initial version of event loop engine
Re-add the engine that is responsible for tying together input, output,
etc.

see #23
2016-12-04 08:37:56 +01:00
Tobi-wan Kenobi
a8a6c9bba2 [core] Refactor engine
This is going to be a bit more comprehensive than anticipated. In order
to cleanly refactor the core and the engine, basically start from
scratch with the implementation.

Goals:

* Test coverage
* Maintain backwards compatibility with module interface as much as
  possible (but still make modules easier to code)
* Simplicity

see #23
2016-12-03 20:38:54 +01:00
Tobias Witek
3af8ee771d [general] Refactoring
* remove (hopefully) unnecessary import statements
* make some code a bit more compact
* remove dead code ... again: hopefully so
2016-11-05 15:54:34 +01:00
Tobias Witek
a58610f3ee [config] Start refactoring by creating separate config class
Add a class that will hold all configuration and argument information
and serve as central repository for this kind of information.
2016-11-05 07:54:36 +01:00
Tobias Witek
55474aadc3 [general] Minor refactoring
Shuffled some code around in an attempt to make it easier to read and
understand.
2016-11-04 21:41:22 +01:00
Tobias Witek
d62258c89d [all] Major refactoring
Introduce an "Engine" class to abstract some of the details of loading
modules, registering events, etc.
2016-11-04 21:03:12 +01:00
Tobias Witek
a6bdd0557c [doc] rename i3bumblebee -> bumblebee-status
As the prefix i3* is reserved for official i3 packages, rename
i3bumblebee to bumblebee-status.
2016-11-04 20:20:46 +01:00
Renamed from i3bumblebee (Browse further)