this post was submitted on 19 Jul 2026
64 points (98.5% liked)
Linux
66581 readers
109 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 7 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Interesting approach to use a shell script with multiple in-line python calls inside shell functions. What is the intent behind this design vs doing it fully in python?
This design is inherited from the original macosicons-linux project by system-rw. The shell script + inline Python approach was already there for handling installation, XDG paths, desktop entry creation, icon cache refresh, and other system-level tasks. I kept the same structure when I forked and expanded it because it works well for a small utility ; shell for the “plumbing”, Python/PyQt6 for the actual GUI and logic. It’s pragmatic rather than pure. I might move more of it to a fully Python app in the future as the project grows, but for now it keeps things simple and close to the original setup.
Help me understand, how does it work well (or better than either pure bash or pure python)? From what I know, calling python multiple times in a shell script is very inefficient vs running a single full python script.
Also, for maintainability I try to avoid in-lining another language in a shell script as it is almost always more confusing code because of escapes. What am I missing that makes this way better?