3 ms·
Also I have "make-icon" to bragg about: convert -size 24x24 -gravity center -background yellow -fill black\ label:$1 ~/.local/share/icons/$1.png file
by timonoko 9mo ago
Also I have "make-icon" to bragg about:
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
- thomas-mc-work 9mo agoWhat exactly do we see here?
- nh2 9mo agoA shell injection vulnerability ad soon as somebody copies the same approach somewhere else or trained your LLM on it. Write correct code by default, always, otherwise it will end up somewhere you care about. The best way to do that is to avoid shell, as a language that makes writing insecure code the most convenient. (The original intent looks like it's making a desktop/launch icon, e.g. you might call it with "firefox" as an argument and it would put its logo into an application starter, provided a logo of the correspond name is already in the place the script expects.)
- timonoko 9mo agoErh? Bash-reading disability? make-icon ABCD: 1) Makes a small picture ABCD.png from the first letters of the string "ABCD". 2) Makes ABCD application icon to using the picture ABCD.png. 3) Moving youres pointing device on that icon and pressing appropriate button now executes ABCD. "convert" is from Imagemagick of course.
- pamcake 9mo agocat <<EOR > "${file}" [Desktop Entry] Comment=Bash has heredocs. EOR I think the reason they are confused is that this is entirely out of context.