···1010SMALL=80
1111MEDIUM=140
12121313-if [ "0$WIDTH" -gt "0$MEDIUM" ]; then
1414- state=`osascript -e 'tell application "iTunes" to player state as string'`;
1515- if [ $state = "playing" ]; then
1616- artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`;
1717- track=`osascript -e 'tell application "iTunes" to name of current track as string'`;
1818- MUSIC="#[fg=colour15]$artist: $track";
1313+tmux-music() {
1414+ if [ "0$WIDTH" -gt "0$MEDIUM" ]; then
1515+ state=$(osascript -e 'tell application "iTunes" to player state as string');
1616+ if [ $state = "playing" ]; then
1717+ artist=$(osascsript -e 'tell application "iTunes" to artist of current track as string');
1818+ track=$(osascript -e 'tell application "iTunes" to name of current track as string');
1919+ echo "#[fg=colour15]$artist: $track";
2020+ fi
1921 fi
2020-fi
2222+}
21232222-if [ "0$WIDTH" -ge "0$SMALL" ]; then
2323- UNAME="#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour15,bg=colour00,bold,noitalics,nounderscore] $(uname -n)"
2424-fi
2424+tmux-uname() {
2525+ if [ "0$WIDTH" -ge "0$SMALL" ]; then
2626+ echo "#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour15,bg=colour00,bold,noitalics,nounderscore] $(uname -n)"
2727+ fi
2828+}
25292630DATE="#[fg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore] $(date +'%d.%m.%y')"
2731TIME="#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore]$SEPE#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore] $(date +'%H:%M')"
28322929-echo "$MUSIC $DATE $TIME $UNAME " | sed 's/ *$/ /g'
3333+echo "$(tmux-music) $DATE $TIME $(tmux-uname) " | sed 's/ *$/ /g'
+1-1
fish/completions/work.fish
···11-complete -x -c work -a '(find -L "$WORKSPACE" -depth -maxdepth 5 -type d -and -name .git -prune -and -not -path "*/\.cargo/*" -prune -print | sed -e "s:$WORKSPACE/*::" -e "s:/\.git::")'
11+complete -x -c work -a '(find "$WORKSPACE" -maxdepth 3 -type d -and -name .git -prune -print | sed -e "s:$WORKSPACE/*::" -e "s:/\.git::")'