Code Monkey home page Code Monkey logo

Comments (9)

mradermaxlol avatar mradermaxlol commented on June 16, 2024 2

Seems like my mpris usecases are all covered by empress now :)
image

Awesome work!

from empress.

ray-kast avatar ray-kast commented on June 16, 2024 1

@mradermaxlol I'm looking for a format string library, will likely use something like this if the syntax looks like it'd cover your usecase?

EDIT: scratch that, i may just take the extra time to roll my own to get a feature set more closely resembling playerctl's because tinytemplate seems like it has some deal-breakers

from empress.

ray-kast avatar ray-kast commented on June 16, 2024 1

image
@mradermaxlol I promise I'm making progress on this lol, it's just been slow going with work.

Remaining tasks on this issue:

  • Add a lexer, parser, and interpreter
  • Add basic formatter functions
  • Add array indexing
  • Check feature parity with playerctl
  • Document syntax
  • Test & benchmark

from empress.

ray-kast avatar ray-kast commented on June 16, 2024 1

My only remaining request (as of right now, at least) is a playerctl metadata -F equivalent so that empress could be nicely integrated with various WM bars. Should it be tracked in a separate issue?

Yeah, I can look into that as a separate issue. If you haven't encountered any bugs, I've found and sanded off a couple rough edges from the current beta, so I'll likely cut a full 1.6.0 release soon.

from empress.

ray-kast avatar ray-kast commented on June 16, 2024

Ah, so like a plaintext format string? I could whip something like that up, I ended up writing a custom i3bar script that polls and formats the output itself so it never crossed my mind. I can totally add something like that.

from empress.

ray-kast avatar ray-kast commented on June 16, 2024

image
Got a proof-of-concept json function working with the FFI logic layer to support it.

Additional functions I want to add:

  • JSON serialize/escape
  • Pango/XML markup escape
  • Lower- and upper-casing
  • Null-coalescing
  • Ruby compact method for arrays
  • Array joining (mostly for artist)
  • Whitespace trim
  • Truncate/ellipsize end
  • Truncate/ellipsize middle
  • duration from playerctl
  • emoji from playerctl

playerctl says it supports basic math in its templates, for the time being I'm gonna consider that a non-goal.

from empress.

ray-kast avatar ray-kast commented on June 16, 2024

image
I've released format strings (and the associated player name issue) in beta. I've pushed a build to crates.io for testing.

There's still a couple things to be done, namely the duration and current time from playerctl, but other than that the feature development should be pretty much done.

@mradermaxlol Let me know if you have any issues with or feedback on the beta build. Because of the playerId update, you'll need to also run v1.6 on the daemon.

from empress.

mradermaxlol avatar mradermaxlol commented on June 16, 2024

My only remaining request (as of right now, at least) is a playerctl metadata -F equivalent so that empress could be nicely integrated with various WM bars. Should it be tracked in a separate issue?

from empress.

ray-kast avatar ray-kast commented on June 16, 2024

Alright, v1.6.0 is out on GitHub, crates.io, and the AUR!

from empress.

Related Issues (10)

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.