Skip to content

Commit

Permalink
install: add fixed resolution png icons for use on desktops (#1280)
Browse files Browse the repository at this point in the history
* Create icon subdirectory and move scalable icon

* Add fixed size png application icons

* Modify install script to install icons to correct locations

* Fix typo in for loop

* Fix indentation

* Further corrected indentation.

* Formatting and code cleanups

* Formatting fixes

I actually don't know what I did.
But shfmt is no longer complaining.
  • Loading branch information
sfalken authored Mar 13, 2024
1 parent 1913770 commit 4176c4b
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
20 changes: 14 additions & 6 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [ -z "${prefix}" ]; then
fi
dest_path="${prefix}/bin"
man_dest_path="${prefix}/share/man/man1"
icon_dest_path="${prefix}/share/icons"
icon_dest_path="${prefix}/share/icons/hicolor"
completion_bash_dest_path="${prefix}/share/bash-completion/completions/"
completion_zsh_dest_path="${prefix}/share/zsh/site-functions/"

Expand Down Expand Up @@ -116,8 +116,12 @@ if [ -e "${curr_dir}/distrobox-enter" ]; then
install -D -m 0644 -t "${completion_zsh_dest_path}" "${file}"
done
fi
if [ -e terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}" terminal-distrobox-icon.svg
if [ -e icons/terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}/scalable/apps" icons/terminal-distrobox-icon.svg
for sz in 16 22 24 32 36 48 64 72 96 128 256; do
install -D -m 0644 -t "${icon_dest_path}/${sz}x${sz}/apps" \
icons/hicolor/"${sz}x${sz}"/apps/terminal-distrobox-icon.png
done
fi
else
printf >&2 "\033[1;31m Checking dependencies...\n\033[0m"
Expand Down Expand Up @@ -176,9 +180,13 @@ else
install -D -m 0644 -t "${completion_zsh_dest_path}" "${file}"
done
fi
if [ -e "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}" \
"distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/terminal-distrobox-icon.svg
if [ -e "distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"/icons/terminal-distrobox-icon.svg ]; then
install -D -m 0644 -t "${icon_dest_path}/scalable/apps" \
"distrobox-$(echo "${release_name}" | sed 's/.tar.gz//g')"icons/terminal-distrobox-icon.svg
for sz in 16 22 24 32 36 48 64 72 96 128 256; do
install -D -m 0644 -t "${icon_dest_path}/${sz}x${sz}/apps" \
icons/hicolor/"${sz}x${sz}"/apps/terminal-distrobox-icon.png
done
fi

# securely delete unneeded files
Expand Down

0 comments on commit 4176c4b

Please sign in to comment.