Commit Graph

30 Commits

Author SHA1 Message Date
1c554dd0e0 Merge branch 'hotfix/3.5.1' 2020-12-12 13:28:57 +01:00
82ebad5e7a fix(timer_module): Ensure that interval > 0 (#2274)
Since 3.5.0, we use m_interval for a modulo operation, this crashes the
bar if the interval is 0. A non-positive interval shouldn't be allowed
anyway, so we now throw an exception in that case.

Fixes #2273
2020-12-05 22:58:38 +01:00
39c73a8234 feat: Warn state for cpu, memory, fs, battery modules (#2199)
* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps

* [Temperature, Ramp] fix wrong icon for temperatures near base and warn temps

* Fix minor error

* Added WARN state for cpu module

* Implement WARN state for CPU, Memory modules, working on fs module

* Implement WARN state for fs module

* Simplify WARN state implementation for cpu and memory

* explicitly check percentage in get_by_percentage_with_borders

* Fixed silly error

* implement warn state on battery module, standardize the implementation on other modules

* minor fixes

* fix annoying error

* use more intuitive param name

* Fix percentage with borders bug

* Make requested changes
Hide the effect of warn states when unused

* Backward Compat: use no format instead of fallback label

* Reformat

* Refactor

* Reformat

* Reformat: convert tabs to spaces

* Reformat
2020-12-02 15:55:13 +01:00
0416093edc Display correct(binary) unit prefixes in memory module (#2211) 2020-11-27 23:30:09 +01:00
921658f331 memory: Remove decimal places for megabytes (#1606)
As requested in #1598

Two decimal places for megabytes gives you precision at the scale of tenths of kilobytes, which is quite unnecessary for RAM
2019-01-17 08:32:42 +01:00
11d66ee78d feat(mem): Add ramp and bar for swap (#1325)
Now all the tokens in the memory module also have ramp and bar counterparts.

These can be used exactly the same as `bar-used` and `ramp-used`, they are named `<bar-swap-used>`, `<bar-swap-free>`, `<ramp-swap-used>`, and `<ramp-swap-free>`
2018-09-14 20:42:04 +02:00
4f6e37449b feat(memory): Add swap tokens (#1018) 2018-02-25 12:12:38 +01:00
2f62a6fbad feat(memory): Add memory used/free ramp
Closes #1037
2018-02-19 14:30:30 -08:00
107bdb91e3 fix(memory): Implement memory updating for pre-3.4 kernels (#410)
Since 3.4, `/proc/meminfo` contains a `MemAvailable` field, which polybar uses to determine
`(gb|mb)_free` and `(gb|mb)_used`. This commit adds a fallback for when `MemAvailable` does
not exist, allowing a fairly-accurate approximation on older kernels.

This commit also removes the reliance on the exact order fields appear in `/proc/meminfo`.
2017-02-04 18:19:58 +01:00
3292cea786 refactor(tokens): Move token suffix to configuration 2017-01-14 18:00:35 +01:00
c2ac7fde67 refactor: Filesize strings 2017-01-12 20:28:44 +01:00
9184a8b046 fix(memory): Safety check 2017-01-12 20:25:57 +01:00
e3a51b235a refactor(clang-tidy): Apply fixes 2016-12-31 04:32:11 +01:00
14958bdd23 fix: Correct type for module interval 2016-12-31 03:04:01 +01:00
78bb3695e6 refactor(config): Deduce return type from default value 2016-12-30 23:32:05 +01:00
11aabac227 refactor(connection: Use custom base 2016-12-26 09:46:48 +01:00
788a7ca3a3 refactor(modules): Get rid of .inl files 2016-12-21 09:21:35 +01:00
c01f111e34 refactor(modules): Move setup to constructor 2016-12-21 08:00:09 +01:00
f9062d031c refactor(clang-tidy): Apply fixes 2016-12-15 03:30:41 +01:00
d45fd76dcd refactor(config): Drop boost::property_tree 2016-12-14 10:57:45 +01:00
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
c6d85b2b92 refactor: Optimize build 2016-11-20 23:04:31 +01:00
88c8bbd940 refactor: Fwd declare drawtypes
Ref #164
2016-11-19 15:49:06 +01:00
fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00
d359ab6057 refactor: Application rewrite 2016-10-10 14:52:57 +02:00
e1f8c001dd refactor: Pass by value 2016-06-21 04:23:23 +02:00
39d3f61497 refactor(core): Clean-up
- use "#pragma once" instead of the regular include guard
- fix errors and warnings reported by cppcheck
2016-06-02 01:32:06 +02:00
a83ecb36db fix(memory): Set vars to 0 if exception is thrown 2016-05-24 03:47:31 +02:00
eeefb3c610 init(git): Base commit 2016-05-19 20:23:45 +02:00