You are not logged in.

#1 2020-12-31 21:17:36

VoDo
Member
From: Europe
Registered: 2020-06-04
Posts: 122

Neofetch and checkupdates

I know nothing about scripting, development etc...
I would like to have checkupdate when running neofetch
I found on this forum

(checkupdates; cower -u 2>/dev/null) | wc -l

When I put it to neofetch config.conf

prin "Updates" "(checkupdates; cower -u 2>/dev/null) | wc -l"

it writes

Updates: | wc -l

What should I add to that line to show the number of packages for update as it does when I put it into the terminal?

Last edited by VoDo (2020-12-31 21:18:34)


Archi3

Offline

#2 2020-12-31 21:24:44

VoDo
Member
From: Europe
Registered: 2020-06-04
Posts: 122

Re: Neofetch and checkupdates

Ok one hundred try and correct answer is this

prin "Updates" "(checkupdates; cower -u 2>/dev/null | wc -l)"

Archi3

Offline

#3 2020-12-31 23:31:32

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,405
Website

Re: Neofetch and checkupdates

cower is dead upstream, maybe use auracle sync instead.

Also, I know nothing about neofetch, but I would expect only the output of the second command to be passed to wc, the first command's output would be printed to stdout. If you want to concatenate the output, move the close parenthesis to just after the second command, e.g.

prin "Updates" "(checkupdates; cower -u) 2>/dev/null | wc -l"

Or maybe use a group command to avoid using a subshell (assuming that's supported by neofetch)

prin "Updates" "{ checkupdates; cower -u; } 2>/dev/null | wc -l"

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2021-01-01 07:22:56

VoDo
Member
From: Europe
Registered: 2020-06-04
Posts: 122

Re: Neofetch and checkupdates

Thank you
Maybe it works without cower command what I have no idea its function, I remove cower -u and run the command it displays 0 as before, will wait for some updates.


Archi3

Offline

#5 2021-01-02 06:58:08

VoDo
Member
From: Europe
Registered: 2020-06-04
Posts: 122

Re: Neofetch and checkupdates

At the end I use only this in neofetch.

prin "Updates" "$(checkupdates | wc -l)"

Archi3

Offline

Board footer

Powered by FluxBB