pinwheel: Update music and use naviterm
This commit is contained in:
@@ -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
|
||||
];
|
||||
};
|
||||
|
||||
@@ -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 "<span font='14' rise='-3000'></span> $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 = [
|
||||
|
||||
Reference in New Issue
Block a user