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

Injecting hints from script #215

Open
jmfernandez opened this issue Apr 16, 2023 · 2 comments
Open

Injecting hints from script #215

jmfernandez opened this issue Apr 16, 2023 · 2 comments

Comments

@jmfernandez
Copy link

Which is the JSON message to be printed by a transformation script to translate a bare notification containing a number in either its title or its body to an one where a progress bar appears? I have been following the example in the README. I have tried setting up percentage in a message similar to next:

{
    "modify": {
         "percentage": 15,
         "body": "15%"
    },
    "match": {
    }
}

with no success.

Any hints? Thanks in advance!

@phuhl
Copy link
Owner

phuhl commented Apr 18, 2023

Hey, currently modifying hints is not supported.

A PR is always welcome though ;)

A dirty hack I could imagine to get what you want would be to set transient to false to hide the notification from the notification center, set timeout to 1 to prevent it from showing as a pop-up (1 is a special value for this, I think). So basically hide the notification completly. Then in the next step you could send you own notification through notify-send.py with the hints as needed. But, it's a pretty dirty hack 😅

@jmfernandez
Copy link
Author

Although I'm used to program in several programming languages and their ecosystems, sadly, Haskell is not among them. Last time I read Haskell code was when I was attending CS courses at the university more than 20 years ago, and I know nothing about its ecosystem, so I'm a bit useless, sorry.

And yes, I already realized about that dirty trick you are proposing, but as I felt ... dirty 😅 I wrote this issue asking.

In any case, thanks!

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

2 participants