mirror of
https://github.com/TECHNOFAB11/tmux2k.git
synced 2025-12-11 23:50:08 +01:00
Add support for olimorris/tmux-pomodoro-plus tmux plugin. (#22)
This commit is contained in:
parent
74c6c25a28
commit
4646757c9e
3 changed files with 26 additions and 0 deletions
23
scripts/pomodoro.sh
Executable file
23
scripts/pomodoro.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$TMUX" ]; then
|
||||
echo "No tmux session."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for olimorris/tmux-pomodoro-plus scripts
|
||||
POMODORO_SCRIPT="$HOME/.tmux/plugins/tmux-pomodoro-plus/scripts/pomodoro.sh"
|
||||
POMODORO_HELPER="$HOME/.tmux/plugins/tmux-pomodoro-plus/scripts/helpers.sh"
|
||||
|
||||
if [ -f "$POMODORO_SCRIPT" ]; then
|
||||
. "$POMODORO_SCRIPT"
|
||||
. "$POMODORO_HELPER"
|
||||
fi
|
||||
|
||||
main() {
|
||||
pomodoro_status="$(pomodoro_status)"
|
||||
RATE=$(get_tmux_option "@tmux2k-ping-rate" 5)
|
||||
sleep "$RATE"
|
||||
}
|
||||
|
||||
main
|
||||
|
|
@ -48,6 +48,7 @@ declare -A plugin_colors=(
|
|||
["weather"]="yellow text"
|
||||
["time"]="light_blue text"
|
||||
["window"]="bg_main blue"
|
||||
["pomodoro"]="bg_main green"
|
||||
)
|
||||
|
||||
get_plugin_colors() {
|
||||
|
|
@ -163,6 +164,7 @@ set_theme() {
|
|||
["weather"]="text yellow"
|
||||
["time"]="text light_blue"
|
||||
["window"]="blue bg_main"
|
||||
["pomodoro"]="text bg_main"
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue