diff --git a/install/2_cli-tools.sh b/install/2_cli-tools.sh index 04ffde9..74ea781 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 1be6e59..0000000 --- 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 0000000..7d198fd --- /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 73ca9e0..615220b 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 abf2aa7..350f37a 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'