Something I made in 30 minutes. Shows 10000 5px squares on a 500x550 screen, red to green, looking at the df output.
Works by: (systemd service) --starts--> (sh script) --sends data--> (/var file) --used by--> (python app)
- Copy the .service file into /etc/systemd/system (or equivalent)
- Set 744 permissions to the file
- Replace the { REPLACE } with the place you will copy the script to. (For example, /home/{user}/.local/bin/disk-space-updater)
- Copy the script into that location
- Replace the 1 in "sed '1q;d'" on lines 5 and 6 to the line on which the desired partrition in df shows up.
- Add 700 permissions to the script
- Run "systemctl (start or enable, your choice) disk-space-updater" or eqivalent
- Check journal to see if configured correctly
- "tkinter" PyPi package required (pip3 install tkinter)
- Run "python3 disk-space-viewer.py" while in same directory to run program
- Add application to KDE:
- Open Menu Editor
- Click "Utilities"
- Click "Add"
- Write "python3" in "Program"
- Write python program location in "Command-Line Arguments"
- Click blank square in top right
- Find an icon (for example, ksysguard icon)
- Ctrl-S
- Congrats you can now launch this from the KDE menu
- /var/ File not showing
- Make sure service is started
- Check journal
- If shows syntax error:
- Probably script is configured wrong
- Stuck on Loading...
- Make sure service is started
- Make sure read perms are in the /var/ file