aboutsummaryrefslogtreecommitdiff
path: root/base/tmux/status
diff options
context:
space:
mode:
Diffstat (limited to 'base/tmux/status')
-rwxr-xr-xbase/tmux/status19
1 files changed, 18 insertions, 1 deletions
diff --git a/base/tmux/status b/base/tmux/status
index e96d10c..6643d46 100755
--- a/base/tmux/status
+++ b/base/tmux/status
@@ -6,6 +6,13 @@ if [[ "$1" = "toggle-task" ]]; then
else
tmux setenv TMUX_SHOW_TASK 1
fi
+
+elif [[ "$1" = "toggle-hint" ]]; then
+ if tmux showenv TMUX_SHOW_HINT &>/dev/null; then
+ tmux setenv -u TMUX_SHOW_HINT
+ else
+ tmux setenv TMUX_SHOW_HINT 1
+ fi
fi
STATUS="#[bg=colour$HOST_COLOR]#[fg=black] $SHORT_HOSTNAME"
@@ -22,12 +29,22 @@ if tmux showenv TMUX_SHOW_TASK &>/dev/null; then
rc.report.x.sort=start-,urgency- x | head -n1 | xargs)"
if [[ "$TASKCTX" ]]; then
- TASKCOUNT="#[fg=colour19]#[bg=colour19,fg=colour7] $TASKCTX: $TASKCOUNT #[fg=colour18]#[bg=colour18]#[fg=colour20]"
+ TASKCOUNT="#[fg=colour19]#[bg=colour19,fg=colour7] $TASKCTX: $TASKCOUNT #[fg=colour18]#[fg=colour20,bg=colour18]"
else
TASKCOUNT="#[fg=colour8]#[fg=colour20] $TASKCOUNT #[fg=colour8]#[fg=colour20]"
fi
TASKLINE="$TASKCOUNT $TOPTASK. $(task $TASKCFG _get ${TOPTASK}.description) "
+
+elif tmux showenv TMUX_SHOW_HINT &>/dev/null; then
+ HINTF="$(dirname "$0")/hint"
+ HINTS="${HINTF}s"
+ if [[ "$(find "$HINTF" -mmin +2)" ]]; then
+ grep -v '^//' "$HINTS"* | shuf | head -n1 >"$HINTF"
+ fi
+
+ TASKLINE="$(cat "$HINTF")"
+
else TASKLINE=""; fi
STATUS="$TASKLINE#[fg=colour19]#[bg=colour19,fg=colour7] %a %m.%d %R"