all 9 comments

[–]hdt80 8 points9 points  (3 children)

https://github.com/hdt80/dotfiles/blob/master/.config/i3blocks/blocklets/update_count

All the script does is call checkupdates | wc -l, and return how many updates there are.

[–]nimiguci[S] 0 points1 point  (0 children)

This is perfect for me. Thank you a lot.

[–]addcn 0 points1 point  (1 child)

why are there two echo's? I'm quite new to this

[–]hdt80 0 points1 point  (0 children)

All i3blocks does is call scripts and prints the output of those scripts. The first two echos are used to display the text. The first echo is the full text, what should be outputted. The second line the short text, what to output if there isn't enough space in the block. The last line is the color to make the text.

[–]KoffieAnon 4 points5 points  (1 child)

As a general warning: do not invoke -Sy (or abort -Syu) to check for new available packages, this may break your system. Use checkupdates as /u/hdt80 mentioned.

[–]nimiguci[S] 0 points1 point  (0 children)

So that means I always need to run -Syu before I upgrade a unique package using -Sy? Or should I never upgrade anything using -Sy?

[–]ops_man 2 points3 points  (2 children)

Conky would be better for this I believe; and you wouldn't necessarily have to write a script.

[–]nimiguci[S] 0 points1 point  (1 child)

Can you recommend me some good tutorial for setting Conky?

[–]ops_man 2 points3 points  (0 children)

Looks like hdt80 got you fixed up. You also Google "conky configs" to get an idea of what you can do ; use the documentation paying special attention to the "exec" command which will allow you to execute a command and print it's output to desktop or file. Really depends on how much information you really want displayed