Comments (9)
Seems like my mpris
usecases are all covered by empress
now :)
Awesome work!
from empress.
@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.
@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.
My only remaining request (as of right now, at least) is a
playerctl metadata -F
equivalent so thatempress
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.
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.
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
fromplayerctl
-
emoji
fromplayerctl
playerctl
says it supports basic math in its templates, for the time being I'm gonna consider that a non-goal.
from empress.
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.
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.
Alright, v1.6.0 is out on GitHub, crates.io, and the AUR!
from empress.
Related Issues (10)
- D-Bus: PropertiesChanged signal does not always get emitted on track change HOT 1
- Empress does not always notice that a player was started or shut down
- Add a Raise() method
- [Feature request] Volume control similar to playerctl HOT 3
- Return player name in the now-playing subcommand HOT 4
- Make player selection consistent for all actions HOT 2
- [Feature request] "Follow" mode for the now-playing subcommand HOT 4
- Investigate changing dependencies from `dbus` to `zbus`
- bro... HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from empress.