Commit Graph

15 Commits

Author SHA1 Message Date
Brenno Lemos f8340d88be chore: lint unrelated file
this file was edited in #2558 but not linted
2023-10-09 15:26:07 -03:00
SWarrener c16e791cdc Adding options to allow disk outputs to always be in a specific unit 2023-10-08 16:24:50 +01:00
Aleksei Bavshin ea17a66dfc
fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
Simon Plakolb 5e9bbe5c76 modules: Revert button to label 2022-11-24 13:08:16 +01:00
Simon Plakolb 2b735f44bc modules: Set tooltip on button
Mouse-over tooltips set on the label only appear once the mouse hovers
over exactly the label. Other apps (e.g. firefox) show the tooltip once
the pointer hovers the button. Not solely its label. With this commit we
get the same behaviour.
2022-10-12 10:25:30 +02:00
Simon Plakolb b8322c4b4b button: Add AButton class
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.

If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.

GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )

In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
2022-10-12 10:25:29 +02:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Alex 6712cd05a3
Merge branch 'master' into disk 2021-11-23 13:54:17 +01:00
Ole Martin Handeland 4229e9b2ca Implemented format-{state} for cpu/disk/memory 2020-10-12 02:05:26 +02:00
Thorben Günther 12016d35bb
disk module: add state for percentage_used 2020-09-23 14:01:25 +02:00
Jan Beich 94a4d41a65 disk: make used calculation match df(1) output
Substract space only available to superuser as well.
2020-05-26 07:47:08 +00:00
Jan Beich 71b7b4e0f4 disk: properly calculate free/total size
On most Unix systems `f_blocks`, `f_bfree`, and `f_bavail` are
reported in units of `f_frsize`.
2020-05-19 10:43:45 +00:00
Alex b40cdcb5bd refactor: call parent update 2020-04-12 18:30:21 +02:00
Guillaume Maudoux f4d2ca2736 custom formatter for numbers in 'pow' units format 2019-09-25 12:53:06 +02:00
Guillaume Maudoux 1d39ef5c8e Add a disk module 2019-09-25 08:47:33 +02:00