diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2025-10-09 21:58:22 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2025-10-09 21:58:22 +0530 |
| commit | 2325f6b15defb8432fb0d7d0c1a5f5b636c9ebc3 (patch) | |
| tree | 7e2d940349d6cd99803df2a59eddbdcf9a8a9af7 | |
| parent | cd2dd570d38bd7aa9483f07c9a4a4acb33078993 (diff) | |
brightness on waybar
| -rwxr-xr-x | waybar/brightness.sh | 4 | ||||
| -rw-r--r-- | waybar/config | 4 |
2 files changed, 6 insertions, 2 deletions
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:<span color='#FFA500'>$brightness</span>(<span color='#FF4040'>$temp</span>K)" 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:<span color='#FFA500'>{}</span>", + "exec": "~/.config/waybar/brightness.sh", + "format": "{}", "interval": 1, "tooltip": false, }, |
