4 ms·
Making your own app-icons is notoriously difficult. $ cat /usr/local/bin/noko-make-icon convert -size 24x24 -gravity center -background yellow -fill black\
by timonoko 2y ago
Making your own app-icons is notoriously difficult.
$ cat /usr/local/bin/noko-make-icon
convert -size 24x24 -gravity center -background yellow -fill black\
label:$1 ~/.local/share/icons/$1.png
file=~/.local/share/applications/$1-noko.desktop
echo [Desktop Entry] > $file
echo Name=$1 >> $file
echo Comment=noko-made >> $file
echo Exec=$1 >> $file
echo Terminal=false >> $file
echo Icon=~/.local/share/icons/$1.png >> $file
echo Type=Application >> $file
"convert" is from Imagemagick
- nine_k 2y agoWould you prefer this script to be shipped for you? If so, I suppose it should support more optional parameters, e.g. for the name and comment. BTW you can DRY it up: convert ... # Unchanged. cat <<EOF >~/.local/share/applications/$1-noko.desktop [Desktop Entry] Name=$1 Comment=noko-made Exec=$1 Terminal=false Icon=~/.local/share/icons/$1.png Type=Application EOF
- blueflow 2y agoThe desktop entries also control which application is used to "open" a file. Writing and debugging them made me hate the xdg-open system. Also, if you specify Terminal=true, your configured preference for your terminal emulator is ignored by all desktop environments.
- yjftsjthsd-h 2y ago> Also, if you specify Terminal=true, your configured preference for your terminal emulator is ignored by all desktop environments. What do they use?
- blueflow 2y agoTheir own terminal emulator or they poke around the system and use the first one they find. Ideally this happens through the dbus so you can't trace it with strace -f.