Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete files with :open when done with them #384

Open
throwaway-lmao opened this issue Dec 19, 2024 · 4 comments
Open

Delete files with :open when done with them #384

throwaway-lmao opened this issue Dec 19, 2024 · 4 comments

Comments

@throwaway-lmao
Copy link

Iamb downloads every file opened with :open before opening, which makes sense, but it doesn't delete them when I'm done looking at them, resulting in my downloads folder getting cluttered with a bunch of files I just wanted to look at once. It'd be nice if there were an option to automatically delete the file, so that it doesn't even seem as if the file was written to a file to begin with.

@CuterThanYou
Copy link

CuterThanYou commented Dec 25, 2024

maybe specify download directory to /tmp/iamb? that won't write to disk, or it won't be persistent depending on how your distro handle /tmp

@throwaway-lmao
Copy link
Author

That's an option, but not a great one IMO. The ranger file manager puts image previews in /tmp/, but has a bug causing them not to be deleted when the program closes. There've been multiple occasions where I simply hadn't restarted my device in long enough that ranger's files in /tmp/ actually took up it's entire capacity...
It's a better solution than $XDG_DOWNLOAD_DIR, at least, but can have odd consequences if you don't reboot often.

@kenrachynski
Copy link

I think that we're lacking a mechanism to have the called program inform iamb when it's done with the file. There is little that iamb can do in such a case.

@CuterThanYou
Copy link

CuterThanYou commented Feb 25, 2025

I use yazi which also put image preview in /tmp but I don't even know how it handles it since I don't keep my machine running for too long. If you don't restart often, then one option is to just delete them with cron job.

That's an option, but not a great one IMO. The ranger file manager puts image previews in /tmp/, but has a bug causing them not to be deleted when the program closes. There've been multiple occasions where I simply hadn't restarted my device in long enough that ranger's files in /tmp/ actually took up it's entire capacity... It's a better solution than $XDG_DOWNLOAD_DIR, at least, but can have odd consequences if you don't reboot often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants