Add script updates

main
rwxrob 2 years ago
parent cc2cfc1358
commit d6058fb9e2

@ -152,6 +152,10 @@ shopt -s extglob
#shopt -s nullglob # bug kills completion for some #shopt -s nullglob # bug kills completion for some
#set -o noclobber #set -o noclobber
# -------------------------- stty annoyances -------------------------
stty stop undef # disable control-s accidental terminal stops
# ------------------------------ history ----------------------------- # ------------------------------ history -----------------------------
export HISTCONTROL=ignoreboth export HISTCONTROL=ignoreboth
@ -186,7 +190,7 @@ __ps1() {
[[ -n "$B" ]] && B="$g($b$B$g)" [[ -n "$B" ]] && B="$g($b$B$g)"
short="$u\u$g$PROMPT_AT$h\h$g:$w$dir$B$p$P$x " 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 " 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 if (( ${#countme} > PROMPT_MAX )); then
@ -222,11 +226,10 @@ alias chmox='chmod +x'
alias sshh='sshpass -f $HOME/.sshpass ssh ' alias sshh='sshpass -f $HOME/.sshpass ssh '
alias temp='cd $(mktemp -d)' alias temp='cd $(mktemp -d)'
alias view='vi -R' # which is usually linked to vim 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 clear='printf "\e[H\e[2J"'
alias c='printf "\e[H\e[2J"'
alias coin="clip '(yes|no)'" alias coin="clip '(yes|no)'"
alias grep="pcregrep" alias grep="pcregrep"
alias minidockenv=". <(minikube docker-env)"
alias top=bashtop alias top=bashtop
alias iam=live alias iam=live

@ -3,7 +3,7 @@ what="$*"
if [[ -z "${what}" ]]; then if [[ -z "${what}" ]]; then
what="in a bit" what="in a bit"
elif [[ $what =~ ^([0-9]+) ]]; then 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 fi
echo "$what" > ~/.break echo "$what" > ~/.break
exec bannerfish "back $what" exec bannerfish "back $what"

@ -0,0 +1,3 @@
#!/bin/sh
exec go1.18beta2 "$@"

@ -13,14 +13,13 @@ marquee() {
local -a timebar topicbar local -a timebar topicbar
#topic="$(topic)" topic="${topic#* }" #topic="$(topic)" topic="${topic#* }"
topic="$(head -1 ~/.currently)" topic="$(head -1 ~/.currently)"
#pomo="$(pomo)" pomo=${pomo%%m*} pomo=${pomo%%s*} pomo="$(pomo)"
#mode="$(iam mode emoji)" #mode="$(iam mode emoji)"
zet="zet:$(zet current)" zet="zet:$(zet current)"
time="$(date +"%A, %B %-e, %Y, %-H:%M %Z%0z")" time="$(date +"%A, %B %-e, %Y, %-H:%M %Z%0z")"
replay=$(printf "(%02d)" "$((20-$(date +"%S")%20))")
tilboost="$(countdown 11:11:11 May 4)" tilboost="$(countdown 11:11:11 May 4)"
[[ -n "$pomo" ]] && timebar+=("$pomo") #[[ -n "$pomo" ]] && timebar+=("$pomo")
[[ -n "$pomo" ]] && topicbar+=("$pomo") #[[ -n "$pomo" ]] && topicbar+=("$pomo")
[[ -n "$time" ]] && timebar+=("$time") [[ -n "$time" ]] && timebar+=("$time")
[[ -n "$topic" ]] && topicbar+=("$topic") [[ -n "$topic" ]] && topicbar+=("$topic")
timebarb="${timebar[*]}" timebarb="${timebar[*]}"
@ -28,12 +27,13 @@ marquee() {
topicremain=$(( $(tput cols) - ${#topicbarb} )) topicremain=$(( $(tput cols) - ${#topicbarb} ))
timeremain=$(( $(tput cols) - ${#timebarb} )) timeremain=$(( $(tput cols) - ${#timebarb} ))
topicspace=$(( topicremain - ${#mode} - ${#zet})) topicspace=$(( topicremain - ${#mode} - ${#zet}))
timespace=$(( timeremain - ${#mode} - ${#zet} - ${#tilboost} - 5)) timespace=$(( timeremain - ${#mode} - ${#zet} - ${#tilboost}))
#if (( $(date +%s)%20 < 10 ));then #if (( $(date +%s)%20 < 10 ));then
#echo "$topicbarb $(repeat $' ' "$topicspace") rwxrob.tv" #echo "$topicbarb $(repeat $' ' "$topicspace") rwxrob.tv"
#else #else
#echo "$mode $timebarb $(repeat $' ' "$timespace") rwxrob.tv $zet" #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 #fi
} }

@ -17,8 +17,9 @@ $_ = shift;
if (not $_) { if (not $_) {
my $gh = (grep {/github/ && s,git@,, && s,:,/, && s/\.git$//} my $gh = (grep {/github/ && s,git@,, && s,:,/, && s/\.git$//}
qx{git remote get-url --all origin})[0]; qx{git remote get-url --all origin})[0];
# $gh and exec 'firefox', '-new-window', "https://$gh"; if ($gh) {
$gh and exec 'google-chrome', "https://$gh"; exec 'gh', 'repo', 'view','--web'
}
} }
# markdown file # markdown file

@ -2,14 +2,9 @@
seconds="$1" seconds="$1"
[[ -z "$seconds" ]] && echo "usage: $0 SECONDS" && exit 1 [[ -z "$seconds" ]] && echo "usage: $0 SECONDS" && exit 1
days=$((seconds/86400)) days=$((seconds/86400))
out=""
(( days > 0 )) && out="${days}."
(( seconds -= (days*86400) )) (( seconds -= (days*86400) ))
hours=$((seconds/3600)) hours=$((seconds/3600))
(( hours > 0 )) && out+="${hours}."
(( seconds -= (hours*3600) )) (( seconds -= (hours*3600) ))
minutes=$((seconds/60)) minutes=$((seconds/60))
(( minutes > 0 )) && out+="${minutes}."
(( seconds -= (minutes*60) )) (( seconds -= (minutes*60) ))
out+="$seconds" printf "%i.%02i.%02i.%02i" "$days" "$hours" "$minutes" "$seconds"
echo "$out"

@ -1,5 +1,4 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# ^^^ only because this is a rapid prototype
# This is an unoptimized prototype with lots of subshells in preparation # This is an unoptimized prototype with lots of subshells in preparation
# for port to Go eventually. In other words, this just works for now. # for port to Go eventually. In other words, this just works for now.

@ -12,8 +12,9 @@ set -g status-interval 1
set -g status-bg default set -g status-bg default
set -g status-justify centre set -g status-justify centre
set -g status-right "" set -g status-right "#(pomo) "
set -g status-right-style "fg=#928374,bold" #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-length 100
set -g status-left "#(marquee)" set -g status-left "#(marquee)"
set -g status-left-style "fg=#665c54" set -g status-left-style "fg=#665c54"

Loading…
Cancel
Save