zenix: add musnix and mpd
This commit is contained in:
parent
2202ebef0b
commit
53f5a52ceb
8 changed files with 124 additions and 84 deletions
70
home/programs/mpd.nix
Normal file
70
home/programs/mpd.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
terminal = config.programs.terminal;
|
||||
termcmd = "${terminal}/bin/${terminal.pname}";
|
||||
host = "alpine";
|
||||
in {
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings.mpd_host = host;
|
||||
bindings = [
|
||||
{
|
||||
key = "j";
|
||||
command = "scroll_down";
|
||||
}
|
||||
{
|
||||
key = "k";
|
||||
command = "scroll_up";
|
||||
}
|
||||
{
|
||||
key = "l";
|
||||
command = "next_column";
|
||||
}
|
||||
{
|
||||
key = "h";
|
||||
command = "previous_column";
|
||||
}
|
||||
{
|
||||
key = "J";
|
||||
command = ["select_item" "scroll_down"];
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
command = ["select_item" "scroll_up"];
|
||||
}
|
||||
];
|
||||
};
|
||||
services.mpd-mpris = {
|
||||
enable = true;
|
||||
mpd.host = host;
|
||||
};
|
||||
programs.waybar.settings.mainBar.mpd.server = host;
|
||||
programs.scripts = [
|
||||
{
|
||||
name = "ncmpcpp";
|
||||
text = ''
|
||||
${termcmd} -e ${pkgs.ncmpcpp}/bin/ncmpcpp
|
||||
'';
|
||||
hotkeys = [{key = "M";}];
|
||||
install = false;
|
||||
}
|
||||
];
|
||||
systemd.user.services = {
|
||||
snapclient = {
|
||||
Unit = {
|
||||
Description = "Snapclient";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.snapcast}/bin/snapclient -h ${host}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
keep-open = true;
|
||||
};
|
||||
bindings = {
|
||||
l = "seek 5";
|
||||
h = "seek -5";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue