2023-06-11 15:33:54 +02:00
|
|
|
{ pkgs, ... }:
|
2023-06-11 15:51:26 +02:00
|
|
|
|
|
|
|
let VARIABLES = import ../../src/variables.nix; in {
|
2023-06-06 02:37:52 +02:00
|
|
|
home-manager.sharedModules = [
|
|
|
|
{
|
|
|
|
services.mpd = {
|
|
|
|
enable = true;
|
2023-06-06 16:48:10 +02:00
|
|
|
musicDirectory = "/home/${VARIABLES.username}/Music";
|
2023-06-06 02:37:52 +02:00
|
|
|
};
|
2023-05-18 21:58:30 +02:00
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
xdg.configFile."mpd/mpd.conf".text = ''
|
|
|
|
auto_update "yes"
|
|
|
|
'';
|
2023-06-02 23:42:16 +02:00
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
xdg.configFile."ncmpcpp/on-song-change.sh".source = ./on-song-change.sh;
|
2023-06-01 21:02:10 +02:00
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
programs.ncmpcpp = {
|
|
|
|
enable = true;
|
2023-05-25 18:15:23 +02:00
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
bindings = [
|
|
|
|
{
|
|
|
|
key = "mouse";
|
|
|
|
command = "dummy";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "h";
|
2023-06-11 15:33:54 +02:00
|
|
|
command = [ "previous_column" "jump_to_parent_directory" ];
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "j";
|
|
|
|
command = "scroll_down";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "k";
|
|
|
|
command = "scroll_up";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "l";
|
2023-06-11 15:33:54 +02:00
|
|
|
command = [ "next_column" "enter_directory" "play_item" ];
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "H";
|
2023-06-11 15:33:54 +02:00
|
|
|
command = [ "select_item" "scroll_down" ];
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "J";
|
2023-06-11 15:33:54 +02:00
|
|
|
command = [ "move_sort_order_down" "move_selected_items_down" ];
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "K";
|
2023-06-11 15:33:54 +02:00
|
|
|
command = [ "move_sort_order_up" "move_selected_items_up" ];
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "L";
|
2023-06-11 15:33:54 +02:00
|
|
|
command = [ "select_item" "scroll_up" ];
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "'";
|
|
|
|
command = "remove_selection";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl-u";
|
|
|
|
command = "page_up";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "ctrl-d";
|
|
|
|
command = "page_down";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "u";
|
|
|
|
command = "page_up";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "d";
|
|
|
|
command = "page_down";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "n";
|
|
|
|
command = "next_found_item";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "N";
|
|
|
|
command = "previous_found_item";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "t";
|
|
|
|
command = "next_screen";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "g";
|
|
|
|
command = "move_home";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "G";
|
|
|
|
command = "move_end";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "w";
|
|
|
|
command = "next";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "b";
|
|
|
|
command = "previous";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = ";";
|
|
|
|
command = "seek_forward";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = ",";
|
|
|
|
command = "seek_backward";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "f";
|
|
|
|
command = "apply_filter";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "i";
|
|
|
|
command = "select_item";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "x";
|
|
|
|
command = [
|
|
|
|
"delete_playlist_items"
|
|
|
|
"delete_browser_items"
|
|
|
|
"delete_stored_playlist"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "U";
|
|
|
|
command = "update_database";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
key = "m";
|
|
|
|
command = "add_random_items";
|
|
|
|
}
|
|
|
|
];
|
2023-05-25 18:15:23 +02:00
|
|
|
|
2023-06-06 02:37:52 +02:00
|
|
|
settings = {
|
|
|
|
ncmpcpp_directory = "~/.config/ncmpcpp";
|
|
|
|
user_interface = "alternative";
|
|
|
|
autocenter_mode = "yes";
|
|
|
|
allow_for_physical_item_deletion = "no";
|
|
|
|
mouse_support = "no";
|
|
|
|
execute_on_song_change = "~/.config/ncmpcpp/on-song-change.sh";
|
|
|
|
mpd_crossfade_time = 3;
|
|
|
|
};
|
2023-05-16 23:09:05 +02:00
|
|
|
};
|
2023-06-06 02:37:52 +02:00
|
|
|
}
|
|
|
|
];
|
2023-05-19 08:54:35 +02:00
|
|
|
|
2023-06-11 15:33:54 +02:00
|
|
|
environment.systemPackages = with pkgs; [ mpc-cli ];
|
2023-05-16 23:09:05 +02:00
|
|
|
}
|