mirror of
https://github.com/wez/wezterm.git
synced 2024-12-18 10:52:16 +03:00
b1bc74d31f
This commit switches back to wezterm-icon.svg as the source of
the icon, but modifies it:
* Removed mac style title bar + window manipulation icons
* Increases the corner radius
* Adjusts the text position and size
This makes it somewhere between the original and one of the alternate
icons in 98b71cbfb6
I chose to modify the original source as it didn't have padding
baked into the svg file, and I didn't feel like wrestling with
the contributed svg in inkscape to remove it.
28 lines
883 B
Bash
Executable File
28 lines
883 B
Bash
Executable File
#!/bin/bash
|
|
# This script updates the icon files from the svg file.
|
|
# It assumes that the svg file is square.
|
|
set -x
|
|
cd $(git rev-parse --show-toplevel)/assets/icon
|
|
|
|
src=wezterm-icon.svg
|
|
|
|
conv_opts="-colors 256 -background none -density 300"
|
|
|
|
# the linux icon
|
|
convert $conv_opts -resize "!128x128" "$src" ../icon/terminal.png
|
|
|
|
for dim in 16 32 128 256 512 1024 ; do
|
|
# convert is the imagemagick convert utility
|
|
convert $conv_opts -border '10%' -bordercolor 'rgba(0,0,0,0)' -resize "!${dim}x${dim}" "$src" "icon_${dim}px.png"
|
|
done
|
|
# png2icns is part of the libicns-utils on Fedora systems.
|
|
# It glues together the various png files into a macOS .icns file
|
|
png2icns ../macos/WezTerm.app/Contents/Resources/terminal.icns icon_*px.png
|
|
|
|
# Clean up
|
|
rm -f icon_*px.png
|
|
|
|
# The Windows icon
|
|
convert $conv_opts -define icon:auto-resize=256,128,96,64,48,32,16 $src ../windows/terminal.ico
|
|
|