Add pomodoro status to Waybar

This commit is contained in:
coolneng 2022-04-13 11:00:19 +02:00
parent 5688f06062
commit 0b2c759a89
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#!/bin/sh
emacs_pid=$(pidof emacs)
if [ -z "$emacs_pid" ]; then
echo ""
exit 0
fi
CLOCK_STATUS=$(emacsclient --eval "(bergheim/org-clock-status)" 2>/dev/null)
echo "${CLOCK_STATUS:1:-1}"

View File

@ -1,7 +1,7 @@
{
"layer": "top", // Waybar at top layer
"height": 25, // Waybar height (to be removed for auto height)
"modules-left": ["sway/workspaces"],
"modules-left": ["sway/workspaces", "custom/org-pomodoro"],
"modules-center": ["clock"],
"modules-right": ["mpd", "network", "pulseaudio", "battery", "battery#bat2"],
// Modules configuration
@ -115,5 +115,9 @@
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
"custom/org-pomodoro": {
"format": "<span foreground='#88C0D0'>祥</span> {}",
"exec": "$HOME/.local/share/scripts/org-clock-status",
"interval": 2
}
}

View File

@ -73,6 +73,9 @@ window#waybar.chromium {
padding: 0 10px;
margin: 0 4px;
}
#custom-org-pomodoro{
padding: 0 10px;
}
#clock {
}