Created
January 21, 2016 18:41
-
-
Save zinozzino/e26446fe90bf5c0650f0 to your computer and use it in GitHub Desktop.
If you want to use UNIX domain socket instead of a TCP socket in MPD Widget (copycat-killers/lain)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ Before | |
mpdh = "telnet://" .. host .. ":" .. port | |
async.request(echo .. " | curl --connect-timeout 1 -fsm 3 " .. mpdh, function (f) | |
--]] | |
--[[ After | |
mpdh = "~/.config/mpd/socket" | |
async.request(echo .. " | ncat -U " .. mpdh, function (f) | |
-- or you can use `socat` version | |
mpdh = "~/.config/mpd/socket" | |
async.request(echo .. " | socat - UNIX-CONNECT:" .. mpdh, function (f) | |
--]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment