diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-09-07 18:36:10 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-09-07 18:36:10 +0100 |
commit | 2e8d97e5fad0f714d676803ff4edffb8a188e0b2 (patch) | |
tree | b10ed0265ae5323382485af2edb1ff15cb822659 | |
parent | 66967089a03243a9392b4a7455c4a98a4f729ee3 (diff) |
a big bag of update
-rw-r--r-- | .Xresources.un~ | bin | 6376 -> 0 bytes | |||
-rw-r--r-- | Xresources | 6 | ||||
-rw-r--r-- | config/i3-laptop/config | 8 | ||||
-rw-r--r-- | config/i3/config | 0 | ||||
-rw-r--r-- | exrc | 22 | ||||
-rw-r--r-- | fish/config.fish | 3 | ||||
-rw-r--r-- | fish/fish_variables | 4 | ||||
-rw-r--r-- | kshrc | 48 | ||||
-rw-r--r-- | profile | 31 | ||||
-rw-r--r-- | taskrc | 2 | ||||
-rw-r--r-- | vim/vimrc | 145 | ||||
-rw-r--r-- | xinitrc-alt | 1 | ||||
-rw-r--r-- | xsession | 33 |
13 files changed, 262 insertions, 41 deletions
diff --git a/.Xresources.un~ b/.Xresources.un~ Binary files differdeleted file mode 100644 index fd1a0dd..0000000 --- a/.Xresources.un~ +++ /dev/null @@ -120,14 +120,14 @@ xterm*utf8: 1 !!xterm*font: xft:Fira Code:size=12:antialias=true !!xterm*boldFont: xft:Fira Code:bold:size=12:antialias=true -!!*.font: Hack:size=13 -!!*.boldFont: Hack:bold:size=13 +xterm*.font: xft:Hack-Regular:size=9 +xterm*.boldFont: xft:Hack-Bold:bold:size=9 !! nice in ST !*.font: -xos4-terminus-medium-r-normal-*-17-120-100-100-c-0-iso10646-1 !!xterm*font:-misc-proggycleantt-*-*-*-*-*-*-*-*-*-*-*-* -xterm*font: xft:ProggyCleanTT:size=12:antialias=false +!!xterm*font: xft:ProggyCleanTT:size=12:antialias=false !!xterm*font: xft:IBMPlexMono-Regular:size=13:antialias=true !!xterm*boldFont: xft:IBMPlexMono-BoldItalic:size=13:antialias=true diff --git a/config/i3-laptop/config b/config/i3-laptop/config index d49b0ae..f844dcc 100644 --- a/config/i3-laptop/config +++ b/config/i3-laptop/config @@ -1,4 +1,4 @@ -# This file has been auto-generated by i3-config-wizard(1). +#ss This file has been auto-generated by i3-config-wizard(1). # It will not be overwritten, so edit it as you like. # # Should you change your keyboard layout some time, delete @@ -54,7 +54,7 @@ floating_modifier $mod #exec --no-startup-id nm-applet #exec --no-startup-id /usr/bin/qjackctl #exec --no-startup-id /usr/bin/nextcloud -exec --no-startup-id /usr/bin/redshift-gtk +#exec --no-startup-id /usr/bin/redshift-gtk #exec --no-startup-id /usr/bin/feh --bg-max /home/lemon/Pictures/wallpaper/wallhaven-733911.jpg #exec --no-startup-id /home/lemon/.screenlayout/desktop_layout_debian_all_landscape.sh #exec --no-startup-id /usr/bin/xfce4-clipman @@ -96,7 +96,7 @@ bindsym $mod+d exec dmenu_run #bindsym $mod+t exec --no-startup-id i3-dmenu-desktop # pass for dmenu -bindsym $mod+p exec /home/lemon/bin/passmenu.sh +bindsym $mod+p exec /home/lemon/bin-scripts/passmenu.sh ## change focus #bindsym $mod+j focus left @@ -266,7 +266,7 @@ bindsym $mod+r mode "resize" #} # bar { - status_command i3blocks +# status_command i3blocks # status_command 2>/tmp/i3blocks.err /usr/bin/i3blocks -vvv -c /home/lemon/.config/i3blocks/config | tee /tmp/i3blocks.out # status_command 2>/tmp/i3blocks.err SCRIPT_DIR=~/.config/i3blocks /usr/bin/i3blocks -vvv -c /home/lemon/.config/i3blocks/config | tee /tmp/i3blocks.out position top diff --git a/config/i3/config b/config/i3/config new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/config/i3/config @@ -0,0 +1,22 @@ +" display current mode (insert/normal) +set showmode +" show matching parens, braces, etc +set showmatch +" display row/column info +set ruler +" autoindent width = 2 spaces +set shiftwidth=2 +" tab width = 2 spaces +set tabstop=2 +" display all error messages +set verbose +" enable horizontal scrolling +set leftright +" use extended regular expressions +set extended +" case-insensitive search, unless an uppercase letter is used +set iclower +" incremental search +set searchincr +" print helpful messages (eg, 4 lines yanked) +set report=1 diff --git a/fish/config.fish b/fish/config.fish index 41b3457..c64e395 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -12,6 +12,9 @@ #set __fish_git_prompt_char_upstream_behind '↓' # + +alias ls='colorls -G' + alias xclip='xclip -selection c' set fish_greeting "" set -gx TERM screen-256color diff --git a/fish/fish_variables b/fish/fish_variables index 2d81313..ae6b661 100644 --- a/fish/fish_variables +++ b/fish/fish_variables @@ -1,6 +1,6 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 -SETUVAR --export EDITOR:/usr/bin/nvim +SETUVAR --export EDITOR:/usr/local/bin/vim SETUVAR --export LEDGER_FILE:/home/lemon/ledger/hledger\x2eledger SETUVAR PATH:/home/lemon/bin/adb\x2dfastboot/platform\x2dtools/\x1e/home/lemon/bin\x1e/home/lemon/scripts\x1e/home/lemon/\x2elocal/bin\x1e/home/lemon/\x2efzf/bin\x1e/home/lemon/bin\x1e/home/lemon/scripts\x1e/home/lemon/\x2elocal/bin\x1e/home/lemon/bin\x1e/usr/local/bin\x1e/usr/bin\x1e/bin\x1e/usr/local/games\x1e/usr/games SETUVAR --export TERMINAL:/usr/bin/xfce4\x2dterminal @@ -39,5 +39,5 @@ SETUVAR fish_pager_color_completion:normal SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_user_paths:/home/lemon/perl5/perlbrew/bin/\x1e/usr/lib/cargo/bin/\x1e/home/lemon/go/bin\x1e/usr/local/go/bin\x1e/snap/bin\x1e/home/lemon/\x2epoetry/bin\x1e/home/lemon/\x2ecargo/bin\x1e/snap/bin\x1e/home/lemon/bin\x1e/home/lemon/bin/adb\x2dfastboot/platform\x2dtools/\x1e/home/lemon/\x2efzf/bin\x1e/home/lemon/bin +SETUVAR fish_user_paths:/home/lemon/bin\x2dscripts/\x1e/home/lemon/perl5/perlbrew/bin/\x1e/usr/lib/cargo/bin/\x1e/home/lemon/go/bin\x1e/usr/local/go/bin\x1e/snap/bin\x1e/home/lemon/\x2epoetry/bin\x1e/home/lemon/\x2ecargo/bin\x1e/snap/bin\x1e/home/lemon/bin\x1e/home/lemon/bin/adb\x2dfastboot/platform\x2dtools/\x1e/home/lemon/\x2efzf/bin\x1e/home/lemon/bin SETUVAR fisher_dependency_count:Colored\x2dMan\x2dPages\x1ebass @@ -0,0 +1,48 @@ +# from https://www.c0ffee.net/blog/openbsd-on-a-laptop/#x11 +# use vim if it's installed, vi otherwise +case "$(command -v vim)" in + */vim) VIM=vim ;; + *) VIM=vi ;; +esac + +export EDITOR=$VIM +export FCEDIT=$EDITOR +export PAGER=less +export LESS='-iMRS -x2' +export LANG=en_US.UTF-8 +export LC_CTYPE=en_US.UTF-8 +export CLICOLOR=1 +HISTFILE=$HOME/.ksh_history +HISTSIZE=20000 + +# emacs mode gives you the familiar Ctrl-A, Ctrl-E, etc +set -o emacs + +# use colorls if it's installed, plain old ls otherwise +if command -v colorls > /dev/null ; then + LS='colorls' +else + LS='ls' +fi +alias ls="$LS -FHh" +alias ll='ls -l' +alias la='ls -lA' +alias ..='cd ..' +alias ...='cd ...' +alias mkdir='mkdir -p' +alias df='df -h' +alias du='du -ch' +alias weather='curl http://wttr.in/New_York' +command -v neomutt > /dev/null && alias mutt='neomutt' +alias svim="doas vim" +alias svi="doas vi" + +# nice colored prompt that also sets xterm title +_XTERM_TITLE='\[\033]0;\u@\h:\w\007\]' +_PS1_CLEAR='\[\033[0m\]' +_PS1_BLUE='\[\033[34m\]' +case "$(id -u)" in + 0) _PS1_COLOR='\[\033[1;31m\]' ;; + *) _PS1_COLOR='\[\033[32m\]' ;; +esac +PS1='$_XTERM_TITLE\A $_PS1_COLOR\u@\h$_PS1_CLEAR:$_PS1_BLUE\w$_PS1_COLOR\$$_PS1_CLEAR ' @@ -1,28 +1,5 @@ -# ~/.profile: executed by the command interpreter for login shells. -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login -# exists. -# see /usr/share/doc/bash/examples/startup-files for examples. -# the files are located in the bash-doc package. +# $OpenBSD: dot.profile,v 1.7 2020/01/24 02:09:51 okan Exp $ +# +# sh/ksh initialization +export ENV=$HOME/.kshrc -# the default umask is set in /etc/profile; for setting the umask -# for ssh logins, install and configure the libpam-umask package. -#umask 022 - -# if running bash -if [ -n "$BASH_VERSION" ]; then - # include .bashrc if it exists - if [ -f "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi -fi - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ] ; then - PATH="$HOME/bin:$PATH" -fi - -export PATH="$HOME/.poetry/bin:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" -export PATH=/usr/local/go/bin:$PATH -export PATH=~/.local/bin:$PATH -export PATH=~/scripts:$PATH @@ -247,4 +247,4 @@ report.ml_deleted_last_month.filter=end.after:today-30day status:deleted # regex on regex=on -context=home +context=work diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..a051efc --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,145 @@ +" New vimrc! Jan 2020 +" +" We want to load this first - everything else I include overrides it +runtime! plugin/sensible.vim + +set nocompatible + +syntax on +filetype indent on +filetype plugin on + +set omnifunc=syntaxcomplete#Complete + +" Do not scan included files when doing autocomplete +" When doing C-n in default Vim autocomplete, it looks through all +" includes which can take time. We can turn it off... This is referenced +" at https://stackoverflow.com/questions/2169645/vims-autocomplete-is-excruciatingly-slow +" and on p287 of Practical Vim +set complete-=i + +"vim-go +let test#go#runner = 'gotest' + +let g:go_term_mode = "split" +let g:go_term_height = 10 +"autocmd FileType go nmap <leader>r :w<CR>:split <bar> terminal go run %<CR> +autocmd FileType go nmap <leader>r :GoRun<CR> +" highlights the variable in the file for you.. +"let g:go_auto_sameids = 1 +" auto import... +let g:go_fmt_command = "goimports" +" automatic type info on cursor +let g:go_auto_type_info = 1 +"let g:go_snippet_engine = "neosnippet" +au Filetype go nmap <leader>ga <Plug>(go-alternate-edit) +au Filetype go nmap <leader>gah <Plug>(go-alternate-split) +au Filetype go nmap <leader>gav <Plug>(go-alternate-vertical) +au FileType go nmap <F10> :GoTest -short<cr> +au FileType go nmap <F9> :DlvToggleBreakpoint<CR> +au FileType go nmap <S-F9> :DlvTest<CR> +au FileType go nmap <F11> :DlvDebug<CR> +au FileType go nmap <S-F5> :GoRename<CR> + +" vim-test + +" use vim-dispatch to run tests in the quickfix window +" from Modern Vim Ch.4 +" the mappings below are from vim-test +" https://github.com/vim-test/vim-test +" dispatch opens send test output to quickfix window +let test#strategy = "vimterminal" +let test#python#runner = "pytest" +let test#neovim#term_position = "topleft" +let test#python#pytest#options = '-vvv --tb=short' +let test#go#runner = 'gotest' +"let test#go#gotest#options = '-v' + +" To run mypy using vim-dispath -with Dispatch +autocmd FileType python let b:dispatch = 'mypy --ignore-missing-imports' + +nmap <silent> t<C-n> :TestNearest<CR> +nmap <silent> t<C-f> :TestFile<CR> +nmap <silent> t<C-s> :TestSuite<CR> +"nmap <silent> t<C-l> :TestLast<CR> +nmap <silent> <S-F10> :TestLast<CR> +nmap <silent> t<C-g> :TestVisit<CR> + +"backups/swap +set swapfile +set directory^=~/.vim/swap// +set writebackup +set nobackup + +" persist the undo tree for each file +set undofile +set undodir^=~/.vim/undo// + +" wildignore +set wildignore=*.swp,*.bak,*.pyc,*.class +set wildignore+=.hg,.git,.svn " Version control +set wildignore+=*.aux,*.out,*.toc " LaTeX intermediate files +set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg " binary images +set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest " compiled object files +set wildignore+=*.spl " compiled spelling word lists +set wildignore+=*.sw? " Vim swap files +set wildignore+=*.DS_Store " OSX bullshit +set wildignore+=*.luac " Lua byte code +set wildignore+=migrations " Django migrations +set wildignore+=*.pyc " Python byte code +set wildignore+=*.orig " Merge resolution files + +set visualbell +set noerrorbells +set splitbelow +set splitright +set autowrite +set linebreak +set fileencodings=utf-8 +set ttyfast +"set t_Co=256 +set background=dark +set path+=** +set relativenumber +set incsearch +set hlsearch + +" make complete popupmenu better +set completeopt=longest,menuone + +" leader +let maplocalleader = "\\" +let mapleader = "," + +" Ag +if executable("ag") + set grepprg=ag\ --nogroup\ --nocolor\ --ignore-case\ --column + set grepformat=%f:%l:%c:%m,%f:%l:%m +endif + +" maps +nnoremap <leader>b :b <C-d> +nnoremap <leader>g :grep<space> +nnoremap <leader>q :b#<cr> +nnoremap <leader><space> :noh<cr>:call clearmatches()<cr> +nnoremap <leader>e :e ./**/ + +" nice search in buffer +" (example use :14 to select from menu) +nnoremap <leader>S :g//#<left><left> + +" playing with Python syntax highlighting +highlight pythonString cterm=NONE ctermbg=NONE ctermfg=65 +highlight pythonQuotes cterm=NONE ctermbg=NONE ctermfg=65 +highlight pythonBuiltin cterm=NONE ctermbg=NONE ctermfg=32 + +" ghetto linting +autocmd FileType python setlocal makeprg=flake8 +" this makes the quickfix window open automatically after +autocmd QuickFixCmdPost [^l]* cwindow + + +" nice statusline +"set statusline=%-20F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] +"set statusline+=%{gutentags#statusline()} +set statusline=%<\ %f\ %m%r%y%w%=\ L:\ \%l\/\%L\ C:\ \%c\ diff --git a/xinitrc-alt b/xinitrc-alt new file mode 100644 index 0000000..bdc83cb --- /dev/null +++ b/xinitrc-alt @@ -0,0 +1 @@ +# enable scrolling with trackpoint and middle button @@ -1,4 +1,29 @@ -xset s off # don't activate screensaver -xset -dpms # disable DPMS (Energy Star) features. -xsetroot -solid "#333333" -xset b off # stop the fucking beep +# much from https://www.c0ffee.net/blog/openbsd-on-a-laptop/#initial-configuration + +export LANG=en_GB.UTF-8 +#export ENV=$HOME/.kshrc +xrdb -merge $HOME/.Xresources +xidle & +. ~/.profile +xset -b + +export GPG_TTY="$(tty)" +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +gpgconf --launch gpg-agent + +#PS1='$PWD# ' +#export LSCOLORS=fxexcxdxbxegedabagacad +# this value from the colorls man page +export LSCOLORS=exfxcxdxbxegedabagacad + +# if you have a ThinkPad, the following lines enable TrackPoint +# scrolling by dragging with the middle button. +xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 +xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 +xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 + +xsetroot - solid dimgray + +alias ls='colorls -G' +#alias vi=nvim +exec i3 |