diff --git a/bindings.zsh b/bindings.zsh index 4709329..c6c286c 100644 --- a/bindings.zsh +++ b/bindings.zsh @@ -31,8 +31,8 @@ key[Control-Right]="${terminfo[kRIT5]:-^[[1;5C}" [[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history [[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history [[ -n "${key[ShiftTab]}" ]] && bindkey -- "${key[ShiftTab]}" reverse-menu-complete -[[ -n "${key[Control-Left]}" ]] && bindkey -- "${key[Control-Left]}" backward-word -[[ -n "${key[Control-Right]}" ]] && bindkey -- "${key[Control-Right]}" forward-word +[[ -n "${key[Control-Left]}" ]] && bindkey -- "${key[Control-Left]}" vi-backward-word +[[ -n "${key[Control-Right]}" ]] && bindkey -- "${key[Control-Right]}" vi-forward-word bindkey ' ' magic-space diff --git a/custom.zsh b/custom.zsh index db52bf3..402c95d 100644 --- a/custom.zsh +++ b/custom.zsh @@ -1,8 +1,7 @@ source "${ZDOTDIR}/custom/prependsudo.zsh" source "${ZDOTDIR}/custom/aliases.zsh" -source "${ZDOTDIR}/custom/gpg.zsh" fpath+=("${ZDOTDIR}/custom/functions" "${ZDOTDIR}/custom/segments") compdef _files mplay -function {prompt_c_{covid_19,docker_host,mpv,new_mail,todo,weather,newsboat,mumble,sfeed},cprompts:cache:async:{covid,weather,rss},get{gbooru,mangareader,nhentai},gitsubrepo,osutab,prettygitlog,paste,mplay,qff,recordscreen,{send,format}irc}() { +function {prompt_c_{covid_19,docker_host,mpv,new_mail,todo,weather,newsboat,mumble,sfeed},cprompts:cache:async:{covid,weather,rss},get{gbooru,mangareader,nhentai},gitsubrepo,osutab,prettygitlog,paste,mplay,qff,recordscreen,sendirc}() { autoload -X } diff --git a/custom/aliases.zsh b/custom/aliases.zsh index 16bed39..3965614 100644 --- a/custom/aliases.zsh +++ b/custom/aliases.zsh @@ -1,4 +1,2 @@ alias ytdldown='youtube-dl --no-part --newline -ixcw -R infinite -f bestaudio/best --add-metadata --embed-thumbnail -o "/home/caskd/Media/Music/%(album)s/%(track_number)s - %(track)s.%(ext)s"' alias ls='ls --color=auto' -alias grep='grep --color=auto' -alias diff='diff --color=auto' diff --git a/custom/functions/formatirc b/custom/functions/formatirc deleted file mode 100644 index 1844e5d..0000000 --- a/custom/functions/formatirc +++ /dev/null @@ -1,9 +0,0 @@ -local -A colormap -while read LINE; do - NICK="${${${=LINE#:}[1]%\!*}#:}" - CHAN="${${=LINE#:}[3]}" - RANDS=($RANDOM $RANDOM) - [ -z $colormap["$NICK"] ] && colormap["$NICK"]=${(%)$(<<< %F\{$(( $RANDS[1] % 6 + 1 ))\} )} - [ -z $colormap["$CHAN"] ] && colormap["$CHAN"]=${(%)$(<<< %F\{$(( $RANDS[2] % 6 + 1 ))\} )} - <<< "${colormap["$CHAN"]}${(l:10:)${CHAN}:0:10}${(%)$(<<< %F\{default\})} | ${colormap["$NICK"]}${(l:14:)${NICK}:0:14}${(%)$(<<< %F\{default\})} | ${${=LINE#:}[4,-1]#:}"; -done diff --git a/custom/functions/recordscreen b/custom/functions/recordscreen index a444a0c..99f7805 100644 --- a/custom/functions/recordscreen +++ b/custom/functions/recordscreen @@ -1 +1,6 @@ -ffmpeg -hwaccel vdpau -y -filter_threads 4 -v warning -thread_queue_size 8 -f pulse -i default -video_size 1920x1080 -framerate 60 -thread_queue_size 8 -f x11grab -i :0 -c:v h264 -crf 30 -preset ultrafast -movflags +faststart -tune zerolatency $1 +ffmpeg -y \ + -vaapi_device /dev/dri/renderD128 \ + -video_size 1920x1080 -framerate 60 \ + -f x11grab -i :0+1080 \ + -vf 'format=p010,hwupload,scale_vaapi=format=nv12' -c:v hevc_vaapi -b:v 15M \ + $1 diff --git a/custom/functions/sendirc b/custom/functions/sendirc index 64060dc..02939e3 100644 --- a/custom/functions/sendirc +++ b/custom/functions/sendirc @@ -1,2 +1,2 @@ -([ -z $1 ] || [ -z $2 ]) && return -printf "PRIVMSG %s :%s\r\n" "$1" "${argv[2,-1]}" +([ -z $1 ] || [ -z $2 ] || [ -z $3 ]) && return +printf "PRIVMSG %s :%s\r\n" "$1" "${argv[3]}" | ssh n1 "> ~/IRC/$2/global/in" diff --git a/custom/gpg.zsh b/custom/gpg.zsh deleted file mode 100644 index e5e18b5..0000000 --- a/custom/gpg.zsh +++ /dev/null @@ -1,7 +0,0 @@ -# GPG SSH -if [ ! -v SSH_AUTH_SOCK ]; then - unset SSH_AGENT_PID - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - export GPG_TTY=$TTY - gpg-connect-agent updatestartuptty /bye >/dev/null -fi diff --git a/custom/segments/prompt_c_irc_mentions b/custom/segments/prompt_c_irc_mentions deleted file mode 100644 index d45663d..0000000 --- a/custom/segments/prompt_c_irc_mentions +++ /dev/null @@ -1,5 +0,0 @@ -ROOT=~/IRC -[ -r $ROOT ] || return -for i in $ROOT/*/channels/*; do - if [ ${stats[1]:-0} -lt $(($epochtime[1]-86400)) ]; then -done