#!/bin/bash if [[ "$1" =~ ^[0-9]+$ ]]; then echo "$1" > /sys/class/backlight/amdgpu_bl1/brightness else swayosd-client --brightness "$1" fi eww update brightness="$(cat /sys/class/backlight/amdgpu_bl1/brightness)"