topchetoeu/appwatch

Clone repo: git clone https://git.topcheto.eu/topchetoeu/appwatch.git
All branches, All tags, View raw

Files:

APM

A simple alternative to AppImageLauncher and AppImageUpdate. The tool consists of two tools: apm watch and apm update. watch tracks a folder, and extracts all icons and .desktop files from newly added AppImages in the given folder. update, as the name suggests, uses update data, embedded in the AppImage to update it, if any updates are present.

Watch submodule

On a high level, when an appiamge is added to the watch directory, apm watch will extract the .desktop and icon files from all appimages that are in its watch directory and copy them in .local/share/applications and .local/share/icons respectively. When an appimage is deleted, its respective desktop files will be deleted. Icons will remain, as it is of no use for them to be deleted.

There are three directories that appwatch works with: - Watch directory - the place where you put appimages - Icon directory - the place where appwatch will emit the icons - Desktop directory - the place where appwatch will emit .desktop files

Update submodule

The apm update submodule will take a list of folders and AppImage files. For all folders, it will update all .AppImage files directly under it.

When updating, the AppImage's embedded update data is read and a newer version is pulled. This is done lazily - if our file is newer than the file on the server, it won't be updated.

Building

Clone this repo and all submodules (git clone [url] --recurse-submodules --depth=1). Execute make all to build the project.

Installing

To install all the files to your system, run make install (for a different prefix, do make install PREFIX=(your prefix))

Systemd

cp etc/systemd/* /etc/systemd/system/

# enable system-wide
systemctl start appwatch

# enable for user
systemctl start --user appwatch-user

Runit

cp etc/runit/* /etc/sv/

# enable for system-wide
ln -s /etc/sv/appwatch /var/service/
sv start appwatch

# enable for user (with turntable)
cp -r /etc/sv/appwatch-user ~/.config/service/