mpd stuff
This commit is contained in:
parent
da5f979a59
commit
edb92986fc
10 changed files with 362 additions and 16 deletions
|
@ -6,9 +6,7 @@
|
|||
niri
|
||||
waybar
|
||||
swaync
|
||||
# shikane
|
||||
mpv
|
||||
gnome
|
||||
hyprlock
|
||||
hypridle
|
||||
sway-launcher-desktop
|
||||
|
@ -81,7 +79,6 @@
|
|||
hyphenDicts.en_US
|
||||
plex-mpv-shim
|
||||
plexamp
|
||||
plex-media-player
|
||||
|
||||
switcheroo
|
||||
|
||||
|
@ -130,6 +127,8 @@
|
|||
|
||||
virt-manager
|
||||
|
||||
gnome-photos
|
||||
gnome-tweaks
|
||||
nautilus
|
||||
nautilus-open-any-terminal
|
||||
turtle
|
||||
|
@ -216,6 +215,10 @@
|
|||
home.file.".local/wallpapers".source = ../../assets/wallpapers;
|
||||
|
||||
xdg.desktopEntries = {
|
||||
rmpc = {
|
||||
name = "rmpc (music player)";
|
||||
exec = "/home/emenel/.local/bin/wezapp rmpc";
|
||||
};
|
||||
isd = {
|
||||
name = "isd (interactive systemd)";
|
||||
exec = "/home/emenel/.local/bin/wezapp isd";
|
||||
|
|
35
modules/home/mpd.nix
Normal file
35
modules/home/mpd.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
rmpc
|
||||
termusic
|
||||
mpc
|
||||
];
|
||||
|
||||
services = {
|
||||
mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/mnt/filez/media/Music";
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Default Playback"
|
||||
}
|
||||
'';
|
||||
network.startWhenNeeded = true;
|
||||
};
|
||||
mpdris2 = {
|
||||
enable = true;
|
||||
};
|
||||
playerctld = {
|
||||
enable = true;
|
||||
package = pkgs.playerctl;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."rmpc/" = {
|
||||
source = ./rmpc;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
|
@ -258,6 +258,7 @@ in
|
|||
let
|
||||
wez = spawn "/home/emenel/.local/bin/wezapp";
|
||||
wezlaunch = spawn "/home/emenel/.local/bin/wezlauncher";
|
||||
wezappfloat = spawn "/home/emenel/.local/bin/wezappfloat";
|
||||
in
|
||||
{
|
||||
# shows a list of important hotkeys.
|
||||
|
@ -310,8 +311,8 @@ in
|
|||
action = wez "btop";
|
||||
};
|
||||
"Mod+Ctrl+M" = {
|
||||
hotkey-overlay.title = "plexamp";
|
||||
action = spawn "plexamp";
|
||||
hotkey-overlay.title = "music (rmpc)";
|
||||
action = wez "rmpc";
|
||||
};
|
||||
|
||||
"Mod+V" = {
|
||||
|
|
142
modules/home/rmpc/config.ron
Normal file
142
modules/home/rmpc/config.ron
Normal file
|
@ -0,0 +1,142 @@
|
|||
#![enable(implicit_some)]
|
||||
#![enable(unwrap_newtypes)]
|
||||
#![enable(unwrap_variant_newtypes)]
|
||||
(
|
||||
address: "127.0.0.1:6600",
|
||||
password: None,
|
||||
theme: Some("theme"),
|
||||
cache_dir: None,
|
||||
on_song_change: None,
|
||||
volume_step: 5,
|
||||
max_fps: 30,
|
||||
scrolloff: 0,
|
||||
wrap_navigation: false,
|
||||
enable_mouse: true,
|
||||
enable_config_hot_reload: true,
|
||||
status_update_interval_ms: 1000,
|
||||
select_current_song_on_change: false,
|
||||
browser_song_sort: [Disc, Track, Artist, Title],
|
||||
album_art: (
|
||||
method: Auto,
|
||||
max_size_px: (width: 1200, height: 1200),
|
||||
disabled_protocols: ["http://", "https://"],
|
||||
vertical_align: Center,
|
||||
horizontal_align: Center,
|
||||
),
|
||||
keybinds: (
|
||||
global: {
|
||||
":": CommandMode,
|
||||
",": VolumeDown,
|
||||
"s": Stop,
|
||||
".": VolumeUp,
|
||||
"<Tab>": NextTab,
|
||||
"<S-Tab>": PreviousTab,
|
||||
"1": SwitchToTab("Queue"),
|
||||
"2": SwitchToTab("Recently Added"),
|
||||
"3": SwitchToTab("Artists"),
|
||||
"4": SwitchToTab("Album Artists"),
|
||||
"5": SwitchToTab("Albums"),
|
||||
"6": SwitchToTab("Playlists"),
|
||||
"7": SwitchToTab("Search"),
|
||||
"q": Quit,
|
||||
">": NextTrack,
|
||||
"p": TogglePause,
|
||||
"<": PreviousTrack,
|
||||
"f": SeekForward,
|
||||
"z": ToggleRepeat,
|
||||
"x": ToggleRandom,
|
||||
"c": ToggleConsume,
|
||||
"v": ToggleSingle,
|
||||
"b": SeekBack,
|
||||
"~": ShowHelp,
|
||||
"I": ShowCurrentSongInfo,
|
||||
"O": ShowOutputs,
|
||||
"P": ShowDecoders,
|
||||
},
|
||||
navigation: {
|
||||
"k": Up,
|
||||
"j": Down,
|
||||
"h": Left,
|
||||
"l": Right,
|
||||
"<Up>": Up,
|
||||
"<Down>": Down,
|
||||
"<Left>": Left,
|
||||
"<Right>": Right,
|
||||
"<C-k>": PaneUp,
|
||||
"<C-j>": PaneDown,
|
||||
"<C-h>": PaneLeft,
|
||||
"<C-l>": PaneRight,
|
||||
"<C-u>": UpHalf,
|
||||
"N": PreviousResult,
|
||||
"a": Add,
|
||||
"A": AddAll,
|
||||
"r": Rename,
|
||||
"n": NextResult,
|
||||
"g": Top,
|
||||
"<Space>": Select,
|
||||
"<C-Space>": InvertSelection,
|
||||
"G": Bottom,
|
||||
"<CR>": Confirm,
|
||||
"i": FocusInput,
|
||||
"J": MoveDown,
|
||||
"<C-d>": DownHalf,
|
||||
"/": EnterSearch,
|
||||
"<C-c>": Close,
|
||||
"<Esc>": Close,
|
||||
"K": MoveUp,
|
||||
"D": Delete,
|
||||
},
|
||||
queue: {
|
||||
"D": DeleteAll,
|
||||
"<CR>": Play,
|
||||
"<C-s>": Save,
|
||||
"a": AddToPlaylist,
|
||||
"d": Delete,
|
||||
"i": ShowInfo,
|
||||
"C": JumpToCurrent,
|
||||
},
|
||||
),
|
||||
search: (
|
||||
case_sensitive: false,
|
||||
mode: Contains,
|
||||
tags: [
|
||||
(value: "any", label: "Any Tag"),
|
||||
(value: "artist", label: "Artist"),
|
||||
(value: "album", label: "Album"),
|
||||
(value: "albumartist", label: "Album Artist"),
|
||||
(value: "title", label: "Title"),
|
||||
(value: "filename", label: "Filename"),
|
||||
(value: "genre", label: "Genre"),
|
||||
],
|
||||
),
|
||||
artists: (
|
||||
album_display_mode: SplitByDate,
|
||||
album_sort_by: Date,
|
||||
),
|
||||
tabs: [
|
||||
(
|
||||
name: "Queue",
|
||||
pane: Pane(Queue),
|
||||
),
|
||||
(
|
||||
name: "Artists",
|
||||
pane: Pane(Artists),
|
||||
),
|
||||
(
|
||||
name: "Album Artists",
|
||||
pane: Pane(AlbumArtists),
|
||||
),
|
||||
(
|
||||
name: "Albums",
|
||||
pane: Pane(Albums),
|
||||
),
|
||||
(
|
||||
name: "Playlists",
|
||||
pane: Pane(Playlists),
|
||||
),
|
||||
(
|
||||
name: "Search",
|
||||
pane: Pane(Search),
|
||||
),
|
||||
],
|
||||
)
|
167
modules/home/rmpc/themes/theme.ron
Normal file
167
modules/home/rmpc/themes/theme.ron
Normal file
|
@ -0,0 +1,167 @@
|
|||
#![enable(implicit_some)]
|
||||
#![enable(unwrap_newtypes)]
|
||||
#![enable(unwrap_variant_newtypes)]
|
||||
(
|
||||
default_album_art_path: None,
|
||||
show_song_table_header: true,
|
||||
draw_borders: true,
|
||||
browser_column_widths: [20, 38, 42],
|
||||
background_color: None,
|
||||
text_color: None,
|
||||
header_background_color: None,
|
||||
modal_background_color: None,
|
||||
modal_backdrop: false,
|
||||
tab_bar: (
|
||||
enabled: true,
|
||||
active_style: (fg: "black", bg: "blue", modifiers: "Bold"),
|
||||
inactive_style: (),
|
||||
),
|
||||
highlighted_item_style: (fg: "blue", modifiers: "Bold"),
|
||||
current_item_style: (fg: "black", bg: "blue", modifiers: "Bold"),
|
||||
borders_style: (fg: "blue"),
|
||||
highlight_border_style: (fg: "blue"),
|
||||
symbols: (song: "S", dir: "D", marker: "M", ellipsis: "..."),
|
||||
progress_bar: (
|
||||
symbols: ["-", ">", " "],
|
||||
track_style: (fg: "#1e2030"),
|
||||
elapsed_style: (fg: "blue"),
|
||||
thumb_style: (fg: "blue", bg: "#1e2030"),
|
||||
),
|
||||
scrollbar: (
|
||||
symbols: ["│", "█", "▲", "▼"],
|
||||
track_style: (),
|
||||
ends_style: (),
|
||||
thumb_style: (fg: "blue"),
|
||||
),
|
||||
song_table_format: [
|
||||
(
|
||||
prop: (kind: Property(Artist),
|
||||
default: (kind: Text("Unknown"))
|
||||
),
|
||||
width: "20%",
|
||||
),
|
||||
(
|
||||
prop: (kind: Property(Title),
|
||||
default: (kind: Text("Unknown"))
|
||||
),
|
||||
width: "35%",
|
||||
),
|
||||
(
|
||||
prop: (kind: Property(Album), style: (fg: "white"),
|
||||
default: (kind: Text("Unknown Album"), style: (fg: "white"))
|
||||
),
|
||||
width: "30%",
|
||||
),
|
||||
(
|
||||
prop: (kind: Property(Duration),
|
||||
default: (kind: Text("-"))
|
||||
),
|
||||
width: "15%",
|
||||
alignment: Right,
|
||||
),
|
||||
],
|
||||
layout: Split(
|
||||
direction: Vertical,
|
||||
panes: [
|
||||
(
|
||||
size: "8",
|
||||
pane: Split(
|
||||
direction: Horizontal,
|
||||
panes: [
|
||||
(
|
||||
size: "21",
|
||||
pane: Pane(AlbumArt),
|
||||
),
|
||||
(
|
||||
size: "100%",
|
||||
pane: Split(
|
||||
direction: Vertical,
|
||||
panes: [
|
||||
(
|
||||
size: "5",
|
||||
pane: Pane(Header),
|
||||
),
|
||||
(
|
||||
size: "1",
|
||||
pane: Pane(ProgressBar),
|
||||
),
|
||||
(
|
||||
size: "3",
|
||||
pane: Pane(Tabs),
|
||||
),
|
||||
]
|
||||
)
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
(
|
||||
size: "100%",
|
||||
pane: Pane(TabContent),
|
||||
),
|
||||
],
|
||||
),
|
||||
header: (
|
||||
rows: [
|
||||
(
|
||||
left: [
|
||||
(kind: Text("["), style: (fg: "yellow", modifiers: "Bold")),
|
||||
(kind: Property(Status(StateV2(playing_label: "Playing", paused_label: "Paused", stopped_label: "Stopped"))), style: (fg: "yellow", modifiers: "Bold")),
|
||||
(kind: Text("]"), style: (fg: "yellow", modifiers: "Bold"))
|
||||
],
|
||||
center: [
|
||||
(kind: Property(Song(Title)), style: (modifiers: "Bold"),
|
||||
default: (kind: Text("No Song"), style: (modifiers: "Bold"))
|
||||
)
|
||||
],
|
||||
right: [
|
||||
(kind: Property(Widget(Volume)), style: (fg: "blue"))
|
||||
]
|
||||
),
|
||||
(
|
||||
left: [
|
||||
(kind: Property(Status(Elapsed))),
|
||||
(kind: Text(" / ")),
|
||||
(kind: Property(Status(Duration))),
|
||||
(kind: Text(" (")),
|
||||
(kind: Property(Status(Bitrate))),
|
||||
(kind: Text(" kbps)"))
|
||||
],
|
||||
center: [
|
||||
(kind: Property(Song(Artist)), style: (fg: "yellow", modifiers: "Bold"),
|
||||
default: (kind: Text("Unknown"), style: (fg: "yellow", modifiers: "Bold"))
|
||||
),
|
||||
(kind: Text(" - ")),
|
||||
(kind: Property(Song(Album)),
|
||||
default: (kind: Text("Unknown Album"))
|
||||
)
|
||||
],
|
||||
right: [
|
||||
(
|
||||
kind: Property(Widget(States(
|
||||
active_style: (fg: "white", modifiers: "Bold"),
|
||||
separator_style: (fg: "white")))
|
||||
),
|
||||
style: (fg: "dark_gray")
|
||||
),
|
||||
]
|
||||
),
|
||||
],
|
||||
),
|
||||
browser_song_format: [
|
||||
(
|
||||
kind: Group([
|
||||
(kind: Property(Track)),
|
||||
(kind: Text(" ")),
|
||||
])
|
||||
),
|
||||
(
|
||||
kind: Group([
|
||||
(kind: Property(Artist)),
|
||||
(kind: Text(" - ")),
|
||||
(kind: Property(Title)),
|
||||
]),
|
||||
default: (kind: Property(Filename))
|
||||
),
|
||||
],
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
{ nix-config, lib, inputs, pkgs, ... }:
|
||||
{ nix-config, pkgs-stable, inputs, pkgs, ... }:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
@ -22,7 +22,7 @@
|
|||
unzip
|
||||
zip
|
||||
tldr
|
||||
rich-cli
|
||||
pkgs-stable.rich-cli
|
||||
gnupg
|
||||
imagemagick
|
||||
|
||||
|
|
|
@ -131,10 +131,7 @@ in {
|
|||
};
|
||||
|
||||
"mpris" = {
|
||||
"dynamic-order" = ["title"
|
||||
"artist"
|
||||
"album"
|
||||
"length"];
|
||||
"interval" = 1;
|
||||
"format" = "{player_icon} {dynamic}";
|
||||
"format-paused" = "{status_icon} <i>{dynamic}</i>";
|
||||
"dynamic-len" = 75;
|
||||
|
@ -144,6 +141,8 @@ in {
|
|||
"status-icons" = {
|
||||
"paused" = "";
|
||||
};
|
||||
"on-click" = "/home/emenel/.local/bin/wezapp rmpc";
|
||||
"on-click-right" = "playerctl play-pause";
|
||||
};
|
||||
|
||||
"wlr/taskbar" = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue