diff --git a/dot_vim/vimrc b/dot_vim/vimrc new file mode 100644 index 0000000..7d5ca35 --- /dev/null +++ b/dot_vim/vimrc @@ -0,0 +1,298 @@ +" Light backgrounds hurt my eyes. +set background=dark +let mapleader = " " +let $NVIM_TUI_ENABLE_TRUE_COLOR=1 " True gui colors in terminal + +" I speel gud, but I mkae tyops all the tiem. +set spelllang=en_gb + +" VI est mortuus. Vim vivat. +set nocompatible + +" May as well... +set mouse=a +set clipboard=unnamedplus + +" Syntax coloring is a set of guideposts. +syntax on +filetype on +filetype plugin on +filetype indent on + +set synmaxcol=255 + +set grepprg=grep\ -nH\ $* +if filereadable("/usr/bin/rg") + set grepprg=rg\ --vimgrep + set grepformat^=%f:%l:%c:%m +endif + + +" 4-column tabs is the One True Way. +set ts=4 sw=4 sts=4 + +" ... But some people have a hard time being consistent. +set list listchars=tab:>-,trail:- +" I can't count. +set number + +" Fold settings {{{ +set foldenable +set foldclose=all " Close folds if you leave them in any way +set foldcolumn=1 " Show the foldcolumn +set foldlevel=0 " Autofold everything by default +set foldmethod=marker " fold on markers +set foldnestmax=3 +set foldopen=all " Open folds if you touch them in any way +" }}} + +" Convenience makes my fingers happy. +map :silent make\|cwindow\|redraw! +imap :silent make\|cwindow\|redraw!a +" map :cn +nmap g :silent !grunt hogan coffee less +" Use ctrl-[hjkl] to select the active split! +nmap :wincmd k +nmap :wincmd j +nmap :wincmd h +nmap :wincmd l + +" I'm forgetful. +set history=1000 + +" This keeps me centered. +set scrolloff=3 + +" Helps me find things. +set ruler +set showmatch +set incsearch +set hlsearch + +" This was before I found out about \c +set smartcase + +" My, that bottom bar can get cluttered... +set shortmess=atI +set noshowmode + + +set expandtab + +set wildmenu + +" language-specific settings {{{ +autocmd filetype python set expandtab +autocmd filetype pony set expandtab +autocmd filetype php set expandtab +autocmd filetype coffee set expandtab +autocmd filetype mustache set expandtab +autocmd filetype pony set expandtab + +augroup nemerle + au! + autocmd BufNewFile,BufReadPre *.n + \ set fencs=ucs-bom,utf-8,iso-8859-2 fenc=utf-8 +augroup END +" }}} + +augroup Binary + au! + au BufReadPre *.bin let &bin=1 + au BufReadPost *.bin if &bin | %!xxd + au BufReadPost *.bin set ft=xxd | endif + au BufWritePre *.bin if &bin | %!xxd -r + au BufWritePre *.bin endif + au BufWritePost *.bin if &bin | %!xxd + au BufWritePost *.bin set nomod | endif +augroup END + +" cscope seems to work a little better than ctags, but Vim doesn't auto-load +" cscope files like it does ctags files. +if has("cscope") + set cst + set csto=0 + set nocsverb + if filereadable("cscope.out") + cs add cscope.out + elseif $CSCOPE_DB != "" + cs add $CSCOPE_DB + endif + set csverb + + nmap s :cs find s =expand("") + nmap g :cs find g =expand("") + nmap c :cs find c =expand("") + nmap t :cs find t =expand("") + nmap e :cs find e =expand("") + nmap f :cs find f =expand("") + nmap i :cs find i ^=expand("")$ + nmap d :cs find d =expand("") + + nmap s :scs find s =expand("") + nmap g :scs find g =expand("") + nmap c :scs find c =expand("") + nmap t :scs find t =expand("") + nmap e :scs find e =expand("") + nmap f :scs find f =expand("") + nmap i :scs find i ^=expand("")$ + nmap d :scs find d =expand("") + + nmap s :vert scs find s =expand("") + nmap g :vert scs find g =expand("") + nmap c :vert scs find c =expand("") + nmap t :vert scs find t =expand("") + nmap e :vert scs find e =expand("") + nmap f :vert scs find f =expand("") + nmap i :vert scs find i ^=expand("")$ + nmap d :vert scs find d =expand("") +endif + +set tags=./tags,tags + +let ComniCpp_MayCompleteDot=1 +let ComniCpp_MayCompleteArrow=1 +let ComniCpp_MayCompleteScope=1 + +set completeopt=longest,menu + +" Search paths for completions. +" Starting with local files and the default includes +set path+=**,/usr/include +" KDE-specific +set path+=/usr/include/KDE,/usr/include/qt4 +" boost +set path+=/usr/include/boost + +set grepprg=grep\ -nH\ $* +let g:tex_flavor = "latex" +let g:clang_library_path = '/usr/lib' +let g:clang_auto_select = 1 +let g:clang_complete_auto = 1 +let g:clang_complete_macros = 1 + +let g:proj_flags='imstS' +let g:ale_completion_enabled = 1 +"set omnifunc=ale#completion#OmniFunc + +" I often forget to use sudoedit. Much to my chagrin. +cmap w!! %!sudo tee > /dev/null % + +" Plugins {{{ +" note: run :PlugUpgrade | PlugInstall | PlugUpdate +call plug#begin('~/.vim/plugged') + +"" if these are uncommented I started working with C :( +" Plug 'Rip-Rip/clang_complete', { 'for': ['cpp', 'cpp11', 'c'], 'do': 'make install' } +" Plug 'vim-scripts/ctx' + +" I don't need NERDTree +Plug 'ctrlpvim/ctrlp.vim' +" Make things look pretty +Plug 'morhetz/gruvbox' +Plug 'vim-airline/vim-airline-themes' +Plug 'vim-airline/vim-airline' +Plug 'kien/rainbow_parentheses.vim' +Plug 'jaxbot/semantic-highlight.vim' +" Sessions +Plug 'shemerey/vim-project' +Plug 'tpope/vim-surround' +"I like ALE but it doesn't like me :( +Plug 'dense-analysis/ale' +Plug 'prabirshrestha/vim-lsp' +Plug 'mattn/vim-lsp-settings' +Plug 'prabirshrestha/asyncomplete.vim' +Plug 'prabirshrestha/asyncomplete-lsp.vim' +Plug 'rhysd/vim-lsp-ale' +"Snippets because I am lazy +Plug 'hrsh7th/vim-vsnip' +Plug 'hrsh7th/vim-vsnip-integ' +Plug 'rafamadriz/friendly-snippets' +"Rust my beloved +Plug 'rust-lang/rust.vim' +"Lamtex Rabbit hole +Plug 'lervag/vimtex' +"Personal wiki? +Plug 'vimwiki/vimwiki' + + +call plug#end() +" Vimtex shi +let g:vimtex_view_method = 'zathura' + +let g:ale_sign_error = '>>' +let g:ale_sign_warning = '--' +let g:ale_fixers = { + \ '*': ['remove_trailing_lines', 'trim_whitespace'], +\ 'javascript': ['eslint'], +\ 'rust': ['rustfmt'], +\} +let g:rustfmt_autosave = 1 +let g:rust_clip_command = 'xclip -selection clipboard' + +"let g:ale_linters = {'rust': ['rust-analyzer', 'cargo']} +let g:ale_fix_on_save = 1 + +" Tab Completion +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? asyncomplete#close_popup() : "\" +"let g:vimwiki_list = [{'path': '~/Dropbox/vimwiki/', 'path_html': '~/public_html/'}] + +au VimEnter * RainbowParenthesesToggle +au Syntax * RainbowParenthesesLoadRound +au Syntax * RainbowParenthesesLoadSquare +au Syntax * RainbowParenthesesLoadBraces +" }}} + +au BufReadPost,FileReadPost,BufNewFile * call system("tmux rename-window 'vim | " . expand("%:t") . "'") + +au BufNewFile,BufRead *.cpp set syntax=cpp11 +au BufNewFile,BufRead *.hpp set syntax=cpp11 +au BufNewFile,BufRead *.mustache set ft=html + +" Everything else looks like crap. +colorscheme gruvbox +let g:airline#extensions#tabline#enabled = 1 +let g:airline_theme='base16_gruvbox_dark_hard' +"{{{ unicode symbols +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif + +"" unicode symbols +"let g:airline_left_sep = 'Β»' +"let g:airline_left_sep = 'β–Ά' +"let g:airline_right_sep = 'Β«' +"let g:airline_right_sep = 'β—€' +"let g:airline_symbols.crypt = 'πŸ”’' +"let g:airline_symbols.linenr = '☰' +"let g:airline_symbols.linenr = '␊' +"let g:airline_symbols.linenr = '␀' +"let g:airline_symbols.linenr = 'ΒΆ' +"let g:airline_symbols.maxlinenr = '' +"let g:airline_symbols.maxlinenr = '㏑' +"let g:airline_symbols.branch = 'βŽ‡' +"let g:airline_symbols.paste = 'ρ' +"let g:airline_symbols.paste = 'Þ' +"let g:airline_symbols.paste = 'βˆ₯' +"let g:airline_symbols.spell = 'Ꞩ' +"let g:airline_symbols.notexists = 'Ι†' +"let g:airline_symbols.whitespace = 'Ξ' + +" powerline symbols +let g:airline_left_sep = 'ξ‚°' +let g:airline_left_alt_sep = 'ξ‚±' +let g:airline_right_sep = 'ξ‚²' +let g:airline_right_alt_sep = 'ξ‚³' +let g:airline_symbols.branch = 'ξ‚ ' +let g:airline_symbols.readonly = 'ξ‚’' +let g:airline_symbols.linenr = '☰' +let g:airline_symbols.maxlinenr = 'ξ‚‘' +let g:airline_powerline_fonts = 1 +let g:wintabs_powerline_arrow_left = " \u25c0 " +let g:wintabs_powerline_sep_tab_transition = "\ue0b2" +let g:wintabs_powerline_sep_buffer = "\ue0b1" +let g:wintabs_powerline_sep_tab_transition = "\ue0b2" +highlight link WintabsEmpty TabLineFill +"}}} diff --git a/dot_zshrc b/dot_zshrc index ce5fbfa..55d02e5 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -143,4 +143,9 @@ export MPD_HOST=127.0.0.1 export MPD_PORT=6969 export EDITOR=nvim - +function reload_gtk_theme() { + theme=$(gsettings get org.gnome.desktop.interface gtk-theme) + gsettings set org.gnome.desktop.interface gtk-theme '' + sleep 1 + gsettings set org.gnome.desktop.interface gtk-theme $theme +} diff --git a/private_dot_config/i3/misc.conf b/private_dot_config/i3/misc.conf index 4181f93..6c3df13 100644 --- a/private_dot_config/i3/misc.conf +++ b/private_dot_config/i3/misc.conf @@ -1,22 +1,29 @@ -#The best hot key ever -bindsym ctrl+$mod+v exec firefox https://www.youtube.com/watch?v=dQw4w9WgXcQ -#disable mouse binds -#bindsym $mod+shift+a exec ~/scripts/mouse.sh -0.5 0 -#bindsym $mod+shift+b exec ~/scripts/mouse.sh -0.5 1 +#The best hot key ever +bindsym ctrl+$mod+v exec firefox https://www.youtube.com/watch?v=dQw4w9WgXcQ +#disable mouse binds +#bindsym $mod+shift+a exec ~/scripts/mouse.sh -0.5 0 +#bindsym $mod+shift+b exec ~/scripts/mouse.sh -0.5 1 -#This is Wallpaper -exec_always --no-startup-id nitrogen --restore +#This is Wallpaper +exec_always --no-startup-id nitrogen --restore # Media Controls bindsym $mod+F3 exec --no-startup-id playerctl next bindsym $mod+F2 exec --no-startup-id playerctl play-pause bindsym $mod+F1 exec --no-startup-id playerctl previous -#polybar +#polybar exec_always ~/.config/polybar/launch.sh --blocks #bar { -# status_command i3status -# tray_output primary +# font pango:DejaVU Sans Mono, PowerlineSymbols 12 +# status_command i3status-rs +# position top +# output primary +# tray_output none +# +# colors { +# +# } # } #picom @@ -39,8 +46,8 @@ exec_always setxkbmap -option "compose:ralt" -layout us -option "caps:escape" # FUCK YOU MICROSOFT (thank you copilot) # exec_always --no-startup-id xmodmap ~/.Xmodmap -#Useful thing to switch back when you press same switcher key -workspace_auto_back_and_forth yes +#Useful thing to switch back when you press same switcher key (this breaks the spotify move to workspace rule) +#workspace_auto_back_and_forth yes # dunstctl binds #bindsym Ctrl+space exec --no-startup-id dunstctl close-all diff --git a/private_dot_config/i3/window_rules.conf b/private_dot_config/i3/window_rules.conf index 711d12f..3026445 100644 --- a/private_dot_config/i3/window_rules.conf +++ b/private_dot_config/i3/window_rules.conf @@ -1,29 +1,29 @@ #Workspaces to monitors -workspace $Terminal output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 -workspace $Browsers output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 -workspace $Code output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 +workspace $Terminal output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 +workspace $Browsers output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 +workspace $Code output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 workspace $IRC output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 -workspace $Media output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 -workspace $Reading output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 +workspace $Media output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 +workspace $Reading output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 workspace $Youtube output primary HDMI-0 DP-3 DVI-D-0 DVI-I-1 DP-0 -workspace $Steam output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 -workspace $Vm output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 -workspace $Notes output DP-0 primary HDMI-0 DP-3 DVI-D-0 DVI-I-1 -workspace $Game output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 +workspace $Steam output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 +workspace $Vm output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 +workspace $Notes output DP-0 primary HDMI-0 DP-3 DVI-D-0 DVI-I-1 +workspace $Game output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1 workspace $Mail output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0 -#Window Rules +#Window Rules #Terminal -assign [class = "kitty"] $Terminal +assign [class = "kitty"] $Terminal assign [class = "qutebrowser"] $Terminal for_window [title = "Mozilla Firefox (Private Browsing)"] move to workspace $Vm #Browsers -assign [class = "firefox"] $Browsers +assign [class = "firefox"] $Browsers assign [class = "Microsoft-edge"] $Browsers assign [class = "Nemo"] $Browsers assign [class ="Pavucontrol"] $Browsers @@ -34,7 +34,7 @@ assign [class = "jetbrains-studio"] $Code assign [class = "neovide"] $Code #Ircs -assign [class = "discord"] $IRC +assign [class = "discord"] $IRC assign [class = "Telegram"] $IRC #Media @@ -46,20 +46,21 @@ assign [class = "rnote"] $Media assign [class = "kdenlive"] $Media #Reading -assign [class = "Zathura"] $Reading +assign [class = "Zathura"] $Reading #Youtube/Vidyas assign [class = "FreeTube"] $Youtube assign [class = "mpv"] $Youtube - + #Game Launchers -assign [class = "heroic"] $Steam -assign [class = "Steam"] $Steam +assign [class = "heroic"] $Steam +assign [class = "Steam"] $Steam assign [class = "Lutris"] $Steam assign [class = "r2modman"] $Steam assign [class = "MultiMC"] $Steam assign [class = "Artix Game Launcher"] $Steam assign [class = "battle.net.exe"] $Steam +assign [class = "PrismLauncher"] $Steam #Notes assign [class = "obsidian"] $Notes @@ -76,8 +77,8 @@ assign [class = "^.*steam"] $Game assign [class = "overwatch.exe"] $Game #Mail -assign [class = "Evolution"] $Mail -assign [class = "thunderbird"] $Mail +assign [class = "Evolution"] $Mail +assign [class = "thunderbird"] $Mail assign [class = "Virt-manager"] $Vm assign [class = "Google-chrome"] $Vm @@ -86,7 +87,7 @@ assign [class = "Chromium-browser"] $Vm #More Rules #Classes -for_window [class = "Spotify"] move to workspace $IRC +for_window [class = "Spotify"] move to workspace $IRC for_window [class = "AppRun.wrapped"] floating enabled for_window [class = "Soundux"] floating enabled for_window [class = "Nemo"] floating enabled @@ -98,7 +99,7 @@ for_window [class = "flameshot"] floating enabled #Workspaces -for_window [workspace = $Browsers] layout splitv +for_window [workspace = $Browsers] layout splitv #for_window [workspace = $Steam] floating enabled for_window [workspace = $Steam] layout splitv #for_window [workspace = $Youtube] floating enabled @@ -109,9 +110,10 @@ for_window [class = "XTerm"] floating enabled for_window [class = "org.opensuse.YaST"] floating enabled #Names -for_window [title = "ani-cli"] move to workspace $Youtube +for_window [title = "ani-cli"] move to workspace $Youtube for_window [title = "^.*Private"] move to workspace $Vm -#for_window [title = "manga-cli"] move to workspace $Youtube +for_window [title = "work" class = "kitty"] move to workspace $Code +#for_window [title = "manga-cli"] move to workspace $Youtube # Roles (Thanks greyfade :D) for_window [window_role="pop-up"] floating enable diff --git a/private_dot_config/ranger/rc.conf b/private_dot_config/ranger/rc.conf index dcdc33b..0d5223d 100644 --- a/private_dot_config/ranger/rc.conf +++ b/private_dot_config/ranger/rc.conf @@ -757,3 +757,4 @@ tmap eval -q fm.ui.taskview.task_remove() tmap redraw_window tmap taskview_close copytmap q Q w +default_linemode devicons