From 3e8e5b42d3919f1a261bf6ae198f76199ee26391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Wed, 23 Jan 2019 12:04:05 +0100 Subject: [PATCH] Fixed proxy settings for chrome Added aws and kubectil completion. Added JS support in vim Various other small fixes --- bash/.bashrc | 19 +++--- i3/.config/i3/config | 3 +- i3/.config/i3/layouts/workspace0-irc.json | 61 +++++++++++++------ .../i3/layouts/workspace0-timewaste.json | 6 +- i3/.config/i3/layouts/ws-comms-wide.json | 2 +- i3/.config/i3/layouts/ws-work-wide.json | 20 ------ i3/.config/i3/scripts/dock.sh | 2 +- i3/.config/i3/workspaces/ws00.sh | 2 +- i3/.config/i3/workspaces/ws01.sh | 12 ++-- i3/.config/i3/workspaces/ws02.sh | 2 +- i3/.config/i3/workspaces/ws03.sh | 4 +- i3/.config/i3/workspaces/ws04.sh | 4 +- neovim/.config/nvim/init.vim | 31 ++++++---- 13 files changed, 89 insertions(+), 79 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index df8c3b3..e4b019f 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -142,6 +142,10 @@ ex () source ~/.oc_completion.sh source ~/.alias_completion.sh +#AWS Completion +complete -C '/usr/bin/aws_completer' aws +source <(kubectl completion bash) + #Git Config GIT_PROMPT_ONLY_IN_REPO=1 GIT_PS1_SHOWUPSTREAM="auto" @@ -149,21 +153,13 @@ GIT_PS1_SHOWDIRTYSTATE="auto" GIT_PS1_SHOWCOLORHINTS="auto" GIT_PS1_SHOWUNTRACKEDFILES="auto" GIT_PS1_STATESEPARATOR=" " -#source /home/jfm/Repositories/bash-git-prompt/gitprompt.sh source /usr/share/git/completion/git-prompt.sh eval "$(pipenv --completion)" -#PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' PS1='\[\e[1;32m\u@\h \e[1;34m\w\]\n\[\e[1;33m\]$(__git_ps1 "(%s) ")\[\e[m\]⇨ ' #Disable CapsLock setxkbmap -option ctrl:nocaps -#Powerline -#powerline-daemon -q -#POWERLINE_BASH_CONTINUATION=1 -#POWERLINE_BASH_SELECT=1 -#. /usr/lib/python3.7/site-packages/powerline/bindings/bash/powerline.sh - #Disable some CTRL for VIM commands bind -r '\C-s' stty -ixon @@ -171,12 +167,12 @@ stty -echoctl #Paths export M2_HOME=/home/jfm/Tools/apache-maven -export PATH=$PATH:$M2_HOME/bin:/home/jfm/Tools/openshift-origin-client/ +export PATH=$PATH:$M2_HOME/bin:/home/jfm/Tools/openshift-origin-client/:/home/jfm/Tools/aws/ export GIT_EDITOR=nvim export EDITOR="nvr -s --remote" export VISUAL="nvr -s --remote" + #Aliases -#alias oc="/home/jfm/Tools/openshift-origin-client/oc" alias ocdev="oc -n onboarding-dev" alias octst="oc -n onboarding-test" alias code="cd /home/jfm/Customers/TDC/Code/Onboarding" @@ -187,8 +183,7 @@ alias top="htop" alias ssh="TERM=xterm-256color ssh" alias vim="nvr -s --remote" alias vi="nvim" -alias f="/home/jfm/Repositories/fff/fff" -alias buildtool="/home/jfm/Customers/TDC/Code/Onboarding/build-tool/buildtool.sh" +alias buildtool="/home/jfm/.buildtool/bin/buildtool" alias vpnup="nmcli con up id \"YouSee VPN\"" alias vpndown="nmcli con down id \"YouSee VPN\"" alias music="~/.config/i3/scripts/music.sh" diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 55b9c91..7a73b0c 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -162,8 +162,9 @@ for_window [class="^.*"] border pixel 0 for_window [class="Nitrogen"] floating enable sticky enable border none for_window [class="feh"] floating enable sticky enable border none for_window [class="mpv"] floating enable sticky enable border none -#for_window [class="^jetbrains-.+"][window_type=dialog] focus for_window [class="Arandr"] floating enable sticky enable border none +#for_window [class="^jetbrains-.+"][window_type=dialog] focus +#for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 # reload the configuration file bindsym $mod+Shift+c reload diff --git a/i3/.config/i3/layouts/workspace0-irc.json b/i3/.config/i3/layouts/workspace0-irc.json index a63e874..5156d1f 100644 --- a/i3/.config/i3/layouts/workspace0-irc.json +++ b/i3/.config/i3/layouts/workspace0-irc.json @@ -1,21 +1,46 @@ { - "border": "pixel", - "current_border_width": 1, - "floating": "auto_off", - "geometry": { - "height": 434, - "width": 738, - "x": 0, - "y": 0 + "layout": "splith", + "nodes": [ + { + "border": "pixel", + "current_border_width": 1, + "floating": "auto_off", + "geometry": { + "height": 1164, + "width": 1918, + "x": 1920, + "y": 0 + }, + "name": "Slack", + "percent": 0.6, + "swallows": [ + { + "class": "^Slack$" + } + ], + "type": "con" }, - "name": "WeeChat", - "percent": 1, - "swallows": [ - { - "class": "^Termite$", - "title": "^weechat$" - } - ], - "type": "con" + { + "border": "pixel", + "current_border_width": 1, + "floating": "auto_off", + "geometry": { + "height": 410, + "width": 654, + "x": 0, + "y": 0 + }, + "name": "WeeChat", + "percent": 0.7, + "swallows": [ + { + "class": "^Termite$", + "title": "^weechat$" + } + ], + "type": "con" + } + ], + "percent": 0.5, + "type": "con" } - diff --git a/i3/.config/i3/layouts/workspace0-timewaste.json b/i3/.config/i3/layouts/workspace0-timewaste.json index c76a3fd..6ce73f7 100644 --- a/i3/.config/i3/layouts/workspace0-timewaste.json +++ b/i3/.config/i3/layouts/workspace0-timewaste.json @@ -35,12 +35,12 @@ "x": 0, "y": 0 }, - "name": "Music", + "name": "Slack", "percent": 0.5, "swallows": [ { - "class": "^Termite$", - "title": "^music$", + "class": "^Slack$", + "instance": "^slack$", } ], "type": "con" diff --git a/i3/.config/i3/layouts/ws-comms-wide.json b/i3/.config/i3/layouts/ws-comms-wide.json index bfea610..5fd30c5 100644 --- a/i3/.config/i3/layouts/ws-comms-wide.json +++ b/i3/.config/i3/layouts/ws-comms-wide.json @@ -120,7 +120,7 @@ "swallows": [ { "class": "^Google\\-chrome$", - "instance": "^tdcgroup.slack.com__messages_C518LG04W$" + "instance": "^tdcgroup.slack.com$" } ], "type": "con" diff --git a/i3/.config/i3/layouts/ws-work-wide.json b/i3/.config/i3/layouts/ws-work-wide.json index 9ed3fdb..6427fd2 100644 --- a/i3/.config/i3/layouts/ws-work-wide.json +++ b/i3/.config/i3/layouts/ws-work-wide.json @@ -105,26 +105,6 @@ "percent": 0.3, "type": "con", "nodes": [ - { - "border": "pixel", - "current_border_width": 0, - "floating": "auto_off", - "geometry": { - "height": 466, - "width": 739, - "x": 0, - "y": 0 - }, - "name": "Netflix", - "percent": 0.5, - "swallows": [ - { - "class": "^Google\\-chrome$", - "instance": "^netflix.com$" - } - ], - "type": "con" - }, { "border": "pixel", "current_border_width": 0, diff --git a/i3/.config/i3/scripts/dock.sh b/i3/.config/i3/scripts/dock.sh index b242b19..2b1fb46 100755 --- a/i3/.config/i3/scripts/dock.sh +++ b/i3/.config/i3/scripts/dock.sh @@ -28,6 +28,6 @@ i3-msg "workspace 6:; move workspace to output $PRIMARY" i3-msg "workspace 7:; move workspace to output $PRIMARY" i3-msg "workspace 8:; move workspace to output $SECONDARY" i3-msg "workspace 9:; move workspace to output $SECONDARY" -i3-msg "workspace 0:; move workspace to output $SECONDARY" +i3-msg "workspace 10:; move workspace to output $SECONDARY" exit diff --git a/i3/.config/i3/workspaces/ws00.sh b/i3/.config/i3/workspaces/ws00.sh index ed278b4..a2e03d5 100755 --- a/i3/.config/i3/workspaces/ws00.sh +++ b/i3/.config/i3/workspaces/ws00.sh @@ -2,5 +2,5 @@ . ~/.config/i3/env i3-msg "workspace 10:; append_layout ~/.config/i3/layouts/workspace0-timewaste.json" i3-msg "workspace 10:; exec termite -t weechat -e weechat" -#i3-msg "workspace 0:; exec termite -t music -e ncmpcpp" +i3-msg "workspace 10:; exec slack" i3-msg "workspace 10:; move workspace to output $SECONDARY" diff --git a/i3/.config/i3/workspaces/ws01.sh b/i3/.config/i3/workspaces/ws01.sh index 4cbaec5..e80c5d0 100755 --- a/i3/.config/i3/workspaces/ws01.sh +++ b/i3/.config/i3/workspaces/ws01.sh @@ -4,14 +4,14 @@ if [ $LOCATION = "home" ]; then i3-msg "workspace 1:; append_layout ~/.config/i3/layouts/ws-comms-wide.json" - i3-msg "workspace 1:; exec google-chrome-stable --force-device-scale-factor=1.00 --app=https://mail.google.com" - i3-msg "workspace 1:; exec google-chrome-stable --force-device-scale-factor=1.00 --app=https://calendar.google.com" - i3-msg "workspace 1:; exec google-chrome-stable --force-device-scale-factor=1.00 --app=https://hangouts.google.com" - i3-msg "workspace 1:; exec google-chrome-stable --force-device-scale-factor=1.00 --app=https://messages.android.com" - i3-msg "workspace 1:; exec google-chrome-stable --force-device-scale-factor=1.00 --app=https://tdcgroup.slack.com/messages/C518LG04W/" + i3-msg "workspace 1:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --force-device-scale-factor=1.00 --app=https://mail.google.com" + i3-msg "workspace 1:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --force-device-scale-factor=1.00 --app=https://calendar.google.com" + i3-msg "workspace 1:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --force-device-scale-factor=1.00 --app=https://hangouts.google.com" + i3-msg "workspace 1:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --force-device-scale-factor=1.00 --app=https://messages.android.com" + i3-msg "workspace 1:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --force-device-scale-factor=1.00 --app=https://tdcgroup.slack.com" i3-msg "workspace 1:; move workspace to output $PRIMARY" else i3-msg "workspace 1:; append_layout ~/.config/i3/layouts/workspace1-comms.json" - i3-msg "workspace 1:; exec google-chrome-stable --no-default-browser-check --new-window https://www.toggl.com/app/timer https://mail.google.com/mail/u/0/#inbox https://calendar.google.com/calendar/r?tab=mc https://hangouts.google.com https://messages.android.com https://tdcgroup.slack.com/messages/C518LG04W/" + i3-msg "workspace 1:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --no-default-browser-check --new-window https://www.toggl.com/app/timer https://mail.google.com/mail/u/0/#inbox https://calendar.google.com/calendar/r?tab=mc https://hangouts.google.com https://messages.android.com" i3-msg "workspace 1:; move workspace to output $LAPTOP" fi diff --git a/i3/.config/i3/workspaces/ws02.sh b/i3/.config/i3/workspaces/ws02.sh index 44840ed..8dad886 100755 --- a/i3/.config/i3/workspaces/ws02.sh +++ b/i3/.config/i3/workspaces/ws02.sh @@ -2,6 +2,6 @@ . ~/.config/i3/env i3-msg "workspace 2:: append_layout ~/.config/i3/layouts/workspace2-web.json" -i3-msg "workspace 2:; exec google-chrome-stable --no-default-browser-check --new-window" +i3-msg "workspace 2:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --no-default-browser-check --new-window" i3-msg "workspace 2:; move workspace to output $PRIMARY" diff --git a/i3/.config/i3/workspaces/ws03.sh b/i3/.config/i3/workspaces/ws03.sh index 10391bb..143837f 100755 --- a/i3/.config/i3/workspaces/ws03.sh +++ b/i3/.config/i3/workspaces/ws03.sh @@ -4,8 +4,8 @@ if [ $LOCATION = "home" ]; then i3-msg "workspace 3:; append_layout ~/.config/i3/layouts/ws-ide-wide.json" - i3-msg "workspace 3:; exec google-chrome-stable --no-default-browser-check --new-window" - i3-msg "workspace 3:; exec /home/jfm/Tools/idea-2018.2/bin/idea.sh" + i3-msg "workspace 3:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --no-default-browser-check --new-window" + i3-msg "workspace 3:; exec /home/jfm/Tools/idea-2018.3/bin/idea.sh" i3-msg "workspace 3:; move workspace to output $PRIMARY" else i3-msg "workspace 3:; append_layout ~/.config/i3/layouts/workspace3-ide.json" diff --git a/i3/.config/i3/workspaces/ws04.sh b/i3/.config/i3/workspaces/ws04.sh index 463fb75..19d934f 100755 --- a/i3/.config/i3/workspaces/ws04.sh +++ b/i3/.config/i3/workspaces/ws04.sh @@ -4,11 +4,11 @@ if [ $LOCATION = "home" ]; then i3-msg "workspace 4:; append_layout ~/.config/i3/layouts/ws-work-wide.json" - i3-msg "workspace 4:; exec google-chrome-stable --no-default-browser-check --new-window" + i3-msg "workspace 4:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --no-default-browser-check --new-window" i3-msg "workspace 4:; exec termite -t vim -e 'nvr -s --remote' --hold" i3-msg "workspace 4:; exec termite -t shell" i3-msg "workspace 4:; exec termite -t ranger -e ~/.config/ranger/ranger.sh --hold" - i3-msg "workspace 4:; exec google-chrome-stable --app=http://netflix.com" +# i3-msg "workspace 4:; exec google-chrome-stable --app=http://netflix.com" i3-msg "workspace 4:; exec termite -t weechat -e weechat" i3-msg "workspace 4:; move workspace to output $PRIMARY" else diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 4061bf4..7b8791e 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -19,11 +19,15 @@ call plug#begin('~/.local/share/nvim/plugged') Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'Valloric/YouCompleteMe' -Plug 'nvie/vim-flake8' Plug 'vim-syntastic/syntastic' Plug 'luochen1990/rainbow' Plug 'numirias/semshi' Plug 'arcticicestudio/nord-vim' +Plug 'ctrlpvim/ctrlp.vim' +Plug 'SirVer/ultisnips' +Plug 'honza/vim-snippets' +Plug 'jonsmithers/vim-html-template-literals' +Plug 'pangloss/vim-javascript' call plug#end() colorscheme nord @@ -35,21 +39,27 @@ let g:Powerline_symbols='unicode' let g:airline_theme='nord' "YCM +let mapleader = "," let g:ycm_server_python_interpreter = 'python3' let g:ycm_autoclose_preview_window_after_completion=1 -let g:ycm_min_num_of_chars_for_completion=5 +let g:ycm_min_num_of_chars_for_completion=3 let g:ycm_add_preview_to_completeopt = 1 +map g :YcmCompleter GoToDefinitionElseDeclaration " let g:syntastic_python_checkers = ['python'] -"Flake8 -autocmd FileType python map :call Flake8() -let g:flake8_show_in_gutter=1 - "Rainbow Parentheses let g:rainbow_active = 1 +" Ultisnips +let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" + +" HTML +let g:html_indent_style1 = "inc" + "Mappings :nmap :w :imap :wa @@ -60,12 +70,11 @@ nnoremap nnoremap :bp nnoremap :bn nnoremap :%!jq '.' - +noremap +noremap +noremap +noremap "AutoCommands au BufWinEnter * set number au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null autocmd FileType python setlocal completeopt-=preview - -" add yaml stuffs -"au! BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent -"autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab