From 2325f6b15defb8432fb0d7d0c1a5f5b636c9ebc3 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Thu, 9 Oct 2025 21:58:22 +0530 Subject: brightness on waybar --- waybar/brightness.sh | 4 ++++ waybar/config | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 waybar/brightness.sh (limited to 'waybar') diff --git a/waybar/brightness.sh b/waybar/brightness.sh new file mode 100755 index 0000000..cbd597e --- /dev/null +++ b/waybar/brightness.sh @@ -0,0 +1,4 @@ +brightness=$(brightnessctl | grep 'Current brightness' | grep -o '[0-9]\+' | head -n 1) +temp=$(hyprctl hyprsunset temperature 2>/dev/null | grep -o '[0-9]\+') +if [ -z "$temp" ]; then temp=6000; fi +echo "Photons:$brightness($tempK)" diff --git a/waybar/config b/waybar/config index fd52685..1596adb 100644 --- a/waybar/config +++ b/waybar/config @@ -78,8 +78,8 @@ "tooltip": false, }, "custom/brightness": { - "exec": "brightnessctl | grep 'Current brightness' | grep -o '[0-9]\\+' | head -n 1", - "format": "Photons:{}", + "exec": "~/.config/waybar/brightness.sh", + "format": "{}", "interval": 1, "tooltip": false, }, -- cgit v1.2.3