pinwheel: Update music and use naviterm
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
@@ -13,18 +14,18 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
bind =
|
bind =
|
||||||
let
|
let
|
||||||
prev = "${pkgs.playerctl}/bin/playerctl -p spotify previous";
|
prev = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify previous";
|
||||||
next = "${pkgs.playerctl}/bin/playerctl -p spotify next";
|
next = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify next";
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
", XF86AudioPrev, exec, ${prev}"
|
", XF86AudioPrev, exec, ${prev}"
|
||||||
", XF86AudioNext, exec, ${next}"
|
", XF86AudioNext, exec, ${next}"
|
||||||
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl -p spotify play-pause"
|
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause"
|
||||||
", XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl -p spoitfy play-pause"
|
", XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl -p naviterm,spoitfy play-pause"
|
||||||
|
|
||||||
"$mod ALT, LEFT, exec, ${prev}"
|
"$mod ALT, LEFT, exec, ${prev}"
|
||||||
"$mod ALT, RIGHT, exec, ${next}"
|
"$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 = [
|
home.packages = [
|
||||||
pkgs.playerctl
|
pkgs.playerctl
|
||||||
pkgs.spotify
|
pkgs.spotify
|
||||||
|
inputs.naviterm.packages.${pkgs.system}.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7,14 +7,14 @@
|
|||||||
let
|
let
|
||||||
hyprlandEnabled = config.mod.hyprland.enable;
|
hyprlandEnabled = config.mod.hyprland.enable;
|
||||||
|
|
||||||
spotify-status = pkgs.writeShellScript "spotify-status" ''
|
music-status = pkgs.writeShellScript "music-status" ''
|
||||||
STATUS=$(${pkgs.playerctl}/bin/playerctl -p spotify status 2>&1)
|
STATUS=$(${pkgs.playerctl}/bin/playerctl -p naviterm,spotify status 2>&1)
|
||||||
|
|
||||||
if [ "$STATUS" = "No players found" ]; then
|
if [ "$STATUS" = "No players found" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
FORMAT="{{markup_escape(xesam:title)}} - {{markup_escape(xesam:artist)}}"
|
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
|
case "$STATUS" in
|
||||||
"Playing")
|
"Playing")
|
||||||
echo "<span font='14' rise='-3000'></span> $OUTPUT"
|
echo "<span font='14' rise='-3000'></span> $OUTPUT"
|
||||||
@@ -126,7 +126,7 @@ in
|
|||||||
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
|
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"custom/work-vpn-status"
|
"custom/work-vpn-status"
|
||||||
"custom/spotify"
|
"custom/music"
|
||||||
"custom/container-status"
|
"custom/container-status"
|
||||||
"custom/dunst"
|
"custom/dunst"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
@@ -142,8 +142,8 @@ in
|
|||||||
interval = 2;
|
interval = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/spotify" = {
|
"custom/music" = {
|
||||||
exec = spotify-status;
|
exec = music-status;
|
||||||
interval = 2;
|
interval = 2;
|
||||||
max-length = 70;
|
max-length = 70;
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
@@ -222,7 +222,10 @@ in
|
|||||||
height = 30;
|
height = 30;
|
||||||
spacing = 20;
|
spacing = 20;
|
||||||
fixed-center = false;
|
fixed-center = false;
|
||||||
output = [ "HDMI-A-1" ];
|
output = [
|
||||||
|
"HDMI-A-1"
|
||||||
|
"DP-3"
|
||||||
|
];
|
||||||
|
|
||||||
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
|
modules-left = lib.mkIf hyprlandEnabled [ "hyprland/workspaces" ];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
|
|||||||
Reference in New Issue
Block a user