termux-widget icon indicating copy to clipboard operation
termux-widget copied to clipboard

Dynamic shortcuts with custom icons

Open NoNameWasDefined opened this issue 1 year ago • 6 comments

Feature description

Scripts in ~/.shortcuts can have custom icons in ~/.shortcuts/icons, same for ~/.shortcuts/tasks. But dynamic shortcuts doesn't have custom icons, and I know that this is possible.

NoNameWasDefined avatar Feb 25 '25 10:02 NoNameWasDefined

What do you call dynamic shortcuts? I thought they were the ones whose scripts are in ~/.shortcuts/tasks. I have one here in and a sameName.png in ~/.shortcuts/icons, then added the widget to the launcher and I see my icon replaces the default one.

The only issue I see is that if you have same named scripts in both ~/.shortcuts/tasks and ~/.shortcuts/ there is no way they have a different icon. The only workaround if possible is to rename one of the scripts. A way to fix this would be for devs to create a dedicated folder for tasks icons (e.g. ~/.shortcuts/tasks/icons or ~/.shortcuts/icons/tasks

bugith avatar Apr 19 '25 21:04 bugith

Dynamic shortcuts is a new feature.

NoNameWasDefined avatar Apr 21 '25 15:04 NoNameWasDefined

As new to Termux I don't know if it's new, but IIRC I read they are supposed to show on long press in the widget "Widget-List". In my A15 although their scripts are in ~/.shortcuts/tasks, they show in the same way that the ones whose script are in ~/.shortcuts. This behaviour is not compliant to the documentation, IIUC. Maybe there is confusion in my mind between dynamic shortcuts and the ones for background scripts.

bugith avatar Apr 22 '25 16:04 bugith

Look at the README

NoNameWasDefined avatar Apr 24 '25 10:04 NoNameWasDefined

OK, I confused. I just don't know what dynamic shortcuts are, but where they must be stored (~/.termux/...dynamic...)

bugith avatar Apr 25 '25 17:04 bugith

OK, I confused. I just don't know what dynamic shortcuts are, but where they must be stored (~/.termux/...dynamic...)

That's not my question.

NoNameWasDefined avatar Apr 26 '25 09:04 NoNameWasDefined

Feature description

Scripts in ~/.shortcuts can have custom icons in ~/.shortcuts/icons, same for ~/.shortcuts/tasks. But dynamic shortcuts doesn't have custom icons, and I know that this is possible.

by adding icons with same basename as executable file/script to folder ~/.termux/widget/dynamic_shortcuts/ or ~/.termux/widget/dynamic_shortcuts/icons/

@NoNameWasDefined you may improve your first post/request by adding this suggestion

kuvaldini avatar Dec 29 '25 18:12 kuvaldini

@NoNameWasDefined you may improve your first post/request by adding this suggestion

I don't think that's useful because it seems logic. And it could not be the way devs would like to implement it, as they placed it in ~/.termux which announces a possible change of the file hierarchy in the future.

NoNameWasDefined avatar Dec 29 '25 18:12 NoNameWasDefined