Last active
May 31, 2018 12:34
-
-
Save nwg-piotr/8691fa9cb7211908f44f98c0c2463196 to your computer and use it in GitHub Desktop.
This is to add Arch Linux updates notification to your tint2 panel. Download the bash scipt and icon from https://drive.google.com/open?id=1aW7C23aUQSkcfP5RRh4hC5SEAlta26-T and unpack to your home folder. Finally add the tint2rc Executor to your ~/.config/tint2/tint2rc file. Replace `xfce4-terminal` with your favorite terminal name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How to modify to use various AUR helpers: | |
# EITHER check regular repos, then AUR with trizen: | |
upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/trizen -Qqu -a") | |
# or with yaourt: | |
#upd=$(/bin/sh -c "(/usr/bin/checkupdates; /usr/bin/yaourt -Qu -a | cut -c 5-) | sort -u -t' ' -k1,1") | |
# or pacaur: | |
#upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/pacaur -Qqu -a") | |
# or aurman: | |
#upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/aurman -Qqu") | |
# or yay: | |
#upd=$(/bin/sh -c "/usr/bin/checkupdates && /usr/bin/yay -Qqu --color never | sed 's/Get .*//'") | |
# OR just check regular repos only: | |
#upd=$(/usr/bin/checkupdates) | |
# DO NOT FORGET to change the update line in the Executor accordingly | |
# SEE: https://github.com/RaphaelRochet/arch-update/wiki | |
if [ ! -z "$upd" ] | |
then | |
echo ~/.ob-arch-checker/archlinux-icon-au.svg | |
notify-send "Pending updates:" "<i>$upd</i>" --icon="archlinux" --expire-time=5000 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------- | |
# Executor 1 | |
execp = new | |
execp_command = ~/.ob-arch-checker/./au.sh | |
execp_interval = 900 | |
execp_has_icon = 1 | |
execp_cache_icon = 0 | |
execp_continuous = 0 | |
execp_markup = 0 | |
execp_tooltip = | |
execp_lclick_command = xfce4-terminal -e 'sh -c "trizen -Syyu ; echo Done - press enter to exit; read; killall -SIGUSR1 tint2"' | |
execp_rclick_command = | |
execp_mclick_command = | |
execp_uwheel_command = | |
execp_dwheel_command = | |
execp_font_color = #f8e6e6 100 | |
execp_padding = 0 0 | |
execp_background_id = 0 | |
execp_centered = 0 | |
execp_icon_w = 26 | |
execp_icon_h = 26 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you'd like tu use something else instead of Trizen, you'll find alternatives here: https://github.com/RaphaelRochet/arch-update/wiki