From 73458a747ececcc05c794672a0549ba335ba1437 Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Tue, 12 Apr 2022 16:31:29 +0200 Subject: [PATCH] Bartib and starship integration --- etc/hosts | 4 ++-- other/bartib.status.zsh | 10 ++++++++++ starship.toml | 6 ++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 other/bartib.status.zsh diff --git a/etc/hosts b/etc/hosts index ed83b269..b0f43f37 100644 --- a/etc/hosts +++ b/etc/hosts @@ -8,8 +8,8 @@ 255.255.255.255 broadcasthost ::1 localhost -127.0.0.1 youtube.com -127.0.0.1 www.youtube.com +#127.0.0.1 youtube.com +#127.0.0.1 www.youtube.com 127.0.0.1 reddit.com 127.0.0.1 www.reddit.com 127.0.0.1 tagesschau.de diff --git a/other/bartib.status.zsh b/other/bartib.status.zsh new file mode 100755 index 00000000..1be6e59a --- /dev/null +++ b/other/bartib.status.zsh @@ -0,0 +1,10 @@ +#!/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/starship.toml b/starship.toml index 0b6f76d1..73ca9e04 100644 --- a/starship.toml +++ b/starship.toml @@ -6,3 +6,9 @@ min_time = 5_000 [directory] truncation_length = 6 +[custom.bartib] +command = "~/Dotfiles/other/bartib.status.zsh" # shows output of command +when = "" +symbol = "" +style = "bold blue" +format = "[$symbol($output)]($style)"