# min\_width=CPU: 100.00%

**URL:** <https://forum.endeavouros.com/t/min-width-cpu-100-00/21129>\
**Category:** All WMs\
**Created:** [December 11, 2021, 7:01pm UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129 "2021-12-11T19:01:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leigh](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/leigh/32/129718_2.png) [@Leigh](https://forum.endeavouros.com/u/Leigh)\
**Post date:** [December 11, 2021, 7:01pm UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/1 "2021-12-11T19:01:22Z")

</div>

Hi  
In i3blocks.conf there is the following block:

> [cpu\_usage]  
> label=  
> command=~/.config/i3/scripts/cpu\_usage  
> #min\_width=CPU: 100.00%  
> interval=2

I am assuming that the line

> min\_width=CPU: 100.00%

is to stop the output to the left of this block jumping about at the %CPU changes from single to double figures?

But when I un-comment it I cant get it to do this, even changing the value

Can anyone tell me how to do this please?

EDIT: seems to work with

> min\_width=XXXXX

but not sure why - is it the width of the characters rather than the value?

Absolutely loving i3 EOS 👍 👍 👍 👍

---

<div class="post-metadata">

**Author:** ![malux](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@malux](https://forum.endeavouros.com/u/malux)\
**Post date:** [February 7, 2022, 2:50pm UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/2 "2022-02-07T14:50:32Z")

</div>

Hi @Leigh,  
I faced the same Issue and resolved it by modifying the underlying script in `~/.config/i3/scripts/cpu_usage`.

I changed the lines 50 and 52 to always print two digits (leading zero) in front of the decimal point like so:

```auto
printf "%02.${decimals}f%%\n", $cpu_usage;

```

hope that helps someone!

---

<div class="post-metadata">

**Author:** ![joekamprad](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/joekamprad/32/77608_2.png) [@joekamprad](https://forum.endeavouros.com/u/joekamprad)\
**Post date:** [February 7, 2022, 5:18pm UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/3 "2022-02-07T17:18:12Z")

</div>

welcome at the forum! :enos:

GitHub source:

> <https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/a1862c891e2b7e679ec234ee3c011e5bf562556e/.config/i3/scripts/cpu_usage#L50>

I would like to see a Pull Request if you have an GitHub account if not I can change it and mention this post.

---

<div class="post-metadata">

**Author:** ![Leigh](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/leigh/32/129718_2.png) [@Leigh](https://forum.endeavouros.com/u/Leigh)\
**Post date:** [February 8, 2022, 8:01am UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/4 "2022-02-08T08:01:11Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![joekamprad](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/joekamprad/32/77608_2.png) [@joekamprad](https://forum.endeavouros.com/u/joekamprad)\
**Post date:** [February 8, 2022, 4:05pm UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/5 "2022-02-08T16:05:10Z")

</div>

> <https://github.com/endeavouros-team/PKGBUILDS/commit/97b43a598d51cd1b4bc3ac1b9e1bed4318dfeaae>
>
> https://github.com/endeavouros-team/endeavouros-i3wm-setup/commit/31f2e3ef1d3a2f…5e786a4917e18144297fd21dd4

added this 😉

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [February 10, 2022, 4:05pm UTC](https://forum.endeavouros.com/t/min-width-cpu-100-00/21129/6 "2022-02-10T16:05:29Z")

</div>

Closed on February 10, 2022, 4:05pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
