X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.zsh_functions;h=ae295da778fb5a9793531cb75c1390236db0a9ed;hb=788ddb6f9a7a53d3b88a984bc366c11c88b2c3de;hp=181d4ba6b3d7495e089b6e58f3391ebba3875025;hpb=46be02ebebf027daba5aafa8efb19afaecce2ccf;p=user%2Fhenk%2Fvcsh%2Fzsh.git diff --git a/.zsh_functions b/.zsh_functions index 181d4ba..ae295da 100644 --- a/.zsh_functions +++ b/.zsh_functions @@ -1,49 +1,49 @@ -function info_print () { - local esc_begin esc_end - esc_begin="$1" - esc_end="$2" - shift 2 - printf '%s' ${esc_begin} - printf '%s' "$*" - printf '%s' "${esc_end}" -} - -function set_title () { - info_print $'\e]0;' $'\a' "$@" -} - -function ESC_print () { - info_print $'\ek' $'\e\\' "$@" -} - -preexec () { - case $TERM in - (xterm*|rxvt*) - set_title "${(%):-"%n@%m:"}" "$1" - ;; - (screen*) - local CMD=${1[(wr)^(*=*|sudo|ssh|evince|-*)]} - ESC_print ${CMD} - ;; - esac -} - -precmd () { - case $TERM in - (xterm*|rxvt*) - set_title ${(%):-"%n@%m: %~"} - ;; - (screen*) - ESC_print "zsh" - ;; - esac - - vcs_info - -# local INBOXINFO="$(task rc.gc=off rc.verbose=nothing +in +PENDING count) " - - PS1="${HENKSPROMPTHEADER}%(0?..%F{red}E%?%f )%(1j.%F{yellow}J%j%f .)%(3L.%F{yellow}L%L%f .)%3~ %F{green}$VCSH_REPO_NAME%f%F{yellow}${vcs_info_msg_0_}%f%# " -} +#function info_print () { +# local esc_begin esc_end +# esc_begin="$1" +# esc_end="$2" +# shift 2 +# printf '%s' ${esc_begin} +# printf '%s' "$*" +# printf '%s' "${esc_end}" +#} +# +#function set_title () { +# info_print $'\e]0;' $'\a' "$@" +#} +# +#function ESC_print () { +# info_print $'\ek' $'\e\\' "$@" +#} +# +#preexec () { +# case $TERM in +# (xterm*|rxvt*) +# set_title "${(%):-"%n@%m:"}" "$1" +# ;; +# (screen*) +# local CMD=${1[(wr)^(*=*|sudo|ssh|evince|-*)]} +# ESC_print ${CMD} +# ;; +# esac +#} +# +#precmd () { +# case $TERM in +# (xterm*|rxvt*) +# set_title ${(%):-"%n@%m: %~"} +# ;; +# (screen*) +# ESC_print "zsh" +# ;; +# esac +# +# vcs_info +# +## local INBOXINFO="$(task rc.gc=off rc.verbose=nothing +in +PENDING count) " +# +# PS1="${HENKSPROMPTHEADER}%(0?..%F{red}E%?%f )%(1j.%F{yellow}J%j%f .)%(3L.%F{yellow}L%L%f .)%3~ %F{green}$VCSH_REPO_NAME%f%F{yellow}${vcs_info_msg_0_}%f%# " +#} function vifind () { vi $( find $@) @@ -62,9 +62,10 @@ function henkspngpostproc () { shift for img in $* do - mkdir -p resized/pngnqed + mkdir -p resized/pngnqed/optipnged convert -resize $resize_by% $img resized/$img pngnq -f -d resized/pngnqed -e .png resized/$img + optipng -out resized/pngnqed/optipnged/$img resized/pngnqed/$img done } @@ -76,3 +77,14 @@ function with () { vared str && eval $str done } + +function stardewpause () { + while read bar + do + xdotool \ + search --class 'StardewValley' \ + windowactivate --sync \ + type --delay 100 t/pause + done +} +