I've updated my one stop system update script to remove unused Flatpaks. #linux #projects
Sander van Dragt's Notes
-
-
What would it take to make writing vanilla JavaScript more pleasant? After reviewing the code for my blogging engine Lamb I concluded:
Most of the code adding interactivity to personal websites comes down to running code after the page has loaded; niceties to query the DOM and hook into events. There's probably more but this is a start. The result is shorthand.js. Hint: it's not dissimilar to jQuery, but you can fully learn it in 5 minutes.
Which simplifies code to:
onLoaded(() => { const forms = $$('form.form-delete') forms?.forEach($form => $form.on('submit', ev => { cancel(ev) let confirmed = confirm(`Really delete status ${ev.target.dataset.id}?`) if (!confirmed) return ev.target.submit() })) })This is just a prototype and will evolve.
-
If you're using the Anytype (current version at the time of writing: 0.37.3) AppImage and made a .desktop file to launch it, here are a few tweaks that integrate it into your system better.
You may want to use a program like Desktopius to edit the .desktop file.

Prevent two dock icons
If you see one item for the AppImage and one for the application window in the Dock, add
StartupWMClass=anytypeand these will be combined. This value is the result of runningxprop WM_CLASSand clicking on the Anytype main window.Fix the icon
If you see the generic icon, extract the icon to a path and update
Icon=/path/to/anytype.png(replacing the path to the directory where you will extract the icon).To extract the icon from the AppImage do the following:
$ cd /tmp $ mkdir anytype && cd anytype $ /path/to/Anytype.AppImage --appimage-extract .... $ cp squashfs-root/usr/share/icons/hicolor/1024x1024/apps/anytype.png /path/to/anytype.png