This commit is contained in:
Henrik Bakken
2021-02-09 17:12:34 +01:00
parent 21f37cbc6b
commit c452826815
7 changed files with 97 additions and 90 deletions
+26 -26
View File
@@ -34,7 +34,7 @@ exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet
exec --no-startup-id nitrogen --restore; sleep 1; compton -b
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id xautolock -time 30 -locker blurlock
@@ -51,27 +51,27 @@ exec --no-startup-id xrandr --output DP-2 --mode 3840x2160 --output DP-0 --mode
# div bindings
bindsym $mod+Shift+q kill
bindsym $mod+q split toggle
bindsym $mod+bar split h; exec notify-send 'tile horizontally'
bindsym $mod+minus split v; exec notify-send 'tile vertically'
bindsym $mod+s split h; exec notify-send 'tile horizontally'
bindsym $mod+v split v; exec notify-send 'tile vertically'
bindsym $mod+f fullscreen toggle
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+w layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+a focus parent
bindsym $mod+Shift+c reload
bindsym $mod+r reload
bindsym $mod+Shift+r restart
bindsym $mod+space focus mode_toggle
bindsym $mod+Shift+space floating toggle
bindsym $mod+Ctrl+space sticky toggle
bindsym $mod+Shift+comma exec picom-trans -c -10
bindsym $mod+comma exec picom-trans -c +10
bindsym $mod+Shift+c exec picom-trans -c -10
bindsym $mod+c exec picom-trans -c +10
bindsym $mod+period scratchpad show
bindsym $mod+Shift+period move scratchpad
bindsym $mod+p scratchpad show
bindsym $mod+Shift+p move scratchpad
bindsym $mod+h focus left
bindsym $mod+j focus down
@@ -92,23 +92,25 @@ bindsym $mod+d exec --no-startup-id rofi -show combi -combi-modi "run#drun" -lin
bindsym $mod+Shift+s --release exec --no-startup-id flameshot gui
bindsym $mod+Shift+x --release exec --no-startup-id xkill
bindsym $mod+F1 exec glances -w
bindsym $mod+F1 exec $term -e 'htop'
bindsym $mod+Shift+F1 exec $term -e 'glances'
bindsym $mod+F2 exec "chromium --start-fullscreen https://www.inoreader.com"
bindsym $mod+Shift+F2 exec "chromium --new-window --start-fullscreen https://www.inoreader.com"
bindsym $mod+F3 exec thunar
bindsym $mod+Shift+F3 exec $term -e 'ranger'
bindsym $mod+F4 exec $term -e 'mocp'
bindsym $mod++Shift+F4 exec $term -e 'ncspot'
bindsym $mod+F3 exec $term -e 'ranger'
bindsym $mod+Shift+F3 exec thunar
bindsym $mod+F4 exec pamac-manager
bindsym $mod+F5 exec pavucontrol
bindsym $mod+F6 exec --no-startup-id picom -b
bindsym $mod+Shift+F6 exec --no-startup-id pkill picom
bindsym $mod+Shift+F7 --release exec "killall dunst; exec notify-send 'restart dunst'"
bindsym $mod+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option"
bindsym $mod+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'"
bindsym $mod+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'"
bindsym $mod+F6 exec $term -e 'mocp'
bindsym $mod+Shift+F6 exec $term -e 'ncspot'
bindsym $mod+F9 exec --no-startup-id picom -b
bindsym $mod+Shift+F9 exec --no-startup-id pkill picom
bindsym $mod+Shift+F10 --release exec "killall dunst; exec notify-send 'restart dunst'"
# bindsym $mod+Shift+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option"
# bindsym $mod+Shift+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'"
# bindsym $mod+Shift+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'"
bindsym $mod+0 mode "$mode_system"
bindsym $mod+r mode "resize"
bindsym $mod+z mode "resize"
bindsym $mod+g mode "$mode_gaps"
# Workspace names
@@ -183,7 +185,7 @@ for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
# Set shut down, restart and locking features
set $mode_system (l)ock, (e)xit, switch_(u)ser, (r)eboot, (Shift+s)hutdown
set $mode_system (l)ock, (e)xit, switch_(u)ser, (r)eboot, (s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
@@ -235,9 +237,7 @@ bar {
status_command i3status
position bottom
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
tray_output primary
tray_output DP-2
bindsym button4 nop
bindsym button5 nop
strip_workspace_numbers yes
+3 -2
View File
@@ -6,7 +6,8 @@
# For explanations of all config options below see docs/USAGE.md or the man page.
#
sync_dir="/mnt/OneDrive"
skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos"
skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|Music|Library|Research*|*/__pycache__|*/.ipynb_checkpoints"
skip_file="*.tmp|.~*|~*"
# monitor_interval = "45"
# skip_dir = "Videos"
# log_dir = "/var/log/onedrive/"
@@ -14,7 +15,7 @@ skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos"
# upload_only = "false"
# check_nomount = "false"
# check_nosync = "false"
download_only = "true"
# download_only = "false"
# disable_notifications = "false"
# disable_upload_validation = "false"
# enable_logging = "false"
+26 -26
View File
@@ -34,7 +34,7 @@ exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet
exec --no-startup-id nitrogen --restore; sleep 1; compton -b
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id xautolock -time 30 -locker blurlock
@@ -51,27 +51,27 @@ exec --no-startup-id xrandr --output DP-4 --mode 5120x1440 --primary
# div bindings
bindsym $mod+Shift+q kill
bindsym $mod+q split toggle
bindsym $mod+bar split h; exec notify-send 'tile horizontally'
bindsym $mod+minus split v; exec notify-send 'tile vertically'
bindsym $mod+s split h; exec notify-send 'tile horizontally'
bindsym $mod+v split v; exec notify-send 'tile vertically'
bindsym $mod+f fullscreen toggle
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+w layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+a focus parent
bindsym $mod+Shift+c reload
bindsym $mod+r reload
bindsym $mod+Shift+r restart
bindsym $mod+space focus mode_toggle
bindsym $mod+Shift+space floating toggle
bindsym $mod+Ctrl+space sticky toggle
bindsym $mod+Shift+comma exec picom-trans -c -10
bindsym $mod+comma exec picom-trans -c +10
bindsym $mod+Shift+c exec picom-trans -c -10
bindsym $mod+c exec picom-trans -c +10
bindsym $mod+period scratchpad show
bindsym $mod+Shift+period move scratchpad
bindsym $mod+p scratchpad show
bindsym $mod+Shift+p move scratchpad
bindsym $mod+h focus left
bindsym $mod+j focus down
@@ -92,23 +92,25 @@ bindsym $mod+d exec --no-startup-id rofi -show combi -combi-modi "run#drun" -lin
bindsym $mod+Shift+s --release exec --no-startup-id flameshot gui
bindsym $mod+Shift+x --release exec --no-startup-id xkill
bindsym $mod+F1 exec glances -w
bindsym $mod+F1 exec $term -e 'htop'
bindsym $mod+Shift+F1 exec $term -e 'glances'
bindsym $mod+F2 exec "chromium --start-fullscreen https://www.inoreader.com"
bindsym $mod+Shift+F2 exec "chromium --new-window --start-fullscreen https://www.inoreader.com"
bindsym $mod+F3 exec thunar
bindsym $mod+Shift+F3 exec $term -e 'ranger'
bindsym $mod+F4 exec $term -e 'mocp'
bindsym $mod++Shift+F4 exec $term -e 'ncspot'
bindsym $mod+F3 exec $term -e 'ranger'
bindsym $mod+Shift+F3 exec thunar
bindsym $mod+F4 exec pamac-manager
bindsym $mod+F5 exec pavucontrol
bindsym $mod+F6 exec --no-startup-id picom -b
bindsym $mod+Shift+F6 exec --no-startup-id pkill picom
bindsym $mod+Shift+F7 --release exec "killall dunst; exec notify-send 'restart dunst'"
bindsym $mod+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option"
bindsym $mod+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'"
bindsym $mod+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'"
bindsym $mod+F6 exec $term -e 'mocp'
bindsym $mod+Shift+F6 exec $term -e 'ncspot'
bindsym $mod+F9 exec --no-startup-id picom -b
bindsym $mod+Shift+F9 exec --no-startup-id pkill picom
bindsym $mod+Shift+F10 --release exec "killall dunst; exec notify-send 'restart dunst'"
# bindsym $mod+Shift+F10 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option"
# bindsym $mod+Shift+F11 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:backspace'"
# bindsym $mod+Shift+F12 exec "setxkbmap -layout no -model pc105 -variant nodeadkeys -option 'caps:escape'"
bindsym $mod+0 mode "$mode_system"
bindsym $mod+r mode "resize"
bindsym $mod+z mode "resize"
bindsym $mod+g mode "$mode_gaps"
# Workspace names
@@ -178,7 +180,7 @@ for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
# Set shut down, restart and locking features
set $mode_system (l)ock, (e)xit, switch_(u)ser, (r)eboot, (Shift+s)hutdown
set $mode_system (l)ock, (e)xit, switch_(u)ser, (r)eboot, (s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
@@ -230,9 +232,7 @@ bar {
status_command i3status
position bottom
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
tray_output primary
tray_output DP-4
bindsym button4 nop
bindsym button5 nop
strip_workspace_numbers yes
+3 -2
View File
@@ -6,7 +6,8 @@
# For explanations of all config options below see docs/USAGE.md or the man page.
#
sync_dir="/mnt/OneDrive"
# skip_file = "~*|.~*|*.tmp"
skip_dir="Programming/logs|Bilder/Camera Roll|Backup|Datasets|Pictures|Videos|*/__pycache__|*/.ipynb_checkpoints"
skip_file="*.tmp|.~*|~*"
# monitor_interval = "45"
# skip_dir = "Videos"
# log_dir = "/var/log/onedrive/"
@@ -14,7 +15,7 @@ sync_dir = "/mnt/OneDrive"
# upload_only = "false"
# check_nomount = "false"
# check_nosync = "false"
download_only = "false"
# download_only = "false"
# disable_notifications = "false"
# disable_upload_validation = "false"
# enable_logging = "false"
+5 -2
View File
@@ -9,7 +9,7 @@
* curl -L https://get.oh-my.fish | fish
* omf install https://github.com/edc/bass
* omf install https://github.com/jethrokuan/fzf
* div applications `yay -S thunar drawio-desktop steam-manjaro`
* div applications `yay -S thunar ranger drawio-desktop steam-manjaro`
* div utils `yay -S trash-cli rofi redshift flameshot asus-fan-control`
# coding
@@ -24,7 +24,7 @@
* build `yay -S ninja`
# python
* `pip install ipython pytest neovim numpy scipy sympy flake8 ptvsd addict dill ipdb`
* `pip install ipython pytest neovim numpy scipy sympy flake8 ptvsd addict dill ipdb pudb web-pdb`
* matplotlib stuff `pip install matplotlib seaborn matplotlib-label-lines ipympl qbstyles`
* other plotting `pip install plotly ggplot`
* install torch from [link](https://pytorch.org/)
@@ -38,3 +38,6 @@
* start onedrive `systemctl enable --user onedrive --now`
* ssd maintenance `sudo systemctl enable fstrim.timer --now`
* urxvt ext install `https://github.com/simmel/urxvt-resize-font`
# wsl
* sudo apt install fish neovim ranger tmux docker docker/compose tig git-lfs ctags ripgrep silversearcher-ag python3-pip
+1 -1
View File
@@ -6,7 +6,7 @@
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.pylintArgs": ["--disable=all", "--enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode"],
"python.linting.flake8Args": ["--ignore=E221,E226,E231,E241,E501,E701,E704"],
"python.linting.flake8Args": ["--ignore=E221,E226,E231,E241,E272,E501,E701,E704"],
"python.linting.enabled": true,
"git.enableGutters": true,
"yaml.format.enable": true,
+32 -30
View File
@@ -15,9 +15,7 @@ let g:coc_global_extensions=[
\ 'coc-diagnostic',
\ 'coc-yaml',
\ 'coc-explorer',
\ 'coc-markmap'
\ ]
let g:polyglot_disabled = ['python']
call plug#begin('~/.config/nvim/plugged')
" tools
@@ -44,7 +42,6 @@ Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-sensible'
Plug 'dkarter/bullets.vim'
" python
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
Plug 'tmhedberg/SimpylFold'
Plug 'jeetsukumaran/vim-pythonsense'
" tmux
@@ -168,7 +165,8 @@ let g:BASH_Ctrl_j='off' " avoid 'C-j' being overridden to newline
let g:BASH_Ctrl_l='off' " avoid 'C-l' being overridden to newline
highlight clear SignColumn " SignColumn should match background
set shortmess=atOI " No help Uganda information, and overwrite read messages to avoid PRESS ENTER prompts
set listchars=tab:→\ ,eol:↵,trail,extends:↷,precedes:↶,nbsp:+
set listchars=tab:→\ ,trail,extends:↷,precedes:↶,nbsp:+
" eol:↵
set fillchars=vert:│,stl:\ ,stlnc:\
set clipboard+=unnamedplus
set list
@@ -182,14 +180,14 @@ set list
" MAPPING
let mapleader="\<SPACE>"
set pastetoggle=<F2>
nmap <leader>R :so ~/.config/nvim/init.vim<cr>
nmap <leader>V :tabe ~/OneDrive/dotfiles/nvim/init.vim<cr>
nmap <leader>L :tabe ~/OneDrive/Notes/libs.md<cr>
nmap <leader>U :tabe ~/OneDrive/Notes/urls.md<cr>
nmap <leader>N :tabe ~/OneDrive/Notes/names.md<cr>
nmap <leader>Ø :tabe ~/OneDrive/Notes/økonomi.md<cr>
nmap <leader>C :tabe ~/OneDrive/Notes/cheatsheet.md<cr>
nmap <leader>T :tabe ~/OneDrive/Notes/todos.md<cr>
nmap <leader>r :so ~/.config/nvim/init.vim<cr>
nmap <leader>e :tabe ~/OneDrive/dotfiles/nvim/init.vim<cr>
nmap <leader>l :tabe ~/OneDrive/Notes/libs.md<cr>
nmap <leader>u :tabe ~/OneDrive/Notes/urls.md<cr>
nmap <leader>c :tabe ~/OneDrive/Notes/cheatsheet.md<cr>
nmap <leader>t :tabe ~/OneDrive/Notes/todos.md<cr>
nmap <leader>n :Explore ~/OneDrive/Notes<cr>
nmap <leader>d :Explore ~/OneDrive/dotfiles<cr>
nmap <leader>w :cd %:p:h<cr>
" vim-surround: visual 'SA' to wrap in A. Surround 'csAB' to change from A to B, 'dsA' to remove A. Word 'ysiwA' to wrap with A
@@ -220,7 +218,7 @@ nmap cf <Plug>(coc-format-selected)
" *****************************
" TERMINAL
nmap <Leader>t :terminal<cr>
tmap <C-x> <C-\><C-n>
tmap <M-x> <C-\><C-n>
tmap <F2> <C-\><C-n>
" *****************************
@@ -256,9 +254,10 @@ nmap <M-m> <Plug>(coc-diagnostic-next)
nmap <M-,> <Plug>(coc-git-prevchunk)
nmap <M-.> <Plug>(coc-git-nextchunk)
nmap gd <Plug>(coc-definition)
nmap gy <Plug>(coc-type-definition)
nmap gi <Plug>(coc-implementation)
nmap gr <Plug>(coc-references)
" nmap gy <Plug>(coc-type-definition)
" nmap gi <Plug>(coc-implementation)
" nmap gD <Plug>(coc-declaration)
" *****************************
" WINDOWS / BUFFERS
@@ -268,15 +267,13 @@ nmap <silent> <M-j> :TmuxNavigateDown<cr>
nmap <silent> <M-k> :TmuxNavigateUp<cr>
nmap <silent> <M-l> :TmuxNavigateRight<cr>
" make splits and tabs
nnoremap <M-BAR> :vsplit<cr>
nnoremap <C-w><BAR> :vnew<cr>
nnoremap <M--> :split<cr>
nnoremap <C-w>- :new<cr>
nnoremap <M-v> :vnew<cr>
nnoremap <M-s> :new<cr>
nnoremap <M-t> :tabe %<cr>
nnoremap <M-T> :tabnew<cr>
" buffers and tabs
nmap <M-H> :bprev<cr>
nmap <M-L> :bnext<cr>
nmap <M-H> :bprev<cr>:call CleanEmptyBuffers()<cr>
nmap <M-L> :bnext<cr>:call CleanEmptyBuffers()<cr>
nmap <M-J> :tabprev<cr>
nmap <M-K> :tabnext<cr>
" resize windows with hjkl
@@ -288,8 +285,8 @@ nnoremap <C-l> <C-w>>
nmap <C-n> :cp<cr>
nmap <C-m> :cn<cr>
" remove buffer
nmap <M-d> :bp<bar>bd#<cr>
nmap <M-D> :bp<bar>bd!#<cr>
nmap <M-d> :enew<bar>:bd#<cr>
nmap <M-D> :enew<bar>:bd!#<cr>
" close window
nmap <M-q> :q<cr>
" goyo
@@ -313,6 +310,7 @@ map <C-p> :CocCommand explorer<cr>
" vim-fugitive
" g? for fugitive help. :Gdiff, :Gblame, :Gstats '=' expand, '-' add/reset changes, :Gcommit % to commit current file with messag
map <C-g> :vertical Git<cr>:vertical resize 60<cr>
map <C-t> :UndotreeToggle<cr>
" *****************************
" POPUPS
@@ -329,20 +327,20 @@ command! -nargs=* -bang RG call RipgrepFzf(<q-args>, <bang>0)
let g:fzf_preview_command='bat --color=always --plain {-1}' " Installed bat
let g:fzf_preview_grep_cmd='rg --smart-case --line-number --no-heading --color=never'
" shortcuts
nmap <silent> <F2> :Buffers<cr>
map <silent> <F3> :Colors<cr>
nmap <silent> <F4> :CocFzfList<cr>
nmap <silent> <F5> :CocFzfList symbols<cr>
nmap <silent> <F6> :CocFzfList symbols --kind Variable<cr>
nmap <silent> <F7> :CocFzfList symbols --kind Function<cr>
nmap <silent> <F8> :CocFzfList symbols --kind Class<cr>
nmap <silent> <F9> :Commits<cr>
nmap <silent> <F10> :BCommits<cr>
" F9 reserved for exec in terminal
nmap <silent> <F10> :Commits<cr>
nmap <silent> <F11> :BCommits<cr>
nmap <silent> <F12> :CocFzfList outline<cr>
nmap <silent> <M-b> :Buffers<cr>
nmap <silent> <M-w> :RG<cr>
nmap <silent> <M-g> :GFiles?<cr>
nmap <silent> <M-r> :History<cr>
nmap <silent> <M-s> :History/<cr>
nmap <silent> <M-f> :Files<cr>
nmap <silent> <M-F> :GFiles<cr>
map <silent> <M-y> :Filetypes<cr>
@@ -378,8 +376,6 @@ endfunction
" *****************************
" MARKDOWN
" vim-markdown
nmap <Leader>m <Plug>(coc-markmap-create)
vmap <Leader>m <Plug>(coc-markmap-create-v)
let g:vim_markdown_new_list_item_indent=0
let g:vim_markdown_auto_insert_bullets=0
let g:vim_markdown_conceal=1
@@ -402,13 +398,19 @@ let g:mkdp_preview_options={
" *****************************
" autocmd
function! CleanEmptyBuffers()
let buffers = filter(range(1, bufnr('$')), 'buflisted(v:val) && empty(bufname(v:val)) && bufwinnr(v:val)<0 && !getbufvar(v:val, "&mod")')
if !empty(buffers)
exe 'bw ' . join(buffers, ' ')
endif
endfunction
augroup myAu " A unique name for the group. DO NOT use the same name twice!
autocmd!
autocmd FileType python set tabstop=4 softtabstop=4 shiftwidth=4
autocmd FileType markdown,yaml set tabstop=2 softtabstop=2 shiftwidth=2
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o " Disables automatic commenting on newline
autocmd FileType * RainbowParentheses()
autocmd BufEnter * if &filetype == "" | setlocal ft=markdown | endif " default new file is markdown
autocmd BufEnter * if &filetype == "" | setlocal ft=none | endif " default new file is none
autocmd BufWritePre * %s/\s\+$//e " Automatically deletes all trailing whitespace on save.
autocmd BufReadPost quickfix nmap <buffer> <cr> <cr> " quickfix <cr>
autocmd CompleteDone * if pumvisible() == 0 | pclose | endif " bugfix