What software have you made to improve your workflow or rice? - Desktop Customization & Workflow
budRich
I don't have a multi-device solution. If I did, i would probably give mpd another chance, but i also bet there are some solutions for something similar using mpv, maybe..

I used mpd/mpc/npmpcpp/cmus prior to mpv, but there where several things that annoyed me. npmpcpp/cmus not my cup of tea (i really dislike ncurses programs), npmpcpp has a minimum-width limit and "crashes" if the window is to narrow, which happens from time to time, since i use a tiling wm. I also like that mpv, can display the "album art" if it is included in the id3 tags (which i have a script that does automatically when i "get stuff"). Another annoying thing was that you need to add all new files to the "mpd database", which I guess can be automated, and not really a big deal, but i remember it annoyed me back then. But most importantly, i could never find a way to change the playback speed, i often listen and watch at higher playback speed, and I don't think it is possible with mpd, might be wrong though.

And mpv is as i said extremely rice friendly, so I have a lua script that updates my statusbar as well (TITLE TIME-LEFT).

I also select music/pods/videos with a dirthack rofi/dmenu system. (ls -t ~/porn | dmenu | mpvopen)

The biggest benefit imo to using one mediaplayer, is the global keybindings. toggle play (Mod4+/) is the same for both video and audio, since they are global i can do them without activating the player (i use this for both audio and video, very useful when watching tutorials or lectures and i want to take notes etc). But this can also be achieved with mpd+mpv, by querying mpc and see if it's playing or not and stuff, much cleaner and easier with one player though.
Halfwit
Yeah, it's pretty much what I have in my hooks.lua, I do a bit of window management to handle resizes when the video switches (the tiling I use maintains video aspect ratio for no black bars anywhere) but basically it's all status bar code
Code:
• cat hooks.lua
local RUNTIME_DIR = os.getenv("XDG_RUNTIME_DIR")
RUNTIME_DIR = RUNTIME_DIR or os.getenv("HOME").."/.local/run"

function update_bar(name)
        title = mp.get_property("media-title")
        local f = io.open(RUNTIME_DIR.."/statusbar/media", "w")
        f:write(title.." ")
        f:flush()
        f:close()
        os.execute('/usr/local/share/hwwm/wshuf | xe -s \'wtp $1 $2 $3 $4 $5\' &')
end

function clean_bar(reason)
        local f = io.open(RUNTIME_DIR.."/statusbar/media", "w")
        f:write("")
        f:flush()
        f:close()
end
mp.register_event("start-file", update_bar)
mp.observe_property("media-title", "string", update_bar)
mp.register_event("end-file", clean_bar)

The lua API is really nice though, you can do a lot of things with it that I haven't bothered to do yet.
Halfwit
I actually used mpv as my front end to mpd for a long while, but went to ogg123/mpd123 out of frustration with it having to draw a window. I'd simply "hide" the thing, but at the end of the day I never needed a graphical client.




Members  |  Stats  |  Night Mode