diff --git a/homes/emenel/default.nix b/homes/emenel/default.nix index 615dc3a..0cca71c 100644 --- a/homes/emenel/default.nix +++ b/homes/emenel/default.nix @@ -9,6 +9,7 @@ desktop music langs + mpd emacs ]; @@ -128,10 +129,6 @@ }; services = { - playerctld = { - enable = true; - package = pkgs.playerctl; - }; borgmatic = { enable = true; }; diff --git a/homes/emenel/dotfiles/dot_local/bin/wezappfloat b/homes/emenel/dotfiles/dot_local/bin/wezappfloat new file mode 100755 index 0000000..6c8bd44 --- /dev/null +++ b/homes/emenel/dotfiles/dot_local/bin/wezappfloat @@ -0,0 +1,2 @@ +#!/bin/sh +wezterm --config-file /home/emenel/.config/wezterm/launcher.lua start --class floatapp --always-new-process "$1" diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 23cb878..e325656 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -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"; diff --git a/modules/home/mpd.nix b/modules/home/mpd.nix new file mode 100644 index 0000000..8d0f303 --- /dev/null +++ b/modules/home/mpd.nix @@ -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; + }; +} diff --git a/modules/home/niri.nix b/modules/home/niri.nix index 117ab9b..e10b351 100644 --- a/modules/home/niri.nix +++ b/modules/home/niri.nix @@ -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" = { diff --git a/modules/home/rmpc/config.ron b/modules/home/rmpc/config.ron new file mode 100644 index 0000000..f636458 --- /dev/null +++ b/modules/home/rmpc/config.ron @@ -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, + "": NextTab, + "": 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, + "": Down, + "": Left, + "": Right, + "": PaneUp, + "": PaneDown, + "": PaneLeft, + "": PaneRight, + "": UpHalf, + "N": PreviousResult, + "a": Add, + "A": AddAll, + "r": Rename, + "n": NextResult, + "g": Top, + "": Select, + "": InvertSelection, + "G": Bottom, + "": Confirm, + "i": FocusInput, + "J": MoveDown, + "": DownHalf, + "/": EnterSearch, + "": Close, + "": Close, + "K": MoveUp, + "D": Delete, + }, + queue: { + "D": DeleteAll, + "": Play, + "": 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), + ), + ], +) diff --git a/modules/home/rmpc/themes/theme.ron b/modules/home/rmpc/themes/theme.ron new file mode 100644 index 0000000..f8caea9 --- /dev/null +++ b/modules/home/rmpc/themes/theme.ron @@ -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)) + ), + ], +) diff --git a/modules/home/shell-conf.nix b/modules/home/shell-conf.nix index 022b456..ff5d901 100644 --- a/modules/home/shell-conf.nix +++ b/modules/home/shell-conf.nix @@ -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 diff --git a/modules/home/waybar.nix b/modules/home/waybar.nix index 3fb755d..d918d9e 100644 --- a/modules/home/waybar.nix +++ b/modules/home/waybar.nix @@ -131,10 +131,7 @@ in { }; "mpris" = { - "dynamic-order" = ["title" - "artist" - "album" - "length"]; + "interval" = 1; "format" = "{player_icon} {dynamic}"; "format-paused" = "{status_icon} {dynamic}"; "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" = { diff --git a/packages/tal/u-no-lx.nix b/packages/tal/u-no-lx.nix index ef0e5a8..5b88a45 100644 --- a/packages/tal/u-no-lx.nix +++ b/packages/tal/u-no-lx.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "latest"; src = fetchurl { url = "https://tal-software.com/downloads/plugins/TAL-U-NO-LX-V2_64_linux.zip"; - sha256 = "sha256-okPSejK2RQTy1s4cmxoM8D7d2ZeoWCITgHS2aT0atKc="; + sha256 = "sha256-1xcThCE3C3RRobEdVESHK6S1QMRg5yT8sF082LJW8Vs="; }; nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ]; buildInputs = with pkgs; [