More Sway stuff

This commit is contained in:
Jesper Fussing Mørk 2019-08-02 11:47:53 +02:00
parent 6721b130b8
commit 64da4c30d8
9 changed files with 97 additions and 50 deletions

View File

@ -114,8 +114,7 @@ shopt -s expand_aliases
shopt -s histappend shopt -s histappend
#Bash Completion for OC #Bash Completion for OC
source ~/.oc_completion.sh source <(/home/jfm/Tools/openshift-origin-client/oc completion bash)
source ~/.alias_completion.sh
#AWS Completion #AWS Completion
complete -C '/usr/bin/aws_completer' aws complete -C '/usr/bin/aws_completer' aws
@ -128,9 +127,21 @@ GIT_PS1_SHOWDIRTYSTATE="auto"
GIT_PS1_SHOWCOLORHINTS="auto" GIT_PS1_SHOWCOLORHINTS="auto"
GIT_PS1_SHOWUNTRACKEDFILES="auto" GIT_PS1_SHOWUNTRACKEDFILES="auto"
GIT_PS1_STATESEPARATOR=" " 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 /usr/share/git/completion/git-prompt.sh
source ~/Repositories/GitHub/kube-ps1/kube-ps1.sh
eval "$(pipenv --completion)" 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 #Disable some CTRL for VIM commands
bind -r '\C-s' bind -r '\C-s'
@ -158,9 +169,15 @@ alias vim="nvim"
alias vi="nvim" alias vi="nvim"
alias rtv="rtv --enable-media" alias rtv="rtv --enable-media"
alias spin="spin -k" alias spin="spin -k"
alias dnote="/home/jfm/Tools/dnote/dnote"
alias k9s="/home/jfm/Tools/k9s/k9s" alias k9s="/home/jfm/Tools/k9s/k9s"
alias kubectx="/home/jfm/Repositories/GitHub/kubectx/kubectx"
alias buildtool="/home/jfm/.buildtool/bin/buildtool" alias buildtool="/home/jfm/.buildtool/bin/buildtool"
alias vpnup="nmcli con up id \"YouSee VPN\"" alias vpnup="nmcli con up id \"YouSee VPN\""
alias vpndown="nmcli con down id \"YouSee VPN\"" alias vpndown="nmcli con down id \"YouSee VPN\""
[ -f ~/.fzf.bash ] && source ~/.fzf.bash [ -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"

View File

@ -15,48 +15,81 @@ set background=dark
set rtp^=/usr/share/vim/vimfiles/ set rtp^=/usr/share/vim/vimfiles/
set undodir=~/.local/share/nvim/undodir set undodir=~/.local/share/nvim/undodir
set undofile set undofile
"set wildoptions=pum set colorcolumn=80
"set pumblend=20 set foldmethod=syntax
set foldlevelstart=20
"Plugins "Plugins
call plug#begin('~/.local/share/nvim/plugged') call plug#begin('~/.local/share/nvim/plugged')
" Pretty Status Lines " Pretty Status Lines
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline-themes'
" Buffers
Plug 'jlanzarotta/bufexplorer'
" Completion " Completion
Plug 'Shougo/deoplete.nvim'
Plug 'zchee/deoplete-jedi'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets' Plug 'honza/vim-snippets'
Plug 'epilande/vim-react-snippets'
Plug 'neoclide/coc.nvim', {'do': './install.sh'}
" Colorscheme " Colorscheme
Plug 'arcticicestudio/nord-vim' Plug 'arcticicestudio/nord-vim'
" Pretty parenthesis " Pretty parenthesis
Plug 'luochen1990/rainbow' Plug 'luochen1990/rainbow'
" Terminal
Plug 'https://gitlab.com/Lenovsky/nuake.git'
" File handling " File handling
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
" Python " Python
Plug 'numirias/semshi' Plug 'numirias/semshi'
Plug 'w0rp/ale' Plug 'w0rp/ale'
Plug 'ambv/black' Plug 'ambv/black'
" HTML " HTML
Plug 'jonsmithers/vim-html-template-literals' Plug 'jonsmithers/vim-html-template-literals'
Plug 'mxw/vim-jsx' Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript' Plug 'pangloss/vim-javascript'
Plug 'alvan/vim-closetag' Plug 'alvan/vim-closetag'
" Testing
Plug 'janko/vim-test'
call plug#end() call plug#end()
colorscheme nord colorscheme nord
"Airline "Airline
let g:airline#extensions#tabline#enabled = 1 if !exists('g:airline_symbols')
let g:Powerline_symbols='unicode' let g:airline_symbols = {}
endif
let g:airline#extensions#tabline#enabled = 0
let g:airline_theme='nord' let g:airline_theme='nord'
let g:airline_symbols.maxlinenr = ''
" Deoplete " BufExplorer
let g:deoplete#enable_at_startup = 1 nnoremap <silent> <F36> :BufExplorerVerticalSplit<CR>
nnoremap <silent> <F12> :bn<CR>
nnoremap <silent> <F24> :bp<CR>
" CoC
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
inoremap <silent><expr> <c-space> coc#refresh()
" Testing
nmap <silent> <F34> :TestNearest<CR>
nmap <silent> t<C-n> :TestNearest<CR>
nmap <silent> <F22> :TestFile<CR>
nmap <silent> t<C-f> :TestFile<CR>
nmap <silent> t<C-s> :TestSuite<CR>
nmap <silent> t<C-l> :TestLast<CR>
nmap <silent> t<C-g> :TestVisit<CR>
" Syntastic " Syntastic
let g:syntastic_python_checkers = ['python'] let g:syntastic_python_checkers = ['python']
@ -64,11 +97,6 @@ let g:syntastic_python_checkers = ['python']
"Rainbow Parentheses "Rainbow Parentheses
let g:rainbow_active = 1 let g:rainbow_active = 1
" Ultisnips
let g:UltiSnipsExpandTrigger="<c-v>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" HTML " HTML
let g:closetag_filenames = '*.html,*.js' let g:closetag_filenames = '*.html,*.js'
let g:html_indent_style1 = "inc" let g:html_indent_style1 = "inc"
@ -76,21 +104,28 @@ let g:html_indent_style1 = "inc"
" Black " Black
autocmd BufWritePre *.py execute ':Black' autocmd BufWritePre *.py execute ':Black'
" FZF " Defx
let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""' map <silent><M-1> :Defx -toggle -split=vertical -winwidth=40 <CR>
command! -bang -nargs=? -complete=dir HFiles autocmd FileType defx call s:defx_my_settings()
\ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0) function! s:defx_my_settings() abort
map <M-1> :Files<CR> nnoremap <silent><buffer><expr> <CR>
map <M-2> :HFiles<CR> \ defx#is_directory() ? defx#do_action('open') :
\ defx#do_action('multi', ['drop', 'quit'])
nnoremap <silent><buffer><expr> <BS>
\ defx#do_action('cd', '..')
nnoremap <silent><buffer><expr> <c-i>
\ defx#do_action('toggle_ignored_files')
endfunction
" Nuake " FZF
let g:nuake_position = 'bottom' let $FZF_DEFAULT_COMMAND = 'ag --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""'
let g:nuake_per_tab = 1 command! -bang -nargs=? -complete=dir HFiles
nnoremap <F12> :Nuake<CR> \ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git --ignore-dir Customers/RP --ignore *.jar -g ""'}, <bang>0)
inoremap <F12> <C-\><C-n>:Nuake<CR> map <M-2> :Files<CR>
tnoremap <F12> <C-\><C-n>:Nuake<CR> map <M-3> :HFiles<CR>
"Mappings "Mappings
:vmap r "_dP
:nmap <c-s> :w<CR> :nmap <c-s> :w<CR>
:imap <c-s> <Esc>:w<CR>a :imap <c-s> <Esc>:w<CR>a
:nmap <F28> :bd<CR> :nmap <F28> :bd<CR>
@ -98,12 +133,7 @@ nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K> nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L> nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H> nnoremap <C-H> <C-W><C-H>
nnoremap <F7> :bp<CR> nnoremap <F9> :%!jq '.'<CR>
nnoremap <F8> :bn<CR>
nnoremap <F9> :%!jq '.'
" F2 Sets Working Directory to current. Ctrl+F2 sets it to home directory
nnoremap <F2> :lcd %:p:h<CR>
nnoremap <F26> :lcd ~<CR>
"AutoCommands "AutoCommands
au BufWinEnter * set number au BufWinEnter * set number

View File

@ -5,8 +5,9 @@ rofi.padding: 20
rofi.bw: 0 rofi.bw: 0
rofi.lines: 10 rofi.lines: 10
rofi.line-padding: 5 rofi.line-padding: 5
rofi.font: Source Code Pro for Powerline 12 rofi.font: Hack Nerd Font 12
rofi.show-icons: true rofi.show-icons: true
rofi.location: 8
! Window 'background''border' 'separator' ! Window 'background''border' 'separator'
rofi.color-window: #FF5E81AC, #00000000, #268bd2 rofi.color-window: #FF5E81AC, #00000000, #268bd2

View File

@ -7,11 +7,8 @@ input * xkb_options "grp:menu_toggle,caps:none"
set $mod Mod4 set $mod Mod4
# Configure border style <normal|1pixel|pixel xx|none|pixel> # Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window none
default_border pixel 2 default_border pixel 2
#new_window pixel 0 default_floating_border none
#new_float normal
new_float none
# Hide borders # Hide borders
hide_edge_borders none 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 # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # is used in the bar {} block below.
#font xft:DejaVu Sans Mono for Powerline 14 #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 # Use Mouse+$mod to drag floating windows
floating_modifier $mod floating_modifier $mod
@ -36,10 +33,7 @@ bindsym $mod+Return exec termite
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# Start rofi program launcher # Start rofi program launcher
bindsym $mod+d exec --no-startup-id rofi -show drun -config ~/.config/rofi/config bindsym $mod+d exec rofi -m -1 -show drun -config ~/.config/rofi/config
# Start Rofi Wifi Menu
bindsym $mod+n exec rofi-wifi-menu
# Start Applications # Start Applications
bindsym $mod+Shift+d --release exec "killall mako; exec notify-send 'restart mako'" 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 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 /home/jfm/.config/sway/scripts/start_layout.sh
exec mako exec mako
exec nm-applet --indicator

View File

@ -2,6 +2,7 @@
swaymsg output DP-5 disable swaymsg output DP-5 disable
swaymsg output eDP-1 enable 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 pos 0 0 res 2560 1440
swaymsg output eDP-1 background ~/.config/sway/wallpapers/space_2560x1440.jpg fill swaymsg output eDP-1 background ~/.config/sway/wallpapers/space_2560x1440.jpg fill

View File

@ -6,7 +6,8 @@
# License: MIT # License: MIT
[options] [options]
font = Source Code Pro for Powerline 10 #font = Source Code Pro for Powerline 10
font = Hack Nerd Font 10
scrollback_lines = 10000 scrollback_lines = 10000
size_hints = true size_hints = true

View File

@ -41,6 +41,7 @@
"format": "{icon} {capacity}%", "format": "{icon} {capacity}%",
// "format-good": "", // An empty format will hide the module // "format-good": "", // An empty format will hide the module
// "format-full": "", // "format-full": "",
"interval": 5,
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
}, },
"network": { "network": {

View File

@ -18,7 +18,7 @@
* { * {
border: none; border: none;
border-radius: 0; 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; font-size: 13px;
min-height: 0; min-height: 0;
} }

View File

@ -23,7 +23,7 @@
"format-alt": "{:%Y-%m-%d}" "format-alt": "{:%Y-%m-%d}"
}, },
"cpu": { "cpu": {
"format": " {usage}%" "format": " {usage:3}%"
}, },
"memory": { "memory": {
"format": " {}%" "format": " {}%"
@ -37,6 +37,7 @@
"format": "{icon} {capacity}%", "format": "{icon} {capacity}%",
// "format-good": "", // An empty format will hide the module // "format-good": "", // An empty format will hide the module
// "format-full": "", // "format-full": "",
"interval": 5,
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
}, },
"network": { "network": {