diff options
-rw-r--r-- | alacritty/alacritty.yml | 26 | ||||
-rw-r--r-- | bash/.bash/01-aliases.bash | 14 | ||||
-rw-r--r-- | bash/.bash/02-prompt.bash | 21 | ||||
-rw-r--r-- | bash/.bash_profile | 1 | ||||
-rw-r--r-- | dunst/dunstrc | 2 | ||||
-rwxr-xr-x | update.sh | 2 | ||||
-rw-r--r-- | vim/.vimrc | 52 | ||||
-rw-r--r-- | vim/coc-settings.json | 45 | ||||
-rw-r--r-- | x/.xinitrc | 7 | ||||
-rw-r--r-- | x/.xinitrc-not-docked | 14 |
10 files changed, 144 insertions, 40 deletions
diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index 4172dbf..df55e76 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -1,15 +1,31 @@ font: normal: family: JetBrains Mono Nerd Font + # family: SF Mono + # family: Roboto Mono + # family: Monocraft + # family: Scientifica style: Regular bold: family: JetBrains Mono Nerd Font + # family: SF Mono + # family: Roboto Mono + # family: Monocraft + # family: Scientifica style: Bold italic: family: JetBrains Mono Nerd Font + # family: SF Mono + # family: Roboto Mono + # family: Monocraft + # family: Scientifica style: Italic bold_italic: family: JetBrains Mono Nerd Font + # family: SF Mono + # family: Roboto Mono + # family: Monocraft + # family: Scientifica style: Bold Italic size: 11 @@ -22,7 +38,7 @@ window: padding: x: 7 y: 7 - # opacity: 0.95 + opacity: 0.70 mouse: hide_when_typing: true @@ -85,8 +101,8 @@ mouse: colors: primary: background: '#282828' -# background: '#3c3836' -# background: '#32302f' + # background: '#3c3836' + # background: '#32302f' # background: '#000000' foreground: '#fbf1c7' @@ -101,8 +117,10 @@ colors: white: '#a89984' bright: - black: '#928374' + # black: '#928374' + black: '#7c6f64' red: '#fb4934' + # red: '#fe8019' green: '#b8bb26' yellow: '#fabd2f' blue: '#83a598' diff --git a/bash/.bash/01-aliases.bash b/bash/.bash/01-aliases.bash index 94734e2..8135a40 100644 --- a/bash/.bash/01-aliases.bash +++ b/bash/.bash/01-aliases.bash @@ -53,18 +53,18 @@ alias ed='fzf --height=15 --layout=reverse | sed "s/^/\"/g;s/$/\"/g" | xargs -ro alias dj='python manage.py' alias smci='sudo make clean install' alias smi='sudo make install' -alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/volcano-landscape.jpg' -alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto' +alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg && xmodmap ~/.Xmodmap' +alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg' +alias hgrep='history | grep' alias keys='xset r rate 300 50' alias gits='git status' +alias mac="rm -rf __MACOSX/; rm \$(find . -name '.DS_Store')" +alias super='xmodmap -e "remove mod1 = Alt_L"; xmodmap -e "remove mod4 = Super_L"; xmodmap -e "add mod1 = Super_L"; xmodmap -e "add mod4 = Alt_L"' +alias make-kernel='sudo genkernel --kernel-config=/proc/config.gz all && sudo grub-mkconfig -o /boot/grub/grub.cfg' # bash navigation alias aa='vim ~/.bash/01-aliases.bash; . ~/.bash_profile' -s() { - find . -type f -exec grep ${1} {} \; -} - ssh-pixel() { ssh -p 8022 uO_14O@${1} } @@ -73,12 +73,12 @@ ssh-pixel() { alias fixwifi='sudo rc-service wpa_supplicant restart' alias fixaudio='pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo' alias fixjava='export _JAVA_AWT_WM_NONREPARENTING=1 && export AWT_TOOLKIT=MToolkit && wmname LG3D' +alias fixkeb='xmodmap ~/.Xmodmap ; xset r rate 200 80 ' # auto elevate alias mount='sudo mount' alias umount='sudo umount' # other garbage -alias macos="cd /home/bryson/git/macOS-Simple-KVM && ./basic.sh" alias server="python3 /home/bryson/git/webserver/server.py" diff --git a/bash/.bash/02-prompt.bash b/bash/.bash/02-prompt.bash index 603b292..8181d33 100644 --- a/bash/.bash/02-prompt.bash +++ b/bash/.bash/02-prompt.bash @@ -48,7 +48,8 @@ color4='\e[38;5;226m' function exit_code() { local ERROR="$?" if [[ ERROR -ne 0 ]]; then - echo -n '\['"$RED"'\]'"$ERROR"' ' + echo -n '\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]!' + # echo -n '\['"$RED"'\]'"$ERROR"' ' fi } @@ -75,11 +76,15 @@ function _git_prompt() { echo local`" fi if ! [[ "$branch" =~ local ]]; then - echo -n '\['"$color"'\] ('"$ansi"''"$branch"') ' + # echo -n '\['"$color"'\] ('"$ansi"''"$branch"') ' + echo -n '\['"$dgray"'\]#\['"$color"'\]'"$branch"''"$ansi"'' fi fi } +export -f exit_code +export -f _git_prompt + # prompt building # (2 unicode)[ bryson@hostname ] { /current/path } # (unicode) $ @@ -108,12 +113,18 @@ function _git_prompt() { # [ hostname ] Thu Mar 25, 10:00:00 AM, /dev/pts/0 # { /current/path } 8 files, 64 KB (master) # $ -export _PS1="\[$lgray\][ \[$LBLUE\]\h\[$lgray\] ] \[$LCYAN\]\d, \[$GREEN\]\T" -export _PS2="\[$lgray\]{ \[$LYELLOW\]\w\[$lgray\] }" +# export _PS1="\[$lgray\][ \[$LMAGENTA\]\h\[$lgray\] ] \[$LYELLOW\]\d, \[$LRED\]\T" +# export _PS2="\[$lgray\]{ \[$CYAN\]\w\[$lgray\] }" + +# bryson@dingo:/current/path:master +# $ +# +export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w" # define x titlebar TITLEBAR='\[\033]0;\u@\h:\w ($(history 1 | cut -c 8-))\]' # apply prompt and functions -export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a' +# export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a' +export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}$(_git_prompt)\n\[$NC\]\$ ";history -a' diff --git a/bash/.bash_profile b/bash/.bash_profile index d006e75..c93170e 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -15,6 +15,5 @@ export BROWSER=/usr/bin/librewolf-bin export PATH complete -cf doas -source /usr/share/autojump/autojump.bash source /usr/share/bash-completion/completions/fzf source /usr/share/fzf/key-bindings.bash diff --git a/dunst/dunstrc b/dunst/dunstrc index 013420d..58acd1c 100644 --- a/dunst/dunstrc +++ b/dunst/dunstrc @@ -290,7 +290,7 @@ # * context_all: Open context menu for all notifications. # These values can be strung together for each mouse event, and # will be executed in sequence. - mouse_left_click = do_action, close_current + mouse_left_click = close_current mouse_middle_click = do_action, close_current mouse_right_click = close_all @@ -1,6 +1,7 @@ #!/bin/sh # important config files +echo copying files... cp ~/.config/alacritty.yml ./alacritty/alacritty.yml cp -r ~/.bash ./bash cp ~/.bash_profile ./bash @@ -20,5 +21,6 @@ cp ~/.config/dunst/dunstrc ./dunst cp ~/.config/htop/htoprc ./htop # update submodules +echo pulling submodules... git submodule update --remote --merge @@ -8,8 +8,8 @@ call plug#begin() Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'itchyny/lightline.vim' Plug 'jceb/vim-orgmode' - Plug 'tpope/vim-speeddating' - Plug 'ryanoasis/vim-devicons' + " Plug 'tpope/vim-speeddating' + Plug 'ryanoasis/vim-devicons' Plug 'tiagofumo/vim-nerdtree-syntax-highlight' Plug 'lervag/vimtex' Plug 'preservim/nerdtree' @@ -17,6 +17,8 @@ call plug#begin() Plug 'tpope/vim-commentary' Plug 'godlygeek/tabular' Plug 'preservim/vim-markdown' + " Plug 'Yggdroot/indentLine' + Plug 'junegunn/fzf.vim' call plug#end() @@ -28,20 +30,23 @@ set relativenumber set bg:dark set mouse=a set tabstop=2 softtabstop=2 shiftwidth=2 expandtab +set formatoptions-=t set linebreak set cursorline +" set cursorcolumn set backspace=indent,eol,start set laststatus=2 set wildmenu set scrolloff=5 set incsearch set ttimeout ttimeoutlen=25 -set showtabline=2 +" set showtabline=2 set undodir=~/.vim/undo-dir set undofile set backupdir=$HOME/.vim/backups set noshowmode set showcmd +" set termguicolors " set clipboard=unnamedplus " lets @@ -53,6 +58,7 @@ let g:python_recommended_style = 0 let g:NERDTreeFileExtensionHighlightFullName = 1 let g:NERDTreeExactMatchHighlightFullName = 1 let g:NERDTreePatternMatchHighlightFullName = 1 +let g:NERDTreeWinPos = 'right' let g:org_heading_shade_leading_stars = 0 let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_new_list_item_indent = 2 @@ -60,8 +66,18 @@ let g:vim_markdown_new_list_item_indent = 2 " colorscheme stuff colorscheme gruvbox -" fix colorscheme colors +" set specific colors hi Normal ctermbg=NONE +hi Normal guibg=NONE +hi CocUnderline gui=undercurl cterm=underline +hi CocInfoHighlight cterm=underline +hi CocErrorHighlight ctermfg=red gui=underline cterm=underline +hi CocWarningHighlight ctermfg=yellow gui=underline cterm=underline +hi MatchParen cterm=bold ctermfg=cyan + +" Custom commands +command Fixtabs :%s/ / /g | echo 'tabs replaced with spaces (like a good programmer)' +command Clipboard :yank + | echo 'Yanked line into system clipboard' " remaps nnoremap <SPACE> <Nop> @@ -72,14 +88,17 @@ nnoremap <leader>x :wq<CR> nnoremap <leader>b :e#<CR> nnoremap <leader>e :e<CR> nnoremap <leader>c gcc<CR> +nnoremap <leader>y :noh<CR> nnoremap <leader>u :tabp<CR> nnoremap <leader>o :tabn<CR> +nnoremap <leader>r :Clipboard<CR> nnoremap <leader>h :wincmd h<CR> nnoremap <leader>j :wincmd j<CR> nnoremap <leader>k :wincmd k<CR> nnoremap <leader>l :wincmd l<CR> nnoremap <leader>n :NERDTreeFocus<CR> nnoremap <leader>t :NERDTreeToggle<CR> +nnoremap <leader>f :Files .<CR> nnoremap <leader>p :wincmd p<CR> nnoremap <leader>v :set paste! number! relativenumber!<CR> nnoremap <leader>i :CocCommand clangd.switchSourceHeader<CR> @@ -93,13 +112,13 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr " Close the tab if NERDTree is the only window remaining in it. autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif " Open the existing NERDTree on each new tab. -autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif +" autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif " turn on spell checker for certain files autocmd FileType markdown setlocal spell autocmd FileType org setlocal spell hi clear SpellBad -hi SpellBad cterm=underline ctermbg=DARKRED +hi SpellBad cterm=underline ctermfg=red hi clear SpellRare hi SpellRare cterm=underline hi clear SpellCap @@ -124,6 +143,17 @@ function! CheckBackspace() abort return !col || getline('.')[col - 1] =~# '\s' endfunction +function! HumanSize() abort + let l:bytes = line2byte('$') + len(getline('$')) + let l:sizes = ['B', 'KB', 'MB', 'GB'] + let l:i = 0 + while l:bytes >= 1024 + let l:bytes = l:bytes / 1024.0 + let l:i += 1 + endwhile + return printf('%.0f%s', l:bytes, l:sizes[l:i]) +endfunction + " lightline config if expand('$UID') == 0 let g:lightline = { @@ -133,11 +163,12 @@ if expand('$UID') == 0 \ [ 'filename', 'readonly', 'modified' ], \ [ 'gitbranch'] ], \ 'right': [ [ 'lineinfo' ], - \ [ 'fileformat', 'filetype' ], + \ [ 'filesize', 'fileformat', 'filetype' ], \ [ 'percent' ] ] \ }, \ 'component_function': { - \ 'gitbranch': 'gitbranch#name' + \ 'gitbranch': 'gitbranch#name', + \ 'filesize': 'HumanSize' \ }, \ } let g:lightline.component = { @@ -151,11 +182,12 @@ else \ [ 'filename', 'readonly', 'modified' ], \ [ 'gitbranch'] ], \ 'right': [ [ 'lineinfo' ], - \ [ 'fileformat', 'filetype' ], + \ [ 'filesize', 'fileformat', 'filetype' ], \ [ 'percent' ] ] \ }, \ 'component_function': { - \ 'gitbranch': 'gitbranch#name' + \ 'gitbranch': 'gitbranch#name', + \ 'filesize': 'HumanSize' \ }, \ } let g:lightline.component = { diff --git a/vim/coc-settings.json b/vim/coc-settings.json index 3fb81bc..1d2393a 100644 --- a/vim/coc-settings.json +++ b/vim/coc-settings.json @@ -1,11 +1,41 @@ { - "semanticTokens.filetypes": ["*"], + "semanticTokens.filetypes": ["*"], + "semanticTokens.enable": true, + "documentHighlight.priority": 2049, + "coc.preferences.enableMarkdown": false, "suggest.completionItemKindLabels": { - "text": "t", - "method": "m", - "function": "" + "text": "", + "method": "", + "function": "", + "constructor": "", + "field": "", + "variable": "", + "class": "", + "interface": "", + "module": "", + "property": "", + "unit": "", + "value": "", + "enum": "", + "keyword": "", + "snippet": "", + "color": "", + "file": "", + "reference": "", + "folder": "", + "enumMember": "", + "constant": "", + "struct": "", + "event": "", + "operator": "", + "typeParameter": "", + "default": "" }, - "java.home": "/usr/local/java/jdk-18.0.1.1", + "diagnostic.hintSign": "", + "diagnostic.infoSign": "", + "diagnostic.errorSign": "", + "diagnostic.warningSign": "", + "java.jdt.ls.java.home": "/usr/local/java/jdk-18.0.1.1", "java.configuration.runtimes": [ { "name": "JavaSE-18", @@ -16,12 +46,14 @@ "java.referencesCodeLens.enabled": true, "java.implementationsCodeLens.enabled": true, "java.completion.enabled": true, + "colors.enable": true, "perl": { "enable": true, "debugAdapterPort": "13604", "logLevel": 1 }, "java.jdt.ls.vmargs": "-noverify -Xmx6G -XX:+UseG1GC -XX:+UseStringDeduplication", + "java.project.referencedLibraries": ["*.jar"], "languageserver": { "csharp-ls": { "command": "csharp-ls", @@ -29,5 +61,6 @@ "rootPatterns": ["*.csproj", ".vim/", ".git/", ".hg/"] } }, - "suggest.noselect": true + "suggest.noselect": true, + "inlayHint.display": false } @@ -41,7 +41,7 @@ fi /usr/bin/dunst & # open picom compositor -#picom --config ~/.config/picom.conf & +picom --config ~/.config/picom.conf & #spotifyd & @@ -49,7 +49,8 @@ fi sh ~/.config/screenlayout.sh & # set default audio device to be dock audio jack -pulseaudio -k && pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo & +pulseaudio -k & +pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo & # add weather, date and time to xsetroot #sh ~/bin/xsetloop-docked.sh & @@ -69,7 +70,7 @@ keepassxc ~/.passwords/Passwords.kdbx & # set up wallpapers #wallpapers.sh & -feh --bg-fill git/wallpapers-exorcist/gruvbox/canyon.jpg git/wallpapers-exorcist/gruvbox/canyon.jpg & +feh --bg-fill git/wallpapers-exorcist/gruvbox/mountains-2.jpg git/wallpapers-exorcist/gruvbox/mountains-2.jpg & # if unicomp keyboard detected, turn alt into super if $(lsusb | grep -qi "Unicomp"); then diff --git a/x/.xinitrc-not-docked b/x/.xinitrc-not-docked index fef3ae5..d218b61 100644 --- a/x/.xinitrc-not-docked +++ b/x/.xinitrc-not-docked @@ -41,7 +41,7 @@ fi /usr/bin/dunst & # start picom compositor -#picom --config ~/.config/picom.conf & +picom --config ~/.config/picom.conf & #spotifyd & @@ -56,7 +56,7 @@ pacmd set-default-sink alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink & pacmd set-sink-volume alsa_output.pci-0000_03_00.6.HiFi__hw_Generic_1__sink 0 & # set up wallpaper -feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/volcano-landscape.jpg +feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/books.jpg # apply Xresources xrdb -merge ~/.Xresources @@ -73,7 +73,15 @@ xrandr --output eDP --auto --set TearFree on --output HDMI-A-0 --set TearFree on # start keepassxc for passwords keepassxc ~/.passwords/Passwords.kdbx & +# if logitech keyboard detected, turn alt into super +if $(lsusb | grep -qi "Logitech Mechanical Keyboard"); then + xmodmap -e "remove mod1 = Alt_L" + xmodmap -e "remove mod4 = Super_L" + xmodmap -e "add mod1 = Super_L" + xmodmap -e "add mod4 = Alt_L" +fi + # start dwm redshift & -xset r rate 200 80 +xset r rate 300 80 exec /home/bryson/bin/startdwm.sh |