Skip to content

Commit

Permalink
Add the --tray arg to the main script to launch the Arch-Update systr…
Browse files Browse the repository at this point in the history
…ay applet
  • Loading branch information
Antiz96 committed May 7, 2024
1 parent b2b3e4d commit 9cf19a9
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 10 deletions.
3 changes: 2 additions & 1 deletion README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,15 @@ Options :
-n, --news [Num] Afficher les dernieres Arch News, vous pouvez optionellement spécifier le nombre de Arch news à afficher avec `--news [Num]` (e.g. `--news 10`)
-D, --debug Afficher les traces de débogage
--gen-config Générer un fichier de configuration par défaut/exemple (voir la page de manuel arch-update.conf(5) pour plus de détails)
--tray Lancer l'applet systray d'Arch-Update
-h, --help Afficher ce message d'aide et quitter
-V, --version Afficher les informations de version et quitter
Codes de sortie :
0 OK
1 Option invalide
2 Aucune méthode d'élévation de privilège (sudo ou doas) n'est installée
3 Erreur lors du changement d'icône
3 Erreur lors du lancement de l'applet systray d'Arch-Update
4 L'utilisateur n'a pas donné la confirmation de procéder
5 Erreur lors de la mise à jour des paquets
6 Erreur lors de l'appel de la commande reboot pour appliquer une mise à jour du noyau en attente
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,15 @@ Options:
-n, --news [Num] Display latest Arch News, you can optionally specify the number of Arch news to display with `--news [Num]` (e.g. `--news 10`)
-D, --debug Display debug traces
--gen-config Generate a default/example configuration file (see the arch-update.conf(5) man page for more details)
--tray Launch the Arch-Update systray applet
-h, --help Display this help message and exit
-V, --version Display version information and exit
Exit Codes:
0 OK
1 Invalid option
2 No privilege elevation method (sudo or doas) is installed
3 Error when changing icon
3 Error when launching the Arch-Update systray applet
4 User didn't gave the confirmation to proceed
5 Error when updating the packages
6 Error when calling the reboot command to apply a pending kernel update
Expand Down
12 changes: 8 additions & 4 deletions doc/man/arch-update.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "ARCH-UPDATE" "1" "March 2024" "Arch-Update 1.15.0" "Arch-Update Manual"
.TH "ARCH-UPDATE" "1" "May 2024" "Arch-Update 1.15.0" "Arch-Update Manual"

.SH NAME
arch-update \- An update notifier/applier for Arch Linux that assists you with important pre/post update tasks.
Expand Down Expand Up @@ -44,7 +44,7 @@ Display the list of pending updates.

.TP
.B \-d, \-\-devel
Include AUR development packages updates
Include AUR development packages updates.

.TP
.B \-n, \-\-news
Expand All @@ -54,12 +54,16 @@ Display latest Arch news.

.TP
.B \-D, \-\-debug
Display debug traces
Display debug traces.

.TP
.B \-\-gen\-config
.RB "Generate a default/example configuration file (see the " "arch-update.conf(5) " "man page for more details)."

.TP
.B \-\-tray
Launch the Arch-Update systray applet.

.TP
.B \-v, \-\-version
Display version information.
Expand Down Expand Up @@ -138,7 +142,7 @@ No privilege elevation method (sudo or doas) is installed

.TP
.B 3
Error when changing icon
Error when launching the Arch-Update systray applet

.TP
.B 4
Expand Down
12 changes: 8 additions & 4 deletions doc/man/fr/arch-update.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "ARCH-UPDATE" "1" "Mars 2024" "Arch-Update 1.15.0" "Manuel de Arch-Update"
.TH "ARCH-UPDATE" "1" "Mai 2024" "Arch-Update 1.15.0" "Manuel de Arch-Update"

.SH NAME
arch-update \- Un notificateur/applicateur de mises à jour pour Arch Linux qui vous assiste dans les tâches importantes d'avant/après mise à jour.
Expand Down Expand Up @@ -44,7 +44,7 @@ Afficher la liste des mises à jour en attente.

.TP
.B \-d, \-\-devel
Inclure les mises à jour des paquets de développement AUR
Inclure les mises à jour des paquets de développement AUR.

.TP
.B \-n, \-\-news
Expand All @@ -54,12 +54,16 @@ Afficher les dernières Arch news.

.TP
.B \-D, \-\-debug
Afficher les traces de débogage
Afficher les traces de débogage.

.TP
.B \-\-gen\-config
.RB "Générer un fichier de configuration par défaut/exemple (voir la page de manuel " "arch-update.conf(5) " "pour plus de détails)."

.TP
.B \-\-tray
Lancer l'applet systray d'Arch-Update.

.TP
.B \-v, \-\-version
Afficher les informations de version.
Expand Down Expand Up @@ -138,7 +142,7 @@ Aucune méthode d'élévation de privilège (sudo ou doas) n'est installée

.TP
.B 3
Erreur lors du changement d'icône
Erreur lors du lancement de l'applet systray d'Arch-update

.TP
.B 4
Expand Down
1 change: 1 addition & 0 deletions res/completions/arch-update.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ _arch-update() {
-n --news
-D --debug
--gen-config
--tray
-h --help
-V --version')

Expand Down
1 change: 1 addition & 0 deletions res/completions/arch-update.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ complete -c arch-update -s d -l devel -d 'Include AUR development packages updat
complete -c arch-update -s n -l news -d 'Display latest Arch news'
complete -c arch-update -s D -l debug -d 'Display debug traces'
complete -c arch-update -l gen-config -d 'Generate a default/example configuration file'
complete -c arch-update -l tray -d 'Launch the Arch-Update systray applet'
complete -c arch-update -s h -l help -d 'Display the help message'
complete -c arch-update -s V -l version -d 'Display version information'
1 change: 1 addition & 0 deletions res/completions/arch-update.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ opts=(
{-n,--news}'[Display latest Arch news]'
{-D,--debug}'[Display debug traces]'
{--gen-config}'[Generate a default/example configuration file]'
{--tray}'[Launch the Arch-Update systray applet]'
{-h,--help}'[Display the help message]'
{-V,--version}'[Display version information]'
)
Expand Down
4 changes: 4 additions & 0 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ $(eval_gettext " -d, --devel Include AUR development packages updates")
$(eval_gettext " -n, --news [Num] Display latest Arch news, you can optionally specify the number of Arch news to display with '--news [Num]' (e.g. '--news 10')")
$(eval_gettext " -D, --debug Display debug traces")
$(eval_gettext " --gen-config Generate a default/example configuration file")
$(eval_gettext " --tray Launch the Arch-Update systray applet")
$(eval_gettext " -h, --help Display this help message and exit")
$(eval_gettext " -V, --version Display version information and exit")
Expand Down Expand Up @@ -696,6 +697,9 @@ case "${option}" in
info_msg "$(eval_gettext "The '\${config_file}' configuration file has been generated")"
fi
;;
--tray)
arch-update-tray || exit 3
;;
-h|--help)
help
;;
Expand Down

0 comments on commit 9cf19a9

Please sign in to comment.