carnager / clerk Goto Github PK
View Code? Open in Web Editor NEWclerk - mpd client, based on rofi/fzf
License: MIT License
clerk - mpd client, based on rofi/fzf
License: MIT License
I would like to bind some controls to the Hyper key. I have remapped my keyboard to have one, and I use Hyper keybinds outside of clerk to send mpc
commands (highly recommended!)
I've tried mapping a few random commands to Hyper keybinds, and clerk starts without error (indeed, the error screen says that Hyper is a valid key), and it shows up in the command hints.
"Hyper+r: Add + play"
which I specified with addplay="Hyper+x"
in ~/.config/clerk/config
When I try these keybinds, though, it just types the letters in the search field as if I weren't holding the Hyper modifier.
I have the key mapped as Hyper_L
(keysym 0xffed), and I tried remapping it to be Hyper_R
(keysym 0xffee), but I get the same result.
I also tried addplay="Hyper_L+r"
and addplay="Hyper_R+r"
with each of the different key mappings, and none of the configurations work.
Is this a bug, or do I need to change something in my configuration?
Nice work!
How can I use in daemon mode like rofi?
I'm on MacOS 10.12.6 and installed clerk as user following the instructions. I get the following errors when launching clerk
(I'm planning on using via tmux-fzf, not rofi, which I haven't tried to install).
➜ ~ clerk.pl
"my" variable %rvar masks earlier declaration in same scope at /Users/hgv/bin/clerk.pl line 281.
Use of my $_ is experimental at /Users/hgv/bin/clerk.pl line 291.
Use of my $_ is experimental at /Users/hgv/bin/clerk.pl line 307.
"my" variable @_ masks earlier declaration in same scope at /Users/hgv/bin/clerk.pl line 307.
"my" variable $out masks earlier declaration in same scope at /Users/hgv/bin/clerk.pl line 310.
syntax error at /Users/hgv/bin/clerk.pl line 271, near "->%"
syntax error at /Users/hgv/bin/clerk.pl line 272, near "}"
Global symbol "@db" requires explicit package name at /Users/hgv/bin/clerk.pl line 272.
Global symbol "@filtered" requires explicit package name at /Users/hgv/bin/clerk.pl line 273.
syntax error at /Users/hgv/bin/clerk.pl line 274, near "}"
syntax error at /Users/hgv/bin/clerk.pl line 288, near "}"
syntax error at /Users/hgv/bin/clerk.pl line 304, near "}"
Global symbol "$filtered_db" requires explicit package name at /Users/hgv/bin/clerk.pl line 308.
syntax error at /Users/hgv/bin/clerk.pl line 313, near "}"
syntax error at /Users/hgv/bin/clerk.pl line 320, near "}"
/Users/hgv/bin/clerk.pl has too many errors.
Based on #2, it seems like at least someone got clerk working on macos/osx (though maybe that was the earlier, pre-perl version?). Maybe I need to install a different version of perl? I'm using the macos version, which is 5.18.2 (homebrew has a more recent version, but wanted to check here first as dealing with multiple versions can be a pain).
I was using clerk on arch before I recently switched back; would love to keep using it. Thanks!
When I use hotkey/rofi to directly start Clerk (read; run: clerk in rofi), it doesn't grab half the information from MPD, and I can't control anything. I can't change songs or outputs.
Any idea why? I like Clerk a lot.
When I hit enter on an album or track, in order to add to queue, a bunch of errors show up, before the next add,replace,etc. screen shows up quickly, disappearing the errors. I'm pretty sure this means there are missing tags, but I'd like to know which tags. I've opened some of those files in Picard, and it seems as if no tags are missing. Is there any way to pipe the error output to a file or view it in Clerk?
hi,
I've just switched to clerk v4 and the new interface looks great. Thanks.
I used the AUR package to install clerk.
However, when I start clerk in "album" or "sorted album" views, my terminal is filled with the following message:
Use of uninitialized value in join or string at /usr/bin/clerk line 368, <GEN0> line 29.
The last tagged release was over a year and a half ago, with 80 commits since then. Any chance of a new one? Main reason is for packaging. I just submitted this to be added to xbps for void linux, and they, like many, only use tagged releases.
Is there a license for this project?
(if not, may I recommend MIT, like what rofi is licensed as?)
The file clerk_rating_client.service is marked executable as shipped from the github repo
Got this from my system log,
Configuration file /usr/lib/systemd/user/clerk_rating_client.service is marked executable. Please remove executable permission bits. Proceeding anyway.
And indeed, installed on my system,
ls -l /usr/lib/systemd/user/clerk_rating_client.service
-rwxr-xr-x 1 root root 157 Sep 18 17:45 /usr/lib/systemd/user/clerk_rating_client.service
Of the many .service files there, clerk is the only one marked executable. All others are marked '-rw-r--r--'
How does clerk launch rofi? I see references to it in the code and i see the rvar{backend} = 'rofi' but there i can't get it to launch rofi.
Hi,
I have no idea what happened but since a few days I have this message when typing "clerk" on the terminal:
"Error reading line from socket at /usr/bin/clerk line 268."
playing/pausing with mpc works fine.
When a queue is playing the clerk -suspend does not stop play.
I am assuming this would be the equivalent of pause as I do not see any option relating to that.
By the way, great work on this. It is a great way to manage music, fits very nicely into my current workflow.
Hi all,
I don't know if that is new since I do not use very often this feature but I have erros on fetching well known lyrics with decent tags. I'm quite sure it has worked well...
Shall I correct my tags in some way ? Check for the version of dependencies that might have change their syntax ?
Thanks for every advice (I can't use another music player !)
Regards
Could you silence these message outputs?
$ clerk --random track
slmenu
volume: 87% repeat: off random: off single: off consume: off
Battles feat. Matias Aguayo - Ice Cream
[playing] #1/1 0:00/4:37 (0%)
volume: 87% repeat: off random: off single: off consume: off
Battles feat. Matias Aguayo - Ice Cream
[playing] #1/51 0:03/4:37 (1%)
volume: 87% repeat: off random: off single: off consume: off
$ clerk --random album
slmenu
volume: 87% repeat: off random: off single: off consume: off
Alla Rakha & Zakir Hussain - Dhamar
[playing] #1/4 0:00/24:43 (0%)
volume: 87% repeat: off random: off single: off consume: off
$ clerk # With no file caches
slmenu
cat: /Users/rafi/.config/clerk/album.cache: No such file or directory
cat: /Users/rafi/.config/clerk/tracks.cache: No such file or directory
cat: /Users/rafi/.config/clerk/last.cache: No such file or directory
MPD Menu >
Q Exit Clerk
---
1 Play random Album
2 Play random Songs
---
3 Current Artist
4 Current Queue
5 Browse Library
6 Manage Playlists
---
7 Options
8 Ratings
9 Lookup
0 Playback
$ clerk --update
slmenu
i get this on first run:
$ ./clerk
./clerk: ligne 208: /home/anarcat/.config/clerk/.lastupdate: Aucun fichier ou dossier de ce type
column : option invalide -- 'o'
usage: column [-tx] [-c columns] [-s sep] [file ...]
gawk: ligne de commande:28: (FILENAME=- FNR=1) fatal : strftime: second argument négatif ou trop grand pour time_t
column : option invalide -- 'o'
usage: column [-tx] [-c columns] [-s sep] [file ...]
column : option invalide -- 'o'
usage: column [-tx] [-c columns] [-s sep] [file ...]
pardon my french, translations:
Aucun fichier ou dossier de ce type
: "no such file or directory"second argument négatif ou trop grand pour time_t
: "second argument negative or too large for time_t"option invalide
: "invalid option"not sure what i did wrong. running clerk again doesn't reproduce the issue, but the display is garbled..
I try to overwrite my default width and height for rofi which i set in Xresources. But there doesn't seem to be an option for that anymore. Is that still possible? Otherwise the rofi frontend will be useless for me.
I'm just wondering if this is intended / something that can't be avoided, or if there's a configuration setting I can change.
It's a very minor issue, but it would be nice to have the interface persist until exit.
Hi,
I was getting this error when updating the cache. I found a solution by increasing max_output_buffer_size
in my mpd.conf
in the FAQ. Default is 8192 according to the doc, and I set it to be 262144
(because I have about 45k music in my MPD library and I increased max_playlist_length
by a factor 16 to be in range).
However, even after such increase, I still get three mpd error: Connection closed by the server
when updating the cache.
% ls .config/clerk -alh
total 5,1M
drwxr-xr-x 2 phyks phyks 4,0K 10 févr. 17:46 ./
drwxr-xr-x 53 phyks phyks 4,0K 10 févr. 17:10 ../
-rw-r--r-- 1 phyks phyks 92K 10 févr. 17:46 albums.cache
-rw-r--r-- 1 phyks phyks 1,5K 10 févr. 17:28 config
-rw-r--r-- 1 phyks phyks 39 10 févr. 17:39 .lastupdate
-rw-r--r-- 1 phyks phyks 95K 10 févr. 17:45 latest.cache
-rw-r--r-- 1 phyks phyks 4,9M 10 févr. 17:47 tracks.cache
shows me that the cache has been, at least partially, built, however. But it may be incomplete.
Do you know what is happening exactly and how to fix it? My value for max_output_buffer_size
corresponds to more than 200Mo if I am correct, which seems to be really a lot and much more than what could potentially be needed. I did not see anything special in the logs or by running mpd --verbose
.
Thanks
EDIT: I never saw such error with mpc
(basic usage) or gmpc
/ ario
.
Hi
Would you explain the recent changes in clerk.pl ? I can't figure :-\
I'm also curious about the 'musiclist' file and how to use it :)
Last but not least, could you tag a new release ? I plan to maintain a build script for Slackware (SlackBuild) and need an up-to-date tarball to download.
Thanks again for clerk, it's still my favorite !
My Clerk installation went after an update from 3.2.1.1 to 4.0.5 (ArchLinux). I used clerk to find a track (clerk --queue show
) and quickly launch it (ie: type a few letters, hit Enter, it plays, it's way more efficient than launching ncmpcpp and finding a track).
I read the changelog and saw the great revamp of the interface but I only see commands to Add/Insert/Replace a track or an album. I do not want to change the playing queue, just to navigate inside it, in a rofi-way. Is it possible?
Edit: I found issue #24 , where you mention that the main playback queue interface may be removed, you probably did. I would welcome a work around, but that's OK if there's none. Thanks for your great work!
selection dosent color selected items in clerk-git
rofi colors
! -- Rofi settings -- !
rofi.padding: 3
rofi.opacity: 90
rofi.fixed-num-lines: true
rofi.disable-history: false
rofi.levenshtein-sort: false
rofi.terminal: x-terminal-emulator
!!!! Rofi Themes
rofi.color-enabled: true
rofi.borderwidth: 1
!!!! HoneyComb theme
! rofi.color-normal: #000000,#A0A0A0,#000000,#0C73C2,#FFFFFF
! rofi.color-urgent: #000000,#FFB2B2,#000000,#0C73C2,#FFFFFF
! rofi.color-active: #000000,#C272C1,#000000,#FFFFFF,#000000
! rofi.color-window: #000000,#0C73C2
!!!! Solarized light theme
rofi.color-normal: #fdf6e3,#002b36,#eee8d5,#586e75,#eee8d5
rofi.color-urgent: #fdf6e3,#dc322f,#eee8d5,#dc322f,#fdf6e3
rofi.color-active: #fdf6e3,#268bd2,#eee8d5,#268bd2,#fdf6e3
rofi.color-window: #002b36,#002b36
!!!! rasi theme
!rofi.color-normal: #000000,#A0A0A0,#000000,#0C73C2,#FFFFFF
!rofi.color-urgent: #000000,#FFB2B2,#000000,#0C73C2,#FFFFFF
!rofi.color-active: #000000,#C272C1,#000000,#FFFFFF,#000000
!rofi.color-window: #000000,#0C73C2
!font
!rofi.font: Pragmata Pro 14
!rofi.font: ubuntu mono 14
rofi.font: fira mono 14
Hi,
Thanks for this great script.
It works quite fine playing random tracks with mpd but do not display any album nor track while trying to browse the library.
While it shows current queue when I choose to play random tracks. I couldn't find the reason.
Thanks for your help
Running slackware64-current
All dependencies met and up-to-date
Ability to search for a track, title, artist would be an extremely useful feature. How hard would this be to implement?
I've got David Bowie's ★ album, and it is tagged as such in the audio files. The tags are all from MusicBrainz.
Clerk seems to refuse to add or insert any tracks from it, but refreshes anyway. Is there a way to debug Clerk to give you more information?
I don't like the spotify interface and was looking for a spotify CLI, and then came across a Spotify daemon project (https://github.com/Spotifyd/spotifyd). In browsing the issues, looking for relevant CLI clients, I saw an issue from @carnager: Spotifyd/spotifyd#76.
Did you attempt to get spotifyd to work as a source for Clerk? Looking through spotifyd, it seems like the project routinely has lots of issues, so I imagine getting it to be a source for Clerk would be difficult. But did you have any luck? Any future plans? I really love clerk and now find all other interfaces clumsy, so spotifyd via clerk would be great.
Hi,
Awesome work with fzf and tmux, looks great ! I was used to rofi but will certainly switch soon.
I'm discovering tmux and might have missed something but I can't show the current queue : I've got a message that says "can't find window queue" (and it isn't showing next to albums, traks, playlists).
I'm running Slackware-current and use i3wm.
Btw, when I need the help window... I don't know how to hide it afterwards ! And a small tuto on how to use would have be a bit time saving, I didn't know how to launch at first (tmux -c './clerk.pl -f' if someone needs...)
Anyway, awesome work, Thank you very much !
Hi,
I believe I've read the whole documentation but still can't find how to use the clerk_rating_client...
I saw the service file : is it because my distribution do not ship systemd thing ?
Sorry if the answer is obvious but I feel lost with this !
Hi,
After updating clerk-git from the aur, launching rofi interface (for exemple $ clerk -a
) returned the following error:
Use of uninitialized value $rvar{"rofi_theme"} in string ne at /usr/bin/clerk line 312, <GEN0> line 29.
undef passed at /usr/share/perl5/vendor_perl/IPC/Run.pm line 1272, <GEN0> line 29.
IPC::Run::_exec("/usr/bin/rofi", "-matching", "regex", "-dmenu", "-kb-row-tab", "", "-kb-move-word-forward", "", ...) called at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2615
eval {...} called at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2493
IPC::Run::_do_kid_and_exit(IPC::Run=HASH(0x564298838fd8), HASH(0x56429889b7a8)) called at /usr/share/perl5/vendor_perl/IPC/Run.pm line 1380
IPC::Run::_spawn(IPC::Run=HASH(0x564298838fd8), HASH(0x56429889b7a8)) called at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2768
eval {...} called at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2765
IPC::Run::start(ARRAY(0x5642988ce608), SCALAR(0x564296f57598), SCALAR(0x564296f575b0)) called at /usr/bin/clerk line 317
main::backend_call(ARRAY(0x564296f67828), "1,2,3,4") called at /usr/bin/clerk line 494
main::ask_to_pick_albums() called at /usr/bin/clerk line 224
main::__ANON__() called at /usr/bin/clerk line 53
main::main() called at /usr/bin/clerk line 726
at /usr/bin/clerk line 317.
I had to manually add the rofi variables as explained in #37. The issue is fixed but wouldn't a less verbose error output be better ? Or maybe fallback values to rofi_width and rofi_theme so that clerk does not break after updating ?
Have a nice day.
Hi,
Are there any plans (or are you interested in) putting an "infinite random" mode, playing random songs continuously, feeding new songs in the playlist when it is exhausted?
Thanks
I might be missing things, but I can't seem to find any way to go back to the previous menu after entering an album etc. Any help?
Any chance you could outline the workflow you use clerk in, what keybinds, how it integrates with your WM, etc? I'm a bit lost myself, and just ended up binding mod+m to exec clerk...
When I browse the library by album, compilation albums are split up into individual "albums" based on the artist, despite all of the files being tagged correctly.
It seems that the album search is considering the artist as well as the album when searching albums.
The issue is not present in ncmpcpp
.
Is there a configuration option that I could change, or is this a current limitation of the program?
Players such as Clementine, Yarock, XMMS2, and VLC parse/write rating tags by looking for the "Fmps Rating" tag in accordance with the XDG FMPS specification; however, clerk_rating_client
uses the "Rating" tag. Using the "Fmps Rating" tag would improve compatibility with other players.
Cantata, for instance, writes MPD rating stickers to the "Fmps Rating" tag.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.