diff --git a/.bashrc b/.bashrc index 0f67cba..e941191 100644 --- a/.bashrc +++ b/.bashrc @@ -152,6 +152,10 @@ shopt -s extglob #shopt -s nullglob # bug kills completion for some #set -o noclobber +# -------------------------- stty annoyances ------------------------- + +stty stop undef # disable control-s accidental terminal stops + # ------------------------------ history ----------------------------- export HISTCONTROL=ignoreboth @@ -186,7 +190,7 @@ __ps1() { [[ -n "$B" ]] && B="$g($b$B$g)" short="$u\u$g$PROMPT_AT$h\h$g:$w$dir$B$p$P$x " - long="${g}╔ $u\u$g$PROMPT_AT$h\h$g:$w$dir$B\n${g}╚ $p$P$x " + long="$g╔ $u\u$g$PROMPT_AT$h\h$g:$w$dir$B\n$g╚ $p$P$x " double="$g╔ $u\u$g$PROMPT_AT$h\h$g:$w$dir\n$g║ $B\n$g╚ $p$P$x " if (( ${#countme} > PROMPT_MAX )); then @@ -222,11 +226,10 @@ alias chmox='chmod +x' alias sshh='sshpass -f $HOME/.sshpass ssh ' alias temp='cd $(mktemp -d)' alias view='vi -R' # which is usually linked to vim -alias c='printf "\e[H\e[2J"' alias clear='printf "\e[H\e[2J"' +alias c='printf "\e[H\e[2J"' alias coin="clip '(yes|no)'" alias grep="pcregrep" -alias minidockenv=". <(minikube docker-env)" alias top=bashtop alias iam=live diff --git a/scripts/back b/scripts/back index cbe67d5..ea9b245 100755 --- a/scripts/back +++ b/scripts/back @@ -3,7 +3,7 @@ what="$*" if [[ -z "${what}" ]]; then what="in a bit" elif [[ $what =~ ^([0-9]+) ]]; then - what="at $(date -d "${BASH_REMATCH[1]} minutes" +%-I:%M)" + what="at $(date -d "${BASH_REMATCH[1]} minutes" +%H:%M)" fi echo "$what" > ~/.break exec bannerfish "back $what" diff --git a/scripts/go b/scripts/go new file mode 100755 index 0000000..61c01b2 --- /dev/null +++ b/scripts/go @@ -0,0 +1,3 @@ +#!/bin/sh +exec go1.18beta2 "$@" + diff --git a/scripts/marquee b/scripts/marquee index 19e9704..0b72d74 100755 --- a/scripts/marquee +++ b/scripts/marquee @@ -13,14 +13,13 @@ marquee() { local -a timebar topicbar #topic="$(topic)" topic="${topic#* }" topic="$(head -1 ~/.currently)" - #pomo="$(pomo)" pomo=${pomo%%m*} pomo=${pomo%%s*} + pomo="$(pomo)" #mode="$(iam mode emoji)" zet="zet:$(zet current)" time="$(date +"%A, %B %-e, %Y, %-H:%M %Z%0z")" - replay=$(printf "(%02d)" "$((20-$(date +"%S")%20))") tilboost="$(countdown 11:11:11 May 4)" - [[ -n "$pomo" ]] && timebar+=("$pomo") - [[ -n "$pomo" ]] && topicbar+=("$pomo") + #[[ -n "$pomo" ]] && timebar+=("$pomo") + #[[ -n "$pomo" ]] && topicbar+=("$pomo") [[ -n "$time" ]] && timebar+=("$time") [[ -n "$topic" ]] && topicbar+=("$topic") timebarb="${timebar[*]}" @@ -28,12 +27,13 @@ marquee() { topicremain=$(( $(tput cols) - ${#topicbarb} )) timeremain=$(( $(tput cols) - ${#timebarb} )) topicspace=$(( topicremain - ${#mode} - ${#zet})) - timespace=$(( timeremain - ${#mode} - ${#zet} - ${#tilboost} - 5)) + timespace=$(( timeremain - ${#mode} - ${#zet} - ${#tilboost})) #if (( $(date +%s)%20 < 10 ));then #echo "$topicbarb $(repeat $' ' "$topicspace") rwxrob.tv" #else #echo "$mode $timebarb $(repeat $' ' "$timespace") rwxrob.tv $zet" - echo "$timebarb $replay [boost in $tilboost] $(repeat $' ' "$timespace") rwxrob.tv" + #echo "$timebarb $replay [boost in $tilboost] $(repeat $' ' "$timespace") rwxrob.tv" + echo "$timebarb [boost: $tilboost]" #fi } diff --git a/scripts/open b/scripts/open index 43ab852..ad5540f 100755 --- a/scripts/open +++ b/scripts/open @@ -17,8 +17,9 @@ $_ = shift; if (not $_) { my $gh = (grep {/github/ && s,git@,, && s,:,/, && s/\.git$//} qx{git remote get-url --all origin})[0]; - # $gh and exec 'firefox', '-new-window', "https://$gh"; - $gh and exec 'google-chrome', "https://$gh"; + if ($gh) { + exec 'gh', 'repo', 'view','--web' + } } # markdown file diff --git a/scripts/sec2dur b/scripts/sec2dur index f1bb6de..df19f99 100755 --- a/scripts/sec2dur +++ b/scripts/sec2dur @@ -2,14 +2,9 @@ seconds="$1" [[ -z "$seconds" ]] && echo "usage: $0 SECONDS" && exit 1 days=$((seconds/86400)) -out="" -(( days > 0 )) && out="${days}." (( seconds -= (days*86400) )) hours=$((seconds/3600)) -(( hours > 0 )) && out+="${hours}." (( seconds -= (hours*3600) )) minutes=$((seconds/60)) -(( minutes > 0 )) && out+="${minutes}." (( seconds -= (minutes*60) )) -out+="$seconds" -echo "$out" +printf "%i.%02i.%02i.%02i" "$days" "$hours" "$minutes" "$seconds" diff --git a/scripts/ws b/scripts/ws index 2882298..3016d87 100755 --- a/scripts/ws +++ b/scripts/ws @@ -1,5 +1,4 @@ #!/usr/bin/env perl -# ^^^ only because this is a rapid prototype # This is an unoptimized prototype with lots of subshells in preparation # for port to Go eventually. In other words, this just works for now. diff --git a/tmux/.tmux-live.conf b/tmux/.tmux-live.conf index 94cdb22..be4182d 100644 --- a/tmux/.tmux-live.conf +++ b/tmux/.tmux-live.conf @@ -12,8 +12,9 @@ set -g status-interval 1 set -g status-bg default set -g status-justify centre -set -g status-right "" -set -g status-right-style "fg=#928374,bold" +set -g status-right "#(pomo) " +#set -g status-right-style "fg=#928374,bold" +set -g status-right-style "fg=#665c54,bold" set -g status-left-length 100 set -g status-left "#(marquee)" set -g status-left-style "fg=#665c54"