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

Add option to map keys to a name #31

Open
taylorjdawson opened this issue Jul 3, 2018 · 9 comments
Open

Add option to map keys to a name #31

taylorjdawson opened this issue Jul 3, 2018 · 9 comments

Comments

@taylorjdawson
Copy link

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.

@mashlol
Copy link
Owner

mashlol commented Jul 4, 2018

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)

@taylorjdawson
Copy link
Author

Do you like the proposed format? Or do you have a better idea?

@mashlol
Copy link
Owner

mashlol commented Jul 5, 2018

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"

@taylorjdawson
Copy link
Author

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?

@mashlol
Copy link
Owner

mashlol commented Jul 6, 2018

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?

@taylorjdawson
Copy link
Author

Yeah, I think that would make sense to the user. Just have it be specified in the read me.

@taylorjdawson
Copy link
Author

Should there be a way to assign the mapping when registering the key?
notify -r asdf -o 'android'

@mashlol
Copy link
Owner

mashlol commented Jul 7, 2018

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.

@taylorjdawson
Copy link
Author

Sweet! I like that. So:

notify --register asdf --map-to 'android'
notify -r asdf -o 'android'

@taylorjdawson taylorjdawson changed the title Add option to name keys and notify individual keys Add option to map keys to a name Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants