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

Move icons into hicolor theme #147

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ install:
install -Dm 755 "src/script/${pkgname}.sh" "${DESTDIR}${PREFIX}/bin/${pkgname}"

# Install icons
install -Dm 666 "src/icons/${pkgname}.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}.svg"
install -Dm 666 "src/icons/${pkgname}_checking.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_checking.svg"
install -Dm 666 "src/icons/${pkgname}_installing.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_installing.svg"
install -Dm 666 "src/icons/${pkgname}_up-to-date.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_up-to-date.svg"
install -Dm 666 "src/icons/${pkgname}_updates-available.svg" "${DESTDIR}${PREFIX}/share/icons/${pkgname}/${pkgname}_updates-available.svg"
install -Dm 666 "src/icons/${pkgname}.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}.svg"
install -Dm 666 "src/icons/${pkgname}_checking.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_checking.svg"
install -Dm 666 "src/icons/${pkgname}_installing.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_installing.svg"
install -Dm 666 "src/icons/${pkgname}_up-to-date.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_up-to-date.svg"
install -Dm 666 "src/icons/${pkgname}_updates-available.svg" "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${pkgname}_updates-available.svg"

# Install the .desktop file
install -Dm 644 "res/desktop/${pkgname}.desktop" "${DESTDIR}${PREFIX}/share/applications/${pkgname}.desktop"

# Install systemd units
install -Dm 644 "res/systemd/${pkgname}.service" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.service"
install -Dm 644 "res/systemd/${pkgname}.timer" "${DESTDIR}${PREFIX}/lib/systemd/user/${pkgname}.timer"

# Generate and install .mo files for translations
# .mo files are installed as "Arch-Update.mo" to avoid conflicting with the "arch-update.mo" files shipped by the arch-update Gnome extension (https://extensions.gnome.org/extension/1010/archlinux-updates-indicator/)
msgfmt po/fr.po -o po/fr.mo
Expand Down Expand Up @@ -82,7 +82,7 @@ uninstall:
rm -f "${DESTDIR}${PREFIX}/share/man/man5/${pkgname}.conf.5.gz"
rm -f "${DESTDIR}${PREFIX}/share/man/fr/man1/${pkgname}.1.gz"
rm -f "${DESTDIR}${PREFIX}/share/man/fr/man5/${pkgname}.conf.5.gz"

# Delete documentation and examples
rm -rf "${DESTDIR}${PREFIX}/share/doc/${pkgname}/"

Expand Down
2 changes: 1 addition & 1 deletion README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Installez le paquet AUR [arch-update](https://aur.archlinux.org/packages/arch-up
Installer les dépendances :

```bash
sudo pacman -S --needed pacman-contrib curl htmlq diffutils
sudo pacman -S --needed pacman-contrib curl htmlq diffutils hicolor-icon-theme
```

Téléchargez l'archive de la [dernière version stable](https://github.com/Antiz96/arch-update/releases/latest) et extrayez-la *(vous pouvez également cloner ce référentiel via `git`)*.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Install the [arch-update](https://aur.archlinux.org/packages/arch-update "arch-u
Install dependencies:

```bash
sudo pacman -S --needed pacman-contrib curl htmlq diffutils
sudo pacman -S --needed pacman-contrib curl htmlq diffutils hicolor-icon-theme
```

Download the archive of the [latest stable release](https://github.com/Antiz96/arch-update/releases/latest) and extract it *(alternatively, you can clone this repository via `git`)*.
Expand Down
2 changes: 1 addition & 1 deletion res/desktop/arch-update.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Type=Application
Terminal=true
Name=Arch-Update
Icon=/usr/share/icons/arch-update/arch-update.svg
Icon=arch-update
Exec=arch-update
21 changes: 10 additions & 11 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ invalid_option() {
}

# Definition of the icon directory
icon_dir="/usr/share/icons/${name}"
[ -d "/usr/local/share/icons/${name}" ] && icon_dir="/usr/local/share/icons/${name}"
icon_dir="/usr/share/icons/hicolor/scalable/apps"
Antiz96 marked this conversation as resolved.
Show resolved Hide resolved

# Definition of the icon_checking function: Change icon to "checking"
icon_checking() {
Expand Down Expand Up @@ -226,7 +225,7 @@ check() {
else
update_available=$(checkupdates)
fi

if [ -n "${notif}" ]; then
echo "${update_available}" > "${statedir}/current_updates_check"
sed -i '/^\s*$/d' "${statedir}/current_updates_check"
Expand Down Expand Up @@ -268,7 +267,7 @@ check() {
list_packages() {
icon_checking
info_msg "$(eval_gettext "Looking for updates...\n")"

if [ -z "${no_version}" ]; then
packages=$(checkupdates "${contrib_color_opt[@]}")
else
Expand Down Expand Up @@ -313,7 +312,7 @@ list_packages() {
icon_updates_available
if [ -z "${list_option}" ]; then
ask_msg "$(eval_gettext "Proceed with update? [Y/n]")"

case "${answer}" in
"$(eval_gettext "Y")"|"$(eval_gettext "y")"|"")
proceed_with_update="y"
Expand All @@ -331,11 +330,11 @@ list_packages() {
list_news() {
if [ -z "${show_news}" ]; then
curl -Ls https://www.archlinux.org/news | htmlq -a title a | grep ^"View:" | sed "s/View:\ //g" | head -1 > "${statedir}/current_news_check"

if ! diff "${statedir}/current_news_check" "${statedir}/last_news_check" &> /dev/null; then
show_news="y"
fi

if [ -f "${statedir}/current_news_check" ]; then
mv -f "${statedir}/current_news_check" "${statedir}/last_news_check"
fi
Expand Down Expand Up @@ -406,7 +405,7 @@ update() {
exit 5
fi
fi

if [ -n "${aur_packages}" ]; then
echo
main_msg "$(eval_gettext "Updating AUR Packages...\n")"
Expand Down Expand Up @@ -457,7 +456,7 @@ orphan_packages() {
"$(eval_gettext "Y")"|"$(eval_gettext "y")")
echo
main_msg "$(eval_gettext "Removing Orphan Packages...\n")"

if ! pacman -Qtdq | "${su_cmd}" pacman --color "${pacman_color_opt}" -Rns -; then
echo
error_msg "$(eval_gettext "An error has occurred during the removal process\nThe removal has been aborted\n")"
Expand Down Expand Up @@ -527,7 +526,7 @@ packages_cache() {
main_msg "$(eval_gettext "Cached Packages:\nThere are old and/or uninstalled cached packages\n")"
ask_msg "$(eval_gettext "Would you like to remove them from the cache now? [Y/n]")"
fi

case "${answer}" in
"$(eval_gettext "Y")"|"$(eval_gettext "y")"|"")
if [ "${pacman_cache_old}" -gt 0 ] && [ "${pacman_cache_uninstalled}" -eq 0 ]; then
Expand Down Expand Up @@ -584,7 +583,7 @@ packages_cache() {
# Definition of the pacnew_files function: Display pacnew files and offer to process them if there are
pacnew_files() {
pacnew_files=$(pacdiff -o)

if [ -n "${pacnew_files}" ]; then
main_msg "$(eval_gettext "Pacnew Files:")"
echo -e "${pacnew_files}\n"
Expand Down