From dc386b42631eba05c6dc340cfb72ba8396481534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sat, 5 Oct 2024 20:14:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(hypr):=20add=20current=20song?= =?UTF-8?q?=20to=20hyprlock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/hypr/hyprlock.conf | 9 +++++---- .config/hypr/scripts/current_song | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 .config/hypr/scripts/current_song diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index 71d45515..35da9a6c 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -20,6 +20,7 @@ background { vibrancy_darkness = 0.0 } +# Password Field input-field { monitor = DP-1 rounding = 20 @@ -43,7 +44,7 @@ input-field { valign = bottom } -# Current time +# Current Time label { monitor = DP-1 shadow_passes = 1 @@ -56,15 +57,15 @@ label { valign = center } -# User label +# Current Song label { monitor = DP-1 - text = Type to unlock + text = cmd[update:1000] echo "$(~/.config/hypr/scripts/current_song)" shadow_passes = 1 color = $subtext0 font_size = 17 font_family = $font - position = 0, -102 + position = 0, -107 halign = center valign = center } diff --git a/.config/hypr/scripts/current_song b/.config/hypr/scripts/current_song new file mode 100755 index 00000000..23429c31 --- /dev/null +++ b/.config/hypr/scripts/current_song @@ -0,0 +1,5 @@ +#!/bin/bash + +song_info=$(playerctl metadata --format '󰎈 {{artist}} - {{title}} 󰎈') + +echo "$song_info"