From 2ab0fade3ca1f2e7b83463fbfbd696a92e416adc Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Mon, 25 Apr 2022 12:19:53 +0200 Subject: [PATCH] Removed bartib, now using tt-time-tracker --- install/2_cli-tools.sh | 2 +- other/bartib.status.zsh | 10 ---------- other/tt-time-tracker.status.zsh | 11 +++++++++++ starship.toml | 6 +++--- zsh/exports.zsh | 5 ++--- 5 files changed, 17 insertions(+), 17 deletions(-) delete mode 100755 other/bartib.status.zsh create mode 100755 other/tt-time-tracker.status.zsh diff --git a/install/2_cli-tools.sh b/install/2_cli-tools.sh index 04ffde9d..74ea7818 100755 --- a/install/2_cli-tools.sh +++ b/install/2_cli-tools.sh @@ -35,7 +35,7 @@ ln -s ~/dotfiles/spotifyd.toml ~/.config/spotifyd/spotifyd.conf npm install -g fkill-cli npm install -g trash-cli pip install tiptop -cargo install bartib +pip install tt-time-tracker # install fzf /opt/homebrew/opt/fzf/install diff --git a/other/bartib.status.zsh b/other/bartib.status.zsh deleted file mode 100755 index 1be6e59a..00000000 --- a/other/bartib.status.zsh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env zsh -# -current=$(bartib current) -lines=$(echo "$current" | wc -l) - -if [ "$lines" -gt 1 ]; then - line=$(bartib current | sed -n 3p) - words=(`echo $line | sed 's/ /\n/g'`) - echo " $words[-2]" -fi diff --git a/other/tt-time-tracker.status.zsh b/other/tt-time-tracker.status.zsh new file mode 100755 index 00000000..7d198fd1 --- /dev/null +++ b/other/tt-time-tracker.status.zsh @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh +TMPFILE=$(mktemp) + +tt --no-color status &> $TMPFILE +local current=$(cat $TMPFILE) + +if [[ $current = 'You have been working on '* ]]; then + local currTemp=${current:s/You have been working on //} + local project=$(echo $currTemp | head -n1 | cut -d " " -f1) + echo " $project" +fi diff --git a/starship.toml b/starship.toml index 73ca9e04..615220be 100644 --- a/starship.toml +++ b/starship.toml @@ -6,9 +6,9 @@ min_time = 5_000 [directory] truncation_length = 6 -[custom.bartib] -command = "~/Dotfiles/other/bartib.status.zsh" # shows output of command +[custom.tttimetracker] +command = "~/Dotfiles/other/tt-time-tracker.status.zsh" # shows output of command when = "" symbol = "" style = "bold blue" -format = "[$symbol($output)]($style)" +format = "[$symbol($output)]($style) " diff --git a/zsh/exports.zsh b/zsh/exports.zsh index abf2aa74..350f37ab 100644 --- a/zsh/exports.zsh +++ b/zsh/exports.zsh @@ -12,7 +12,6 @@ export PAGER="less -F -i -J -M -R -W -x2 -X -z-4" export PATH=/opt/homebrew/bin:$PATH export PATH=/opt/homebrew/sbin:$PATH export PATH=/opt/homebrew/opt/curl/bin:$PATH -export PATH=/Users/webgefrickel/.cargo/bin:$PATH export SHELL=/opt/homebrew/bin/zsh export TERM=xterm-256color export VISUAL="/opt/homebrew/bin/nvim" @@ -42,5 +41,5 @@ export FZF_DEFAULT_COMMAND="rg --files --hidden --follow --glob '!.git'" # n node version management export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" # Added by n-install (see http://git.io/n-install-repo). -# bartib for time tracking -export BARTIB_FILE="/Users/webgefrickel/Documents/tracking.bartib" +# tt-time-tracker +export SHEET_FILE='/Users/webgefrickel/Documents/tt-time-tracker.json'