diff --git a/config/.config/ranger/rifle.conf b/config/.config/ranger/rifle.conf index 8164c33..e17406d 100644 --- a/config/.config/ranger/rifle.conf +++ b/config/.config/ranger/rifle.conf @@ -37,8 +37,8 @@ ext x?html?, has w3m, terminal = w3m "$@" # Define the "editor" for text files as first action mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@" mime ^text, label pager = "$PAGER" -- "$@" -!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = ${VISUAL:-$EDITOR} -- "$@" -!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = "$PAGER" -- "$@" +!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = ${VISUAL:-$EDITOR} -- "$@" +!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = "$PAGER" -- "$@" ext 1 = man "$1" ext s[wmf]c, has zsnes, X = zsnes "$1" @@ -57,6 +57,7 @@ ext js = node -- "$1" ext sh = sh -- "$1" ext php = php -- "$1" ext rs = rs -- "$1" +ext go = go -- "$1" #-------------------------------------------- # Audio without X @@ -199,9 +200,9 @@ label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1" label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1" # Define the editor for non-text files + pager as last action - !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = ask -label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = ${VISUAL:-$EDITOR} -- "$@" -label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs = "$PAGER" -- "$@" + !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = ask +label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = ${VISUAL:-$EDITOR} -- "$@" +label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php|rs|go = "$PAGER" -- "$@" # The very last action, so that it's never triggered accidentally, is to execute a program: mime application/x-executable = "$1" diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index 0327768..a1bddec 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -5,7 +5,7 @@ m:/run/media/tuan a:/home/tuan/Documents/Arbeit l:/home/tuan/Local c:/home/tuan/Documents/CTF/picoCTF -':/home/tuan/workspace_l/Projects/Python/Scrapers/missing_dex +':/home/tuan/.vim/ftplugin t:/home/tuan/Templates w:/home/tuan/workspace_l/Projects k:/home/tuan/Documents/Fachschaft/Berufungskomission diff --git a/vim/.vim/ftplugin/go.vim b/vim/.vim/ftplugin/go.vim index 5d7cfac..440e013 100644 --- a/vim/.vim/ftplugin/go.vim +++ b/vim/.vim/ftplugin/go.vim @@ -1,8 +1,8 @@ " Shortcuts -imap ;main package mainimport ("fmt")func main() {}O +imap ;main package mainimport ("fmt")func main() {}O " Compiling -map :!clear; go run % -map :!clear; go build %; ./%< +map :!clear; go run % +map :!clear; go build %; ./%< map :!clear; GOOS=windows GOARCH=386 go build -o %<.exe % diff --git a/vim/.vim/ftplugin/md.vim b/vim/.vim/ftplugin/md.vim index 47155c6..638e184 100644 --- a/vim/.vim/ftplugin/md.vim +++ b/vim/.vim/ftplugin/md.vim @@ -6,5 +6,5 @@ " Begin Shortcuts " Compilation -map :RunBackgroundCommand pandoc % --pdf-engine=xelatex -o %pdf -map :silent exec "!evince %pdf &>/dev/null &" +map :!pandoc % --pdf-engine=xelatex -o %pdf &>/dev/null & disown +map :!evince %pdf &>/dev/null & disown diff --git a/vim/.vim/ftplugin/python.vim b/vim/.vim/ftplugin/python.vim index ea1ada4..a7225a4 100644 --- a/vim/.vim/ftplugin/python.vim +++ b/vim/.vim/ftplugin/python.vim @@ -2,10 +2,10 @@ " Shortcuts -imap ifm if__name__=='__main__': +imap ifm if__name__=='__main__': " Compiling -map :!clear; python % +map :!clear; python % " Use the below highlight group when displaying bad whitespace is desired. highlight BadWhitespace ctermbg=red guibg=red diff --git a/vim/.vim/ftplugin/sh.vim b/vim/.vim/ftplugin/sh.vim index e6f1d34..100ac38 100644 --- a/vim/.vim/ftplugin/sh.vim +++ b/vim/.vim/ftplugin/sh.vim @@ -1,3 +1,3 @@ " Compilation -map :!clear&./% +map :!clear&./% diff --git a/vim/.vim/ftplugin/tex.vim b/vim/.vim/ftplugin/tex.vim index f6d4a0e..bf2e638 100644 --- a/vim/.vim/ftplugin/tex.vim +++ b/vim/.vim/ftplugin/tex.vim @@ -4,10 +4,10 @@ setlocal spell spelllang=de_de noremap YpkI\begin{A}jI\end{A}ko noremap! YpkI\begin{A}jI\end{A}ko -inoremap ;it \begin{itemize}\end{itemize}k +inoremap ;it \begin{itemize}\end{itemize}k inoremap ;i \item{} inoremap "" "`"'hha -inoremap ;fp \begin{tabular}{ccc}\topruleJa & Nein & Enthaltung \\ \midrule & & \\\bottomrule\end{tabular}0kk +inoremap ;fp \begin{tabular}{ccc}\topruleJa & Nein & Enthaltung \\ \midrule & & \\\bottomrule\end{tabular}0kk inoremap ;sec \section{}i inoremap ;ssec \subsection{}i inoremap ;sssec \subsubsection{}i @@ -24,7 +24,7 @@ vnoremap "" da"`""' ":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk - ":command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk - | fmt -csw78 " Compilation -noremap :RunBackgroundCommand latexmk -pdf -silent "%":redraw! -noremap :RunBackgroundCommand latexmk -c -noremap :silent exec "!evince %pdf &>/dev/null &" +noremap :!latexmk -pdf -silent "%" &>/dev/null & disown :redraw! +noremap :!latexmk -c &>/dev/null & disown +noremap :!evince %pdf &>/dev/null & disown diff --git a/zsh/.zshrc b/zsh/.zshrc index f6d23d6..cbb2e6d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -23,5 +23,8 @@ plugins=( # History HISTORY_IGNORE='sudo veracrypt *|veracrypt *' +transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer \n ... | transfer ">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://share.mos4.de/$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "https://share.mos4.de/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "https://share.mos4.de/$file_name"|tee /dev/null;fi;} + # Source source $ZSH/oh-my-zsh.sh +