mpd: Listen on socket
This commit is contained in:
parent
bdc1c12f9c
commit
ba611b333b
|
@ -4,6 +4,7 @@
|
|||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "~/Music";
|
||||
network.listenAddress = "${config.services.mpd.dataDir}/socket";
|
||||
extraConfig = ''
|
||||
zeroconf_enabled "no"
|
||||
|
||||
|
@ -29,6 +30,9 @@
|
|||
package = pkgs.ncmpcpp.override { visualizerSupport = true; taglibSupport = false; };
|
||||
mpdMusicDir = null; # does not work (not of type `null or path')
|
||||
settings = {
|
||||
# Connection
|
||||
mpd_host = "${config.services.mpd.dataDir}/socket";
|
||||
|
||||
# Visualizer
|
||||
visualizer_fifo_path = "${config.services.mpd.dataDir}/fifo";
|
||||
visualizer_in_stereo = "yes";
|
||||
|
|
|
@ -332,6 +332,7 @@ lib.mkIf config.sbruder.gui.enable {
|
|||
on-scroll-down = "brightnessctl set 5%-";
|
||||
};
|
||||
mpd = {
|
||||
server = "${config.services.mpd.dataDir}/socket";
|
||||
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} – {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
|
||||
format-disconnected = "Disconnected ";
|
||||
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
|
||||
|
@ -339,8 +340,8 @@ lib.mkIf config.sbruder.gui.enable {
|
|||
interval = 2;
|
||||
tooltip-format = "MPD (connected)";
|
||||
tooltip-format-disconnected = "MPD (disconnected)";
|
||||
on-scroll-up = "${pkgs.mpc_cli}/bin/mpc volume +2";
|
||||
on-scroll-down = "${pkgs.mpc_cli}/bin/mpc volume -2";
|
||||
on-scroll-up = "${pkgs.mpc_cli}/bin/mpc -h ${config.services.mpd.dataDir}/socket volume +2";
|
||||
on-scroll-down = "${pkgs.mpc_cli}/bin/mpc -h ${config.services.mpd.dataDir}/socket volume -2";
|
||||
consume-icons = {
|
||||
on = " ";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue