From 8c2c2aa3a41d4ab582ef9e3151148165acbff848 Mon Sep 17 00:00:00 2001 From: Paolo Donadeo Date: Wed, 24 Dec 2025 11:40:59 +0100 Subject: [PATCH] Test --- scripts/main.sh | 13 +++++++++++-- tmux-remind.tmux | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/main.sh b/scripts/main.sh index 105381b..37519cb 100755 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -16,11 +16,20 @@ get_tmux_option() { # Esempio: leggi configurazione utente # my_option=$(get_tmux_option "@plugin_option" "default_value") -main() { +function show_reminders { tput civis trap "tput cnorm" EXIT + tmux display-popup -T "Impegni di oggi…" -w 50% -h 50% -x C -y C -E # -- "$CURRENT_DIR/scripts/main.sh" rem -m -b1 -gaa -q -aa -iinclude_todo=1 -@2 read -r } -main +function main { + if [ "$1" == "reminders" ]; then + show_reminders + else + show_popup + fi +} + +main "$@" diff --git a/tmux-remind.tmux b/tmux-remind.tmux index b4c8422..c644b41 100755 --- a/tmux-remind.tmux +++ b/tmux-remind.tmux @@ -4,4 +4,6 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # "$CURRENT_DIR/scripts/main.sh" -tmux bind-key -T prefix r display-popup -T "Impegni di oggi…" -w 50% -h 50% -x C -y C -E -- "$CURRENT_DIR/scripts/main.sh" +# tmux bind-key -T prefix r display-popup -T "Impegni di oggi…" -w 50% -h 50% -x C -y C -E -- "$CURRENT_DIR/scripts/main.sh" + +tmux bind-key -T prefix r run-shell "$CURRENT_DIR/scripts/main.sh reminders"