diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/powerline.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/powerline.sh b/scripts/powerline.sh index 8baf3f2..5dd6cb5 100755 --- a/scripts/powerline.sh +++ b/scripts/powerline.sh @@ -4,7 +4,13 @@ LS="" if [[ "$1" == "left" ]]; then echo -n "#[fg=colour235, bg=colour142] $(tmux display-message -p '#S') #[fg=colour142, bg=colour241]$LS#[default]" - echo -n "#[fg=colour223, bg=colour241] $(hostname) #[fg=colour241, bg=colour235]$LS#[default]" + if [[ -f "$HOME/journal.txt" ]]; then + LAST_ENTRY=$(tail -n 1 ~/journal.txt | awk '{ $1=""; print }' | cut -c2-40) + LAST_ENTRY+="..." + else + LAST_ENTRY=$(hostname) + fi + echo -n "#[fg=colour223, bg=colour241] $LAST_ENTRY #[fg=colour241, bg=colour235]$LS#[default]" fi if [[ "$1" == "right" ]]; then |