function check_night_mode set target_process "gammastep" if pgrep $target_process > /dev/null echo "{ \"text\":\"󱩌\", \"tooltip\": \"night-mode on\", \"class\": \"on\" }" else echo "{ \"text\":\"󱩍\", \"tooltip\": \"night-mode off\", \"class\": \"off\" }" end end