fix plugin installation

This commit is contained in:
2025-09-09 22:21:09 +02:00
parent d962c87fe3
commit 7da6746d0e
4 changed files with 24 additions and 44 deletions

18
plugin.tmux Normal file → Executable file
View File

@@ -1,12 +1,14 @@
#!/usr/bin/env bash
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# tmux bind-key T run-shell "$CURRENT_DIR/scripts/tmux_list_plugins.sh"
# Binary bauen (still). Wenn go fehlt: überspringen
run-shell "cd '#{plugin_path}' && GO111MODULE=on go mod tidy >/dev/null 2>&1 || true"
run-shell "cd '#{plugin_path}' && GO111MODULE=on go build -ldflags='-s -w' -o bin.sysusage ./cmd/monitor >/dev/null 2>&1 || true"
tmux run-shell "cd $CURRENT_DIR && GO111MODULE=on go mod tidy >/dev/null 2>&1 || true"
tmux run-shell "cd $CURRENT_DIR && GO111MODULE=on go build -ldflags='-s -w' -o bin.sysusage ./cmd/monitor >/dev/null 2>&1 || true"
# tmux-Variable setzen: #{sysusage}
set -g @sysusage_cmd '#{plugin_path}/bin.sysusage'
set -g status-interval 2
# Du kannst später im Theme einfach schreiben:
# set -g status-right "... #{sysusage} ..."
set -g -F @sysusage '#(@sysusage_cmd)'
tmux set -g @sysusage_cmd "$CURRENT_DIR/bin.sysusage"
tmux set -g status-interval 2