ags icon indicating copy to clipboard operation
ags copied to clipboard

feat(cli): ags run naive --watch mode

Open Aetherall opened this issue 1 year ago • 2 comments

Hi !

Most of the code and ideas are retrieved from https://github.com/Aylur/ags/pull/634

With the difference of using esbuild watch mode in an attempt to delegate cache invalidation to the builder.

First time writing go, so please review with caution :)

Aetherall avatar Jan 02 '25 17:01 Aetherall

Hi @Aylur, Thanks a lot for your work on ags and astal :)

Maybe this PR can help with the watch mode request ? Have a great day !

Aetherall avatar Jan 20 '25 14:01 Aetherall

While this is pending for merge, I'm using this workaround to get working live reload: (This is in Justfile syntax, but it can be used in a bash script with minimal changes)

run:
    @while true; do \
        echo "Starting the bar..."; \
        ags run --gtk4 . & \
        echo "Bar started, waiting for file changes..."; \
        inotifywait -q -r -e modify,move,create,delete .; \
        echo "File change detected. Killing bar"; \
        pkill ags; \
        pkill gjs; \
    done

j4ger avatar Apr 02 '25 14:04 j4ger

naive full restart is not planned see https://github.com/Aylur/ags/issues/724

Aylur avatar Jul 14 '25 11:07 Aylur