notify
notify copied to clipboard
Add option to map keys to a name
It would be nice to have the ability to name the keys and notify based on specific names. For example:
notify -n -t "<name>" "<some cool message>"
I could help implement if need be, just let me know.
I like the idea - probably won't have time to add it for a while, but I'll accept a pull request that adds it (as long as it is still backwards compatible)
Do you like the proposed format? Or do you have a better idea?
I think -t is already for the text right? Perhaps -k for key?
So notify -k asdf -t "Message" -i "Title"
?
In long form:
notify --only-key asdf --text "Text" --title "title"
Yeah, that looks good. If you wanted to map a name to a key for instance, android-device-0 -> asdf
, would you still use the -k
option? Or would there need to be another option for key aliases?
Oh right, I guess we need a command to make the mapping? Perhaps
notify --map-key 'asdf' --map-to 'android'
or notify -m 'asdf' -o 'android
And then 'android' or 'asdf' will both work for the -k
param?
Yeah, I think that would make sense to the user. Just have it be specified in the read me.
Should there be a way to assign the mapping when registering the key?
notify -r asdf -o 'android'
Oh yeah we can reuse the -r for mapping. So you could use notify -r asdf -o 'android'
on an existing key or to register a new one.
Sweet! I like that. So:
notify --register asdf --map-to 'android'
notify -r asdf -o 'android'