# Enable update notifier

**URL:** <https://forum.endeavouros.com/t/enable-update-notifier/62291>\
**Category:** EndeavourOS repo\
**Created:** [October 25, 2024, 7:08pm UTC](https://forum.endeavouros.com/t/enable-update-notifier/62291 "2024-10-25T19:08:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anon93652015](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/48db29/32.png) [@anon93652015](https://forum.endeavouros.com/u/anon93652015)\
**Post date:** [October 25, 2024, 7:16pm UTC](https://forum.endeavouros.com/t/enable-update-notifier/62291/3 "2024-10-25T19:16:13Z")

</div>

Rather than adding another app or extension, you could use a script instead.  
. . .

> [@Useful and "Use Less" Scripts](https://forum.endeavouros.com/t/useful-and-use-less-scripts/61327/1):
>
> What it does:
> 
> - Checks the Arch and AUR repos for updates using `checkupdates && yay -Qua`.
> - If updates are available (there will be), a notification is sent using `notify-send`.
> - If the user clicks it, it launches a terminal and begins the update.
> 
> The check is done every 6 hours, but you can change it to a frequency you prefer.
> 
> ~~Note: It uses `paru` instead of `yay` to check AUR updates because `yay` doesn’t seem to have a command that does this without also attempting to update.~~
> 
> ```auto
> #!/bin/bash
> 
> # Function to check for updates and send notification
> check_updates() {
> updates=$(checkupdates && yay -Qua)
> 
> if [-n "$updates"]; then
> notify-send -t 60000 -a "System Updates" "Updates Available" "Click to update in your terminal" -A "Update"
> 
> if [$? -eq 0]; then
> # Notification was clicked, launch alacritty and run pacman and yay
> alacritty -H -e "bash -c 'sudo pacman -Syu && yay -Sua; echo; read -p \"Press Enter to close this window...\"'"
> fi
> fi
> }
> 
> # Main loop
> while true; do
> check_updates
> sleep 6h
> done
> 
> ```

---

_[View the full topic](https://forum.endeavouros.com/t/enable-update-notifier/62291)._
