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 current wallpaper? #103

Closed
iamgitcat opened this issue Oct 25, 2024 · 5 comments
Closed

Delete current wallpaper? #103

iamgitcat opened this issue Oct 25, 2024 · 5 comments
Labels
feature request New feature or request medium priority This issue has medium priority question Further information is requested

Comments

@iamgitcat
Copy link

Is it possible to make a notification shade button to delete current wallpaper?

Or maybe there is a way to set a wallpaper with intent (I see there are many intents in Peristyle)? I will manage everything else if I could knew which intent and arguments.

Why? I have a script, that periodically runs in Termux and sets random wallpapers with termux-wallpaper from different directories, also writes a path to txt, so other script can delete current wallpaper (from that txt). That makes it easy to sort good and bad wallpapers, I can run scripts from a widget or power menu. The problem is termux-api do not works with my other old device and I search some other way without termux-api. I tried changing wallpaper with am start -a android.intent.action.ATTACH_DATA \ -d "file:///sdcard/Download/shontz_valley.jpg" \ -t "image/*" --grant-read-uri-permission and it brings a standard ui menu to manually select home/lock.. That is not cool way, it should just change homescreen wallpaper without any confirmations.

Thanks!

@Hamza417
Copy link
Owner

Is it possible to make a notification shade button to delete current wallpaper?

Yeah, but you'd need two buttons to do that, one for home screen, one for lock, It can be added in the app to make is easily understandable.

Or maybe there is a way to set a wallpaper with intent (I see there are many intents in Peristyle)? I will manage everything else if I could knew which intent and arguments.

Why? I have a script, that periodically runs in Termux and sets random wallpapers with termux-wallpaper from different directories, also writes a path to txt, so other script can delete current wallpaper (from that txt). That makes it easy to sort good and bad wallpapers, I can run scripts from a widget or power menu. The problem is termux-api do not works with my other old device and I search some other way without termux-api. I tried changing wallpaper with am start -a android.intent.action.ATTACH_DATA \ -d "file:///sdcard/Download/shontz_valley.jpg" \ -t "image/*" --grant-read-uri-permission and it brings a standard ui menu to manually select home/lock.. That is not cool way, it should just change homescreen wallpaper without any confirmations.

Sounds like a pretty niche use, you can make any desired changed in the code or add your own custom intent support here in AutoWallpaperService.kt. Auto Wallpaper service is designed to work in the background, or you can simply add your own service that takes all sorts of necessary Intents to do the different jobs. Peristyle so far only support triggering auto wallpaper event using an Intent for use cases like this.

@Hamza417 Hamza417 added feature request New feature or request question Further information is requested labels Oct 26, 2024
Hamza417 added a commit that referenced this issue Oct 26, 2024
@Hamza417
Copy link
Owner

I have added notifications that will show whenever the Auto Wallpaper service changes a wallpaper, along with a delete button separately for each of the screens. You can check the screenshot here.

@iamgitcat
Copy link
Author

Thank you!, I guess that would work.

@Hamza417 Hamza417 reopened this Nov 6, 2024
@Hamza417 Hamza417 closed this as completed Nov 6, 2024
@iamgitcat
Copy link
Author

Hello. I used notifications solution a couple of days, it worked and it was ok, but than I decided working Termux-api is still needed and I flashed custom gsi rom and manage my wallpapers with termux now.

@Hamza417
Copy link
Owner

Hamza417 commented Nov 6, 2024

Hello. I used notifications solution a couple of days, it worked and it was ok, but than I decided working Termux-api is still needed and I flashed custom gsi rom and manage my wallpapers with termux now.

Is this related to the issue?

@Hamza417 Hamza417 reopened this Nov 6, 2024
@Hamza417 Hamza417 added the medium priority This issue has medium priority label Nov 6, 2024
@Hamza417 Hamza417 closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request medium priority This issue has medium priority question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants