From 9e45600e37d9260ed121bbf507f705019c200457 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Mon, 20 Oct 2025 18:47:46 +0200 Subject: [PATCH] pinwheel: Update `music` and use `naviterm` --- .../modules/{spotify => music}/default.nix | 12 +++++++----- hosts/pinwheel/modules/waybar/default.nix | 17 ++++++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) rename hosts/pinwheel/modules/{spotify => music}/default.nix (74%) diff --git a/hosts/pinwheel/modules/spotify/default.nix b/hosts/pinwheel/modules/music/default.nix similarity index 74% rename from hosts/pinwheel/modules/spotify/default.nix rename to hosts/pinwheel/modules/music/default.nix index ab67879..6107edb 100644 --- a/hosts/pinwheel/modules/spotify/default.nix +++ b/hosts/pinwheel/modules/music/default.nix @@ -1,4 +1,5 @@ { + inputs, pkgs, lib, config, @@ -13,18 +14,18 @@ in settings = { bind = let - prev = "${pkgs.playerctl}/bin/playerctl -p spotify previous"; - next = "${pkgs.playerctl}/bin/playerctl -p spotify next"; + prev = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify previous"; + next = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify next"; in [ ", XF86AudioPrev, exec, ${prev}" ", XF86AudioNext, exec, ${next}" - ", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl -p spotify play-pause" - ", XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl -p spoitfy play-pause" + ", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause" + ", XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spoitfy play-pause" "$mod ALT, LEFT, exec, ${prev}" "$mod ALT, RIGHT, exec, ${next}" - "$mod ALT, DOWN, exec, ${pkgs.playerctl}/bin/playerctl -p spotify play-pause" + "$mod ALT, DOWN, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause" ]; }; }; @@ -32,6 +33,7 @@ in home.packages = [ pkgs.playerctl pkgs.spotify + inputs.naviterm.packages.${pkgs.system}.default ]; }; diff --git a/hosts/pinwheel/modules/waybar/default.nix b/hosts/pinwheel/modules/waybar/default.nix index b6a8053..3727863 100644 --- a/hosts/pinwheel/modules/waybar/default.nix +++ b/hosts/pinwheel/modules/waybar/default.nix @@ -7,14 +7,14 @@ let hyprlandEnabled = config.mod.hyprland.enable; - spotify-status = pkgs.writeShellScript "spotify-status" '' - STATUS=$(${pkgs.playerctl}/bin/playerctl -p spotify status 2>&1) + music-status = pkgs.writeShellScript "music-status" '' + STATUS=$(${pkgs.playerctl}/bin/playerctl -p naviterm,spotify status 2>&1) if [ "$STATUS" = "No players found" ]; then echo "" else FORMAT="{{markup_escape(xesam:title)}} - {{markup_escape(xesam:artist)}}" - OUTPUT=$(${pkgs.playerctl}/bin/playerctl -p spotify metadata --format "$FORMAT") + OUTPUT=$(${pkgs.playerctl}/bin/playerctl -p naviterm,spotify metadata --format "$FORMAT") case "$STATUS" in "Playing") echo " $OUTPUT" @@ -126,7 +126,7 @@ in modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ]; modules-right = [ "custom/work-vpn-status" - "custom/spotify" + "custom/music" "custom/container-status" "custom/dunst" "bluetooth" @@ -142,8 +142,8 @@ in interval = 2; }; - "custom/spotify" = { - exec = spotify-status; + "custom/music" = { + exec = music-status; interval = 2; max-length = 70; tooltip = false; @@ -222,7 +222,10 @@ in height = 30; spacing = 20; fixed-center = false; - output = [ "HDMI-A-1" ]; + output = [ + "HDMI-A-1" + "DP-3" + ]; modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ]; modules-right = [