Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An other suggestion: Update indicator (waybar) #40

Closed
taschenlampe opened this issue Apr 22, 2021 · 3 comments · Fixed by #44
Closed

An other suggestion: Update indicator (waybar) #40

taschenlampe opened this issue Apr 22, 2021 · 3 comments · Fixed by #44
Labels
enhancement New feature or request

Comments

@taschenlampe
Copy link
Collaborator

Hi!
This may be just a personal wish, not sure if anyone else wants this: May I suggest to include an update widget to waybar . I have something like this:

  "custom/zypper": {
        "format": "{} ",
        "interval": 3600,
        "exec": "zypper lu | grep 'v |' | wc -l",
        "exec-if": "exit 0",
        "on-click": "exec alacritty -e sudo  zypper update ; pkill -SIGRTMIN+8 waybar",
        "signal": 8
    }

I must confess that I copied -and slighty adapted- the code from waybar's wiki...I am not 100% about this SIGTMIN+signal function...but heyho, it seems to do what it should do.

Cheers

@taschenlampe taschenlampe changed the title An other suggest: Update indicator (waybar) An other suggestion: Update indicator (waybar) Apr 22, 2021
@denisok
Copy link
Contributor

denisok commented Apr 22, 2021

ha, cool suggestion!. zypper dup probably and I will check about the signal.
waybar needs some love for sure, on my AMD laptop temps don't work as well.

Thanks! BTW there will be openSUSE conference, I have submitted a talk about openSUSEway, if you would like to participate - would be awesome :) maybe some feedback during the talk.

@denisok denisok added the enhancement New feature or request label Apr 22, 2021
@denisok denisok added this to To do in openSUSE way via automation Apr 22, 2021
@taschenlampe
Copy link
Collaborator Author

Hi!
Sure thing, I'd like to listen to your talk. Though I cannot guarantee that my feedback (if I gave any ) , will make a lot of sense though :-D

@denisok denisok moved this from To do to In progress in openSUSE way May 2, 2021
denisok added a commit that referenced this issue May 2, 2021
@taschenlampe
Copy link
Collaborator Author

Using
"exec": "zypper lu -a | grep 'v | ' | wc -l"
could be an option too (though there is some issues with it, when you have several repos proposing the same packages. For me this is fine as I know (mas o menos) why I cannot upate all listed pakages)
An other issue is, that after updating the system waybar will wait (up to) 3600s until it refreshes the zypper/widget status...somehow the widget should reload itself after executing the command. I am not sure how to deal with it.

As I prefer to update only when a new release is available I wrote this little script to check if a new release is available:

   "custom/release": {
        "format": "{} ",
        "exec" : "/usr/bin/sh /home/me/test.sh",
        "interval": 3600,
        "exec-if": "exit 0",
        "on-click": "exec alacritty -e sudo  zypper update ; pkill -SIGRTMIN+8 waybar",
        "signal": 8
    },

test.sh -> https://paste2.org/tADAWNbs

Please note: I am not a coder, I guess this script will make people laugh that actually know how to code :-D

openSUSE way automation moved this from In progress to Done May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
openSUSE way
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants