Media teaks

Get the waybar item configured how I want it, and remove iris in favor
of ymuse
This commit is contained in:
Nathan McCarty 2023-06-17 16:12:02 -04:00
parent c7c47a2832
commit 12c5c1dffe
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
2 changed files with 26 additions and 22 deletions

View File

@ -319,7 +319,9 @@ in with lib; {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = package =
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar.overrideAttrs (inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar.override {
withMediaPlayer = true;
}).overrideAttrs
(old: { mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ]; }); (old: { mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ]; });
systemd = { enable = false; }; systemd = { enable = false; };
settings = { settings = {
@ -336,7 +338,7 @@ in with lib; {
modules-center = [ modules-center = [
"custom/launcher" "custom/launcher"
"wlr/workspaces" "wlr/workspaces"
"mpd" "custom/media"
# "hyprland/window" # "hyprland/window"
"idle_inhibitor" "idle_inhibitor"
"pulseaudio" "pulseaudio"
@ -400,19 +402,17 @@ in with lib; {
spacing = 10; spacing = 10;
}; };
"clock" = { format = "{:%I:%M%p %Y-%m-%d}"; }; "clock" = { format = "{:%I:%M%p %Y-%m-%d}"; };
"mpd" = { "custom/media" = {
format = format = "{icon} {}";
"{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})"; return-type = "json";
format-disconnected = "Disconnected "; max-length = 50;
format-stopped = format-icons = {
"{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; spotify = " ";
consume-icons = { on = "🍴"; }; default = " ";
random-icons = { on = "🔀"; };
repeat-icons = { on = "🔁"; };
state-icons = {
paused = "";
playing = "";
}; };
escape = true;
exec = "waybar-mediaplayer.py 2> /dev/null";
on-click = "playerctl play-pause";
}; };
"custom/notification" = { "custom/notification" = {
tooltip = false; tooltip = false;
@ -630,6 +630,15 @@ in with lib; {
color: red; color: red;
} }
#custom-media {
background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
}
#custom-media { #custom-media {
background-color: #8EC5FC; background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%); background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);

View File

@ -4,13 +4,6 @@ let
config = { allowUnfree = true; }; config = { allowUnfree = true; };
system = pkgs.system; system = pkgs.system;
}; };
irisDesktopItem = pkgs.makeDesktopItem {
name = "iris";
desktopName = "Iris";
exec =
''${pkgs.chromium}/bin/chromium "--app=http://localhost:6680/iris/"'';
terminal = false;
};
in { in {
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf config.nathan.programs.media.enable { (lib.mkIf config.nathan.programs.media.enable {
@ -21,11 +14,11 @@ in {
unstable.jellyfin-media-player unstable.jellyfin-media-player
unstable.obs-studio unstable.obs-studio
nicotine-plus nicotine-plus
irisDesktopItem
picard picard
mpc-cli mpc-cli
calibre calibre
playerctl playerctl
ymuse
]; ];
# Register haruna as the default video player # Register haruna as the default video player
xdg.mimeApps.defaultApplications = { xdg.mimeApps.defaultApplications = {
@ -44,6 +37,7 @@ in {
mopidy-iris mopidy-iris
mopidy-scrobbler mopidy-scrobbler
mopidy-local mopidy-local
mopidy-mpris
]; ];
# extraConfigFiles = config.nathan.programs.media.mopidyExtraConfig; # extraConfigFiles = config.nathan.programs.media.mopidyExtraConfig;
settings = { settings = {
@ -53,6 +47,7 @@ in {
media_dir = "~/Music"; media_dir = "~/Music";
}; };
mpd = { enabled = true; }; mpd = { enabled = true; };
mpris = { enabled = true; };
}; };
extraConfigFiles = [ nixosConfig.sops.secrets."last.fm".path ]; extraConfigFiles = [ nixosConfig.sops.secrets."last.fm".path ];
}; };