feat: rewrite README in English, update plugin info, and localize scripts
- Rewrite README.md in English with detailed features, installation, usage, and configuration instructions - Update plugin name and repository references to "tmux-remind" - Change script comments and popup titles from Italian to English - Standardize less status line in show_calendar.sh to English
This commit is contained in:
60
README.md
60
README.md
@@ -1,38 +1,64 @@
|
||||
# Plugin Name
|
||||
# tmux-remind
|
||||
|
||||
Descrizione del plugin.
|
||||
A tmux plugin that integrates with [remind](https://dianne.skoll.ca/projects/remind/) to display reminders and calendar views in tmux popups.
|
||||
|
||||
## Installazione
|
||||
## Features
|
||||
|
||||
### Con TPM
|
||||
- **Quick Reminders View**: Display today's reminders in a centered popup (60% width/height)
|
||||
- **Calendar View**: Show a 2-week calendar overview in a full-screen popup (99% width/height)
|
||||
- Uses `less` for scrollable output with line position indicator
|
||||
|
||||
Aggiungi al tuo `~/.tmux.conf`:
|
||||
## Requirements
|
||||
|
||||
- [remind](https://dianne.skoll.ca/projects/remind/) - A sophisticated calendar and alarm program
|
||||
- tmux 3.2+ (for `display-popup` support)
|
||||
|
||||
## Installation
|
||||
|
||||
### With TPM (Tmux Plugin Manager)
|
||||
|
||||
Add to your `~/.tmux.conf`:
|
||||
|
||||
```bash
|
||||
set -g @plugin 'tuo-username/plugin-name'
|
||||
set -g @plugin 'your-username/tmux-remind'
|
||||
```
|
||||
|
||||
Ricarica tmux e premi `prefix + I` per installare.
|
||||
Reload tmux and press `prefix + I` to install.
|
||||
|
||||
### Manuale
|
||||
### Manual Installation
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tuo-username/plugin-name ~/.tmux/plugins/plugin-name
|
||||
git clone https://github.com/your-username/tmux-remind ~/.tmux/plugins/tmux-remind
|
||||
```
|
||||
|
||||
Aggiungi a `~/.tmux.conf`:
|
||||
Add to your `~/.tmux.conf`:
|
||||
|
||||
```bash
|
||||
run-shell ~/.tmux/plugins/plugin-name/plugin-name.tmux
|
||||
run-shell ~/.tmux/plugins/tmux-remind/tmux-remind.tmux
|
||||
```
|
||||
|
||||
## Configurazione
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Opzione esempio (default: "value")
|
||||
set -g @plugin_option "custom_value"
|
||||
```
|
||||
The plugin provides two keybindings:
|
||||
|
||||
## Licenza
|
||||
| Keybinding | Action |
|
||||
|------------|--------|
|
||||
| `prefix + r` | Show today's reminders in a popup |
|
||||
| `prefix + c` | Show 2-week calendar in a popup |
|
||||
|
||||
### Navigation
|
||||
|
||||
Both views use `less` for navigation:
|
||||
|
||||
- `j` / `k` or arrow keys to scroll
|
||||
- `q` to close the popup
|
||||
- `/` to search
|
||||
- `g` to go to top, `G` to go to bottom
|
||||
|
||||
## Configuration
|
||||
|
||||
The plugin uses your default `remind` configuration. Make sure you have your `.reminders` file set up in your home directory or configure remind accordingly.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Funzione per leggere opzioni tmux con default
|
||||
# Function to read tmux options with default values
|
||||
get_tmux_option() {
|
||||
local option="$1"
|
||||
local default_value="$2"
|
||||
@@ -18,23 +17,23 @@ get_tmux_option() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Esempio: leggi configurazione utente
|
||||
# Example: read user configuration
|
||||
# my_option=$(get_tmux_option "@plugin_option" "default_value")
|
||||
|
||||
function get_italian_datetime {
|
||||
function get_datetime {
|
||||
date "+%d/%m/%Y %H:%M"
|
||||
}
|
||||
|
||||
function show_reminders {
|
||||
local datetime
|
||||
datetime=$(get_italian_datetime)
|
||||
tmux display-popup -T "#[align=centre]Impegni di oggi - $datetime" -w 60% -h 60% -x C -y C -E -- "$CURRENT_DIR/show_reminders.sh"
|
||||
datetime=$(get_datetime)
|
||||
tmux display-popup -T "#[align=centre]Today's Reminders - $datetime" -w 60% -h 60% -x C -y C -E -- "$CURRENT_DIR/show_reminders.sh"
|
||||
}
|
||||
|
||||
function show_calendar {
|
||||
local datetime
|
||||
datetime=$(get_italian_datetime)
|
||||
tmux display-popup -T "#[align=centre]Prossime 2 settimane - $datetime" -w 99% -h 99% -x C -y C -E -- "$CURRENT_DIR/show_calendar.sh"
|
||||
datetime=$(get_datetime)
|
||||
tmux display-popup -T "#[align=centre]Next 2 Weeks - $datetime" -w 99% -h 99% -x C -y C -E -- "$CURRENT_DIR/show_calendar.sh"
|
||||
}
|
||||
|
||||
function main {
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
export LESSCHARSET=utf-8
|
||||
TERM_WIDTH=$(tput cols)
|
||||
rem -m -cu+2 -b1 -gaa -q -@2 --hide-completed-todos -w"$TERM_WIDTH" | less -r +g --status-line -PM"Riga %lt/%L (%Pb\%)"
|
||||
rem -m -cu+2 -b1 -gaa -q -@2 --hide-completed-todos -w"$TERM_WIDTH" | less -r +g --status-line -PM"Line %lt/%L (%Pb\%)"
|
||||
|
||||
Reference in New Issue
Block a user