From df57e62c5fa14832ce1485b40aade24088f93b8b Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Tue, 29 Sep 2020 02:49:42 +0200 Subject: [PATCH] overdue commit --- fish/config.fish | 5 +- hjalmar-droneship/onedrive/config | 4 +- hjalmar-mothership/onedrive/config | 2 +- i3/config | 77 ++++--- manjaro.md | 13 +- nvim/coc-settings.json | 15 +- nvim/init.vim | 317 +++++++---------------------- onedrive/config | 37 ---- ranger/colorschemes/__init__.py | 0 root/.Xresources | 243 ++++++++++++++++++++++ root/.bashrc | 149 -------------- root/.profile | 20 -- root/.tmux.conf | 19 +- root/.zprofile | 14 -- root/.zshrc | 44 ---- zathurarc => zathura/zathurarc | 0 16 files changed, 397 insertions(+), 562 deletions(-) delete mode 100644 onedrive/config delete mode 100644 ranger/colorschemes/__init__.py create mode 100644 root/.Xresources delete mode 100644 root/.bashrc delete mode 100644 root/.profile delete mode 100644 root/.zprofile delete mode 100644 root/.zshrc rename zathurarc => zathura/zathurarc (100%) diff --git a/fish/config.fish b/fish/config.fish index 18262ab..e33db2f 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -6,7 +6,7 @@ set -x BROWSER /usr/bin/chromium set -x QT_QPA_PLATFORMTHEME "qt5ct" set -x GTK2_RC_FILES "$HOME/.gtkrc-2.0" set -x PYTHONBREAKPOINT ipdb.set_trace -set -x JAVA_HOME "/usr/lib/jvm/java-14-openjdk/bin/javac" +set -x JAVA_HOME "/usr/lib/jvm/java-14-openjdk/" # cuda stuff set -x CUDA_HOME /opt/cuda @@ -21,3 +21,6 @@ end # MKL AMD fix set -x MKL_DEBUG_CPU_TYPE 5 + +# fzf bindings +set -U FZF_LEGACY_KEYBINDINGS 0 diff --git a/hjalmar-droneship/onedrive/config b/hjalmar-droneship/onedrive/config index 0a57578..ad3e1b5 100644 --- a/hjalmar-droneship/onedrive/config +++ b/hjalmar-droneship/onedrive/config @@ -1,2 +1,2 @@ -sync_dir="/home/hjalmarlucius/Onedrive" -skip_dir="Bilder|Pictures|Videos|Backup|Music|Datasets|tmp|Programming/logs" +sync_dir="/mnt/OneDrive" +skip_dir="Bilder/Camera Roll|Backup|Datasets|Library|Music|Pictures|Programming/logs|Programming/pysrc|Research - books|Research - papers|Videos" diff --git a/hjalmar-mothership/onedrive/config b/hjalmar-mothership/onedrive/config index 4921bc6..77c8e56 100644 --- a/hjalmar-mothership/onedrive/config +++ b/hjalmar-mothership/onedrive/config @@ -5,7 +5,7 @@ # When changing a config option below, remove the '#' from the start of the line # For explanations of all config options below see docs/USAGE.md or the man page. # -sync_dir = "/mnt/storage/Onedrive" +sync_dir = "/mnt/OneDrive" # skip_file = "~*|.~*|*.tmp" # monitor_interval = "45" # skip_dir = "Videos" diff --git a/i3/config b/i3/config index 49ef1ec..f1f2a5b 100644 --- a/i3/config +++ b/i3/config @@ -97,10 +97,10 @@ bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right -bindsym $mod+Shift+left move left -bindsym $mod+Shift+down move down -bindsym $mod+Shift+up move up -bindsym $mod+Shift+right move right +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right # workspace back and forth (with/without active container) bindsym $mod+b workspace back_and_forth @@ -146,44 +146,62 @@ bindsym $mod+Ctrl+Left workspace prev # to display names or symbols instead of plain workspace numbers you can use # something like: set $ws1 1:mail # set $ws2 2: -set $ws1 1 -set $ws2 2 -set $ws3 3 -set $ws4 4 -set $ws5 5 -set $ws6 6 -set $ws7 7 -set $ws8 8 +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "Ins" +set $ws5 "Home" +set $ws6 "PgUp" +set $ws7 "Del" +set $ws8 "End" +set $ws9 "PgDn" +set $display1 DP-0 +set $display2 DP-4 +set $display3 DP-2 # switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 +bindsym $mod+Insert workspace $ws4 +bindsym $mod+Home workspace $ws5 +bindsym $mod+Prior workspace $ws6 +bindsym $mod+Delete workspace $ws7 +bindsym $mod+End workspace $ws8 +bindsym $mod+Next workspace $ws9 + +# switch to workspace +workspace $ws1 output $display1 +workspace $ws2 output $display2 +workspace $ws3 output $display3 +workspace $ws4 output $display1 +workspace $ws5 output $display2 +workspace $ws6 output $display3 +workspace $ws7 output $display1 +workspace $ws8 output $display2 +workspace $ws9 output $display3 # Move focused container to workspace bindsym $mod+Ctrl+1 move container to workspace $ws1 bindsym $mod+Ctrl+2 move container to workspace $ws2 bindsym $mod+Ctrl+3 move container to workspace $ws3 -bindsym $mod+Ctrl+4 move container to workspace $ws4 -bindsym $mod+Ctrl+5 move container to workspace $ws5 -bindsym $mod+Ctrl+6 move container to workspace $ws6 -bindsym $mod+Ctrl+7 move container to workspace $ws7 -bindsym $mod+Ctrl+8 move container to workspace $ws8 +bindsym $mod+Ctrl+Insert move container to workspace $ws4 +bindsym $mod+Ctrl+Home move container to workspace $ws5 +bindsym $mod+Ctrl+Prior move container to workspace $ws6 +bindsym $mod+Ctrl+Delete move container to workspace $ws7 +bindsym $mod+Ctrl+End move container to workspace $ws8 +bindsym $mod+Ctrl+Next move container to workspace $ws9 # Move to workspace with focused container bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 +bindsym $mod+Shift+Insert move container to workspace $ws4; workspace $ws4 +bindsym $mod+Shift+Home move container to workspace $ws5; workspace $ws5 +bindsym $mod+Shift+Prior move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+Delete move container to workspace $ws7; workspace $ws7 +bindsym $mod+Shift+End container to workspace $ws8; workspace $ws8 +bindsym $mod+Shift+Next move container to workspace $ws9; workspace $ws9 # Open applications on specific workspaces # assign [class="Thunderbird"] $ws1 @@ -273,9 +291,6 @@ mode "resize" { bindsym Escape mode "default" } -# Lock screen -bindsym $mod+9 exec --no-startup-id blurlock - # Autostart applications exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id nm-applet @@ -288,7 +303,7 @@ exec --no-startup-id xautolock -time 10 -locker blurlock exec_always --no-startup-id sbxkb exec_always --no-startup-id ff-theme-util exec_always --no-startup-id fix_xcursor -exec --no-startup-id xrandr --output HDMI-0 --primary --output DP-0 --rotate left --right-of HDMI-0 --output DP-2 --rotate left --left-of HDMI-0 +exec --no-startup-id xrandr --output $display2 --primary --output $display3 --auto --rotate left --right-of $display2 --output $display1 --auto --rotate left --left-of $display2 # HB STARTUP ADDITIONS bindsym Shift+Pause exec --no-startup-id setxkbmap -option "caps:escape" diff --git a/manjaro.md b/manjaro.md index 139e439..0eec779 100644 --- a/manjaro.md +++ b/manjaro.md @@ -1,17 +1,20 @@ # linux * yay stuff * AUR `sudo pacman -S yay` - * `yay onedrive-abraunegg dropbox slack-desktop ncspot-git nvidia-vulkan` + * `yay onedrive-abraunegg dropbox slack-desktop ncspot-git` * applications * helpers `sudo pacman -S zathura-pdf-mupdf trash-cli rofi` * base16 shell `git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell` * night colors `sudo pacman -S redshift` * gaming `sudo pacman -S steam-manjaro steam-native` + * vlc player `sudo pacman -S libmicrodns protobuf vlc` # coding * cuda `sudo pacman -S cuda` * core `sudo pacman -S neovim tmux` -* fonts `sudo pacman -S ttf-inconsolata powerline` +* `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm` +* fonts `sudo pacman -S powerline` +* fonts `yay nerd-fonts-source-code-pro powerline-fonts-git` * git addons `sudo pacman -S diff-so-fancy` * search `sudo pacman -S the_silver_searcher ripgrep` * syntax highlighting `sudo pacman -S bat` @@ -26,8 +29,9 @@ * enable X11 forwarding in `/etc/ssh/sshd_config` # python -* `pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html` -* `pip install nodejs plotly flake8 numpy scipy sympy matplotlib seaborn pytorch-lightning ggplot ptvsd tensorboard torchtext ipython matplotlib-label-lines ipympl pytest qbstyles` +* `pip install torch torchvision` +* `pip install plotly flake8 numpy scipy sympy matplotlib seaborn pytorch-lightning ggplot ptvsd tensorboard torchtext ipython matplotlib-label-lines ipympl pytest qbstyles` +* `pip install nodejs kafka` # enable services * `systemctl enable --user onedrive --now` @@ -43,3 +47,4 @@ OMF * curl -L https://get.oh-my.fish | fish * omf install https://github.com/FabioAntunes/fish-nvm * omf install https://github.com/edc/bass +* omf install https://github.com/jethrokuan/fzf diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json index ddcefed..2680006 100644 --- a/nvim/coc-settings.json +++ b/nvim/coc-settings.json @@ -1,7 +1,7 @@ { "signature.target": "echo", "suggest.autoTrigger": "always", - "python.jediEnabled": true, + "python.jediEnabled": false, "python.autoComplete.addBrackets": true, "python.linting.pylintEnabled": false, "python.linting.flake8Enabled": true, @@ -11,6 +11,15 @@ "git.enableGutters": true, "tabnine.shortcut": "TN", "yaml.format.enable": true, - "yaml.format.singleQuote": true - + "yaml.format.singleQuote": true, + "diagnostic-languageserver.filetypes": { + "vim": "vint", + "email": "languagetool", + "markdown": [ "write-good", "markdownlint" ], + "sh": "shellcheck", + "php": ["phpstan", "psalm"] + }, + "diagnostic-languageserver.formatFiletypes": { + "sh": "shfmt" + } } diff --git a/nvim/init.vim b/nvim/init.vim index 8a8916d..2da46c5 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -20,7 +20,7 @@ call plug#begin('~/.config/nvim/plugged') " tools Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'} -Plug 'junegunn/fzf.vim' +"Plug 'junegunn/fzf.vim' Plug 'sheerun/vim-polyglot' " language syntax Plug 'godlygeek/tabular' " help aligning text on tabs Plug 'tpope/vim-fugitive' @@ -75,8 +75,8 @@ if has("nvim") endif endif "let g:airline_theme='molokai' -"let g:airline_theme='qwq' -let g:airline_theme='badwolf' +let g:airline_theme='qwq' +"let g:airline_theme='badwolf' "let g:airline_theme='silver' "let g:airline_theme='raven' @@ -94,8 +94,9 @@ let g:BASH_Ctrl_l='off' " avoid 'C-l' being overridden to newline set updatetime=300 set timeoutlen=500 set lazyredraw -" set shell=/usr/bin/bash -" let $SHELL = "/usr/bin/bash" +set shell=/usr/bin/bash +let $SHELL = "/usr/bin/bash" +set conceallevel=2 " fold config set foldmethod=indent @@ -106,10 +107,6 @@ set foldlevelstart=20 " zi toggle folds " zi zj move to next / prev fold -" concealment -set conceallevel=2 -let g:tex_conceal='bd' - " indentation set ai " auto indent set si " smart indent @@ -123,7 +120,6 @@ autocmd BufEnter * if &filetype == "" | setlocal ft=markdown | endif set tabstop=4 set softtabstop=4 set shiftwidth=4 -set expandtab set fileformat=unix au Filetype python set \ tabstop=4 @@ -134,6 +130,7 @@ au Filetype markdown,yaml set \ tabstop=2 \ softtabstop=2 \ shiftwidth=2 +set expandtab " " Disables automatic commenting on newline: "autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o @@ -224,29 +221,24 @@ nmap :execute 'silent! tabmove ' . (tabpagenr()+1) "nmap r :Rg "nmap b :Buffers "nmap c :Commands -nmap t :Colors +"nmap t :Colors "nmap m :Marks "nmap w :Windows "nmap :Maps -nmap [fzf-p] -xmap [fzf-p] -nnoremap [fzf-p]f :CocCommand fzf-preview.FromResources project_mru git -nnoremap [fzf-p]F :CocCommand fzf-preview.DirectoryFiles -nnoremap [fzf-p]g :CocCommand fzf-preview.GitStatus -nnoremap [fzf-p]G :CocCommand fzf-preview.GitActions -nnoremap [fzf-p]b :CocCommand fzf-preview.Buffers -nnoremap [fzf-p]B :CocCommand fzf-preview.AllBuffers -" nnoremap [fzf-p]o :CocCommand fzf-preview.FromResources buffer project_mru -" nnoremap [fzf-p] :CocCommand fzf-preview.Jumps -" nnoremap [fzf-p]g; :CocCommand fzf-preview.Changes -nnoremap [fzf-p]/ :CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'" -nnoremap [fzf-p]* :CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'=expand('')" -nnoremap [fzf-p]l :CocCommand fzf-preview.ProjectGrep -xnoremap [fzf-p]l "sy:CocCommand fzf-preview.ProjectGrep-F"=substitute(substitute(@s, '\n', '', 'g'), '/', '\\/', 'g')" -nnoremap [fzf-p]t :CocCommand fzf-preview.BufferTags -"nnoremap [fzf-p]q :CocCommand fzf-preview.QuickFix -"nnoremap [fzf-p]l :CocCommand fzf-preview.LocationList +nmap :CocCommand fzf-preview.ProjectGrep +xmap "sy:CocCommand fzf-preview.ProjectGrep-F"=substitute(substitute(@s, '\n', '', 'g'), '/', '\\/', 'g')" +nmap :CocCommand fzf-preview.ProjectGrep +nmap :CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'" +nmap :CocCommand fzf-preview.Lines --add-fzf-arg=--no-sort --add-fzf-arg=--query="'=expand('')" +nmap :CocCommand fzf-preview.MruFiles +nmap :CocCommand fzf-preview.ProjectMruFiles +nmap :CocCommand fzf-preview.DirectoryFiles +nmap :CocCommand fzf-preview.ProjectFiles +nmap :CocCommand fzf-preview.GitStatus +nmap :CocCommand fzf-preview.GitActions +nmap :CocCommand fzf-preview.Buffers +nmap :CocCommand fzf-preview.AllBuffers " Close preview window when completion is done autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif @@ -272,6 +264,7 @@ nmap gp (coc-git-prevchunk) nmap g (coc-git-chunkinfo) nmap gs :CocCommand git.chunkStage vmap gs :CocCommand git.chunkStage +nmap gX :CocCommand git.chunkUndo vmap gX :CocCommand git.chunkUndo " vim-fugitive @@ -279,7 +272,7 @@ vmap gX :CocCommand git.chunkUndo nmap gg :vertical Gstatus:vertical resize 60 " nerdtree -map N :NERDTreeToggle +map :NERDTreeToggle " nerdcommenter " 'c ', 'cl' aligned and 'cu>' remove @@ -304,10 +297,8 @@ map z# (asterisk-z#) map gz# (asterisk-gz#) " buffergator -map b :BuffergatorOpen -map B :BuffergatorClose -map t :BuffergatorTabsOpen -map T :BuffergatorTabsClose +map :BuffergatorToggle +map :BuffergatorTabsToggle nmap j :BuffergatorMruCyclePrev nmap k :BuffergatorMruCycleNext @@ -364,7 +355,10 @@ let g:airline_powerline_fonts=1 " vim-markdown let g:vim_markdown_new_list_item_indent=0 -let g:vim_markdown_conceal=1 +let g:vim_markdown_conceal=0 +let g:vim_markdown_conceal_code_blocks=0 +let g:vim_markdown_math=1 +let g:vim_markdown_folding_disabled=0 let g:vim_markdown_math=0 " markdown preview @@ -397,6 +391,7 @@ endfunction nmap K :call show_documentation() let g:coc_node_path = '/usr/bin/node' let g:fzf_preview_command = 'bat --color=always --plain {-1}' " Installed bat +let g:fzf_preview_grep_cmd = 'rg --smart-case --line-number --no-heading --color=never' " vim asterisk let g:asterisk#keeppos = 1 @@ -481,44 +476,6 @@ endif " Version: 1.0 " vim: et ts=2 sts=2 sw=2 -scriptencoding utf-8 - -if &compatible || exists('g:loaded_vim_better_default') - finish -endif -let g:loaded_vim_better_default = 1 - -let s:save_cpo = &cpo -set cpo&vim - -" Neovim has set these as default -if !has('nvim') - - set nocompatible - - syntax on " Syntax highlighting - filetype plugin indent on " Automatically detect file types - set autoindent " Indent at the same level of the previous line - set autoread " Automatically read a file changed outside of vim - set backspace=indent,eol,start " Backspace for dummies - set complete-=i " Exclude files completion - set display=lastline " Show as much as possible of the last line - set encoding=utf-8 " Set default encoding - set history=10000 " Maximum history record - set hlsearch " Highlight search terms - set incsearch " Find as you type search - set laststatus=2 " Always show status line - set ttymouse=xterm2 - set mouse=a " Automatically enable mouse usage - set smarttab " Smart tab - set ttyfast " Faster redrawing - set viminfo+=! " Viminfo include ! - set wildmenu " Show list instead of just completing - - "set ttymouse=xterm2 - -endif - set shortmess=atOI " No help Uganda information, and overwrite read messages to avoid PRESS ENTER prompts set ignorecase " Case insensitive search set wildignorecase @@ -528,7 +485,6 @@ set scrolloff=3 " Minumum lines to keep above and below cursor set nowrap " Do not wrap long lines set splitright " Puts new vsplit windows to the right of the current set splitbelow " Puts new split windows to the bottom of the current -set autowrite " Automatically write a file when leaving a modified buffer set mousehide " Hide the mouse cursor while typing set hidden " Allow buffer switching without saving set ruler " Show the ruler @@ -538,13 +494,8 @@ set showmatch " Show matching brackets/parentthesis set matchtime=5 " Show matching time set report=0 " Always report changed lines set linespace=0 " No extra spaces between rows -set pumheight=20 " Avoid the pop up menu occupying the whole screen - -" http://stackoverflow.com/questions/6427650/vim-in-tmux-background-color-changes-when-paging/15095377#15095377 -set t_ut= set winminheight=0 -set wildmode=list:longest,full set listchars=tab:→\ ,eol:↵,trail:·,extends:↷,precedes:↶ @@ -567,45 +518,10 @@ nmap k gk vmap j gj vmap k gk -" :W sudo saves the file -" (useful for handling the permission-denied error) -command! W w !sudo tee % > /dev/null +set nobackup +set noswapfile +set nowritebackup -" Change cursor shape for iTerm2 on macOS { - " bar in Insert mode - " inside iTerm2 - if $TERM_PROGRAM =~# 'iTerm' - let &t_SI = "\]50;CursorShape=1\x7" - let &t_SR = "\]50;CursorShape=2\x7" - let &t_EI = "\]50;CursorShape=0\x7" - endif - - " inside tmux - if exists('$TMUX') && $TERM != 'xterm-kitty' - let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" - let &t_SR = "\Ptmux;\\]50;CursorShape=2\x7\\\" - let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" - endif - - " inside neovim - if has('nvim') - let $NVIM_TUI_ENABLE_CURSOR_SHAPE=2 - endif -" } - -if get(g:, 'vim_better_default_minimum', 0) - finish -endif - -if get(g:, 'vim_better_default_backup_on', 0) - set backup -else - set nobackup - set noswapfile - set nowritebackup -endif - -"set background=dark " Assume dark background set cursorline " Highlight current line set fileformats=unix,dos,mac " Use Unix as the standard file type set number " Line numbers on @@ -614,12 +530,8 @@ set fillchars=vert:│,stl:\ ,stlnc:\ " Annoying temporary files set directory=/tmp//,. set backupdir=/tmp//,. -"if v:version >= 703 - "set undodir=/tmp//,. -"endif highlight clear SignColumn " SignColumn should match background -" highlight clear LineNr " Current line number row will have same background color in relative mode if has('unnamedplus') set clipboard+=unnamedplus @@ -627,132 +539,39 @@ else set clipboard+=unnamed endif -if get(g:, 'vim_better_default_persistent_undo', 1) - if has('persistent_undo') - set undofile " Persistent undo - set undolevels=500 " Maximum number of changes that can be undone - set undoreload=5000 " Maximum number lines to save for undo on a buffer reload - endif -endif +set undofile " Persistent undo +set undolevels=500 " Maximum number of changes that can be undone +set undoreload=5000 " Maximum number lines to save for undo on a buffer reload -if has('gui_running') - set guioptions-=r " Hide the right scrollbar - set guioptions-=L " Hide the left scrollbar - set guioptions-=T - set guioptions-=e - set shortmess+=c - " No annoying sound on errors - set noerrorbells - set novisualbell - set visualbell t_vb= -endif - -if get(g:, 'vim_better_default_key_mapping', 1) - -" Basic { - if get(g:, 'vim_better_default_basic_key_mapping', 1) - " Insert mode shortcut - inoremap - inoremap - inoremap - inoremap - inoremap - " Bash like - inoremap - inoremap - inoremap - " Command mode shortcut - cnoremap - cnoremap - cnoremap - cnoremap - cnoremap - cnoremap - cnoremap - cnoremap - " Quit visual mode - vnoremap v - " Move to the start of line - nnoremap H ^ - " Move to the end of line - nnoremap L $ - " Redo - nnoremap U - " Quick command mode - nnoremap : - " In the quickfix window, is used to jump to the error under the - " cursor, so undefine the mapping there. - autocmd BufReadPost quickfix nnoremap - " Yank to the end of line - nnoremap Y y$ - " Open shell in vim - if has('nvim') || has('terminal') - map ' :terminal - else - map ' :shell - endif - endif -" } - -" Buffer { - if get(g:, 'vim_better_default_buffer_key_mapping', 0) - nnoremap bp :bprevious - nnoremap bn :bnext - nnoremap bf :bfirst - nnoremap bl :blast - nnoremap bd :bpspbnbd - nnoremap bk :bw - endif -" } - -" File { - if get(g:, 'vim_better_default_file_key_mapping', 0) - " File save - nnoremap fs :update - endif -" } - -" Fold { - if get(g:, 'vim_better_default_fold_key_mapping', 0) - nnoremap f0 :set foldlevel=0 - nnoremap f1 :set foldlevel=1 - nnoremap f2 :set foldlevel=2 - nnoremap f3 :set foldlevel=3 - nnoremap f4 :set foldlevel=4 - nnoremap f5 :set foldlevel=5 - nnoremap f6 :set foldlevel=6 - nnoremap f7 :set foldlevel=7 - nnoremap f8 :set foldlevel=8 - nnoremap f9 :set foldlevel=9 - endif -" } - -" Window { - if get(g:, 'vim_better_default_window_key_mapping', 1) - " resize - nnoremap wh 5< - nnoremap wl 5> - nnoremap wj :resize +5 - nnoremap wk :resize -5 - nnoremap w= = - nnoremap w - nnoremap w- _ - nnoremap wg :Goyo - " move - nnoremap H H - nnoremap L L - nnoremap J J - nnoremap K K - " rotate - nnoremap wr r - nnoremap wR R - nnoremap wx x - " tabs - nnoremap wo o - endif -" } - -endif - -let &cpo = s:save_cpo -unlet s:save_cpo +" Insert mode shortcut +inoremap +inoremap +inoremap +inoremap +inoremap +" Bash like +inoremap +inoremap +inoremap +" Command mode shortcut +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +cnoremap +" Quit visual mode +vnoremap v +" Move to the start of line +nmap H ^ +" Move to the end of line +nmap L $ +" Quick command mode +nmap : +" In the quickfix window, is used to jump to the error under the +" cursor, so undefine the mapping there. +autocmd BufReadPost quickfix nmap +" Open shell in vim +map ' :terminal diff --git a/onedrive/config b/onedrive/config deleted file mode 100644 index 4921bc6..0000000 --- a/onedrive/config +++ /dev/null @@ -1,37 +0,0 @@ -# Configuration for OneDrive Linux Client -# This file contains the list of supported configuration fields -# with their default values. -# All values need to be enclosed in quotes -# When changing a config option below, remove the '#' from the start of the line -# For explanations of all config options below see docs/USAGE.md or the man page. -# -sync_dir = "/mnt/storage/Onedrive" -# skip_file = "~*|.~*|*.tmp" -# monitor_interval = "45" -# skip_dir = "Videos" -# log_dir = "/var/log/onedrive/" -# drive_id = "" -# upload_only = "false" -# check_nomount = "false" -# check_nosync = "false" -# download_only = "false" -# disable_notifications = "false" -# disable_upload_validation = "false" -# enable_logging = "false" -# force_http_11 = "false" -# force_http_2 = "false" -# local_first = "false" -# no_remote_delete = "false" -# skip_symlinks = "false" -# debug_https = "false" -# skip_dotfiles = "false" -# dry_run = "false" -# min_notify_changes = "5" -# monitor_log_frequency = "5" -# monitor_fullscan_frequency = "10" -# sync_root_files = "false" -# classify_as_big_delete = "1000" -# user_agent = "" -# remove_source_files = "false" -# skip_dir_strict_match = "false" -# application_id = "" diff --git a/ranger/colorschemes/__init__.py b/ranger/colorschemes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/root/.Xresources b/root/.Xresources new file mode 100644 index 0000000..c7c6d6b --- /dev/null +++ b/root/.Xresources @@ -0,0 +1,243 @@ +uRxvt.perl-ext-common: default,tabbed,matcher,resize-font,-tabbed +URxvt.keysym.C-minus: resize-font:smaller +URxvt.keysym.C-plus: resize-font:bigger +URxvt.keysym.C-equal: resize-font:reset +URxvt.keysym.C-question: resize-font:show + + +Xft.dpi: 96 +Xft.antialias: true +Xft.hinting: true +Xft.rgba: rgb +Xft.autohint: false +Xft.hintstyle: hintslight +Xft.lcdfilter: lcddefault + +XTerm*background: #222D31 +XTerm*foreground: #d8d8d8 +XTerm*pointerColor: #1ABB9B +XTerm*faceName: Fixed +XTerm*faceSize: 11 +XTerm*reverseVideo: on +XTerm*selectToClipboard: true + +*background: #222D31 +*foreground: #d8d8d8 +*fading: 8 +*fadeColor: black +*cursorColor: #1ABB9B +*pointerColorBackground: #2B2C2B +*pointerColorForeground: #16A085 + +!! black dark/light +*color0: #222D31 +*color8: #585858 + +!! red dark/light +*color1: #ab4642 +*color9: #ab4642 + +!! green dark/light +*color2: #7E807E +*color10: #8D8F8D + +!! yellow dark/light +*color3: #f7ca88 +*color11: #f7ca88 + +!! blue dark/light +*color4: #7cafc2 +*color12: #7cafc2 + +!! magenta dark/light +*color5: #ba8baf +*color13: #ba8baf + +!! cyan dark/light +*color6: #1ABB9B +*color14: #1ABB9B + +!! white dark/light +*color7: #d8d8d8 +*color15: #f8f8f8 + +Xcursor.theme: Maia-Cursor +Xcursor.size: 0 + +URxvt.font: xft:SauceCodePro Nerd Font:size=12 + +! alternative font settings with 'terminus': +! URxvt.font: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1 +! URxvt.bold.font: -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1 +!! terminus names see end of file! + +URxvt.depth: 32 +URxvt.background: [100]#222D31 +URxvt*scrollBar: true +URxvt*mouseWheelScrollPage: false +URxvt*cursorBlink: true +URxvt*background: black +URxvt*foreground: grey +URxvt*saveLines: 5000 + +! for 'fake' transparency (without Compton) uncomment the following three lines +! URxvt*inheritPixmap: true +! URxvt*transparent: true +! URxvt*shading: 138 + +! Normal copy-paste keybindings without perls +URxvt.iso14755: false +URxvt.keysym.Shift-Control-V: eval:paste_clipboard +URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard +!Xterm escape codes, word by word movement +URxvt.keysym.Control-Left: \033[1;5D +URxvt.keysym.Shift-Control-Left: \033[1;6D +URxvt.keysym.Control-Right: \033[1;5C +URxvt.keysym.Shift-Control-Right: \033[1;6C +URxvt.keysym.Control-Up: \033[1;5A +URxvt.keysym.Shift-Control-Up: \033[1;6A +URxvt.keysym.Control-Down: \033[1;5B +URxvt.keysym.Shift-Control-Down: \033[1;6B +! Rxvt.perl-ext-common: ...,clipboard +! URxvt.keysym.M-C-c: perl:clipboard:copy +! URxvt.keysym.M-v: perl:clipboard:paste +! URxvt.keysym.M-C-v: perl:clipboard:paste_escaped +! URxvt*termName: string +! URxvt*geometry: geometry +! URxvt*chdir: string +! URxvt*loginShell: boolean +! URxvt*multiClickTime: number +! URxvt*jumpScroll: boolean +! URxvt*skipScroll: boolean +! URxvt*pastableTabs: boolean +! URxvt*scrollstyle: plain +! URxvt*scrollBar_right: boolean +! URxvt*scrollBar_floating: true +! URxvt*scrollBar_align: mode +! URxvt*thickness: number +! URxvt*scrollTtyOutput: boolean +! URxvt*scrollTtyKeypress: boolean +! URxvt*scrollWithBuffer: boolean +! URxvt*tintColor: !7DA55 +! URxvt*blurRadius: HxV +! URxvt*fading: number +! URxvt*fadeColor: color +! URxvt*utmpInhibit: boolean +! URxvt*urgentOnBell: boolean +! URxvt*visualBell: boolean +! URxvt*mapAlert: boolean +! URxvt*meta8: boolean +! URxvt*tripleclickwords: boolean +! URxvt*insecure: boolean +! URxvt*cursorUnderline: boolean +! URxvt*pointerBlank: boolean +! URxvt*color0: color +! URxvt*color1: color +! URxvt*color2: color +! URxvt*color3: color +! URxvt*color4: color +! URxvt*color5: color +! URxvt*color6: color +! URxvt*color7: color +! URxvt*color8: color +! URxvt*color9: color +! URxvt*color10: color +! URxvt*color11: color +! URxvt*color12: color +! URxvt*color13: color +! URxvt*color14: color +! URxvt*color15: color +! URxvt*colorBD: color +! URxvt*colorIT: color +! URxvt*colorUL: color +! URxvt*colorRV: color +! URxvt*underlineColor: color +! URxvt*scrollColor: color +! URxvt*troughColor: color +! URxvt*highlightColor: color +! URxvt*highlightTextColor: color +! URxvt*cursorColor: color +! URxvt*cursorColor2: color +! URxvt*pointerColor: color +! URxvt*pointerColor2: color +! URxvt*borderColor: color +! URxvt*iconFile: file +! URxvt*font: fontname +! URxvt*boldFont: fontname +! URxvt*italicFont: fontname +! URxvt*boldItalicFont: fontname +! URxvt*intensityStyles: boolean +! URxvt*inputMethod: name +! URxvt*preeditType: style +! URxvt*imLocale: string +! URxvt*imFont: fontname +! URxvt*title: string +! URxvt*iconName: string +! URxvt*buffered: boolean +! URxvt*depth: number +! URxvt*visual: number +! URxvt*transient-for: windowid +! URxvt*override-redirect: boolean +! URxvt*hold: boolean +! URxvt*externalBorder: number +! URxvt*internalBorder: number +! URxvt*borderLess: true +! URxvt*lineSpace: number +! URxvt*letterSpace: number +! URxvt*skipBuiltinGlyphs: boolean +! URxvt*pointerBlankDelay: number +! URxvt*backspacekey: string +! URxvt*deletekey: string +! URxvt*print-pipe: string +! URxvt*modifier: modifier +! URxvt*cutchars: string +! URxvt*answerbackString: string +! URxvt*secondaryScreen: boolean +! URxvt*secondaryScroll: boolean +! URxvt*perl-lib: string +! URxvt*perl-eval: perl-eval +! URxvt*perl-ext-common: string +! URxvt*perl-ext: string +! URxvt*iso14755: boolean +! URxvt*iso14755_52: boolean +! URxvt*xrm: string +! URxvt*keysym.sym: keysym +! URxvt*background.border: boolean +! URxvt*background.expr: string +! URxvt*background.interval: seconds +! URxvt*bell-command: string +! URxvt*kuake.hotkey: string +! URxvt*matcher.button: string +! URxvt*matcher.launcher: string +! URxvt*matcher.launcher.*: string +! URxvt*matcher.pattern.*: string +! URxvt*matcher.rend.*: string +! URxvt*remote-clipboard.fetch: string +! URxvt*remote-clipboard.store: string +! URxvt*searchable-scrollback: string +! URxvt*selection-autotransform.*: string +! URxvt*selection-pastebin.cmd: string +! URxvt*selection-pastebin.url: string +! URxvt*selection.pattern-0: string +! URxvt*tab-bg: colour +! URxvt*tab-fg: colour +! URxvt*tabbar-bg: colour +! URxvt*tabbar-fg: colour +! URxvt*url-launcher: string + +! The Terminus font uses the following X-names: +! -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1 +! -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1 +! -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1 +! -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1 +! -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1 +! -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1 +! -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1 +! -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1 +! -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1 +! -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso10646-1 +! -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1 +! -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso10646-1 +! -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso10646-1 +! -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso10646-1 +! -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso10646-1 diff --git a/root/.bashrc b/root/.bashrc deleted file mode 100644 index 74c5007..0000000 --- a/root/.bashrc +++ /dev/null @@ -1,149 +0,0 @@ -# -# ~/.bashrc -# - -[[ $- != *i* ]] && return - -colors() { - local fgc bgc vals seq0 - - printf "Color escapes are %s\n" '\e[${value};...;${value}m' - printf "Values 30..37 are \e[33mforeground colors\e[m\n" - printf "Values 40..47 are \e[43mbackground colors\e[m\n" - printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" - - # foreground colors - for fgc in {30..37}; do - # background colors - for bgc in {40..47}; do - fgc=${fgc#37} # white - bgc=${bgc#40} # black - - vals="${fgc:+$fgc;}${bgc}" - vals=${vals%%;} - - seq0="${vals:+\e[${vals}m}" - printf " %-9s" "${seq0:-(default)}" - printf " ${seq0}TEXT\e[m" - printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" - done - echo; echo - done -} - -[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion - -# Change the window title of X terminals -case ${TERM} in - xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' - ;; - screen*) - PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' - ;; -esac - -use_color=true - -# Set colorful PS1 only on colorful terminals. -# dircolors --print-database uses its own built-in database -# instead of using /etc/DIR_COLORS. Try to use the external file -# first to take advantage of user additions. Use internal bash -# globbing instead of external grep binary. -safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM -match_lhs="" -[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" -[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ - && match_lhs=$(dircolors --print-database) -[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true - -if ${use_color} ; then - # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 - if type -P dircolors >/dev/null ; then - if [[ -f ~/.dir_colors ]] ; then - eval $(dircolors -b ~/.dir_colors) - elif [[ -f /etc/DIR_COLORS ]] ; then - eval $(dircolors -b /etc/DIR_COLORS) - fi - fi - - if [[ ${EUID} == 0 ]] ; then - PS1='\[\033[01;31m\]\w\[\033[01;31m\] [\t] \$\[\033[00m\] ' - else - PS1='\[\033[01;32m\]\w\[\033[01;32m\] [\t] \$\[\033[00m\] ' - fi - - alias ls='ls --color=auto' - alias grep='grep --colour=auto' - alias egrep='egrep --colour=auto' - alias fgrep='fgrep --colour=auto' -else - if [[ ${EUID} == 0 ]] ; then - # show root@ when we don't have colors - PS1='\u@\h \w [\t] \$ ' - else - PS1='\u@\h \w [\t] \$ ' - fi -fi - -unset use_color safe_term match_lhs sh - -alias cp="cp -i" # confirm before overwriting something -alias df='df -h' # human-readable sizes -alias free='free -m' # show sizes in MB -alias np='nano -w PKGBUILD' -alias more=less - -xhost +local:root > /dev/null 2>&1 - -complete -cf sudo - -# Bash won't get SIGWINCH if another process is in the foreground. -# Enable checkwinsize so that bash will check the terminal size when -# it regains control. #65623 -# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) -shopt -s checkwinsize - -shopt -s expand_aliases - -# export QT_SELECT=4 - -# Enable history appending instead of overwriting. #139609 -shopt -s histappend - -# -# # ex - archive extractor -# # usage: ex -ex () -{ - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar x $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via ex()" ;; - esac - else - echo "'$1' is not a valid file" - fi -} - -[ -f ~/.fzf.bash ] && source ~/.fzf.bash - -# Base16 Shell -BASE16_SHELL="$HOME/.config/base16-shell/" -[ -n "$PS1" ] && \ - [ -s "$BASE16_SHELL/profile_helper.sh" ] && \ - eval "$("$BASE16_SHELL/profile_helper.sh")" - -source /usr/share/nvm/init-vnm.sh diff --git a/root/.profile b/root/.profile deleted file mode 100644 index ef31b5d..0000000 --- a/root/.profile +++ /dev/null @@ -1,20 +0,0 @@ -export VISUAL=/usr/bin/nvim -export EDITOR=/usr/bin/nvim -export BROWSER=/usr/bin/chromium -export QT_QPA_PLATFORMTHEME="qt5ct" -export GTK2_RC_FILES="$HOME/.gtkrc-2.0" -export PYTHONBREAKPOINT=ipdb.set_trace -export JAVA_HOME="/usr/lib/jvm/java-14-openjdk/bin/javac" - - -# cuda stuff -export CUDA_HOME=/opt/cuda -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64 -PATH=${CUDA_HOME}/bin:/home/hjalmarlucius/.local/bin/:${PATH} -export PATH - -# MKL AMD fix -export MKL_DEBUG_CPU_TYPE=5 - -export NVM_DIR="/home/hjalmarlucius/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm diff --git a/root/.tmux.conf b/root/.tmux.conf index 6c90fd6..d1a1d23 100644 --- a/root/.tmux.conf +++ b/root/.tmux.conf @@ -60,9 +60,11 @@ bind c copy-mode # clipboard control bind P paste-buffer bind -T copy-mode-vi v send-keys -X begin-selection -bind -T copy-mode-vi y send-keys -X copy-selection +#bind -T copy-mode-vi y send-keys -X copy-selection +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard" bind -T copy-mode-vi r send-keys -X rectangle-toggle -bind y run-shell -b "tmux show-buffer | xclip -sel clip" \; display-message "Copied tmux buffer to system clipboard" + + # Refresh client bind R refresh-client \; display-message "Refresh already" @@ -86,7 +88,7 @@ bind -r k resize-pane -U 2 \; display-message "Resize up" bind -r j resize-pane -D 2 \; display-message "Resize down" # zoom control -bind -n M-f resize-pane -Z +bind -n M-o resize-pane -Z # split panes using | and -, make sure they open in the same path bind | split-window -h -c "#{pane_current_path}" @@ -95,10 +97,10 @@ bind - split-window -v -c "#{pane_current_path}" # Change layouts bind o rotate-window bind Space next-layout -bind K swap-pane -s {up-of} -bind J swap-pane -s {down-of} -bind H swap-pane -s {left-of} -bind L swap-pane -s {right-of} +bind K swap-pane -d -t "{up-of}" +bind J swap-pane -d -t "{down-of}" +bind H swap-pane -d -t "{left-of}" +bind L swap-pane -d -t "{right-of}" # Choose Window bind w choose-window @@ -130,6 +132,9 @@ bind -n M-0 if-shell 'tmux select-window -t :10' '' 'new-window -t :10' # Kill Selected Pane bind Q kill-pane +# clear selected pane +bind-key b send-keys -R \; clear-history + # present a menu of URLs to open from the visible pane. sweet. bind u capture-pane \;\ save-buffer /tmp/tmux-buffer \;\ diff --git a/root/.zprofile b/root/.zprofile deleted file mode 100644 index d288c6a..0000000 --- a/root/.zprofile +++ /dev/null @@ -1,14 +0,0 @@ -export VISUAL=/usr/bin/nvim -export EDITOR=/usr/bin/nvim -export BROWSER=/usr/bin/chromium -export QT_QPA_PLATFORMTHEME="qt5ct" -export GTK2_RC_FILES="$HOME/.gtkrc-2.0" - -# cuda stuff -export CUDA_HOME=/opt/cuda -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64 -PATH=${CUDA_HOME}/bin:${PATH} -export PATH - -# MKL AMD fix -export MKL_DEBUG_CPU_TYPE=5 diff --git a/root/.zshrc b/root/.zshrc deleted file mode 100644 index 73769f0..0000000 --- a/root/.zshrc +++ /dev/null @@ -1,44 +0,0 @@ -# Lines configured by zsh-newuser-install -HISTFILE=~/.zhistory -HISTSIZE=10000 -SAVEHIST=10000 -setopt nomatch -unsetopt autocd -bindkey -v -# End of lines configured by zsh-newuser-install -# The following lines were added by compinstall -zstyle :compinstall filename '/home/hjalmarlucius/.zshrc' - -autoload -Uz compinit -compinit -# End of lines added by compinstall - -# more history stuff -REPORTTIME=3 # Report command running time if it is more than 3 seconds -setopt INC_APPEND_HISTORY # Add commands to history as they are entered, don't wait for shell to exit -setopt EXTENDED_HISTORY # Also remember command start time and duration -setopt HIST_IGNORE_ALL_DUPS # Do not keep duplicate commands in history -setopt HIST_IGNORE_SPACE # Do not remember commands that start with a whitespace - -# default ls settings -alias ls='ls -hat --group-directories-first' -ls --color=auto &> /dev/null && alias ls='ls --color=auto' -export CLICOLOR=1 - -# fuzzy find -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh -bindkey '^y' fzf-cd-widget - -# configure custom command prompt -_setup_ps1() { - GLYPH="▲" - [ "x$KEYMAP" = "xvicmd" ] && GLYPH="▼" - PS1="%F{red}[%F{cyan}%*%F{red}] %(?.%F{cyan}.%F{red})$GLYPH%f %(1j.%F{cyan}[%j]%f .)%F{cyan}%~%f %(!.%F{red}#%f .)" -} -_setup_ps1 - -# Base16 Shell -BASE16_SHELL="$HOME/.config/base16-shell/" -[ -n "$PS1" ] && \ - [ -s "$BASE16_SHELL/profile_helper.sh" ] && \ - eval "$("$BASE16_SHELL/profile_helper.sh")" diff --git a/zathurarc b/zathura/zathurarc similarity index 100% rename from zathurarc rename to zathura/zathurarc