From 64da4c30d8bcaf6583e8a404273157024e876842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Fri, 2 Aug 2019 11:47:53 +0200 Subject: [PATCH] More Sway stuff --- bash/.bashrc | 23 +++++- neovim/.config/nvim/init.vim | 98 ++++++++++++++++-------- rofi/.config/rofi/config | 3 +- sway/.config/sway/config | 13 +--- sway/.config/sway/scripts/laptop-sway.sh | 1 + termite/.config/termite/config | 3 +- waybar/.config/waybar/home-config | 1 + waybar/.config/waybar/style.css | 2 +- waybar/.config/waybar/work-config | 3 +- 9 files changed, 97 insertions(+), 50 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index 5833cc7..b8eecf3 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -114,8 +114,7 @@ shopt -s expand_aliases shopt -s histappend #Bash Completion for OC -source ~/.oc_completion.sh -source ~/.alias_completion.sh +source <(/home/jfm/Tools/openshift-origin-client/oc completion bash) #AWS Completion complete -C '/usr/bin/aws_completer' aws @@ -128,9 +127,21 @@ GIT_PS1_SHOWDIRTYSTATE="auto" GIT_PS1_SHOWCOLORHINTS="auto" GIT_PS1_SHOWUNTRACKEDFILES="auto" GIT_PS1_STATESEPARATOR=" " +#Kubernetes Config +KUBE_PS1_BINARY=/home/jfm/Tools/openshift-origin-client/oc +KUBE_PS1_PREFIX= +KUBE_PS1_SUFFIX= +KUBE_PS1_SEPARATOR= +function get_cluster_short() { + echo "$1" | cut -d / -f2 | cut -d : -f1 | cut -d - -f1 +} + +KUBE_PS1_CLUSTER_FUNCTION=get_cluster_short + source /usr/share/git/completion/git-prompt.sh +source ~/Repositories/GitHub/kube-ps1/kube-ps1.sh eval "$(pipenv --completion)" -PS1='\[\e[1;32m\u@\h \e[1;34m\w\]\n\[\e[1;33m\]$(__git_ps1 "(%s) ")\[\e[m\]⇨ ' +PS1='\[\e[1;32m\u@\h \e[1;34m\w\]\n\[\e[1;33m\]$(__git_ps1 "(%s) ")\[\e[m\]$(kube_ps1) ' #Disable some CTRL for VIM commands bind -r '\C-s' @@ -158,9 +169,15 @@ alias vim="nvim" alias vi="nvim" alias rtv="rtv --enable-media" alias spin="spin -k" +alias dnote="/home/jfm/Tools/dnote/dnote" alias k9s="/home/jfm/Tools/k9s/k9s" +alias kubectx="/home/jfm/Repositories/GitHub/kubectx/kubectx" alias buildtool="/home/jfm/.buildtool/bin/buildtool" alias vpnup="nmcli con up id \"YouSee VPN\"" alias vpndown="nmcli con down id \"YouSee VPN\"" [ -f ~/.fzf.bash ] && source ~/.fzf.bash + +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="/home/jfm/.sdkman" +[[ -s "/home/jfm/.sdkman/bin/sdkman-init.sh" ]] && source "/home/jfm/.sdkman/bin/sdkman-init.sh" diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index b5e623f..bee3178 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -15,48 +15,81 @@ set background=dark set rtp^=/usr/share/vim/vimfiles/ set undodir=~/.local/share/nvim/undodir set undofile -"set wildoptions=pum -"set pumblend=20 +set colorcolumn=80 +set foldmethod=syntax +set foldlevelstart=20 "Plugins call plug#begin('~/.local/share/nvim/plugged') + " Pretty Status Lines Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' + +" Buffers +Plug 'jlanzarotta/bufexplorer' + " Completion -Plug 'Shougo/deoplete.nvim' -Plug 'zchee/deoplete-jedi' -Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' +Plug 'epilande/vim-react-snippets' +Plug 'neoclide/coc.nvim', {'do': './install.sh'} + " Colorscheme Plug 'arcticicestudio/nord-vim' + " Pretty parenthesis Plug 'luochen1990/rainbow' -" Terminal -Plug 'https://gitlab.com/Lenovsky/nuake.git' + " File handling +Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' + " Python Plug 'numirias/semshi' Plug 'w0rp/ale' Plug 'ambv/black' + " HTML Plug 'jonsmithers/vim-html-template-literals' Plug 'mxw/vim-jsx' Plug 'pangloss/vim-javascript' Plug 'alvan/vim-closetag' + +" Testing +Plug 'janko/vim-test' call plug#end() colorscheme nord "Airline -let g:airline#extensions#tabline#enabled = 1 -let g:Powerline_symbols='unicode' +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif +let g:airline#extensions#tabline#enabled = 0 let g:airline_theme='nord' +let g:airline_symbols.maxlinenr = '' -" Deoplete -let g:deoplete#enable_at_startup = 1 +" BufExplorer +nnoremap :BufExplorerVerticalSplit +nnoremap :bn +nnoremap :bp + +" CoC +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +inoremap coc#refresh() + +" Testing +nmap :TestNearest +nmap t :TestNearest +nmap :TestFile +nmap t :TestFile +nmap t :TestSuite +nmap t :TestLast +nmap t :TestVisit " Syntastic let g:syntastic_python_checkers = ['python'] @@ -64,11 +97,6 @@ let g:syntastic_python_checkers = ['python'] "Rainbow Parentheses let g:rainbow_active = 1 -" Ultisnips -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" - " HTML let g:closetag_filenames = '*.html,*.js' let g:html_indent_style1 = "inc" @@ -76,21 +104,28 @@ let g:html_indent_style1 = "inc" " Black autocmd BufWritePre *.py execute ':Black' -" FZF -let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""' -command! -bang -nargs=? -complete=dir HFiles - \ call fzf#vim#files(, {'source': 'ag --hidden --ignore .git -g ""'}, 0) -map :Files -map :HFiles +" Defx +map :Defx -toggle -split=vertical -winwidth=40 +autocmd FileType defx call s:defx_my_settings() +function! s:defx_my_settings() abort + nnoremap + \ defx#is_directory() ? defx#do_action('open') : + \ defx#do_action('multi', ['drop', 'quit']) + nnoremap + \ defx#do_action('cd', '..') + nnoremap + \ defx#do_action('toggle_ignored_files') +endfunction -" Nuake -let g:nuake_position = 'bottom' -let g:nuake_per_tab = 1 -nnoremap :Nuake -inoremap :Nuake -tnoremap :Nuake +" FZF +let $FZF_DEFAULT_COMMAND = 'ag --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""' +command! -bang -nargs=? -complete=dir HFiles + \ call fzf#vim#files(, {'source': 'ag --hidden --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""'}, 0) +map :Files +map :HFiles "Mappings +:vmap r "_dP :nmap :w :imap :wa :nmap :bd @@ -98,12 +133,7 @@ nnoremap nnoremap nnoremap nnoremap -nnoremap :bp -nnoremap :bn -nnoremap :%!jq '.' -" F2 Sets Working Directory to current. Ctrl+F2 sets it to home directory -nnoremap :lcd %:p:h -nnoremap :lcd ~ +nnoremap :%!jq '.' "AutoCommands au BufWinEnter * set number diff --git a/rofi/.config/rofi/config b/rofi/.config/rofi/config index e6ea801..4f2154e 100644 --- a/rofi/.config/rofi/config +++ b/rofi/.config/rofi/config @@ -5,8 +5,9 @@ rofi.padding: 20 rofi.bw: 0 rofi.lines: 10 rofi.line-padding: 5 -rofi.font: Source Code Pro for Powerline 12 +rofi.font: Hack Nerd Font 12 rofi.show-icons: true +rofi.location: 8 ! Window 'background''border' 'separator' rofi.color-window: #FF5E81AC, #00000000, #268bd2 diff --git a/sway/.config/sway/config b/sway/.config/sway/config index b4e86c0..5eddc39 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -7,11 +7,8 @@ input * xkb_options "grp:menu_toggle,caps:none" set $mod Mod4 # Configure border style -new_window none default_border pixel 2 -#new_window pixel 0 -#new_float normal -new_float none +default_floating_border none # Hide borders hide_edge_borders none @@ -23,7 +20,7 @@ bindsym $mod+y border pixel 2 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. #font xft:DejaVu Sans Mono for Powerline 14 -font xft:Source Code Pro for Powerline 14 +font xft:Hack Nerd Font 14 # Use Mouse+$mod to drag floating windows floating_modifier $mod @@ -36,10 +33,7 @@ bindsym $mod+Return exec termite bindsym $mod+Shift+q kill # Start rofi program launcher -bindsym $mod+d exec --no-startup-id rofi -show drun -config ~/.config/rofi/config - -# Start Rofi Wifi Menu -bindsym $mod+n exec rofi-wifi-menu +bindsym $mod+d exec rofi -m -1 -show drun -config ~/.config/rofi/config # Start Applications bindsym $mod+Shift+d --release exec "killall mako; exec notify-send 'restart mako'" @@ -190,3 +184,4 @@ exec_always { exec swayidle timeout 300 'swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch' timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch' exec /home/jfm/.config/sway/scripts/start_layout.sh exec mako +exec nm-applet --indicator diff --git a/sway/.config/sway/scripts/laptop-sway.sh b/sway/.config/sway/scripts/laptop-sway.sh index a31bd9a..02fbd7e 100755 --- a/sway/.config/sway/scripts/laptop-sway.sh +++ b/sway/.config/sway/scripts/laptop-sway.sh @@ -2,6 +2,7 @@ swaymsg output DP-5 disable swaymsg output eDP-1 enable +swaymsg output eDP-1 scale 1.5 swaymsg output eDP-1 pos 0 0 res 2560 1440 swaymsg output eDP-1 background ~/.config/sway/wallpapers/space_2560x1440.jpg fill diff --git a/termite/.config/termite/config b/termite/.config/termite/config index ba6d61f..15b9c60 100644 --- a/termite/.config/termite/config +++ b/termite/.config/termite/config @@ -6,7 +6,8 @@ # License: MIT [options] -font = Source Code Pro for Powerline 10 +#font = Source Code Pro for Powerline 10 +font = Hack Nerd Font 10 scrollback_lines = 10000 size_hints = true diff --git a/waybar/.config/waybar/home-config b/waybar/.config/waybar/home-config index f551c1e..3573d08 100644 --- a/waybar/.config/waybar/home-config +++ b/waybar/.config/waybar/home-config @@ -41,6 +41,7 @@ "format": "{icon} {capacity}%", // "format-good": "", // An empty format will hide the module // "format-full": "", + "interval": 5, "format-icons": ["", "", "", "", ""] }, "network": { diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 20baaf0..97d6bca 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -18,7 +18,7 @@ * { border: none; border-radius: 0; - font-family: 'Source Code Pro', Roboto, Helvetica, Arial, sans-serif; + font-family: 'Hack Nerd Font', Roboto, Helvetica, Arial, sans-serif; font-size: 13px; min-height: 0; } diff --git a/waybar/.config/waybar/work-config b/waybar/.config/waybar/work-config index 0bd1082..3c68900 100644 --- a/waybar/.config/waybar/work-config +++ b/waybar/.config/waybar/work-config @@ -23,7 +23,7 @@ "format-alt": "{:%Y-%m-%d}" }, "cpu": { - "format": " {usage}%" + "format": " {usage:3}%" }, "memory": { "format": " {}%" @@ -37,6 +37,7 @@ "format": "{icon} {capacity}%", // "format-good": "", // An empty format will hide the module // "format-full": "", + "interval": 5, "format-icons": ["", "", "", "", ""] }, "network": {