diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 01bdba1..c6d4644 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -136,11 +136,7 @@ if [[ -e "$ZSH_CONF/stderred/build/libstderred.so" ]]; then fi comp-source "$ZSH_CONF/alias.zsh" comp-source "$ZSH_CONF/functions.zsh" -comp-source "$ZSH_CONF/transfer.zsh" comp-source "$ZSH_CONF/zsh-autosuggestions/zsh-autosuggestions.zsh" -comp-source "$ZSH_CONF/completion.zsh" -# comp-source "$ZSH_CONF/zsh-async/async.zsh" -# async_init ### syntax-highlight > keys # syntax highlighting if [[ -e "$ZSH_CONF/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then @@ -163,11 +159,6 @@ elif command -v nano >/dev/null 2>&1; then export EDITOR=nano fi -# `sudo nano` won't work without this (?) -if [[ "$TERM" = "xterm-kitty" ]]; then - export TERM=xterm-256color -fi - ## https://www.tecmint.com/view-colored-man-pages-in-linux/ ## First seen in Fox Kiesters dotfiles export LESS_TERMCAP_mb=$'\e[1;32m' @@ -188,10 +179,6 @@ export LESSHISTFILE=- export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" export VIMINIT="let \$MYVIMRC=\"${XDG_CONFIG_HOME:-$HOME/.config}/vim/xdg.vim\" | source \$MYVIMRC" -## Setup asynchronous jobs -# async_start_worker msg_completion -# async_job msg_completion tg-completion - ## Setup zle zle_highlight=('paste:none') diff --git a/.config/zsh/plugins/completion.zsh b/.config/zsh/plugins/completion.zsh deleted file mode 100644 index 87e822c..0000000 --- a/.config/zsh/plugins/completion.zsh +++ /dev/null @@ -1,10 +0,0 @@ -## Author: druckdev -## Created: 2019-08-18 - -## TelegramCLI msg completion - function tg-completion() { - contactList=( $(telegram-cli -W -C -e "contact_list" | tail -n +9 | head -n -2 | grep -vE "(>>>|<<<|»»»|«««)" | sed 's/ /_/g; s/.*\[K//; s/(/\\(/g; s/)/\\)/g; s/"/\\"/g') ) - echo '#compdef msg' >! $ZSH_CONF/completion/_msg - echo >> $ZSH_CONF/completion/_msg - echo '_arguments "1::('"$contactList[*]"')"' >> $ZSH_CONF/completion/_msg - } diff --git a/.config/zsh/plugins/functions.zsh b/.config/zsh/plugins/functions.zsh index db937b6..e0b9283 100644 --- a/.config/zsh/plugins/functions.zsh +++ b/.config/zsh/plugins/functions.zsh @@ -34,27 +34,6 @@ function mkcd () { fi } -## Send a message over telegram by using the -e flag -function msg() { - if [[ $# -ge 2 ]]; then - telegram-cli -W -e "msg $*" | grep -E "${${*/ /.*}//_/ }" - # | grep -E "$(echo "$*" | sed 's/ /.*/; s/_/ /g')" - else - printf "\033[1;31mPlease specify a contact and a message.\n\033[0m" >&2 - fi -} - -## Execute tg -e command but cuts of the uninteresting parts -function tg() { - tg="telegram-cli" - if [[ "$1" = "-e" ]]; then - shift - $tg -N -W -e "$@" | tail -n +9 | head -n -2 - else - $tg -N -W "$@" - fi -} - ## Encode and decode qr-codes function qr() { if [[ $# -eq 1 && -r "$1" ]]; then diff --git a/.config/zsh/plugins/transfer.zsh b/.config/zsh/plugins/transfer.zsh deleted file mode 100644 index 66725b9..0000000 --- a/.config/zsh/plugins/transfer.zsh +++ /dev/null @@ -1,61 +0,0 @@ -# -# Defines transfer alias and provides easy command line file and folder sharing. -# -# Authors: -# Remco Verhoef -# - -curl --version 2>&1 > /dev/null -if [ $? -ne 0 ]; then - echo "Could not find curl." - return 1 -fi - -transfer() { - # check arguments - if [ $# -eq 0 ]; - then - echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" - return 1 - fi - - # get temporarily filename, output is written to this file show progress can be showed - tmpfile=$( mktemp -t transferXXX ) - - # upload stdin or file - file=$1 - - if tty -s; - then - basefile=$(basename "$file" | sed -e 's/[^a-zA-Z0-9._-]/-/g') - - if [ ! -e $file ]; - then - echo "File $file doesn't exists." - return 1 - fi - - if [ -d $file ]; - then - # zip directory and transfer - zipfile=$( mktemp -t transferXXX.zip ) - cd $(dirname $file) && zip -r -q - $(basename $file) >> $zipfile - curl --progress-bar --upload-file "$zipfile" "https://transfer.sh/$basefile.zip" >> $tmpfile - rm -f $zipfile - else - # transfer file - curl --progress-bar --upload-file "$file" "https://transfer.sh/$basefile" >> $tmpfile - fi - else - # transfer pipe - curl --progress-bar --upload-file "-" "https://transfer.sh/$file" >> $tmpfile - fi - - # cat output link - cat $tmpfile - - # cleanup - rm -f $tmpfile -} - - diff --git a/.config/zsh/plugins/zsh-async b/.config/zsh/plugins/zsh-async deleted file mode 160000 index 490167c..0000000 --- a/.config/zsh/plugins/zsh-async +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 490167c4aa5a870b3da1458859bcf3a9d1e24f97 diff --git a/.gitignore b/.gitignore index 29a82fa..8065dcc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ /.config/vim/.netrwhist /.config/zsh/.zcompdump -/.config/zsh/plugins/completion/_msg /.config/ranger/bookmarks /.config/ranger/history diff --git a/.gitmodules b/.gitmodules index 5634a96..9c28ee2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,9 +40,6 @@ [submodule ".config/zsh/plugins/stderred"] path = .config/zsh/plugins/stderred url = https://github.com/sickill/stderred -[submodule ".config/zsh/plugins/zsh-async"] - path = .config/zsh/plugins/zsh-async - url = https://github.com/mafredri/zsh-async [submodule ".config/zsh/plugins/zsh-autosuggestions"] path = .config/zsh/plugins/zsh-autosuggestions url = https://github.com/zsh-users/zsh-autosuggestions