diff --git a/.aliases b/.aliases new file mode 100644 index 0000000..ed856cf --- /dev/null +++ b/.aliases @@ -0,0 +1,33 @@ +#!/bin/bash + +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls="ls --color=auto" + + alias grep="grep --color=auto" + alias fgrep="fgrep --color=auto" + alias egrep="egrep --color=auto" +fi + +alias ll="ls -alF" +alias la="ls -A" +alias l="ls -CF" + +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +change-terminal-font () { + [[ -z "${1}" || -z "${2}" ]] && echo "Usage: change-terminal-font FROM_SIZE TO_SIZE" + + local from="${1}" + local to="${2}" + local windows_user="$(powershell.exe '$env:UserName' | sed -e 's/\r//g')" + local terminal_config="/c/Users/${windows_user}/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json" + + perl -i -pe "s/\"fontSize\": ${from}/\"fontSize\": ${to}/g" "${terminal_config}" +} + +alias diff="diff --color -u" + +alias 755d="find . -type d -exec chmod 755 {} \;" + +alias 644f="find . -type f -exec chmod 644 {} \;" diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..0ca16e6 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,61 @@ +# Add a timestamp to each command. +set -o vi +export HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S: " + +# Duplicate lines and lines starting with a space are not put into the history. +export HISTCONTROL=ignoreboth + +# Append to the history file, don't overwrite it. +shopt -s histappend + +# Ensure $LINES and $COLUMNS always get updated. +shopt -s checkwinsize + +# Enable bash completion. +[ -f /etc/bash_completion ] && source /etc/bash_completion + +# Improve output of less for binary files. +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# Load aliases if they exist. +[ -f "${HOME}/.aliases" ] && source "${HOME}/.aliases" +[ -f "${HOME}/.aliases.local" ] && source "${HOME}/.aliases.local" + +# Determine git branch. +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' +} + +# Set a non-distracting prompt. +PS1='\[\]\u@\h\[\]:\[\]\w\[\] \[\]$(parse_git_branch)\[\]\$ ' + +# If it's an xterm compatible terminal, set the title to user@host: dir. +case "${TERM}" in +xterm*|rxvt*) + PS1="\[\e]0;\u@\h: \w\a\]${PS1}" + ;; +*) + ;; +esac +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# Uncomment the following line if you don't like systemctl's auto-paging feature: +# export SYSTEMD_PAGER= + +export PATH=$PATH:~/.gitaliases +export PATH=$PATH:~/.local/bin +export PATH=$PATH:~/.cargo/bin +export PATH=$PATH:~/bin +export DOC_TOKEN=$(cat ~/.doc_token) +export DOC_HOST=njuers8-dev.grnoc.iu.edu +eval "$(ssh-agent -s)" +ssh-add ~/.ssh/id_work diff --git a/.bashrc b/.bashrc index eb430c4..cdc6d91 100644 --- a/.bashrc +++ b/.bashrc @@ -1,3 +1,14 @@ +#!/usr/bin/env bash +# This file runs every time you open a new terminal window. -unset HISTFILE -export LESSHISTFILE="-" +# Limit number of lines and entries in the history. HISTFILESIZE controls the +# history file on disk and HISTSIZE controls lines stored in memory. +export HISTFILESIZE=50000 +export HISTSIZE=50000 + +export BUILDDIR=/home/$USER/git/glue/compile/builder/componentbuild/ +. "$HOME/.cargo/env" + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/.config/fish/conf.d/omf.fish b/.config/fish/conf.d/omf.fish deleted file mode 100644 index 3e0f6d6..0000000 --- a/.config/fish/conf.d/omf.fish +++ /dev/null @@ -1,7 +0,0 @@ -# Path to Oh My Fish install. -set -q XDG_DATA_HOME - and set -gx OMF_PATH "$XDG_DATA_HOME/omf" - or set -gx OMF_PATH "$HOME/.local/share/omf" - -# Load Oh My Fish configuration. -source $OMF_PATH/init.fish diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100755 index 3bfab3e..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,75 +0,0 @@ -# set normal (set_color normal) -# set magenta (set_color magenta) -# set yellow (set_color yellow) -# set green (set_color green) -# set red (set_color red) -# set gray (set_color -o black) -set -Ux VISUAL nvim -set -Ux EDITOR $VISUAL -# source (dirname (status -f))/init.fish - -# if tmux is executable and not inside a tmux session, then try to attach. -# if attachment fails, start a new session - -# set -x TERMINFO $TERMINFO $HOME/.local/share/terminfo/74/ -set -x TERM tmux-256color -if status is-interactive -and not set -q TMUX - exec tmux -end - -set -x PYTHONBREAKPOINT ipdb.set_trace - - # Fish git prompt -set -x __fish_git_prompt_showdirtystate 'yes' -set -x __fish_git_prompt_showstashstate 'yes' -set -x __fish_git_prompt_showuntrackedfiles 'yes' -set -x __fish_git_prompt_showupstream 'yes' -set -x __fish_git_prompt_color_branch yellow -set -x __fish_git_prompt_color_upstream_ahead green -set -x __fish_git_prompt_color_upstream_behind red - - -# Proper terminal behavior with unicode -set -x LC_ALL en_US.UTF-8 -set -x LANG en_US.UTF-8 -set -x fish_emoji_width 2 - -bind -M default v edit_cmd - -# for nvim - -# Use ipdb for debugging -# set -x PYTHONBREAKPOINT ipdb.set_trace - -set -x JAVA_HOME /usr/local/opt/openjdk/bin - -set -q CC; or set CC clang -set -q CXX; or set CXX $CC++ - -set -gx LDFLAGS "-L/usr/local/opt/bzip2/lib" -set -gx CPPFLAGS "-I/usr/local/opt/bzip2/include" -set -gx LDFLAGS $LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" -set -gx CPPFLAGS $CPPFLAGS "-I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1/" - -set -x ENABLE_USER_SITE "False" - -set -x PATH $JAVA_HOME $PATH -set -x PATH /opt/local/bin /opt/local/sbin $PATH -set -x MANPATH /opt/local/share/man (manpath) -set -x PATH /usr/local/opt/llvm/bin $PATH -set -x PATH $HOME/bin $PATH -set -x PATH $HOME/bin/edirect $PATH -set -x PATH $HOME/.cargo/bin $PATH -set -x PATH $HOME/.gitaliases $PATH -set -x PATH $HOME/edirect $PATH - -set -gx LDFLAGS "-L/usr/local/opt/bzip2/lib" -set -gx CPPFLAGS "-I/usr/local/opt/bzip2/include" -set -gx LDFLAGS $LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" -set -gx CPPFLAGS $CPPFLAGS "-I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1/ -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin" - - -fish_ssh_agent - -thefuck --alias | source diff --git a/.config/fish/functions/alacritty b/.config/fish/functions/alacritty deleted file mode 100644 index 558059e..0000000 --- a/.config/fish/functions/alacritty +++ /dev/null @@ -1,3 +0,0 @@ -function alacritty - command env WINIT_HIDPI_FACTOR=1.0 alacritty -end diff --git a/.config/fish/functions/brewClang.fish b/.config/fish/functions/brewClang.fish deleted file mode 100755 index 18d4880..0000000 --- a/.config/fish/functions/brewClang.fish +++ /dev/null @@ -1,6 +0,0 @@ -# used to favor Homebrew's Clang (and LLVM) over the stock Apple one. -function brewClang - set -x PATH /usr/local/opt/llvm/bin $PATH - set -x LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" - # set -x LDFLAGS "-L/Library/Frameworks/R.framework/Resources/lib" -end diff --git a/.config/fish/functions/cp.fish b/.config/fish/functions/cp.fish deleted file mode 100755 index 8d075f6..0000000 --- a/.config/fish/functions/cp.fish +++ /dev/null @@ -1,4 +0,0 @@ -function cp - command cp -rv $argv -end - diff --git a/.config/fish/functions/duall.fish b/.config/fish/functions/duall.fish deleted file mode 100644 index f55c6ae..0000000 --- a/.config/fish/functions/duall.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function duall --wraps='du .hs .[^.]* *' --wraps='bash -c du .hs .[^.]* *' --wraps='bash -c du -hs .[^.]* *' --wraps=bash\ -c\ \'du\ -hs\ .\[\^.\]\*\ \*\' --description alias\ duall=bash\ -c\ \'du\ -hs\ .\[\^.\]\*\ \*\' - bash -c 'du -hs .[^.]* *' $argv; -end diff --git a/.config/fish/functions/edit_cmd.fish b/.config/fish/functions/edit_cmd.fish deleted file mode 100755 index 7df2c3e..0000000 --- a/.config/fish/functions/edit_cmd.fish +++ /dev/null @@ -1,9 +0,0 @@ -function edit_cmd --description 'Edit cmdline in editor' - set -l f (mktemp) - set -l p (commandline -C) - commandline -b > $f - vim -c set\ ft=fish $f - commandline -r (more $f) - commandline -C $p - rm $f -end diff --git a/.config/fish/functions/eutil.fish b/.config/fish/functions/eutil.fish deleted file mode 100755 index 2e24a9a..0000000 --- a/.config/fish/functions/eutil.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Search and retrieve records from Entrez. -# Instruction at https://www.ncbi.nlm.nih.gov/books/NBK25500/ -function eutil - "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/$argv[1]" -end - diff --git a/.config/fish/functions/filterSections.fish b/.config/fish/functions/filterSections.fish deleted file mode 100755 index ae9fe97..0000000 --- a/.config/fish/functions/filterSections.fish +++ /dev/null @@ -1,6 +0,0 @@ -# filters sections from master class spreadsheet -# usage: filterSections roster.txt master.csv >out.csv -function filterSections - awk 'BEGIN {FPAT = "([^,]+)|(\"[^\"]+\")"} \ - FNR == NR { seen[$1]; next } FNR <= 2 || $3 in seen' "$argv[1]" "$argv[2]" -end diff --git a/.config/fish/functions/find.fish b/.config/fish/functions/find.fish deleted file mode 100755 index df6582d..0000000 --- a/.config/fish/functions/find.fish +++ /dev/null @@ -1,4 +0,0 @@ -# alias for find to exclude .git dir -function find - command find $argv -not -path '*/\.git' -end diff --git a/.config/fish/functions/fish_greeting.fish b/.config/fish/functions/fish_greeting.fish deleted file mode 100755 index 81a7468..0000000 --- a/.config/fish/functions/fish_greeting.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fish_greeting - echo "Hello!" -end diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish deleted file mode 100755 index 46fc094..0000000 --- a/.config/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,28 +0,0 @@ -function fish_prompt --description 'Write out the prompt' - set -l color_cwd - set -l suffix - - switch "$USER" - case root toor - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - set suffix '#' - case '*' - set color_cwd $fish_color_cwd - set suffix '🐈 ' - end - - # echo -n -s (__fish_git_prompt '%s') '|' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix" - - set last_status $status - - printf '%s@%s ' (whoami) (prompt_hostname) - printf '%s ' (__fish_git_prompt) - set_color $color_cwd - printf '%s' (prompt_pwd) - set_color normal - echo -n $suffix -end diff --git a/.config/fish/functions/fish_ssh_agent.fish b/.config/fish/functions/fish_ssh_agent.fish deleted file mode 100755 index 5960b75..0000000 --- a/.config/fish/functions/fish_ssh_agent.fish +++ /dev/null @@ -1,32 +0,0 @@ -function __ssh_agent_is_started -d "check if ssh agent is already started" - if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end - source $SSH_ENV > /dev/null - end - - if test -z "$SSH_AGENT_PID" - return 1 - end - - ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent - #pgrep ssh-agent - return $status -end - - -function __ssh_agent_start -d "start a new ssh agent" - ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV - chmod 600 $SSH_ENV - source $SSH_ENV > /dev/null - true # suppress errors from setenv, i.e. set -gx -end - - -function fish_ssh_agent --description "Start ssh-agent if not started yet, or uses already started ssh-agent." - if test -z "$SSH_ENV" - set -xg SSH_ENV $HOME/.ssh/environment - end - - if not __ssh_agent_is_started - __ssh_agent_start - end -end diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish deleted file mode 100755 index 3098071..0000000 --- a/.config/fish/functions/fish_user_key_bindings.fish +++ /dev/null @@ -1,4 +0,0 @@ -function fish_user_key_bindings - fish_vi_key_bindings - bind \cF -M insert accept-autosuggestion -end diff --git a/.config/fish/functions/fisher.fish b/.config/fish/functions/fisher.fish deleted file mode 100755 index 1d63c33..0000000 --- a/.config/fish/functions/fisher.fish +++ /dev/null @@ -1,435 +0,0 @@ -set -g fisher_version 3.2.10 - -function fisher -a cmd -d "fish package manager" - set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache - set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config - - set -g fish_config $XDG_CONFIG_HOME/fish - set -g fisher_cache $XDG_CACHE_HOME/fisher - set -g fisher_config $XDG_CONFIG_HOME/fisher - - set -q fisher_path; or set -g fisher_path $fish_config - set -g fishfile $fish_config/fishfile - - for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache - if test ! -d $path - command mkdir -p $path - end - end - - if test ! -e $fisher_path/completions/fisher.fish - echo "fisher complete" >$fisher_path/completions/fisher.fish - _fisher_complete - end - - if test -e $fisher_path/conf.d/fisher.fish - switch "$version" - case \*-\* - command rm -f $fisher_path/conf.d/fisher.fish - case 2\* - case \* - command rm -f $fisher_path/conf.d/fisher.fish - end - else - switch "$version" - case \*-\* - case 2\* - echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish - end - end - - # 2019-10-22: temp code, migrates fishfile from old path back to $fish_config - if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile" - command mv -f "$fisher_path/fishfile" "$fishfile" - end - - switch "$cmd" - case {,self-}complete - _fisher_complete - case copy-user-key-bindings - _fisher_copy_user_key_bindings - case ls - set -e argv[1] - if test -s "$fishfile" - set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||") - _fisher_ls | _fisher_fmt | command awk -v FILE="$file" " - BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/ - " | command sed "s|^$HOME|~|" - end - case self-update - _fisher_self_update (status -f) - case self-uninstall - _fisher_self_uninstall - case {,-}-v{ersion,} - echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|") - case {,-}-h{elp,} - _fisher_help - case "" - _fisher_commit -- - case add rm - if not isatty - while read -l arg - set argv $argv $arg - end - end - - if test (count $argv) = 1 - echo "fisher: invalid number of arguments" >&2 - _fisher_help >&2 - return 1 - end - - _fisher_commit $argv - case \* - echo "fisher: unknown flag or command \"$cmd\"" >&2 - _fisher_help >&2 - return 1 - end -end - -function _fisher_complete - complete -ec fisher - complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages" - complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages" - complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX" - complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help" - complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version" - complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version" - for pkg in (fisher ls) - complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg - end -end - -function _fisher_copy_user_key_bindings - if functions -q fish_user_key_bindings - functions -c fish_user_key_bindings fish_user_key_bindings_copy - end - function fish_user_key_bindings - for file in $fisher_path/conf.d/*_key_bindings.fish - source $file >/dev/null 2>/dev/null - end - if functions -q fish_user_key_bindings_copy - fish_user_key_bindings_copy - end - end -end - -function _fisher_ls - for pkg in $fisher_config/*/*/* - command readlink $pkg; or echo $pkg - end -end - -function _fisher_fmt - command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||" -end - -function _fisher_help - echo "usage: fisher add Add packages" - echo " fisher rm Remove packages" - echo " fisher Update all packages" - echo " fisher ls [] List installed packages matching " - echo " fisher --help Show this help" - echo " fisher --version Show the current version" - echo " fisher self-update Update to the latest version" - echo " fisher self-uninstall Uninstall from your system" - echo "examples:" - echo " fisher add jethrokuan/z rafaelrinaldi/pure" - echo " fisher add gitlab.com/foo/bar@v2" - echo " fisher add ~/path/to/local/pkg" - echo " fisher add &2 - command curl -s "$url?nocache" >$file. - - set -l next_version (command awk '{ print $4 } { exit }' <$file.) - switch "$next_version" - case "" $fisher_version - command rm -f $file. - if test -z "$next_version" - echo "fisher: cannot update fisher -- are you offline?" >&2 - return 1 - end - echo "fisher is already up-to-date" >&2 - case \* - echo "linking $file" | command sed "s|$HOME|~|" >&2 - command mv -f $file. $file - source $file - echo "updated to fisher $fisher_version -- hooray!" >&2 - _fisher_complete - end -end - -function _fisher_self_uninstall - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - - for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile - echo "removing $file" - command rm -Rf $file 2>/dev/null - end | command sed "s|$HOME|~|" >&2 - - for name in (set -n | command awk '/^fisher_/') - set -e "$name" - end - - functions -e (functions -a | command awk '/^_fisher/') fisher - complete -c fisher --erase -end - -function _fisher_commit -a cmd - set -e argv[1] - set -l elapsed (_fisher_now) - - if test ! -e "$fishfile" - command touch $fishfile - echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 - end - - set -l old_pkgs (_fisher_ls | _fisher_fmt) - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - command rm -Rf $fisher_config - command mkdir -p $fisher_config - - set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt)) - set -l actual_pkgs (_fisher_fetch $next_pkgs) - set -l updated_pkgs - for pkg in $old_pkgs - if contains -- $pkg $actual_pkgs - set updated_pkgs $updated_pkgs $pkg - end - end - - if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs" - echo "fisher: nothing to commit -- try adding some packages" >&2 - return 1 - end - - set -l out_pkgs - if test "$cmd" = "rm" - set out_pkgs $next_pkgs - else - for pkg in $next_pkgs - if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs - set out_pkgs $out_pkgs $pkg - end - end - end - - printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile - - _fisher_complete - - command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) ' - BEGIN { - res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U))) - printf((res ? res : "done") " in %.2fs\n", E / 1000) - } - function fmt(action, n, s) { - return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s - } - ' >&2 -end - -function _fisher_parse -a mode cmd - set -e argv[1..2] - command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" ' - BEGIN { - for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i] - } - !NF { next } { k = getkey($1) } - MODE == "-R" && !(k in pkgs) && $0 = $1 - MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") } - MODE == "-W" || CMD == "rm" { delete pkgs[k] } - END { - for (k in pkgs) { - if (CMD != "rm" || MODE == "-W") print pkgs[k] - else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr" - } - } - function getkey(s, a) { - return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1] - } - ' -end - -function _fisher_fetch - set -l pkg_jobs - set -l out_pkgs - set -l next_pkgs - set -l local_pkgs - set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token - - for pkg in $argv - switch $pkg - case \~\* /\* - set -l path (echo "$pkg" | command sed "s|^~|$HOME|") - if test -e "$path" - set local_pkgs $local_pkgs $path - else - echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2 - end - continue - end - - command awk -v PKG="$pkg" -v FS=/ ' - BEGIN { - if (split(PKG, tmp, /@+|:/) > 2) { - if (tmp[4]) sub("@"tmp[4], "", PKG) - print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master") - } else { - pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1] - tag = tmp[2] ? tmp[2] : "master" - print (\ - pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \ - pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \ - pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \ - ) "\t" pkg - } - } - ' | read -l url pkg branch - - if test ! -d "$fisher_config/$pkg" - fish -c " - echo fetching $url >&2 - command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg) - if test ! -z \"$branch\" - command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null - or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2 - else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null - command rm -Rf $fisher_cache/$pkg - command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg - command rm -Rf $fisher_config/$pkg - command cp -Rf {$fisher_cache,$fisher_config}/$pkg - else if test -d \"$fisher_cache/$pkg\" - echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2 - command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/.. - else - command rm -Rf $fisher_config/$pkg - echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2 - end - " >/dev/null & - set pkg_jobs $pkg_jobs (_fisher_jobs --last) - set next_pkgs $next_pkgs "$fisher_config/$pkg" - end - end - - if set -q pkg_jobs[1] - while for job in $pkg_jobs - contains -- $job (_fisher_jobs); and break - end - end - for pkg in $next_pkgs - if test -d "$pkg" - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg - end - end - end - - set -l local_prefix $fisher_config/local/$USER - if test ! -d "$local_prefix" - command mkdir -p $local_prefix - end - for pkg in $local_pkgs - set -l target $local_prefix/(command basename $pkg) - if test ! -L "$target" - command ln -sf $pkg $target - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg --link - end - end - - if set -q out_pkgs[1] - _fisher_fetch ( - for pkg in $out_pkgs - if test -s "$pkg/fishfile" - _fisher_fmt <$pkg/fishfile | _fisher_parse -R - end - end) - printf "%s\n" $out_pkgs | _fisher_fmt - end -end - -function _fisher_add -a pkg opts - for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish - set -l target (command basename $src) - switch $src - case $pkg/conf.d\* - set target $fisher_path/conf.d/$target - case $pkg/completions\* - set target $fisher_path/completions/$target - case $pkg/{functions,}\* - switch $target - case uninstall.fish - continue - case {init,key_bindings}.fish - set target $fisher_path/conf.d/(command basename $pkg)\_$target - case \* - set target $fisher_path/functions/$target - end - end - echo "linking $target" | command sed "s|$HOME|~|" >&2 - if set -q opts[1] - command ln -sf $src $target - else - command cp -f $src $target - end - switch $target - case \*.fish - source $target >/dev/null 2>/dev/null - end - end -end - -function _fisher_rm -a pkg - for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish - set -l target (command basename $src) - set -l filename (command basename $target .fish) - switch $src - case $pkg/conf.d\* - test "$filename.fish" = "$target"; and emit "$filename"_uninstall - set target conf.d/$target - case $pkg/completions\* - test "$filename.fish" = "$target"; and complete -ec $filename - set target completions/$target - case $pkg/{,functions}\* - test "$filename.fish" = "$target"; and functions -e $filename - switch $target - case uninstall.fish - source $src - continue - case {init,key_bindings}.fish - set target conf.d/(command basename $pkg)\_$target - case \* - set target functions/$target - end - end - command rm -f $fisher_path/$target - end - if not functions -q fish_prompt - source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish" - end -end - -function _fisher_jobs - jobs $argv | command awk '/^[0-9]+\t/ { print $1 }' -end - -function _fisher_now -a elapsed - switch (command uname) - case Darwin \*BSD - command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed - case \* - math (command date "+%s%3N") - "0$elapsed" - end -end diff --git a/.config/fish/functions/git-root.fish b/.config/fish/functions/git-root.fish deleted file mode 100755 index bd2729b..0000000 --- a/.config/fish/functions/git-root.fish +++ /dev/null @@ -1,3 +0,0 @@ -function git-root - cd (git rev-parse --show-toplevel) -end diff --git a/.config/fish/functions/git_pull.fish b/.config/fish/functions/git_pull.fish deleted file mode 100755 index b4b14ae..0000000 --- a/.config/fish/functions/git_pull.fish +++ /dev/null @@ -1,10 +0,0 @@ -# combines git pull with git reset --soft in the event of garbage commits -# usage: git pull -function git_pull - git pull - if grep -q 'garbage_commit' (git log -1 --pretty=format:%B | psub) - echo "Garbage commit detected. Doing soft reset" - git show - git reset --soft HEAD^ - end -end diff --git a/.config/fish/functions/ipython.fish b/.config/fish/functions/ipython.fish deleted file mode 100644 index 8b79647..0000000 --- a/.config/fish/functions/ipython.fish +++ /dev/null @@ -1,3 +0,0 @@ -function ipython --description 'alias ipython ipython --matplotlib' - command ipython --matplotlib $argv; -end diff --git a/.config/fish/functions/la.fish b/.config/fish/functions/la.fish deleted file mode 100755 index 1a315d3..0000000 --- a/.config/fish/functions/la.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function la --description 'alias la=ls -lAh' - ls -lAh $argv; -end diff --git a/.config/fish/functions/make-venv.fish b/.config/fish/functions/make-venv.fish deleted file mode 100644 index c9bb673..0000000 --- a/.config/fish/functions/make-venv.fish +++ /dev/null @@ -1,8 +0,0 @@ -function make-venv --wraps='python3 -m venv ' --description 'alias make-venv python3 -m venv ' - set test_or $argv[1] .venv - set path (realpath $test_or[1]) - echo creating virtual environment at $path - set command 's;set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV";&\n set -x PYTHONPATH '(dirname $path)';' - python3 -m venv $path; - gsed -i $command $path/bin/activate.fish -end diff --git a/.config/fish/functions/mount_carbonate.fish b/.config/fish/functions/mount_carbonate.fish deleted file mode 100755 index b804e99..0000000 --- a/.config/fish/functions/mount_carbonate.fish +++ /dev/null @@ -1,5 +0,0 @@ -function mount_carbonate - sshfs \ - -o IdentityFile=~/.ssh/id_rsa_laptop,auto_cache,reconnect,defer_permissions,Compression=no \ - mpjuers@carbonate:/ /Volumes/Carbonate/ -end diff --git a/.config/fish/functions/new-jupyter-kernel.fish b/.config/fish/functions/new-jupyter-kernel.fish deleted file mode 100755 index a446af8..0000000 --- a/.config/fish/functions/new-jupyter-kernel.fish +++ /dev/null @@ -1,5 +0,0 @@ -function new-jupyter-kernel - pip install ipykernel - ipython kernel install --user --name=$argv[1] -end - diff --git a/.config/fish/functions/pipreqs.fish b/.config/fish/functions/pipreqs.fish deleted file mode 100644 index 2ca8b2c..0000000 --- a/.config/fish/functions/pipreqs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pipreqs --description 'alias pipreqs pipreqs --ignore ".venv" $argv' - command pipreqs --ignore ".venv" $argv; -end diff --git a/.config/fish/functions/pnglatex.fish b/.config/fish/functions/pnglatex.fish deleted file mode 100644 index 048aa3e..0000000 --- a/.config/fish/functions/pnglatex.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function pnglatex --wraps=pnglatex\ -p\ \'amsmath:amsthm\' --description alias\ pnglatex=pnglatex\ -p\ \'amsmath:amsthm\' - command pnglatex -p 'amsmath:amsthm' $argv; -end diff --git a/.config/fish/functions/pytest.fish b/.config/fish/functions/pytest.fish deleted file mode 100755 index 6cdd958..0000000 --- a/.config/fish/functions/pytest.fish +++ /dev/null @@ -1,4 +0,0 @@ -# alias to call pytest with present directory in sys.path -function pytest - python -m pytest -end diff --git a/.config/fish/functions/python.fish b/.config/fish/functions/python.fish deleted file mode 100644 index 2d14112..0000000 --- a/.config/fish/functions/python.fish +++ /dev/null @@ -1,3 +0,0 @@ -function python --wraps=python3 --description 'alias python python3' - python3 $argv; -end diff --git a/.config/fish/functions/rsync_smart.fish b/.config/fish/functions/rsync_smart.fish deleted file mode 100755 index aa5cbe2..0000000 --- a/.config/fish/functions/rsync_smart.fish +++ /dev/null @@ -1,5 +0,0 @@ -# rsync only syncs changed files -# usage: rsync_smart in/ out -function rsync_smart - rsync -avu argv[1] argv[2] -end diff --git a/.config/fish/functions/spoof.fish b/.config/fish/functions/spoof.fish deleted file mode 100644 index 95b6c6b..0000000 --- a/.config/fish/functions/spoof.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Defined in - @ line 1 -function spoof --wraps='sudo ifconfig en0 ether 5e:e1:96:43:4c:66' --description alias\ spoof=sudo\ ifconfig\ en0\ ether\ 5e:e1:96:43:4c:66\n - set mac 5e:e1:96:43:4c:66 - sudo spoof-mac set $mac en0 - echo "MAC address set to" $mac -end diff --git a/.config/fish/functions/tl.fish b/.config/fish/functions/tl.fish deleted file mode 100755 index d9a08c8..0000000 --- a/.config/fish/functions/tl.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function tl --description 'alias tl=task list' - task list $argv; -end diff --git a/.config/fish/functions/unspoof.fish b/.config/fish/functions/unspoof.fish deleted file mode 100644 index 531f5c9..0000000 --- a/.config/fish/functions/unspoof.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Defined in - @ line 1 -function unspoof --wraps='sudo ifconfig en0 ether 3c:22:fb:73:2c:93' --wraps='ifconfig en0 | grep ether 3c:22:fb:73:2c:93' --description 'alias unspoof=sudo ifconfig en0 ether 3c:22:fb:73:2c:93' - set mac 3c:22:fb:73:2c:93 - sudo spoof-mac set $mac en0 - echo "MAC address set to" $mac -end diff --git a/.config/fish/functions/vi.fish b/.config/fish/functions/vi.fish deleted file mode 100755 index 8714e1e..0000000 --- a/.config/fish/functions/vi.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function vi --description 'alias vi nvim' - nvim $argv; -end diff --git a/.config/fish/functions/vimdiff.fish b/.config/fish/functions/vimdiff.fish deleted file mode 100755 index 94c84b9..0000000 --- a/.config/fish/functions/vimdiff.fish +++ /dev/null @@ -1,3 +0,0 @@ -function vimdiff - command nvim -d $argv -end diff --git a/.config/fish_backup/conf.d/omf.fish b/.config/fish_backup/conf.d/omf.fish deleted file mode 100644 index 3e0f6d6..0000000 --- a/.config/fish_backup/conf.d/omf.fish +++ /dev/null @@ -1,7 +0,0 @@ -# Path to Oh My Fish install. -set -q XDG_DATA_HOME - and set -gx OMF_PATH "$XDG_DATA_HOME/omf" - or set -gx OMF_PATH "$HOME/.local/share/omf" - -# Load Oh My Fish configuration. -source $OMF_PATH/init.fish diff --git a/.config/fish_backup/config.fish b/.config/fish_backup/config.fish deleted file mode 100755 index ef427f7..0000000 --- a/.config/fish_backup/config.fish +++ /dev/null @@ -1,76 +0,0 @@ -# set normal (set_color normal) -# set magenta (set_color magenta) -# set yellow (set_color yellow) -# set green (set_color green) -# set red (set_color red) -# set gray (set_color -o black) -set -Ux VISUAL nvim -set -Ux EDITOR $VISUAL - -# set -Ux TERMINFO_DIRS /usr/share/terminfo $HOME/.local/share/terminfo/74 -set -Ux TERM tmux-256color -# source (dirname (status -f))/init.fish - -# if tmux is executable and not inside a tmux session, then try to attach. -# if attachment fails, start a new session - -if status is-interactive -and not set -q TMUX - exec tmux -end - -set -x PYTHONBREAKPOINT ipdb.set_trace - - # Fish git prompt -set -x __fish_git_prompt_showdirtystate 'yes' -set -x __fish_git_prompt_showstashstate 'yes' -set -x __fish_git_prompt_showuntrackedfiles 'yes' -set -x __fish_git_prompt_showupstream 'yes' -set -x __fish_git_prompt_color_branch yellow -set -x __fish_git_prompt_color_upstream_ahead green -set -x __fish_git_prompt_color_upstream_behind red - - -# Proper terminal behavior with unicode -set -x LC_ALL en_US.UTF-8 -set -x LANG en_US.UTF-8 -set -x fish_emoji_width 2 - -bind -M default v edit_cmd - -# for nvim - -# Use ipdb for debugging -# set -x PYTHONBREAKPOINT ipdb.set_trace - -set -x JAVA_HOME /usr/local/opt/openjdk/bin - -set -q CC; or set CC clang -set -q CXX; or set CXX $CC++ - -set -gx LDFLAGS "-L/usr/local/opt/bzip2/lib" -set -gx CPPFLAGS "-I/usr/local/opt/bzip2/include" -set -gx LDFLAGS $LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" -set -gx CPPFLAGS $CPPFLAGS "-I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1/" - -set -x ENABLE_USER_SITE "False" - -set -x PATH $JAVA_HOME $PATH -set -x PATH /opt/local/bin /opt/local/sbin $PATH -set -x MANPATH /opt/local/share/man (manpath) -set -x PATH /usr/local/opt/llvm/bin $PATH -set -x PATH $HOME/bin $PATH -set -x PATH $HOME/bin/edirect $PATH -set -x PATH $HOME/.cargo/bin $PATH -set -x PATH $HOME/.gitaliases $PATH -set -x PATH $HOME/edirect $PATH - -set -gx LDFLAGS "-L/usr/local/opt/bzip2/lib" -set -gx CPPFLAGS "-I/usr/local/opt/bzip2/include" -set -gx LDFLAGS $LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" -set -gx CPPFLAGS $CPPFLAGS "-I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1/ -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin" - - -fish_ssh_agent - -thefuck --alias | source diff --git a/.config/fish_backup/fish_variables b/.config/fish_backup/fish_variables deleted file mode 100644 index a8179fc..0000000 --- a/.config/fish_backup/fish_variables +++ /dev/null @@ -1,36 +0,0 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 -SETUVAR --export EDITOR:nvim -SETUVAR --export TERM:tmux\x2d256color -SETUVAR --export TERMINFO_DIRS:/usr/share/terminfo\x1e/Users/nekoj/\x2elocal/share/terminfo/74 -SETUVAR --export VISUAL:nvim -SETUVAR __fish_initialized:3400 -SETUVAR fish_color_autosuggestion:555\x1ebrblack -SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:blue -SETUVAR fish_color_comment:red -SETUVAR fish_color_cwd:green -SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:green -SETUVAR fish_color_error:brred -SETUVAR fish_color_escape:brcyan -SETUVAR fish_color_history_current:\x2d\x2dbold -SETUVAR fish_color_host:normal -SETUVAR fish_color_host_remote:yellow -SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:brcyan -SETUVAR fish_color_param:cyan -SETUVAR fish_color_quote:yellow -SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold -SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 -SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_status:red -SETUVAR fish_color_user:brgreen -SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_key_bindings:fish_vi_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di -SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_pager_color_selected_background:\x2dr -SETUVAR fish_user_paths:/usr/local/opt/openjdk/bin diff --git a/.config/fish_backup/functions/alacritty b/.config/fish_backup/functions/alacritty deleted file mode 100644 index 558059e..0000000 --- a/.config/fish_backup/functions/alacritty +++ /dev/null @@ -1,3 +0,0 @@ -function alacritty - command env WINIT_HIDPI_FACTOR=1.0 alacritty -end diff --git a/.config/fish_backup/functions/brewClang.fish b/.config/fish_backup/functions/brewClang.fish deleted file mode 100755 index 18d4880..0000000 --- a/.config/fish_backup/functions/brewClang.fish +++ /dev/null @@ -1,6 +0,0 @@ -# used to favor Homebrew's Clang (and LLVM) over the stock Apple one. -function brewClang - set -x PATH /usr/local/opt/llvm/bin $PATH - set -x LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" - # set -x LDFLAGS "-L/Library/Frameworks/R.framework/Resources/lib" -end diff --git a/.config/fish_backup/functions/cp.fish b/.config/fish_backup/functions/cp.fish deleted file mode 100755 index 8d075f6..0000000 --- a/.config/fish_backup/functions/cp.fish +++ /dev/null @@ -1,4 +0,0 @@ -function cp - command cp -rv $argv -end - diff --git a/.config/fish_backup/functions/duall.fish b/.config/fish_backup/functions/duall.fish deleted file mode 100644 index f55c6ae..0000000 --- a/.config/fish_backup/functions/duall.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function duall --wraps='du .hs .[^.]* *' --wraps='bash -c du .hs .[^.]* *' --wraps='bash -c du -hs .[^.]* *' --wraps=bash\ -c\ \'du\ -hs\ .\[\^.\]\*\ \*\' --description alias\ duall=bash\ -c\ \'du\ -hs\ .\[\^.\]\*\ \*\' - bash -c 'du -hs .[^.]* *' $argv; -end diff --git a/.config/fish_backup/functions/edit_cmd.fish b/.config/fish_backup/functions/edit_cmd.fish deleted file mode 100755 index 7df2c3e..0000000 --- a/.config/fish_backup/functions/edit_cmd.fish +++ /dev/null @@ -1,9 +0,0 @@ -function edit_cmd --description 'Edit cmdline in editor' - set -l f (mktemp) - set -l p (commandline -C) - commandline -b > $f - vim -c set\ ft=fish $f - commandline -r (more $f) - commandline -C $p - rm $f -end diff --git a/.config/fish_backup/functions/eutil.fish b/.config/fish_backup/functions/eutil.fish deleted file mode 100755 index 2e24a9a..0000000 --- a/.config/fish_backup/functions/eutil.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Search and retrieve records from Entrez. -# Instruction at https://www.ncbi.nlm.nih.gov/books/NBK25500/ -function eutil - "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/$argv[1]" -end - diff --git a/.config/fish_backup/functions/filterSections.fish b/.config/fish_backup/functions/filterSections.fish deleted file mode 100755 index ae9fe97..0000000 --- a/.config/fish_backup/functions/filterSections.fish +++ /dev/null @@ -1,6 +0,0 @@ -# filters sections from master class spreadsheet -# usage: filterSections roster.txt master.csv >out.csv -function filterSections - awk 'BEGIN {FPAT = "([^,]+)|(\"[^\"]+\")"} \ - FNR == NR { seen[$1]; next } FNR <= 2 || $3 in seen' "$argv[1]" "$argv[2]" -end diff --git a/.config/fish_backup/functions/find.fish b/.config/fish_backup/functions/find.fish deleted file mode 100755 index df6582d..0000000 --- a/.config/fish_backup/functions/find.fish +++ /dev/null @@ -1,4 +0,0 @@ -# alias for find to exclude .git dir -function find - command find $argv -not -path '*/\.git' -end diff --git a/.config/fish_backup/functions/fish_greeting.fish b/.config/fish_backup/functions/fish_greeting.fish deleted file mode 100755 index 81a7468..0000000 --- a/.config/fish_backup/functions/fish_greeting.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fish_greeting - echo "Hello!" -end diff --git a/.config/fish_backup/functions/fish_prompt.fish b/.config/fish_backup/functions/fish_prompt.fish deleted file mode 100755 index 46fc094..0000000 --- a/.config/fish_backup/functions/fish_prompt.fish +++ /dev/null @@ -1,28 +0,0 @@ -function fish_prompt --description 'Write out the prompt' - set -l color_cwd - set -l suffix - - switch "$USER" - case root toor - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - set suffix '#' - case '*' - set color_cwd $fish_color_cwd - set suffix '🐈 ' - end - - # echo -n -s (__fish_git_prompt '%s') '|' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix" - - set last_status $status - - printf '%s@%s ' (whoami) (prompt_hostname) - printf '%s ' (__fish_git_prompt) - set_color $color_cwd - printf '%s' (prompt_pwd) - set_color normal - echo -n $suffix -end diff --git a/.config/fish_backup/functions/fish_ssh_agent.fish b/.config/fish_backup/functions/fish_ssh_agent.fish deleted file mode 100755 index 5960b75..0000000 --- a/.config/fish_backup/functions/fish_ssh_agent.fish +++ /dev/null @@ -1,32 +0,0 @@ -function __ssh_agent_is_started -d "check if ssh agent is already started" - if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end - source $SSH_ENV > /dev/null - end - - if test -z "$SSH_AGENT_PID" - return 1 - end - - ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent - #pgrep ssh-agent - return $status -end - - -function __ssh_agent_start -d "start a new ssh agent" - ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV - chmod 600 $SSH_ENV - source $SSH_ENV > /dev/null - true # suppress errors from setenv, i.e. set -gx -end - - -function fish_ssh_agent --description "Start ssh-agent if not started yet, or uses already started ssh-agent." - if test -z "$SSH_ENV" - set -xg SSH_ENV $HOME/.ssh/environment - end - - if not __ssh_agent_is_started - __ssh_agent_start - end -end diff --git a/.config/fish_backup/functions/fish_user_key_bindings.fish b/.config/fish_backup/functions/fish_user_key_bindings.fish deleted file mode 100755 index 3098071..0000000 --- a/.config/fish_backup/functions/fish_user_key_bindings.fish +++ /dev/null @@ -1,4 +0,0 @@ -function fish_user_key_bindings - fish_vi_key_bindings - bind \cF -M insert accept-autosuggestion -end diff --git a/.config/fish_backup/functions/fisher.fish b/.config/fish_backup/functions/fisher.fish deleted file mode 100755 index 1d63c33..0000000 --- a/.config/fish_backup/functions/fisher.fish +++ /dev/null @@ -1,435 +0,0 @@ -set -g fisher_version 3.2.10 - -function fisher -a cmd -d "fish package manager" - set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache - set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config - - set -g fish_config $XDG_CONFIG_HOME/fish - set -g fisher_cache $XDG_CACHE_HOME/fisher - set -g fisher_config $XDG_CONFIG_HOME/fisher - - set -q fisher_path; or set -g fisher_path $fish_config - set -g fishfile $fish_config/fishfile - - for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache - if test ! -d $path - command mkdir -p $path - end - end - - if test ! -e $fisher_path/completions/fisher.fish - echo "fisher complete" >$fisher_path/completions/fisher.fish - _fisher_complete - end - - if test -e $fisher_path/conf.d/fisher.fish - switch "$version" - case \*-\* - command rm -f $fisher_path/conf.d/fisher.fish - case 2\* - case \* - command rm -f $fisher_path/conf.d/fisher.fish - end - else - switch "$version" - case \*-\* - case 2\* - echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish - end - end - - # 2019-10-22: temp code, migrates fishfile from old path back to $fish_config - if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile" - command mv -f "$fisher_path/fishfile" "$fishfile" - end - - switch "$cmd" - case {,self-}complete - _fisher_complete - case copy-user-key-bindings - _fisher_copy_user_key_bindings - case ls - set -e argv[1] - if test -s "$fishfile" - set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||") - _fisher_ls | _fisher_fmt | command awk -v FILE="$file" " - BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/ - " | command sed "s|^$HOME|~|" - end - case self-update - _fisher_self_update (status -f) - case self-uninstall - _fisher_self_uninstall - case {,-}-v{ersion,} - echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|") - case {,-}-h{elp,} - _fisher_help - case "" - _fisher_commit -- - case add rm - if not isatty - while read -l arg - set argv $argv $arg - end - end - - if test (count $argv) = 1 - echo "fisher: invalid number of arguments" >&2 - _fisher_help >&2 - return 1 - end - - _fisher_commit $argv - case \* - echo "fisher: unknown flag or command \"$cmd\"" >&2 - _fisher_help >&2 - return 1 - end -end - -function _fisher_complete - complete -ec fisher - complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages" - complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages" - complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX" - complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help" - complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version" - complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version" - for pkg in (fisher ls) - complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg - end -end - -function _fisher_copy_user_key_bindings - if functions -q fish_user_key_bindings - functions -c fish_user_key_bindings fish_user_key_bindings_copy - end - function fish_user_key_bindings - for file in $fisher_path/conf.d/*_key_bindings.fish - source $file >/dev/null 2>/dev/null - end - if functions -q fish_user_key_bindings_copy - fish_user_key_bindings_copy - end - end -end - -function _fisher_ls - for pkg in $fisher_config/*/*/* - command readlink $pkg; or echo $pkg - end -end - -function _fisher_fmt - command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||" -end - -function _fisher_help - echo "usage: fisher add Add packages" - echo " fisher rm Remove packages" - echo " fisher Update all packages" - echo " fisher ls [] List installed packages matching " - echo " fisher --help Show this help" - echo " fisher --version Show the current version" - echo " fisher self-update Update to the latest version" - echo " fisher self-uninstall Uninstall from your system" - echo "examples:" - echo " fisher add jethrokuan/z rafaelrinaldi/pure" - echo " fisher add gitlab.com/foo/bar@v2" - echo " fisher add ~/path/to/local/pkg" - echo " fisher add &2 - command curl -s "$url?nocache" >$file. - - set -l next_version (command awk '{ print $4 } { exit }' <$file.) - switch "$next_version" - case "" $fisher_version - command rm -f $file. - if test -z "$next_version" - echo "fisher: cannot update fisher -- are you offline?" >&2 - return 1 - end - echo "fisher is already up-to-date" >&2 - case \* - echo "linking $file" | command sed "s|$HOME|~|" >&2 - command mv -f $file. $file - source $file - echo "updated to fisher $fisher_version -- hooray!" >&2 - _fisher_complete - end -end - -function _fisher_self_uninstall - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - - for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile - echo "removing $file" - command rm -Rf $file 2>/dev/null - end | command sed "s|$HOME|~|" >&2 - - for name in (set -n | command awk '/^fisher_/') - set -e "$name" - end - - functions -e (functions -a | command awk '/^_fisher/') fisher - complete -c fisher --erase -end - -function _fisher_commit -a cmd - set -e argv[1] - set -l elapsed (_fisher_now) - - if test ! -e "$fishfile" - command touch $fishfile - echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 - end - - set -l old_pkgs (_fisher_ls | _fisher_fmt) - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - command rm -Rf $fisher_config - command mkdir -p $fisher_config - - set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt)) - set -l actual_pkgs (_fisher_fetch $next_pkgs) - set -l updated_pkgs - for pkg in $old_pkgs - if contains -- $pkg $actual_pkgs - set updated_pkgs $updated_pkgs $pkg - end - end - - if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs" - echo "fisher: nothing to commit -- try adding some packages" >&2 - return 1 - end - - set -l out_pkgs - if test "$cmd" = "rm" - set out_pkgs $next_pkgs - else - for pkg in $next_pkgs - if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs - set out_pkgs $out_pkgs $pkg - end - end - end - - printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile - - _fisher_complete - - command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) ' - BEGIN { - res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U))) - printf((res ? res : "done") " in %.2fs\n", E / 1000) - } - function fmt(action, n, s) { - return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s - } - ' >&2 -end - -function _fisher_parse -a mode cmd - set -e argv[1..2] - command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" ' - BEGIN { - for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i] - } - !NF { next } { k = getkey($1) } - MODE == "-R" && !(k in pkgs) && $0 = $1 - MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") } - MODE == "-W" || CMD == "rm" { delete pkgs[k] } - END { - for (k in pkgs) { - if (CMD != "rm" || MODE == "-W") print pkgs[k] - else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr" - } - } - function getkey(s, a) { - return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1] - } - ' -end - -function _fisher_fetch - set -l pkg_jobs - set -l out_pkgs - set -l next_pkgs - set -l local_pkgs - set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token - - for pkg in $argv - switch $pkg - case \~\* /\* - set -l path (echo "$pkg" | command sed "s|^~|$HOME|") - if test -e "$path" - set local_pkgs $local_pkgs $path - else - echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2 - end - continue - end - - command awk -v PKG="$pkg" -v FS=/ ' - BEGIN { - if (split(PKG, tmp, /@+|:/) > 2) { - if (tmp[4]) sub("@"tmp[4], "", PKG) - print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master") - } else { - pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1] - tag = tmp[2] ? tmp[2] : "master" - print (\ - pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \ - pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \ - pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \ - ) "\t" pkg - } - } - ' | read -l url pkg branch - - if test ! -d "$fisher_config/$pkg" - fish -c " - echo fetching $url >&2 - command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg) - if test ! -z \"$branch\" - command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null - or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2 - else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null - command rm -Rf $fisher_cache/$pkg - command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg - command rm -Rf $fisher_config/$pkg - command cp -Rf {$fisher_cache,$fisher_config}/$pkg - else if test -d \"$fisher_cache/$pkg\" - echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2 - command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/.. - else - command rm -Rf $fisher_config/$pkg - echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2 - end - " >/dev/null & - set pkg_jobs $pkg_jobs (_fisher_jobs --last) - set next_pkgs $next_pkgs "$fisher_config/$pkg" - end - end - - if set -q pkg_jobs[1] - while for job in $pkg_jobs - contains -- $job (_fisher_jobs); and break - end - end - for pkg in $next_pkgs - if test -d "$pkg" - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg - end - end - end - - set -l local_prefix $fisher_config/local/$USER - if test ! -d "$local_prefix" - command mkdir -p $local_prefix - end - for pkg in $local_pkgs - set -l target $local_prefix/(command basename $pkg) - if test ! -L "$target" - command ln -sf $pkg $target - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg --link - end - end - - if set -q out_pkgs[1] - _fisher_fetch ( - for pkg in $out_pkgs - if test -s "$pkg/fishfile" - _fisher_fmt <$pkg/fishfile | _fisher_parse -R - end - end) - printf "%s\n" $out_pkgs | _fisher_fmt - end -end - -function _fisher_add -a pkg opts - for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish - set -l target (command basename $src) - switch $src - case $pkg/conf.d\* - set target $fisher_path/conf.d/$target - case $pkg/completions\* - set target $fisher_path/completions/$target - case $pkg/{functions,}\* - switch $target - case uninstall.fish - continue - case {init,key_bindings}.fish - set target $fisher_path/conf.d/(command basename $pkg)\_$target - case \* - set target $fisher_path/functions/$target - end - end - echo "linking $target" | command sed "s|$HOME|~|" >&2 - if set -q opts[1] - command ln -sf $src $target - else - command cp -f $src $target - end - switch $target - case \*.fish - source $target >/dev/null 2>/dev/null - end - end -end - -function _fisher_rm -a pkg - for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish - set -l target (command basename $src) - set -l filename (command basename $target .fish) - switch $src - case $pkg/conf.d\* - test "$filename.fish" = "$target"; and emit "$filename"_uninstall - set target conf.d/$target - case $pkg/completions\* - test "$filename.fish" = "$target"; and complete -ec $filename - set target completions/$target - case $pkg/{,functions}\* - test "$filename.fish" = "$target"; and functions -e $filename - switch $target - case uninstall.fish - source $src - continue - case {init,key_bindings}.fish - set target conf.d/(command basename $pkg)\_$target - case \* - set target functions/$target - end - end - command rm -f $fisher_path/$target - end - if not functions -q fish_prompt - source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish" - end -end - -function _fisher_jobs - jobs $argv | command awk '/^[0-9]+\t/ { print $1 }' -end - -function _fisher_now -a elapsed - switch (command uname) - case Darwin \*BSD - command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed - case \* - math (command date "+%s%3N") - "0$elapsed" - end -end diff --git a/.config/fish_backup/functions/git-root.fish b/.config/fish_backup/functions/git-root.fish deleted file mode 100755 index bd2729b..0000000 --- a/.config/fish_backup/functions/git-root.fish +++ /dev/null @@ -1,3 +0,0 @@ -function git-root - cd (git rev-parse --show-toplevel) -end diff --git a/.config/fish_backup/functions/git_pull.fish b/.config/fish_backup/functions/git_pull.fish deleted file mode 100755 index b4b14ae..0000000 --- a/.config/fish_backup/functions/git_pull.fish +++ /dev/null @@ -1,10 +0,0 @@ -# combines git pull with git reset --soft in the event of garbage commits -# usage: git pull -function git_pull - git pull - if grep -q 'garbage_commit' (git log -1 --pretty=format:%B | psub) - echo "Garbage commit detected. Doing soft reset" - git show - git reset --soft HEAD^ - end -end diff --git a/.config/fish_backup/functions/ipython.fish b/.config/fish_backup/functions/ipython.fish deleted file mode 100644 index 109a8df..0000000 --- a/.config/fish_backup/functions/ipython.fish +++ /dev/null @@ -1,3 +0,0 @@ -function ipython --description 'alias ipython bash -c ipython' - bash -c ipython $argv; -end diff --git a/.config/fish_backup/functions/la.fish b/.config/fish_backup/functions/la.fish deleted file mode 100755 index 1a315d3..0000000 --- a/.config/fish_backup/functions/la.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function la --description 'alias la=ls -lAh' - ls -lAh $argv; -end diff --git a/.config/fish_backup/functions/make-venv.fish b/.config/fish_backup/functions/make-venv.fish deleted file mode 100644 index c9bb673..0000000 --- a/.config/fish_backup/functions/make-venv.fish +++ /dev/null @@ -1,8 +0,0 @@ -function make-venv --wraps='python3 -m venv ' --description 'alias make-venv python3 -m venv ' - set test_or $argv[1] .venv - set path (realpath $test_or[1]) - echo creating virtual environment at $path - set command 's;set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV";&\n set -x PYTHONPATH '(dirname $path)';' - python3 -m venv $path; - gsed -i $command $path/bin/activate.fish -end diff --git a/.config/fish_backup/functions/mount_carbonate.fish b/.config/fish_backup/functions/mount_carbonate.fish deleted file mode 100755 index b804e99..0000000 --- a/.config/fish_backup/functions/mount_carbonate.fish +++ /dev/null @@ -1,5 +0,0 @@ -function mount_carbonate - sshfs \ - -o IdentityFile=~/.ssh/id_rsa_laptop,auto_cache,reconnect,defer_permissions,Compression=no \ - mpjuers@carbonate:/ /Volumes/Carbonate/ -end diff --git a/.config/fish_backup/functions/new-jupyter-kernel.fish b/.config/fish_backup/functions/new-jupyter-kernel.fish deleted file mode 100755 index a446af8..0000000 --- a/.config/fish_backup/functions/new-jupyter-kernel.fish +++ /dev/null @@ -1,5 +0,0 @@ -function new-jupyter-kernel - pip install ipykernel - ipython kernel install --user --name=$argv[1] -end - diff --git a/.config/fish_backup/functions/pipreqs.fish b/.config/fish_backup/functions/pipreqs.fish deleted file mode 100644 index 2ca8b2c..0000000 --- a/.config/fish_backup/functions/pipreqs.fish +++ /dev/null @@ -1,3 +0,0 @@ -function pipreqs --description 'alias pipreqs pipreqs --ignore ".venv" $argv' - command pipreqs --ignore ".venv" $argv; -end diff --git a/.config/fish_backup/functions/pnglatex.fish b/.config/fish_backup/functions/pnglatex.fish deleted file mode 100644 index 048aa3e..0000000 --- a/.config/fish_backup/functions/pnglatex.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function pnglatex --wraps=pnglatex\ -p\ \'amsmath:amsthm\' --description alias\ pnglatex=pnglatex\ -p\ \'amsmath:amsthm\' - command pnglatex -p 'amsmath:amsthm' $argv; -end diff --git a/.config/fish_backup/functions/pytest.fish b/.config/fish_backup/functions/pytest.fish deleted file mode 100755 index 6cdd958..0000000 --- a/.config/fish_backup/functions/pytest.fish +++ /dev/null @@ -1,4 +0,0 @@ -# alias to call pytest with present directory in sys.path -function pytest - python -m pytest -end diff --git a/.config/fish_backup/functions/python.fish b/.config/fish_backup/functions/python.fish deleted file mode 100644 index 2d14112..0000000 --- a/.config/fish_backup/functions/python.fish +++ /dev/null @@ -1,3 +0,0 @@ -function python --wraps=python3 --description 'alias python python3' - python3 $argv; -end diff --git a/.config/fish_backup/functions/rsync_smart.fish b/.config/fish_backup/functions/rsync_smart.fish deleted file mode 100755 index aa5cbe2..0000000 --- a/.config/fish_backup/functions/rsync_smart.fish +++ /dev/null @@ -1,5 +0,0 @@ -# rsync only syncs changed files -# usage: rsync_smart in/ out -function rsync_smart - rsync -avu argv[1] argv[2] -end diff --git a/.config/fish_backup/functions/spoof.fish b/.config/fish_backup/functions/spoof.fish deleted file mode 100644 index 95b6c6b..0000000 --- a/.config/fish_backup/functions/spoof.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Defined in - @ line 1 -function spoof --wraps='sudo ifconfig en0 ether 5e:e1:96:43:4c:66' --description alias\ spoof=sudo\ ifconfig\ en0\ ether\ 5e:e1:96:43:4c:66\n - set mac 5e:e1:96:43:4c:66 - sudo spoof-mac set $mac en0 - echo "MAC address set to" $mac -end diff --git a/.config/fish_backup/functions/tl.fish b/.config/fish_backup/functions/tl.fish deleted file mode 100755 index d9a08c8..0000000 --- a/.config/fish_backup/functions/tl.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function tl --description 'alias tl=task list' - task list $argv; -end diff --git a/.config/fish_backup/functions/unspoof.fish b/.config/fish_backup/functions/unspoof.fish deleted file mode 100644 index 531f5c9..0000000 --- a/.config/fish_backup/functions/unspoof.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Defined in - @ line 1 -function unspoof --wraps='sudo ifconfig en0 ether 3c:22:fb:73:2c:93' --wraps='ifconfig en0 | grep ether 3c:22:fb:73:2c:93' --description 'alias unspoof=sudo ifconfig en0 ether 3c:22:fb:73:2c:93' - set mac 3c:22:fb:73:2c:93 - sudo spoof-mac set $mac en0 - echo "MAC address set to" $mac -end diff --git a/.config/fish_backup/functions/vi.fish b/.config/fish_backup/functions/vi.fish deleted file mode 100755 index 8714e1e..0000000 --- a/.config/fish_backup/functions/vi.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function vi --description 'alias vi nvim' - nvim $argv; -end diff --git a/.config/fish_backup/functions/vimdiff.fish b/.config/fish_backup/functions/vimdiff.fish deleted file mode 100755 index 94c84b9..0000000 --- a/.config/fish_backup/functions/vimdiff.fish +++ /dev/null @@ -1,3 +0,0 @@ -function vimdiff - command nvim -d $argv -end diff --git a/.config/gh/config.yml b/.config/gh/config.yml deleted file mode 100644 index f32ba6a..0000000 --- a/.config/gh/config.yml +++ /dev/null @@ -1,15 +0,0 @@ -# What protocol to use when performing git operations. Supported values: ssh, https -git_protocol: https -# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. -editor: -# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled -prompt: enabled -# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. -pager: -# Aliases allow you to create nicknames for gh commands -aliases: - co: pr checkout -# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport. -http_unix_socket: -# What web browser gh should use when opening URLs. If blank, will refer to environment. -browser: diff --git a/.config/gh/hosts.yml b/.config/gh/hosts.yml deleted file mode 100644 index 20d5872..0000000 --- a/.config/gh/hosts.yml +++ /dev/null @@ -1,4 +0,0 @@ -github.com: - user: nekoju - oauth_token: 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 - git_protocol: ssh diff --git a/.config/github-copilot/versions.json b/.config/github-copilot/versions.json new file mode 100644 index 0000000..d7c50bf --- /dev/null +++ b/.config/github-copilot/versions.json @@ -0,0 +1 @@ +{"copilot.vim":"1.49.0"} diff --git a/.config/kitty/.kitty.conf.swp b/.config/kitty/.kitty.conf.swp deleted file mode 100644 index 4746859..0000000 Binary files a/.config/kitty/.kitty.conf.swp and /dev/null differ diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf deleted file mode 100644 index 88cc50f..0000000 --- a/.config/kitty/kitty.conf +++ /dev/null @@ -1,2168 +0,0 @@ -# vim:fileencoding=utf-8:foldmethod=marker -include palenight.conf - -#: Fonts {{{ - -#: kitty has very powerful font management. You can configure -#: individual font faces and even specify special fonts for particular -#: characters. - -# font_family monospace -# bold_font auto -# italic_font auto -# bold_italic_font auto - -#: You can specify different fonts for the bold/italic/bold-italic -#: variants. To get a full list of supported fonts use the `kitty -#: +list-fonts` command. By default they are derived automatically, by -#: the OSes font system. When bold_font or bold_italic_font is set to -#: auto on macOS, the priority of bold fonts is semi-bold, bold, -#: heavy. Setting them manually is useful for font families that have -#: many weight variants like Book, Medium, Thick, etc. For example:: - -#: font_family Operator Mono Book -#: bold_font Operator Mono Medium -#: italic_font Operator Mono Book Italic -#: bold_italic_font Operator Mono Medium Italic - -# font_size 11.0 - -#: Font size (in pts) - -# force_ltr no - -#: kitty does not support BIDI (bidirectional text), however, for RTL -#: scripts, words are automatically displayed in RTL. That is to say, -#: in an RTL script, the words "HELLO WORLD" display in kitty as -#: "WORLD HELLO", and if you try to select a substring of an RTL- -#: shaped string, you will get the character that would be there had -#: the the string been LTR. For example, assuming the Hebrew word -#: ירושלים, selecting the character that on the screen appears to be ם -#: actually writes into the selection buffer the character י. kitty's -#: default behavior is useful in conjunction with a filter to reverse -#: the word order, however, if you wish to manipulate RTL glyphs, it -#: can be very challenging to work with, so this option is provided to -#: turn it off. Furthermore, this option can be used with the command -#: line program GNU FriBidi -#: to get BIDI -#: support, because it will force kitty to always treat the text as -#: LTR, which FriBidi expects for terminals. - -# adjust_line_height 0 -# adjust_column_width 0 - -#: Change the size of each character cell kitty renders. You can use -#: either numbers, which are interpreted as pixels or percentages -#: (number followed by %), which are interpreted as percentages of the -#: unmodified values. You can use negative pixels or percentages less -#: than 100% to reduce sizes (but this might cause rendering -#: artifacts). - -# adjust_baseline 0 - -#: Adjust the vertical alignment of text (the height in the cell at -#: which text is positioned). You can use either numbers, which are -#: interpreted as pixels or percentages (number followed by %), which -#: are interpreted as the percentage of the line height. A positive -#: value moves the baseline up, and a negative value moves them down. -#: The underline and strikethrough positions are adjusted accordingly. - -# symbol_map - -#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols - -#: Map the specified Unicode codepoints to a particular font. Useful -#: if you need special rendering for some symbols, such as for -#: Powerline. Avoids the need for patched fonts. Each Unicode code -#: point is specified in the form `U+`. You -#: can specify multiple code points, separated by commas and ranges -#: separated by hyphens. This option can be specified multiple times. -#: The syntax is:: - -#: symbol_map codepoints Font Family Name - -# narrow_symbols - -#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 - -#: Usually, for Private Use Unicode characters and some symbol/dingbat -#: characters, if the character is followed by one or more spaces, -#: kitty will use those extra cells to render the character larger, if -#: the character in the font has a wide aspect ratio. Using this -#: option you can force kitty to restrict the specified code points to -#: render in the specified number of cells (defaulting to one cell). -#: This option can be specified multiple times. The syntax is:: - -#: narrow_symbols codepoints [optionally the number of cells] - -# disable_ligatures never - -#: Choose how you want to handle multi-character ligatures. The -#: default is to always render them. You can tell kitty to not render -#: them when the cursor is over them by using cursor to make editing -#: easier, or have kitty never render them at all by using always, if -#: you don't like them. The ligature strategy can be set per-window -#: either using the kitty remote control facility or by defining -#: shortcuts for it in kitty.conf, for example:: - -#: map alt+1 disable_ligatures_in active always -#: map alt+2 disable_ligatures_in all never -#: map alt+3 disable_ligatures_in tab cursor - -#: Note that this refers to programming ligatures, typically -#: implemented using the calt OpenType feature. For disabling general -#: ligatures, use the font_features option. - -# font_features - -#: E.g. font_features none - -#: Choose exactly which OpenType features to enable or disable. This -#: is useful as some fonts might have features worthwhile in a -#: terminal. For example, Fira Code includes a discretionary feature, -#: zero, which in that font changes the appearance of the zero (0), to -#: make it more easily distinguishable from Ø. Fira Code also includes -#: other discretionary features known as Stylistic Sets which have the -#: tags ss01 through ss20. - -#: For the exact syntax to use for individual features, see the -#: HarfBuzz documentation . - -#: Note that this code is indexed by PostScript name, and not the font -#: family. This allows you to define very precise feature settings; -#: e.g. you can disable a feature in the italic font but not in the -#: regular font. - -#: On Linux, font features are first read from the FontConfig database -#: and then this option is applied, so they can be configured in a -#: single, central place. - -#: To get the PostScript name for a font, use `kitty +list-fonts -#: --psnames`: - -#: .. code-block:: sh - -#: $ kitty +list-fonts --psnames | grep Fira -#: Fira Code -#: Fira Code Bold (FiraCode-Bold) -#: Fira Code Light (FiraCode-Light) -#: Fira Code Medium (FiraCode-Medium) -#: Fira Code Regular (FiraCode-Regular) -#: Fira Code Retina (FiraCode-Retina) - -#: The part in brackets is the PostScript name. - -#: Enable alternate zero and oldstyle numerals:: - -#: font_features FiraCode-Retina +zero +onum - -#: Enable only alternate zero in the bold font:: - -#: font_features FiraCode-Bold +zero - -#: Disable the normal ligatures, but keep the calt feature which (in -#: this font) breaks up monotony:: - -#: font_features TT2020StyleB-Regular -liga +calt - -#: In conjunction with force_ltr, you may want to disable Arabic -#: shaping entirely, and only look at their isolated forms if they -#: show up in a document. You can do this with e.g.:: - -#: font_features UnifontMedium +isol -medi -fina -init - -# box_drawing_scale 0.001, 1, 1.5, 2 - -#: The sizes of the lines used for the box drawing Unicode characters. -#: These values are in pts. They will be scaled by the monitor DPI to -#: arrive at a pixel value. There must be four values corresponding to -#: thin, normal, thick, and very thick lines. - -#: }}} - -#: Cursor customization {{{ - -# cursor #cccccc - -#: Default cursor color. If set to the special value none the cursor -#: will be rendered with a "reverse video" effect. It's color will be -#: the color of the text in the cell it is over and the text will be -#: rendered with the background color of the cell. Note that if the -#: program running in the terminal sets a cursor color, this takes -#: precedence. Also, the cursor colors are modified if the cell -#: background and foreground colors have very low contrast. - -# cursor_text_color #111111 - -#: The color of text under the cursor. If you want it rendered with -#: the background color of the cell underneath instead, use the -#: special keyword: background. Note that if cursor is set to none -#: then this option is ignored. - -# cursor_shape block - -#: The cursor shape can be one of block, beam, underline. Note that -#: when reloading the config this will be changed only if the cursor -#: shape has not been set by the program running in the terminal. This -#: sets the default cursor shape, applications running in the terminal -#: can override it. In particular, shell integration -#: in kitty sets -#: the cursor shape to beam at shell prompts. You can avoid this by -#: setting shell_integration to no-cursor. - -# cursor_beam_thickness 1.5 - -#: The thickness of the beam cursor (in pts). - -# cursor_underline_thickness 2.0 - -#: The thickness of the underline cursor (in pts). - -# cursor_blink_interval -1 - -#: The interval to blink the cursor (in seconds). Set to zero to -#: disable blinking. Negative values mean use system default. Note -#: that the minimum interval will be limited to repaint_delay. - -# cursor_stop_blinking_after 15.0 - -#: Stop blinking cursor after the specified number of seconds of -#: keyboard inactivity. Set to zero to never stop blinking. - -#: }}} - -#: Scrollback {{{ - -# scrollback_lines 2000 - -#: Number of lines of history to keep in memory for scrolling back. -#: Memory is allocated on demand. Negative numbers are (effectively) -#: infinite scrollback. Note that using very large scrollback is not -#: recommended as it can slow down performance of the terminal and -#: also use large amounts of RAM. Instead, consider using -#: scrollback_pager_history_size. Note that on config reload if this -#: is changed it will only affect newly created windows, not existing -#: ones. - -# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER - -#: Program with which to view scrollback in a new window. The -#: scrollback buffer is passed as STDIN to this program. If you change -#: it, make sure the program you use can handle ANSI escape sequences -#: for colors and text formatting. INPUT_LINE_NUMBER in the command -#: line above will be replaced by an integer representing which line -#: should be at the top of the screen. Similarly CURSOR_LINE and -#: CURSOR_COLUMN will be replaced by the current cursor position or -#: set to 0 if there is no cursor, for example, when showing the last -#: command output. - -# scrollback_pager_history_size 0 - -#: Separate scrollback history size (in MB), used only for browsing -#: the scrollback buffer with pager. This separate buffer is not -#: available for interactive scrolling but will be piped to the pager -#: program when viewing scrollback buffer in a separate window. The -#: current implementation stores the data in UTF-8, so approximatively -#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, -#: unformatted text. A value of zero or less disables this feature. -#: The maximum allowed size is 4GB. Note that on config reload if this -#: is changed it will only affect newly created windows, not existing -#: ones. - -# scrollback_fill_enlarged_window no - -#: Fill new space with lines from the scrollback buffer after -#: enlarging a window. - -# wheel_scroll_multiplier 5.0 - -#: Multiplier for the number of lines scrolled by the mouse wheel. -#: Note that this is only used for low precision scrolling devices, -#: not for high precision scrolling devices on platforms such as macOS -#: and Wayland. Use negative numbers to change scroll direction. See -#: also wheel_scroll_min_lines. - -# wheel_scroll_min_lines 1 - -#: The minimum number of lines scrolled by the mouse wheel. The scroll -#: multiplier only takes effect after it -#: reaches this number. Note that this is only used for low precision -#: scrolling devices like wheel mice that scroll by very small amounts -#: when using the wheel. With a negative number, the minimum number of -#: lines will always be added. - -# touch_scroll_multiplier 1.0 - -#: Multiplier for the number of lines scrolled by a touchpad. Note -#: that this is only used for high precision scrolling devices on -#: platforms such as macOS and Wayland. Use negative numbers to change -#: scroll direction. - -#: }}} - -#: Mouse {{{ - -# mouse_hide_wait 3.0 - -#: Hide mouse cursor after the specified number of seconds of the -#: mouse not being used. Set to zero to disable mouse cursor hiding. -#: Set to a negative value to hide the mouse cursor immediately when -#: typing text. Disabled by default on macOS as getting it to work -#: robustly with the ever-changing sea of bugs that is Cocoa is too -#: much effort. - -# url_color #0087bd -# url_style curly - -#: The color and style for highlighting URLs on mouse-over. url_style -#: can be one of: none, straight, double, curly, dotted, dashed. - -# open_url_with default - -#: The program to open clicked URLs. The special value default means -#: to use the operating system's default URL handler (open on macOS -#: and xdg-open on Linux). - -# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh - -#: The set of URL prefixes to look for when detecting a URL under the -#: mouse cursor. - -# detect_urls yes - -#: Detect URLs under the mouse. Detected URLs are highlighted with an -#: underline and the mouse cursor becomes a hand over them. Even if -#: this option is disabled, URLs are still clickable. - -# url_excluded_characters - -#: Additional characters to be disallowed from URLs, when detecting -#: URLs under the mouse cursor. By default, all characters that are -#: legal in URLs are allowed. - -# copy_on_select no - -#: Copy to clipboard or a private buffer on select. With this set to -#: clipboard, selecting text with the mouse will cause the text to be -#: copied to clipboard. Useful on platforms such as macOS that do not -#: have the concept of primary selection. You can instead specify a -#: name such as a1 to copy to a private kitty buffer. Map a shortcut -#: with the paste_from_buffer action to paste from this private -#: buffer. For example:: - -#: copy_on_select a1 -#: map shift+cmd+v paste_from_buffer a1 - -#: Note that copying to the clipboard is a security risk, as all -#: programs, including websites open in your browser can read the -#: contents of the system clipboard. - -# paste_actions quote-urls-at-prompt - -#: A comma separated list of actions to take when pasting text into -#: the terminal. The supported paste actions are: - -#: quote-urls-at-prompt: -#: If the text being pasted is a URL and the cursor is at a shell prompt, -#: automatically quote the URL (needs shell_integration). -#: confirm: -#: Confirm the paste if bracketed paste mode is not active or there is more -#: a large amount of text being pasted. -#: filter: -#: Run the filter_paste() function from the file paste-actions.py in -#: the kitty config directory on the pasted text. The text returned by the -#: function will be actually pasted. - -# strip_trailing_spaces never - -#: Remove spaces at the end of lines when copying to clipboard. A -#: value of smart will do it when using normal selections, but not -#: rectangle selections. A value of always will always do it. - -# select_by_word_characters @-./_~?&=%+# - -#: Characters considered part of a word when double clicking. In -#: addition to these characters any character that is marked as an -#: alphanumeric character in the Unicode database will be matched. - -# select_by_word_characters_forward - -#: Characters considered part of a word when extending the selection -#: forward on double clicking. In addition to these characters any -#: character that is marked as an alphanumeric character in the -#: Unicode database will be matched. - -#: If empty (default) select_by_word_characters will be used for both -#: directions. - -# click_interval -1.0 - -#: The interval between successive clicks to detect double/triple -#: clicks (in seconds). Negative numbers will use the system default -#: instead, if available, or fallback to 0.5. - -# focus_follows_mouse no - -#: Set the active window to the window under the mouse when moving the -#: mouse around. - -# pointer_shape_when_grabbed arrow - -#: The shape of the mouse pointer when the program running in the -#: terminal grabs the mouse. Valid values are: arrow, beam and hand. - -# default_pointer_shape beam - -#: The default shape of the mouse pointer. Valid values are: arrow, -#: beam and hand. - -# pointer_shape_when_dragging beam - -#: The default shape of the mouse pointer when dragging across text. -#: Valid values are: arrow, beam and hand. - -#: Mouse actions {{{ - -#: Mouse buttons can be mapped to perform arbitrary actions. The -#: syntax is: - -#: .. code-block:: none - -#: mouse_map button-name event-type modes action - -#: Where button-name is one of left, middle, right, b1 ... b8 with -#: added keyboard modifiers. For example: ctrl+shift+left refers to -#: holding the Ctrl+Shift keys while clicking with the left mouse -#: button. The value b1 ... b8 can be used to refer to up to eight -#: buttons on a mouse. - -#: event-type is one of press, release, doublepress, triplepress, -#: click, doubleclick. modes indicates whether the action is performed -#: when the mouse is grabbed by the program running in the terminal, -#: or not. The values are grabbed or ungrabbed or a comma separated -#: combination of them. grabbed refers to when the program running in -#: the terminal has requested mouse events. Note that the click and -#: double click events have a delay of click_interval to disambiguate -#: from double and triple presses. - -#: You can run kitty with the kitty --debug-input command line option -#: to see mouse events. See the builtin actions below to get a sense -#: of what is possible. - -#: If you want to unmap an action, map it to no_op. For example, to -#: disable opening of URLs with a plain click:: - -#: mouse_map left click ungrabbed no_op - -#: See all the mappable actions including mouse actions here -#: . - -#: .. note:: -#: Once a selection is started, releasing the button that started it will -#: automatically end it and no release event will be dispatched. - -# clear_all_mouse_actions no - -#: Remove all mouse action definitions up to this point. Useful, for -#: instance, to remove the default mouse actions. - -#: Click the link under the mouse or move the cursor - -# mouse_map left click ungrabbed mouse_handle_click selection link prompt - -#:: First check for a selection and if one exists do nothing. Then -#:: check for a link under the mouse cursor and if one exists, click -#:: it. Finally check if the click happened at the current shell -#:: prompt and if so, move the cursor to the click location. Note -#:: that this requires shell integration -#:: to work. - -#: Click the link under the mouse or move the cursor even when grabbed - -# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt - -#:: Same as above, except that the action is performed even when the -#:: mouse is grabbed by the program running in the terminal. - -#: Click the link under the mouse cursor - -# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link - -#:: Variant with Ctrl+Shift is present because the simple click based -#:: version has an unavoidable delay of click_interval, to -#:: disambiguate clicks from double clicks. - -#: Discard press event for link click - -# mouse_map ctrl+shift+left press grabbed discard_event - -#:: Prevent this press event from being sent to the program that has -#:: grabbed the mouse, as the corresponding release event is used to -#:: open a URL. - -#: Paste from the primary selection - -# mouse_map middle release ungrabbed paste_from_selection - -#: Start selecting text - -# mouse_map left press ungrabbed mouse_selection normal - -#: Start selecting text in a rectangle - -# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle - -#: Select a word - -# mouse_map left doublepress ungrabbed mouse_selection word - -#: Select a line - -# mouse_map left triplepress ungrabbed mouse_selection line - -#: Select line from point - -# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point - -#:: Select from the clicked point to the end of the line. - -#: Extend the current selection - -# mouse_map right press ungrabbed mouse_selection extend - -#:: If you want only the end of the selection to be moved instead of -#:: the nearest boundary, use move-end instead of extend. - -#: Paste from the primary selection even when grabbed - -# mouse_map shift+middle release ungrabbed,grabbed paste_selection -# mouse_map shift+middle press grabbed discard_event - -#: Start selecting text even when grabbed - -# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal - -#: Start selecting text in a rectangle even when grabbed - -# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle - -#: Select a word even when grabbed - -# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word - -#: Select a line even when grabbed - -# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line - -#: Select line from point even when grabbed - -# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point - -#:: Select from the clicked point to the end of the line even when -#:: grabbed. - -#: Extend the current selection even when grabbed - -# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend - -#: Show clicked command output in pager - -# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output - -#:: Requires shell integration -#:: to work. - -#: }}} - -#: }}} - -#: Performance tuning {{{ - -# repaint_delay 10 - -#: Delay between screen updates (in milliseconds). Decreasing it, -#: increases frames-per-second (FPS) at the cost of more CPU usage. -#: The default value yields ~100 FPS which is more than sufficient for -#: most uses. Note that to actually achieve 100 FPS, you have to -#: either set sync_to_monitor to no or use a monitor with a high -#: refresh rate. Also, to minimize latency when there is pending input -#: to be processed, this option is ignored. - -# input_delay 3 - -#: Delay before input from the program running in the terminal is -#: processed (in milliseconds). Note that decreasing it will increase -#: responsiveness, but also increase CPU usage and might cause flicker -#: in full screen programs that redraw the entire screen on each loop, -#: because kitty is so fast that partial screen updates will be drawn. - -# sync_to_monitor yes - -#: Sync screen updates to the refresh rate of the monitor. This -#: prevents screen tearing -#: when scrolling. -#: However, it limits the rendering speed to the refresh rate of your -#: monitor. With a very high speed mouse/high keyboard repeat rate, -#: you may notice some slight input latency. If so, set this to no. - -#: }}} - -#: Terminal bell {{{ - -# enable_audio_bell yes - -#: The audio bell. Useful to disable it in environments that require -#: silence. - -# visual_bell_duration 0.0 - -#: The visual bell duration (in seconds). Flash the screen when a bell -#: occurs for the specified number of seconds. Set to zero to disable. - -# visual_bell_color none - -#: The color used by visual bell. Set to none will fall back to -#: selection background color. If you feel that the visual bell is too -#: bright, you can set it to a darker color. - -# window_alert_on_bell yes - -#: Request window attention on bell. Makes the dock icon bounce on -#: macOS or the taskbar flash on linux. - -# bell_on_tab "🔔 " - -#: Some text or a Unicode symbol to show on the tab if a window in the -#: tab that does not have focus has a bell. If you want to use leading -#: or trailing spaces, surround the text with quotes. See -#: tab_title_template for how this is rendered. - -#: For backwards compatibility, values of yes, y and true are -#: converted to the default bell symbol and no, n, false and none are -#: converted to the empty string. - -# command_on_bell none - -#: Program to run when a bell occurs. The environment variable -#: KITTY_CHILD_CMDLINE can be used to get the program running in the -#: window in which the bell occurred. - -# bell_path none - -#: Path to a sound file to play as the bell sound. If set to none, the -#: system default bell sound is used. Must be in a format supported by -#: the operating systems sound API, such as WAV or OGA on Linux -#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound) - -#: }}} - -#: Window layout {{{ - -# remember_window_size yes -# initial_window_width 640 -# initial_window_height 400 - -#: If enabled, the window size will be remembered so that new -#: instances of kitty will have the same size as the previous -#: instance. If disabled, the window will initially have size -#: configured by initial_window_width/height, in pixels. You can use a -#: suffix of "c" on the width/height values to have them interpreted -#: as number of cells instead of pixels. - -# enabled_layouts * - -#: The enabled window layouts. A comma separated list of layout names. -#: The special value all means all layouts. The first listed layout -#: will be used as the startup layout. Default configuration is all -#: layouts in alphabetical order. For a list of available layouts, see -#: the layouts . - -# window_resize_step_cells 2 -# window_resize_step_lines 2 - -#: The step size (in units of cell width/cell height) to use when -#: resizing kitty windows in a layout with the shortcut -#: start_resizing_window. The cells value is used for horizontal -#: resizing, and the lines value is used for vertical resizing. - -# window_border_width 0.5pt - -#: The width of window borders. Can be either in pixels (px) or pts -#: (pt). Values in pts will be rounded to the nearest number of pixels -#: based on screen resolution. If not specified, the unit is assumed -#: to be pts. Note that borders are displayed only when more than one -#: window is visible. They are meant to separate multiple windows. - -# draw_minimal_borders yes - -#: Draw only the minimum borders needed. This means that only the -#: borders that separate the inactive window from a neighbor are -#: drawn. Note that setting a non-zero window_margin_width overrides -#: this and causes all borders to be drawn. - -# window_margin_width 0 - -#: The window margin (in pts) (blank area outside the border). A -#: single value sets all four sides. Two values set the vertical and -#: horizontal sides. Three values set top, horizontal and bottom. Four -#: values set top, right, bottom and left. - -# single_window_margin_width -1 - -#: The window margin to use when only a single window is visible (in -#: pts). Negative values will cause the value of window_margin_width -#: to be used instead. A single value sets all four sides. Two values -#: set the vertical and horizontal sides. Three values set top, -#: horizontal and bottom. Four values set top, right, bottom and left. - -# window_padding_width 0 - -#: The window padding (in pts) (blank area between the text and the -#: window border). A single value sets all four sides. Two values set -#: the vertical and horizontal sides. Three values set top, horizontal -#: and bottom. Four values set top, right, bottom and left. - -# placement_strategy center - -#: When the window size is not an exact multiple of the cell size, the -#: cell area of the terminal window will have some extra padding on -#: the sides. You can control how that padding is distributed with -#: this option. Using a value of center means the cell area will be -#: placed centrally. A value of top-left means the padding will be -#: only at the bottom and right edges. - -# active_border_color #00ff00 - -#: The color for the border of the active window. Set this to none to -#: not draw borders around the active window. - -# inactive_border_color #cccccc - -#: The color for the border of inactive windows. - -# bell_border_color #ff5a00 - -#: The color for the border of inactive windows in which a bell has -#: occurred. - -# inactive_text_alpha 1.0 - -#: Fade the text in inactive windows by the specified amount (a number -#: between zero and one, with zero being fully faded). - -# hide_window_decorations no - -#: Hide the window decorations (title-bar and window borders) with -#: yes. On macOS, titlebar-only can be used to only hide the titlebar. -#: Whether this works and exactly what effect it has depends on the -#: window manager/operating system. Note that the effects of changing -#: this option when reloading config are undefined. - -# window_logo_path none - -#: Path to a logo image. Must be in PNG format. Relative paths are -#: interpreted relative to the kitty config directory. The logo is -#: displayed in a corner of every kitty window. The position is -#: controlled by window_logo_position. Individual windows can be -#: configured to have different logos either using the launch action -#: or the remote control facility. - -# window_logo_position bottom-right - -#: Where to position the window logo in the window. The value can be -#: one of: top-left, top, top-right, left, center, right, bottom-left, -#: bottom, bottom-right. - -# window_logo_alpha 0.5 - -#: The amount the logo should be faded into the background. With zero -#: being fully faded and one being fully opaque. - -# resize_debounce_time 0.1 - -#: The time to wait before redrawing the screen when a resize event is -#: received (in seconds). On platforms such as macOS, where the -#: operating system sends events corresponding to the start and end of -#: a resize, this number is ignored. - -# resize_draw_strategy static - -#: Choose how kitty draws a window while a resize is in progress. A -#: value of static means draw the current window contents, mostly -#: unchanged. A value of scale means draw the current window contents -#: scaled. A value of blank means draw a blank window. A value of size -#: means show the window size in cells. - -# resize_in_steps no - -#: Resize the OS window in steps as large as the cells, instead of -#: with the usual pixel accuracy. Combined with initial_window_width -#: and initial_window_height in number of cells, this option can be -#: used to keep the margins as small as possible when resizing the OS -#: window. Note that this does not currently work on Wayland. - -# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ - -#: The list of characters for visual window selection. For example, -#: for selecting a window to focus on with focus_visible_window. The -#: value should be a series of unique numbers or alphabets, case -#: insensitive, from the set [0-9A-Z]. Specify your preference as a -#: string of characters. - -# confirm_os_window_close -1 - -#: Ask for confirmation when closing an OS window or a tab with at -#: least this number of kitty windows in it by window manager (e.g. -#: clicking the window close button or pressing the operating system -#: shortcut to close windows) or by the close_tab action. A value of -#: zero disables confirmation. This confirmation also applies to -#: requests to quit the entire application (all OS windows, via the -#: quit action). Negative values are converted to positive ones, -#: however, with shell_integration enabled, using negative values -#: means windows sitting at a shell prompt are not counted, only -#: windows where some command is currently running. Note that if you -#: want confirmation when closing individual windows, you can map the -#: close_window_with_confirmation action. - -#: }}} - -#: Tab bar {{{ - -# tab_bar_edge bottom - -#: The edge to show the tab bar on, top or bottom. - -# tab_bar_margin_width 0.0 - -#: The margin to the left and right of the tab bar (in pts). - -# tab_bar_margin_height 0.0 0.0 - -#: The margin above and below the tab bar (in pts). The first number -#: is the margin between the edge of the OS Window and the tab bar. -#: The second number is the margin between the tab bar and the -#: contents of the current tab. - -# tab_bar_style fade - -#: The tab bar style, can be one of: - -#: fade -#: Each tab's edges fade into the background color. (See also tab_fade) -#: slant -#: Tabs look like the tabs in a physical file. -#: separator -#: Tabs are separated by a configurable separator. (See also -#: tab_separator) -#: powerline -#: Tabs are shown as a continuous line with "fancy" separators. -#: (See also tab_powerline_style) -#: custom -#: A user-supplied Python function called draw_tab is loaded from the file -#: tab_bar.py in the kitty config directory. For examples of how to -#: write such a function, see the functions named draw_tab_with_* in -#: kitty's source code: kitty/tab_bar.py. See also -#: this discussion https://github.com/kovidgoyal/kitty/discussions/4447 -#: for examples from kitty users. -#: hidden -#: The tab bar is hidden. If you use this, you might want to create a mapping -#: for the select_tab action which presents you with a list of tabs and -#: allows for easy switching to a tab. - -# tab_bar_align left - -#: The horizontal alignment of the tab bar, can be one of: left, -#: center, right. - -# tab_bar_min_tabs 2 - -#: The minimum number of tabs that must exist before the tab bar is -#: shown. - -# tab_switch_strategy previous - -#: The algorithm to use when switching to a tab when the current tab -#: is closed. The default of previous will switch to the last used -#: tab. A value of left will switch to the tab to the left of the -#: closed tab. A value of right will switch to the tab to the right of -#: the closed tab. A value of last will switch to the right-most tab. - -# tab_fade 0.25 0.5 0.75 1 - -#: Control how each tab fades into the background when using fade for -#: the tab_bar_style. Each number is an alpha (between zero and one) -#: that controls how much the corresponding cell fades into the -#: background, with zero being no fade and one being full fade. You -#: can change the number of cells used by adding/removing entries to -#: this list. - -# tab_separator " ┇" - -#: The separator between tabs in the tab bar when using separator as -#: the tab_bar_style. - -# tab_powerline_style angled - -#: The powerline separator style between tabs in the tab bar when -#: using powerline as the tab_bar_style, can be one of: angled, -#: slanted, round. - -# tab_activity_symbol none - -#: Some text or a Unicode symbol to show on the tab if a window in the -#: tab that does not have focus has some activity. If you want to use -#: leading or trailing spaces, surround the text with quotes. See -#: tab_title_template for how this is rendered. - -# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" - -#: A template to render the tab title. The default just renders the -#: title with optional symbols for bell and activity. If you wish to -#: include the tab-index as well, use something like: {index}:{title}. -#: Useful if you have shortcuts mapped for goto_tab N. If you prefer -#: to see the index as a superscript, use {sup.index}. In addition you -#: can use {layout_name} for the current layout name, {num_windows} -#: for the number of windows in the tab and {num_window_groups} for -#: the number of window groups (not counting overlay windows) in the -#: tab. Note that formatting is done by Python's string formatting -#: machinery, so you can use, for instance, {layout_name[:2].upper()} -#: to show only the first two letters of the layout name, upper-cased. -#: If you want to style the text, you can use styling directives, for -#: example: -#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. -#: Similarly, for bold and italic: -#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. -#: Note that for backward compatibility, if {bell_symbol} or -#: {activity_symbol} are not present in the template, they are -#: prepended to it. - -# active_tab_title_template none - -#: Template to use for active tabs. If not specified falls back to -#: tab_title_template. - -# active_tab_foreground #000 -# active_tab_background #eee -# active_tab_font_style bold-italic -# inactive_tab_foreground #444 -# inactive_tab_background #999 -# inactive_tab_font_style normal - -#: Tab bar colors and styles. - -# tab_bar_background none - -#: Background color for the tab bar. Defaults to using the terminal -#: background color. - -# tab_bar_margin_color none - -#: Color for the tab bar margin area. Defaults to using the terminal -#: background color. - -#: }}} - -#: Color scheme {{{ - -# foreground #dddddd -# background #000000 - -#: The foreground and background colors. - -background_opacity 0.90 - -#: The opacity of the background. A number between zero and one, where -#: one is opaque and zero is fully transparent. This will only work if -#: supported by the OS (for instance, when using a compositor under -#: X11). Note that it only sets the background color's opacity in -#: cells that have the same background color as the default terminal -#: background, so that things like the status bar in vim, powerline -#: prompts, etc. still look good. But it means that if you use a color -#: theme with a background color in your editor, it will not be -#: rendered as transparent. Instead you should change the default -#: background color in your kitty config and not use a background -#: color in the editor color scheme. Or use the escape codes to set -#: the terminals default colors in a shell script to launch your -#: editor. Be aware that using a value less than 1.0 is a (possibly -#: significant) performance hit. If you want to dynamically change -#: transparency of windows, set dynamic_background_opacity to yes -#: (this is off by default as it has a performance cost). Changing -#: this option when reloading the config will only work if -#: dynamic_background_opacity was enabled in the original config. - -# background_image none - -#: Path to a background image. Must be in PNG format. - -# background_image_layout tiled - -#: Whether to tile, scale or clamp the background image. The value can -#: be one of tiled, mirror-tiled, scaled, clamped. - -# background_image_linear no - -#: When background image is scaled, whether linear interpolation -#: should be used. - -# dynamic_background_opacity no - -#: Allow changing of the background_opacity dynamically, using either -#: keyboard shortcuts (increase_background_opacity and -#: decrease_background_opacity) or the remote control facility. -#: Changing this option by reloading the config is not supported. - -# background_tint 0.0 - -#: How much to tint the background image by the background color. The -#: tint is applied only under the text area, not margin/borders. This -#: option makes it easier to read the text. Tinting is done using the -#: current background color for each window. This option applies only -#: if background_opacity is set and transparent windows are supported -#: or background_image is set. - -# dim_opacity 0.75 - -#: How much to dim text that has the DIM/FAINT attribute set. One -#: means no dimming and zero means fully dimmed (i.e. invisible). - -# selection_foreground #000000 -# selection_background #fffacd - -#: The foreground and background colors for text selected with the -#: mouse. Setting both of these to none will cause a "reverse video" -#: effect for selections, where the selection will be the cell text -#: color and the text will become the cell background color. Setting -#: only selection_foreground to none will cause the foreground color -#: to be used unchanged. Note that these colors can be overridden by -#: the program running in the terminal. - -#: The color table {{{ - -#: The 256 terminal colors. There are 8 basic colors, each color has a -#: dull and bright version, for the first 16 colors. You can set the -#: remaining 240 colors as color16 to color255. - -# color0 #000000 -# color8 #767676 - -#: black - -# color1 #cc0403 -# color9 #f2201f - -#: red - -# color2 #19cb00 -# color10 #23fd00 - -#: green - -# color3 #cecb00 -# color11 #fffd00 - -#: yellow - -# color4 #0d73cc -# color12 #1a8fff - -#: blue - -# color5 #cb1ed1 -# color13 #fd28ff - -#: magenta - -# color6 #0dcdcd -# color14 #14ffff - -#: cyan - -# color7 #dddddd -# color15 #ffffff - -#: white - -# mark1_foreground black - -#: Color for marks of type 1 - -# mark1_background #98d3cb - -#: Color for marks of type 1 (light steel blue) - -# mark2_foreground black - -#: Color for marks of type 2 - -# mark2_background #f2dcd3 - -#: Color for marks of type 1 (beige) - -# mark3_foreground black - -#: Color for marks of type 3 - -# mark3_background #f274bc - -#: Color for marks of type 3 (violet) - -#: }}} - -#: }}} - -#: Advanced {{{ - -# shell . - -#: The shell program to execute. The default value of . means to use -#: whatever shell is set as the default shell for the current user. -#: Note that on macOS if you change this, you might need to add -#: --login and --interactive to ensure that the shell starts in -#: interactive mode and reads its startup rc files. - -editor . - -#: The terminal based text editor (such as vim or nano) to use when -#: editing the kitty config file or similar tasks. - -#: The default value of . means to use the environment variables -#: VISUAL and EDITOR in that order. If these variables aren't set, -#: kitty will run your shell ($SHELL -l -i -c env) to see if your -#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, -#: kitty will cycle through various known editors (vim, emacs, etc.) -#: and take the first one that exists on your system. - -# close_on_child_death no - -#: Close the window when the child process (shell) exits. With the -#: default value no, the terminal will remain open when the child -#: exits as long as there are still processes outputting to the -#: terminal (for example disowned or backgrounded processes). When -#: enabled with yes, the window will close as soon as the child -#: process exits. Note that setting it to yes means that any -#: background processes still using the terminal can fail silently -#: because their stdout/stderr/stdin no longer work. - -# allow_remote_control no - -#: Allow other programs to control kitty. If you turn this on, other -#: programs can control all aspects of kitty, including sending text -#: to kitty windows, opening new windows, closing windows, reading the -#: content of windows, etc. Note that this even works over SSH -#: connections. You can choose to either allow any program running -#: within kitty to control it with yes, or only allow programs that -#: connect to the socket (specified with the listen_on config option -#: or kitty --listen-on command line option) with the value socket- -#: only. The latter is useful if you want to prevent programs running -#: on a remote computer over SSH from controlling kitty. Reloading the -#: config will not affect this option. - -# listen_on none - -#: Listen to the specified UNIX socket for remote control connections. -#: Note that this will apply to all kitty instances. It can be -#: overridden by the kitty --listen-on command line option, which -#: supports listening on TCP socket. This option accepts only UNIX -#: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). -#: Environment variables are expanded and relative paths are resolved -#: with respect to the temporary directory. If {kitty_pid} is present, -#: then it is replaced by the PID of the kitty process, otherwise the -#: PID of the kitty process is appended to the value, with a hyphen. -#: This option is ignored unless you also set allow_remote_control to -#: enable remote control. See the help for kitty --listen-on for more -#: details. Changing this option by reloading the config is not -#: supported. - -# env - -#: Specify the environment variables to be set in all child processes. -#: Using the name with an equal sign (e.g. env VAR=) will set it to -#: the empty string. Specifying only the name (e.g. env VAR) will -#: remove the variable from the child process' environment. Note that -#: environment variables are expanded recursively, for example:: - -#: env VAR1=a -#: env VAR2=${HOME}/${VAR1}/b - -#: The value of VAR2 will be /a/b. - -# watcher - -#: Path to python file which will be loaded for watchers -#: . Can be -#: specified more than once to load multiple watchers. The watchers -#: will be added to every kitty window. Relative paths are resolved -#: relative to the kitty config directory. Note that reloading the -#: config will only affect windows created after the reload. - -# exe_search_path - -#: Control where kitty finds the programs to run. The default search -#: order is: First search the system wide PATH, then ~/.local/bin and -#: ~/bin. If still not found, the PATH defined in the login shell -#: after sourcing all its startup files is tried. Finally, if present, -#: the PATH specified by the env option is tried. - -#: This option allows you to prepend, append, or remove paths from -#: this search order. It can be specified multiple times for multiple -#: paths. A simple path will be prepended to the search order. A path -#: that starts with the + sign will be append to the search order, -#: after ~/bin above. A path that starts with the - sign will be -#: removed from the entire search order. For example:: - -#: exe_search_path /some/prepended/path -#: exe_search_path +/some/appended/path -#: exe_search_path -/some/excluded/path - -# update_check_interval 24 - -#: The interval to periodically check if an update to kitty is -#: available (in hours). If an update is found, a system notification -#: is displayed informing you of the available update. The default is -#: to check every 24 hours, set to zero to disable. Update checking is -#: only done by the official binary builds. Distro packages or source -#: builds do not do update checking. Changing this option by reloading -#: the config is not supported. - -# startup_session none - -#: Path to a session file to use for all kitty instances. Can be -#: overridden by using the kitty --session command line option for -#: individual instances. See sessions -#: in the -#: kitty documentation for details. Note that relative paths are -#: interpreted with respect to the kitty config directory. Environment -#: variables in the path are expanded. Changing this option by -#: reloading the config is not supported. - -# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask - -#: Allow programs running in kitty to read and write from the -#: clipboard. You can control exactly which actions are allowed. The -#: possible actions are: write-clipboard, read-clipboard, write- -#: primary, read-primary, read-clipboard-ask, read-primary-ask. The -#: default is to allow writing to the clipboard and primary selection -#: and to ask for permission when a program tries to read from the -#: clipboard. Note that disabling the read confirmation is a security -#: risk as it means that any program, even the ones running on a -#: remote server via SSH can read your clipboard. See also -#: clipboard_max_size. - -# clipboard_max_size 64 - -#: The maximum size (in MB) of data from programs running in kitty -#: that will be stored for writing to the system clipboard. A value of -#: zero means no size limit is applied. See also clipboard_control. - -# file_transfer_confirmation_bypass - -#: The password that can be supplied to the file transfer kitten -#: to skip the -#: transfer confirmation prompt. This should only be used when -#: initiating transfers from trusted computers, over trusted networks -#: or encrypted transports, as it allows any programs running on the -#: remote machine to read/write to the local filesystem, without -#: permission. - -# allow_hyperlinks yes - -#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 -#: escape sequences are ignored. Otherwise they become clickable -#: links, that you can click with the mouse or by using the hints -#: kitten . The -#: special value of ask means that kitty will ask before opening the -#: link when clicked. - -# shell_integration enabled - -#: Enable shell integration on supported shells. This enables features -#: such as jumping to previous prompts, browsing the output of the -#: previous command in a pager, etc. on supported shells. Set to -#: disabled to turn off shell integration, completely. It is also -#: possible to disable individual features, set to a space separated -#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- -#: prompt-mark, no-complete. See Shell integration -#: for details. - -# allow_cloning ask - -#: Control whether programs running in the terminal can request new -#: windows to be created. The canonical example is clone-in-kitty -#: . -#: By default, kitty will ask for permission for each clone request. -#: Allowing cloning unconditionally gives programs running in the -#: terminal (including over SSH) permission to execute arbitrary code, -#: as the user who is running the terminal, on the computer that the -#: terminal is running on. - -# clone_source_strategies venv,conda,env_var,path - -#: Control what shell code is sourced when running clone-in-kitty in -#: the newly cloned window. The supported strategies are: - -#: venv -#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the -#: Python stdlib venv module and allows cloning venvs automatically. -#: conda -#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual -#: environments created by conda. -#: env_var -#: Execute the contents of the environment variable -#: KITTY_CLONE_SOURCE_CODE with eval. -#: path -#: Source the file pointed to by the environment variable -#: KITTY_CLONE_SOURCE_PATH. - -#: This option must be a comma separated list of the above values. -#: This only source the first valid one in the above order. - -term tmux-256color - -#: The value of the TERM environment variable to set. Changing this -#: can break many terminal programs, only change it if you know what -#: you are doing, not because you read some advice on "Stack Overflow" -#: to change it. The TERM variable is used by various programs to get -#: information about the capabilities and behavior of the terminal. If -#: you change it, depending on what programs you run, and how -#: different the terminal you are changing it to is, various things -#: from key-presses, to colors, to various advanced features may not -#: work. Changing this option by reloading the config will only affect -#: newly created windows. - -#: }}} - -#: OS specific tweaks {{{ - -# wayland_titlebar_color system - -#: The color of the kitty window's titlebar on Wayland systems with -#: client side window decorations such as GNOME. A value of system -#: means to use the default system color, a value of background means -#: to use the background color of the currently active window and -#: finally you can use an arbitrary color, such as #12af59 or red. - -# macos_titlebar_color system - -#: The color of the kitty window's titlebar on macOS. A value of -#: system means to use the default system color, light or dark can -#: also be used to set it explicitly. A value of background means to -#: use the background color of the currently active window and finally -#: you can use an arbitrary color, such as #12af59 or red. WARNING: -#: This option works by using a hack when arbitrary color (or -#: background) is configured, as there is no proper Cocoa API for it. -#: It sets the background color of the entire window and makes the -#: titlebar transparent. As such it is incompatible with -#: background_opacity. If you want to use both, you are probably -#: better off just hiding the titlebar with hide_window_decorations. - -# macos_option_as_alt no - -#: Use the Option key as an Alt key on macOS. With this set to no, -#: kitty will use the macOS native Option+Key to enter Unicode -#: character behavior. This will break any Alt+Key keyboard shortcuts -#: in your terminal programs, but you can use the macOS Unicode input -#: technique. You can use the values: left, right or both to use only -#: the left, right or both Option keys as Alt, instead. Note that -#: kitty itself always treats Option the same as Alt. This means you -#: cannot use this option to configure different kitty shortcuts for -#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using -#: Option/Alt+Key will take priority, so that any such key presses -#: will not be passed to terminal programs running inside kitty. -#: Changing this option by reloading the config is not supported. - -# macos_hide_from_tasks no - -#: Hide the kitty window from running tasks on macOS (⌘+Tab and the -#: Dock). Changing this option by reloading the config is not -#: supported. - -# macos_quit_when_last_window_closed no - -#: Have kitty quit when all the top-level windows are closed on macOS. -#: By default, kitty will stay running, even with no open windows, as -#: is the expected behavior on macOS. - -# macos_window_resizable yes - -#: Disable this if you want kitty top-level OS windows to not be -#: resizable on macOS. Changing this option by reloading the config -#: will only affect newly created OS windows. - -# macos_thicken_font 0 - -#: Draw an extra border around the font with the given width, to -#: increase legibility at small font sizes on macOS. For example, a -#: value of 0.75 will result in rendering that looks similar to sub- -#: pixel antialiasing at common font sizes. - -# macos_traditional_fullscreen no - -#: Use the macOS traditional full-screen transition, that is faster, -#: but less pretty. - -# macos_show_window_title_in all - -#: Control where the window title is displayed on macOS. A value of -#: window will show the title of the currently active window at the -#: top of the macOS window. A value of menubar will show the title of -#: the currently active window in the macOS global menu bar, making -#: use of otherwise wasted space. A value of all will show the title -#: in both places, and none hides the title. See -#: macos_menubar_title_max_length for how to control the length of the -#: title in the menu bar. - -# macos_menubar_title_max_length 0 - -#: The maximum number of characters from the window title to show in -#: the macOS global menu bar. Values less than one means that there is -#: no maximum limit. - -# macos_custom_beam_cursor no - -#: Use a custom mouse cursor for macOS that is easier to see on both -#: light and dark backgrounds. Nowadays, the default macOS cursor -#: already comes with a white border. WARNING: this might make your -#: mouse cursor invisible on dual GPU machines. Changing this option -#: by reloading the config is not supported. - -# macos_colorspace srgb - -#: The colorspace in which to interpret terminal colors. The default -#: of srgb will cause colors to match those seen in web browsers. The -#: value of default will use whatever the native colorspace of the -#: display is. The value of displayp3 will use Apple's special -#: snowflake display P3 color space, which will result in over -#: saturated (brighter) colors with some color shift. Reloading -#: configuration will change this value only for newly created OS -#: windows. - -# linux_display_server auto - -#: Choose between Wayland and X11 backends. By default, an appropriate -#: backend based on the system state is chosen automatically. Set it -#: to x11 or wayland to force the choice. Changing this option by -#: reloading the config is not supported. - -#: }}} - -#: Keyboard shortcuts {{{ - -#: Keys are identified simply by their lowercase Unicode characters. -#: For example: a for the A key, [ for the left square bracket key, -#: etc. For functional keys, such as Enter or Escape, the names are -#: present at Functional key definitions -#: . For modifier keys, the names are ctrl (control, ⌃), -#: shift (⇧), alt (opt, option, ⌥), super (cmd, command, ⌘). See also: -#: GLFW mods - -#: On Linux you can also use XKB key names to bind keys that are not -#: supported by GLFW. See XKB keys -#: for a list of key names. The name to use is the part -#: after the XKB_KEY_ prefix. Note that you can only use an XKB key -#: name for keys that are not known as GLFW keys. - -#: Finally, you can use raw system key codes to map keys, again only -#: for keys that are not known as GLFW keys. To see the system key -#: code for a key, start kitty with the kitty --debug-input option, -#: kitty will output some debug text for every key event. In that text -#: look for native_code, the value of that becomes the key name in the -#: shortcut. For example: - -#: .. code-block:: none - -#: on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a' - -#: Here, the key name for the A key is 0x61 and you can use it with:: - -#: map ctrl+0x61 something - -#: to map Ctrl+A to something. - -#: You can use the special action no_op to unmap a keyboard shortcut -#: that is assigned in the default configuration:: - -#: map kitty_mod+space no_op - -#: If you would like kitty to completely ignore a key event, not even -#: sending it to the program running in the terminal, map it to -#: discard_event:: - -#: map kitty_mod+f1 discard_event - -#: You can combine multiple actions to be triggered by a single -#: shortcut with combine action, using the syntax below:: - -#: map key combine action1 action2 action3 ... - -#: For example:: - -#: map kitty_mod+e combine : new_window : next_layout - -#: This will create a new window and switch to the next available -#: layout. - -#: You can use multi-key shortcuts with the syntax shown below:: - -#: map key1>key2>key3 action - -#: For example:: - -#: map ctrl+f>2 set_font_size 20 - -#: The full list of actions that can be mapped to key presses is -#: available here . - -# kitty_mod ctrl+shift - -#: Special modifier key alias for default shortcuts. You can change -#: the value of this option to alter all default shortcuts that use -#: kitty_mod. - -# clear_all_shortcuts no - -#: Remove all shortcut definitions up to this point. Useful, for -#: instance, to remove the default shortcuts. - -# action_alias - -#: E.g. action_alias launch_tab launch --type=tab --cwd=current - -#: Define action aliases to avoid repeating the same options in -#: multiple mappings. Aliases can be defined for any action and will -#: be expanded recursively. For example, the above alias allows you to -#: create mappings to launch a new tab in the current working -#: directory without duplication:: - -#: map f1 launch_tab vim -#: map f2 launch_tab emacs - -#: Similarly, to alias kitten invocation:: - -#: action_alias hints kitten hints --hints-offset=0 - -# kitten_alias - -#: E.g. kitten_alias hints hints --hints-offset=0 - -#: Like action_alias above, but specifically for kittens. Generally, -#: prefer to use action_alias. This option is a legacy version, -#: present for backwards compatibility. It causes all invocations of -#: the aliased kitten to be substituted. So the example above will -#: cause all invocations of the hints kitten to have the --hints- -#: offset=0 option applied. - -#: Clipboard {{{ - -#: Copy to clipboard - -# map kitty_mod+c copy_to_clipboard -# map cmd+c copy_to_clipboard - -#:: There is also a copy_or_interrupt action that can be optionally -#:: mapped to Ctrl+C. It will copy only if there is a selection and -#:: send an interrupt otherwise. Similarly, -#:: copy_and_clear_or_interrupt will copy and clear the selection or -#:: send an interrupt if there is no selection. - -#: Paste from clipboard - -# map kitty_mod+v paste_from_clipboard -# map cmd+v paste_from_clipboard - -#: Paste from selection - -# map kitty_mod+s paste_from_selection -# map shift+insert paste_from_selection - -#: Pass selection to program - -# map kitty_mod+o pass_selection_to_program - -#:: You can also pass the contents of the current selection to any -#:: program with pass_selection_to_program. By default, the system's -#:: open program is used, but you can specify your own, the selection -#:: will be passed as a command line argument to the program. For -#:: example:: - -#:: map kitty_mod+o pass_selection_to_program firefox - -#:: You can pass the current selection to a terminal program running -#:: in a new kitty window, by using the @selection placeholder:: - -#:: map kitty_mod+y new_window less @selection - -#: }}} - -#: Scrolling {{{ - -#: Scroll line up - -# map kitty_mod+up scroll_line_up -# map kitty_mod+k scroll_line_up -# map opt+cmd+page_up scroll_line_up -# map cmd+up scroll_line_up - -#: Scroll line down - -# map kitty_mod+down scroll_line_down -# map kitty_mod+j scroll_line_down -# map opt+cmd+page_down scroll_line_down -# map cmd+down scroll_line_down - -#: Scroll page up - -# map kitty_mod+page_up scroll_page_up -# map cmd+page_up scroll_page_up - -#: Scroll page down - -# map kitty_mod+page_down scroll_page_down -# map cmd+page_down scroll_page_down - -#: Scroll to top - -# map kitty_mod+home scroll_home -# map cmd+home scroll_home - -#: Scroll to bottom - -# map kitty_mod+end scroll_end -# map cmd+end scroll_end - -#: Scroll to previous shell prompt - -# map kitty_mod+z scroll_to_prompt -1 - -#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last -#:: jumped to or the last clicked position. Requires shell -#:: integration -#:: to work. - -#: Scroll to next shell prompt - -# map kitty_mod+x scroll_to_prompt 1 - -#: Browse scrollback buffer in pager - -# map kitty_mod+h show_scrollback - -#:: You can pipe the contents of the current screen and history -#:: buffer as STDIN to an arbitrary program using launch --stdin- -#:: source. For example, the following opens the scrollback buffer in -#:: less in an overlay window:: - -#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R - -#:: For more details on piping screen and buffer contents to external -#:: programs, see launch . - -#: Browse output of the last shell command in pager - -# map kitty_mod+g show_last_command_output - -#:: You can also define additional shortcuts to get the command -#:: output. For example, to get the first command output on screen:: - -#:: map f1 show_first_command_output_on_screen - -#:: To get the command output that was last accessed by a keyboard -#:: action or mouse action:: - -#:: map f1 show_last_visited_command_output - -#:: You can pipe the output of the last command run in the shell -#:: using the launch action. For example, the following opens the -#:: output in less in an overlay window:: - -#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R - -#:: To get the output of the first command on the screen, use -#:: @first_cmd_output_on_screen. To get the output of the last jumped -#:: to command, use @last_visited_cmd_output. - -#:: Requires shell integration -#:: to work. - -#: }}} - -#: Window management {{{ - -#: New window - -# map kitty_mod+enter new_window -# map cmd+enter new_window - -#:: You can open a new kitty window running an arbitrary program, for -#:: example:: - -#:: map kitty_mod+y launch mutt - -#:: You can open a new window with the current working directory set -#:: to the working directory of the current window using:: - -#:: map ctrl+alt+enter launch --cwd=current - -#:: You can open a new window that is allowed to control kitty via -#:: the kitty remote control facility with launch --allow-remote- -#:: control. Any programs running in that window will be allowed to -#:: control kitty. For example:: - -#:: map ctrl+enter launch --allow-remote-control some_program - -#:: You can open a new window next to the currently active window or -#:: as the first window, with:: - -#:: map ctrl+n launch --location=neighbor -#:: map ctrl+f launch --location=first - -#:: For more details, see launch -#:: . - -#: New OS window - -# map kitty_mod+n new_os_window -# map cmd+n new_os_window - -#:: Works like new_window above, except that it opens a top-level OS -#:: window. In particular you can use new_os_window_with_cwd to open -#:: a window with the current working directory. - -#: Close window - -# map kitty_mod+w close_window -# map shift+cmd+d close_window - -#: Next window - -# map kitty_mod+] next_window - -#: Previous window - -# map kitty_mod+[ previous_window - -#: Move window forward - -# map kitty_mod+f move_window_forward - -#: Move window backward - -# map kitty_mod+b move_window_backward - -#: Move window to top - -# map kitty_mod+` move_window_to_top - -#: Start resizing window - -# map kitty_mod+r start_resizing_window -# map cmd+r start_resizing_window - -#: First window - -# map kitty_mod+1 first_window -# map cmd+1 first_window - -#: Second window - -# map kitty_mod+2 second_window -# map cmd+2 second_window - -#: Third window - -# map kitty_mod+3 third_window -# map cmd+3 third_window - -#: Fourth window - -# map kitty_mod+4 fourth_window -# map cmd+4 fourth_window - -#: Fifth window - -# map kitty_mod+5 fifth_window -# map cmd+5 fifth_window - -#: Sixth window - -# map kitty_mod+6 sixth_window -# map cmd+6 sixth_window - -#: Seventh window - -# map kitty_mod+7 seventh_window -# map cmd+7 seventh_window - -#: Eight window - -# map kitty_mod+8 eighth_window -# map cmd+8 eighth_window - -#: Ninth window - -# map kitty_mod+9 ninth_window -# map cmd+9 ninth_window - -#: Tenth window - -# map kitty_mod+0 tenth_window - -#: Visually select and focus window - -# map kitty_mod+f7 focus_visible_window - -#:: Display overlay numbers and alphabets on the window, and switch -#:: the focus to the window when you press the key. When there are -#:: only two windows, the focus will be switched directly without -#:: displaying the overlay. You can change the overlay characters and -#:: their order with option visual_window_select_characters. - -#: Visually swap window with another - -# map kitty_mod+f8 swap_with_window - -#:: Works like focus_visible_window above, but swaps the window. - -#: }}} - -#: Tab management {{{ - -#: Next tab - -# map kitty_mod+right next_tab -# map shift+cmd+] next_tab -# map ctrl+tab next_tab - -#: Previous tab - -# map kitty_mod+left previous_tab -# map shift+cmd+[ previous_tab -# map ctrl+shift+tab previous_tab - -#: New tab - -# map kitty_mod+t new_tab -# map cmd+t new_tab - -#: Close tab - -# map kitty_mod+q close_tab -# map cmd+w close_tab - -#: Close OS window - -# map shift+cmd+w close_os_window - -#: Move tab forward - -# map kitty_mod+. move_tab_forward - -#: Move tab backward - -# map kitty_mod+, move_tab_backward - -#: Set tab title - -# map kitty_mod+alt+t set_tab_title -# map shift+cmd+i set_tab_title - - -#: You can also create shortcuts to go to specific tabs, with 1 being -#: the first tab, 2 the second tab and -1 being the previously active -#: tab, and any number larger than the last tab being the last tab:: - -#: map ctrl+alt+1 goto_tab 1 -#: map ctrl+alt+2 goto_tab 2 - -#: Just as with new_window above, you can also pass the name of -#: arbitrary commands to run when using new_tab and new_tab_with_cwd. -#: Finally, if you want the new tab to open next to the current tab -#: rather than at the end of the tabs list, use:: - -map ctrl+t no_op -#: }}} - -#: Layout management {{{ - -#: Next layout - -# map kitty_mod+l next_layout - - -#: You can also create shortcuts to switch to specific layouts:: - -#: map ctrl+alt+t goto_layout tall -#: map ctrl+alt+s goto_layout stack - -#: Similarly, to switch back to the previous layout:: - -#: map ctrl+alt+p last_used_layout - -#: There is also a toggle_layout action that switches to the named -#: layout or back to the previous layout if in the named layout. -#: Useful to temporarily "zoom" the active window by switching to the -#: stack layout:: - -#: map ctrl+alt+z toggle_layout stack -#: }}} - -#: Font sizes {{{ - -#: You can change the font size for all top-level kitty OS windows at -#: a time or only the current one. - -#: Increase font size - -# map kitty_mod+equal change_font_size all +2.0 -# map kitty_mod+plus change_font_size all +2.0 -# map kitty_mod+kp_add change_font_size all +2.0 -# map cmd+plus change_font_size all +2.0 -# map cmd+equal change_font_size all +2.0 -# map shift+cmd+equal change_font_size all +2.0 - -#: Decrease font size - -# map kitty_mod+minus change_font_size all -2.0 -# map kitty_mod+kp_subtract change_font_size all -2.0 -# map cmd+minus change_font_size all -2.0 -# map shift+cmd+minus change_font_size all -2.0 - -#: Reset font size - -# map kitty_mod+backspace change_font_size all 0 -# map cmd+0 change_font_size all 0 - - -#: To setup shortcuts for specific font sizes:: - -#: map kitty_mod+f6 change_font_size all 10.0 - -#: To setup shortcuts to change only the current OS window's font -#: size:: - -#: map kitty_mod+f6 change_font_size current 10.0 -#: }}} - -#: Select and act on visible text {{{ - -#: Use the hints kitten to select text and either pass it to an -#: external program or insert it into the terminal or copy it to the -#: clipboard. - -#: Open URL - -# map kitty_mod+e open_url_with_hints - -#:: Open a currently visible URL using the keyboard. The program used -#:: to open the URL is specified in open_url_with. - -#: Insert selected path - -# map kitty_mod+p>f kitten hints --type path --program - - -#:: Select a path/filename and insert it into the terminal. Useful, -#:: for instance to run git commands on a filename output from a -#:: previous git command. - -#: Open selected path - -# map kitty_mod+p>shift+f kitten hints --type path - -#:: Select a path/filename and open it with the default open program. - -#: Insert selected line - -# map kitty_mod+p>l kitten hints --type line --program - - -#:: Select a line of text and insert it into the terminal. Useful for -#:: the output of things like: `ls -1`. - -#: Insert selected word - -# map kitty_mod+p>w kitten hints --type word --program - - -#:: Select words and insert into terminal. - -#: Insert selected hash - -# map kitty_mod+p>h kitten hints --type hash --program - - -#:: Select something that looks like a hash and insert it into the -#:: terminal. Useful with git, which uses SHA1 hashes to identify -#:: commits. - -#: Open the selected file at the selected line - -# map kitty_mod+p>n kitten hints --type linenum - -#:: Select something that looks like filename:linenum and open it in -#:: vim at the specified line number. - -#: Open the selected hyperlink - -# map kitty_mod+p>y kitten hints --type hyperlink - -#:: Select a hyperlink (i.e. a URL that has been marked as such by -#:: the terminal program, for example, by `ls --hyperlink=auto`). - - -#: The hints kitten has many more modes of operation that you can map -#: to different shortcuts. For a full description see hints kitten -#: . -#: }}} - -#: Miscellaneous {{{ - -#: Toggle fullscreen - -# map kitty_mod+f11 toggle_fullscreen -# map ctrl+cmd+f toggle_fullscreen - -#: Toggle maximized - -# map kitty_mod+f10 toggle_maximized - -#: Toggle macOS secure keyboard entry - -# map opt+cmd+s toggle_macos_secure_keyboard_entry - -#: Unicode input - -# map kitty_mod+u kitten unicode_input -# map ctrl+cmd+space kitten unicode_input - -#: Edit config file - -# map kitty_mod+f2 edit_config_file -# map cmd+, edit_config_file - -#: Open the kitty command shell - -# map kitty_mod+escape kitty_shell window - -#:: Open the kitty shell in a new window / tab / overlay / os_window -#:: to control kitty using commands. - -#: Increase background opacity - -# map kitty_mod+a>m set_background_opacity +0.1 - -#: Decrease background opacity - -# map kitty_mod+a>l set_background_opacity -0.1 - -#: Make background fully opaque - -# map kitty_mod+a>1 set_background_opacity 1 - -#: Reset background opacity - -# map kitty_mod+a>d set_background_opacity default - -#: Reset the terminal - -# map kitty_mod+delete clear_terminal reset active -# map opt+cmd+r clear_terminal reset active - -#:: You can create shortcuts to clear/reset the terminal. For -#:: example:: - -#:: # Reset the terminal -#:: map f1 clear_terminal reset active -#:: # Clear the terminal screen by erasing all contents -#:: map f1 clear_terminal clear active -#:: # Clear the terminal scrollback by erasing it -#:: map f1 clear_terminal scrollback active -#:: # Scroll the contents of the screen into the scrollback -#:: map f1 clear_terminal scroll active -#:: # Clear everything up to the line with the cursor -#:: map f1 clear_terminal to_cursor active - -#:: If you want to operate on all kitty windows instead of just the -#:: current one, use all instead of active. - -#:: It is also possible to remap Ctrl+L to both scroll the current -#:: screen contents into the scrollback buffer and clear the screen, -#:: instead of just clearing the screen, for example, for ZSH add the -#:: following to ~/.zshrc: - -#:: .. code-block:: zsh - -#:: scroll-and-clear-screen() { -#:: printf '\n%.0s' {1..$LINES} -#:: zle clear-screen -#:: } -#:: zle -N scroll-and-clear-screen -#:: bindkey '^l' scroll-and-clear-screen - -#: Clear up to cursor line - -# map cmd+k clear_terminal to_cursor active - -#: Reload kitty.conf - -# map kitty_mod+f5 load_config_file -# map ctrl+cmd+, load_config_file - -#:: Reload kitty.conf, applying any changes since the last time it -#:: was loaded. Note that a handful of options cannot be dynamically -#:: changed and require a full restart of kitty. Particularly, when -#:: changing shortcuts for actions located on the macOS global menu -#:: bar, a full restart is needed. You can also map a keybinding to -#:: load a different config file, for example:: - -#:: map f5 load_config /path/to/alternative/kitty.conf - -#:: Note that all options from the original kitty.conf are discarded, -#:: in other words the new configuration *replace* the old ones. - -#: Debug kitty configuration - -# map kitty_mod+f6 debug_config -# map opt+cmd+, debug_config - -#:: Show details about exactly what configuration kitty is running -#:: with and its host environment. Useful for debugging issues. - -#: Send arbitrary text on key presses - -#:: E.g. map ctrl+shift+alt+h send_text all Hello World - -#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the -#:: client program when pressing specified shortcut keys. For -#:: example:: - -#:: map ctrl+alt+a send_text all Special text - -#:: This will send "Special text" when you press the Ctrl+Alt+A key -#:: combination. The text to be sent is a python string literal so -#:: you can use escapes like \x1b to send control codes or \u21fb to -#:: send Unicode characters (or you can just input the Unicode -#:: characters directly as UTF-8 text). You can use `kitty +kitten -#:: show_key` to get the key escape codes you want to emulate. - -#:: The first argument to send_text is the keyboard modes in which to -#:: activate the shortcut. The possible values are normal, -#:: application, kitty or a comma separated combination of them. The -#:: modes normal and application refer to the DECCKM cursor key mode -#:: for terminals, and kitty refers to the kitty extended keyboard -#:: protocol. The special value all means all of them. - -#:: Some more examples:: - -#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) -#:: map ctrl+alt+a send_text normal Word\x1b[H -#:: map ctrl+alt+a send_text application Word\x1bOH -#:: # Run a command at a shell prompt (like typing the command and pressing Enter) -#:: map ctrl+alt+a send_text normal,application some command with arguments\r - -#: Open kitty Website - -# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ - -#: }}} - -#: }}} diff --git a/.config/kitty/palenight.conf b/.config/kitty/palenight.conf deleted file mode 100644 index 6a58ece..0000000 --- a/.config/kitty/palenight.conf +++ /dev/null @@ -1,40 +0,0 @@ -# Palenight Colorscheme for Kitty -# Based on https://github.com/sindresorhus/hyper-snazzy - -foreground #959dcb -background #292d3e -selection_foreground #eceef0 -selection_background #607c8b -url_color #82aaff - -# black -color0 #434759 -color8 #434758 - -# red -color1 #f07178 -color9 #ff8b92 - -# green -color2 #c3e88d -color10 #ddffa7 - -# yellow -color3 #ffcb6b -color11 #ffe585 - -# blue -color4 #82aaff -color12 #9cc4ff - -# magenta -color5 #c792ea -color13 #e1acff - -# cyan -color6 #89ddff -color14 #a3f7ff - -# white -color7 #d0d0d0 -color15 #fefefe diff --git a/.config/nvim b/.config/nvim new file mode 160000 index 0000000..cbda50b --- /dev/null +++ b/.config/nvim @@ -0,0 +1 @@ +Subproject commit cbda50b94febcf5e59f6bf2da5fd82671ff03050 diff --git a/.config/nvim/Backup/init.vim.backup b/.config/nvim.backup/Backup/init.vim.backup similarity index 100% rename from .config/nvim/Backup/init.vim.backup rename to .config/nvim.backup/Backup/init.vim.backup diff --git a/.config/nvim/autocommands.vim b/.config/nvim.backup/autocommands.vim similarity index 100% rename from .config/nvim/autocommands.vim rename to .config/nvim.backup/autocommands.vim diff --git a/.config/nvim/autoload/plug.vim b/.config/nvim.backup/autoload/plug.vim similarity index 100% rename from .config/nvim/autoload/plug.vim rename to .config/nvim.backup/autoload/plug.vim diff --git a/.config/nvim/autoload/plug.vim.old b/.config/nvim.backup/autoload/plug.vim.old similarity index 100% rename from .config/nvim/autoload/plug.vim.old rename to .config/nvim.backup/autoload/plug.vim.old diff --git a/.config/nvim/config.lua b/.config/nvim.backup/config.lua similarity index 100% rename from .config/nvim/config.lua rename to .config/nvim.backup/config.lua diff --git a/.config/nvim/curl b/.config/nvim.backup/curl similarity index 100% rename from .config/nvim/curl rename to .config/nvim.backup/curl diff --git a/.config/nvim/diff b/.config/nvim.backup/diff similarity index 100% rename from .config/nvim/diff rename to .config/nvim.backup/diff diff --git a/.config/nvim/init.vim.backup b/.config/nvim.backup/init.vim similarity index 71% rename from .config/nvim/init.vim.backup rename to .config/nvim.backup/init.vim index 6d25fda..f4058ca 100644 --- a/.config/nvim/init.vim.backup +++ b/.config/nvim.backup/init.vim @@ -1,23 +1,24 @@ +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif call plug#begin('~/.config/nvim/plugged/') Plug 'andymass/vim-matchup' Plug 'chrisbra/csv.vim' +Plug 'dracula/vim' " Plug 'dag/vim-fish' -Plug 'drewtempelmeyer/palenight.vim' Plug 'elzr/vim-json' Plug 'fs111/pydoc.vim' Plug 'jeffkreeftmeijer/vim-numbertoggle' Plug 'jiangmiao/auto-pairs' -Plug 'jpalardy/vim-slime' -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' -Plug 'khaveesh/vim-fish-syntax' +" Plug 'jpalardy/vim-slime' Plug 'Konfekt/FastFold' -Plug 'lervag/vimtex' "" Why won't this work? " Plug 'lukas-reineke/indent-blankline.nvim' Plug 'mpjuers/showcontext' -Plug 'neovim/nvim-lspconfig' Plug 'nathanaelkane/vim-indent-guides' +Plug 'pangloss/vim-javascript' "" To set up later " Plug 'spinks/vim-leader-guide' " Pragmatic folding for .py @@ -26,47 +27,23 @@ Plug 'tpope/vim-commentary' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-surround' Plug 'Vimjas/vim-python-pep8-indent' -Plug 'vim-pandoc/vim-pandoc-syntax' Plug 'wesQ3/vim-windowswap' -Plug 'w0rp/ale' -" main one -Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} -" 9000+ Snippets -Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'} - -" lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty -" Need to **configure separately** - -Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'} -" - shell repl -" - nvim lua api -" - scientific calculator -" - comment banner -" - etc call plug#end() -" if &shell =~# 'fish$' -" set shell=sh -" endif - -let g:coq_settings = { 'auto_start': 'shut-up' } -let g:coq_settings = { 'keymap.eval_snips': 'ss' } -source /Users/nekoj/Dotfiles/.config/nvim/lspsetup.lua +" let g:slime_target="neovim" +" xmap SlimeRegionSend +" nmap SlimeParagraphSend -let g:slime_target="neovim" -xmap SlimeRegionSend -nmap SlimeParagraphSend +" let g:slime_target="neovim" +" xmap SlimeRegionSend +" nmap SlimeParagraphSend -let g:slime_target="neovim" -xmap SlimeRegionSend -nmap SlimeParagraphSend - -" Enable true color 启用终端24位色 -if exists('+termguicolors') - let &t_8f = "\[38;2;%lu;%lu;%lum" - let &t_8b = "\[48;2;%lu;%lu;%lum" - set termguicolors -endif +" " Enable true color 启用终端24位色 +" if exists('+termguicolors') +" let &t_8f = "\[38;2;%lu;%lu;%lum" +" let &t_8b = "\[48;2;%lu;%lu;%lum" +" set termguicolors +" endif " remap Omni completion inoremap xx @@ -128,14 +105,6 @@ function! PythonAddTags(module) endfunction command! -nargs=1 Addtags call PythonAddTags() -" latex to docx -map :w !pandoc -o %.docx - -" " for completion menu -" inoremap pumvisible() ? "\" : "\u" -" inoremap pumvisible() ? '' : -" \ '=pumvisible() ? "\Down>" : ""' - nnoremap lc :call ShowContext_toggle() " Switch black on and off. @@ -160,7 +129,7 @@ noremap bl :call Toggle_black_running() fu! InlineRead(command) let colnum = col('.') let line = getline('.') - call setline('.', strpart(line, 0, colnum) . system(a:command) . strpart(line, colnum)) + call setline('.', strpart(line, 0, colnum) . substitute(system(a:command)[:-2], '\n', '; ', 'g') . strpart(line, colnum)) endfu command! -nargs=1 IRead call InlineRead() @@ -168,10 +137,10 @@ let g:pandoc#keyboard#use_default_mappings = 0 " Switching windows " In terminal -tnoremap hh h -tnoremap jj j -tnoremap kk k -tnoremap ll l +" tnoremap hh h +" tnoremap jj j +" tnoremap kk k +" tnoremap ll l " In insert mode inoremap hh h inoremap jj j @@ -183,30 +152,12 @@ nnoremap jj j nnoremap kk k nnoremap ll l -" fzf mappings -" - down / up / left / right -let g:fzf_layout = { 'down': '40%' } -nnoremap :ProjectFiles -inoremap :ProjectFiles -nnoremap :Ag -nnoremap :Buffers -nnoremap :Marks -nnoremap :Windows -nnoremap :History: -nnoremap :Snippets -nnoremap :Commits -nnoremap :BCommits -nnoremap ph :Helptags -nnoremap :Tags - -" two-key find - if has('nvim') let $VISUAL = 'nvr -cc split --remote-wait' endif set autoread -set inccommand=nosplit +" set inccommand=nosplit " Tabs to spaces set expandtab set shiftwidth=4 @@ -245,8 +196,8 @@ set formatoptions-=c formatoptions-=r formatoptions-=o syntax on syntax enable set t_Co=256 -set background=dark -colorscheme palenight +" set background=dark +colorscheme dracula " highlighting cursorline style highlight! link Visual cursorline @@ -270,7 +221,7 @@ set conceallevel=0 set updatetime=400 -set shortmess+=F +" set shortmess+=F set sessionoptions-=folds @@ -315,22 +266,11 @@ augroup Snakemake au BufNewFile,BufRead *.snake set syntax=snakemake augroup END -" I need to figure out what problem this was trying to solve. -function! SetTags(file) - if filereadable(a:file) - let &tags = " " . a:file . ";" . $HOME - elseif filereadable("./tags") - let &tags = " ./tags" . ";" . $HOME - else - return 0 - endif -endfunction - -augroup Tags - autocmd! - autocmd VimEnter * call SetTags(trim(system("git rev-parse --show-toplevel")) . "/.tags") - autocmd DirChanged * call SetTags(trim(system("git rev-parse --show-toplevel")) . "/.tags") -augroup END +" augroup Tags +" autocmd! +" autocmd VimEnter * call SetTags(trim(system("git rev-parse --show-toplevel")) . "/.tags") +" autocmd DirChanged * call SetTags(trim(system("git rev-parse --show-toplevel")) . "/.tags") +" augroup END autocmd! BufRead "*.md" :set linewidth=80 autocmd! BufWritePre "*.md" :execute "normal! mygggqG'y" @@ -399,16 +339,3 @@ if (has("nvim")) "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > let $NVIM_TUI_ENABLE_TRUE_COLOR=1 endif - -" 🐓 Coq completion settings - -" Set recommended to false -let g:coq_settings = { "keymap.recommended": v:false } - -" Keybindings -ino pumvisible() ? "\" : "\" -ino pumvisible() ? "\" : "\" -ino pumvisible() ? "\" : "\" -ino pumvisible() ? (complete_info().selected == -1 ? "\" : "\") : "\" -ino pumvisible() ? "\" : "\" -ino pumvisible() ? "\" : "\" diff --git a/.config/nvim/lspsetup.lua b/.config/nvim.backup/lspsetup.lua similarity index 100% rename from .config/nvim/lspsetup.lua rename to .config/nvim.backup/lspsetup.lua diff --git a/.config/nvim/mappings.vim b/.config/nvim.backup/mappings.vim similarity index 100% rename from .config/nvim/mappings.vim rename to .config/nvim.backup/mappings.vim diff --git a/.config/nvim/oldSetup.vim b/.config/nvim.backup/oldSetup.vim similarity index 100% rename from .config/nvim/oldSetup.vim rename to .config/nvim.backup/oldSetup.vim diff --git a/.config/nvim/optionsAndVariables.vim b/.config/nvim.backup/optionsAndVariables.vim similarity index 100% rename from .config/nvim/optionsAndVariables.vim rename to .config/nvim.backup/optionsAndVariables.vim diff --git a/.config/nvim.backup/plugged/FastFold b/.config/nvim.backup/plugged/FastFold new file mode 160000 index 0000000..ab3d199 --- /dev/null +++ b/.config/nvim.backup/plugged/FastFold @@ -0,0 +1 @@ +Subproject commit ab3d199d288a51708c3181a25aba1f9de2050b89 diff --git a/.config/nvim/plugged-backup/SimpylFold b/.config/nvim.backup/plugged/SimpylFold similarity index 100% rename from .config/nvim/plugged-backup/SimpylFold rename to .config/nvim.backup/plugged/SimpylFold diff --git a/.config/nvim/plugged-backup/auto-pairs b/.config/nvim.backup/plugged/auto-pairs similarity index 100% rename from .config/nvim/plugged-backup/auto-pairs rename to .config/nvim.backup/plugged/auto-pairs diff --git a/.config/nvim.backup/plugged/csv.vim b/.config/nvim.backup/plugged/csv.vim new file mode 160000 index 0000000..962f887 --- /dev/null +++ b/.config/nvim.backup/plugged/csv.vim @@ -0,0 +1 @@ +Subproject commit 962f88787ec6873eba1c7dbbd81d2723f1ee3c4b diff --git a/.config/nvim/plugged-backup/pydoc.vim b/.config/nvim.backup/plugged/pydoc.vim similarity index 100% rename from .config/nvim/plugged-backup/pydoc.vim rename to .config/nvim.backup/plugged/pydoc.vim diff --git a/.config/nvim/plugged-backup/showcontext b/.config/nvim.backup/plugged/showcontext similarity index 100% rename from .config/nvim/plugged-backup/showcontext rename to .config/nvim.backup/plugged/showcontext diff --git a/.config/nvim.backup/plugged/vim b/.config/nvim.backup/plugged/vim new file mode 160000 index 0000000..9fa8929 --- /dev/null +++ b/.config/nvim.backup/plugged/vim @@ -0,0 +1 @@ +Subproject commit 9fa89296884e47bbadc49ad959e37b9d1c24cafb diff --git a/.config/nvim.backup/plugged/vim-commentary b/.config/nvim.backup/plugged/vim-commentary new file mode 160000 index 0000000..f67e3e6 --- /dev/null +++ b/.config/nvim.backup/plugged/vim-commentary @@ -0,0 +1 @@ +Subproject commit f67e3e67ea516755005e6cccb178bc8439c6d402 diff --git a/.config/nvim.backup/plugged/vim-fugitive b/.config/nvim.backup/plugged/vim-fugitive new file mode 160000 index 0000000..193ba9b --- /dev/null +++ b/.config/nvim.backup/plugged/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 193ba9b393931bad768c1d2eed688b0bcc240858 diff --git a/.config/nvim.backup/plugged/vim-indent-guides b/.config/nvim.backup/plugged/vim-indent-guides new file mode 160000 index 0000000..a1e1390 --- /dev/null +++ b/.config/nvim.backup/plugged/vim-indent-guides @@ -0,0 +1 @@ +Subproject commit a1e1390c0136e63e813d051de2003bf0ee18ae30 diff --git a/.config/nvim.backup/plugged/vim-javascript b/.config/nvim.backup/plugged/vim-javascript new file mode 160000 index 0000000..c470ce1 --- /dev/null +++ b/.config/nvim.backup/plugged/vim-javascript @@ -0,0 +1 @@ +Subproject commit c470ce1399a544fe587eab950f571c83cccfbbdc diff --git a/.config/nvim/plugged-backup/vim-json b/.config/nvim.backup/plugged/vim-json similarity index 100% rename from .config/nvim/plugged-backup/vim-json rename to .config/nvim.backup/plugged/vim-json diff --git a/.config/nvim.backup/plugged/vim-matchup b/.config/nvim.backup/plugged/vim-matchup new file mode 160000 index 0000000..2d660e4 --- /dev/null +++ b/.config/nvim.backup/plugged/vim-matchup @@ -0,0 +1 @@ +Subproject commit 2d660e4aa7c566014c667af2cda0458043527902 diff --git a/.config/nvim/plugged-backup/vim-numbertoggle b/.config/nvim.backup/plugged/vim-numbertoggle similarity index 100% rename from .config/nvim/plugged-backup/vim-numbertoggle rename to .config/nvim.backup/plugged/vim-numbertoggle diff --git a/.config/nvim/plugged-backup/vim-python-pep8-indent b/.config/nvim.backup/plugged/vim-python-pep8-indent similarity index 100% rename from .config/nvim/plugged-backup/vim-python-pep8-indent rename to .config/nvim.backup/plugged/vim-python-pep8-indent diff --git a/.config/nvim.backup/plugged/vim-surround b/.config/nvim.backup/plugged/vim-surround new file mode 160000 index 0000000..3d188ed --- /dev/null +++ b/.config/nvim.backup/plugged/vim-surround @@ -0,0 +1 @@ +Subproject commit 3d188ed2113431cf8dac77be61b842acb64433d9 diff --git a/.config/nvim/plugged-backup/vim-windowswap b/.config/nvim.backup/plugged/vim-windowswap similarity index 100% rename from .config/nvim/plugged-backup/vim-windowswap rename to .config/nvim.backup/plugged/vim-windowswap diff --git a/.config/nvim/pluginOptions.vim b/.config/nvim.backup/pluginOptions.vim similarity index 100% rename from .config/nvim/pluginOptions.vim rename to .config/nvim.backup/pluginOptions.vim diff --git a/.config/nvim/startup.txt b/.config/nvim.backup/startup.txt similarity index 100% rename from .config/nvim/startup.txt rename to .config/nvim.backup/startup.txt diff --git a/.config/nvim/syntax/snakemake.vim b/.config/nvim.backup/syntax/snakemake.vim similarity index 100% rename from .config/nvim/syntax/snakemake.vim rename to .config/nvim.backup/syntax/snakemake.vim diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index c61ada2..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,232 +0,0 @@ -require "paq" { - "andymass/vim-matchup"; - "chrisbra/csv.vim"; - "dag/vim-fish"; - "drewtempelmeyer/palenight.vim"; - "elzr/vim-json"; - "fs111/pydoc.vim"; - "jeffkreeftmeijer/vim-numbertoggle"; - "jpalardy/vim-slime"; - "junegunn/fzf"; - "junegunn/fzf.vim"; - "khaveesh/vim-fish-syntax"; - "Konfekt/FastFold"; - "lervag/vimtex"; - "mpjuers/showcontext"; - 'nathanaelkane/vim-indent-guides'; - "neovim/nvim-lspconfig"; - "tmhedberg/SimpylFold"; - "savq/paq-nvim"; "tpope/vim-commentary"; - "tpope/vim-fugitive"; - "tpope/vim-surround"; - "Vimjas/vim-python-pep8-indent"; - "vim-pandoc/vim-pandoc-syntax"; - "wesQ3/vim-windowswap"; - -- main one - {"ms-jpq/coq_nvim", branch="coq"}; - -- 9000+ Snippets - {"ms-jpq/coq.artifacts", branch="artifacts"}; - -- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty - -- Need to **configure separately** - {"ms-jpq/coq.thirdparty", branch="3p"}; - -- - shell repl - -- - nvim lua api - -- - scientific calculator - -- - comment banner - -- - etc -} - -local maps = { - {"i", "((", "()", {noremap=true}}, - {"i", "[[", "[]", {noremap=true}}, - {"i", "{{", "{}", {noremap=true}}, - {"i", "<<", "<>", {noremap=true}}, - {"i", "(((", "()O", {noremap=true}}, - {"i", "[[[", "[]O", {noremap=true}}, - {"i", "{{{", "{}O", {noremap=true}}, - {"i", " ", 'pumvisible() ? "\\" : "\\"', {noremap = true}}, - {"i", " ", 'pumvisible() ? "\\" : "\\"', {noremap = true}}, - {"i", " ", 'pumvisible() ? "\\" : "\\"', {noremap = true}}, - {"i", " ", 'pumvisible() ? (complete_info().selected == -1 ? "\\" : "\\") : "\\"', {noremap = true}}, - {"i", " ", 'pumvisible() ? "\\" : "\\"', {noremap = true}}, - {"i", " ", 'pumvisible() ? "\\" : "\\"', {noremap = true}}, - {"n", "", ":SlimeConfig b:terminal_job_id", {noremap = true}}, - {"x", "", "SlimeRegionSend }j", {noremap = true}}, - {"n", "", "SlimeParagraphSend }j", {noremap = true}}, - {"x", "", "SlimeRegionSend }j", {noremap = true}}, - {"n", "", "SlimeParagraphSend }j", {noremap = true}}, - {"", "", ":set hlsearch! hlsearch?", {noremap = true}}, - {"", "", ":set relativenumber!", {noremap = true, silent = true}}, - {"n", "j", "gj", {noremap = true}}, - {"n", "k", "gk", {noremap = true}}, - {"n", "gj", "j", {noremap = true}}, - {"n", "gk", "k", {noremap = true}}, - {"", "swh", ":topleft vnew", {noremap = true, silent = true}}, - {"", "swl", ":botright vnew", {noremap = true, silent = true}}, - {"", "swk", ":topleft new", {noremap = true, silent = true}}, - {"", "swj", ":botright new", {noremap = true, silent = true}}, - {"", "sh", ":leftabove vnew", {noremap = true, silent = true}}, - {"", "sl", ":rightbelow vnew", {noremap = true, silent = true}}, - {"", "sk", ":leftabove new", {noremap = true, silent = true}}, - {"", "sj", ":rightbelow new", {noremap = true, silent = true}}, - {"", "", ":w !detex | wc -w", {noremap = true, silent = true}}, - {"", "", ":buffers:buffer", {noremap = true, silent = true}}, - {"", "tj", ":belowright new | resize 15 | set wfh | term", {noremap = true, silent = true}}, - {"", "twj", ":botright new | resize 15 | set wfh | term", {noremap = true, silent = true}}, - {"", "twl", ":botright vnew | vertical resize 100 | set wfw | term", {noremap = true, silent = true}}, - {"n", "lc", ":call ShowContext_toggle()", {noremap = true}}, - {"n", "bl", ":! black -l 79 % > /dev/null", {noremap = true}}, - {"t", "hh", "h", {noremap = true}}, - {"t", "jj", "j", {noremap = true}}, - {"t", "kk", "k", {noremap = true}}, - {"t", "ll", "l", {noremap = true}}, - {"i", "hh", "h", {noremap = true}}, - {"i", "jj", "j", {noremap = true}}, - {"i", "kk", "k", {noremap = true}}, - {"i", "ll", "l", {noremap = true}}, - {"n", "hh", "h", {noremap = true}}, - {"n", "jj", "j", {noremap = true}}, - {"n", "kk", "k", {noremap = true}}, - {"n", "ll", "l", {noremap = true}} -} -for i, map in ipairs(maps) do vim.api.nvim_set_keymap(map[1], map[2], map[3], map[4]) end - --- status bar colors -local o = vim.o -local activestatus = "%#DiffAdd#" -local inactivestatus = "%#TermCursor# %n %#SpellCap# %<%F%m%r%h%w %#TermCursor#" -local venv = vim.api.nvim_eval([[ - substitute(system("bash -c 'venv=${VIRTUAL_ENV%/*} \\ - && echo ${venv##*/}'"), "\n", "", "g") -]]) -local gitdir = vim.api.nvim_eval([[system("bash -c 'git rev-parse --show-toplevel'")]]) -local path = vim.api.nvim_eval([[expand('%:p')]]) -local statusline = "" -statusline = statusline .. activestatus .. " %n " -- Buffer number -statusline = statusline .. activestatus .. " %{toupper(g:currentmode[mode()])} " -- The current mode -statusline = statusline .. "%#SpellCap# %<%{expand('%:~:.')}%m%r%h%w " -- File path, modified, readonly, helpfile, preview -statusline = statusline .. "%#TermCursorNC# %Y " -- FileType -statusline = statusline .. activestatus .. " %{FugitiveHead()} | "statusline = statusline .. activestatus .. venv -statusline = statusline .. " | %#SpellCap#" -o.statusline = statusline --- autocommand - -local vimrc = vim.api.nvim_create_augroup('vimrc', {clear = true}) -local snakemake = vim.api.nvim_create_augroup("snakemake", {clear = true}) -local status = vim.api.nvim_create_augroup("status", {clear = true}) -local autocmds = { - {"WinEnter", {pattern = "*", group = status, callback = function () vim.wo.statusline = statusline end}}, - {"WinLeave", {pattern = "*", group = status, callback = function () vim.wo.statusline = inactivestatus end}}, - {"FileType", { pattern = "make", group = vimrc, command = "setlocal noexpandtab"}}, - {"FileType", { pattern = "rmd", group = vimrc, command = "setlocal commentstring=#%s"}}, - {"FileType", { pattern = "cpp", group = vimrc, command = "setlocal commentstring=//%s"}}, - {"FileType", { pattern = "tex", group = vimrc, command = "setlocal spell spelllang=en_us"}}, - {"BufEnter", { pattern = "term://*", group = vimrc, command = "wincmd + | wincmd - | wincmd < | wincmd >"}}, - {"FileType", { pattern = "crontab", group = vimrc, command = "setlocal nobackup nowritebackup"}}, - {{"BufNewFile", "BufRead"}, { pattern = "Snakefile", group = snakemake, command = "set syntax=snakemake"}}, - {{"BufNewFile", "BufRead"}, { pattern = "*.snake", group = snakemake, command = "set syntax=snakemake"}}, - {"WinLeave", { pattern = "term://.*", group = marks, command = "mT"}}, -} -for i, cmd in ipairs(autocmds) do vim.api.nvim_create_autocmd(cmd[1], cmd[2]) end - -local set = vim.opt - --- colors -set.background = "dark" -vim.cmd("colorscheme palenight") - ---settings -vim.cmd([[ -let g:currentmode={ - \ 'n' : 'Normal', - \ 'no' : 'Normal·Operator Pending', - \ 'v' : 'Visual', - \ 'V' : 'V·Line', - \ '^V' : 'V·Block', - \ 's' : 'Select', - \ 'S' : 'S·Line', - \ '^S' : 'S·Block', - \ 'i' : 'Insert', - \ 'R' : 'Replace', - \ 'Rv' : 'V·Replace', - \ 'c' : 'Command', - \ 'cv' : 'Vim Ex', - \ 'ce' : 'Ex', - \ 'r' : 'Prompt', - \ 'rm' : 'More', - \ 'r?' : 'Confirm', - \ '!' : 'Shell', - \ 't' : 'Terminal' - \} -]]) - -vim.g.coq_settings = {auto_start = "shut-up", keymap = {eval_snips = "ss"}} -vim.g.slime_target = "neovim" -vim.g.slime_python_ipython = 1 --- vim.call("let $VIMHOME = expand(':p:h')") -vim.g.black_running = 0 -vim.g['pandoc#keyboard#use_default_mappings'] = 0 -vim.g.fzf_layout = {down = '40%'} -vim.g.r_syntax_folding = 1 -vim.g.tex_fold_enabled = 1 -vim.g.sh_fold_enabled = 5 -vim.g.loaded_matchit = 1 -vim.g.neoterm_autoscroll = 1 -vim.g.python3_host_prog = "/usr/local/bin/python3" -vim.g.indent_guides_enable_on_vim_startup = 1 -vim.g.pydoc_cmd = 'python -m pydoc' -vim.g.indent_guides_guide_size = 1 - -set.termguicolors = true --- set.background = "dark" -set.autoread = true -set.inccommand = "nosplit" -set.expandtab = true -set.shiftwidth = 4 -set.tabstop = 4 -set.foldmethod = "syntax" -set.wildmode = "longest,list" -set.wildmenu = false -set.breakindent = true -set.colorcolumn = "80" -set.cursorline = true -set.number = true -set.linebreak = true -set.ignorecase = true -set.smartcase = true -set.enc = "utf8" -set.ruler = false -set.sw = 4 -set.swapfile = false -set.mouse = "a" -set.ttimeoutlen = 10 -set.hlsearch = true -set.completeopt = "longest,menuone" -set.conceallevel = 0 -set.updatetime = 400 --- set.shortmess += F -set.laststatus = 2 -set.showmode = false -vim.cmd("set formatoptions-=c formatoptions-=r formatoptions-=o") -vim.cmd("set sessionoptions-=folds") - - - -vim.api.nvim_create_augroup("marks", {clear = True}) - --- local tags = vim.api.nvim_create_augroup("tags", {clear = true}) --- vim.api.nvim_create_autocmd("VimEnter",{ --- pattern = "*",-- group = tags, --- command = "call SetTags(trim(system('git rev-parse --show-toplevel')) . '/.tags')" --- }) --- vim.api.nvim_create_autocmd("DirChanged", { --- pattern = "*", --- group = tags, --- command = "call SetTags(trim(system('git rev-parse --show-toplevel')) . '/.tags')" --- }) - --- lsp - -local lsp = require "lspconfig" -local coq = require "coq" -lsp.pyright.setup(coq.lsp_ensure_capabilities()) diff --git a/.config/nvim/plugged-backup/FastFold b/.config/nvim/plugged-backup/FastFold deleted file mode 160000 index e4a51e0..0000000 --- a/.config/nvim/plugged-backup/FastFold +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e4a51e0f6763720ab1d1889e1ce3fa3beaaf00d3 diff --git a/.config/nvim/plugged-backup/ale b/.config/nvim/plugged-backup/ale deleted file mode 160000 index 8761408..0000000 --- a/.config/nvim/plugged-backup/ale +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 876140832cd33e0566c5a30a755939e088925e66 diff --git a/.config/nvim/plugged-backup/coq.artifacts b/.config/nvim/plugged-backup/coq.artifacts deleted file mode 160000 index e395724..0000000 --- a/.config/nvim/plugged-backup/coq.artifacts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e39572495d27ebbcd6ccaf580da193a900c5fad9 diff --git a/.config/nvim/plugged-backup/coq.thirdparty b/.config/nvim/plugged-backup/coq.thirdparty deleted file mode 160000 index 3c43d8b..0000000 --- a/.config/nvim/plugged-backup/coq.thirdparty +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3c43d8b07b3ebd1db825ff2cd7f83ee67c78a674 diff --git a/.config/nvim/plugged-backup/coq_nvim b/.config/nvim/plugged-backup/coq_nvim deleted file mode 160000 index 1385a9a..0000000 --- a/.config/nvim/plugged-backup/coq_nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1385a9abd47b672e7ac67a7d721207dfbc4e0588 diff --git a/.config/nvim/plugged-backup/csv.vim b/.config/nvim/plugged-backup/csv.vim deleted file mode 160000 index eb284c4..0000000 --- a/.config/nvim/plugged-backup/csv.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eb284c4e33b57fc828012cb9ebb420a9ae6ecbe7 diff --git a/.config/nvim/plugged-backup/fzf b/.config/nvim/plugged-backup/fzf deleted file mode 160000 index 3b7a962..0000000 --- a/.config/nvim/plugged-backup/fzf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3b7a962dc6db227d18faecb25c793431ce7e8640 diff --git a/.config/nvim/plugged-backup/fzf.vim b/.config/nvim/plugged-backup/fzf.vim deleted file mode 160000 index d5f1f86..0000000 --- a/.config/nvim/plugged-backup/fzf.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d5f1f8641b24c0fd5b10a299824362a2a1b20ae0 diff --git a/.config/nvim/plugged-backup/nvim-lspconfig b/.config/nvim/plugged-backup/nvim-lspconfig deleted file mode 160000 index b86a37c..0000000 --- a/.config/nvim/plugged-backup/nvim-lspconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b86a37caf7a4e53e62ba883aef5889b590260de9 diff --git a/.config/nvim/plugged-backup/palenight.vim b/.config/nvim/plugged-backup/palenight.vim deleted file mode 160000 index 847fcf5..0000000 --- a/.config/nvim/plugged-backup/palenight.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 847fcf5b1de2a1f9c28fdcc369d009996c6bf633 diff --git a/.config/nvim/plugged-backup/vim-closer b/.config/nvim/plugged-backup/vim-closer deleted file mode 160000 index 43acc7c..0000000 --- a/.config/nvim/plugged-backup/vim-closer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 43acc7c59fca861cb92cc47f01f184d9d342a73b diff --git a/.config/nvim/plugged-backup/vim-commentary b/.config/nvim/plugged-backup/vim-commentary deleted file mode 160000 index 3654775..0000000 --- a/.config/nvim/plugged-backup/vim-commentary +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3654775824337f466109f00eaf6759760f65be34 diff --git a/.config/nvim/plugged-backup/vim-fish-syntax b/.config/nvim/plugged-backup/vim-fish-syntax deleted file mode 160000 index bd6b832..0000000 --- a/.config/nvim/plugged-backup/vim-fish-syntax +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bd6b832f33e8e1e52cb66d288d367e64d4a27afa diff --git a/.config/nvim/plugged-backup/vim-fugitive b/.config/nvim/plugged-backup/vim-fugitive deleted file mode 160000 index 92870eb..0000000 --- a/.config/nvim/plugged-backup/vim-fugitive +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 92870eb6d2f9663f34f20537ef0393b5ffeb2291 diff --git a/.config/nvim/plugged-backup/vim-indent-guides b/.config/nvim/plugged-backup/vim-indent-guides deleted file mode 160000 index 765084d..0000000 --- a/.config/nvim/plugged-backup/vim-indent-guides +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 765084d38bf102a95ab966fb06472e83fa7deff7 diff --git a/.config/nvim/plugged-backup/vim-matchup b/.config/nvim/plugged-backup/vim-matchup deleted file mode 160000 index 976ebfe..0000000 --- a/.config/nvim/plugged-backup/vim-matchup +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 976ebfe61b407d0a75d87b4a507bf9ae4ffffbaa diff --git a/.config/nvim/plugged-backup/vim-pandoc-syntax b/.config/nvim/plugged-backup/vim-pandoc-syntax deleted file mode 160000 index 7bea0ba..0000000 --- a/.config/nvim/plugged-backup/vim-pandoc-syntax +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7bea0ba8929749b2a471520af87635163fb28bdf diff --git a/.config/nvim/plugged-backup/vim-slime b/.config/nvim/plugged-backup/vim-slime deleted file mode 160000 index 3615340..0000000 --- a/.config/nvim/plugged-backup/vim-slime +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36153404daeb4c9b0f8db0be1ee6aae7ef73fee3 diff --git a/.config/nvim/plugged-backup/vim-surround b/.config/nvim/plugged-backup/vim-surround deleted file mode 160000 index bf3480d..0000000 --- a/.config/nvim/plugged-backup/vim-surround +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bf3480dc9ae7bea34c78fbba4c65b4548b5b1fea diff --git a/.config/nvim/plugged-backup/vimtex b/.config/nvim/plugged-backup/vimtex deleted file mode 160000 index e1a6119..0000000 --- a/.config/nvim/plugged-backup/vimtex +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e1a611961dd4508f5f723fd23c2015a9839e7ac5 diff --git a/.config/omf/bundle b/.config/omf/bundle deleted file mode 100644 index 54c0745..0000000 --- a/.config/omf/bundle +++ /dev/null @@ -1 +0,0 @@ -theme default diff --git a/.config/omf/channel b/.config/omf/channel deleted file mode 100644 index 2bf5ad0..0000000 --- a/.config/omf/channel +++ /dev/null @@ -1 +0,0 @@ -stable diff --git a/.config/omf/theme b/.config/omf/theme deleted file mode 100644 index 4ad96d5..0000000 --- a/.config/omf/theme +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/.config/pypoetry/pyproject.toml b/.config/pypoetry/pyproject.toml new file mode 100644 index 0000000..6ada2a4 --- /dev/null +++ b/.config/pypoetry/pyproject.toml @@ -0,0 +1,11 @@ +[tool.poetry] +name = "poetry-instance" +version = "1.8.5" +description = "" +authors = [] +license = "" +package-mode = false + +[tool.poetry.dependencies] +python = "3.8.17" +poetry = "1.8.5" diff --git a/.config/zed/settings.json b/.config/zed/settings.json deleted file mode 100644 index 4c90b8a..0000000 --- a/.config/zed/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -// Zed settings -// -// For information on how to configure Zed, see the Zed -// documentation: https://zed.dev/docs/configuring-zed -// -// To see all of Zed's default settings without changing your -// custom settings, run the `open default settings` command -// from the command palette or from `Zed` application menu. -{ - "buffer_font_size": 15 -} diff --git a/.git_template/ctags b/.git_template/ctags new file mode 100755 index 0000000..f62d1d7 --- /dev/null +++ b/.git_template/ctags @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +PATH="/usr/local/bin:$PATH" +trap 'rm -f "$$.tags"' EXIT +git ls-files | \ + ctags --tag-relative -L - -f"$$.tags" --languages=-javascript,sql +mv "$$.tags" "tags" diff --git a/.git_template/post-checkout b/.git_template/post-checkout new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/.git_template/post-checkout @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.git_template/post-commit b/.git_template/post-commit new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/.git_template/post-commit @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.git_template/post-merge b/.git_template/post-merge new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/.git_template/post-merge @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.git_template/post-rewrite b/.git_template/post-rewrite new file mode 100755 index 0000000..fe8972d --- /dev/null +++ b/.git_template/post-rewrite @@ -0,0 +1,4 @@ +#!/bin/sh +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac diff --git a/.git_template/pre-commit b/.git_template/pre-commit new file mode 100755 index 0000000..63a070a --- /dev/null +++ b/.git_template/pre-commit @@ -0,0 +1,7 @@ +#!/bin/bash + +branch=$(git rev-parse --abbrev-ref HEAD) +echo "Formatting python code using Black on branch $branch." +black -l 79 $(git ls-tree -r "$branch" --name-only | grep ".*\.py") +echo "Running unit tests." +pytest diff --git a/.gitaliases/.gitaliases b/.gitaliases/.gitaliases new file mode 120000 index 0000000..3a1ca66 --- /dev/null +++ b/.gitaliases/.gitaliases @@ -0,0 +1 @@ +/home/njuers/dotfiles/.gitaliases \ No newline at end of file diff --git a/.gitconfig b/.gitconfig index 7a45132..b45c021 100755 --- a/.gitconfig +++ b/.gitconfig @@ -1,8 +1,9 @@ [user] name = Neko Juers + email = njuers@globalnoc.iu.edu [core] - excludesfile = /Users/nekoj/.gitignore_global - editor = nvim + excludesfile = /home/njuers/.gitignore_global + editor = vim [alias] tree = log --branches --remotes --tags --graph --decorate --pretty=oneline --abbrev-commit tracked = !"git ls-tree -r \"$1\" --name-only #" @@ -32,10 +33,19 @@ required = true [merge] conflictstyle = diff3 - tool = nvr +# tool = nvr [diff] - tool = nvr -[difftool "nvr"] - cmd = nvr -s -d $LOCAL $REMOTE -[mergetool "nvr"] - cmd = nvr -s -d $LOCAL $BASE $REMOTE $MERGED -c 'wincmd J | wincmd =' +# tool = nvr +# [difftool "nvr"] +# cmd = nvr -s -d $LOCAL $REMOTE +# [mergetool "nvr"] +# cmd = nvr -s -d $LOCAL $BASE $REMOTE $MERGED -c 'wincmd J | wincmd =' +[include] + path = ~/.gitaliases/* +# tool = nvr +[diff] +# tool = nvr +# [difftool "nvr"] +# cmd = nvr -s -d $LOCAL $REMOTE +# [mergetool "nvr"] +# cmd = nvr -s -d $LOCAL $BASE $REMOTE $MERGED -c 'wincmd J | wincmd =' diff --git a/.gitignore b/.gitignore index e3e2a43..a88ec32 100755 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ bin/ext4fuse .config/Autodesk .config/gtk-2.0 .ipython/ +.tmux/plugins +inventory diff --git a/.gitignore_global b/.gitignore_global index 8742acc..2ac41f1 100755 --- a/.gitignore_global +++ b/.gitignore_global @@ -6,3 +6,4 @@ **/.DS_Store **/tags .venv +tags diff --git a/.gitmodules b/.gitmodules index 803badc..6e22f29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule ".hammerspoon/Spoons/VimMode.spoon"] - path = .hammerspoon/Spoons/VimMode.spoon - url = https://github.com/dbalatero/VimMode.spoon.git -[submodule ".tmux/plugins/nord-tmux"] - path = .tmux/plugins/nord-tmux - url = git@github.com:arcticicestudio/nord-tmux -[submodule "nord.nvim"] - path = nord.nvim - url = /Users/mpjuers/.config/nvim/plugged/nord.nvim +[submodule ".config/nvim"] + path = .config/nvim + url = git@github.com:nekoju/nvchad-config diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua deleted file mode 100755 index c0e9050..0000000 --- a/.hammerspoon/init.lua +++ /dev/null @@ -1,137 +0,0 @@ -hs.grid.setGrid('6x6') -hs.grid.ui.textSize = 50 -hs.window.animationDuration = 0 -hs.grid.HINTS = { - {"Q", "W", "E", "R", "T", "Y"}, - {"U", "I", "O", "P", "[", "]"}, - {"A", "S", "D", "F", "G", "H"}, - {"J", "K", "L", ";", "'", "Z"}, - {"N", "M", ",", ".", "/", "1"} -} - --- hs.hotkey.bind({"cmd", "shift"}, "H", function() --- local win = hs.window.focusedWindow() --- local f = win:frame() --- local screen = win:screen() --- local max = screen:frame() - --- f.x = max.x --- f.y = max.y --- f.w = max.w / 2 --- f.h = max.h --- win:setFrame(f) --- end) - --- hs.hotkey.bind({"cmd", "shift"}, "1", function() --- local win = hs.window.focusedWindow() --- local rect = hs.geometry(0,0,4,4) --- hs.grid.set(win, rect) --- end) - --- hs.hotkey.bind({"cmd", "shift"}, "2", function() --- local win = hs.window.focusedWindow() --- local rect = hs.geometry(2,0,4,4) --- hs.grid.set(win, rect) --- end) --- -hyper = {"shift", "alt"} -hyper2 = {"ctrl", "alt", "shift"} - -hs.hotkey.bind(hyper, "L", function() - local win = hs.window.focusedWindow() - local rect = hs.geometry(3,0,3,6) - hs.grid.set(win, rect) -end) - -hs.hotkey.bind(hyper, "H", function() - local win = hs.window.focusedWindow() - local rect = hs.geometry(0,0,3,6) - hs.grid.set(win, rect) -end) - -hs.hotkey.bind(hyper2, "H", function() - hs.window.focusedWindow():moveOneScreenWest() -end) - -hs.hotkey.bind(hyper2, "L", function() - hs.window.focusedWindow():moveOneScreenEast() -end) - -hs.hotkey.bind(hyper, "space", hs.grid.maximizeWindow) - -hs.hotkey.bind(hyper, ".", hs.hints.windowHints) -hs.hotkey.bind(hyper, "G", hs.grid.show) - -expose = hs.expose.new(nil) -expose_app = hs.expose.new(nil, {onlyActiveApplication = true}) - -hs.hotkey.bind(hyper, "E", function() expose:toggleShow() end) -hs.hotkey.bind(hyper, "A", function() expose_app:toggleShow() end) - -caffeine = hs.menubar.new() -function setCaffeineDisplay(state) - if state then - caffeine:setTitle("☕️") - else - caffeine:setTitle("💤") - end -end - -function caffeineClicked() - setCaffeineDisplay(hs.caffeinate.toggle("displayIdle")) -end - -if caffeine then - caffeine:setClickCallback(caffeineClicked) - setCaffeineDisplay(hs.caffeinate.get("displayIdle")) -end - -setCaffeineDisplay(hs.caffeinate.toggle('displayIdle')) - -hs.loadSpoon('EjectMenu') -spoon.EjectMenu:start() -spoon.EjectMenu:bindHotkeys({ejectAll = {hyper2, 'e'}}) - --- --- Requires an API Access Token from Bit.ly -local BITLY_API_ACCESS_TOKEN = "e72c99ea3cd57861e530b5388de556297c49f736" - -hs.hotkey.bind({"cmd", "alt", "ctrl"}, "S", function() - local board = hs.pasteboard.getContents() - - if board:match("^https?://") then - local response = hs.http.asyncGet( - "https://api-ssl.bitly.com/v3/shorten" .. - "?access_token=" .. BITLY_API_ACCESS_TOKEN .. - "&longUrl=" .. hs.http.encodeForQuery(board), - {}, - function(status, response, headers) - if status == 200 then - local msg = hs.json.decode(response) - - hs.pasteboard.setContents(msg.data.url) - hs.notify.new({title="Bitly URL Shorten: Success", informativeText=msg.data.url}):send() - else - hs.notify.new({title="Bitly URL Shorten: Failure", informativeText=response}):send() - end - end - ) - else - hs.notify.new({title="Bitly URL Shorten: Failure", informativeText="Expected: URL"}):send() - end -end) - -hs.hotkey.bind({"ctrl", "shift"}, "space", function() - local app = hs.application.get("kitty") - if app then - if not app:mainWindow() then - app:selectMenuItem({"kitty", "New OS window"}) - elseif app:isFrontmost() then - app:hide() - else - app:activate() - end - else - hs.application.launchOrFocus("kitty") - end -end) diff --git a/.jupyter/custom/custom.js b/.jupyter/custom/custom.js deleted file mode 100755 index 5d0ddb3..0000000 --- a/.jupyter/custom/custom.js +++ /dev/null @@ -1,32 +0,0 @@ -require(["nbextensions/snippets_menu/main"], function (snippets_menu) { - console.log('Loading `snippets_menu` customizations from `custom.js`'); - var horizontal_line = '---'; - var my_favorites = { - 'name' : 'Misc\.', - 'sub-menu' : [ - { - 'name' : 'Show all output', - 'snippet' : ['from IPython.core.interactiveshell import InteractiveShell', - 'InteractiveShell.ast_node_interactivity = "all"',], - }, - { - 'name' : 'Cache function output', - 'snippet' : ['from joblib import Memory', - '# memory = Memory(location=, verbose=0)', - '# Use as decorator:', - '# @memory.cache', - '# def function()', - '# ...', - '# or memory.cache(fun)()'], - }, - { - 'name' : 'Another menu item', - 'snippet' : ['another_new_command(2.78)',], - }, - ], - }; - snippets_menu.options['menus'] = snippets_menu.default_menus; - snippets_menu.options['menus'][0]['sub-menu'].push(horizontal_line); - snippets_menu.options['menus'][0]['sub-menu'].push(my_favorites); - console.log('Loaded `snippets_menu` customizations from `custom.js`'); -}); diff --git a/.jupyter/jupyter_console_config.py b/.jupyter/jupyter_console_config.py deleted file mode 100755 index b2783b5..0000000 --- a/.jupyter/jupyter_console_config.py +++ /dev/null @@ -1,328 +0,0 @@ -# Configuration file for jupyter-console. - -#------------------------------------------------------------------------------ -# ConnectionFileMixin(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## Mixin for configurable classes that work with connection files - -## JSON file in which to store connection info [default: kernel-.json] -# -# This file will contain the IP, ports, and authentication key needed to connect -# clients to this kernel. By default, this file will be created in the security -# dir of the current profile, but can be specified by absolute path. -#c.ConnectionFileMixin.connection_file = '' - -## set the control (ROUTER) port [default: random] -#c.ConnectionFileMixin.control_port = 0 - -## set the heartbeat port [default: random] -#c.ConnectionFileMixin.hb_port = 0 - -## set the iopub (PUB) port [default: random] -#c.ConnectionFileMixin.iopub_port = 0 - -## Set the kernel's IP address [default localhost]. If the IP address is -# something other than localhost, then Consoles on other machines will be able -# to connect to the Kernel, so be careful! -#c.ConnectionFileMixin.ip = '' - -## set the shell (ROUTER) port [default: random] -#c.ConnectionFileMixin.shell_port = 0 - -## set the stdin (ROUTER) port [default: random] -#c.ConnectionFileMixin.stdin_port = 0 - -## -#c.ConnectionFileMixin.transport = 'tcp' - -#------------------------------------------------------------------------------ -# JupyterConsoleApp(ConnectionFileMixin) configuration -#------------------------------------------------------------------------------ - -## Set to display confirmation dialog on exit. You can always use 'exit' or -# 'quit', to force a direct exit without any confirmation. -#c.JupyterConsoleApp.confirm_exit = True - -## Connect to an already running kernel -#c.JupyterConsoleApp.existing = '' - -## The name of the default kernel to start. -#c.JupyterConsoleApp.kernel_name = 'python' - -## Path to the ssh key to use for logging in to the ssh server. -#c.JupyterConsoleApp.sshkey = '' - -## The SSH server to use to connect to the kernel. -#c.JupyterConsoleApp.sshserver = '' - -#------------------------------------------------------------------------------ -# Application(SingletonConfigurable) configuration -#------------------------------------------------------------------------------ - -## This is an application. - -## The date format used by logging formatters for %(asctime)s -#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S' - -## The Logging format template -#c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s' - -## Set the log level by value or name. -#c.Application.log_level = 30 - -#------------------------------------------------------------------------------ -# JupyterApp(Application) configuration -#------------------------------------------------------------------------------ - -## Base class for Jupyter applications - -## Answer yes to any prompts. -#c.JupyterApp.answer_yes = False - -## Full path of a config file. -#c.JupyterApp.config_file = '' - -## Specify a config file to load. -#c.JupyterApp.config_file_name = '' - -## Generate default config file. -#c.JupyterApp.generate_config = False - -#------------------------------------------------------------------------------ -# ZMQTerminalIPythonApp(JupyterApp,JupyterConsoleApp) configuration -#------------------------------------------------------------------------------ - -#------------------------------------------------------------------------------ -# ZMQTerminalInteractiveShell(SingletonConfigurable) configuration -#------------------------------------------------------------------------------ - -## Text to display before the first prompt. Will be formatted with variables -# {version} and {kernel_banner}. -#c.ZMQTerminalInteractiveShell.banner = 'Jupyter console {version}\n\n{kernel_banner}' - -## Callable object called via 'callable' image handler with one argument, `data`, -# which is `msg["content"]["data"]` where `msg` is the message from iopub -# channel. For example, you can find base64 encoded PNG data as -# `data['image/png']`. If your function can't handle the data supplied, it -# should return `False` to indicate this. -#c.ZMQTerminalInteractiveShell.callable_image_handler = None - -## Shortcut style to use at the prompt. 'vi' or 'emacs'. -c.ZMQTerminalInteractiveShell.editing_mode = 'vi' - -## Highlight matching brackets. -#c.ZMQTerminalInteractiveShell.highlight_matching_brackets = True - -## The name of a Pygments style to use for syntax highlighting -#c.ZMQTerminalInteractiveShell.highlighting_style = '' - -## Override highlighting format for specific tokens -#c.ZMQTerminalInteractiveShell.highlighting_style_overrides = {} - -## How many history items to load into memory -#c.ZMQTerminalInteractiveShell.history_load_length = 1000 - -## Handler for image type output. This is useful, for example, when connecting -# to the kernel in which pylab inline backend is activated. There are four -# handlers defined. 'PIL': Use Python Imaging Library to popup image; 'stream': -# Use an external program to show the image. Image will be fed into the STDIN -# of the program. You will need to configure `stream_image_handler`; -# 'tempfile': Use an external program to show the image. Image will be saved in -# a temporally file and the program is called with the temporally file. You -# will need to configure `tempfile_image_handler`; 'callable': You can set any -# Python callable which is called with the image data. You will need to -# configure `callable_image_handler`. -#c.ZMQTerminalInteractiveShell.image_handler = 'PIL' - -## Whether to include output from clients other than this one sharing the same -# kernel. -# -# Outputs are not displayed until enter is pressed. -#c.ZMQTerminalInteractiveShell.include_other_output = False - -## Timeout (in seconds) for giving up on a kernel's is_complete response. -# -# If the kernel does not respond at any point within this time, the kernel will -# no longer be asked if code is complete, and the console will default to the -# built-in is_complete test. -#c.ZMQTerminalInteractiveShell.kernel_is_complete_timeout = 1 - -## Timeout for giving up on a kernel (in seconds). -# -# On first connect and restart, the console tests whether the kernel is running -# and responsive by sending kernel_info_requests. This sets the timeout in -# seconds for how long the kernel can take before being presumed dead. -#c.ZMQTerminalInteractiveShell.kernel_timeout = 60 - -## Preferred object representation MIME type in order. First matched MIME type -# will be used. -#c.ZMQTerminalInteractiveShell.mime_preference = ['image/png', 'image/jpeg', 'image/svg+xml'] - -## Prefix to add to outputs coming from clients other than this one. -# -# Only relevant if include_other_output is True. -#c.ZMQTerminalInteractiveShell.other_output_prefix = '[remote] ' - -## Use simple fallback prompt. Features may be limited. -#c.ZMQTerminalInteractiveShell.simple_prompt = False - -## Command to invoke an image viewer program when you are using 'stream' image -# handler. This option is a list of string where the first element is the -# command itself and reminders are the options for the command. Raw image data -# is given as STDIN to the program. -#c.ZMQTerminalInteractiveShell.stream_image_handler = [] - -## Command to invoke an image viewer program when you are using 'tempfile' image -# handler. This option is a list of string where the first element is the -# command itself and reminders are the options for the command. You can use -# {file} and {format} in the string to represent the location of the generated -# image file and image format. -#c.ZMQTerminalInteractiveShell.tempfile_image_handler = [] - -## Use 24bit colors instead of 256 colors in prompt highlighting. If your -# terminal supports true color, the following command should print 'TRUECOLOR' -# in orange: printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n" -#c.ZMQTerminalInteractiveShell.true_color = False - -## Whether to use the kernel's is_complete message handling. If False, then the -# frontend will use its own is_complete handler. -#c.ZMQTerminalInteractiveShell.use_kernel_is_complete = True - -#------------------------------------------------------------------------------ -# KernelManager(ConnectionFileMixin) configuration -#------------------------------------------------------------------------------ - -## Manages a single kernel in a subprocess on this host. -# -# This version starts kernels with Popen. - -## Should we autorestart the kernel if it dies. -#c.KernelManager.autorestart = True - -## DEPRECATED: Use kernel_name instead. -# -# The Popen Command to launch the kernel. Override this if you have a custom -# kernel. If kernel_cmd is specified in a configuration file, Jupyter does not -# pass any arguments to the kernel, because it cannot make any assumptions about -# the arguments that the kernel understands. In particular, this means that the -# kernel does not receive the option --debug if it given on the Jupyter command -# line. -#c.KernelManager.kernel_cmd = [] - -## Time to wait for a kernel to terminate before killing it, in seconds. -#c.KernelManager.shutdown_wait_time = 5.0 - -#------------------------------------------------------------------------------ -# KernelRestarter(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## Monitor and autorestart a kernel. - -## Whether to include every poll event in debugging output. -# -# Has to be set explicitly, because there will be *a lot* of output. -#c.KernelRestarter.debug = False - -## Whether to choose new random ports when restarting before the kernel is alive. -#c.KernelRestarter.random_ports_until_alive = True - -## The number of consecutive autorestarts before the kernel is presumed dead. -#c.KernelRestarter.restart_limit = 5 - -## Kernel heartbeat interval in seconds. -#c.KernelRestarter.time_to_dead = 3.0 - -#------------------------------------------------------------------------------ -# Session(Configurable) configuration -#------------------------------------------------------------------------------ - -## Object for handling serialization and sending of messages. -# -# The Session object handles building messages and sending them with ZMQ sockets -# or ZMQStream objects. Objects can communicate with each other over the -# network via Session objects, and only need to work with the dict-based IPython -# message spec. The Session will handle serialization/deserialization, security, -# and metadata. -# -# Sessions support configurable serialization via packer/unpacker traits, and -# signing with HMAC digests via the key/keyfile traits. -# -# Parameters ---------- -# -# debug : bool -# whether to trigger extra debugging statements -# packer/unpacker : str : 'json', 'pickle' or import_string -# importstrings for methods to serialize message parts. If just -# 'json' or 'pickle', predefined JSON and pickle packers will be used. -# Otherwise, the entire importstring must be used. -# -# The functions must accept at least valid JSON input, and output *bytes*. -# -# For example, to use msgpack: -# packer = 'msgpack.packb', unpacker='msgpack.unpackb' -# pack/unpack : callables -# You can also set the pack/unpack callables for serialization directly. -# session : bytes -# the ID of this Session object. The default is to generate a new UUID. -# username : unicode -# username added to message headers. The default is to ask the OS. -# key : bytes -# The key used to initialize an HMAC signature. If unset, messages -# will not be signed or checked. -# keyfile : filepath -# The file containing a key. If this is set, `key` will be initialized -# to the contents of the file. - -## Threshold (in bytes) beyond which an object's buffer should be extracted to -# avoid pickling. -#c.Session.buffer_threshold = 1024 - -## Whether to check PID to protect against calls after fork. -# -# This check can be disabled if fork-safety is handled elsewhere. -#c.Session.check_pid = True - -## Threshold (in bytes) beyond which a buffer should be sent without copying. -#c.Session.copy_threshold = 65536 - -## Debug output in the Session -#c.Session.debug = False - -## The maximum number of digests to remember. -# -# The digest history will be culled when it exceeds this value. -#c.Session.digest_history_size = 65536 - -## The maximum number of items for a container to be introspected for custom -# serialization. Containers larger than this are pickled outright. -#c.Session.item_threshold = 64 - -## execution key, for signing messages. -#c.Session.key = b'' - -## path to file containing execution key. -#c.Session.keyfile = '' - -## Metadata dictionary, which serves as the default top-level metadata dict for -# each message. -#c.Session.metadata = {} - -## The name of the packer for serializing messages. Should be one of 'json', -# 'pickle', or an import name for a custom callable serializer. -#c.Session.packer = 'json' - -## The UUID identifying this session. -#c.Session.session = '' - -## The digest scheme used to construct the message signatures. Must have the form -# 'hmac-HASH'. -#c.Session.signature_scheme = 'hmac-sha256' - -## The name of the unpacker for unserializing messages. Only used with custom -# functions for `packer`. -#c.Session.unpacker = 'json' - -## Username for the Session. Default is your system username. -#c.Session.username = 'mpjuers' - diff --git a/.jupyter/jupyter_nbconvert_config.json b/.jupyter/jupyter_nbconvert_config.json deleted file mode 100755 index 1e4011c..0000000 --- a/.jupyter/jupyter_nbconvert_config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": 1, - "Exporter": { - "template_path": [ - ".", - "/Users/mpjuers/.pyenv/versions/3.7.0/lib/python3.7/site-packages/jupyter_contrib_nbextensions/templates" - ], - "preprocessors": [ - "jupyter_contrib_nbextensions.nbconvert_support.CodeFoldingPreprocessor", - "jupyter_contrib_nbextensions.nbconvert_support.PyMarkdownPreprocessor" - ] - } -} \ No newline at end of file diff --git a/.jupyter/jupyter_notebook_config.json b/.jupyter/jupyter_notebook_config.json deleted file mode 100755 index a39fb4a..0000000 --- a/.jupyter/jupyter_notebook_config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "NotebookApp": { - "nbserver_extensions": { - "jupyter_nbextensions_configurator": true, - "jupyterlab_code_formatter": true - }, - "password": "sha1:075d037d772c:165f616375b521286aa7bf64e5f9b08496993946" - } -} \ No newline at end of file diff --git a/.jupyter/jupyter_notebook_config.py b/.jupyter/jupyter_notebook_config.py deleted file mode 100755 index 607f8d1..0000000 --- a/.jupyter/jupyter_notebook_config.py +++ /dev/null @@ -1,768 +0,0 @@ -# Configuration file for jupyter-notebook. - -#------------------------------------------------------------------------------ -# Application(SingletonConfigurable) configuration -#------------------------------------------------------------------------------ - -## This is an application. - -## The date format used by logging formatters for %(asctime)s -#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S' - -## The Logging format template -#c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s' - -## Set the log level by value or name. -#c.Application.log_level = 30 - -#------------------------------------------------------------------------------ -# JupyterApp(Application) configuration -#------------------------------------------------------------------------------ - -## Base class for Jupyter applications - -## Answer yes to any prompts. -#c.JupyterApp.answer_yes = False - -## Full path of a config file. -#c.JupyterApp.config_file = '' - -## Specify a config file to load. -#c.JupyterApp.config_file_name = '' - -## Generate default config file. -#c.JupyterApp.generate_config = False - -#------------------------------------------------------------------------------ -# NotebookApp(JupyterApp) configuration -#------------------------------------------------------------------------------ - -## Set the Access-Control-Allow-Credentials: true header -#c.NotebookApp.allow_credentials = False - -## Set the Access-Control-Allow-Origin header -# -# Use '*' to allow any origin to access your server. -# -# Takes precedence over allow_origin_pat. -#c.NotebookApp.allow_origin = '' - -## Use a regular expression for the Access-Control-Allow-Origin header -# -# Requests from an origin matching the expression will get replies with: -# -# Access-Control-Allow-Origin: origin -# -# where `origin` is the origin of the request. -# -# Ignored if allow_origin is set. -#c.NotebookApp.allow_origin_pat = '' - -## Allow password to be changed at login for the notebook server. -# -# While loggin in with a token, the notebook server UI will give the opportunity -# to the user to enter a new password at the same time that will replace the -# token login mechanism. -# -# This can be set to false to prevent changing password from the UI/API. -#c.NotebookApp.allow_password_change = True - -## Allow requests where the Host header doesn't point to a local server -# -# By default, requests get a 403 forbidden response if the 'Host' header shows -# that the browser thinks it's on a non-local domain. Setting this option to -# True disables this check. -# -# This protects against 'DNS rebinding' attacks, where a remote web server -# serves you a page and then changes its DNS to send later requests to a local -# IP, bypassing same-origin checks. -# -# Local IP addresses (such as 127.0.0.1 and ::1) are allowed as local, along -# with hostnames configured in local_hostnames. -#c.NotebookApp.allow_remote_access = False - -## Whether to allow the user to run the notebook as root. -#c.NotebookApp.allow_root = False - -## DEPRECATED use base_url -#c.NotebookApp.base_project_url = '/' - -## The base URL for the notebook server. -# -# Leading and trailing slashes can be omitted, and will automatically be added. -#c.NotebookApp.base_url = '/' - -## Specify what command to use to invoke a web browser when opening the notebook. -# If not specified, the default browser will be determined by the `webbrowser` -# standard library module, which allows setting of the BROWSER environment -# variable to override it. -#c.NotebookApp.browser = '' - -## The full path to an SSL/TLS certificate file. -#c.NotebookApp.certfile = '' - -## The full path to a certificate authority certificate for SSL/TLS client -# authentication. -#c.NotebookApp.client_ca = '' - -## The config manager class to use -#c.NotebookApp.config_manager_class = 'notebook.services.config.manager.ConfigManager' - -## The notebook manager class to use. -#c.NotebookApp.contents_manager_class = 'notebook.services.contents.largefilemanager.LargeFileManager' - -## Extra keyword arguments to pass to `set_secure_cookie`. See tornado's -# set_secure_cookie docs for details. -#c.NotebookApp.cookie_options = {} - -## The random bytes used to secure cookies. By default this is a new random -# number every time you start the Notebook. Set it to a value in a config file -# to enable logins to persist across server sessions. -# -# Note: Cookie secrets should be kept private, do not share config files with -# cookie_secret stored in plaintext (you can read the value from a file). -#c.NotebookApp.cookie_secret = b'' - -## The file where the cookie secret is stored. -#c.NotebookApp.cookie_secret_file = '' - -## Override URL shown to users. -# -# Replace actual URL, including protocol, address, port and base URL, with the -# given value when displaying URL to the users. Do not change the actual -# connection URL. If authentication token is enabled, the token is added to the -# custom URL automatically. -# -# This option is intended to be used when the URL to display to the user cannot -# be determined reliably by the Jupyter notebook server (proxified or -# containerized setups for example). -#c.NotebookApp.custom_display_url = '' - -## The default URL to redirect to from `/` -#c.NotebookApp.default_url = '/tree' - -## Disable cross-site-request-forgery protection -# -# Jupyter notebook 4.3.1 introduces protection from cross-site request -# forgeries, requiring API requests to either: -# -# - originate from pages served by this server (validated with XSRF cookie and -# token), or - authenticate with a token -# -# Some anonymous compute resources still desire the ability to run code, -# completely without authentication. These services can disable all -# authentication and security checks, with the full knowledge of what that -# implies. -#c.NotebookApp.disable_check_xsrf = False - -## Whether to enable MathJax for typesetting math/TeX -# -# MathJax is the javascript library Jupyter uses to render math/LaTeX. It is -# very large, so you may want to disable it if you have a slow internet -# connection, or for offline use of the notebook. -# -# When disabled, equations etc. will appear as their untransformed TeX source. -#c.NotebookApp.enable_mathjax = True - -## extra paths to look for Javascript notebook extensions -#c.NotebookApp.extra_nbextensions_path = [] - -## handlers that should be loaded at higher priority than the default services -#c.NotebookApp.extra_services = [] - -## Extra paths to search for serving static files. -# -# This allows adding javascript/css to be available from the notebook server -# machine, or overriding individual files in the IPython -#c.NotebookApp.extra_static_paths = [] - -## Extra paths to search for serving jinja templates. -# -# Can be used to override templates from notebook.templates. -#c.NotebookApp.extra_template_paths = [] - -## -#c.NotebookApp.file_to_run = '' - -## Extra keyword arguments to pass to `get_secure_cookie`. See tornado's -# get_secure_cookie docs for details. -#c.NotebookApp.get_secure_cookie_kwargs = {} - -## Deprecated: Use minified JS file or not, mainly use during dev to avoid JS -# recompilation -#c.NotebookApp.ignore_minified_js = False - -## (bytes/sec) Maximum rate at which stream output can be sent on iopub before -# they are limited. -#c.NotebookApp.iopub_data_rate_limit = 1000000 - -## (msgs/sec) Maximum rate at which messages can be sent on iopub before they are -# limited. -#c.NotebookApp.iopub_msg_rate_limit = 1000 - -## The IP address the notebook server will listen on. -#c.NotebookApp.ip = 'localhost' - -## Supply extra arguments that will be passed to Jinja environment. -#c.NotebookApp.jinja_environment_options = {} - -## Extra variables to supply to jinja templates when rendering. -#c.NotebookApp.jinja_template_vars = {} - -## The kernel manager class to use. -#c.NotebookApp.kernel_manager_class = 'notebook.services.kernels.kernelmanager.MappingKernelManager' - -## The kernel spec manager class to use. Should be a subclass of -# `jupyter_client.kernelspec.KernelSpecManager`. -# -# The Api of KernelSpecManager is provisional and might change without warning -# between this version of Jupyter and the next stable one. -#c.NotebookApp.kernel_spec_manager_class = 'jupyter_client.kernelspec.KernelSpecManager' - -## The full path to a private key file for usage with SSL/TLS. -#c.NotebookApp.keyfile = '' - -## Hostnames to allow as local when allow_remote_access is False. -# -# Local IP addresses (such as 127.0.0.1 and ::1) are automatically accepted as -# local as well. -#c.NotebookApp.local_hostnames = ['localhost'] - -## The login handler class to use. -#c.NotebookApp.login_handler_class = 'notebook.auth.login.LoginHandler' - -## The logout handler class to use. -#c.NotebookApp.logout_handler_class = 'notebook.auth.logout.LogoutHandler' - -## The MathJax.js configuration file that is to be used. -#c.NotebookApp.mathjax_config = 'TeX-AMS-MML_HTMLorMML-full,Safe' - -## A custom url for MathJax.js. Should be in the form of a case-sensitive url to -# MathJax, for example: /static/components/MathJax/MathJax.js -#c.NotebookApp.mathjax_url = '' - -## Sets the maximum allowed size of the client request body, specified in the -# Content-Length request header field. If the size in a request exceeds the -# configured value, a malformed HTTP message is returned to the client. -# -# Note: max_body_size is applied even in streaming mode. -#c.NotebookApp.max_body_size = 536870912 - -## Gets or sets the maximum amount of memory, in bytes, that is allocated for -# use by the buffer manager. -#c.NotebookApp.max_buffer_size = 536870912 - -## Dict of Python modules to load as notebook server extensions.Entry values can -# be used to enable and disable the loading ofthe extensions. The extensions -# will be loaded in alphabetical order. -#c.NotebookApp.nbserver_extensions = {} - -## The directory to use for notebooks and kernels. -#c.NotebookApp.notebook_dir = '' - -## Whether to open in a browser after starting. The specific browser used is -# platform dependent and determined by the python standard library `webbrowser` -# module, unless it is overridden using the --browser (NotebookApp.browser) -# configuration option. -#c.NotebookApp.open_browser = True - -## Hashed password to use for web authentication. -# -# To generate, type in a python/IPython shell: -# -# from notebook.auth import passwd; passwd() -# -# The string should be of the form type:salt:hashed-password. -#c.NotebookApp.password = '' - -## Forces users to use a password for the Notebook server. This is useful in a -# multi user environment, for instance when everybody in the LAN can access each -# other's machine through ssh. -# -# In such a case, server the notebook server on localhost is not secure since -# any user can connect to the notebook server via ssh. -#c.NotebookApp.password_required = False - -## The port the notebook server will listen on. -#c.NotebookApp.port = 8888 - -## The number of additional ports to try if the specified port is not available. -#c.NotebookApp.port_retries = 50 - -## DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib. -#c.NotebookApp.pylab = 'disabled' - -## If True, display a button in the dashboard to quit (shutdown the notebook -# server). -#c.NotebookApp.quit_button = True - -## (sec) Time window used to check the message and data rate limits. -#c.NotebookApp.rate_limit_window = 3 - -## Reraise exceptions encountered loading server extensions? -#c.NotebookApp.reraise_server_extension_failures = False - -## DEPRECATED use the nbserver_extensions dict instead -#c.NotebookApp.server_extensions = [] - -## The session manager class to use. -#c.NotebookApp.session_manager_class = 'notebook.services.sessions.sessionmanager.SessionManager' - -## Shut down the server after N seconds with no kernels or terminals running and -# no activity. This can be used together with culling idle kernels -# (MappingKernelManager.cull_idle_timeout) to shutdown the notebook server when -# it's not in use. This is not precisely timed: it may shut down up to a minute -# later. 0 (the default) disables this automatic shutdown. -#c.NotebookApp.shutdown_no_activity_timeout = 0 - -## Supply SSL options for the tornado HTTPServer. See the tornado docs for -# details. -#c.NotebookApp.ssl_options = {} - -## Supply overrides for terminado. Currently only supports "shell_command". -#c.NotebookApp.terminado_settings = {} - -## Set to False to disable terminals. -# -# This does *not* make the notebook server more secure by itself. Anything the -# user can in a terminal, they can also do in a notebook. -# -# Terminals may also be automatically disabled if the terminado package is not -# available. -#c.NotebookApp.terminals_enabled = True - -## Token used for authenticating first-time connections to the server. -# -# When no password is enabled, the default is to generate a new, random token. -# -# Setting to an empty string disables authentication altogether, which is NOT -# RECOMMENDED. -#c.NotebookApp.token = '' - -## Supply overrides for the tornado.web.Application that the Jupyter notebook -# uses. -#c.NotebookApp.tornado_settings = {} - -## Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded- -# For headerssent by the upstream reverse proxy. Necessary if the proxy handles -# SSL -#c.NotebookApp.trust_xheaders = False - -## DEPRECATED, use tornado_settings -#c.NotebookApp.webapp_settings = {} - -## Specify Where to open the notebook on startup. This is the `new` argument -# passed to the standard library method `webbrowser.open`. The behaviour is not -# guaranteed, but depends on browser support. Valid values are: -# -# - 2 opens a new tab, -# - 1 opens a new window, -# - 0 opens in an existing window. -# -# See the `webbrowser.open` documentation for details. -#c.NotebookApp.webbrowser_open_new = 2 - -## Set the tornado compression options for websocket connections. -# -# This value will be returned from -# :meth:`WebSocketHandler.get_compression_options`. None (default) will disable -# compression. A dict (even an empty one) will enable compression. -# -# See the tornado docs for WebSocketHandler.get_compression_options for details. -#c.NotebookApp.websocket_compression_options = None - -## The base URL for websockets, if it differs from the HTTP server (hint: it -# almost certainly doesn't). -# -# Should be in the form of an HTTP origin: ws[s]://hostname[:port] -#c.NotebookApp.websocket_url = '' - -#------------------------------------------------------------------------------ -# ConnectionFileMixin(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## Mixin for configurable classes that work with connection files - -## JSON file in which to store connection info [default: kernel-.json] -# -# This file will contain the IP, ports, and authentication key needed to connect -# clients to this kernel. By default, this file will be created in the security -# dir of the current profile, but can be specified by absolute path. -#c.ConnectionFileMixin.connection_file = '' - -## set the control (ROUTER) port [default: random] -#c.ConnectionFileMixin.control_port = 0 - -## set the heartbeat port [default: random] -#c.ConnectionFileMixin.hb_port = 0 - -## set the iopub (PUB) port [default: random] -#c.ConnectionFileMixin.iopub_port = 0 - -## Set the kernel's IP address [default localhost]. If the IP address is -# something other than localhost, then Consoles on other machines will be able -# to connect to the Kernel, so be careful! -#c.ConnectionFileMixin.ip = '' - -## set the shell (ROUTER) port [default: random] -#c.ConnectionFileMixin.shell_port = 0 - -## set the stdin (ROUTER) port [default: random] -#c.ConnectionFileMixin.stdin_port = 0 - -## -#c.ConnectionFileMixin.transport = 'tcp' - -#------------------------------------------------------------------------------ -# KernelManager(ConnectionFileMixin) configuration -#------------------------------------------------------------------------------ - -## Manages a single kernel in a subprocess on this host. -# -# This version starts kernels with Popen. - -## Should we autorestart the kernel if it dies. -#c.KernelManager.autorestart = True - -## DEPRECATED: Use kernel_name instead. -# -# The Popen Command to launch the kernel. Override this if you have a custom -# kernel. If kernel_cmd is specified in a configuration file, Jupyter does not -# pass any arguments to the kernel, because it cannot make any assumptions about -# the arguments that the kernel understands. In particular, this means that the -# kernel does not receive the option --debug if it given on the Jupyter command -# line. -#c.KernelManager.kernel_cmd = [] - -## Time to wait for a kernel to terminate before killing it, in seconds. -#c.KernelManager.shutdown_wait_time = 5.0 - -#------------------------------------------------------------------------------ -# Session(Configurable) configuration -#------------------------------------------------------------------------------ - -## Object for handling serialization and sending of messages. -# -# The Session object handles building messages and sending them with ZMQ sockets -# or ZMQStream objects. Objects can communicate with each other over the -# network via Session objects, and only need to work with the dict-based IPython -# message spec. The Session will handle serialization/deserialization, security, -# and metadata. -# -# Sessions support configurable serialization via packer/unpacker traits, and -# signing with HMAC digests via the key/keyfile traits. -# -# Parameters ---------- -# -# debug : bool -# whether to trigger extra debugging statements -# packer/unpacker : str : 'json', 'pickle' or import_string -# importstrings for methods to serialize message parts. If just -# 'json' or 'pickle', predefined JSON and pickle packers will be used. -# Otherwise, the entire importstring must be used. -# -# The functions must accept at least valid JSON input, and output *bytes*. -# -# For example, to use msgpack: -# packer = 'msgpack.packb', unpacker='msgpack.unpackb' -# pack/unpack : callables -# You can also set the pack/unpack callables for serialization directly. -# session : bytes -# the ID of this Session object. The default is to generate a new UUID. -# username : unicode -# username added to message headers. The default is to ask the OS. -# key : bytes -# The key used to initialize an HMAC signature. If unset, messages -# will not be signed or checked. -# keyfile : filepath -# The file containing a key. If this is set, `key` will be initialized -# to the contents of the file. - -## Threshold (in bytes) beyond which an object's buffer should be extracted to -# avoid pickling. -#c.Session.buffer_threshold = 1024 - -## Whether to check PID to protect against calls after fork. -# -# This check can be disabled if fork-safety is handled elsewhere. -#c.Session.check_pid = True - -## Threshold (in bytes) beyond which a buffer should be sent without copying. -#c.Session.copy_threshold = 65536 - -## Debug output in the Session -#c.Session.debug = False - -## The maximum number of digests to remember. -# -# The digest history will be culled when it exceeds this value. -#c.Session.digest_history_size = 65536 - -## The maximum number of items for a container to be introspected for custom -# serialization. Containers larger than this are pickled outright. -#c.Session.item_threshold = 64 - -## execution key, for signing messages. -#c.Session.key = b'' - -## path to file containing execution key. -#c.Session.keyfile = '' - -## Metadata dictionary, which serves as the default top-level metadata dict for -# each message. -#c.Session.metadata = {} - -## The name of the packer for serializing messages. Should be one of 'json', -# 'pickle', or an import name for a custom callable serializer. -#c.Session.packer = 'json' - -## The UUID identifying this session. -#c.Session.session = '' - -## The digest scheme used to construct the message signatures. Must have the form -# 'hmac-HASH'. -#c.Session.signature_scheme = 'hmac-sha256' - -## The name of the unpacker for unserializing messages. Only used with custom -# functions for `packer`. -#c.Session.unpacker = 'json' - -## Username for the Session. Default is your system username. -#c.Session.username = 'mpjuers' - -#------------------------------------------------------------------------------ -# MultiKernelManager(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## A class for managing multiple kernels. - -## The name of the default kernel to start -#c.MultiKernelManager.default_kernel_name = 'python3' - -## The kernel manager class. This is configurable to allow subclassing of the -# KernelManager for customized behavior. -#c.MultiKernelManager.kernel_manager_class = 'jupyter_client.ioloop.IOLoopKernelManager' - -#------------------------------------------------------------------------------ -# MappingKernelManager(MultiKernelManager) configuration -#------------------------------------------------------------------------------ - -## A KernelManager that handles notebook mapping and HTTP error handling - -## Whether messages from kernels whose frontends have disconnected should be -# buffered in-memory. -# -# When True (default), messages are buffered and replayed on reconnect, avoiding -# lost messages due to interrupted connectivity. -# -# Disable if long-running kernels will produce too much output while no -# frontends are connected. -#c.MappingKernelManager.buffer_offline_messages = True - -## Whether to consider culling kernels which are busy. Only effective if -# cull_idle_timeout > 0. -#c.MappingKernelManager.cull_busy = False - -## Whether to consider culling kernels which have one or more connections. Only -# effective if cull_idle_timeout > 0. -#c.MappingKernelManager.cull_connected = False - -## Timeout (in seconds) after which a kernel is considered idle and ready to be -# culled. Values of 0 or lower disable culling. Very short timeouts may result -# in kernels being culled for users with poor network connections. -#c.MappingKernelManager.cull_idle_timeout = 0 - -## The interval (in seconds) on which to check for idle kernels exceeding the -# cull timeout value. -#c.MappingKernelManager.cull_interval = 300 - -## Timeout for giving up on a kernel (in seconds). -# -# On starting and restarting kernels, we check whether the kernel is running and -# responsive by sending kernel_info_requests. This sets the timeout in seconds -# for how long the kernel can take before being presumed dead. This affects the -# MappingKernelManager (which handles kernel restarts) and the -# ZMQChannelsHandler (which handles the startup). -#c.MappingKernelManager.kernel_info_timeout = 60 - -## -#c.MappingKernelManager.root_dir = '' - -#------------------------------------------------------------------------------ -# ContentsManager(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## Base class for serving files and directories. -# -# This serves any text or binary file, as well as directories, with special -# handling for JSON notebook documents. -# -# Most APIs take a path argument, which is always an API-style unicode path, and -# always refers to a directory. -# -# - unicode, not url-escaped -# - '/'-separated -# - leading and trailing '/' will be stripped -# - if unspecified, path defaults to '', -# indicating the root path. - -## Allow access to hidden files -#c.ContentsManager.allow_hidden = False - -## -#c.ContentsManager.checkpoints = None - -## -#c.ContentsManager.checkpoints_class = 'notebook.services.contents.checkpoints.Checkpoints' - -## -#c.ContentsManager.checkpoints_kwargs = {} - -## handler class to use when serving raw file requests. -# -# Default is a fallback that talks to the ContentsManager API, which may be -# inefficient, especially for large files. -# -# Local files-based ContentsManagers can use a StaticFileHandler subclass, which -# will be much more efficient. -# -# Access to these files should be Authenticated. -#c.ContentsManager.files_handler_class = 'notebook.files.handlers.FilesHandler' - -## Extra parameters to pass to files_handler_class. -# -# For example, StaticFileHandlers generally expect a `path` argument specifying -# the root directory from which to serve files. -#c.ContentsManager.files_handler_params = {} - -## Glob patterns to hide in file and directory listings. -#c.ContentsManager.hide_globs = ['__pycache__', '*.pyc', '*.pyo', '.DS_Store', '*.so', '*.dylib', '*~'] - -## Python callable or importstring thereof -# -# To be called on a contents model prior to save. -# -# This can be used to process the structure, such as removing notebook outputs -# or other side effects that should not be saved. -# -# It will be called as (all arguments passed by keyword):: -# -# hook(path=path, model=model, contents_manager=self) -# -# - model: the model to be saved. Includes file contents. -# Modifying this dict will affect the file that is stored. -# - path: the API path of the save destination -# - contents_manager: this ContentsManager instance -#c.ContentsManager.pre_save_hook = None - -## -#c.ContentsManager.root_dir = '/' - -## The base name used when creating untitled directories. -#c.ContentsManager.untitled_directory = 'Untitled Folder' - -## The base name used when creating untitled files. -#c.ContentsManager.untitled_file = 'untitled' - -## The base name used when creating untitled notebooks. -#c.ContentsManager.untitled_notebook = 'Untitled' - -#------------------------------------------------------------------------------ -# FileManagerMixin(Configurable) configuration -#------------------------------------------------------------------------------ - -## Mixin for ContentsAPI classes that interact with the filesystem. -# -# Provides facilities for reading, writing, and copying both notebooks and -# generic files. -# -# Shared by FileContentsManager and FileCheckpoints. -# -# Note ---- Classes using this mixin must provide the following attributes: -# -# root_dir : unicode -# A directory against against which API-style paths are to be resolved. -# -# log : logging.Logger - -## By default notebooks are saved on disk on a temporary file and then if -# succefully written, it replaces the old ones. This procedure, namely -# 'atomic_writing', causes some bugs on file system whitout operation order -# enforcement (like some networked fs). If set to False, the new notebook is -# written directly on the old one which could fail (eg: full filesystem or quota -# ) -#c.FileManagerMixin.use_atomic_writing = True - -#------------------------------------------------------------------------------ -# FileContentsManager(FileManagerMixin,ContentsManager) configuration -#------------------------------------------------------------------------------ - -## If True (default), deleting files will send them to the platform's -# trash/recycle bin, where they can be recovered. If False, deleting files -# really deletes them. -#c.FileContentsManager.delete_to_trash = True - -## Python callable or importstring thereof -# -# to be called on the path of a file just saved. -# -# This can be used to process the file on disk, such as converting the notebook -# to a script or HTML via nbconvert. -# -# It will be called as (all arguments passed by keyword):: -# -# hook(os_path=os_path, model=model, contents_manager=instance) -# -# - path: the filesystem path to the file just written - model: the model -# representing the file - contents_manager: this ContentsManager instance -#c.FileContentsManager.post_save_hook = None - -## -#c.FileContentsManager.root_dir = '' - -## DEPRECATED, use post_save_hook. Will be removed in Notebook 5.0 -#c.FileContentsManager.save_script = False - -#------------------------------------------------------------------------------ -# NotebookNotary(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## A class for computing and verifying notebook signatures. - -## The hashing algorithm used to sign notebooks. -#c.NotebookNotary.algorithm = 'sha256' - -## The sqlite file in which to store notebook signatures. By default, this will -# be in your Jupyter data directory. You can set it to ':memory:' to disable -# sqlite writing to the filesystem. -#c.NotebookNotary.db_file = '' - -## The secret key with which notebooks are signed. -#c.NotebookNotary.secret = b'' - -## The file where the secret key is stored. -#c.NotebookNotary.secret_file = '' - -## A callable returning the storage backend for notebook signatures. The default -# uses an SQLite database. -#c.NotebookNotary.store_factory = traitlets.Undefined - -#------------------------------------------------------------------------------ -# KernelSpecManager(LoggingConfigurable) configuration -#------------------------------------------------------------------------------ - -## If there is no Python kernelspec registered and the IPython kernel is -# available, ensure it is added to the spec list. -#c.KernelSpecManager.ensure_native_kernel = True - -## The kernel spec class. This is configurable to allow subclassing of the -# KernelSpecManager for customized behavior. -#c.KernelSpecManager.kernel_spec_class = 'jupyter_client.kernelspec.KernelSpec' - -## Whitelist of allowed kernel names. -# -# By default, all installed kernels are allowed. -#c.KernelSpecManager.whitelist = set() -c.NotebookApp.contents_manager_class = "jupytext.TextFileContentsManager" -c.ContentsManager.default_jupytext_formats = "ipynb,md,py" -c.ContentsManager.preferred_jupytext_formats_save = "py:percent" diff --git a/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings b/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings deleted file mode 100755 index a51ae89..0000000 --- a/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/themes.jupyterlab-settings +++ /dev/null @@ -1,10 +0,0 @@ -{ - // Theme - // @jupyterlab/apputils-extension:themes - // Theme manager settings. - // ************************************* - - // Selected Theme - // [missing schema description] - "theme": "JupyterLab Light" -} \ No newline at end of file diff --git a/.jupyter/lab/user-settings/@jupyterlab/codemirror-extension/commands.jupyterlab-settings b/.jupyter/lab/user-settings/@jupyterlab/codemirror-extension/commands.jupyterlab-settings deleted file mode 100755 index 7450e01..0000000 --- a/.jupyter/lab/user-settings/@jupyterlab/codemirror-extension/commands.jupyterlab-settings +++ /dev/null @@ -1,15 +0,0 @@ -{ - // CodeMirror - // @jupyterlab/codemirror-extension:commands - // Text editor settings for all CodeMirror editors. - // ************************************************ - - // Key Map - // Configures the keymap to use - "keyMap": "vim", - - // Theme - // CSS file defining the corresponding - // .cm-s-[name] styles is loaded - "theme": "solarized dark" -} \ No newline at end of file diff --git a/.jupyter/lab/user-settings/@jupyterlab/extensionmanager-extension/plugin.jupyterlab-settings b/.jupyter/lab/user-settings/@jupyterlab/extensionmanager-extension/plugin.jupyterlab-settings deleted file mode 100755 index c325add..0000000 --- a/.jupyter/lab/user-settings/@jupyterlab/extensionmanager-extension/plugin.jupyterlab-settings +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Extension Manager - // @jupyterlab/extensionmanager-extension:plugin - // Extension manager settings. - // ********************************************* - - // Disclaimed Status - // Whether the user understand that extensions managed through this interface run arbitrary code that may be dangerous - "disclaimed": true, - - // Enabled Status - // Enables extension manager (requires Node.js/npm). - // WARNING: installing untrusted extensions may be unsafe. - "enabled": true -} \ No newline at end of file diff --git a/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/plugin.jupyterlab-settings b/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/plugin.jupyterlab-settings deleted file mode 100755 index 9e26dfe..0000000 --- a/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/plugin.jupyterlab-settings +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings b/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings deleted file mode 100755 index 930c0bc..0000000 --- a/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings +++ /dev/null @@ -1,234 +0,0 @@ -{ - // Keyboard Shortcuts - // @jupyterlab/shortcuts-extension:shortcuts - // Keyboard shortcut settings. - // ***************************************** - - // List of Commands (followed by shortcuts) - // __internal:context-menu-info - // apputils:activate-command-palette - // apputils:print - // completer:invoke - // completer:select - // tooltip:dismiss - // launcher:create - // editmenu:undo - // editmenu:redo - // editmenu:clear-current - // editmenu:clear-all - // editmenu:go-to-line - // filemenu:close-and-cleanup - // filemenu:create-console - // filemenu:shutdown - // filemenu:logout - // kernelmenu:interrupt - // kernelmenu:restart - // kernelmenu:restart-and-clear - // kernelmenu:change - // kernelmenu:shutdown - // kernelmenu:shutdownAll - // runmenu:run - // runmenu:run-all - // runmenu:restart-and-run-all - // viewmenu:line-numbering - // viewmenu:match-brackets - // viewmenu:word-wrap - // tabsmenu:activate-by-id - // tabsmenu:activate-previously-used-tab - // editmenu:open - // filemenu:open - // kernelmenu:open - // runmenu:open - // viewmenu:open - // settingsmenu:open - // tabsmenu:open - // helpmenu:open - // mainmenu:open-first - // documentsearch:start - // documentsearch:highlightNext - // documentsearch:highlightPrevious - // application:activate-next-tab - // application:activate-previous-tab - // application:close - // application:close-all - // application:close-other-tabs - // application:close-right-tabs - // application:toggle-left-area - // application:toggle-right-area - // application:toggle-presentation-mode - // application:set-mode - // application:toggle-mode - // router:tree - // apputils:load-statedb - // apputils:reset - // apputils:reset-on-load - // inspector:open - // htmlviewer:trust-html - // imageviewer:zoom-in - // imageviewer:zoom-out - // imageviewer:reset-image - // imageviewer:rotate-clockwise - // imageviewer:rotate-counterclockwise - // imageviewer:flip-horizontal - // imageviewer:flip-vertical - // imageviewer:invert-colors - // help:about - // help:open - // help:launch-classic-notebook - // docmanager:clone - // docmanager:rename - // docmanager:show-in-file-browser - // docmanager:delete-file - // docmanager:new-untitled - // docmanager:open - // docmanager:open-browser-tab - // docmanager:reload - // docmanager:restore-checkpoint - // docmanager:save - // docmanager:save-all - // docmanager:save-as - // docmanager:toggle-autosave - // sidebar:switch - // apputils:change-theme - // apputils:theme-scrollbars - // apputils:incr-font-size - // apputils:decr-font-size - // statusbar:toggle - // rendermime:handle-local-link - // terminal:create-new - // terminal:open - // terminal:refresh - // terminal:increase-font - // terminal:decrease-font - // terminal:set-theme - // filebrowser:delete - // filebrowser:copy - // filebrowser:cut - // filebrowser:download - // filebrowser:duplicate - // filebrowser:hide-main - // filebrowser:go-to-path - // filebrowser:open-path - // filebrowser:open - // filebrowser:open-browser-tab - // filebrowser:copy-download-link - // filebrowser:paste - // filebrowser:create-new-directory - // filebrowser:rename - // filebrowser:copy-path - // filebrowser:activate - // filebrowser:shutdown - // filebrowser:toggle-main - // filebrowser:create-main-launcher - // filebrowser:toggle-navigate-to-current-directory - // filebrowser:share-main - // markdownviewer:open - // settingeditor:open - // settingeditor:revert - // settingeditor:save - // notebook:run-cell-and-select-next - // notebook:run-cell - // notebook:run-cell-and-insert-below - // notebook:run-in-console - // notebook:run-all-cells - // notebook:run-all-above - // notebook:run-all-below - // notebook:render-all-markdown - // notebook:restart-kernel - // notebook:close-and-shutdown - // notebook:trust - // notebook:export-to-format - // notebook:restart-clear-output - // notebook:restart-run-all - // notebook:clear-all-cell-outputs - // notebook:clear-cell-output - // notebook:interrupt-kernel - // notebook:change-cell-to-code - // notebook:change-cell-to-markdown - // notebook:change-cell-to-raw - // notebook:cut-cell - // notebook:copy-cell - // notebook:paste-cell-below - // notebook:paste-cell-above - // notebook:paste-and-replace-cell - // notebook:delete-cell - // notebook:split-cell-at-cursor - // notebook:merge-cells - // notebook:insert-cell-above - // notebook:insert-cell-below - // notebook:move-cursor-up - // notebook:move-cursor-down - // notebook:extend-marked-cells-above - // notebook:extend-marked-cells-below - // notebook:select-all - // notebook:deselect-all - // notebook:move-cell-up - // notebook:move-cell-down - // notebook:toggle-all-cell-line-numbers - // notebook:enter-command-mode - // notebook:enter-edit-mode - // notebook:undo-cell-action - // notebook:redo-cell-action - // notebook:change-kernel - // notebook:reconnect-to-kernel - // notebook:create-output-view - // notebook:create-console - // notebook:change-cell-to-heading-1 - // notebook:change-cell-to-heading-2 - // notebook:change-cell-to-heading-3 - // notebook:change-cell-to-heading-4 - // notebook:change-cell-to-heading-5 - // notebook:change-cell-to-heading-6 - // notebook:hide-cell-code - // notebook:show-cell-code - // notebook:hide-all-cell-code - // notebook:show-all-cell-code - // notebook:hide-cell-outputs - // notebook:show-cell-outputs - // notebook:hide-all-cell-outputs - // notebook:show-all-cell-outputs - // notebook:enable-output-scrolling - // notebook:disable-output-scrolling - // notebook:create-new - // completer:invoke-notebook - // completer:select-notebook - // tooltip:launch-notebook - // - // Note: To disable a system default shortcut, - // copy it to User Preferences and add the - // "disabled" key, for example: - // { - // "command": "application:activate-next-tab", - // "keys": [ - // "Ctrl Shift ]" - // ], - // "selector": "body", - // "disabled": true - // } - // - // List of Keyboard Shortcuts - "shortcuts": [ - { - "command": "notebook:move-cell-down", - "keys": [ - "Accel ArrowDown" - ], - "selector": ".jp-Notebook:focus" - }, - { - "command": "notebook:move-cell-up", - "keys": [ - "Accel ArrowUp" - ], - "selector": ".jp-Notebook:focus" - }, - { - "command": "jupyterlab_code_formatter:black", - "keys": [ - "Ctrl B", - "Ctrl L" - ], - "selector": ".jp-Notebook.jp-mod-editMode" - } - ] -} diff --git a/.jupyter/migrated b/.jupyter/migrated deleted file mode 100755 index 1bab1f3..0000000 --- a/.jupyter/migrated +++ /dev/null @@ -1 +0,0 @@ -2018-12-05T20:14:20.519009 \ No newline at end of file diff --git a/.jupyter/nbconfig/common.json b/.jupyter/nbconfig/common.json deleted file mode 100755 index 19150cf..0000000 --- a/.jupyter/nbconfig/common.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nbext_hide_incompat": false -} \ No newline at end of file diff --git a/.jupyter/nbconfig/edit.json b/.jupyter/nbconfig/edit.json deleted file mode 100755 index 746eb92..0000000 --- a/.jupyter/nbconfig/edit.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "load_extensions": { - "ruler/edit": false - }, - "ruler_column": [ - "78" - ] -} \ No newline at end of file diff --git a/.jupyter/nbconfig/notebook.json b/.jupyter/nbconfig/notebook.json deleted file mode 100755 index a824da7..0000000 --- a/.jupyter/nbconfig/notebook.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "load_extensions": { - "jupyter-js-widgets/extension": true, - "jupyter_boilerplate/main": false, - "nbextensions_configurator/config_menu/main": true, - "contrib_nbextensions_help_item/main": true, - "snippets/main": false, - "snippets_menu/main": true, - "collapsible_headings/main": true, - "code_prettify/code_prettify": true, - "init_cell/main": true, - "zenmode/main": true, - "ruler/main": true, - "keyboard_shortcut_editor/main": true, - "nodebook/nodebookext": false - }, - "Cell": { - "cm_config": { - "lineNumbers": false - } - } -} \ No newline at end of file diff --git a/.jupyter/nbconfig/tree.json b/.jupyter/nbconfig/tree.json deleted file mode 100755 index 7a2dee1..0000000 --- a/.jupyter/nbconfig/tree.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "load_extensions": { - "nbextensions_configurator/tree_tab/main": true - } -} \ No newline at end of file diff --git a/.t b/.t deleted file mode 100644 index e69de29..0000000 diff --git a/.taskrc b/.taskrc deleted file mode 100755 index 5e258cc..0000000 --- a/.taskrc +++ /dev/null @@ -1,42 +0,0 @@ -# [Created by task 2.5.1 11/1/2018 09:56:33] -# Taskwarrior program configuration file. -# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color', -# 'man task-sync' or 'man taskrc' - -# Here is an example of entries that use the default, override and blank values -# variable=foo -- By specifying a value, this overrides the default -# variable= -- By specifying no value, this means no default -# #variable=foo -- By commenting out the line, or deleting it, this uses the default - -# Use the command 'task show' to see all defaults and overrides - -# Files -data.location=~/.task - -# Color theme (uncomment one to use) -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/light-16.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/light-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-16.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-red-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-green-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-blue-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-violets-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-yellow-green.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-gray-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-gray-blue-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/solarized-dark-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/solarized-light-256.theme -#include /usr/local/Cellar/task/2.5.1/share/doc/task/rc/no-color.theme - -taskd.server=freecinc.com:53589 -taskd.key=\/home\/mpjuers\/.task\/freecinc_dfd3a482.key.pem -taskd.certificate=\/home\/mpjuers\/.task\/freecinc_dfd3a482.cert.pem -taskd.ca=\/home\/mpjuers\/.task\/freecinc_dfd3a482.ca.pem -taskd.aa-917d-7f4786d0b801credentials=FreeCinc\/freecinc_dfd3a482\/7b55fa76-27f1-4aaa-917d-7f4786d0b801 -taskd.credentials=FreeCinc\/freecinc_dfd3a482\/7b55fa76-27f1-4aaa-917d-7f4786d0b801 -report.notes.description=Miscellaneous notes -report.notes.columns=id,description -report.notes.labels=ID,Note -report.notes.filter=status:pending and +notes -report.list.filter=-notes and status:pending diff --git a/.test b/.test deleted file mode 100644 index e69de29..0000000 diff --git a/.tmux.conf b/.tmux.conf index 15f42b0..5c2c248 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -4,16 +4,12 @@ unbind C-t set-option -g prefix C-a bind-key a send-prefix -set-option default-terminal "tmux-256color" -set-option -a terminal-overrides ",*256color*:Tc" -set-option -g default-shell /usr/local/bin/fish unbind t bind t new-window unbind n -bind C-] next-window -bind C-[ previous-window +bind -n M-Right next-window +bind -n M-Left previous-window -set-option -sa terminal-overrides ',tmux-256color:RGB' # split panes using | and - unbind '"' @@ -27,17 +23,17 @@ set -sg escape-time 0 set-option -g base-index 1 set-window-option -g pane-base-index 1 -# # Mouse works as expected +# # # Mouse works as expected # set -g mode-mouse on # set -g mouse-select-pane on # set -g mouse-resize-pane on # set -g mouse-select-window on # move around panes with hjkl, as one would in vim after pressing ctrl-w -bind -r M-h select-pane -L -bind -r M-j select-pane -D -bind -r M-k select-pane -U -bind -r M-l select-pane -R +bind -n C-h select-pane -L +bind -n C-j select-pane -D +bind -n C-k select-pane -U +bind -n C-l select-pane -R # resize panes like vim # feel free to change the "1" to however many lines you want to resize by, only @@ -56,35 +52,12 @@ set-window-option -g mode-keys vi # # clear buffer with C-k # bind C-k send-keys -R \; clear-history -set -g @continuum-boot-options 'iterm' -set -g @continuum-boot 'on' -# set -g @resurrect-strategy-nvim 'session' -set -g @continuum-restore 'on' -set -g @continuum-save-interval '10' # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' -# set -g @plugin 'tmux-plugins/tmux-resurrect' -# set -g @plugin 'tmux-plugins/tmux-continuum' -set -g @plugin 'tonylambiris/palenight-tmux' - -# Other examples: -# set -g @plugin 'github_username/plugin_name' -# set -g @plugin 'git@github.com/user/plugin' -# set -g @plugin 'git@bitbucket.com/user/plugin' - -# set -g @resurrect-save 'S' -# set -g @resurrect-restore 'R' -bind C-r source-file ~/.config/tmux/session1 - - # for vim - # set -g @resurrect-strategy-vim 'session' - # for neovim - # set -g @resurrect-strategy-nvim 'session' - -source ~/.tmux.conf.d/nested-tmux/active-row.conf - +set -g @plugin 'dracula/tmux' set -g focus-events on +set -g default-terminal "screen-256color" # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm' diff --git a/.tmux.conf.backup b/.tmux.conf.backup deleted file mode 100755 index 1044e78..0000000 --- a/.tmux.conf.backup +++ /dev/null @@ -1,87 +0,0 @@ -# change prefix fromm 'C-b' to 'C-a' -unbind C-b -set-option -g prefix C-a -bind-key a send-prefix - -set-option default-terminal "tmux-256color" -# set-option -a terminal-overrides ",*256color*:Tc" -set-option -g default-shell /usr/local/bin/fish -unbind t -bind t new-window -unbind n -bind C-] next-window -bind C-[ previous-window - -# split panes using | and - -unbind '"' -unbind % -bind | split-window -h -bind _ split-window -v - -set -sg escape-time 0 - -# Start window numbering at 1 -set-option -g base-index 1 -set-window-option -g pane-base-index 1 - -# # Mouse works as expected -# set -g mode-mouse on -# set -g mouse-select-pane on -# set -g mouse-resize-pane on -# set -g mouse-select-window on - -# move around panes with hjkl, as one would in vim after pressing ctrl-w -bind -r M-h select-pane -L -bind -r M-j select-pane -D -bind -r M-k select-pane -U -bind -r M-l select-pane -R - -# resize panes like vim -# feel free to change the "1" to however many lines you want to resize by, only -# one at a time can be slow -bind < resize-pane -L 10 -bind > resize-pane -R 10 -bind - resize-pane -D 10 -bind + resize-pane -U 10 - - -# vim paste -unbind p -bind p paste-buffer -set-window-option -g mode-keys vi - -# # clear buffer with C-k -# bind C-k send-keys -R \; clear-history - -set -g @continuum-boot-options 'iterm' -set -g @continuum-boot 'on' -# set -g @resurrect-strategy-nvim 'session' -set -g @continuum-restore 'on' -set -g @continuum-save-interval '10' -# List of plugins -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-sensible' -# set -g @plugin 'tmux-plugins/tmux-resurrect' -# set -g @plugin 'tmux-plugins/tmux-continuum' -set -g @plugin 'tonylambiris/palenight-tmux' - -# Other examples: -# set -g @plugin 'github_username/plugin_name' -# set -g @plugin 'git@github.com/user/plugin' -# set -g @plugin 'git@bitbucket.com/user/plugin' - -# set -g @resurrect-save 'S' -# set -g @resurrect-restore 'R' -bind C-r source-file ~/.config/tmux/session1 - - # for vim - # set -g @resurrect-strategy-vim 'session' - # for neovim - # set -g @resurrect-strategy-nvim 'session' - -source ~/.tmux.conf.d/nested-tmux/active-row.conf - -set -g focus-events on - -# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run -b '~/.tmux/plugins/tpm/tpm' diff --git a/.tmux.conf.d/.tmux.conf.d b/.tmux.conf.d/.tmux.conf.d new file mode 120000 index 0000000..304826d --- /dev/null +++ b/.tmux.conf.d/.tmux.conf.d @@ -0,0 +1 @@ +/home/njuers/dotfiles/.tmux.conf.d \ No newline at end of file diff --git a/.tmux.conf.d/nested-tmux b/.tmux.conf.d/nested-tmux deleted file mode 160000 index ae3e17b..0000000 --- a/.tmux.conf.d/nested-tmux +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae3e17bb4440c4c711e4c9e2df1122f881e095b5 diff --git a/.tmux.conf.d/nested-tmux/LICENSE b/.tmux.conf.d/nested-tmux/LICENSE new file mode 100644 index 0000000..fed55f5 --- /dev/null +++ b/.tmux.conf.d/nested-tmux/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Alessandro Di Federico + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.tmux.conf.d/nested-tmux/README.md b/.tmux.conf.d/nested-tmux/README.md new file mode 100644 index 0000000..41d8b3b --- /dev/null +++ b/.tmux.conf.d/nested-tmux/README.md @@ -0,0 +1,54 @@ +# Nested tmux + +This is a simple tmux configuration enabling to have arbitrarily many nested tmux sessions. + +# Demo + +![Demo](/demo.gif?raw=true "Demo") + +# Quick start + +``` +mkdir ~/.tmux.conf.d/ +cd ~/.tmux.conf.d/ +git clone https://github.com/aleclearmind/nested-tmux.git +mv ~/.tmux.conf ~/.tmux.conf.backup +echo "source ~/.tmux.conf.d/nested-tmux/active-row.conf" > ~/.tmux.conf +tmux +``` + +# Shortcuts + +* `Ctrl + a, Ctrl + c` or `Ctrl + t`: create a new window +* `Ctrl + a, Ctrl + s`: create a new nested tmux session and ask a name for it +* `Ctrl + a, Ctrl + A`: switch to last window +* `Ctrl + a, A`: rename current window +* `Alt + Right`: move to the next window of the current row +* `Alt + Left`: move to the previous window of the current row +* `Alt + Up`: move to the inner tmux session +* `Alt + Down`: move to the outer tmux session + +# FAQ + +* **Q**: Why do we need this? + + **A**: When working with many projects it's useful to have a dedicated tmux session with three windows per-project: one with a text editor, one for git and one for the build directory. + This is why this project was born. + However, nested tmux sessions are addictive and quickly become in-terminal *workspaces* that can be used for any purpose. + +* **Q**: Does it support multiple nested layers of tmux sessions? + + **A**: Yes. + +* **Q**: Has it been tested with other configuration X? + + **A**: No. + +* **Q**: How is this implemented? + + **A**: The idea is two have two configurations, `active-row.conf` and `inactive-row.conf`. + The former is for the currently active row in the nested tmux tree, the second for the inactive rows. + Each session know who its parent is through the `TMUX_PARENT` environment variable (set in the `new-tmux` script). + When `Alt + Up` is pressed, the `Alt + F12` combination is sent to the active window. + If the active window is a nested tmux session, it will load `active-row.conf` and forces loading `inactive-row.conf` in its parent (i.e., the row that originally received the `Alt + Up` key combination. + When `Alt + Down` is pressed, the current row loads `inactive-row.conf` and forces loading `active-row.conf` in its parent. diff --git a/.tmux.conf.d/nested-tmux/active-row.conf b/.tmux.conf.d/nested-tmux/active-row.conf new file mode 100644 index 0000000..674f3fe --- /dev/null +++ b/.tmux.conf.d/nested-tmux/active-row.conf @@ -0,0 +1,88 @@ +# +# Colors +# +active_window_bg="#c792ea" +inactive_window_bg="#292d3e" +bar_bg=colour237 +bar_fg=colour255 + +# +# General settings +# +set -g default-terminal tmux-256color +set -g status-right '' +set -g status-left '' +set -g history-limit 100000 + +# +# Configure prefix +# +unbind C-b +set -g prefix C-a + +# +# Prefixed commands +# + +# Create a new window (Ctrl + A, Ctrl + c) +bind C-c new-window + +# Create a new nested tmux (Ctrl + A, Ctrl + m) +bind C-m new-window ~/.tmux.conf.d/nested-tmux/new-tmux \; \ + rename-window '' \; \ + command-prompt -I "#W" "rename-window -- '%%'" + +# Switch to last window (Ctrl + A, Ctrl + A) +bind C-a last-window + +# Rename current window (Ctrl + A, A) +bind A rename-window '' \; \ + command-prompt -I "#W" "rename-window -- '%%'" + +# Enable search mode +bind -T copy-mode -n / command-prompt -i -I "#{pane_search_string}" -p "(search down)" "send -X search-forward-incremental \"%%%\"" + +# +# Non-prefixed commands +# + +# Go to next window (Alt + Right) +bind -n M-right next + +# Go to previous window (Alt + Left) +bind -n M-left prev + +# # Create new window (Ctrl + t) +# bind -n C-t new-window + +# Switch to inner tmux (Alt + Up) +bind -n M-up send-keys M-F12 + +# Switch to outer tmux (Alt + Down) +bind -n M-down source-file ~/.tmux.conf.d/nested-tmux/inactive-row.conf \; \ + run-shell 'tmux -L $TMUX_PARENT source-file ~/.tmux.conf.d/nested-tmux/active-row.conf' \; \ + run-shell 'tmux -L $TMUX_PARENT set -g window-status-current-style bg=$active_window_bg' + +# Handler for becoming active (Alt + F12, don't use directly) +bind -n M-F12 run-shell 'tmux -L $TMUX_PARENT source-file ~/.tmux.conf.d/nested-tmux/inactive-row.conf' \; \ + source-file ~/.tmux.conf.d/nested-tmux/active-row.conf \; \ + set -g window-status-current-style bg=$active_window_bg + +# Handler for closed window: enable outer terminal +set-hook -g client-detached "run-shell 'tmux -L $TMUX_PARENT source-file ~/.tmux.conf.d/nested-tmux/active-row.conf && tmux -L $TMUX_PARENT set -g window-status-current-style bg=$active_window_bg'" + +# +# Appearance +# +set -g status-style bg=$bar_bg +setw -g window-status-style fg=$bar_fg +setw -g window-status-current-format ' #I #W ' +setw -g window-status-format ' #I #W ' +setw -g window-status-current-style bg=$active_window_bg +source ~/.tmux/plugins/palenight-tmux/theme/palenight-status-content.conf + +# If we're the root tmux, unbind M-down +if-shell 'test -z "$TMUX_PARENT"' 'bind -n M-down send-keys ""' '' + +# When a new session is created unbind the parent +if-shell 'test -z "$TMUX_PARENT"' '' 'run-shell "tmux -L $TMUX_PARENT source-file ~/.tmux.conf.d/nested-tmux/inactive-row.conf"' diff --git a/.tmux.conf.d/nested-tmux/demo.gif b/.tmux.conf.d/nested-tmux/demo.gif new file mode 100644 index 0000000..fccc00c Binary files /dev/null and b/.tmux.conf.d/nested-tmux/demo.gif differ diff --git a/.tmux.conf.d/nested-tmux/inactive-row.conf b/.tmux.conf.d/nested-tmux/inactive-row.conf new file mode 100644 index 0000000..29c7235 --- /dev/null +++ b/.tmux.conf.d/nested-tmux/inactive-row.conf @@ -0,0 +1,14 @@ +source ~/.tmux/plugins/palenight-tmux/theme/palenight-status-content-inactive.conf + +# Change the background color to unactive +setw -g window-status-current-style bg=$inactive_window_bg + +# Unbind prefix +set -u -g prefix C-a + +# Unbind each unprefixed command +unbind -n M-left +unbind -n M-right +unbind -n M-up +unbind -n M-down +unbind -n C-t diff --git a/.tmux.conf.d/nested-tmux/new-tmux b/.tmux.conf.d/nested-tmux/new-tmux new file mode 100755 index 0000000..8418001 --- /dev/null +++ b/.tmux.conf.d/nested-tmux/new-tmux @@ -0,0 +1,7 @@ +#!/bin/bash + +TMUX_PARENT=$(basename "$TMUX") +TMUX_PARENT="${TMUX_PARENT%%,*}" +export TMUX_PARENT + +tmux -L "r$RANDOM" diff --git a/.tmux/plugins/palenight-tmux b/.tmux/plugins/palenight-tmux deleted file mode 160000 index a1bae1a..0000000 --- a/.tmux/plugins/palenight-tmux +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a1bae1ab9e1c73465e3e49fc09dddff1e99609f0 diff --git a/.tmux/plugins/palenight-tmux/LICENSE.md b/.tmux/plugins/palenight-tmux/LICENSE.md new file mode 100644 index 0000000..691d893 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Tony Lambiris + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.tmux/plugins/palenight-tmux/README.md b/.tmux/plugins/palenight-tmux/README.md new file mode 100644 index 0000000..91fd769 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/README.md @@ -0,0 +1,21 @@ +# palenight tmux colour theme +A tmux theme with dark colours inspired by the drewtempelmeyer/palenight.vim theme for Vim/Neovim. +Much of the work was forked from the mbdimitrova/tmux-wolfpack theme. + +## Installation +You can install the theme in two ways: + +### Add to your .tmux.conf +Append the content of `palenight.tmux` to `.tmux.conf`: + +```cat theme/palenight.tmux >> ~/.tmux.conf``` + +### [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) +Add as a plugin to the list of TPM plugins in `.tmux.conf`: + +```set -g @plugin 'tonylambiris/palenight-tmux'``` + +Hit `prefix + I` to fetch the plugin and source it. + +## Screenshots +Coming soon diff --git a/.tmux/plugins/palenight-tmux/palenight.tmux b/.tmux/plugins/palenight-tmux/palenight.tmux new file mode 100755 index 0000000..cdbf8f8 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/palenight.tmux @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +PALENIGHT_TMUX_COLOR_THEME_FILE="theme/palenight.conf" +PALENIGHT_TMUX_STATUS_CONTENT_FILE="theme/palenight-status-content.conf" +PALENIGHT_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE="theme/palenight-status-content-no-patched-font.conf" +PALENIGHT_TMUX_STATUS_CONTENT_OPTION="@palenight_tmux_show_status_content" +PALENIGHT_TMUX_NO_PATCHED_FONT_OPTION="@palenight_tmux_no_patched_font" +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +__cleanup() { + unset -v PALENIGHT_TMUX_COLOR_THEME_FILE PALENIGHT_TMUX_VERSION + unset -v PALENIGHT_TMUX_STATUS_CONTENT_FILE PALENIGHT_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE + unset -v PALENIGHT_TMUX_STATUS_CONTENT_OPTION PALENIGHT_TMUX_NO_PATCHED_FONT_OPTION + unset -v CURRENT_DIR + unset -f __load __cleanup __source +} + +__load() { + local status_content no_patched_font + + __source "$CURRENT_DIR/$PALENIGHT_TMUX_COLOR_THEME_FILE" + + status_content=$(tmux show-option -gqv "$PALENIGHT_TMUX_STATUS_CONTENT_OPTION") + no_patched_font=$(tmux show-option -gqv "$PALENIGHT_TMUX_NO_PATCHED_FONT_OPTION") + + if [ "$status_content" != "0" ]; then + if [ "$no_patched_font" != "1" ]; then + __source "$CURRENT_DIR/$PALENIGHT_TMUX_STATUS_CONTENT_FILE" + else + __source "$CURRENT_DIR/$PALENIGHT_TMUX_STATUS_CONTENT_NO_PATCHED_FONT_FILE" + fi + fi +} + +__source() { + test -z $1 || tmux source-file -q "$1" +} + +__load +__cleanup diff --git a/.tmux/plugins/palenight-tmux/theme/palenight-status-content-inactive.conf b/.tmux/plugins/palenight-tmux/theme/palenight-status-content-inactive.conf new file mode 100644 index 0000000..0618803 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/theme/palenight-status-content-inactive.conf @@ -0,0 +1,21 @@ +#+----------------+ +#+ Plugin Support + +#+----------------+ +#+--- tmux-prefix-highlight ---+ +set -g @prefix_highlight_output_prefix "#[fg=#89DDFF]#[bg=#c792ea]#[nobold]#[noitalics]#[nounderscore]#[bg=#89DDFF]#[fg=default]" +set -g @prefix_highlight_output_suffix "" +set -g @prefix_highlight_show_copy_mode 'on' +set -g @prefix_highlight_copy_mode_attr "fg=#ffcb6b,bg=default,bold" + +#+--------+ +#+ Status + +#+--------+ +#+--- Bars ---+ +set -g status-left "#[fg=#292D3E,bg=#ffcb6b,bold] #S #[fg=#ffcb6b,bg=default,nobold,noitalics,nounderscore]" +set -g status-right "" + +#+--- Windows ---+ +set -g window-status-format "#[fg=colour235,bg=#3E4452,nobold,noitalics,nounderscore] #[fg=#82aaff,bg=#3E4452]#I #[fg=#82aaff,bg=#3E4452,nobold,noitalics,nounderscore] #[fg=#82aaff,bg=#3E4452]#W #F #[fg=#3E4452,bg=default,nobold,noitalics,nounderscore]" +set -g window-status-current-format "#[fg=colour235,bg=#82aaff,nobold,noitalics,nounderscore] #[fg=#292D3E,bg=#82aaff]#I #[fg=#292D3E,bg=#82aaff,nobold,noitalics,nounderscore] #[fg=#292D3E,bg=#82aaff]#W #F #[fg=#82aaff,bg=default,nobold,noitalics,nounderscore]" +set -g window-status-separator "" +set -g monitor-activity off diff --git a/.tmux/plugins/palenight-tmux/theme/palenight-status-content-no-patched-font.conf b/.tmux/plugins/palenight-tmux/theme/palenight-status-content-no-patched-font.conf new file mode 100644 index 0000000..5674922 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/theme/palenight-status-content-no-patched-font.conf @@ -0,0 +1,18 @@ +#+----------------+ +#+ Plugin Support + +#+----------------+ +#+--- tmux-prefix-highlight ---+ +set -g @prefix_highlight_copy_mode_attr "fg=#ffcb6b,bg=default" + +#+--------+ +#+ Status + +#+--------+ +#+--- Bars ---+ +set -g status-left "#[fg=#292D3E,bg=#ffcb6b,bold] #S #[fg=#ffcb6b,bg=default,nobold,noitalics,nounderscore]" +set -g status-right "#{prefix_highlight}#[fg=#c792ea,bg=#3E4452] %Y-%m-%d #[fg=#c792ea,bg=#3E4452,nobold,noitalics,nounderscore]|#[fg=#c792ea,bg=#3E4452] %H:%M #[fg=#c792ea,bg=#3E4452,nobold,noitalics,nounderscore]#[fg=#292D3E,bg=#c792ea,bold] #H " + +#+--- Windows ---+ +set -g window-status-format "#[fg=#c792ea,bg=#3E4452] #I #[fg=#c792ea,bg=#3E4452] #W #F #[fg=#3E4452,bg=default,nobold,noitalics,nounderscore]" +set -g window-status-current-format "#[fg=#292D3E,bg=#c792ea] #I #[fg=#292D3E,bg=#c792ea] #W #F #[fg=#c792ea,bg=default,nobold,noitalics,nounderscore]" +set -g window-status-separator "" +set -g monitor-activity off diff --git a/.tmux/plugins/palenight-tmux/theme/palenight-status-content.conf b/.tmux/plugins/palenight-tmux/theme/palenight-status-content.conf new file mode 100644 index 0000000..3df7b15 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/theme/palenight-status-content.conf @@ -0,0 +1,21 @@ +#+----------------+ +#+ Plugin Support + +#+----------------+ +#+--- tmux-prefix-highlight ---+ +set -g @prefix_highlight_output_prefix "#[fg=#89DDFF]#[bg=#c792ea]#[nobold]#[noitalics]#[nounderscore]#[bg=#89DDFF]#[fg=default]" +set -g @prefix_highlight_output_suffix "" +set -g @prefix_highlight_show_copy_mode 'on' +set -g @prefix_highlight_copy_mode_attr "fg=#ffcb6b,bg=default,bold" + +#+--------+ +#+ Status + +#+--------+ +#+--- Bars ---+ +set -g status-left "#[fg=#292D3E,bg=#ffcb6b,bold] #S #[fg=#ffcb6b,bg=default,nobold,noitalics,nounderscore]" +set -g status-right "#{prefix_highlight}#[fg=#3E4452,bg=default,nobold,noitalics,nounderscore]#[fg=#82aaff,bg=#3E4452] %Y-%m-%d #[fg=#82aaff,bg=#3E4452,nobold,noitalics,nounderscore]#[fg=#82aaff,bg=#3E4452] %H:%M #[fg=#82aaff,bg=#3E4452,nobold,noitalics,nounderscore]#[fg=#292D3E,bg=#82aaff,bold] #H " + +#+--- Windows ---+ +set -g window-status-format "#[fg=colour235,bg=#3E4452,nobold,noitalics,nounderscore] #[fg=#82aaff,bg=#3E4452]#I #[fg=#82aaff,bg=#3E4452,nobold,noitalics,nounderscore] #[fg=#82aaff,bg=#3E4452]#W #F #[fg=#3E4452,bg=default,nobold,noitalics,nounderscore]" +set -g window-status-current-format "#[fg=colour235,bg=#82aaff,nobold,noitalics,nounderscore] #[fg=#292D3E,bg=#82aaff]#I #[fg=#292D3E,bg=#82aaff,nobold,noitalics,nounderscore] #[fg=#292D3E,bg=#82aaff]#W #F #[fg=#82aaff,bg=default,nobold,noitalics,nounderscore]" +set -g window-status-separator "" +set -g monitor-activity off diff --git a/.tmux/plugins/palenight-tmux/theme/palenight.conf b/.tmux/plugins/palenight-tmux/theme/palenight.conf new file mode 100644 index 0000000..130c040 --- /dev/null +++ b/.tmux/plugins/palenight-tmux/theme/palenight.conf @@ -0,0 +1,45 @@ +#+----------------+ +#+ Plugin Support + +#+----------------+ +#+--- tmux-prefix-highlight ---+ +set -g @prefix_highlight_fg #292D3E +set -g @prefix_highlight_bg #89DDFF + +#+---------+ +#+ Options + +#+---------+ +set -g status-interval 1 +set -g status on + +#+--------+ +#+ Status + +#+--------+ +#+--- Layout ---+ +set -g status-justify left + +#+--- Colors ---+ +set -g status-bg colour235 +set -g status-fg default +set -g status-attr default + +#+-------+ +#+ Panes + +#+-------+ +set -g pane-border-bg #292D3E +set -g pane-border-fg #292D3E +set -g pane-active-border-fg #3E4452 +set -g display-panes-colour #292D3E +set -g display-panes-active-colour #3E4452 + +#+------------+ +#+ Clock Mode + +#+------------+ +setw -g clock-mode-colour #89DDFF + +#+----------+ +#+ Messages + +#+---------+ +set -g message-fg #89DDFF +set -g message-bg #3E4452 +set -g message-command-fg #89DDFF +set -g message-command-bg #3E4452 diff --git a/.tmux/plugins/tmux-continuum b/.tmux/plugins/tmux-continuum deleted file mode 160000 index 190ea9d..0000000 --- a/.tmux/plugins/tmux-continuum +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 190ea9dd2bf58f165333b0e5f8400589e7cf0ee8 diff --git a/.tmux/plugins/tmux-resurrect b/.tmux/plugins/tmux-resurrect deleted file mode 160000 index 199b32b..0000000 --- a/.tmux/plugins/tmux-resurrect +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 199b32b44956633a979a56cdf6a077c233447862 diff --git a/.tmux/plugins/tmux-sensible b/.tmux/plugins/tmux-sensible index 5d089e4..25cb91f 160000 --- a/.tmux/plugins/tmux-sensible +++ b/.tmux/plugins/tmux-sensible @@ -1 +1 @@ -Subproject commit 5d089e418efb1a00f47654014ed085deb3d0c878 +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/.tmux/plugins/tpm b/.tmux/plugins/tpm index b699a7e..fdb3022 160000 --- a/.tmux/plugins/tpm +++ b/.tmux/plugins/tpm @@ -1 +1 @@ -Subproject commit b699a7e01c253ffb7818b02d62bce24190ec1019 +Subproject commit fdb30228b1dc649ab1c2086d146ef9dd0ab584e6 diff --git a/.tmux/plugins/vim-tmux-navigator b/.tmux/plugins/vim-tmux-navigator deleted file mode 160000 index 9ca5bfe..0000000 --- a/.tmux/plugins/vim-tmux-navigator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9ca5bfe5bd274051b5dd796cc150348afc993b80 diff --git a/.vimrc b/.vimrc old mode 100755 new mode 100644 index ec6e881..67dec4b --- a/.vimrc +++ b/.vimrc @@ -1,71 +1,63 @@ -" set the runtime path to include Vundle and initialize -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#begin() -" " alternatively, pass a path where Vundle should install plugins -" "call vundle#begin('~/some/path/here') -" -" " let Vundle manage Vundle, required -Plugin 'VundleVim/Vundle.vim'" -" Plug 'kopischke/vim-stay' " This isn't working properly for some reason -" Plug 'vim-syntastic/syntastic' -Plugin 'altercation/vim-colors-solarized' -Plugin 'arcticicestudio/nord-vim' -Plugin 'chrisbra/csv.vim' -Plugin 'christoomey/vim-tmux-navigator' -Plugin 'ctrlpvim/ctrlp.vim' -Plugin 'dag/vim-fish' -Plugin 'fs111/pydoc.vim' -Plugin 'jeffkreeftmeijer/vim-dim' -Plugin 'jeffkreeftmeijer/vim-numbertoggle' -Plugin 'jiangmiao/auto-pairs' -Plugin 'itchyny/lightline.vim' -Plugin 'kana/vim-submode' -Plugin 'kchmck/vim-coffee-script' -Plugin 'Konfekt/FastFold' -Plugin 'python/black' -Plugin 'tacahiroy/ctrlp-funky' -Plugin 'tmhedberg/SimpylFold' -Plugin 'tpope/vim-commentary' -Plugin 'tpope/vim-fugitive' -Plugin 'tpope/vim-repeat' -Plugin 'tpope/vim-surround' -Plugin 'tpope/vim-unimpaired' -Plugin 'tpope/vim-vinegar' -Plugin 'Vimjas/vim-python-pep8-indent' -Plugin 'wesQ3/vim-windowswap' -Plugin 'Yggdroot/indentLine' -" All of your Plugins must be added before the following line -call vundle#end() " required -filetype plugin indent on " required -" " To ignore plugin indent changes, instead use: -" "filetype plugin on -" " -" " Brief help -" " :PluginList - lists configured plugins -" " :PluginInstall - installs plugins; append `!` to update or just -" :PluginUpdate -" " :PluginSearch foo - searches for foo; append `!` to refresh local cache -" " :PluginClean - confirms removal of unused plugins; append `!` to -" auto-approve removal -" " -" " see :h vundle for more details or wiki for FAQ -" " Put your non-Plugin stuff after this line -" " - -" let g:python3_host_prog = "/N/u/mpjuers/Carbonate/.pyenv/versions/neovim3/bin/python" - -" Press F4 to toggle highlighting on/off, and show current value. -noremap :set hlsearch! hlsearch? - +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif +call plug#begin() +Plug 'andymass/vim-matchup' +Plug 'dracula/vim' +" Plug 'dag/vim-fish' +Plug 'elzr/vim-json' +Plug 'fs111/pydoc.vim' +Plug 'jeffkreeftmeijer/vim-numbertoggle' +Plug 'jiangmiao/auto-pairs' +" Plug 'jpalardy/vim-slime' +Plug 'Konfekt/FastFold' +"" Why won't this work? +" Plug 'lukas-reineke/indent-blankline.nvim' +Plug 'mpjuers/showcontext' +"" To set up later +" Plug 'spinks/vim-leader-guide' +" Pragmatic folding for .py +Plug 'tmhedberg/SimpylFold' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-surround' +Plug 'Vimjas/vim-python-pep8-indent' +Plug 'wesQ3/vim-windowswap' +call plug#end() + +" let g:slime_target="neovim" +" xmap SlimeRegionSend +" nmap SlimeParagraphSend + +" let g:slime_target="neovim" +" xmap SlimeRegionSend +" nmap SlimeParagraphSend + +" " Enable true color 启用终端24位色 +" if exists('+termguicolors') +" let &t_8f = "\[38;2;%lu;%lu;%lum" +" let &t_8b = "\[48;2;%lu;%lu;%lum" +" set termguicolors +" endif + +" remap Omni completion +inoremap xx +inoremap xf + +" Use neovim-remote as git editor +if has('nvim') + let $GIT_EDITOR = 'nvr -cc tabnew --remote-wait' +endif -" for automatic reloading of changed files -autocmd FocusGained,BufEnter * :silent! ! -autocmd FocusLost,WinLeave * :silent! noautocmd w +let g:python3_host_prog = "/usr/local/Caskroom/miniconda/base/bin/python" +let $VIMHOME = expand(':p:h') -" automatically set working directory to current file -autocmd BufEnter * silent! lcd %:p:h +" Press F4 to toggle highlighting on/off, and show current value. +noremap :set hlsearch! hlsearch? nnoremap :set relativenumber! @@ -75,52 +67,33 @@ nnoremap k gk nnoremap gj j nnoremap gk k -" popup menu for spelling -nnoremap z= ea - " window " new window takes up entire width/height of screen -nmap swh :topleft vnew +nmap swh :topleft vnew nmap swl :botright vnew -nmap swk :topleft new -nmap swj :botright new +nmap swk :topleft new +nmap swj :botright new " buffer " new window takes up half of current window width/height -nmap sh :leftabove vnew -nmap sl :rightbelow vnew -nmap sk :leftabove new -nmap sj :rightbelow new - -" insert newline after and before enclosing braces -nmap (( getline(".")[col(".")-1] == "(" ? 'a?(%i' : '' +nmap sh :leftabove vnew +nmap sl :rightbelow vnew +nmap sk :leftabove new +nmap sj :rightbelow new -noremap :w !detex \| wc -w +" " Word count for latex +" noremap :w !detex \| wc -w " show open buffers with f5 noremap :buffers:buffer " open term window -noremap tj :belowright new \| resize 15 \| set wfh \| term +noremap tj :belowright new \| resize 15 \| set wfh \| term noremap twj :botright new \| resize 15 \| set wfh \| term -noremap twl :botright vnew \| vertical resize 80 \| set wfw \| term - -let w:locallist_open = 0 -function! Toggle_locallist() - if w:locallist_open == 0 - let w:locallist_open = 1 - lopen - wincmd p - else - let w:locallist_open = 0 - lclose - endif -endfunction -nnoremap lo :call Toggle_locallist() +noremap twl :botright vnew \| vertical resize 100 \| set wfw \| term -command! WQtab wincmd j | w | windo bd command! Qtab windo bd function! PythonAddTags(module) - let l:commandstring = "python -c \"import os; import " . a:module + let l:commandstring = "python -c \"import os; import " . a:module \ . "; print(os.path.dirname(" . a:module . "\.__file__))\"" let l:dir = system(l:commandstring)[:-2] let l:call = "ctags -R " . l:dir @@ -129,168 +102,76 @@ function! PythonAddTags(module) endfunction command! -nargs=1 Addtags call PythonAddTags() -" latex to docx -map :w !pandoc -o %.docx - -" for completion menu -inoremap pumvisible() ? "\" : "\u" -inoremap pumvisible() ? '' : - \ '=pumvisible() ? "\Down>" : ""' -" inoremap pumvisible() ? '' : -" \ '=pumvisible() ? "\Down>" : ""' - -" from https://vi.stackexchange.com/questions/20078/plugin-to-show-enclosing-indentation-levels/20089#20089 -function! ShowContext() abort - let items = [] - let l = line('.') - let indent = 1000 - while l >= 0 - if indent(l) < indent && getline(l) != '' - call add(items, getline(l)) - let indent = indent(l) - if indent == 0 - break - endif - endif - let l -= 1 - endwhile - lgetexpr reverse(items) -endfunction - -let w:contextlist_open = 0 -function! Toggle_contextlist() - if w:contextlist_open == 1 - let w:contextlist_open = 0 - autocmd! ContextList - above lclose - else - let w:contextlist_open = 1 - augroup ContextList - autocmd! - autocmd CursorHold * call ShowContext() - augroup END - above lopen - wincmd p - endif -endfunction -nnoremap lc :call Toggle_contextlist() +nnoremap lc :call ShowContext_toggle() +" Switch black on and off. let g:black_running = 0 function! Toggle_black_running() if g:black_running == 0 let g:black_running = 1 augroup BlackRunning autocmd! - autocmd! BufWritePre *.py execute ':Black' + autocmd! BufWritePost *.py execute ':!black -l 79 %' augroup END - echo 'Black on' + echo 'Black on' else let g:black_running = 0 autocmd! BlackRunning - echo 'Black off' + echo 'Black off' endif endfunction -nnoremap bl :call Toggle_black_running() - -augroup vimrc - autocmd! - autocmd FileType rmd setlocal omnifunc=CompleteR - autocmd FileType make setlocal noexpandtab - autocmd FileType rmd setlocal commentstring=#%s - autocmd FileType cpp setlocal commentstring=//%s - autocmd FileType tex setlocal spell spelllang=en_us - autocmd FileType py nnoremap K :execute "!pydoc " . expand("") - " fix misbehavior after buffer deletion - " unfortunately this seems to break help - " autocmd BufDelete * tabdo windo wincmd + | wincmd > - autocmd BufEnter term://* wincmd + | wincmd - | wincmd < | wincmd > -augroup END - -" " netrw: follow symlink and set working directory -" autocmd CursorMoved silent * -" " short circuit for non-netrw files -" \ if expand('%:p') !~# '\.git' -" \ if &filetype == 'netrw' | -" \ call FollowSymlink() | -" \ call SetProjectRoot() | -" \ endif -" automatically follow symlinks - -" Follow symlinked files -function! FollowSymlink() - let current_file = expand('%:p') - " check if file type is a symlink - if getftype(current_file) == 'link' - " if it is a symlink resolve to the actual file path - " and open the actual file - let actual_file = resolve(current_file) - silent! execute 'file ' . actual_file - end -endfunction - -" set working directory to git project root -" or directory of current file if not git project -function! SetProjectRoot() - " default to the current file's directory - lcd %:p:h - let git_dir = system("git rev-parse --show-toplevel") - " See if the command output starts with 'fatal' (if it does, not in a git repo) - let is_not_git_dir = matchstr(git_dir, '^fatal:.*') - " if git project, change local directory to git project root - if empty(is_not_git_dir) - lcd `=git_dir` - endif -endfunction - -" follow symlink and set working directory -autocmd BufRead * - \ if expand('%:p') !~# '\.git' | - \ call FollowSymlink() | - \ call SetProjectRoot() - -autocmd FileType crontab setlocal nobackup nowritebackup - -autocmd BufWinEnter * let w:locallist_open = 0 -autocmd BufWinEnter * let w:contextlist_open = 0 - -au BufNewFile,BufRead Snakefile set syntax=snakemake -au BufNewFile,BufRead *.snake set syntax=snakemake - -" statusline -" set laststatus=2 -" set statusline=buff\ %n " buffer number -" set statusline+=\ ::\ " separator ' :: ' -" set statusline+=%f " filename -" set statusline+=\ ::\ " separator ' :: ' -" set statusline+=%y " filetype -" set statusline+=%= " switch sides -" set statusline+=%{getcwd()} " working dir - +noremap bl :call Toggle_black_running() + +" Puts output of :read inline rather than on a new line. +fu! InlineRead(command) + let colnum = col('.') + let line = getline('.') + call setline('.', strpart(line, 0, colnum) . system(a:command) . strpart(line, colnum)) +endfu + +command! -nargs=1 IRead call InlineRead() +let g:pandoc#keyboard#use_default_mappings = 0 + +" Switching windows +" In terminal +" tnoremap hh h +" tnoremap jj j +" tnoremap kk k +" tnoremap ll l +" In insert mode +inoremap hh h +inoremap jj j +inoremap kk k +inoremap ll l +" In normal mode +nnoremap hh h +nnoremap jj j +nnoremap kk k +nnoremap ll l if has('nvim') let $VISUAL = 'nvr -cc split --remote-wait' endif +set autoread +" set inccommand=nosplit +" Tabs to spaces set expandtab set shiftwidth=4 set tabstop=4 - " folding set foldmethod=syntax let r_syntax_folding = 1 let g:tex_fold_enabled = 1 -let g:vimtex_fold_envs = 1 let g:sh_fold_enabled = 5 -" used for vim-stay -set viewoptions=cursor,folds,slash,unix -" let g:skipview_files = ['*\.vim'] " bash-style command completion set wildmode:longest,list set nowildmenu + filetype plugin on -set omnifunc=syntaxcomplete#Complete +set breakindent set colorcolumn=80 set cursorline set number @@ -306,32 +187,18 @@ let loaded_matchit=1 " don't unindent preprocessor directives set cinkeys=0{,0},0),:,!^F,o,O,e set noswapfile -set tags=tags;$HOME set mouse=a set ttimeoutlen=10 -set formatoptions+=cro - +set formatoptions-=c formatoptions-=r formatoptions-=o syntax on syntax enable -" required for non-funkiness of solarized -" below required for solarized -set background=dark -let g:solarized_termtrans=1 -let g:solarized_termcolors=16 -if has("terminfo") - let &t_Co=16 - let &t_AB="\[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm" - let &t_AF="\[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm" -else - let &t_Co=16 - let &t_Sf="\[3%dm" - let &t_Sb="\[4%dm" -endif -set t_Co=16 " for dim -colorscheme nord -let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 +set t_Co=256 +" set background=dark +colorscheme dracula + " highlighting cursorline style highlight! link Visual cursorline + " set bs=indent,eol,start highlight clear SignColumn @@ -339,6 +206,10 @@ highlight clear SignColumn set hlsearch set completeopt=longest,menuone +" if nvim is running open new edits with neovim remote +if has('nvim') + let $VISUAL = 'nvr -cc split --remote-wait' +endif " terminal autoscrolling let g:neoterm_autoscroll=1 @@ -347,108 +218,121 @@ set conceallevel=0 set updatetime=400 -" CtrlP-funky -nnoremap :CtrlPFunky -" Ctrl-] uses ctags if available, otherwise CtrlP-Funky -nnoremap len(tagfiles()) > 0 ? "\" : - \ "mT :execute 'CtrlPFunky ' . expand('')" -" If tags are available, functions as normal. Otherwise, return to -" mark set by . -nnoremap len(tagfiles()) > 0 ? "\" : "'T" -let g:ctrlp_funky_after_jump = 'zvzz' -let g:ctrlp_funky_use_cache = 1 -let g:ctrlp_funky_multi_buffers = 1 - -" CtrlP - -let g:ctrlp_use_caching = 0 -if executable('ag') - set grepprg=ag\ --nogroup\ --nocolor - - let g:ctrlp_user_command = 'ag --literal --files-with-matches --nocolor - \ --hidden --follow --nocolor -g "" %s' -else - let g:ctrlp_user_command = ['.git', - \ 'cd %s && git ls-files . -co --exclude-standard', - \ 'find %s -type f'] - let g:ctrlp_prompt_mappings = { - \ 'AcceptSelection("e")': ['', '', '<2-LeftMouse>'], - \ } -endif +" set shortmess+=F + +set sessionoptions-=folds + + +autocmd BufEnter * silent! lcd %:p:h +augroup vimrc + autocmd! + autocmd FileType make setlocal noexpandtab + autocmd FileType rmd setlocal commentstring=#%s + autocmd FileType cpp setlocal commentstring=//%s + autocmd FileType tex setlocal spell spelllang=en_us + autocmd FileType py nnoremap K :execute "!pydoc " . expand("") + " fix misbehavior after buffer deletion + " unfortunately this seems to break help + " autocmd BufDelete * tabdo windo wincmd + | wincmd > + autocmd BufEnter term://* wincmd + | wincmd - | wincmd < | wincmd > +augroup + +" Follow symlinked files +function! FollowSymlink() + let current_file = expand('%:p') + " check if file type is a symlink + if getftype(current_file) == 'link' + " if it is a symlink resolve to the actual file path + " and open the actual file + let actual_file = resolve(current_file) + silent! execute 'file ' . actual_file + end +endfunction + +function! s:find_git_root() + return system('git rev-parse --show-toplevel 2> /dev/null')[:-2] +endfunction + +command! ProjectFiles execute 'GFiles' s:find_git_root() + +autocmd FileType crontab setlocal nobackup nowritebackup + +augroup Snakemake + autocmd! + au BufNewFile,BufRead Snakefile set syntax=snakemake + au BufNewFile,BufRead *.snake set syntax=snakemake +augroup END + +" augroup Tags +" autocmd! +" autocmd VimEnter * call SetTags(trim(system("git rev-parse --show-toplevel")) . "/.tags") +" autocmd DirChanged * call SetTags(trim(system("git rev-parse --show-toplevel")) . "/.tags") +" augroup END + +autocmd! BufRead "*.md" :set linewidth=80 +autocmd! BufWritePre "*.md" :execute "normal! mygggqG'y" + +" set laststatus=2 +" set noshowmode +" " status bar colors +" au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta +" au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan +" hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan + +" Status line +" set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%) + +" Status Line Custom +let g:currentmode={ + \ 'n' : 'Normal', + \ 'no' : 'Normal·Operator Pending', + \ 'v' : 'Visual', + \ 'V' : 'V·Line', + \ '^V' : 'V·Block', + \ 's' : 'Select', + \ 'S' : 'S·Line', + \ '^S' : 'S·Block', + \ 'i' : 'Insert', + \ 'R' : 'Replace', + \ 'Rv' : 'V·Replace', + \ 'c' : 'Command', + \ 'cv' : 'Vim Ex', + \ 'ce' : 'Ex', + \ 'r' : 'Prompt', + \ 'rm' : 'More', + \ 'r?' : 'Confirm', + \ '!' : 'Shell', + \ 't' : 'Terminal' + \} + +" set laststatus=2 +" set noshowmode +" set statusline= +" set statusline+=%0*\ %n\ " Buffer number +" set statusline+=%0*\ %{toupper(g:currentmode[mode()])}\ " The current mode +" set statusline+=%1*\ %<%F%m%r%h%w\ " File path, modified, readonly, helpfile, preview +" set statusline+=%2*\ %Y\ " FileType +" set statusline+=%5*\ %{FugitiveHead()}\ +" set statusline+=%3* + +hi User1 ctermfg=007 ctermbg=239 guibg=#4e4e4e guifg=#adadad +hi User2 ctermfg=007 ctermbg=236 guibg=#303030 guifg=#adadad +hi User3 ctermfg=236 ctermbg=236 guibg=#303030 guifg=#303030 +hi User4 ctermfg=239 ctermbg=239 guibg=#4e4e4e guifg=#4e4e4e +hi User5 ctermfg=007 ctermbg=236 guibg=#303030 guifg=#8FBCBB + +augroup Closer + au! + au FileType r,rmd + \ let b:closer = 1 | + \ let b:closer_flags = '([{' +augroup END -let g:ctrlp_map = '' -let g:ctrlp_cmd = 'CtrlP' -let g:ctrlp_follow_symlinks = 1 -" find .git and set to working directory -let g:ctrlp_working_path_mode = 'ra' -let g:ctrlp_show_hidden = 1 -let g:ctrlp_custom_ignore = { - \ 'dir': '\v[\/]\.git$', - \ 'file': '\v\.pyc$', - \ } -let g:ctrlp_by_filename = 1 -noremap bu :CtrlPBuffer - -" submode -" A message will appear in the message line when you're in a submode -" " and stay there until the mode has existed. -let g:submode_always_show_submode = 1 -" -" " We're taking over the default setting. Don't worry we'll do -" " our best to put back the default functionality. -call submode#enter_with('window', 'n', '', '') -call submode#enter_with('scroll', 'n', '', 's') -" -" Note: will also get you out to the mode without this mapping. -" Note: also behaves as -call submode#leave_with('window', 'n', '', '') -call submode#leave_with('scroll', 'n', '', '') -" -" Go through every letter -for key in ['a','b','c','d','e','f','g','h','i','j','k','l','m', - \'n','o','p','q','r','s','t','u','v','w','x','y','z'] - " maps lowercase, uppercase and - call submode#map('window', 'n', '', key, '' . key) - call submode#map('window', 'n', '', toupper(key), '' . toupper(key)) - call submode#map('window', 'n', '', '', '' . '') -endfor - -" scroll bindings, make hjkl scroll half window -call submode#map('scroll', 'n', '', 'h', 'zH') -call submode#map('scroll', 'n', '', 'l', 'zL') -call submode#map('scroll', 'n', '', 'j', '') -call submode#map('scroll', 'n', '', 'k', '') - -" Go through symbols. Sadly, '|', not supported in submode plugin. -for key in ['=','_','+','-','<','>'] - call submode#map('window', 'n', '', key, '' . key) -endfor -" -" Old way, just in case. -nnoremap w - -" vim-python-pep8-indent -let python_pep8_indent_hang_closing = 0 - -" AutoPairs -let g:AutoPairs={'(':')', '[':']', '{':'}',"'":"'",'"':'"'} - -" Airline -let g:airline_theme='solarized' -let g:airline#extensions#ale#enabled = 1 - -" Fugitive -" Prevent opening of new tab with :Git command. -let g:fugitive_force_bang_command = 1 - -" Black -let g:black_linelength = 79 - -" IndentLine -let g:indentLine_enabled = 0 - -" lightline -let g:lightline = { - \ 'colorscheme': 'nord', - \ } -set laststatus=2 + +" let g:indent_blankline_char = '|' +" language server stuff + +if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 +endif diff --git a/.zsh/theme/dracula.omp.json b/.zsh/theme/dracula.omp.json new file mode 100644 index 0000000..ae0da49 --- /dev/null +++ b/.zsh/theme/dracula.omp.json @@ -0,0 +1,84 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "blocks": [ + { + "alignment": "left", + "segments": [ + { + "background": "#6272a4", + "foreground": "#f8f8f2", + "leading_diamond": "\ue0b6", + "style": "diamond", + "template": "{{ .HostName }} ", + "type": "session" + + }, + { + "background": "#bd93f9", + "foreground": "#f8f8f2", + "powerline_symbol": "\ue0b0", + "properties": { + "style": "folder" + + }, + "style": "powerline", + "template": " {{ .Path }} ", + "type": "path" + + }, + { + "background": "#ffb86c", + "foreground": "#f8f8f2", + "powerline_symbol": "\ue0b0", + "properties": { + "branch_icon": "", + "fetch_stash_count": true, + "fetch_status": true, + "fetch_upstream_icon": true + + }, + "style": "powerline", + "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uF692 {{ .StashCount }}{{ end }}", + "type": "git" + + }, + { + "background": "#8be9fd", + "foreground": "#f8f8f2", + "powerline_symbol": "\ue0b0", + "style": "powerline", + "template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ", + "type": "node" + + } + + ], + "type": "prompt" + + }, + { + "alignment": "left", + "segments": [ + { + "background": "#f1fa8c", + "foreground": "#282a36", + "invert_powerline": true, + "leading_diamond": "\ue0b2", + "style": "diamond", + "template": " \ue7ad {{.Profile}}{{if .Region}}@{{.Region}}{{end}}", + "trailing_diamond": "\ue0b4", + "type": "aws" + + } + + ], + "type": "rprompt" + + } + + ], + "final_space": true, + "version": 2 + +} + diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..2c2a571 --- /dev/null +++ b/.zshrc @@ -0,0 +1,113 @@ +# If you come from bash you might have to change your $PATH. +export PATH=$HOME/bin:/usr/local/bin:$PATH +export PATH=~/.local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git vi-mode) + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi +export BUILDDIR=/home/$USER/git/glue/compile/builder/componentbuild/ + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" +# alias vi="vim -u ~/dotfiles/.vimrc" +ZSH_THEME="fino-time" +alias sshvi='f() { ssh -t "$1" "bash -o vi" };f' +if egrep '(skip|leap|jump)' <(hostname) &> /dev/null ; then + echo "Don't use sudo here asshole." + alias sudo="echo Do NOT use sudo here asshole." + ZSH_THEME="jonathan" +fi +bindkey -v + + +plugins=(git vi-mode) +source ~/.oh-my-zsh/oh-my-zsh.sh diff --git a/.zshrc-backup b/.zshrc-backup new file mode 100644 index 0000000..1cca0a3 --- /dev/null +++ b/.zshrc-backup @@ -0,0 +1,104 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git vi-mode) + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" +alias vi "vim -u ~/dotfiles/.vimrc" + +ZSH_THEME="amuse" +plugins=(git vi-mode) + +tmux attach-session diff --git a/bin/bin b/bin/bin new file mode 120000 index 0000000..dfc97f3 --- /dev/null +++ b/bin/bin @@ -0,0 +1 @@ +/home/njuers/dotfiles/bin \ No newline at end of file diff --git a/dotfiles.yaml b/dotfiles.yaml new file mode 100644 index 0000000..19cb10b --- /dev/null +++ b/dotfiles.yaml @@ -0,0 +1,30 @@ +--- +- name: Dotfiles + hosts: list + tasks: + - name: Clone dotfiles + ansible.builtin.git: + repo: https://github.com/nekoju/dotfiles.git + dest: ~/dotfiles + depth: 3 + single_branch: true + version: servers + - name: Remove existing dotfiles + ansible.builtin.file: + path: "{{ item.dest }}" + state: absent + - name: Symlink relevant dotfiles + ansible.builtin.file: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: njuers + group: njuers + state: link + loop: + - src: ~/dotfiles/.vimrc + dest: ~/.vimrc + - src: ~/dotfiles/.zshrc + dest: ~/.zshrc + - src: ~/dotfiles/.gitconfig + dest: ~/.gitconfig +... diff --git a/fish/config.fish b/fish/config.fish deleted file mode 100755 index 35368d1..0000000 --- a/fish/config.fish +++ /dev/null @@ -1,59 +0,0 @@ -# set normal (set_color normal) -# set magenta (set_color magenta) -# set yellow (set_color yellow) -# set green (set_color green) -# set red (set_color red) -# set gray (set_color -o black) -# set -Ux VISUAL nvim -# set -Ux EDITOR $VISUAL -# source (dirname (status -f))/init.fish - -# if tmux is executable and not inside a tmux session, then try to attach. -# if attachment fails, start a new session - -if status is-interactive -and not set -q TMUX - exec tmux -end - - # Fish git prompt -set -x __fish_git_prompt_showdirtystate 'yes' -set -x __fish_git_prompt_showstashstate 'yes' -set -x __fish_git_prompt_showuntrackedfiles 'yes' -set -x __fish_git_prompt_showupstream 'yes' -set -x __fish_git_prompt_color_branch yellow -set -x __fish_git_prompt_color_upstream_ahead green -set -x __fish_git_prompt_color_upstream_behind red - - -# for pyenv-virtualenvwrapper -set -x WORKON_HOME ~/.ve -set -x PROJECT_HOME ~/Workspace - -# Proper terminal behavior with unicode -set -x LC_ALL en_US.UTF-8 -set -x LANG en_US.UTF-8 -set -x fish_emoji_width 2 - -bind -M default v edit_cmd - -# for nvim - -# Use ipdb for debugging -# set -x PYTHONBREAKPOINT ipdb.set_trace - -set -x PYTHONPATH $HOME/.pyenv/versions/dev/lib/python3.7/site-packages -set -x PYTHONPATH $HOME/.pyenv/versions/utils/lib/python3.7/site-packages $PYTHONPATH -set -x PATH /opt/local/bin /opt/local/sbin $PATH -set -x MANPATH /opt/local/share/man (manpath) -set -x PATH $HOME/bin $PATH -set -x PATH $HOME/bin/edirect $PATH -set -x PATH $HOME/.cargo/bin $PATH -set -x PATH $HOME/.gitaliases $PATH -set -x PATH $HOME/edirect $PATH -set -x PATH $HOME/.pyenv/bin $PATH -status --is-interactive; and pyenv init - | source -status --is-interactive; and pyenv virtualenv-init - | source -# set -x PYTHONSTARTUP (python -m jedi repl) - -fish_ssh_agent diff --git a/fish/fish_variables b/fish/fish_variables deleted file mode 100644 index 7ec5b15..0000000 --- a/fish/fish_variables +++ /dev/null @@ -1,33 +0,0 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 -SETUVAR --export EDITOR:nvim -SETUVAR --export VISUAL:nvim -SETUVAR __fish_initialized:3400 -SETUVAR fish_color_autosuggestion:555\x1ebrblack -SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:blue -SETUVAR fish_color_comment:red -SETUVAR fish_color_cwd:green -SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:green -SETUVAR fish_color_error:brred -SETUVAR fish_color_escape:brcyan -SETUVAR fish_color_history_current:\x2d\x2dbold -SETUVAR fish_color_host:normal -SETUVAR fish_color_host_remote:yellow -SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:brcyan -SETUVAR fish_color_param:cyan -SETUVAR fish_color_quote:yellow -SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold -SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 -SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_status:red -SETUVAR fish_color_user:brgreen -SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_key_bindings:fish_vi_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di -SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/fish/functions/alacritty b/fish/functions/alacritty deleted file mode 100644 index 558059e..0000000 --- a/fish/functions/alacritty +++ /dev/null @@ -1,3 +0,0 @@ -function alacritty - command env WINIT_HIDPI_FACTOR=1.0 alacritty -end diff --git a/fish/functions/brewClang.fish b/fish/functions/brewClang.fish deleted file mode 100755 index 18d4880..0000000 --- a/fish/functions/brewClang.fish +++ /dev/null @@ -1,6 +0,0 @@ -# used to favor Homebrew's Clang (and LLVM) over the stock Apple one. -function brewClang - set -x PATH /usr/local/opt/llvm/bin $PATH - set -x LDFLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" - # set -x LDFLAGS "-L/Library/Frameworks/R.framework/Resources/lib" -end diff --git a/fish/functions/cp.fish b/fish/functions/cp.fish deleted file mode 100755 index 8d075f6..0000000 --- a/fish/functions/cp.fish +++ /dev/null @@ -1,4 +0,0 @@ -function cp - command cp -rv $argv -end - diff --git a/fish/functions/duall.fish b/fish/functions/duall.fish deleted file mode 100644 index f55c6ae..0000000 --- a/fish/functions/duall.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function duall --wraps='du .hs .[^.]* *' --wraps='bash -c du .hs .[^.]* *' --wraps='bash -c du -hs .[^.]* *' --wraps=bash\ -c\ \'du\ -hs\ .\[\^.\]\*\ \*\' --description alias\ duall=bash\ -c\ \'du\ -hs\ .\[\^.\]\*\ \*\' - bash -c 'du -hs .[^.]* *' $argv; -end diff --git a/fish/functions/edit_cmd.fish b/fish/functions/edit_cmd.fish deleted file mode 100755 index 7df2c3e..0000000 --- a/fish/functions/edit_cmd.fish +++ /dev/null @@ -1,9 +0,0 @@ -function edit_cmd --description 'Edit cmdline in editor' - set -l f (mktemp) - set -l p (commandline -C) - commandline -b > $f - vim -c set\ ft=fish $f - commandline -r (more $f) - commandline -C $p - rm $f -end diff --git a/fish/functions/eutil.fish b/fish/functions/eutil.fish deleted file mode 100755 index 2e24a9a..0000000 --- a/fish/functions/eutil.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Search and retrieve records from Entrez. -# Instruction at https://www.ncbi.nlm.nih.gov/books/NBK25500/ -function eutil - "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/$argv[1]" -end - diff --git a/fish/functions/filterSections.fish b/fish/functions/filterSections.fish deleted file mode 100755 index ae9fe97..0000000 --- a/fish/functions/filterSections.fish +++ /dev/null @@ -1,6 +0,0 @@ -# filters sections from master class spreadsheet -# usage: filterSections roster.txt master.csv >out.csv -function filterSections - awk 'BEGIN {FPAT = "([^,]+)|(\"[^\"]+\")"} \ - FNR == NR { seen[$1]; next } FNR <= 2 || $3 in seen' "$argv[1]" "$argv[2]" -end diff --git a/fish/functions/find.fish b/fish/functions/find.fish deleted file mode 100755 index 32a7b94..0000000 --- a/fish/functions/find.fish +++ /dev/null @@ -1,4 +0,0 @@ -# alias for find to exclude .git dir -function find - command find $argv[1] -path $argv[1]'*/.git' -prune -o $argv[2..-1] -end diff --git a/fish/functions/fish_greeting.fish b/fish/functions/fish_greeting.fish deleted file mode 100755 index 81a7468..0000000 --- a/fish/functions/fish_greeting.fish +++ /dev/null @@ -1,3 +0,0 @@ -function fish_greeting - echo "Hello!" -end diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish deleted file mode 100755 index 46fc094..0000000 --- a/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,28 +0,0 @@ -function fish_prompt --description 'Write out the prompt' - set -l color_cwd - set -l suffix - - switch "$USER" - case root toor - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - set suffix '#' - case '*' - set color_cwd $fish_color_cwd - set suffix '🐈 ' - end - - # echo -n -s (__fish_git_prompt '%s') '|' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix" - - set last_status $status - - printf '%s@%s ' (whoami) (prompt_hostname) - printf '%s ' (__fish_git_prompt) - set_color $color_cwd - printf '%s' (prompt_pwd) - set_color normal - echo -n $suffix -end diff --git a/fish/functions/fish_ssh_agent.fish b/fish/functions/fish_ssh_agent.fish deleted file mode 100755 index 5960b75..0000000 --- a/fish/functions/fish_ssh_agent.fish +++ /dev/null @@ -1,32 +0,0 @@ -function __ssh_agent_is_started -d "check if ssh agent is already started" - if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end - source $SSH_ENV > /dev/null - end - - if test -z "$SSH_AGENT_PID" - return 1 - end - - ps -ef | grep $SSH_AGENT_PID | grep -v grep | grep -q ssh-agent - #pgrep ssh-agent - return $status -end - - -function __ssh_agent_start -d "start a new ssh agent" - ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV - chmod 600 $SSH_ENV - source $SSH_ENV > /dev/null - true # suppress errors from setenv, i.e. set -gx -end - - -function fish_ssh_agent --description "Start ssh-agent if not started yet, or uses already started ssh-agent." - if test -z "$SSH_ENV" - set -xg SSH_ENV $HOME/.ssh/environment - end - - if not __ssh_agent_is_started - __ssh_agent_start - end -end diff --git a/fish/functions/fish_user_key_bindings.fish b/fish/functions/fish_user_key_bindings.fish deleted file mode 100755 index 3098071..0000000 --- a/fish/functions/fish_user_key_bindings.fish +++ /dev/null @@ -1,4 +0,0 @@ -function fish_user_key_bindings - fish_vi_key_bindings - bind \cF -M insert accept-autosuggestion -end diff --git a/fish/functions/fisher.fish b/fish/functions/fisher.fish deleted file mode 100755 index 1d63c33..0000000 --- a/fish/functions/fisher.fish +++ /dev/null @@ -1,435 +0,0 @@ -set -g fisher_version 3.2.10 - -function fisher -a cmd -d "fish package manager" - set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache - set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config - - set -g fish_config $XDG_CONFIG_HOME/fish - set -g fisher_cache $XDG_CACHE_HOME/fisher - set -g fisher_config $XDG_CONFIG_HOME/fisher - - set -q fisher_path; or set -g fisher_path $fish_config - set -g fishfile $fish_config/fishfile - - for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache - if test ! -d $path - command mkdir -p $path - end - end - - if test ! -e $fisher_path/completions/fisher.fish - echo "fisher complete" >$fisher_path/completions/fisher.fish - _fisher_complete - end - - if test -e $fisher_path/conf.d/fisher.fish - switch "$version" - case \*-\* - command rm -f $fisher_path/conf.d/fisher.fish - case 2\* - case \* - command rm -f $fisher_path/conf.d/fisher.fish - end - else - switch "$version" - case \*-\* - case 2\* - echo "fisher copy-user-key-bindings" >$fisher_path/conf.d/fisher.fish - end - end - - # 2019-10-22: temp code, migrates fishfile from old path back to $fish_config - if test -e "$fisher_path/fishfile"; and test ! -e "$fishfile" - command mv -f "$fisher_path/fishfile" "$fishfile" - end - - switch "$cmd" - case {,self-}complete - _fisher_complete - case copy-user-key-bindings - _fisher_copy_user_key_bindings - case ls - set -e argv[1] - if test -s "$fishfile" - set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed "s|@.*||") - _fisher_ls | _fisher_fmt | command awk -v FILE="$file" " - BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \$0 in file && /$argv[1]/ - " | command sed "s|^$HOME|~|" - end - case self-update - _fisher_self_update (status -f) - case self-uninstall - _fisher_self_uninstall - case {,-}-v{ersion,} - echo "fisher version $fisher_version" (status -f | command sed "s|^$HOME|~|") - case {,-}-h{elp,} - _fisher_help - case "" - _fisher_commit -- - case add rm - if not isatty - while read -l arg - set argv $argv $arg - end - end - - if test (count $argv) = 1 - echo "fisher: invalid number of arguments" >&2 - _fisher_help >&2 - return 1 - end - - _fisher_commit $argv - case \* - echo "fisher: unknown flag or command \"$cmd\"" >&2 - _fisher_help >&2 - return 1 - end -end - -function _fisher_complete - complete -ec fisher - complete -xc fisher -n __fish_use_subcommand -a add -d "Add packages" - complete -xc fisher -n __fish_use_subcommand -a rm -d "Remove packages" - complete -xc fisher -n __fish_use_subcommand -a ls -d "List installed packages matching REGEX" - complete -xc fisher -n __fish_use_subcommand -a --help -d "Show usage help" - complete -xc fisher -n __fish_use_subcommand -a --version -d "$fisher_version" - complete -xc fisher -n __fish_use_subcommand -a self-update -d "Update to the latest version" - for pkg in (fisher ls) - complete -xc fisher -n "__fish_seen_subcommand_from rm" -a $pkg - end -end - -function _fisher_copy_user_key_bindings - if functions -q fish_user_key_bindings - functions -c fish_user_key_bindings fish_user_key_bindings_copy - end - function fish_user_key_bindings - for file in $fisher_path/conf.d/*_key_bindings.fish - source $file >/dev/null 2>/dev/null - end - if functions -q fish_user_key_bindings_copy - fish_user_key_bindings_copy - end - end -end - -function _fisher_ls - for pkg in $fisher_config/*/*/* - command readlink $pkg; or echo $pkg - end -end - -function _fisher_fmt - command sed "s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\.\/*|$PWD/|;s|^https*:/*||;s|^github\.com/||;s|/*\$||" -end - -function _fisher_help - echo "usage: fisher add Add packages" - echo " fisher rm Remove packages" - echo " fisher Update all packages" - echo " fisher ls [] List installed packages matching " - echo " fisher --help Show this help" - echo " fisher --version Show the current version" - echo " fisher self-update Update to the latest version" - echo " fisher self-uninstall Uninstall from your system" - echo "examples:" - echo " fisher add jethrokuan/z rafaelrinaldi/pure" - echo " fisher add gitlab.com/foo/bar@v2" - echo " fisher add ~/path/to/local/pkg" - echo " fisher add &2 - command curl -s "$url?nocache" >$file. - - set -l next_version (command awk '{ print $4 } { exit }' <$file.) - switch "$next_version" - case "" $fisher_version - command rm -f $file. - if test -z "$next_version" - echo "fisher: cannot update fisher -- are you offline?" >&2 - return 1 - end - echo "fisher is already up-to-date" >&2 - case \* - echo "linking $file" | command sed "s|$HOME|~|" >&2 - command mv -f $file. $file - source $file - echo "updated to fisher $fisher_version -- hooray!" >&2 - _fisher_complete - end -end - -function _fisher_self_uninstall - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - - for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile - echo "removing $file" - command rm -Rf $file 2>/dev/null - end | command sed "s|$HOME|~|" >&2 - - for name in (set -n | command awk '/^fisher_/') - set -e "$name" - end - - functions -e (functions -a | command awk '/^_fisher/') fisher - complete -c fisher --erase -end - -function _fisher_commit -a cmd - set -e argv[1] - set -l elapsed (_fisher_now) - - if test ! -e "$fishfile" - command touch $fishfile - echo "created new fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 - end - - set -l old_pkgs (_fisher_ls | _fisher_fmt) - for pkg in (_fisher_ls) - _fisher_rm $pkg - end - command rm -Rf $fisher_config - command mkdir -p $fisher_config - - set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf "%s\n" $argv | _fisher_fmt)) - set -l actual_pkgs (_fisher_fetch $next_pkgs) - set -l updated_pkgs - for pkg in $old_pkgs - if contains -- $pkg $actual_pkgs - set updated_pkgs $updated_pkgs $pkg - end - end - - if test -z "$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs" - echo "fisher: nothing to commit -- try adding some packages" >&2 - return 1 - end - - set -l out_pkgs - if test "$cmd" = "rm" - set out_pkgs $next_pkgs - else - for pkg in $next_pkgs - if contains -- (echo $pkg | command sed "s|@.*||") $actual_pkgs - set out_pkgs $out_pkgs $pkg - end - end - end - - printf "%s\n" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed "s|^$HOME|~|") >$fishfile - - _fisher_complete - - command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) ' - BEGIN { - res = fmt("removed", O - U, fmt("updated", U, fmt("added", A - U))) - printf((res ? res : "done") " in %.2fs\n", E / 1000) - } - function fmt(action, n, s) { - return n ? (s ? s ", " : s) action " " n " package" (n > 1 ? "s" : "") : s - } - ' >&2 -end - -function _fisher_parse -a mode cmd - set -e argv[1..2] - command awk -v FS="[[:space:]]*#+" -v MODE="$mode" -v CMD="$cmd" -v ARGSTR="$argv" ' - BEGIN { - for (n = split(ARGSTR, a, " "); i++ < n;) pkgs[getkey(a[i])] = a[i] - } - !NF { next } { k = getkey($1) } - MODE == "-R" && !(k in pkgs) && $0 = $1 - MODE == "-W" && (/^#/ || k in pkgs || CMD != "rm") { print pkgs[k] (sub($1, "") ? $0 : "") } - MODE == "-W" || CMD == "rm" { delete pkgs[k] } - END { - for (k in pkgs) { - if (CMD != "rm" || MODE == "-W") print pkgs[k] - else print "fisher: cannot remove \""k"\" -- package is not in fishfile" > "/dev/stderr" - } - } - function getkey(s, a) { - return (split(s, a, /@+|:/) > 2) ? a[2]"/"a[1]"/"a[3] : a[1] - } - ' -end - -function _fisher_fetch - set -l pkg_jobs - set -l out_pkgs - set -l next_pkgs - set -l local_pkgs - set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token - - for pkg in $argv - switch $pkg - case \~\* /\* - set -l path (echo "$pkg" | command sed "s|^~|$HOME|") - if test -e "$path" - set local_pkgs $local_pkgs $path - else - echo "fisher: cannot add \"$pkg\" -- is this a valid file?" >&2 - end - continue - end - - command awk -v PKG="$pkg" -v FS=/ ' - BEGIN { - if (split(PKG, tmp, /@+|:/) > 2) { - if (tmp[4]) sub("@"tmp[4], "", PKG) - print PKG "\t" tmp[2]"/"tmp[1]"/"tmp[3] "\t" (tmp[4] ? tmp[4] : "master") - } else { - pkg = split(PKG, _, "/") <= 2 ? "github.com/"tmp[1] : tmp[1] - tag = tmp[2] ? tmp[2] : "master" - print (\ - pkg ~ /^github/ ? "https://codeload."pkg"/tar.gz/"tag : \ - pkg ~ /^gitlab/ ? "https://"pkg"/-/archive/"tag"/"tmp[split(pkg, tmp, "/")]"-"tag".tar.gz" : \ - pkg ~ /^bitbucket/ ? "https://"pkg"/get/"tag".tar.gz" : pkg \ - ) "\t" pkg - } - } - ' | read -l url pkg branch - - if test ! -d "$fisher_config/$pkg" - fish -c " - echo fetching $url >&2 - command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg) - if test ! -z \"$branch\" - command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null - or echo fisher: cannot clone \"$url\" -- is this a valid url\? >&2 - else if command curl $curl_opts -Ss -w \"\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null - command rm -Rf $fisher_cache/$pkg - command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg - command rm -Rf $fisher_config/$pkg - command cp -Rf {$fisher_cache,$fisher_config}/$pkg - else if test -d \"$fisher_cache/$pkg\" - echo fisher: cannot connect to server -- looking in \"$fisher_cache/$pkg\" | command sed 's|$HOME|~|' >&2 - command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/.. - else - command rm -Rf $fisher_config/$pkg - echo fisher: cannot add \"$pkg\" -- is this a valid package\? >&2 - end - " >/dev/null & - set pkg_jobs $pkg_jobs (_fisher_jobs --last) - set next_pkgs $next_pkgs "$fisher_config/$pkg" - end - end - - if set -q pkg_jobs[1] - while for job in $pkg_jobs - contains -- $job (_fisher_jobs); and break - end - end - for pkg in $next_pkgs - if test -d "$pkg" - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg - end - end - end - - set -l local_prefix $fisher_config/local/$USER - if test ! -d "$local_prefix" - command mkdir -p $local_prefix - end - for pkg in $local_pkgs - set -l target $local_prefix/(command basename $pkg) - if test ! -L "$target" - command ln -sf $pkg $target - set out_pkgs $out_pkgs $pkg - _fisher_add $pkg --link - end - end - - if set -q out_pkgs[1] - _fisher_fetch ( - for pkg in $out_pkgs - if test -s "$pkg/fishfile" - _fisher_fmt <$pkg/fishfile | _fisher_parse -R - end - end) - printf "%s\n" $out_pkgs | _fisher_fmt - end -end - -function _fisher_add -a pkg opts - for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish - set -l target (command basename $src) - switch $src - case $pkg/conf.d\* - set target $fisher_path/conf.d/$target - case $pkg/completions\* - set target $fisher_path/completions/$target - case $pkg/{functions,}\* - switch $target - case uninstall.fish - continue - case {init,key_bindings}.fish - set target $fisher_path/conf.d/(command basename $pkg)\_$target - case \* - set target $fisher_path/functions/$target - end - end - echo "linking $target" | command sed "s|$HOME|~|" >&2 - if set -q opts[1] - command ln -sf $src $target - else - command cp -f $src $target - end - switch $target - case \*.fish - source $target >/dev/null 2>/dev/null - end - end -end - -function _fisher_rm -a pkg - for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish - set -l target (command basename $src) - set -l filename (command basename $target .fish) - switch $src - case $pkg/conf.d\* - test "$filename.fish" = "$target"; and emit "$filename"_uninstall - set target conf.d/$target - case $pkg/completions\* - test "$filename.fish" = "$target"; and complete -ec $filename - set target completions/$target - case $pkg/{,functions}\* - test "$filename.fish" = "$target"; and functions -e $filename - switch $target - case uninstall.fish - source $src - continue - case {init,key_bindings}.fish - set target conf.d/(command basename $pkg)\_$target - case \* - set target functions/$target - end - end - command rm -f $fisher_path/$target - end - if not functions -q fish_prompt - source "$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish" - end -end - -function _fisher_jobs - jobs $argv | command awk '/^[0-9]+\t/ { print $1 }' -end - -function _fisher_now -a elapsed - switch (command uname) - case Darwin \*BSD - command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed - case \* - math (command date "+%s%3N") - "0$elapsed" - end -end diff --git a/fish/functions/git-root.fish b/fish/functions/git-root.fish deleted file mode 100755 index bd2729b..0000000 --- a/fish/functions/git-root.fish +++ /dev/null @@ -1,3 +0,0 @@ -function git-root - cd (git rev-parse --show-toplevel) -end diff --git a/fish/functions/git_pull.fish b/fish/functions/git_pull.fish deleted file mode 100755 index b4b14ae..0000000 --- a/fish/functions/git_pull.fish +++ /dev/null @@ -1,10 +0,0 @@ -# combines git pull with git reset --soft in the event of garbage commits -# usage: git pull -function git_pull - git pull - if grep -q 'garbage_commit' (git log -1 --pretty=format:%B | psub) - echo "Garbage commit detected. Doing soft reset" - git show - git reset --soft HEAD^ - end -end diff --git a/fish/functions/la.fish b/fish/functions/la.fish deleted file mode 100755 index 1a315d3..0000000 --- a/fish/functions/la.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function la --description 'alias la=ls -lAh' - ls -lAh $argv; -end diff --git a/fish/functions/mount_carbonate.fish b/fish/functions/mount_carbonate.fish deleted file mode 100755 index b804e99..0000000 --- a/fish/functions/mount_carbonate.fish +++ /dev/null @@ -1,5 +0,0 @@ -function mount_carbonate - sshfs \ - -o IdentityFile=~/.ssh/id_rsa_laptop,auto_cache,reconnect,defer_permissions,Compression=no \ - mpjuers@carbonate:/ /Volumes/Carbonate/ -end diff --git a/fish/functions/new-jupyter-kernel.fish b/fish/functions/new-jupyter-kernel.fish deleted file mode 100755 index a446af8..0000000 --- a/fish/functions/new-jupyter-kernel.fish +++ /dev/null @@ -1,5 +0,0 @@ -function new-jupyter-kernel - pip install ipykernel - ipython kernel install --user --name=$argv[1] -end - diff --git a/fish/functions/pnglatex.fish b/fish/functions/pnglatex.fish deleted file mode 100644 index 048aa3e..0000000 --- a/fish/functions/pnglatex.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function pnglatex --wraps=pnglatex\ -p\ \'amsmath:amsthm\' --description alias\ pnglatex=pnglatex\ -p\ \'amsmath:amsthm\' - command pnglatex -p 'amsmath:amsthm' $argv; -end diff --git a/fish/functions/pytest.fish b/fish/functions/pytest.fish deleted file mode 100755 index 6cdd958..0000000 --- a/fish/functions/pytest.fish +++ /dev/null @@ -1,4 +0,0 @@ -# alias to call pytest with present directory in sys.path -function pytest - python -m pytest -end diff --git a/fish/functions/rsync_smart.fish b/fish/functions/rsync_smart.fish deleted file mode 100755 index aa5cbe2..0000000 --- a/fish/functions/rsync_smart.fish +++ /dev/null @@ -1,5 +0,0 @@ -# rsync only syncs changed files -# usage: rsync_smart in/ out -function rsync_smart - rsync -avu argv[1] argv[2] -end diff --git a/fish/functions/spoof.fish b/fish/functions/spoof.fish deleted file mode 100644 index 95b6c6b..0000000 --- a/fish/functions/spoof.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Defined in - @ line 1 -function spoof --wraps='sudo ifconfig en0 ether 5e:e1:96:43:4c:66' --description alias\ spoof=sudo\ ifconfig\ en0\ ether\ 5e:e1:96:43:4c:66\n - set mac 5e:e1:96:43:4c:66 - sudo spoof-mac set $mac en0 - echo "MAC address set to" $mac -end diff --git a/fish/functions/tl.fish b/fish/functions/tl.fish deleted file mode 100755 index d9a08c8..0000000 --- a/fish/functions/tl.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function tl --description 'alias tl=task list' - task list $argv; -end diff --git a/fish/functions/unspoof.fish b/fish/functions/unspoof.fish deleted file mode 100644 index 531f5c9..0000000 --- a/fish/functions/unspoof.fish +++ /dev/null @@ -1,6 +0,0 @@ -# Defined in - @ line 1 -function unspoof --wraps='sudo ifconfig en0 ether 3c:22:fb:73:2c:93' --wraps='ifconfig en0 | grep ether 3c:22:fb:73:2c:93' --description 'alias unspoof=sudo ifconfig en0 ether 3c:22:fb:73:2c:93' - set mac 3c:22:fb:73:2c:93 - sudo spoof-mac set $mac en0 - echo "MAC address set to" $mac -end diff --git a/fish/functions/vi.fish b/fish/functions/vi.fish deleted file mode 100755 index 8714e1e..0000000 --- a/fish/functions/vi.fish +++ /dev/null @@ -1,4 +0,0 @@ -# Defined in - @ line 1 -function vi --description 'alias vi nvim' - nvim $argv; -end diff --git a/fish/functions/vimdiff.fish b/fish/functions/vimdiff.fish deleted file mode 100755 index 94c84b9..0000000 --- a/fish/functions/vimdiff.fish +++ /dev/null @@ -1,3 +0,0 @@ -function vimdiff - command nvim -d $argv -end diff --git a/init.lua b/init.lua deleted file mode 100755 index 42f8730..0000000 --- a/init.lua +++ /dev/null @@ -1,122 +0,0 @@ -hs.grid.setGrid('6x6') -hs.grid.ui.textSize = 50 -hs.window.animationDuration = 0 -hs.grid.HINTS = { - {"Q", "W", "E", "R", "T", "Y"}, - {"U", "I", "O", "P", "[", "]"}, - {"A", "S", "D", "F", "G", "H"}, - {"J", "K", "L", ";", "'", "Z"}, - {"N", "M", ",", ".", "/", "1"} -} - --- hs.hotkey.bind({"cmd", "shift"}, "H", function() --- local win = hs.window.focusedWindow() --- local f = win:frame() --- local screen = win:screen() --- local max = screen:frame() - --- f.x = max.x --- f.y = max.y --- f.w = max.w / 2 --- f.h = max.h --- win:setFrame(f) --- end) - --- hs.hotkey.bind({"cmd", "shift"}, "1", function() --- local win = hs.window.focusedWindow() --- local rect = hs.geometry(0,0,4,4) --- hs.grid.set(win, rect) --- end) - --- hs.hotkey.bind({"cmd", "shift"}, "2", function() --- local win = hs.window.focusedWindow() --- local rect = hs.geometry(2,0,4,4) --- hs.grid.set(win, rect) --- end) --- -hyper = {"shift", "alt"} -hyper2 = {"ctrl", "alt", "shift"} - -hs.hotkey.bind(hyper, "L", function() - local win = hs.window.focusedWindow() - local rect = hs.geometry(3,0,3,6) - hs.grid.set(win, rect) -end) - -hs.hotkey.bind(hyper, "H", function() - local win = hs.window.focusedWindow() - local rect = hs.geometry(0,0,3,6) - hs.grid.set(win, rect) -end) - -hs.hotkey.bind(hyper2, "H", function() - hs.window.focusedWindow():moveOneScreenWest() -end) - -hs.hotkey.bind(hyper2, "L", function() - hs.window.focusedWindow():moveOneScreenEast() -end) - -hs.hotkey.bind(hyper, "space", hs.grid.maximizeWindow) - -hs.hotkey.bind(hyper, ".", hs.hints.windowHints) -hs.hotkey.bind(hyper, "G", hs.grid.show) - -expose = hs.expose.new(nil) -expose_app = hs.expose.new(nil, {onlyActiveApplication = true}) - -hs.hotkey.bind(hyper, "E", function() expose:toggleShow() end) -hs.hotkey.bind(hyper, "A", function() expose_app:toggleShow() end) - -caffeine = hs.menubar.new() -function setCaffeineDisplay(state) - if state then - caffeine:setTitle("☕️") - else - caffeine:setTitle("💤") - end -end - -function caffeineClicked() - setCaffeineDisplay(hs.caffeinate.toggle("displayIdle")) -end - -if caffeine then - caffeine:setClickCallback(caffeineClicked) - setCaffeineDisplay(hs.caffeinate.get("displayIdle")) -end - -setCaffeineDisplay(hs.caffeinate.toggle('displayIdle')) - -hs.loadSpoon('EjectMenu') -spoon.EjectMenu:start() -spoon.EjectMenu:bindHotkeys({ejectAll = {hyper2, 'e'}}) - --- --- Requires an API Access Token from Bit.ly -local BITLY_API_ACCESS_TOKEN = "e72c99ea3cd57861e530b5388de556297c49f736" - -hs.hotkey.bind({"cmd", "alt", "ctrl"}, "S", function() - local board = hs.pasteboard.getContents() - - if board:match("^https?://") then - local response = hs.http.asyncGet( - "https://api-ssl.bitly.com/v3/shorten" .. - "?access_token=" .. BITLY_API_ACCESS_TOKEN .. - "&longUrl=" .. hs.http.encodeForQuery(board), - {}, - function(status, response, headers) - if status == 200 then - local msg = hs.json.decode(response) - - hs.pasteboard.setContents(msg.data.url) - hs.notify.new({title="Bitly URL Shorten: Success", informativeText=msg.data.url}):send() - else - hs.notify.new({title="Bitly URL Shorten: Failure", informativeText=response}):send() - end - end - ) - else - hs.notify.new({title="Bitly URL Shorten: Failure", informativeText="Expected: URL"}):send() - end -end) diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..8b7eda9 --- /dev/null +++ b/install.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# Add some logic here +git clone --single-branch --branch servers https://github.com/nekoju/dotfiles.git ~/dotfiles \ + || cd ~/dotfiles && git pull --rebase + +files=( .bashrc .aliases .gitconfig .gitaliases .bash_profile ) +for file in "${files[@]}"; do + echo linking "$file" + mv ~/"$file" ~/"$file".bak \ + && ln -sf ~/dotfiles/"$file" ~/"$file" \ + && echo done +done +||||||| parent of 920fa00 (Add install script--untested.) +echo "All possible dotfiles linked" +echo "Done 🤘🏼" diff --git a/install.zsh b/install.zsh new file mode 100755 index 0000000..e7b0996 --- /dev/null +++ b/install.zsh @@ -0,0 +1,7 @@ +#!/bin/zsh + +# Add some logic here +git clone --single-branch --branch devhost https://github.com/nekoju/dotfiles.git ~/dotfiles \ + || cd ~/dotfiles && git pull +source ~/dotfiles/.zshrc +echo "Enjoy your defaults." diff --git a/kitty/kitty.conf b/kitty/kitty.conf deleted file mode 100644 index def9d48..0000000 --- a/kitty/kitty.conf +++ /dev/null @@ -1,2169 +0,0 @@ -# vim:fileencoding=utf-8:foldmethod=marker -include palenight.conf - -#: Fonts {{{ - -#: kitty has very powerful font management. You can configure -#: individual font faces and even specify special fonts for particular -#: characters. - -# font_family monospace -# bold_font auto -# italic_font auto -# bold_italic_font auto - -#: You can specify different fonts for the bold/italic/bold-italic -#: variants. To get a full list of supported fonts use the `kitty -#: +list-fonts` command. By default they are derived automatically, by -#: the OSes font system. When bold_font or bold_italic_font is set to -#: auto on macOS, the priority of bold fonts is semi-bold, bold, -#: heavy. Setting them manually is useful for font families that have -#: many weight variants like Book, Medium, Thick, etc. For example:: - -#: font_family Operator Mono Book -#: bold_font Operator Mono Medium -#: italic_font Operator Mono Book Italic -#: bold_italic_font Operator Mono Medium Italic - -# font_size 11.0 - -#: Font size (in pts) - -# force_ltr no - -#: kitty does not support BIDI (bidirectional text), however, for RTL -#: scripts, words are automatically displayed in RTL. That is to say, -#: in an RTL script, the words "HELLO WORLD" display in kitty as -#: "WORLD HELLO", and if you try to select a substring of an RTL- -#: shaped string, you will get the character that would be there had -#: the the string been LTR. For example, assuming the Hebrew word -#: ירושלים, selecting the character that on the screen appears to be ם -#: actually writes into the selection buffer the character י. kitty's -#: default behavior is useful in conjunction with a filter to reverse -#: the word order, however, if you wish to manipulate RTL glyphs, it -#: can be very challenging to work with, so this option is provided to -#: turn it off. Furthermore, this option can be used with the command -#: line program GNU FriBidi -#: to get BIDI -#: support, because it will force kitty to always treat the text as -#: LTR, which FriBidi expects for terminals. - -# adjust_line_height 0 -# adjust_column_width 0 - -#: Change the size of each character cell kitty renders. You can use -#: either numbers, which are interpreted as pixels or percentages -#: (number followed by %), which are interpreted as percentages of the -#: unmodified values. You can use negative pixels or percentages less -#: than 100% to reduce sizes (but this might cause rendering -#: artifacts). - -# adjust_baseline 0 - -#: Adjust the vertical alignment of text (the height in the cell at -#: which text is positioned). You can use either numbers, which are -#: interpreted as pixels or percentages (number followed by %), which -#: are interpreted as the percentage of the line height. A positive -#: value moves the baseline up, and a negative value moves them down. -#: The underline and strikethrough positions are adjusted accordingly. - -# symbol_map - -#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols - -#: Map the specified Unicode codepoints to a particular font. Useful -#: if you need special rendering for some symbols, such as for -#: Powerline. Avoids the need for patched fonts. Each Unicode code -#: point is specified in the form `U+`. You -#: can specify multiple code points, separated by commas and ranges -#: separated by hyphens. This option can be specified multiple times. -#: The syntax is:: - -#: symbol_map codepoints Font Family Name - -# narrow_symbols - -#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 - -#: Usually, for Private Use Unicode characters and some symbol/dingbat -#: characters, if the character is followed by one or more spaces, -#: kitty will use those extra cells to render the character larger, if -#: the character in the font has a wide aspect ratio. Using this -#: option you can force kitty to restrict the specified code points to -#: render in the specified number of cells (defaulting to one cell). -#: This option can be specified multiple times. The syntax is:: - -#: narrow_symbols codepoints [optionally the number of cells] - -# disable_ligatures never - -#: Choose how you want to handle multi-character ligatures. The -#: default is to always render them. You can tell kitty to not render -#: them when the cursor is over them by using cursor to make editing -#: easier, or have kitty never render them at all by using always, if -#: you don't like them. The ligature strategy can be set per-window -#: either using the kitty remote control facility or by defining -#: shortcuts for it in kitty.conf, for example:: - -#: map alt+1 disable_ligatures_in active always -#: map alt+2 disable_ligatures_in all never -#: map alt+3 disable_ligatures_in tab cursor - -#: Note that this refers to programming ligatures, typically -#: implemented using the calt OpenType feature. For disabling general -#: ligatures, use the font_features option. - -# font_features - -#: E.g. font_features none - -#: Choose exactly which OpenType features to enable or disable. This -#: is useful as some fonts might have features worthwhile in a -#: terminal. For example, Fira Code includes a discretionary feature, -#: zero, which in that font changes the appearance of the zero (0), to -#: make it more easily distinguishable from Ø. Fira Code also includes -#: other discretionary features known as Stylistic Sets which have the -#: tags ss01 through ss20. - -#: For the exact syntax to use for individual features, see the -#: HarfBuzz documentation . - -#: Note that this code is indexed by PostScript name, and not the font -#: family. This allows you to define very precise feature settings; -#: e.g. you can disable a feature in the italic font but not in the -#: regular font. - -#: On Linux, font features are first read from the FontConfig database -#: and then this option is applied, so they can be configured in a -#: single, central place. - -#: To get the PostScript name for a font, use `kitty +list-fonts -#: --psnames`: - -#: .. code-block:: sh - -#: $ kitty +list-fonts --psnames | grep Fira -#: Fira Code -#: Fira Code Bold (FiraCode-Bold) -#: Fira Code Light (FiraCode-Light) -#: Fira Code Medium (FiraCode-Medium) -#: Fira Code Regular (FiraCode-Regular) -#: Fira Code Retina (FiraCode-Retina) - -#: The part in brackets is the PostScript name. - -#: Enable alternate zero and oldstyle numerals:: - -#: font_features FiraCode-Retina +zero +onum - -#: Enable only alternate zero in the bold font:: - -#: font_features FiraCode-Bold +zero - -#: Disable the normal ligatures, but keep the calt feature which (in -#: this font) breaks up monotony:: - -#: font_features TT2020StyleB-Regular -liga +calt - -#: In conjunction with force_ltr, you may want to disable Arabic -#: shaping entirely, and only look at their isolated forms if they -#: show up in a document. You can do this with e.g.:: - -#: font_features UnifontMedium +isol -medi -fina -init - -# box_drawing_scale 0.001, 1, 1.5, 2 - -#: The sizes of the lines used for the box drawing Unicode characters. -#: These values are in pts. They will be scaled by the monitor DPI to -#: arrive at a pixel value. There must be four values corresponding to -#: thin, normal, thick, and very thick lines. - -#: }}} - -#: Cursor customization {{{ - -# cursor #cccccc - -#: Default cursor color. If set to the special value none the cursor -#: will be rendered with a "reverse video" effect. It's color will be -#: the color of the text in the cell it is over and the text will be -#: rendered with the background color of the cell. Note that if the -#: program running in the terminal sets a cursor color, this takes -#: precedence. Also, the cursor colors are modified if the cell -#: background and foreground colors have very low contrast. - -# cursor_text_color #111111 - -#: The color of text under the cursor. If you want it rendered with -#: the background color of the cell underneath instead, use the -#: special keyword: background. Note that if cursor is set to none -#: then this option is ignored. - -# cursor_shape block - -#: The cursor shape can be one of block, beam, underline. Note that -#: when reloading the config this will be changed only if the cursor -#: shape has not been set by the program running in the terminal. This -#: sets the default cursor shape, applications running in the terminal -#: can override it. In particular, shell integration -#: in kitty sets -#: the cursor shape to beam at shell prompts. You can avoid this by -#: setting shell_integration to no-cursor. - -# cursor_beam_thickness 1.5 - -#: The thickness of the beam cursor (in pts). - -# cursor_underline_thickness 2.0 - -#: The thickness of the underline cursor (in pts). - -# cursor_blink_interval -1 - -#: The interval to blink the cursor (in seconds). Set to zero to -#: disable blinking. Negative values mean use system default. Note -#: that the minimum interval will be limited to repaint_delay. - -# cursor_stop_blinking_after 15.0 - -#: Stop blinking cursor after the specified number of seconds of -#: keyboard inactivity. Set to zero to never stop blinking. - -#: }}} - -#: Scrollback {{{ - -# scrollback_lines 2000 - -#: Number of lines of history to keep in memory for scrolling back. -#: Memory is allocated on demand. Negative numbers are (effectively) -#: infinite scrollback. Note that using very large scrollback is not -#: recommended as it can slow down performance of the terminal and -#: also use large amounts of RAM. Instead, consider using -#: scrollback_pager_history_size. Note that on config reload if this -#: is changed it will only affect newly created windows, not existing -#: ones. - -# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER - -#: Program with which to view scrollback in a new window. The -#: scrollback buffer is passed as STDIN to this program. If you change -#: it, make sure the program you use can handle ANSI escape sequences -#: for colors and text formatting. INPUT_LINE_NUMBER in the command -#: line above will be replaced by an integer representing which line -#: should be at the top of the screen. Similarly CURSOR_LINE and -#: CURSOR_COLUMN will be replaced by the current cursor position or -#: set to 0 if there is no cursor, for example, when showing the last -#: command output. - -# scrollback_pager_history_size 0 - -#: Separate scrollback history size (in MB), used only for browsing -#: the scrollback buffer with pager. This separate buffer is not -#: available for interactive scrolling but will be piped to the pager -#: program when viewing scrollback buffer in a separate window. The -#: current implementation stores the data in UTF-8, so approximatively -#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, -#: unformatted text. A value of zero or less disables this feature. -#: The maximum allowed size is 4GB. Note that on config reload if this -#: is changed it will only affect newly created windows, not existing -#: ones. - -# scrollback_fill_enlarged_window no - -#: Fill new space with lines from the scrollback buffer after -#: enlarging a window. - -# wheel_scroll_multiplier 5.0 - -#: Multiplier for the number of lines scrolled by the mouse wheel. -#: Note that this is only used for low precision scrolling devices, -#: not for high precision scrolling devices on platforms such as macOS -#: and Wayland. Use negative numbers to change scroll direction. See -#: also wheel_scroll_min_lines. - -# wheel_scroll_min_lines 1 - -#: The minimum number of lines scrolled by the mouse wheel. The scroll -#: multiplier only takes effect after it -#: reaches this number. Note that this is only used for low precision -#: scrolling devices like wheel mice that scroll by very small amounts -#: when using the wheel. With a negative number, the minimum number of -#: lines will always be added. - -# touch_scroll_multiplier 1.0 - -#: Multiplier for the number of lines scrolled by a touchpad. Note -#: that this is only used for high precision scrolling devices on -#: platforms such as macOS and Wayland. Use negative numbers to change -#: scroll direction. - -#: }}} - -#: Mouse {{{ - -# mouse_hide_wait 3.0 - -#: Hide mouse cursor after the specified number of seconds of the -#: mouse not being used. Set to zero to disable mouse cursor hiding. -#: Set to a negative value to hide the mouse cursor immediately when -#: typing text. Disabled by default on macOS as getting it to work -#: robustly with the ever-changing sea of bugs that is Cocoa is too -#: much effort. - -# url_color #0087bd -# url_style curly - -#: The color and style for highlighting URLs on mouse-over. url_style -#: can be one of: none, straight, double, curly, dotted, dashed. - -# open_url_with default - -#: The program to open clicked URLs. The special value default means -#: to use the operating system's default URL handler (open on macOS -#: and xdg-open on Linux). - -# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh - -#: The set of URL prefixes to look for when detecting a URL under the -#: mouse cursor. - -# detect_urls yes - -#: Detect URLs under the mouse. Detected URLs are highlighted with an -#: underline and the mouse cursor becomes a hand over them. Even if -#: this option is disabled, URLs are still clickable. - -# url_excluded_characters - -#: Additional characters to be disallowed from URLs, when detecting -#: URLs under the mouse cursor. By default, all characters that are -#: legal in URLs are allowed. - -# copy_on_select no - -#: Copy to clipboard or a private buffer on select. With this set to -#: clipboard, selecting text with the mouse will cause the text to be -#: copied to clipboard. Useful on platforms such as macOS that do not -#: have the concept of primary selection. You can instead specify a -#: name such as a1 to copy to a private kitty buffer. Map a shortcut -#: with the paste_from_buffer action to paste from this private -#: buffer. For example:: - -#: copy_on_select a1 -#: map shift+cmd+v paste_from_buffer a1 - -#: Note that copying to the clipboard is a security risk, as all -#: programs, including websites open in your browser can read the -#: contents of the system clipboard. - -# paste_actions quote-urls-at-prompt - -#: A comma separated list of actions to take when pasting text into -#: the terminal. The supported paste actions are: - -#: quote-urls-at-prompt: -#: If the text being pasted is a URL and the cursor is at a shell prompt, -#: automatically quote the URL (needs shell_integration). -#: confirm: -#: Confirm the paste if bracketed paste mode is not active or there is more -#: a large amount of text being pasted. -#: filter: -#: Run the filter_paste() function from the file paste-actions.py in -#: the kitty config directory on the pasted text. The text returned by the -#: function will be actually pasted. - -# strip_trailing_spaces never - -#: Remove spaces at the end of lines when copying to clipboard. A -#: value of smart will do it when using normal selections, but not -#: rectangle selections. A value of always will always do it. - -# select_by_word_characters @-./_~?&=%+# - -#: Characters considered part of a word when double clicking. In -#: addition to these characters any character that is marked as an -#: alphanumeric character in the Unicode database will be matched. - -# select_by_word_characters_forward - -#: Characters considered part of a word when extending the selection -#: forward on double clicking. In addition to these characters any -#: character that is marked as an alphanumeric character in the -#: Unicode database will be matched. - -#: If empty (default) select_by_word_characters will be used for both -#: directions. - -# click_interval -1.0 - -#: The interval between successive clicks to detect double/triple -#: clicks (in seconds). Negative numbers will use the system default -#: instead, if available, or fallback to 0.5. - -# focus_follows_mouse no - -#: Set the active window to the window under the mouse when moving the -#: mouse around. - -# pointer_shape_when_grabbed arrow - -#: The shape of the mouse pointer when the program running in the -#: terminal grabs the mouse. Valid values are: arrow, beam and hand. - -# default_pointer_shape beam - -#: The default shape of the mouse pointer. Valid values are: arrow, -#: beam and hand. - -# pointer_shape_when_dragging beam - -#: The default shape of the mouse pointer when dragging across text. -#: Valid values are: arrow, beam and hand. - -#: Mouse actions {{{ - -#: Mouse buttons can be mapped to perform arbitrary actions. The -#: syntax is: - -#: .. code-block:: none - -#: mouse_map button-name event-type modes action - -#: Where button-name is one of left, middle, right, b1 ... b8 with -#: added keyboard modifiers. For example: ctrl+shift+left refers to -#: holding the Ctrl+Shift keys while clicking with the left mouse -#: button. The value b1 ... b8 can be used to refer to up to eight -#: buttons on a mouse. - -#: event-type is one of press, release, doublepress, triplepress, -#: click, doubleclick. modes indicates whether the action is performed -#: when the mouse is grabbed by the program running in the terminal, -#: or not. The values are grabbed or ungrabbed or a comma separated -#: combination of them. grabbed refers to when the program running in -#: the terminal has requested mouse events. Note that the click and -#: double click events have a delay of click_interval to disambiguate -#: from double and triple presses. - -#: You can run kitty with the kitty --debug-input command line option -#: to see mouse events. See the builtin actions below to get a sense -#: of what is possible. - -#: If you want to unmap an action, map it to no_op. For example, to -#: disable opening of URLs with a plain click:: - -#: mouse_map left click ungrabbed no_op - -#: See all the mappable actions including mouse actions here -#: . - -#: .. note:: -#: Once a selection is started, releasing the button that started it will -#: automatically end it and no release event will be dispatched. - -# clear_all_mouse_actions no - -#: Remove all mouse action definitions up to this point. Useful, for -#: instance, to remove the default mouse actions. - -#: Click the link under the mouse or move the cursor - -# mouse_map left click ungrabbed mouse_handle_click selection link prompt - -#:: First check for a selection and if one exists do nothing. Then -#:: check for a link under the mouse cursor and if one exists, click -#:: it. Finally check if the click happened at the current shell -#:: prompt and if so, move the cursor to the click location. Note -#:: that this requires shell integration -#:: to work. - -#: Click the link under the mouse or move the cursor even when grabbed - -# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt - -#:: Same as above, except that the action is performed even when the -#:: mouse is grabbed by the program running in the terminal. - -#: Click the link under the mouse cursor - -# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link - -#:: Variant with Ctrl+Shift is present because the simple click based -#:: version has an unavoidable delay of click_interval, to -#:: disambiguate clicks from double clicks. - -#: Discard press event for link click - -# mouse_map ctrl+shift+left press grabbed discard_event - -#:: Prevent this press event from being sent to the program that has -#:: grabbed the mouse, as the corresponding release event is used to -#:: open a URL. - -#: Paste from the primary selection - -# mouse_map middle release ungrabbed paste_from_selection - -#: Start selecting text - -# mouse_map left press ungrabbed mouse_selection normal - -#: Start selecting text in a rectangle - -# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle - -#: Select a word - -# mouse_map left doublepress ungrabbed mouse_selection word - -#: Select a line - -# mouse_map left triplepress ungrabbed mouse_selection line - -#: Select line from point - -# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point - -#:: Select from the clicked point to the end of the line. - -#: Extend the current selection - -# mouse_map right press ungrabbed mouse_selection extend - -#:: If you want only the end of the selection to be moved instead of -#:: the nearest boundary, use move-end instead of extend. - -#: Paste from the primary selection even when grabbed - -# mouse_map shift+middle release ungrabbed,grabbed paste_selection -# mouse_map shift+middle press grabbed discard_event - -#: Start selecting text even when grabbed - -# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal - -#: Start selecting text in a rectangle even when grabbed - -# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle - -#: Select a word even when grabbed - -# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word - -#: Select a line even when grabbed - -# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line - -#: Select line from point even when grabbed - -# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point - -#:: Select from the clicked point to the end of the line even when -#:: grabbed. - -#: Extend the current selection even when grabbed - -# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend - -#: Show clicked command output in pager - -# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output - -#:: Requires shell integration -#:: to work. - -#: }}} - -#: }}} - -#: Performance tuning {{{ - -# repaint_delay 10 - -#: Delay between screen updates (in milliseconds). Decreasing it, -#: increases frames-per-second (FPS) at the cost of more CPU usage. -#: The default value yields ~100 FPS which is more than sufficient for -#: most uses. Note that to actually achieve 100 FPS, you have to -#: either set sync_to_monitor to no or use a monitor with a high -#: refresh rate. Also, to minimize latency when there is pending input -#: to be processed, this option is ignored. - -# input_delay 3 - -#: Delay before input from the program running in the terminal is -#: processed (in milliseconds). Note that decreasing it will increase -#: responsiveness, but also increase CPU usage and might cause flicker -#: in full screen programs that redraw the entire screen on each loop, -#: because kitty is so fast that partial screen updates will be drawn. - -# sync_to_monitor yes - -#: Sync screen updates to the refresh rate of the monitor. This -#: prevents screen tearing -#: when scrolling. -#: However, it limits the rendering speed to the refresh rate of your -#: monitor. With a very high speed mouse/high keyboard repeat rate, -#: you may notice some slight input latency. If so, set this to no. - -#: }}} - -#: Terminal bell {{{ - -# enable_audio_bell yes - -#: The audio bell. Useful to disable it in environments that require -#: silence. - -# visual_bell_duration 0.0 - -#: The visual bell duration (in seconds). Flash the screen when a bell -#: occurs for the specified number of seconds. Set to zero to disable. - -# visual_bell_color none - -#: The color used by visual bell. Set to none will fall back to -#: selection background color. If you feel that the visual bell is too -#: bright, you can set it to a darker color. - -# window_alert_on_bell yes - -#: Request window attention on bell. Makes the dock icon bounce on -#: macOS or the taskbar flash on linux. - -# bell_on_tab "🔔 " - -#: Some text or a Unicode symbol to show on the tab if a window in the -#: tab that does not have focus has a bell. If you want to use leading -#: or trailing spaces, surround the text with quotes. See -#: tab_title_template for how this is rendered. - -#: For backwards compatibility, values of yes, y and true are -#: converted to the default bell symbol and no, n, false and none are -#: converted to the empty string. - -# command_on_bell none - -#: Program to run when a bell occurs. The environment variable -#: KITTY_CHILD_CMDLINE can be used to get the program running in the -#: window in which the bell occurred. - -# bell_path none - -#: Path to a sound file to play as the bell sound. If set to none, the -#: system default bell sound is used. Must be in a format supported by -#: the operating systems sound API, such as WAV or OGA on Linux -#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound) - -#: }}} - -#: Window layout {{{ - -# remember_window_size yes -# initial_window_width 640 -# initial_window_height 400 - -#: If enabled, the window size will be remembered so that new -#: instances of kitty will have the same size as the previous -#: instance. If disabled, the window will initially have size -#: configured by initial_window_width/height, in pixels. You can use a -#: suffix of "c" on the width/height values to have them interpreted -#: as number of cells instead of pixels. - -# enabled_layouts * - -#: The enabled window layouts. A comma separated list of layout names. -#: The special value all means all layouts. The first listed layout -#: will be used as the startup layout. Default configuration is all -#: layouts in alphabetical order. For a list of available layouts, see -#: the layouts . - -# window_resize_step_cells 2 -# window_resize_step_lines 2 - -#: The step size (in units of cell width/cell height) to use when -#: resizing kitty windows in a layout with the shortcut -#: start_resizing_window. The cells value is used for horizontal -#: resizing, and the lines value is used for vertical resizing. - -# window_border_width 0.5pt - -#: The width of window borders. Can be either in pixels (px) or pts -#: (pt). Values in pts will be rounded to the nearest number of pixels -#: based on screen resolution. If not specified, the unit is assumed -#: to be pts. Note that borders are displayed only when more than one -#: window is visible. They are meant to separate multiple windows. - -# draw_minimal_borders yes - -#: Draw only the minimum borders needed. This means that only the -#: borders that separate the inactive window from a neighbor are -#: drawn. Note that setting a non-zero window_margin_width overrides -#: this and causes all borders to be drawn. - -# window_margin_width 0 - -#: The window margin (in pts) (blank area outside the border). A -#: single value sets all four sides. Two values set the vertical and -#: horizontal sides. Three values set top, horizontal and bottom. Four -#: values set top, right, bottom and left. - -# single_window_margin_width -1 - -#: The window margin to use when only a single window is visible (in -#: pts). Negative values will cause the value of window_margin_width -#: to be used instead. A single value sets all four sides. Two values -#: set the vertical and horizontal sides. Three values set top, -#: horizontal and bottom. Four values set top, right, bottom and left. - -# window_padding_width 0 - -#: The window padding (in pts) (blank area between the text and the -#: window border). A single value sets all four sides. Two values set -#: the vertical and horizontal sides. Three values set top, horizontal -#: and bottom. Four values set top, right, bottom and left. - -# placement_strategy center - -#: When the window size is not an exact multiple of the cell size, the -#: cell area of the terminal window will have some extra padding on -#: the sides. You can control how that padding is distributed with -#: this option. Using a value of center means the cell area will be -#: placed centrally. A value of top-left means the padding will be -#: only at the bottom and right edges. - -# active_border_color #00ff00 - -#: The color for the border of the active window. Set this to none to -#: not draw borders around the active window. - -# inactive_border_color #cccccc - -#: The color for the border of inactive windows. - -# bell_border_color #ff5a00 - -#: The color for the border of inactive windows in which a bell has -#: occurred. - -# inactive_text_alpha 1.0 - -#: Fade the text in inactive windows by the specified amount (a number -#: between zero and one, with zero being fully faded). - -# hide_window_decorations no - -#: Hide the window decorations (title-bar and window borders) with -#: yes. On macOS, titlebar-only can be used to only hide the titlebar. -#: Whether this works and exactly what effect it has depends on the -#: window manager/operating system. Note that the effects of changing -#: this option when reloading config are undefined. - -# window_logo_path none - -#: Path to a logo image. Must be in PNG format. Relative paths are -#: interpreted relative to the kitty config directory. The logo is -#: displayed in a corner of every kitty window. The position is -#: controlled by window_logo_position. Individual windows can be -#: configured to have different logos either using the launch action -#: or the remote control facility. - -# window_logo_position bottom-right - -#: Where to position the window logo in the window. The value can be -#: one of: top-left, top, top-right, left, center, right, bottom-left, -#: bottom, bottom-right. - -# window_logo_alpha 0.5 - -#: The amount the logo should be faded into the background. With zero -#: being fully faded and one being fully opaque. - -# resize_debounce_time 0.1 - -#: The time to wait before redrawing the screen when a resize event is -#: received (in seconds). On platforms such as macOS, where the -#: operating system sends events corresponding to the start and end of -#: a resize, this number is ignored. - -# resize_draw_strategy static - -#: Choose how kitty draws a window while a resize is in progress. A -#: value of static means draw the current window contents, mostly -#: unchanged. A value of scale means draw the current window contents -#: scaled. A value of blank means draw a blank window. A value of size -#: means show the window size in cells. - -# resize_in_steps no - -#: Resize the OS window in steps as large as the cells, instead of -#: with the usual pixel accuracy. Combined with initial_window_width -#: and initial_window_height in number of cells, this option can be -#: used to keep the margins as small as possible when resizing the OS -#: window. Note that this does not currently work on Wayland. - -# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ - -#: The list of characters for visual window selection. For example, -#: for selecting a window to focus on with focus_visible_window. The -#: value should be a series of unique numbers or alphabets, case -#: insensitive, from the set [0-9A-Z]. Specify your preference as a -#: string of characters. - -# confirm_os_window_close -1 - -#: Ask for confirmation when closing an OS window or a tab with at -#: least this number of kitty windows in it by window manager (e.g. -#: clicking the window close button or pressing the operating system -#: shortcut to close windows) or by the close_tab action. A value of -#: zero disables confirmation. This confirmation also applies to -#: requests to quit the entire application (all OS windows, via the -#: quit action). Negative values are converted to positive ones, -#: however, with shell_integration enabled, using negative values -#: means windows sitting at a shell prompt are not counted, only -#: windows where some command is currently running. Note that if you -#: want confirmation when closing individual windows, you can map the -#: close_window_with_confirmation action. - -#: }}} - -#: Tab bar {{{ - -# tab_bar_edge bottom - -#: The edge to show the tab bar on, top or bottom. - -# tab_bar_margin_width 0.0 - -#: The margin to the left and right of the tab bar (in pts). - -# tab_bar_margin_height 0.0 0.0 - -#: The margin above and below the tab bar (in pts). The first number -#: is the margin between the edge of the OS Window and the tab bar. -#: The second number is the margin between the tab bar and the -#: contents of the current tab. - -# tab_bar_style fade - -#: The tab bar style, can be one of: - -#: fade -#: Each tab's edges fade into the background color. (See also tab_fade) -#: slant -#: Tabs look like the tabs in a physical file. -#: separator -#: Tabs are separated by a configurable separator. (See also -#: tab_separator) -#: powerline -#: Tabs are shown as a continuous line with "fancy" separators. -#: (See also tab_powerline_style) -#: custom -#: A user-supplied Python function called draw_tab is loaded from the file -#: tab_bar.py in the kitty config directory. For examples of how to -#: write such a function, see the functions named draw_tab_with_* in -#: kitty's source code: kitty/tab_bar.py. See also -#: this discussion https://github.com/kovidgoyal/kitty/discussions/4447 -#: for examples from kitty users. -#: hidden -#: The tab bar is hidden. If you use this, you might want to create a mapping -#: for the select_tab action which presents you with a list of tabs and -#: allows for easy switching to a tab. - -# tab_bar_align left - -#: The horizontal alignment of the tab bar, can be one of: left, -#: center, right. - -# tab_bar_min_tabs 2 - -#: The minimum number of tabs that must exist before the tab bar is -#: shown. - -# tab_switch_strategy previous - -#: The algorithm to use when switching to a tab when the current tab -#: is closed. The default of previous will switch to the last used -#: tab. A value of left will switch to the tab to the left of the -#: closed tab. A value of right will switch to the tab to the right of -#: the closed tab. A value of last will switch to the right-most tab. - -# tab_fade 0.25 0.5 0.75 1 - -#: Control how each tab fades into the background when using fade for -#: the tab_bar_style. Each number is an alpha (between zero and one) -#: that controls how much the corresponding cell fades into the -#: background, with zero being no fade and one being full fade. You -#: can change the number of cells used by adding/removing entries to -#: this list. - -# tab_separator " ┇" - -#: The separator between tabs in the tab bar when using separator as -#: the tab_bar_style. - -# tab_powerline_style angled - -#: The powerline separator style between tabs in the tab bar when -#: using powerline as the tab_bar_style, can be one of: angled, -#: slanted, round. - -# tab_activity_symbol none - -#: Some text or a Unicode symbol to show on the tab if a window in the -#: tab that does not have focus has some activity. If you want to use -#: leading or trailing spaces, surround the text with quotes. See -#: tab_title_template for how this is rendered. - -# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" - -#: A template to render the tab title. The default just renders the -#: title with optional symbols for bell and activity. If you wish to -#: include the tab-index as well, use something like: {index}:{title}. -#: Useful if you have shortcuts mapped for goto_tab N. If you prefer -#: to see the index as a superscript, use {sup.index}. In addition you -#: can use {layout_name} for the current layout name, {num_windows} -#: for the number of windows in the tab and {num_window_groups} for -#: the number of window groups (not counting overlay windows) in the -#: tab. Note that formatting is done by Python's string formatting -#: machinery, so you can use, for instance, {layout_name[:2].upper()} -#: to show only the first two letters of the layout name, upper-cased. -#: If you want to style the text, you can use styling directives, for -#: example: -#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. -#: Similarly, for bold and italic: -#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. -#: Note that for backward compatibility, if {bell_symbol} or -#: {activity_symbol} are not present in the template, they are -#: prepended to it. - -# active_tab_title_template none - -#: Template to use for active tabs. If not specified falls back to -#: tab_title_template. - -# active_tab_foreground #000 -# active_tab_background #eee -# active_tab_font_style bold-italic -# inactive_tab_foreground #444 -# inactive_tab_background #999 -# inactive_tab_font_style normal - -#: Tab bar colors and styles. - -# tab_bar_background none - -#: Background color for the tab bar. Defaults to using the terminal -#: background color. - -# tab_bar_margin_color none - -#: Color for the tab bar margin area. Defaults to using the terminal -#: background color. - -#: }}} - -#: Color scheme {{{ - -# foreground #dddddd -# background #000000 - -#: The foreground and background colors. - -background_opacity 0.90 - -#: The opacity of the background. A number between zero and one, where -#: one is opaque and zero is fully transparent. This will only work if -#: supported by the OS (for instance, when using a compositor under -#: X11). Note that it only sets the background color's opacity in -#: cells that have the same background color as the default terminal -#: background, so that things like the status bar in vim, powerline -#: prompts, etc. still look good. But it means that if you use a color -#: theme with a background color in your editor, it will not be -#: rendered as transparent. Instead you should change the default -#: background color in your kitty config and not use a background -#: color in the editor color scheme. Or use the escape codes to set -#: the terminals default colors in a shell script to launch your -#: editor. Be aware that using a value less than 1.0 is a (possibly -#: significant) performance hit. If you want to dynamically change -#: transparency of windows, set dynamic_background_opacity to yes -#: (this is off by default as it has a performance cost). Changing -#: this option when reloading the config will only work if -#: dynamic_background_opacity was enabled in the original config. - -# background_image none - -#: Path to a background image. Must be in PNG format. - -# background_image_layout tiled - -#: Whether to tile, scale or clamp the background image. The value can -#: be one of tiled, mirror-tiled, scaled, clamped. - -# background_image_linear no - -#: When background image is scaled, whether linear interpolation -#: should be used. - -# dynamic_background_opacity no - -#: Allow changing of the background_opacity dynamically, using either -#: keyboard shortcuts (increase_background_opacity and -#: decrease_background_opacity) or the remote control facility. -#: Changing this option by reloading the config is not supported. - -# background_tint 0.0 - -#: How much to tint the background image by the background color. The -#: tint is applied only under the text area, not margin/borders. This -#: option makes it easier to read the text. Tinting is done using the -#: current background color for each window. This option applies only -#: if background_opacity is set and transparent windows are supported -#: or background_image is set. - -# dim_opacity 0.75 - -#: How much to dim text that has the DIM/FAINT attribute set. One -#: means no dimming and zero means fully dimmed (i.e. invisible). - -# selection_foreground #000000 -# selection_background #fffacd - -#: The foreground and background colors for text selected with the -#: mouse. Setting both of these to none will cause a "reverse video" -#: effect for selections, where the selection will be the cell text -#: color and the text will become the cell background color. Setting -#: only selection_foreground to none will cause the foreground color -#: to be used unchanged. Note that these colors can be overridden by -#: the program running in the terminal. - -#: The color table {{{ - -#: The 256 terminal colors. There are 8 basic colors, each color has a -#: dull and bright version, for the first 16 colors. You can set the -#: remaining 240 colors as color16 to color255. - -# color0 #000000 -# color8 #767676 - -#: black - -# color1 #cc0403 -# color9 #f2201f - -#: red - -# color2 #19cb00 -# color10 #23fd00 - -#: green - -# color3 #cecb00 -# color11 #fffd00 - -#: yellow - -# color4 #0d73cc -# color12 #1a8fff - -#: blue - -# color5 #cb1ed1 -# color13 #fd28ff - -#: magenta - -# color6 #0dcdcd -# color14 #14ffff - -#: cyan - -# color7 #dddddd -# color15 #ffffff - -#: white - -# mark1_foreground black - -#: Color for marks of type 1 - -# mark1_background #98d3cb - -#: Color for marks of type 1 (light steel blue) - -# mark2_foreground black - -#: Color for marks of type 2 - -# mark2_background #f2dcd3 - -#: Color for marks of type 1 (beige) - -# mark3_foreground black - -#: Color for marks of type 3 - -# mark3_background #f274bc - -#: Color for marks of type 3 (violet) - -#: }}} - -#: }}} - -#: Advanced {{{ - -# shell . - -#: The shell program to execute. The default value of . means to use -#: whatever shell is set as the default shell for the current user. -#: Note that on macOS if you change this, you might need to add -#: --login and --interactive to ensure that the shell starts in -#: interactive mode and reads its startup rc files. - -editor . - -#: The terminal based text editor (such as vim or nano) to use when -#: editing the kitty config file or similar tasks. - -#: The default value of . means to use the environment variables -#: VISUAL and EDITOR in that order. If these variables aren't set, -#: kitty will run your shell ($SHELL -l -i -c env) to see if your -#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, -#: kitty will cycle through various known editors (vim, emacs, etc.) -#: and take the first one that exists on your system. - -# close_on_child_death no - -#: Close the window when the child process (shell) exits. With the -#: default value no, the terminal will remain open when the child -#: exits as long as there are still processes outputting to the -#: terminal (for example disowned or backgrounded processes). When -#: enabled with yes, the window will close as soon as the child -#: process exits. Note that setting it to yes means that any -#: background processes still using the terminal can fail silently -#: because their stdout/stderr/stdin no longer work. - -# allow_remote_control no - -#: Allow other programs to control kitty. If you turn this on, other -#: programs can control all aspects of kitty, including sending text -#: to kitty windows, opening new windows, closing windows, reading the -#: content of windows, etc. Note that this even works over SSH -#: connections. You can choose to either allow any program running -#: within kitty to control it with yes, or only allow programs that -#: connect to the socket (specified with the listen_on config option -#: or kitty --listen-on command line option) with the value socket- -#: only. The latter is useful if you want to prevent programs running -#: on a remote computer over SSH from controlling kitty. Reloading the -#: config will not affect this option. - -# listen_on none - -#: Listen to the specified UNIX socket for remote control connections. -#: Note that this will apply to all kitty instances. It can be -#: overridden by the kitty --listen-on command line option, which -#: supports listening on TCP socket. This option accepts only UNIX -#: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). -#: Environment variables are expanded and relative paths are resolved -#: with respect to the temporary directory. If {kitty_pid} is present, -#: then it is replaced by the PID of the kitty process, otherwise the -#: PID of the kitty process is appended to the value, with a hyphen. -#: This option is ignored unless you also set allow_remote_control to -#: enable remote control. See the help for kitty --listen-on for more -#: details. Changing this option by reloading the config is not -#: supported. - -# env - -#: Specify the environment variables to be set in all child processes. -#: Using the name with an equal sign (e.g. env VAR=) will set it to -#: the empty string. Specifying only the name (e.g. env VAR) will -#: remove the variable from the child process' environment. Note that -#: environment variables are expanded recursively, for example:: - -#: env VAR1=a -#: env VAR2=${HOME}/${VAR1}/b - -#: The value of VAR2 will be /a/b. - -# watcher - -#: Path to python file which will be loaded for watchers -#: . Can be -#: specified more than once to load multiple watchers. The watchers -#: will be added to every kitty window. Relative paths are resolved -#: relative to the kitty config directory. Note that reloading the -#: config will only affect windows created after the reload. - -# exe_search_path - -#: Control where kitty finds the programs to run. The default search -#: order is: First search the system wide PATH, then ~/.local/bin and -#: ~/bin. If still not found, the PATH defined in the login shell -#: after sourcing all its startup files is tried. Finally, if present, -#: the PATH specified by the env option is tried. - -#: This option allows you to prepend, append, or remove paths from -#: this search order. It can be specified multiple times for multiple -#: paths. A simple path will be prepended to the search order. A path -#: that starts with the + sign will be append to the search order, -#: after ~/bin above. A path that starts with the - sign will be -#: removed from the entire search order. For example:: - -#: exe_search_path /some/prepended/path -#: exe_search_path +/some/appended/path -#: exe_search_path -/some/excluded/path - -# update_check_interval 24 - -#: The interval to periodically check if an update to kitty is -#: available (in hours). If an update is found, a system notification -#: is displayed informing you of the available update. The default is -#: to check every 24 hours, set to zero to disable. Update checking is -#: only done by the official binary builds. Distro packages or source -#: builds do not do update checking. Changing this option by reloading -#: the config is not supported. - -# startup_session none - -#: Path to a session file to use for all kitty instances. Can be -#: overridden by using the kitty --session command line option for -#: individual instances. See sessions -#: in the -#: kitty documentation for details. Note that relative paths are -#: interpreted with respect to the kitty config directory. Environment -#: variables in the path are expanded. Changing this option by -#: reloading the config is not supported. - -# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask - -#: Allow programs running in kitty to read and write from the -#: clipboard. You can control exactly which actions are allowed. The -#: possible actions are: write-clipboard, read-clipboard, write- -#: primary, read-primary, read-clipboard-ask, read-primary-ask. The -#: default is to allow writing to the clipboard and primary selection -#: and to ask for permission when a program tries to read from the -#: clipboard. Note that disabling the read confirmation is a security -#: risk as it means that any program, even the ones running on a -#: remote server via SSH can read your clipboard. See also -#: clipboard_max_size. - -# clipboard_max_size 64 - -#: The maximum size (in MB) of data from programs running in kitty -#: that will be stored for writing to the system clipboard. A value of -#: zero means no size limit is applied. See also clipboard_control. - -# file_transfer_confirmation_bypass - -#: The password that can be supplied to the file transfer kitten -#: to skip the -#: transfer confirmation prompt. This should only be used when -#: initiating transfers from trusted computers, over trusted networks -#: or encrypted transports, as it allows any programs running on the -#: remote machine to read/write to the local filesystem, without -#: permission. - -# allow_hyperlinks yes - -#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 -#: escape sequences are ignored. Otherwise they become clickable -#: links, that you can click with the mouse or by using the hints -#: kitten . The -#: special value of ask means that kitty will ask before opening the -#: link when clicked. - -# shell_integration enabled - -#: Enable shell integration on supported shells. This enables features -#: such as jumping to previous prompts, browsing the output of the -#: previous command in a pager, etc. on supported shells. Set to -#: disabled to turn off shell integration, completely. It is also -#: possible to disable individual features, set to a space separated -#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- -#: prompt-mark, no-complete. See Shell integration -#: for details. - -# allow_cloning ask - -#: Control whether programs running in the terminal can request new -#: windows to be created. The canonical example is clone-in-kitty -#: . -#: By default, kitty will ask for permission for each clone request. -#: Allowing cloning unconditionally gives programs running in the -#: terminal (including over SSH) permission to execute arbitrary code, -#: as the user who is running the terminal, on the computer that the -#: terminal is running on. - -# clone_source_strategies venv,conda,env_var,path - -#: Control what shell code is sourced when running clone-in-kitty in -#: the newly cloned window. The supported strategies are: - -#: venv -#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the -#: Python stdlib venv module and allows cloning venvs automatically. -#: conda -#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual -#: environments created by conda. -#: env_var -#: Execute the contents of the environment variable -#: KITTY_CLONE_SOURCE_CODE with eval. -#: path -#: Source the file pointed to by the environment variable -#: KITTY_CLONE_SOURCE_PATH. - -#: This option must be a comma separated list of the above values. -#: This only source the first valid one in the above order. - -term tmux-256color - -#: The value of the TERM environment variable to set. Changing this -#: can break many terminal programs, only change it if you know what -#: you are doing, not because you read some advice on "Stack Overflow" -#: to change it. The TERM variable is used by various programs to get -#: information about the capabilities and behavior of the terminal. If -#: you change it, depending on what programs you run, and how -#: different the terminal you are changing it to is, various things -#: from key-presses, to colors, to various advanced features may not -#: work. Changing this option by reloading the config will only affect -#: newly created windows. - -#: }}} - -#: OS specific tweaks {{{ - -# wayland_titlebar_color system - -#: The color of the kitty window's titlebar on Wayland systems with -#: client side window decorations such as GNOME. A value of system -#: means to use the default system color, a value of background means -#: to use the background color of the currently active window and -#: finally you can use an arbitrary color, such as #12af59 or red. - -# macos_titlebar_color system - -#: The color of the kitty window's titlebar on macOS. A value of -#: system means to use the default system color, light or dark can -#: also be used to set it explicitly. A value of background means to -#: use the background color of the currently active window and finally -#: you can use an arbitrary color, such as #12af59 or red. WARNING: -#: This option works by using a hack when arbitrary color (or -#: background) is configured, as there is no proper Cocoa API for it. -#: It sets the background color of the entire window and makes the -#: titlebar transparent. As such it is incompatible with -#: background_opacity. If you want to use both, you are probably -#: better off just hiding the titlebar with hide_window_decorations. - -# macos_option_as_alt no - -#: Use the Option key as an Alt key on macOS. With this set to no, -#: kitty will use the macOS native Option+Key to enter Unicode -#: character behavior. This will break any Alt+Key keyboard shortcuts -#: in your terminal programs, but you can use the macOS Unicode input -#: technique. You can use the values: left, right or both to use only -#: the left, right or both Option keys as Alt, instead. Note that -#: kitty itself always treats Option the same as Alt. This means you -#: cannot use this option to configure different kitty shortcuts for -#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using -#: Option/Alt+Key will take priority, so that any such key presses -#: will not be passed to terminal programs running inside kitty. -#: Changing this option by reloading the config is not supported. - -# macos_hide_from_tasks no - -#: Hide the kitty window from running tasks on macOS (⌘+Tab and the -#: Dock). Changing this option by reloading the config is not -#: supported. - -# macos_quit_when_last_window_closed no - -#: Have kitty quit when all the top-level windows are closed on macOS. -#: By default, kitty will stay running, even with no open windows, as -#: is the expected behavior on macOS. - -# macos_window_resizable yes - -#: Disable this if you want kitty top-level OS windows to not be -#: resizable on macOS. Changing this option by reloading the config -#: will only affect newly created OS windows. - -# macos_thicken_font 0 - -#: Draw an extra border around the font with the given width, to -#: increase legibility at small font sizes on macOS. For example, a -#: value of 0.75 will result in rendering that looks similar to sub- -#: pixel antialiasing at common font sizes. - -# macos_traditional_fullscreen no - -#: Use the macOS traditional full-screen transition, that is faster, -#: but less pretty. - -# macos_show_window_title_in all - -#: Control where the window title is displayed on macOS. A value of -#: window will show the title of the currently active window at the -#: top of the macOS window. A value of menubar will show the title of -#: the currently active window in the macOS global menu bar, making -#: use of otherwise wasted space. A value of all will show the title -#: in both places, and none hides the title. See -#: macos_menubar_title_max_length for how to control the length of the -#: title in the menu bar. - -# macos_menubar_title_max_length 0 - -#: The maximum number of characters from the window title to show in -#: the macOS global menu bar. Values less than one means that there is -#: no maximum limit. - -# macos_custom_beam_cursor no - -#: Use a custom mouse cursor for macOS that is easier to see on both -#: light and dark backgrounds. Nowadays, the default macOS cursor -#: already comes with a white border. WARNING: this might make your -#: mouse cursor invisible on dual GPU machines. Changing this option -#: by reloading the config is not supported. - -# macos_colorspace srgb - -#: The colorspace in which to interpret terminal colors. The default -#: of srgb will cause colors to match those seen in web browsers. The -#: value of default will use whatever the native colorspace of the -#: display is. The value of displayp3 will use Apple's special -#: snowflake display P3 color space, which will result in over -#: saturated (brighter) colors with some color shift. Reloading -#: configuration will change this value only for newly created OS -#: windows. - -# linux_display_server auto - -#: Choose between Wayland and X11 backends. By default, an appropriate -#: backend based on the system state is chosen automatically. Set it -#: to x11 or wayland to force the choice. Changing this option by -#: reloading the config is not supported. - -#: }}} - -#: Keyboard shortcuts {{{ - -#: Keys are identified simply by their lowercase Unicode characters. -#: For example: a for the A key, [ for the left square bracket key, -#: etc. For functional keys, such as Enter or Escape, the names are -#: present at Functional key definitions -#: . For modifier keys, the names are ctrl (control, ⌃), -#: shift (⇧), alt (opt, option, ⌥), super (cmd, command, ⌘). See also: -#: GLFW mods - -#: On Linux you can also use XKB key names to bind keys that are not -#: supported by GLFW. See XKB keys -#: for a list of key names. The name to use is the part -#: after the XKB_KEY_ prefix. Note that you can only use an XKB key -#: name for keys that are not known as GLFW keys. - -#: Finally, you can use raw system key codes to map keys, again only -#: for keys that are not known as GLFW keys. To see the system key -#: code for a key, start kitty with the kitty --debug-input option, -#: kitty will output some debug text for every key event. In that text -#: look for native_code, the value of that becomes the key name in the -#: shortcut. For example: - -#: .. code-block:: none - -#: on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a' - -#: Here, the key name for the A key is 0x61 and you can use it with:: - -#: map ctrl+0x61 something - -#: to map Ctrl+A to something. - -#: You can use the special action no_op to unmap a keyboard shortcut -#: that is assigned in the default configuration:: - -#: map kitty_mod+space no_op - -#: If you would like kitty to completely ignore a key event, not even -#: sending it to the program running in the terminal, map it to -#: discard_event:: - -#: map kitty_mod+f1 discard_event - -#: You can combine multiple actions to be triggered by a single -#: shortcut with combine action, using the syntax below:: - -#: map key combine action1 action2 action3 ... - -#: For example:: - -#: map kitty_mod+e combine : new_window : next_layout - -#: This will create a new window and switch to the next available -#: layout. - -#: You can use multi-key shortcuts with the syntax shown below:: - -#: map key1>key2>key3 action - -#: For example:: - -#: map ctrl+f>2 set_font_size 20 - -#: The full list of actions that can be mapped to key presses is -#: available here . - -# kitty_mod ctrl+shift - -#: Special modifier key alias for default shortcuts. You can change -#: the value of this option to alter all default shortcuts that use -#: kitty_mod. - -# clear_all_shortcuts no - -#: Remove all shortcut definitions up to this point. Useful, for -#: instance, to remove the default shortcuts. - -# action_alias - -#: E.g. action_alias launch_tab launch --type=tab --cwd=current - -#: Define action aliases to avoid repeating the same options in -#: multiple mappings. Aliases can be defined for any action and will -#: be expanded recursively. For example, the above alias allows you to -#: create mappings to launch a new tab in the current working -#: directory without duplication:: - -#: map f1 launch_tab vim -#: map f2 launch_tab emacs - -#: Similarly, to alias kitten invocation:: - -#: action_alias hints kitten hints --hints-offset=0 - -# kitten_alias - -#: E.g. kitten_alias hints hints --hints-offset=0 - -#: Like action_alias above, but specifically for kittens. Generally, -#: prefer to use action_alias. This option is a legacy version, -#: present for backwards compatibility. It causes all invocations of -#: the aliased kitten to be substituted. So the example above will -#: cause all invocations of the hints kitten to have the --hints- -#: offset=0 option applied. - -#: Clipboard {{{ - -#: Copy to clipboard - -# map kitty_mod+c copy_to_clipboard -# map cmd+c copy_to_clipboard - -#:: There is also a copy_or_interrupt action that can be optionally -#:: mapped to Ctrl+C. It will copy only if there is a selection and -#:: send an interrupt otherwise. Similarly, -#:: copy_and_clear_or_interrupt will copy and clear the selection or -#:: send an interrupt if there is no selection. - -#: Paste from clipboard - -# map kitty_mod+v paste_from_clipboard -# map cmd+v paste_from_clipboard - -#: Paste from selection - -# map kitty_mod+s paste_from_selection -# map shift+insert paste_from_selection - -#: Pass selection to program - -# map kitty_mod+o pass_selection_to_program - -#:: You can also pass the contents of the current selection to any -#:: program with pass_selection_to_program. By default, the system's -#:: open program is used, but you can specify your own, the selection -#:: will be passed as a command line argument to the program. For -#:: example:: - -#:: map kitty_mod+o pass_selection_to_program firefox - -#:: You can pass the current selection to a terminal program running -#:: in a new kitty window, by using the @selection placeholder:: - -#:: map kitty_mod+y new_window less @selection - -#: }}} - -#: Scrolling {{{ - -#: Scroll line up - -# map kitty_mod+up scroll_line_up -# map kitty_mod+k scroll_line_up -# map opt+cmd+page_up scroll_line_up -# map cmd+up scroll_line_up - -#: Scroll line down - -# map kitty_mod+down scroll_line_down -# map kitty_mod+j scroll_line_down -# map opt+cmd+page_down scroll_line_down -# map cmd+down scroll_line_down - -#: Scroll page up - -# map kitty_mod+page_up scroll_page_up -# map cmd+page_up scroll_page_up - -#: Scroll page down - -# map kitty_mod+page_down scroll_page_down -# map cmd+page_down scroll_page_down - -#: Scroll to top - -# map kitty_mod+home scroll_home -# map cmd+home scroll_home - -#: Scroll to bottom - -# map kitty_mod+end scroll_end -# map cmd+end scroll_end - -#: Scroll to previous shell prompt - -# map kitty_mod+z scroll_to_prompt -1 - -#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last -#:: jumped to or the last clicked position. Requires shell -#:: integration -#:: to work. - -#: Scroll to next shell prompt - -# map kitty_mod+x scroll_to_prompt 1 - -#: Browse scrollback buffer in pager - -# map kitty_mod+h show_scrollback - -#:: You can pipe the contents of the current screen and history -#:: buffer as STDIN to an arbitrary program using launch --stdin- -#:: source. For example, the following opens the scrollback buffer in -#:: less in an overlay window:: - -#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R - -#:: For more details on piping screen and buffer contents to external -#:: programs, see launch . - -#: Browse output of the last shell command in pager - -# map kitty_mod+g show_last_command_output - -#:: You can also define additional shortcuts to get the command -#:: output. For example, to get the first command output on screen:: - -#:: map f1 show_first_command_output_on_screen - -#:: To get the command output that was last accessed by a keyboard -#:: action or mouse action:: - -#:: map f1 show_last_visited_command_output - -#:: You can pipe the output of the last command run in the shell -#:: using the launch action. For example, the following opens the -#:: output in less in an overlay window:: - -#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R - -#:: To get the output of the first command on the screen, use -#:: @first_cmd_output_on_screen. To get the output of the last jumped -#:: to command, use @last_visited_cmd_output. - -#:: Requires shell integration -#:: to work. - -#: }}} - -#: Window management {{{ - -#: New window - -# map kitty_mod+enter new_window -# map cmd+enter new_window - -#:: You can open a new kitty window running an arbitrary program, for -#:: example:: - -#:: map kitty_mod+y launch mutt - -#:: You can open a new window with the current working directory set -#:: to the working directory of the current window using:: - -#:: map ctrl+alt+enter launch --cwd=current - -#:: You can open a new window that is allowed to control kitty via -#:: the kitty remote control facility with launch --allow-remote- -#:: control. Any programs running in that window will be allowed to -#:: control kitty. For example:: - -#:: map ctrl+enter launch --allow-remote-control some_program - -#:: You can open a new window next to the currently active window or -#:: as the first window, with:: - -#:: map ctrl+n launch --location=neighbor -#:: map ctrl+f launch --location=first - -#:: For more details, see launch -#:: . - -#: New OS window - -# map kitty_mod+n new_os_window -# map cmd+n new_os_window - -#:: Works like new_window above, except that it opens a top-level OS -#:: window. In particular you can use new_os_window_with_cwd to open -#:: a window with the current working directory. - -#: Close window - -# map kitty_mod+w close_window -# map shift+cmd+d close_window - -#: Next window - -# map kitty_mod+] next_window - -#: Previous window - -# map kitty_mod+[ previous_window - -#: Move window forward - -# map kitty_mod+f move_window_forward - -#: Move window backward - -# map kitty_mod+b move_window_backward - -#: Move window to top - -# map kitty_mod+` move_window_to_top - -#: Start resizing window - -# map kitty_mod+r start_resizing_window -# map cmd+r start_resizing_window - -#: First window - -# map kitty_mod+1 first_window -# map cmd+1 first_window - -#: Second window - -# map kitty_mod+2 second_window -# map cmd+2 second_window - -#: Third window - -# map kitty_mod+3 third_window -# map cmd+3 third_window - -#: Fourth window - -# map kitty_mod+4 fourth_window -# map cmd+4 fourth_window - -#: Fifth window - -# map kitty_mod+5 fifth_window -# map cmd+5 fifth_window - -#: Sixth window - -# map kitty_mod+6 sixth_window -# map cmd+6 sixth_window - -#: Seventh window - -# map kitty_mod+7 seventh_window -# map cmd+7 seventh_window - -#: Eight window - -# map kitty_mod+8 eighth_window -# map cmd+8 eighth_window - -#: Ninth window - -# map kitty_mod+9 ninth_window -# map cmd+9 ninth_window - -#: Tenth window - -# map kitty_mod+0 tenth_window - -#: Visually select and focus window - -# map kitty_mod+f7 focus_visible_window - -#:: Display overlay numbers and alphabets on the window, and switch -#:: the focus to the window when you press the key. When there are -#:: only two windows, the focus will be switched directly without -#:: displaying the overlay. You can change the overlay characters and -#:: their order with option visual_window_select_characters. - -#: Visually swap window with another - -# map kitty_mod+f8 swap_with_window - -#:: Works like focus_visible_window above, but swaps the window. - -#: }}} - -#: Tab management {{{ - -#: Next tab - -# map kitty_mod+right next_tab -# map shift+cmd+] next_tab -# map ctrl+tab next_tab - -#: Previous tab - -# map kitty_mod+left previous_tab -# map shift+cmd+[ previous_tab -# map ctrl+shift+tab previous_tab - -#: New tab - -# map kitty_mod+t new_tab -# map cmd+t new_tab - -#: Close tab - -# map kitty_mod+q close_tab -# map cmd+w close_tab - -#: Close OS window - -# map shift+cmd+w close_os_window - -#: Move tab forward - -# map kitty_mod+. move_tab_forward - -#: Move tab backward - -# map kitty_mod+, move_tab_backward - -#: Set tab title - -# map kitty_mod+alt+t set_tab_title -# map shift+cmd+i set_tab_title - - -#: You can also create shortcuts to go to specific tabs, with 1 being -#: the first tab, 2 the second tab and -1 being the previously active -#: tab, and any number larger than the last tab being the last tab:: - -#: map ctrl+alt+1 goto_tab 1 -#: map ctrl+alt+2 goto_tab 2 - -#: Just as with new_window above, you can also pass the name of -#: arbitrary commands to run when using new_tab and new_tab_with_cwd. -#: Finally, if you want the new tab to open next to the current tab -#: rather than at the end of the tabs list, use:: - -#: map ctrl+t new_tab !neighbor [optional cmd to run] -map ctrl+t no_op -#: }}} - -#: Layout management {{{ - -#: Next layout - -# map kitty_mod+l next_layout - - -#: You can also create shortcuts to switch to specific layouts:: - -#: map ctrl+alt+t goto_layout tall -#: map ctrl+alt+s goto_layout stack - -#: Similarly, to switch back to the previous layout:: - -#: map ctrl+alt+p last_used_layout - -#: There is also a toggle_layout action that switches to the named -#: layout or back to the previous layout if in the named layout. -#: Useful to temporarily "zoom" the active window by switching to the -#: stack layout:: - -#: map ctrl+alt+z toggle_layout stack -#: }}} - -#: Font sizes {{{ - -#: You can change the font size for all top-level kitty OS windows at -#: a time or only the current one. - -#: Increase font size - -# map kitty_mod+equal change_font_size all +2.0 -# map kitty_mod+plus change_font_size all +2.0 -# map kitty_mod+kp_add change_font_size all +2.0 -# map cmd+plus change_font_size all +2.0 -# map cmd+equal change_font_size all +2.0 -# map shift+cmd+equal change_font_size all +2.0 - -#: Decrease font size - -# map kitty_mod+minus change_font_size all -2.0 -# map kitty_mod+kp_subtract change_font_size all -2.0 -# map cmd+minus change_font_size all -2.0 -# map shift+cmd+minus change_font_size all -2.0 - -#: Reset font size - -# map kitty_mod+backspace change_font_size all 0 -# map cmd+0 change_font_size all 0 - - -#: To setup shortcuts for specific font sizes:: - -#: map kitty_mod+f6 change_font_size all 10.0 - -#: To setup shortcuts to change only the current OS window's font -#: size:: - -#: map kitty_mod+f6 change_font_size current 10.0 -#: }}} - -#: Select and act on visible text {{{ - -#: Use the hints kitten to select text and either pass it to an -#: external program or insert it into the terminal or copy it to the -#: clipboard. - -#: Open URL - -# map kitty_mod+e open_url_with_hints - -#:: Open a currently visible URL using the keyboard. The program used -#:: to open the URL is specified in open_url_with. - -#: Insert selected path - -# map kitty_mod+p>f kitten hints --type path --program - - -#:: Select a path/filename and insert it into the terminal. Useful, -#:: for instance to run git commands on a filename output from a -#:: previous git command. - -#: Open selected path - -# map kitty_mod+p>shift+f kitten hints --type path - -#:: Select a path/filename and open it with the default open program. - -#: Insert selected line - -# map kitty_mod+p>l kitten hints --type line --program - - -#:: Select a line of text and insert it into the terminal. Useful for -#:: the output of things like: `ls -1`. - -#: Insert selected word - -# map kitty_mod+p>w kitten hints --type word --program - - -#:: Select words and insert into terminal. - -#: Insert selected hash - -# map kitty_mod+p>h kitten hints --type hash --program - - -#:: Select something that looks like a hash and insert it into the -#:: terminal. Useful with git, which uses SHA1 hashes to identify -#:: commits. - -#: Open the selected file at the selected line - -# map kitty_mod+p>n kitten hints --type linenum - -#:: Select something that looks like filename:linenum and open it in -#:: vim at the specified line number. - -#: Open the selected hyperlink - -# map kitty_mod+p>y kitten hints --type hyperlink - -#:: Select a hyperlink (i.e. a URL that has been marked as such by -#:: the terminal program, for example, by `ls --hyperlink=auto`). - - -#: The hints kitten has many more modes of operation that you can map -#: to different shortcuts. For a full description see hints kitten -#: . -#: }}} - -#: Miscellaneous {{{ - -#: Toggle fullscreen - -# map kitty_mod+f11 toggle_fullscreen -# map ctrl+cmd+f toggle_fullscreen - -#: Toggle maximized - -# map kitty_mod+f10 toggle_maximized - -#: Toggle macOS secure keyboard entry - -# map opt+cmd+s toggle_macos_secure_keyboard_entry - -#: Unicode input - -# map kitty_mod+u kitten unicode_input -# map ctrl+cmd+space kitten unicode_input - -#: Edit config file - -# map kitty_mod+f2 edit_config_file -# map cmd+, edit_config_file - -#: Open the kitty command shell - -# map kitty_mod+escape kitty_shell window - -#:: Open the kitty shell in a new window / tab / overlay / os_window -#:: to control kitty using commands. - -#: Increase background opacity - -# map kitty_mod+a>m set_background_opacity +0.1 - -#: Decrease background opacity - -# map kitty_mod+a>l set_background_opacity -0.1 - -#: Make background fully opaque - -# map kitty_mod+a>1 set_background_opacity 1 - -#: Reset background opacity - -# map kitty_mod+a>d set_background_opacity default - -#: Reset the terminal - -# map kitty_mod+delete clear_terminal reset active -# map opt+cmd+r clear_terminal reset active - -#:: You can create shortcuts to clear/reset the terminal. For -#:: example:: - -#:: # Reset the terminal -#:: map f1 clear_terminal reset active -#:: # Clear the terminal screen by erasing all contents -#:: map f1 clear_terminal clear active -#:: # Clear the terminal scrollback by erasing it -#:: map f1 clear_terminal scrollback active -#:: # Scroll the contents of the screen into the scrollback -#:: map f1 clear_terminal scroll active -#:: # Clear everything up to the line with the cursor -#:: map f1 clear_terminal to_cursor active - -#:: If you want to operate on all kitty windows instead of just the -#:: current one, use all instead of active. - -#:: It is also possible to remap Ctrl+L to both scroll the current -#:: screen contents into the scrollback buffer and clear the screen, -#:: instead of just clearing the screen, for example, for ZSH add the -#:: following to ~/.zshrc: - -#:: .. code-block:: zsh - -#:: scroll-and-clear-screen() { -#:: printf '\n%.0s' {1..$LINES} -#:: zle clear-screen -#:: } -#:: zle -N scroll-and-clear-screen -#:: bindkey '^l' scroll-and-clear-screen - -#: Clear up to cursor line - -# map cmd+k clear_terminal to_cursor active - -#: Reload kitty.conf - -# map kitty_mod+f5 load_config_file -# map ctrl+cmd+, load_config_file - -#:: Reload kitty.conf, applying any changes since the last time it -#:: was loaded. Note that a handful of options cannot be dynamically -#:: changed and require a full restart of kitty. Particularly, when -#:: changing shortcuts for actions located on the macOS global menu -#:: bar, a full restart is needed. You can also map a keybinding to -#:: load a different config file, for example:: - -#:: map f5 load_config /path/to/alternative/kitty.conf - -#:: Note that all options from the original kitty.conf are discarded, -#:: in other words the new configuration *replace* the old ones. - -#: Debug kitty configuration - -# map kitty_mod+f6 debug_config -# map opt+cmd+, debug_config - -#:: Show details about exactly what configuration kitty is running -#:: with and its host environment. Useful for debugging issues. - -#: Send arbitrary text on key presses - -#:: E.g. map ctrl+shift+alt+h send_text all Hello World - -#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the -#:: client program when pressing specified shortcut keys. For -#:: example:: - -#:: map ctrl+alt+a send_text all Special text - -#:: This will send "Special text" when you press the Ctrl+Alt+A key -#:: combination. The text to be sent is a python string literal so -#:: you can use escapes like \x1b to send control codes or \u21fb to -#:: send Unicode characters (or you can just input the Unicode -#:: characters directly as UTF-8 text). You can use `kitty +kitten -#:: show_key` to get the key escape codes you want to emulate. - -#:: The first argument to send_text is the keyboard modes in which to -#:: activate the shortcut. The possible values are normal, -#:: application, kitty or a comma separated combination of them. The -#:: modes normal and application refer to the DECCKM cursor key mode -#:: for terminals, and kitty refers to the kitty extended keyboard -#:: protocol. The special value all means all of them. - -#:: Some more examples:: - -#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) -#:: map ctrl+alt+a send_text normal Word\x1b[H -#:: map ctrl+alt+a send_text application Word\x1bOH -#:: # Run a command at a shell prompt (like typing the command and pressing Enter) -#:: map ctrl+alt+a send_text normal,application some command with arguments\r - -#: Open kitty Website - -# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ - -#: }}} - -#: }}} diff --git a/kitty/palenight.conf b/kitty/palenight.conf deleted file mode 100644 index 6a58ece..0000000 --- a/kitty/palenight.conf +++ /dev/null @@ -1,40 +0,0 @@ -# Palenight Colorscheme for Kitty -# Based on https://github.com/sindresorhus/hyper-snazzy - -foreground #959dcb -background #292d3e -selection_foreground #eceef0 -selection_background #607c8b -url_color #82aaff - -# black -color0 #434759 -color8 #434758 - -# red -color1 #f07178 -color9 #ff8b92 - -# green -color2 #c3e88d -color10 #ddffa7 - -# yellow -color3 #ffcb6b -color11 #ffe585 - -# blue -color4 #82aaff -color12 #9cc4ff - -# magenta -color5 #c792ea -color13 #e1acff - -# cyan -color6 #89ddff -color14 #a3f7ff - -# white -color7 #d0d0d0 -color15 #fefefe diff --git a/linked-dotfiles.txt b/linked-dotfiles.txt new file mode 100644 index 0000000..1b3abaa --- /dev/null +++ b/linked-dotfiles.txt @@ -0,0 +1,13 @@ +.bashrc +bin +.gitconfig +.config +.gitaliases +.gitignore_global +.ipython +.tmux +.tmux.conf +.tmux.conf.d +.vimrc +.zsh +.zshrc diff --git a/thefuck/settings.py b/thefuck/settings.py deleted file mode 100644 index 8478f6d..0000000 --- a/thefuck/settings.py +++ /dev/null @@ -1,26 +0,0 @@ -# The Fuck settings file -# -# The rules are defined as in the example bellow: -# -# rules = ['cd_parent', 'git_push', 'python_command', 'sudo'] -# -# The default values are as follows. Uncomment and change to fit your needs. -# See https://github.com/nvbn/thefuck#settings for more information. -# - -# rules = [] -# exclude_rules = [] -# wait_command = 3 -# require_confirmation = True -# no_colors = False -# debug = False -# priority = {} -# history_limit = None -# alter_history = True -# wait_slow_command = 15 -# slow_commands = ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'] -# repeat = False -# instant_mode = False -# num_close_matches = 3 -# env = {'LC_ALL': 'C', 'LANG': 'C', 'GIT_TRACE': '1'} -# excluded_search_path_prefixes = []