Merge branch 'main' into server

This commit is contained in:
Fabian Ising
2022-09-27 12:37:43 +02:00
28 changed files with 1909 additions and 120 deletions

View File

@@ -1,23 +1,30 @@
env:
TERM: xterm-256color
font:
# The size to use.
size: 12
# The normal (roman) font face to use.
normal:
family: DejaVu Sans Mono For Powerline
family: "MesloLGS NF"
# Style can be specified to pick a specific face.
style: Regular
# The bold font face
bold:
family: DejaVu Sans Mono For Powerline
family: "MesloLGS NF"
# Style can be specified to pick a specific face.
# style: Bold
style: Bold
bold:
family: "MesloLGS NF"
# Style can be specified to pick a specific face.
style: Bold
# The italic font face
italic:
family: DejaVu Sans Mono For Powerline
# Style can be specified to pick a specific face.
# style: Italic
window:
dynamic_title: true
padding:
x: 0
y: 0
scrolling:
history: 0
colors:
# Default colors
@@ -46,3 +53,9 @@ colors:
magenta: '0xad7fa8'
cyan: '0x34e2e2'
white: '0xeeeeec'
shell:
program: /usr/local/bin/tmux
alt_send_esc: false
live_config_reload: true

8
.gitmodules vendored
View File

@@ -5,11 +5,3 @@
[submodule "antigen"]
path = zsh/antigen
url = https://github.com/zsh-users/antigen.git
[submodule "bundle/Vundle.vim"]
path = vim/bundle/Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git
[submodule "nvim/bundle/Vundle.vim"]
path = nvim/bundle/Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git

View File

@@ -8,9 +8,6 @@
git submodule update --init --recursive
echo "ln -s $PWD/vim $HOME/.vim"
ln -Tsv $PWD/vim $HOME/.vim
ln -Tsv ~/.vim/.vimrc $HOME/.vimrc
ln -Tsv $PWD/zsh $HOME/.zsh
ln -Tsv ~/.zsh/.zshrc $HOME/.zshrc
ln -Tsv $PWD/tmux $HOME/.tmux

View File

@@ -8,11 +8,11 @@
git submodule update --init --recursive
echo "ln -s $PWD/vim $HOME/.vim"
ln -sv $PWD/vim $HOME/.vim
ln -sv ~/.vim/.vimrc $HOME/.vimrc
ln -sv $PWD/zsh $HOME/.zsh
ln -sv ~/.zsh/.zshrc $HOME/.zshrc
ln -sv $PWD/tmux $HOME/.tmux
ln -sv ~/.tmux/.tmux.conf $HOME/.tmux.conf
gln -Tsv $PWD/zsh $HOME/.zsh
gln -Tsv ~/.zsh/.zshrc $HOME/.zshrc
gln -Tsv $PWD/tmux $HOME/.tmux
gln -Tsv ~/.tmux/.tmux.conf $HOME/.tmux.conf
mkdir -p $HOME/.config/nvim
gln -Tsv $PWD/nvim $HOME/.config/nvim
gln -Tsv $PWD/.config/alacritty $HOME/.config/alacritty
gln -Tsv $PWD/zsh/.p10k.mac.zsh.example $PWD/zsh/.p10k.mac.zsh

12
copy_fonts_arch.sh Executable file
View File

@@ -0,0 +1,12 @@
#! /bin/sh
#
# copy_fonts_arch.sh
# Copyright (C) 2022 fabian <fabian@krikkit>
#
# Distributed under terms of the MIT license.
#
mkdir -p $HOME/.local/share/fonts
for filename in fonts/*; do
cp "$filename" "$HOME/.local/share/$filename"
done

Binary file not shown.

BIN
fonts/MesloLGS NF Bold.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
nvim/ftplugin/python.vim Normal file
View File

@@ -0,0 +1 @@
set foldmethod=indent

View File

@@ -2,61 +2,65 @@ set nocompatible
filetype off
" Plugins
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin("~/.config/nvim/bundle")
Plugin 'VundleVim/Vundle.vim'
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
" Powerline replacement
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Tags
Plugin 'xolox/vim-misc'
Plug 'xolox/vim-misc'
"Plugin 'ludovicchabant/vim-gutentags'
Plugin 'majutsushi/tagbar'
Plug 'majutsushi/tagbar'
" Templates
Plugin 'aperezdc/vim-template'
Plug 'aperezdc/vim-template'
" Selection expand
Plugin 'terryma/vim-expand-region'
Plugin 'kana/vim-textobj-user'
Plugin 'kana/vim-textobj-line'
Plugin 'kana/vim-submode'
Plug 'terryma/vim-expand-region'
Plug 'kana/vim-textobj-user'
Plug 'kana/vim-textobj-line'
Plug 'kana/vim-submode'
" Better Pasting
Plugin 'ConradIrwin/vim-bracketed-paste'
Plug 'ConradIrwin/vim-bracketed-paste'
" Tmux navigation
Plugin 'christoomey/vim-tmux-navigator'
Plug 'christoomey/vim-tmux-navigator'
" Git
Plugin 'tpope/vim-fugitive'
Plug 'tpope/vim-fugitive'
" Comments
Plugin 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdcommenter'
" Surround
Plugin 'tpope/vim-surround'
Plug 'tpope/vim-surround'
" Snippets
" Track the engine.
Plugin 'SirVer/ultisnips'
Plug 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
Plugin 'ervandew/supertab'
Plug 'honza/vim-snippets'
Plug 'ervandew/supertab'
" Highlight matching xml tags
Plugin 'Valloric/MatchTagAlways'
Plug 'Valloric/MatchTagAlways'
"Javascript
Plugin 'pangloss/vim-javascript'
Plug 'pangloss/vim-javascript'
" Tex
Plug 'lervag/vimtex'
"Go
Plugin 'fatih/vim-go'
Plug 'fatih/vim-go'
call vundle#end()
call plug#end()
filetype plugin indent on
set cinkeys-=0#
@@ -181,7 +185,7 @@ nmap <C-]> <C-w><C-]><C-w>T
let g:ycm_collect_identifiers_from_tags_files = 1 " Read from tag files
let g:ycm_global_ycm_extra_conf = '~/.config/nvim/.ycm_extra_conf.py' " Standard conf
let g:ycm_enable_diagnostic_signs = 0 " Do not show semantic error bar
let g:ycm_server_python_interpreter = 'python'
let g:ycm_server_python_interpreter = 'python3'
let g:ycm_key_list_select_completion = ['<C-j>', '<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
@@ -189,14 +193,14 @@ let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
let g:easytags_async = 1
" make
autocmd QuickFixCmdPre make set cmdheight=2
set switchbuf=split
"autocmd QuickFixCmdPre make set cmdheight=2
"autocmd QuickFixCmdPost make nested cwindow "Open the quickfix window
"autocmd QuickFixCmdPost make nested lwindow "Change to the quickfix window
set switchbuf=split
nmap <F9> :silent! make<CR>:redraw!<CR>
nmap <Leader>m :silent! make<CR>:redraw!<CR>
nmap <Leader>x :silent! make ex<CR>:redraw!<CR>
imap <F9> <ESC>:make<CR>:redraw!<CR>i
"nmap <F9> :silent! make<CR>:redraw!<CR>
"nmap <Leader>m :silent! make<CR>:redraw!<CR>
"nmap <Leader>x :silent! make ex<CR>:redraw!<CR>
"imap <F9> <ESC>:make<CR>:redraw!<CR>i
" vim-templates config-file
try
@@ -219,6 +223,18 @@ let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets
" Folding
set foldmethod=syntax
set foldlevel=100
" Use F9 to toggle folding
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
nnoremap <Leader>a za
onoremap <Leader>a <C-C>za
vnoremap <Leader>a zf
try
source ~/.config/nvim/.vimrc_config_expand_region
catch
@@ -233,3 +249,8 @@ catch
endtry
let g:tex_flavor = "latex"
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
if has("macunix")
" Required for virtualenvs
let g:python3_host_prog="/usr/local/bin/python3"
endif

View File

@@ -8,11 +8,12 @@
sudo pacman --needed -Sy archlinux-keyring --noconfirm
sudo pacman --needed -Syu --noconfirm
yes | sudo pacman --needed -Sy vte3-ng
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh termite powerline powerline-fonts i3 rofi nitrogen python-pip --noconfirm
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh alacritty powerline powerline-fonts python-pip --noconfirm
pip3 install neovim
./clone_and_link.sh
cp zsh/.powerline_config_arch.example zsh/.powerline_config
cp vim/.vimrc_config_powerline_arch.example vim/.vimrc_config_powerline
./copy_fonts_arch.sh
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
fi

12
setup_mac.sh Executable file
View File

@@ -0,0 +1,12 @@
#! /bin/sh
#
# setup_mac.sh
# Copyright (C) 2022 fabian <fabian@FordPrefect.home>
#
# Distributed under terms of the MIT license.
#
brew install neovim tmux alacritty coreutils
pip3 install neovim
./clone_and_link_mac.sh
tmux/plugins/tpm/binding/install_plugins

View File

@@ -1,4 +1,4 @@
set-option -g default-shell /bin/zsh
bind -Tcopy-mode-vi y send -X copy-pipe "pbcopy" \; display-message "copied to system clipboard"
bind C-p run "tmux set-buffer \"$pbpaste\"; tmux paste-buffer"
bind C-y run "tmux save-buffer - | pbcopy"
#bind -Tcopy-mode-vi y send -X copy-pipe "pbcopy" \; display-message "copied to system clipboard"
#bind C-p run "tmux set-buffer \"$pbpaste\"; tmux paste-buffer"
#bind C-y run "tmux save-buffer - | pbcopy"

View File

@@ -1,7 +1,7 @@
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
set -g default-terminal "xterm-256color"
set -g history-limit 100000
set -g history-limit 20000
# Remap prefix
unbind C-b
@@ -29,7 +29,7 @@ unbind '%'
bind-key -n C-x resize-pane -Z
bind-key C-x send-keys C-x
bind k clear-history
bind k clear-history\; display "History cleared"
bind-key a set-window-option synchronize-panes
@@ -37,11 +37,9 @@ bind r source-file ~/.tmux.conf\; display "Conf reloaded!"
set -g mouse on
# Vi copypaste mode
set-window-option -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind -Tcopy-mode-vi y send -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c" \; display-message "copied to system clipboard"
#bind-key -Tcopy-mode-vi 'v' send -X begin-selection
#bind-key -Tcopy-mode-vi 'y' send -X copy-selection
#bind -Tcopy-mode-vi y send -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c" \; display-message "copied to system clipboard"
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
@@ -55,16 +53,22 @@ bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key C-x send-keys C-x
bind-key C-o send-keys C-o
# Copying
# Copying - Most of this is done in tmux-yank!
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
#bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
# Vi copypaste mode
set-window-option -g mode-keys vi
set-option -s set-clipboard on
set -g @yank_with_mouse off
set -g @yank_action 'copy-pipe'
if '[ `uname` == Darwin ]' \
'source-file ~/.tmux/.mac_config'
source-file ~/.tmux/.tmux_config_powerline
set-option -g set-titles on
# Escape timeout for nvim
set -sg escape-time 10
@@ -73,7 +77,7 @@ set -sg escape-time 10
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-sidebar'
#set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'jimeh/tmux-themepack'
@@ -85,4 +89,4 @@ set -g @themepack 'powerline/double/blue'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' # >> /tmp/tpm_out 2>&1 >> /tmp/tpm_out'
run '~/.tmux/plugins/tpm/tpm || true' # 2>&1 >> /tmp/tpm_out'

View File

@@ -1 +1 @@
source /usr/lib/python3.7/site-packages/powerline/bindings/tmux/powerline.conf
source /usr/lib/python3.10/site-packages/powerline/bindings/tmux/powerline.conf

View File

@@ -1 +1 @@
source '/usr/local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf'
source '/usr/local/lib/python3.10/site-packages/powerline/bindings/tmux/powerline.conf'

View File

@@ -1 +0,0 @@
/Users/fabian/Masterarbeit/thesis 40

1
zsh/.gitignore vendored
View File

@@ -1,2 +1,3 @@
.*_config*
!.*_config*.example
.p10k.mac.zsh

1722
zsh/.p10k.mac.zsh.example Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,11 @@
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# os_icon # os identifier
<<<<<<< HEAD
context
=======
context # user@hostname
>>>>>>> main
dir # current directory
vcs # git status
# prompt_char # prompt symbol
@@ -80,7 +84,11 @@
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
<<<<<<< HEAD
# context # user@hostname
=======
#context # user@hostname
>>>>>>> main
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)

View File

@@ -1 +1 @@
source /usr/lib/python3.8/site-packages/powerline/bindings/zsh/powerline.zsh
source /usr/lib/python3.10/site-packages/powerline/bindings/zsh/powerline.zsh

View File

@@ -0,0 +1,4 @@
export WORKON_HOME=~/python-envs
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh

22
zsh/.zsh_plugins.txt Normal file
View File

@@ -0,0 +1,22 @@
# Load OMZ plugins
ohmyzsh/ohmyzsh
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
urbainvaes/fzf-marks
greymd/docker-zsh-completion
zdharma-continuum/fast-syntax-highlighting kind:defer
# Initialize completions
belak/zsh-utils path:completion

View File

@@ -12,45 +12,23 @@ export PATH="$HOME/.local/bin:$PATH"
[[ -f /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
# Load Antigen
# Load Antidote
static_file=${ZDOTDIR:-~}/.cache/.zsh_plugins.zsh
plugins_txt=${ZDOTDIR:-~}/.zsh/.zsh_plugins.txt
# clone antidote if necessary
if ! [[ -e ${ZDOTDIR:-~}/.antidote ]]; then
git clone https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
fi
# source antidote and load plugins from `${ZDOTDIR:-~}/.zsh_plugins.txt`
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load ${plugins_txt} ${static_file}
setopt interactivecomments
setopt HIST_IGNORE_SPACE
source ~/.zsh/antigen/antigen.zsh
# Clear screen by ctrl+q
bindkey '^q' clear-screen
# Load various lib files
antigen use oh-my-zsh
# Antigen Theme
antigen theme romkatv/powerlevel10k powerlevel10k
# Antigen Bundles
antigen bundle git
antigen bundle heroku
#antigen bundle command-not-found
antigen bundle go
# antigen bundle tmuxinator
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle urbainvaes/fzf-marks
# For SSH, starting ssh-agent is annoying
antigen bundle ssh-agent
# Python Plugins
antigen bundle pip
antigen bundle python
antigen bundle virtualenv
antigen bundle virtualenv
antigen bundle "greymd/docker-zsh-completion"
antigen apply
alias vim=nvim
alias sudo='sudo '
export EDITOR='nvim'
@@ -82,4 +60,8 @@ export MITMPROXY_SSLKEYLOGFILE="~/.mitmproxy/sslkeylogfile.txt"
ZLE_RPROMPT_INDENT=0
# To customize prompt, run `p10k configure` or edit ~/dotfiles/zsh/.p10k.zsh.
if test -f ~/dotfiles/zsh/.p10k.mac.zsh; then
source ~/dotfiles/zsh/.p10k.mac.zsh
else
[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh
fi

Submodule zsh/antigen deleted from 74aa897570