this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Better TMuxline theming

+12 -10
+12 -10
bin/tmux-airline
··· 1 1 #!/bin/bash 2 2 3 - SEP=$(echo -e "\ue0b2") 4 - SEPE=$(echo -e "\ue0b3") 3 + SEP= 4 + SEPE= 5 5 6 - CLOCK=$(echo -e "\u23f0") 7 - MUSIC=$(echo -e "\u266b") 6 + MUSIC_ICO=♫ 8 7 9 8 WIDTH="${1}" 10 9 11 10 SMALL=80 12 11 MEDIUM=140 13 12 14 - if [ "$WIDTH" -gt "$MEDIUM" ]; then 15 - if type mpc >/dev/null; then 16 - MPD="#[fg=colour15,bg=default,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour15,bold,noitalics,nounderscore] $MUSIC $(mpc current)" 13 + if [ "0$WIDTH" -gt "0$MEDIUM" ]; then 14 + state=`osascript -e 'tell application "iTunes" to player state as string'`; 15 + if [ $state = "playing" ]; then 16 + artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`; 17 + track=`osascript -e 'tell application "iTunes" to name of current track as string'`; 18 + MUSIC="#[fg=colour15]$artist: $track"; 17 19 fi 18 20 fi 19 21 20 - if [ "$WIDTH" -ge "$SMALL" ]; then 21 - UNAME="#[fg=colour15,bg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour15,bold,noitalics,nounderscore] $(uname -n)" 22 + if [ "0$WIDTH" -ge "0$SMALL" ]; then 23 + UNAME="#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour15,bg=colour00,bold,noitalics,nounderscore] $(uname -n)" 22 24 fi 23 25 24 26 DATE="#[fg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore] $(date +'%d.%m.%y')" 25 27 TIME="#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore]$SEPE#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore] $(date +'%H:%M')" 26 28 27 - echo "$MPD $DATE $TIME $UNAME " | sed 's/ *$/ /g' 29 + echo "$MUSIC $DATE $TIME $UNAME " | sed 's/ *$/ /g'