Coder Social home page Coder Social logo

libnotify support about nougat HOT 7 CLOSED

Brottweiler avatar Brottweiler commented on June 17, 2024
libnotify support

from nougat.

Comments (7)

Sweets avatar Sweets commented on June 17, 2024

My take on this is that there's no really point to it when you can just append && notify-send to a command.

@aidanharris

from nougat.

Brottweiler avatar Brottweiler commented on June 17, 2024

You can append notify-send, but that still gets sent even if you cancel nougat with escape.

from nougat.

Sweets avatar Sweets commented on June 17, 2024

So ideally we should have the exit code set to what the screenshot backend returns, if applicable.

If you could test the backend that you're using with command && notify-send 'test' then hit escape and tell me if it sent the notification, that'd be great. No big deal if you can't, I'll test it later today in that case.

If you use maim or scrot, then the command should be easy enough (maim or scrot). ImageMagick can be tested with import -window root.

from nougat.

Brottweiler avatar Brottweiler commented on June 17, 2024

Running maim -s > test.png && notify-send "test" and hitting ESC doesn't send a notification.

from nougat.

Sweets avatar Sweets commented on June 17, 2024

Just what I needed, thank you.

Now it's just down to whether nougat should simply return the same exit code, or if there should be a post-command variable.

Post-command variable clutters the configuration (more), and would make the code slightly more complex. The same exit code would mean that a user could execute any command if nougat succeeds in taking a screenshot, but means users would have to constantly type the same thing over and over again (in the case of notifications).

Could do both, too. Which I'll likely end up doing.

from nougat.

Sweets avatar Sweets commented on June 17, 2024

Should be good now, let me know.

from nougat.

Brottweiler avatar Brottweiler commented on June 17, 2024

Yep! Now I can do nougat && notify-send "Success" and have it send notification when i make a screenshot, and no notification when I cancel with ESC!

Thanks!

from nougat.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.