Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions examples/sketchybar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Sketchybar Integration

Display pomodoro status in [sketchybar](https://github.com/FelixKratz/SketchyBar).

## Setup

1. Copy the plugin to your sketchybar plugins directory:

```bash
cp plugins/pomodoro.sh ~/.config/sketchybar/plugins/
Comment thread
RoseSecurity marked this conversation as resolved.
chmod +x ~/.config/sketchybar/plugins/pomodoro.sh
```

2. Update the `POMODORO` path in `pomodoro.sh` to match your installation.

3. Add the snippet from `sketchybarrc` to your sketchybar configuration.

4. Reload sketchybar:

```bash
sketchybar --reload
```
25 changes: 25 additions & 0 deletions examples/sketchybar/plugins/pomodoro.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

POMODORO="$HOME/go/bin/pomodoro"
STATUS=$($POMODORO status 2>/dev/null)

if [ -z "$STATUS" ]; then
sketchybar --set "$NAME" \
icon="󰔟" \
label="00:00" \
icon.color=0xff9a67ea
else
REMAINING=$($POMODORO status -f "%r" 2>/dev/null)

if [ "$REMAINING" = "0:00" ]; then
sketchybar --set "$NAME" \
icon="󰾫" \
label="Done" \
icon.color=0xff9a67ea
else
sketchybar --set "$NAME" \
icon="󱎫" \
label="$REMAINING" \
icon.color=0xffff6961
fi
fi
9 changes: 9 additions & 0 deletions examples/sketchybar/sketchybarrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PLUGIN_DIR="$CONFIG_DIR/plugins"

sketchybar --add item pomodoro left \
--set pomodoro update_freq=1 icon="󰔟" script="$PLUGIN_DIR/pomodoro.sh" label.padding_right=10 icon.padding_left=10 icon.font.size=22

sketchybar --add bracket pomodoro \
--set pomodoro background.color=0xff000000 \
Comment thread
RoseSecurity marked this conversation as resolved.
background.height=30 \
background.corner_radius=10
Loading