First scaffolding
This commit is contained in:
38
README.md
38
README.md
@@ -0,0 +1,38 @@
|
||||
# Plugin Name
|
||||
|
||||
Descrizione del plugin.
|
||||
|
||||
## Installazione
|
||||
|
||||
### Con TPM
|
||||
|
||||
Aggiungi al tuo `~/.tmux.conf`:
|
||||
|
||||
```bash
|
||||
set -g @plugin 'tuo-username/plugin-name'
|
||||
```
|
||||
|
||||
Ricarica tmux e premi `prefix + I` per installare.
|
||||
|
||||
### Manuale
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tuo-username/plugin-name ~/.tmux/plugins/plugin-name
|
||||
```
|
||||
|
||||
Aggiungi a `~/.tmux.conf`:
|
||||
|
||||
```bash
|
||||
run-shell ~/.tmux/plugins/plugin-name/plugin-name.tmux
|
||||
```
|
||||
|
||||
## Configurazione
|
||||
|
||||
```bash
|
||||
# Opzione esempio (default: "value")
|
||||
set -g @plugin_option "custom_value"
|
||||
```
|
||||
|
||||
## Licenza
|
||||
|
||||
MIT
|
||||
28
scripts/main.sh
Executable file
28
scripts/main.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Funzione per leggere opzioni tmux con default
|
||||
get_tmux_option() {
|
||||
local option="$1"
|
||||
local default_value="$2"
|
||||
local option_value
|
||||
option_value=$(tmux show-option -gqv "$option")
|
||||
if [ -z "$option_value" ]; then
|
||||
echo "$default_value"
|
||||
else
|
||||
echo "$option_value"
|
||||
fi
|
||||
}
|
||||
|
||||
# Esempio: leggi configurazione utente
|
||||
# my_option=$(get_tmux_option "@plugin_option" "default_value")
|
||||
|
||||
main() {
|
||||
# Logica del plugin qui
|
||||
tmux display-message "Plugin caricato!"
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
|
||||
|
||||
# bash -c "tput civis; trap \"tput cnorm\" EXIT; rem -m -b1 -gaa -q -aa -iinclude_todo=1 -@2; read -r"
|
||||
12
tmux-remind.tmux
Executable file
12
tmux-remind.tmux
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Carica script principale
|
||||
"$CURRENT_DIR/scripts/main.sh"
|
||||
|
||||
# Esempio: binding di una key
|
||||
tmux bind-key -T prefix P run-shell "$CURRENT_DIR/scripts/main.sh"
|
||||
# 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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user