diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-09-09 09:09:19 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-09-09 09:09:19 -0700 |
commit | d73b9ad6094d37864f7859871c4fdf705d9fa60c (patch) | |
tree | 93e8b8e25dbaa7b0b81ef0c264134c16cf23ce4f | |
parent | 39f710dfb2010c4df0c14f5079173562071d6a65 (diff) |
checkin
-rw-r--r-- | .config/alacritty/alacritty.yml | 268 | ||||
-rw-r--r-- | .config/fish/config.fish | 27 | ||||
-rw-r--r-- | .config/fish/fish_variables | 2 | ||||
-rw-r--r-- | .config/msmtp/config | 20 | ||||
-rw-r--r-- | .config/mutt/mail | 11 | ||||
-rw-r--r-- | .config/mutt/muttrc | 12 | ||||
-rw-r--r-- | .config/mutt/usr/gmail | 1 | ||||
-rw-r--r-- | .config/mutt/usr/main | 1 | ||||
-rw-r--r-- | .config/mutt/usr/work | 12 | ||||
-rw-r--r-- | .config/nvim/after/syntax/c.vim | 2 | ||||
-rw-r--r-- | .config/nvim/init.vim | 23 | ||||
-rw-r--r-- | .config/nvim/leaders.vim | 5 | ||||
-rw-r--r-- | .config/nvim/plugins.vim | 72 | ||||
-rw-r--r-- | .config/nvim/settings.vim | 2 | ||||
-rw-r--r-- | .config/offlineimap/config | 36 | ||||
-rw-r--r-- | .config/offlineimap/func.pyc | bin | 419 -> 419 bytes | |||
-rw-r--r-- | .config/picom/config | 5 | ||||
-rw-r--r-- | .config/qutebrowser/bookmarks/urls | 1 | ||||
-rw-r--r-- | .config/qutebrowser/config.py | 89 | ||||
-rw-r--r-- | .config/qutebrowser/quickmarks | 10 | ||||
-rw-r--r-- | .config/tmux/config | 4 | ||||
-rw-r--r-- | .gdbinit | 2 | ||||
-rw-r--r-- | .xinitrc | 9 |
23 files changed, 230 insertions, 384 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml deleted file mode 100644 index 64924ca..0000000 --- a/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,268 +0,0 @@ -env: - TERM: alacritty -window: - dimensions: - columns: 100 - lines: 30 - padding: - x: 2 - y: 2 - decorations: none - -scrolling: - history: 10000 - - # Number of lines the viewport will move for every line - # scrolled when scrollback is enabled (history > 0). - multiplier: 3 - -draw_bold_text_with_bright_colors: true - -font: - normal: - family: consolas - bold: - family: consolas - italic: - family: consolas - bold-italic: - family: consolas - size: 12.0 - - # Offset is the extra space around each character. offset.y can be thought of - # as modifying the linespacing, and offset.x as modifying the letter spacing. - offset: - x: 0 - y: 0 - - # Glyph offset determines the locations of the glyphs within their cells with - # the default being at the bottom. Increase the x offset to move the glyph to - # the right, increase the y offset to move the glyph upward. - glyph_offset: - x: 0 - y: 0 - -# Colors (Seoul256) -colors: - # Default colors - primary: - background: '#3a3a3a' - foreground: '#d0d0d0' - - # Normal colors - normal: - black: '#4e4e4e' - red: '#d68787' - green: '#5f865f' - yellow: '#d8af5f' - blue: '#85add4' - magenta: '#d7afaf' - cyan: '#87afaf' - white: '#d0d0d0' - - # Bright colors - bright: - black: '#626262' - red: '#d75f87' - green: '#87af87' - yellow: '#ffd787' - blue: '#add4fb' - magenta: '#ffafaf' - cyan: '#87d7d7' - white: '#e4e4e4' - -visual_bell: - animation: EaseOutExpo - duration: 0 # disabled - -background_opacity: 0.9 - -# Mouse bindings -# -# Currently doesn't support modifiers. Both the `mouse` and `action` fields must -# be specified. -# -# Values for `mouse`: -# - Middle -# - Left -# - Right -# - Numeric identifier such as `5` -# -# Values for `action`: -# - Paste -# - PasteSelection -# - Copy (TODO) -mouse_bindings: - - { mouse: Middle, action: PasteSelection } - -mouse: - double_click: { threshold: 300 } - triple_click: { threshold: 300 } - - url: - launcher: xdg-open - modifiers: Control - -selection: - semantic_escape_chars: ",│`|:\"' ()[]{}<>" - -dynamic_title: true - -live_config_reload: true - -# Key bindings -# -# Each binding is defined as an object with some properties. Most of the -# properties are optional. All of the alphabetical keys should have a letter for -# the `key` value such as `V`. Function keys are probably what you would expect -# as well (F1, F2, ..). The number keys above the main keyboard are encoded as -# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`, -# etc. These all match the glutin::VirtualKeyCode variants. -# -# A list with all available `key` names can be found here: -# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants -# -# Possible values for `mods` -# `Command`, `Super` refer to the super/command/windows key -# `Control` for the control key -# `Shift` for the Shift key -# `Alt` and `Option` refer to alt/option -# -# mods may be combined with a `|`. For example, requiring control and shift -# looks like: -# -# mods: Control|Shift -# -# The parser is currently quite sensitive to whitespace and capitalization - -# capitalization must match exactly, and piped items must not have whitespace -# around them. -# -# Either an `action`, `chars`, or `command` field must be present. -# `action` must be one of the following: -# - `Paste` -# - `PasteSelection` -# - `Copy` -# - `IncreaseFontSize` -# - `DecreaseFontSize` -# - `ResetFontSize` -# - `ScrollPageUp` -# - `ScrollPageDown` -# - `ScrollToTop` -# - `ScrollToBottom` -# - `Quit` -# `chars` writes the specified string every time that binding is activated. -# These should generally be escape sequences, but they can be configured to -# send arbitrary strings of bytes. -# `command` must be a map containing a `program` string, and `args` array of -# strings. For example: -# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } } -# -# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence -# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux, -# then run `showkey -a` to get the sequence associated to a key combination. -key_bindings: - - { key: V, mods: Control|Shift, action: Paste } - - { key: C, mods: Control|Shift, action: Copy } - - { key: Paste, action: Paste } - - { key: Copy, action: Copy } - - { key: Q, mods: Command, action: Quit } - - { key: W, mods: Command, action: Quit } - - { key: Insert, mods: Shift, action: PasteSelection } - - { key: Key0, mods: Control, action: ResetFontSize } - - { key: Equals, mods: Control, action: IncreaseFontSize } - - { key: Subtract, mods: Control, action: DecreaseFontSize } - - { key: Home, chars: "\x1bOH", mode: AppCursor } - - { key: Home, chars: "\x1b[H", mode: ~AppCursor } - - { key: End, chars: "\x1bOF", mode: AppCursor } - - { key: End, chars: "\x1b[F", mode: ~AppCursor } - - { key: PageUp, mods: Shift, chars: "\x1b[5;2~" } - - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } - - { key: PageUp, chars: "\x1b[5~" } - - { key: PageDown, mods: Shift, chars: "\x1b[6;2~" } - - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } - - { key: PageDown, chars: "\x1b[6~" } - - { key: Tab, mods: Shift, chars: "\x1b[Z" } - - { key: Back, chars: "\x7f" } - - { key: Back, mods: Alt, chars: "\x1b\x7f" } - - { key: Insert, chars: "\x1b[2~" } - - { key: Delete, chars: "\x1b[3~" } - - { key: Left, mods: Shift, chars: "\x1b[1;2D" } - - { key: Left, mods: Control, chars: "\x1b[1;5D" } - - { key: Left, mods: Alt, chars: "\x1b[1;3D" } - - { key: Left, chars: "\x1b[D", mode: ~AppCursor } - - { key: Left, chars: "\x1bOD", mode: AppCursor } - - { key: Right, mods: Shift, chars: "\x1b[1;2C" } - - { key: Right, mods: Control, chars: "\x1b[1;5C" } - - { key: Right, mods: Alt, chars: "\x1b[1;3C" } - - { key: Right, chars: "\x1b[C", mode: ~AppCursor } - - { key: Right, chars: "\x1bOC", mode: AppCursor } - - { key: Up, mods: Shift, chars: "\x1b[1;2A" } - - { key: Up, mods: Control, chars: "\x1b[1;5A" } - - { key: Up, mods: Alt, chars: "\x1b[1;3A" } - - { key: Up, chars: "\x1b[A", mode: ~AppCursor } - - { key: Up, chars: "\x1bOA", mode: AppCursor } - - { key: Down, mods: Shift, chars: "\x1b[1;2B" } - - { key: Down, mods: Control, chars: "\x1b[1;5B" } - - { key: Down, mods: Alt, chars: "\x1b[1;3B" } - - { key: Down, chars: "\x1b[B", mode: ~AppCursor } - - { key: Down, chars: "\x1bOB", mode: AppCursor } - - { key: F1, chars: "\x1bOP" } - - { key: F2, chars: "\x1bOQ" } - - { key: F3, chars: "\x1bOR" } - - { key: F4, chars: "\x1bOS" } - - { key: F5, chars: "\x1b[15~" } - - { key: F6, chars: "\x1b[17~" } - - { key: F7, chars: "\x1b[18~" } - - { key: F8, chars: "\x1b[19~" } - - { key: F9, chars: "\x1b[20~" } - - { key: F10, chars: "\x1b[21~" } - - { key: F11, chars: "\x1b[23~" } - - { key: F12, chars: "\x1b[24~" } - - { key: F1, mods: Shift, chars: "\x1b[1;2P" } - - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } - - { key: F3, mods: Shift, chars: "\x1b[1;2R" } - - { key: F4, mods: Shift, chars: "\x1b[1;2S" } - - { key: F5, mods: Shift, chars: "\x1b[15;2~" } - - { key: F6, mods: Shift, chars: "\x1b[17;2~" } - - { key: F7, mods: Shift, chars: "\x1b[18;2~" } - - { key: F8, mods: Shift, chars: "\x1b[19;2~" } - - { key: F9, mods: Shift, chars: "\x1b[20;2~" } - - { key: F10, mods: Shift, chars: "\x1b[21;2~" } - - { key: F11, mods: Shift, chars: "\x1b[23;2~" } - - { key: F12, mods: Shift, chars: "\x1b[24;2~" } - - { key: F1, mods: Control, chars: "\x1b[1;5P" } - - { key: F2, mods: Control, chars: "\x1b[1;5Q" } - - { key: F3, mods: Control, chars: "\x1b[1;5R" } - - { key: F4, mods: Control, chars: "\x1b[1;5S" } - - { key: F5, mods: Control, chars: "\x1b[15;5~" } - - { key: F6, mods: Control, chars: "\x1b[17;5~" } - - { key: F7, mods: Control, chars: "\x1b[18;5~" } - - { key: F8, mods: Control, chars: "\x1b[19;5~" } - - { key: F9, mods: Control, chars: "\x1b[20;5~" } - - { key: F10, mods: Control, chars: "\x1b[21;5~" } - - { key: F11, mods: Control, chars: "\x1b[23;5~" } - - { key: F12, mods: Control, chars: "\x1b[24;5~" } - - { key: F1, mods: Alt, chars: "\x1b[1;6P" } - - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } - - { key: F3, mods: Alt, chars: "\x1b[1;6R" } - - { key: F4, mods: Alt, chars: "\x1b[1;6S" } - - { key: F5, mods: Alt, chars: "\x1b[15;6~" } - - { key: F6, mods: Alt, chars: "\x1b[17;6~" } - - { key: F7, mods: Alt, chars: "\x1b[18;6~" } - - { key: F8, mods: Alt, chars: "\x1b[19;6~" } - - { key: F9, mods: Alt, chars: "\x1b[20;6~" } - - { key: F10, mods: Alt, chars: "\x1b[21;6~" } - - { key: F11, mods: Alt, chars: "\x1b[23;6~" } - - { key: F12, mods: Alt, chars: "\x1b[24;6~" } - - { key: F1, mods: Super, chars: "\x1b[1;3P" } - - { key: F2, mods: Super, chars: "\x1b[1;3Q" } - - { key: F3, mods: Super, chars: "\x1b[1;3R" } - - { key: F4, mods: Super, chars: "\x1b[1;3S" } - - { key: F5, mods: Super, chars: "\x1b[15;3~" } - - { key: F6, mods: Super, chars: "\x1b[17;3~" } - - { key: F7, mods: Super, chars: "\x1b[18;3~" } - - { key: F8, mods: Super, chars: "\x1b[19;3~" } - - { key: F9, mods: Super, chars: "\x1b[20;3~" } - - { key: F10, mods: Super, chars: "\x1b[21;3~" } - - { key: F11, mods: Super, chars: "\x1b[23;3~" } - - { key: F12, mods: Super, chars: "\x1b[24;3~" } diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 7fe9ecd..feb6705 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -5,11 +5,15 @@ set -g -x XDG_PICTURES_DIR "$HOME/media/pics" set -g -x XDG_VIDEOS_DIR "$HOME/media" set -g -x PYTHONPATH "$HOME/root/lib/py/" $PYTHONPATH +set -g -x PATH $PATH "$HOME/code/bio/pangraph/bin" # Set global environmental variables set -g -x MAILCAPS /home/nolln/.config/mutt/mailcap set -g -x TEXINPUTS .:/home/nolln/docs//:/usr/share/texmf-dist/tex// set -g -x QT_QPA_PLATFORM xcb +set -g -x LS_COLORS 'ow=36:di=34:fi=0:ex=32:ln=35:' + +set -g -x JULIA_NUM_THREADS 4 # Set system apps set EDITOR nvim @@ -29,22 +33,31 @@ alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' + alias vim='nvim' alias gdb='gdb -q' alias mail='neomutt' alias tmux='tmux -f $HOME/.config/tmux/config' alias screenshot='grim -g (slurp) - | wl-copy' alias lofi="mpv 'https://www.youtube.com/watch?v=5qap5aO4i9A' --no-video" - +alias wttr='curl wttr.in' +alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' alias dbg='~/pyenv/bin/gdbgui' +alias vpn='/opt/cisco/anyconnect/bin/vpnui' -# Configuration file save -alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' +# remote +alias vpn-ucsb='sudo openconnect --protocol=pulse https://ps.vpn.ucsb.edu/ra' + +alias ssh-pod='ssh -X nbnoll@pod-login1.cnsi.ucsb.edu -t "zsh --login"' +alias mnt-pod='sshfs nbnoll@pod-login1.cnsi.ucsb.edu:/home/nbnoll $HOME/mnt/cluster' + +alias ssh-knot='ssh -X nbnoll@knot7.cnsi.ucsb.edu' +alias mnt-knot='sshfs nbnoll@knot7.cnsi.ucsb.edu:/home/nbnoll $HOME/mnt/cluster' -alias scicore='ssh -X nolln@login.scicore.unibas.ch' -alias piboi='ssh -X nolln@192.168.0.75' -alias mntC='sshfs nolln@login.scicore.unibas.ch:/scicore/home/neher/nolln $HOME/mnt/cluster' -alias umntC='umount $HOME/mnt/cluster' +alias umnt-cluster='umount $HOME/mnt/cluster' # Prompt configuration. set PURE_REVERSE_PROMPT_SYMBOL_IN_VIMODE false diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 69ca71d..33bb6b2 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -44,7 +44,7 @@ SETUVAR fish_pager_color_completion:normal SETUVAR fish_pager_color_description:yellow 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/nolln/root/bin\x1e/home/nolln/\x2eyarn/bin\x1e/home/nolln/code/bin\x1e/home/nolln/go/bin\x1e/home/nolln/\x2elocal/bin\x1e/home/nolln/code/muon/bin\x1e/home/nolln/\x2efzf/bin\x1e/home/nolln/opt/Vivado/2019\x2e2/bin +SETUVAR fish_user_paths:/home/nolln/\x2epoetry/bin\x1e/home/nolln/root/bin\x1e/home/nolln/\x2eyarn/bin\x1e/home/nolln/code/bin\x1e/home/nolln/go/bin\x1e/home/nolln/\x2elocal/bin\x1e/home/nolln/code/muon/bin\x1e/home/nolln/\x2efzf/bin\x1e/home/nolln/opt/Vivado/2019\x2e2/bin SETUVAR pure_begin_prompt_with_current_directory:true SETUVAR pure_color_command_duration:pure_color_warning SETUVAR pure_color_current_directory:pure_color_primary diff --git a/.config/msmtp/config b/.config/msmtp/config index 45405ff..7ab7008 100644 --- a/.config/msmtp/config +++ b/.config/msmtp/config @@ -13,12 +13,20 @@ from nbnoll@eml.cc user nbnoll@eml.cc passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.config/password/fastmail.gpg" -# workmail -account work -host smtp-ext.unibas.com +# gmail +account gmail +host smtp.gmail.com port 587 -from nicholas.noll@unibas.ch -user nicholas.noll@unibas.ch -passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.config/password/workmail.gpg" +from nnoll523@gmail.com +user nnoll523@gmail.com +passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.config/password/gmail.gpg" + +# gmail +account kitp +host smtp.gmail.com +port 587 +from nnoll@ucsb.edu +user nnoll@ucsb.edu +passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.config/password/ucsb.gpg" account default : main diff --git a/.config/mutt/mail b/.config/mutt/mail index 3c374c2..bc98f1f 100644 --- a/.config/mutt/mail +++ b/.config/mutt/mail @@ -27,9 +27,12 @@ set crypt_replysignencrypted named-mailboxes "----------- Main -----------" =main named-mailboxes "main/Inbox" =main/INBOX mailboxes =main/Archive =main/Drafts =main/Sent =main/Trash -named-mailboxes "----------- Work -----------" =work -named-mailboxes "work/Inbox" =work/INBOX -mailboxes =work/Drafts =work/Sent =work/Trash +named-mailboxes "----------- Kitp -----------" =kitp +named-mailboxes "kitp/Inbox" =kitp/INBOX +named-mailboxes "kitp/Drafts" =kitp/[Gmail].Drafts +named-mailboxes "kitp/Trash" =kitp/[Gmail].Trash +named-mailboxes "kitp/Sent" ="kitp/[Gmail].Sent Mail" +named-mailboxes "kitp/Archive" ="kitp/_Archive" named-mailboxes "----------- Gmail -----------" =gmail named-mailboxes "gmail/Inbox" =gmail/INBOX named-mailboxes "gmail/Drafts" =gmail/[Gmail].Drafts @@ -41,5 +44,5 @@ named-mailboxes "gmail/Archive" ="gmail/[Gmail].Store" source ~/.config/mutt/usr/main folder-hook main/* source ~/.config/mutt/usr/main -folder-hook work/* source ~/.config/mutt/usr/work +folder-hook kitp/* source ~/.config/mutt/usr/kitp folder-hook gmail/* source ~/.config/mutt/usr/gmail diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc index 74cff72..c214105 100644 --- a/.config/mutt/muttrc +++ b/.config/mutt/muttrc @@ -1,5 +1,5 @@ ######################## -# Basic settings +# basic settings source $HOME/.config/mutt/mail source $HOME/.config/mutt/display @@ -9,11 +9,17 @@ source $HOME/.config/mutt/colors auto_view text/plain text/html set sleep_time = 0 -# Sidebar +# sidebar set sidebar_visible set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" set mail_check_stats -# Aliases +# threads +set uncollapse_new = yes +set uncollapse_jump = yes +set collapse_unread = no +folder-hook . push '<collapse-all>' #collapse by default + +# aliases alias erik.vannimwegen Erik van Nimwegen <erik.vannimwegen@unibas.ch> alias boris Boris Shraiman <shraiman@kitp.ucsb.edu> diff --git a/.config/mutt/usr/gmail b/.config/mutt/usr/gmail index c2a2e7d..15bc439 100644 --- a/.config/mutt/usr/gmail +++ b/.config/mutt/usr/gmail @@ -6,6 +6,7 @@ set spoolfile = "+gmail/INBOX" set postponed = "+gmail/[Gmail].Drafts" set trash = "+gmail/[Gmail].Trash" set record = "+gmail/[Gmail].Sent Mail" +set sendmail = "/usr/bin/msmtp -a gmail" # account specific macros macro index,pager a "<save-message>+gmail/[Gmail].Store<enter>" "Archive Message" diff --git a/.config/mutt/usr/main b/.config/mutt/usr/main index 27f127e..fe4cf57 100644 --- a/.config/mutt/usr/main +++ b/.config/mutt/usr/main @@ -7,6 +7,7 @@ set record = "+main/Sent" set postponed = "+main/Drafts" set trash = "+main/Trash" set mbox = "+main/Archive" +set sendmail = "/usr/bin/msmtp -a main" # account specific macros macro index,pager a "<save-message>+main/Archive<enter>" "Archive Message" diff --git a/.config/mutt/usr/work b/.config/mutt/usr/work deleted file mode 100644 index c00f3b3..0000000 --- a/.config/mutt/usr/work +++ /dev/null @@ -1,12 +0,0 @@ -# vim: ft=muttrc - -# Unibas account -set from = "nicholas.noll@unibas.ch" -set spoolfile = "+work/INBOX" -set record = "+work/Sent" -set postponed = "+work/Drafts" -set trash = "+work/Trash" -set mbox = "+work/Archive" - -macro index,pager a "<save-message>+work/Archive<enter>" "Archive Message" -macro index,pager D "<save-message>+work/Trash<enter>" "Trash Message" diff --git a/.config/nvim/after/syntax/c.vim b/.config/nvim/after/syntax/c.vim index 019af16..04896e7 100644 --- a/.config/nvim/after/syntax/c.vim +++ b/.config/nvim/after/syntax/c.vim @@ -1,6 +1,6 @@ syn keyword cgoInt uint8 uint16 uint32 uint64 int8 int16 int32 int64 uint uintptr intptr byte ubyte sbyte ulong vlong uvlong rune syn keyword cgoFloat float32 float64 -syn keyword cgoType error string +syn keyword cgoType string syn keyword cgoConstant nil syn keyword cgoPanic panicf diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index c8633ce..f4fce83 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -17,33 +17,32 @@ Plug 'nathanaelkane/vim-indent-guides' " Indent blocks. Plug 'unblevable/quick-scope' " Quick horizontal movements. Plug 'https://github.com/adelarsq/vim-matchit' " Extended match operations for % operator -Plug 'neovim/nvim-lsp' -Plug 'haorenW1025/diagnostic-nvim' +Plug 'neovim/nvim-lspconfig' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/deoplete-lsp' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' " Fuzzy file searchs +Plug 'junegunn/fzf.vim' " Fuzzy file searchs Plug 'simeji/winresizer' " Nice window resize -" Writing help -Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' } - " Version control Plug 'airblade/vim-gitgutter' -Plug 'tpope/vim-fugitive' " Language specific -Plug 'lervag/vimtex' " LaTeX -Plug 'plasticboy/vim-markdown' " Markdown -Plug 'dag/vim-fish' " Fish -Plug 'fatih/vim-go' " Go -Plug 'vim-python/python-syntax' " Python +Plug 'lervag/vimtex' " LaTeX +Plug 'plasticboy/vim-markdown' " Markdown +Plug 'dag/vim-fish' " Fish +Plug 'fatih/vim-go' " Go +Plug 'JuliaEditorSupport/julia-vim' " Julia +Plug 'vim-python/python-syntax' " Python " Formatting Plug 'sbdchd/neoformat' +Plug 'leafgarland/typescript-vim' +Plug 'peitalin/vim-jsx-typescript' + call plug#end() packadd termdebug diff --git a/.config/nvim/leaders.vim b/.config/nvim/leaders.vim index 6b8b290..95ad868 100644 --- a/.config/nvim/leaders.vim +++ b/.config/nvim/leaders.vim @@ -11,13 +11,8 @@ nnoremap <Leader>o :only<CR> nnoremap <Leader>\| :wincmd \|<CR> nnoremap <Leader>= :wincmd =<CR> nnoremap <Leader>r :wincmd R<CR> -nnoremap <Leader>h :wincmd h<CR> -nnoremap <Leader>j :wincmd j<CR> -nnoremap <Leader>k :wincmd k<CR> -nnoremap <Leader>l :wincmd l<CR> " remove highlights - nnoremap <Leader><Leader>R<CR> :so ~/.config/nvim/init.vim " testing diff --git a/.config/nvim/plugins.vim b/.config/nvim/plugins.vim index 52cba75..174386c 100644 --- a/.config/nvim/plugins.vim +++ b/.config/nvim/plugins.vim @@ -5,37 +5,56 @@ " Diagnostics for LSP lua << - local lsp = require 'nvim_lsp' - local dig = require 'diagnostic' + local lsp = require('lspconfig') + + local setup = function(client, buffer) + local function set_keymap(...) vim.api.nvim_buf_set_keymap(buffer, ...) end + local function set_option(...) vim.api.nvim_buf_set_option(buffer, ...) end + + set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + + local opts = { noremap=true, silent=true } + + set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) + set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) + set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) + set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) + set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) + set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) + set_keymap('n', '[c', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts) + set_keymap('n', ']c', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts) + set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts) + --[[ + set_keymap('n', '<space>dt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts) + set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) + --]] + end - local function on_attach() - dig.on_attach() + local servers = { 'clangd', 'julials', 'tsserver' } + for _, s in ipairs(servers) do + lsp[s].setup { + on_attach=setup, + flags = { + debounce_text_changes = 150, + } + } end - lsp.clangd.setup{on_attach=on_attach} + vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, { + virtual_text = false + } + ) . -nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR> -nnoremap <silent> gD <cmd>lua vim.lsp.buf.definition()<CR> -nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR> -nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR> -nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR> -nnoremap <silent> g0 <cmd>lua vim.lsp.buf.document_symbol()<CR> - -nnoremap <silent> ]c :NextDiagnosticCycle<CR> -nnoremap <silent> [c :PrevDiagnostic<CR> - -let g:deoplete#enable_at_startup = 1 -let g:diagnostic_insert_delay = 1 - " gdb debugging let g:termdebug_wide = 1 -" Latex configuration +" latex configuration let g:tex_flavor="latex" let g:vimtex_view_general_viewer="zathura" -" Show git gutter +" show git gutter let g:gitgutter_grep='' let g:gitgutter_set_sign_backgrounds = 1 @@ -61,15 +80,16 @@ let g:python_highlight_all = 1 " Clang support autocmd FileType c,cpp setlocal commentstring=//\ %s -" Markdown support -let g:vim_markdown_preview_pandoc=1 -let g:vim_markdown_math=1 - " prettier " when running at every change you may want to disable quickfix -let g:prettier#autoformat = 0 +function RunPrettier() + let l:winview = winsaveview() + 1,$ !yarn -s prettier --stdin-filepath %:p --loglevel silent + call winrestview(l:winview) +endfunction augroup fmt autocmd! - autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html undojoin | Neoformat prettier + autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html call RunPrettier() augroup END +autocmd BufNewFile,BufRead *.tsx,*.jsx set filetype=typescriptreact diff --git a/.config/nvim/settings.vim b/.config/nvim/settings.vim index 0f13e6d..4bfc4c1 100644 --- a/.config/nvim/settings.vim +++ b/.config/nvim/settings.vim @@ -21,7 +21,7 @@ set expandtab " Set text display properties. set smartindent -set wrap +set nowrap set linebreak set nolist diff --git a/.config/offlineimap/config b/.config/offlineimap/config index 402b490..737a7a4 100644 --- a/.config/offlineimap/config +++ b/.config/offlineimap/config @@ -1,6 +1,6 @@ [general] ui = ttyui -accounts = main, work, gmail +accounts = main, kitp, gmail pythonfile = ~/.config/offlineimap/func.py [Account main] @@ -20,24 +20,6 @@ remotepasseval = get_pass("~/.config/password/fastmail.gpg") maxconnections = 3 sslcacertfile = /etc/ssl/certs/ca-certificates.crt -[Account work] -localrepository = work-local -remoterepository = work-remote - -[Repository work-local] -type = Maildir -localfolders = ~/mail/work - -[Repository work-remote] -type = IMAP -remotehost = mail.unibas.ch -remoteport = 993 -remoteuser = nicholas.noll@unibas.ch -remotepasseval = get_pass("~/.config/password/workmail.gpg") -maxconnections = 3 -sslcacertfile = /etc/ssl/certs/ca-certificates.crt -readonly = False - [Account gmail] localrepository = gmail-local remoterepository = gmail-remote @@ -53,3 +35,19 @@ remotepasseval = get_pass("~/.config/password/gmail.gpg") folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Drafts', '[Gmail]/Sent Mail', '[Gmail]/Store', '[Gmail]/Trash'] maxconnections = 3 sslcacertfile = /etc/ssl/certs/ca-certificates.crt + +[Account kitp] +localrepository = kitp-local +remoterepository = kitp-remote + +[Repository kitp-local] +type = GmailMaildir +localfolders = ~/mail/kitp + +[Repository kitp-remote] +type = Gmail +remoteuser = nnoll@ucsb.edu +remotepasseval = get_pass("~/.config/password/ucsb.gpg") +folderfilter = lambda folder: folder in ['INBOX', '[Gmail]/Drafts', '[Gmail]/Sent Mail', '_Archive', '[Gmail]/Trash'] +maxconnections = 3 +sslcacertfile = /etc/ssl/certs/ca-certificates.crt diff --git a/.config/offlineimap/func.pyc b/.config/offlineimap/func.pyc Binary files differindex d911971..42382e8 100644 --- a/.config/offlineimap/func.pyc +++ b/.config/offlineimap/func.pyc diff --git a/.config/picom/config b/.config/picom/config index a402f2f..7af894b 100644 --- a/.config/picom/config +++ b/.config/picom/config @@ -30,6 +30,11 @@ opacity-rule = [ "99:class_g = 'Chromium'", "99:class_g = 'Inkscape'", "99:class_g = 'Gimp'", + "100:class_g = 'eqgame.exe'", + "100:class_g = 'Temtem.exe'", + "100:class_g = 'DaggerfallUnity'", + "100:class_g = 'steam'", + "100:class_g = 'terraria'", ]; vsync = true; diff --git a/.config/qutebrowser/bookmarks/urls b/.config/qutebrowser/bookmarks/urls index 1e7497d..ce94ddd 100644 --- a/.config/qutebrowser/bookmarks/urls +++ b/.config/qutebrowser/bookmarks/urls @@ -2,3 +2,4 @@ https://stackoverflow.com/questions/1083172/how-to-mmap-the-stack-for-the-clone- http://www.sandpile.org/x86/gpr.htm sandpile.org -- x86 architecture -- general purpose registers https://github.com/danistefanovic/build-your-own-x danistefanovic/build-your-own-x: 🤓 Build your own (insert technology here) https://chryswoods.com/vector_c++/immintrin.html chryswoods.com | Part 2: AVX Intrinsics +qute://pdfjs/web/viewer.html?filename=tmpq63kdiwg_117382v1.full.pdf&file=&source=https://www.biorxiv.org/content/10.1101/117382v1.full.pdf The Drosophila Embryo at Single Cell Transcriptome Resolution - tmpq63kdiwg_117382v1.full.pdf diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 3d36eb2..816d848 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -1,3 +1,8 @@ +from operator import methodcaller +from qutebrowser.api import interceptor, message + +config.load_autoconfig(False) + nord = { # Polar Night 'nord0': '#2e3440', @@ -335,23 +340,68 @@ c.colors.tabs.selected.odd.fg = nord['nord5'] ## Type: QtColor # c.colors.webpage.bg = 'white' -# Fonts -c.completion.height = "33%" +# ------------------------------------------------------------------------ +# fonts + +font = "12pt consolas" + +c.fonts.statusbar = font +c.fonts.prompts = font +c.fonts.completion.category = font +c.fonts.completion.entry = font +c.fonts.tabs.selected = font +c.fonts.tabs.unselected = font + +# ------------------------------------------------------------------------ +# paths -c.fonts.tabs = "12pt consolas" -c.fonts.statusbar = "12pt consolas" -c.fonts.prompts = "12pt consolas" -c.fonts.completion.category = "12pt consolas" -c.fonts.completion.entry = "12pt consolas" +c.downloads.location.directory = "~/pulls" + +# ------------------------------------------------------------------------ +# features + +c.spellcheck.languages = ["en-US"] c.content.pdfjs = True +c.content.blocking.method = "both" + +c.completion.height = "33%" +c.completion.open_categories = ["quickmarks", "history"] + +# ------------------------------------------------------------------------ +# aliases + +c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save'} + +# ------------------------------------------------------------------------ +# keybinds + +config.bind(',c', 'spawn -d chromium {url}') +config.bind(',js', 'config-cycle content.javascript.enabled') + +# ------------------------------------------------------------------------ +# search engines + +c.url.searchengines['w'] = 'https://en.wikipedia.org/w/index.php?search={}&title=Special%3ASearch&fulltext=1&ns0=1' +c.url.searchengines['g'] = 'https://www.google.com/search?q={}' +c.url.searchengines['sx'] = 'https://searx.info/?q={}&categories=general&language=en-US' +c.url.searchengines['sc'] = 'https://scholar.google.com/scholar?hl=en-US&as_sdt=0%2C5&q={}&btnG=' +c.url.searchengines['os'] = 'https://wiki.archlinux.org/index.php?title=Special%3ASearch&search={}&go=Go' +c.url.searchengines['am'] = 'https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords={}' +c.url.searchengines['py'] = 'https://docs.python.org/3/library/{}.html' + +# ------------------------------------------------------------------------ +# security -# Security - look generic. c.content.headers.user_agent = "Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0" c.content.headers.accept_language = "en-US,en;q=0.5" c.content.headers.custom = {"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"} +c.content.cookies.store = False +c.content.canvas_reading = False +c.content.webgl = False c.content.javascript.enabled = False + js_whitelist = [ "*://localhost/*", "*://github.com/*", @@ -363,8 +413,31 @@ js_whitelist = [ "*://covid19-scenarios.org/*", "*://*.wolfram.alpha.com/*", "*://software.intel.com/*", + "*://*.kitp.ucsb.edu/*", ] for site in js_whitelist: with config.pattern(site) as p: p.content.javascript.enabled = True + +# ------------------------------------------------------------------------ +# redirections + +redirection = { + "reddit.com": methodcaller('setHost', 'old.reddit.com'), + "www.reddit.com": methodcaller('setHost', 'old.reddit.com'), + "twitter.com": methodcaller('setHost', 'mobile.twitter.com'), + "www.twitter.com": methodcaller('setHost', 'mobile.twitter.com'), +} + +def redirect(request): + if request.resource_type != interceptor.ResourceType.main_frame or request.request_url.scheme() in {"data", "blob"}: + return + + url = request.request_url + new = redirection.get(url.host()) + if new is not None and new(url) is not False: + message.info("redirecting to " + url.toString()) + request.redirect(url) + +interceptor.register(redirect) diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks index e97b73b..325c6c6 100644 --- a/.config/qutebrowser/quickmarks +++ b/.config/qutebrowser/quickmarks @@ -1,11 +1,9 @@ hn https://news.ycombinator.com/ git https://git.sr.ht/ -weather https://www.wunderground.com/weather/us/ca/goleta/93117 -blas http://www.netlib.org/blas/ intel https://software.intel.com/sites/landingpage/IntrinsicsGuide/#techs=MMX,SSE,SSE2,SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2&text=xorpd&expand=6141,6144 -review https://submit-dev.biologists.org/review/queue?queueName=accepted_reviews&roleName=&pageCreated=1589382259386 c http://www.quut.com/c/ANSI-C-grammar-y-2011.html -gemm https://github.com/flame/how-to-optimize-gemm/wiki/Optimization_1x4_3 -edo https://viewsourcecode.org/snaptoken/kilo/03.rawInputAndOutput.html quanta https://www.quantamagazine.org/ -ttf https://formats.kaitai.io/ttf/ttf.svg +npjl https://cheatsheets.quantecon.org/ +vae https://github.com/alecokas/flux-vae/blob/master/conv-vae/main.jl +vk https://github.com/vinjn/awesome-vulkan#libraries +mmo https://www.reddit.com/r/gamedev/comments/2s74pj/writing_a_game_server_protocol_parts_15_ongoing/ diff --git a/.config/tmux/config b/.config/tmux/config index bda146e..983b70c 100644 --- a/.config/tmux/config +++ b/.config/tmux/config @@ -49,6 +49,10 @@ bind-key f resize-pane -Z bind-key [ copy-mode bind-key ] paste-buffer +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-selection +bind-key -T copy-mode-vi r send-keys -X rectangle-toggle + # URL view bind-key u capture-pane \;\ save-buffer /tmp/tmux-buffer \;\ @@ -2227,7 +2227,7 @@ set breakpoint pending on python Dashboard.start() -dashboard source +# dashboard source # File variables --------------------------------------------------------------- @@ -7,12 +7,12 @@ cpu() { } mail() { - NEWMAIL=$(ls -s ~/mail/*/INBOX/new | awk '{if ($1 == "total") { sum += $2} }; END {print sum}') + NEWMAIL=$(expr $(ls -1 ~/mail/*/INBOX/new | wc -l) - '7') - if [ "${NEWMAIL%% *}" -eq 0 ]; then - printf " (%s)" "${NEWMAIL%% *}" + if [ "$NEWMAIL" -eq 0 ]; then + printf " (%s)" "$NEWMAIL" else - printf " (%s)" "${NEWMAIL%% *}" + printf " (%s)" "$NEWMAIL" fi } @@ -58,4 +58,5 @@ done & picom --config ~/.config/picom/config & feh --bg-scale ~/media/pics/honnold_wp.jpg +xbanish & exec dwm |