@@ -148,10 +148,59 @@ case "$1" in
148148esac
149149```
150150
151- ## Future Commands
151+ ## Cache Management Commands
152152
153- The following commands are planned for future releases:
153+ These commands require ` --cache-size ` to be enabled.
154154
155- - ` preload <path> ` - Preload image into cache
156- - ` unload <path> ` - Remove image from cache
157- - ` list ` - List preloaded images
155+ ### ` cache-list `
156+
157+ List all cached images with dimensions and sizes.
158+
159+ ``` bash
160+ echo " cache-list" | nc -U /tmp/gslapper.sock
161+ ```
162+
163+ ** Response:** List of cached images, one per line:
164+ ```
165+ /path/to/image1.jpg 3840x2160 31.64 MB [*]
166+ /path/to/image2.png 2560x1440 14.06 MB
167+ ```
168+
169+ The ` [*] ` marker indicates currently displayed image.
170+
171+ ### ` cache-stats `
172+
173+ Show cache usage statistics.
174+
175+ ``` bash
176+ echo " cache-stats" | nc -U /tmp/gslapper.sock
177+ ```
178+
179+ ** Response:** ` 45.70/256.00 MB (2 images) ` or ` Cache disabled `
180+
181+ ### ` unload <target> `
182+
183+ Remove images from cache. Target can be:
184+ - ` unused ` - Remove all images not currently displayed
185+ - ` all ` - Clear entire cache (including displayed image)
186+ - ` <path> ` - Remove specific image by path
187+
188+ ``` bash
189+ echo " unload unused" | nc -U /tmp/gslapper.sock
190+ echo " unload all" | nc -U /tmp/gslapper.sock
191+ echo " unload /path/to/image.jpg" | nc -U /tmp/gslapper.sock
192+ ```
193+
194+ ** Response:** ` OK: Unloaded N image(s) ` or ` ERROR: <message> `
195+
196+ ### ` listactive `
197+
198+ Show currently displayed wallpaper(s) and output(s).
199+
200+ ``` bash
201+ echo " listactive" | nc -U /tmp/gslapper.sock
202+ ```
203+
204+ ** Response:** ` ACTIVE: <output> <type> <path> `
205+
206+ Example: ` ACTIVE: DP-1 image /home/user/wallpaper.jpg `
0 commit comments