FelixKratz / SketchyBar

A highly customizable macOS status bar replacement
https://felixkratz.github.io/SketchyBar/
GNU General Public License v3.0
5.62k stars 86 forks source link

Simple cat command not working #362

Closed TobinPalmerAlt closed 1 year ago

TobinPalmerAlt commented 1 year ago

This code doesn't output anything:

#!/bin/bash
SOURCE=$(cat ~/Library/DoNotDisturb/DB/Assertions.json | jq '.[][]' | grep assertionDetailsModeIdentifier | tail -1 | cut -d'"' -f4)

sketchybar --set $NAME label="$SOURCE"

But when ran in the terminal, this is the output.

image

This is the sketchybar code

sketchybar --add       item               focus right                                                 \
           --set       focus              script="$PLUGIN_DIR/focus.sh"                               \
                                          width=30                                                    \
                                          label.padding_left=-10                                      \
                                          label.font="$FONT:Bold:12"                                  \
                                          update_freq=3                                               \

And when setting the label to a constant string it will show

FelixKratz commented 1 year ago

This seems to work without any problems. Try running sketchybar from the commandline and see the error message output. Also check the item properties when sketchybar is running with sketchybar --query focus