Tweak some stuff and shorten some intervals
This commit is contained in:
parent
88249df682
commit
5069ed56c2
|
@ -1,6 +1,9 @@
|
||||||
ffmpeg -y \
|
ffmpeg -y \
|
||||||
|
-f pulse -i 1 \
|
||||||
-vaapi_device /dev/dri/renderD128 \
|
-vaapi_device /dev/dri/renderD128 \
|
||||||
-video_size 1920x1080 -framerate 60 \
|
-video_size 1920x1080 -framerate 60 \
|
||||||
-f x11grab -i :0+1080 \
|
-f x11grab -i :0+1080 \
|
||||||
-vf 'format=p010,hwupload,scale_vaapi=format=nv12' -c:v hevc_vaapi -b:v 15M \
|
-vf 'hwupload,scale_vaapi=format=nv12' \
|
||||||
|
-c:v hevc_vaapi -b:v 15M -qp 18 \
|
||||||
|
-c:a aac -b:a 64k -ar 24000 -ac 2 \
|
||||||
$1
|
$1
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
([ -z $1 ] || [ -z $2 ] || [ -z $3 ]) && return
|
([ -z $1 ] || [ -z $2 ] || [ -z $3 ]) && return
|
||||||
printf "PRIVMSG %s :%s\r\n" "$1" "${argv[3]}" | ssh n1 "> ~/IRC/$2/global/in"
|
printf "PRIVMSG %s :%s\r\n" "$1" "${argv[3]}" > ~/IRC/$2/global/in
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
local REPLY
|
||||||
|
zstyle -s ':custom:prompts:covid' country REPLY
|
||||||
typeset -g _cprompts_covid=($(curl -sL https://api.covid19api.com/country/${REPLY:-germany} | jq -e '. |= sort_by (.Date) | .[-1,-2].Active'))
|
typeset -g _cprompts_covid=($(curl -sL https://api.covid19api.com/country/${REPLY:-germany} | jq -e '. |= sort_by (.Date) | .[-1,-2].Active'))
|
||||||
[ ! -z $_cprompts_covid[1] ] && <<< ${_cprompts_covid} > $tmpfile
|
[ ! -z $_cprompts_covid[1] ] && <<< ${_cprompts_covid} > $tmpfile
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
local -A icons
|
||||||
|
local -A colors
|
||||||
|
icons=([c]='' [lc]='' [hc]='' [s]='🌢' [lr]='🌢' [hr]='' [sn]='' [t]='' [h]='' [sl]='')
|
||||||
|
colors=([c]="yellow" [lc]="yellow" [hc]="cyan" [s]="yellow" [lr]="cyan" [hr]="blue" [t]="white" [h]="white" [sl]="blue" [sn]="white")
|
||||||
local REPLY
|
local REPLY
|
||||||
zstyle -s ':custom:prompts:weather' location REPLY
|
zstyle -s ':custom:prompts:weather' location REPLY
|
||||||
local result=$(curl -sL https://www.metaweather.com/api/location/${REPLY:-1339615}/ | jq -e '.consolidated_weather[0] | {"temp": .the_temp, "icon": .weather_state_abbr}')
|
local result=$(curl -sL https://www.metaweather.com/api/location/${REPLY:-1339615}/ | jq -e '.consolidated_weather[0] | {"temp": .the_temp, "icon": .weather_state_abbr}')
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
([ -v commands\[curl\] ] && [ -v commands\[jq\] ]) || return
|
([ -v commands\[curl\] ] && [ -v commands\[jq\] ]) || return
|
||||||
local tmpfile=${CACHEPATH}/covid
|
local tmpfile=${CACHEPATH}/covid
|
||||||
local REPLY
|
|
||||||
zstyle -s ':custom:prompts:covid' country REPLY
|
|
||||||
local -a stats
|
local -a stats
|
||||||
if [ ! -v _cprompts_covid ]; then
|
zstat -A stats +mtime -- $tmpfile 2>/dev/null
|
||||||
zstat -A stats +mtime -- $tmpfile 2>/dev/null
|
if [ ${stats[1]:-0} -lt $(($epochtime[1]-43200)) ]; then
|
||||||
if [ ${stats[1]:-0} -lt $(($epochtime[1]-86400)) ]; then
|
|
||||||
cprompts:cache:async:covid &!
|
cprompts:cache:async:covid &!
|
||||||
else
|
else
|
||||||
typeset -g _cprompts_covid=($(< $tmpfile))
|
typeset -g _cprompts_covid=($(< $tmpfile))
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
[ -v _cprompts_covid ] && p10k segment -b red -i '' -t "${_cprompts_covid[1]:-unknown} ($(( ${_cprompts_covid[1]:-0} - ${_cprompts_covid[2]:-0} )))"
|
[ -v _cprompts_covid ] && p10k segment -b red -i '' -t "${_cprompts_covid[1]:-unknown} ($(( ${_cprompts_covid[1]:-0} - ${_cprompts_covid[2]:-0} )))"
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
local REPLY
|
local REPLY
|
||||||
zstyle -s ':custom:prompts:mpv' socket REPLY
|
zstyle -s ':custom:prompts:mpv' socket REPLY
|
||||||
[ -S $REPLY ] && zsocket $REPLY 2>/dev/null || return
|
[ -S $REPLY ] && zsocket $REPLY 2>/dev/null || return
|
||||||
_cprompts_mpv[2]="${${$(print -u $REPLY '{ "command": ["get_property", "media-title"] }' && read -eEu $REPLY)#*\"data\"([^[:print:]])#:([^[:print:]])#\"}%%(\"~\\\")*}"
|
_cprompts_mpv[2]="${${$(\
|
||||||
|
print -u $REPLY '{ "command": ["get_property", "media-title"] }' && \
|
||||||
|
read -eEu $REPLY \
|
||||||
|
)#*\"data\"([^[:print:]])#:([^[:print:]])#\"}%%(\"~\\\")*}"
|
||||||
exec {REPLY}>&-
|
exec {REPLY}>&-
|
||||||
[ -z $_cprompts_mpv[2] ] || p10k segment -b magenta -i '' -t "${_cprompts_mpv[2]}"
|
[ -z $_cprompts_mpv[2] ] || p10k segment -b magenta -i '' -t "${_cprompts_mpv[2]}"
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
setopt local_options nomatch
|
setopt local_options nomatch
|
||||||
feedpath=~/.sfeed/feeds/
|
|
||||||
local tmpfile=$CACHEPATH/rss
|
local tmpfile=$CACHEPATH/rss
|
||||||
|
local feedpath=~/.sfeed/feeds/
|
||||||
[ -r $feedpath ] || return
|
[ -r $feedpath ] || return
|
||||||
local -a cache
|
local -a cache
|
||||||
|
|
||||||
zstat -A cache +mtime -- $tmpfile 2>/dev/null
|
zstat -A cache +mtime -- $tmpfile 2>/dev/null
|
||||||
([ ! -v _cprompts_sfeed ] || [ ${cache[1]:-0} -lt $(($epochtime[1] - 1800)) ]) && cprompts:cache:async:rss &!
|
([ ! -v _cprompts_sfeed ] || [ ${cache[1]:-0} -lt $(($epochtime[1] - 300)) ]) && cprompts:cache:async:rss &!
|
||||||
[ -r $tmpfile ] || return
|
[ -r $tmpfile ] || return
|
||||||
typeset -g _cprompts_sfeed=$(< $tmpfile)
|
typeset -g _cprompts_sfeed=$(< $tmpfile)
|
||||||
[ ${_cprompts_sfeed:-0} -ne 0 ] && p10k segment -b red -i '' -t "+${_cprompts_sfeed:-unknown}"
|
[ ${_cprompts_sfeed:-0} -ne 0 ] && p10k segment -b red -i '' -t "+${_cprompts_sfeed:-unknown}"
|
||||||
|
|
|
@ -1,37 +1,11 @@
|
||||||
([ -v commands\[curl\] ] && [ -v commands\[jq\] ]) || return
|
([ -v commands\[curl\] ] && [ -v commands\[jq\] ]) || return
|
||||||
local tmpfile=$CACHEPATH/weather
|
local tmpfile=$CACHEPATH/weather
|
||||||
|
|
||||||
local -a stats
|
local -a stats
|
||||||
|
zstat -A stats +mtime -- $tmpfile 2>/dev/null
|
||||||
# Fancy stuff
|
if [ ${stats[1]:-0} -lt $(($epochtime[1]-3600)) ]; then
|
||||||
local -A icons
|
|
||||||
local -A colors
|
|
||||||
icons[c]=''
|
|
||||||
colors[c]="yellow"
|
|
||||||
icons[lc]=''
|
|
||||||
colors[lc]="yellow"
|
|
||||||
icons[hc]=''
|
|
||||||
colors[hc]="cyan"
|
|
||||||
icons[s]='🌢'
|
|
||||||
colors[s]="yellow"
|
|
||||||
icons[lr]='🌢'
|
|
||||||
colors[lr]="cyan"
|
|
||||||
icons[hr]=''
|
|
||||||
colors[hr]="blue"
|
|
||||||
icons[t]=''
|
|
||||||
colors[t]="white"
|
|
||||||
icons[h]=''
|
|
||||||
colors[h]="white"
|
|
||||||
icons[sl]=''
|
|
||||||
colors[sl]="blue"
|
|
||||||
icons[sn]=''
|
|
||||||
colors[sn]="white"
|
|
||||||
|
|
||||||
if [ ! -v _cprompts_weather ]; then
|
|
||||||
zstat -A stats +mtime -- $tmpfile 2>/dev/null
|
|
||||||
if [ ${stats[1]:-0} -lt $(($epochtime[1]-3600)) ]; then
|
|
||||||
cprompts:cache:async:weather &!
|
cprompts:cache:async:weather &!
|
||||||
else
|
else
|
||||||
typeset -g _cprompts_weather=($(< $tmpfile))
|
typeset -g _cprompts_weather=($(< $tmpfile))
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
[ -v _cprompts_weather ] && p10k segment -b ${_cprompts_weather[2]:-white} -i ${_cprompts_weather[3]:-\?} -t "${_cprompts_weather[1]:-unknown}"
|
[ -v _cprompts_weather ] && p10k segment -b ${_cprompts_weather[2]:-white} -i ${_cprompts_weather[3]:-\?} -t "${_cprompts_weather[1]:-unknown}"
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
|
typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
|
||||||
typeset -g POWERLEVEL9K_STATUS_OK=false
|
typeset -g POWERLEVEL9K_STATUS_OK{,_PIPE}=false
|
||||||
typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
|
typeset -g POWERLEVEL9K_STATUS_ERROR{,_{SIGNAL,PIPE}}=true
|
||||||
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR=true
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
|
typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
|
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
|
typeset -g POWERLEVEL9K_STATUS_ERROR_{VISUAL,SIGNAL,PIPE}_IDENTIFIER_EXPANSION='✘'
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0
|
typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0
|
||||||
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL
|
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=N
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2
|
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2
|
||||||
typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL
|
typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=V
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4
|
typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4
|
||||||
typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE
|
typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=O
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3
|
typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3
|
||||||
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
|
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=I
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8
|
typeset -g POWERLEVEL9K_VI_MODE_INSERT_BACKGROUND=5
|
||||||
|
zle-line-init() { zle -K vicmd; }
|
||||||
|
zle -N zle-line-init
|
||||||
|
|
Loading…
Reference in New Issue