From ed6c0d3b7962c65c8f55741c38d83d2095c32d00 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 16 Apr 2021 09:00:26 -0500 Subject: [PATCH 001/103] Firefox nightly --- common/fish/config.fish | 2 +- os/linux/arch/provision.d/optional/ui-packages.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/fish/config.fish b/common/fish/config.fish index a2fb889..f3fa1b2 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -22,7 +22,7 @@ has_command nnn && source $DOTFILES_PATH/common/nnn/config.fish set -Ux _JAVA_AWT_WM_NONREPARENTING 1 set -Ux TERMINAL kitty -set -Ux BROWSER firefox-developer-edition +set -Ux BROWSER firefox-nightly set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history set -Ux LESS "-r" set -Ux LS_COLORS 'ow=01;36;40' # more sane ls colors diff --git a/os/linux/arch/provision.d/optional/ui-packages.bash b/os/linux/arch/provision.d/optional/ui-packages.bash index 54e45e3..c5bb29f 100755 --- a/os/linux/arch/provision.d/optional/ui-packages.bash +++ b/os/linux/arch/provision.d/optional/ui-packages.bash @@ -43,7 +43,7 @@ yay -Sy \ gammastep `# Redshift for Wayland` \ dmenu `# Application Launcher` \ python python-pip `# Python 3 Language` \ - firefox-developer-edition `# Default Web Browser` \ + firefox-nightly `# Default Web Browser` \ alsa-utils `# Audio Utilities` \ alsa-plugins `# Plugins for ALSA` \ pulseaudio pavucontrol pulsemixer `# Audio Backend and Controls` \ From f870de2adf9f29f05261ecc12df90d5b3a7e6efe Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 10 May 2021 13:29:39 -0500 Subject: [PATCH 002/103] Fixes from dragon install --- common/bin/clipshot | 1 + common/bin/dotfiles-link-environments | 1 + common/bin/dotfiles-setup | 5 +++-- os/linux/arch/provision.d/optional/ui-packages.bash | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/bin/clipshot b/common/bin/clipshot index c4b4d4d..8becd5a 100755 --- a/common/bin/clipshot +++ b/common/bin/clipshot @@ -5,6 +5,7 @@ set -x umask 077 d="$(date +"%Y-%m-%d_%H-%M-%S")" fn="$SCROTS_PATH/clipshot_$d.png" +mkdir -p "$SCROTS_PATH" if is_wayland; then dim="$(slurp -d)" diff --git a/common/bin/dotfiles-link-environments b/common/bin/dotfiles-link-environments index 8718fad..0d157d0 100755 --- a/common/bin/dotfiles-link-environments +++ b/common/bin/dotfiles-link-environments @@ -12,6 +12,7 @@ files $dfp/common/envs | \ --preview="ls -la --color=always {}" | \ string trim | \ read -a -d \n -z lines +mkdir -p $ENV_PATH for l in $lines test $l = "" && continue set ll (string replace -a / - $l) diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 0e0b613..3a08509 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -8,7 +8,8 @@ set lock_file $HOME/.using-lytedev-dotfiles.lock if not test -f $lock_file echo This will delete existing files. Make sure you know what you\'re doing. - read -r -p "Are you sure you want to continue? [y/N] " response + printf 'Are you sure you want to continue? [y/N] ' + read response set response (string lower $response) if string match $response y echo "agreed" > "$lock_file" @@ -47,7 +48,7 @@ l common/kak $c/kak l common/gpg/agent.conf $h/.gnupg/gpg-agent.conf l common/htop/rc $c/htop/htoprc l common/kitty $c/kitty -l common/mutt/rc $c/.muttrc +l common/mutt/rc $h/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs l common/data/user-dirs $c/user-dirs.dirs diff --git a/os/linux/arch/provision.d/optional/ui-packages.bash b/os/linux/arch/provision.d/optional/ui-packages.bash index c5bb29f..7eda7dd 100755 --- a/os/linux/arch/provision.d/optional/ui-packages.bash +++ b/os/linux/arch/provision.d/optional/ui-packages.bash @@ -11,7 +11,7 @@ fi # TODO: switch to Nautilus? -yay -Sy \ +yay -Sy --needed \ xf86-input-libinput \ libinput libinput-gestures `# Trackpad Control` \ bluez bluez-libs bluez-utils bluez-tools `# Bluetooth` \ @@ -46,7 +46,7 @@ yay -Sy \ firefox-nightly `# Default Web Browser` \ alsa-utils `# Audio Utilities` \ alsa-plugins `# Plugins for ALSA` \ - pulseaudio pavucontrol pulsemixer `# Audio Backend and Controls` \ + pavucontrol pulsemixer `# Audio Backend and Controls` \ playerctl `# Media Keys Controls` \ feh `# Image Viewer & Wallpaper Manager` \ wlroots sway `# Wayland Compositor` \ @@ -57,7 +57,7 @@ yay -Sy \ slurp grim wl-clipboard `# Sway Screen Selection & Clipping` \ pipewire pipewire-pulse pipewire-media-session `# Pipewire` \ xdg-desktop-portal xdg-desktop-portal-wlr `# Screensharing` \ - obs-studio-wayland obs-xdg-portal `# OBS` \ + obs-studio `# OBS` \ ttf-iosevka `# Primary Fonts` \ ttf-font-awesome `# Icon Font` \ ripcord `# Discord and Slack Client` From 33b57302a93a5434af36f77fa73b3a618ce278cc Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 13 May 2021 10:42:19 -0500 Subject: [PATCH 003/103] User dirs and sway cleanup --- common/bin/dotfiles-setup | 1 - common/htop/rc | 2 +- os/linux/kanshi/config | 31 +++++++------------- os/linux/kanshi/desktop-H-workspaces.sh | 39 +++++++++---------------- os/linux/sway/config | 3 ++ {common/data => os/linux}/user-dirs | 0 6 files changed, 28 insertions(+), 48 deletions(-) rename {common/data => os/linux}/user-dirs (100%) diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 3a08509..0ffa144 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -51,7 +51,6 @@ l common/kitty $c/kitty l common/mutt/rc $h/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs -l common/data/user-dirs $c/user-dirs.dirs popd for s in $c/lytedev-env/*/dotfiles-setup.d.fish diff --git a/common/htop/rc b/common/htop/rc index c340c95..9e52749 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -1,7 +1,7 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=47 +sort_key=46 sort_direction=1 tree_sort_key=0 tree_sort_direction=1 diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 5043f1d..6a21bae 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -1,20 +1,17 @@ -profile desktop-1x4kside { - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 0,1200 scale 1 transform normal - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 3440,0 scale 1.5 transform 90 -} - -profile desktop-1x4kside2 { - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal - output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 -} - profile desktop-H-2x4kside2 { - output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 4880,0 scale 1.5 transform 90 + output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1 transform 270 + output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 2160,1200 scale 1 transform normal + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 5600,0 scale 1 transform 90 exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } +# profile desktop-H-2x4kside2 { +# output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 +# output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal +# output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 4880,0 scale 1.5 transform 90 +# exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" +# } + profile tv4k { output "Samsung Electric Company CF791 HTRJ500315" disable output "Samsung Electric Company SyncMaster H1AK500000" enable mode 4096x2160@60Hz position 0,0 scale 1 transform normal @@ -25,12 +22,6 @@ profile desktop-ultrawide { exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-single-workspace.sh" } -profile laptop-solo { +profile laptop { output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal } - -profile laptop-single-ext-mon { - output "Dell Inc. DELL U2719DC 9CL4QS2" enable mode 2560x1440@60Hz position 0,0 scale 1 transform normal - output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,1440 scale 2 transform normal - exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-workspaces.sh" -} diff --git a/os/linux/kanshi/desktop-H-workspaces.sh b/os/linux/kanshi/desktop-H-workspaces.sh index e48ce03..2cb03a8 100755 --- a/os/linux/kanshi/desktop-H-workspaces.sh +++ b/os/linux/kanshi/desktop-H-workspaces.sh @@ -2,34 +2,21 @@ # kanshi will potentially run this more than once LOCKFILE="/tmp/lytedev-kanshi-workspace-arranging.lock" -if ! [[ -f $LOCKFILE ]]; then - touch "$LOCKFILE" - # TODO: something is pretty broken with sway/kanshi right now - sleep 0.1 - # TODO: some way to ensure the lock file is cleaned up? - # maybe check if the file is older than a minute? +[[ -f $LOCKFILE ]] && { echo "Already locked: $LOCKFILE" >&2; exit 1; } - move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } - setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; } +touch "$LOCKFILE" +sleep 0.1 - set -x - # setup_output 'Dell Inc. DELL U2719DC 9DL4QS2' 7 8 9 - # setup_output 'Dell Inc. DELL U2719DC 5DL4QS2' 4 5 6 - # setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 2 3 +move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } +setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; } - setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8 - setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5 - setup_output 'Samsung Electric Company CF791 HTRJ500315' 3 2 - setup_output 'Dell Inc. DELL U2720Q CWTM623' 7 - setup_output 'Dell Inc. DELL U2720Q D3TM623' 4 - setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 +set -x - # setup_output 'Dell Inc. DELL U2719DC 9DL4QS2' 8 9 7 - # setup_output 'Dell Inc. DELL U2719DC 5DL4QS2' 5 6 4 - # setup_output 'Samsung Electric Company CF791 HTRJ500315' 2 3 1 +setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8 +setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5 +setup_output 'Samsung Electric Company CF791 HTRJ500315' 3 2 +setup_output 'Dell Inc. DELL U2720Q CWTM623' 7 +setup_output 'Dell Inc. DELL U2720Q D3TM623' 4 +setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 - rm "$LOCKFILE" -else - echo "Already locked: $LOCKFILE" >&2 - exit 1 -fi +rm "$LOCKFILE" diff --git a/os/linux/sway/config b/os/linux/sway/config index 6cbbf08..8cf5631 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -157,6 +157,9 @@ mode "resize" { bindsym escape mode "default" } +for_window [title="."] title_format "%title" +for_window [app_id="__focused__"] title_format "%title" + for_window [app_id="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable # for_window [class=".*"] layout splitv diff --git a/common/data/user-dirs b/os/linux/user-dirs similarity index 100% rename from common/data/user-dirs rename to os/linux/user-dirs From 300fd1b732ccdbe32b6d9a054549548476b29cba Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 14 May 2021 15:09:51 -0500 Subject: [PATCH 004/103] Use global instead of universal fish_user_paths --- common/fish/paths.fish | 12 ++++++------ common/git/config | 3 --- host/laptop/third/config.d.fish | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/common/fish/paths.fish b/common/fish/paths.fish index 868668d..bc5df33 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -2,7 +2,7 @@ set -Ux GOPATH $HOME/.go -set -U fish_user_paths \ +set -g fish_user_paths \ $HOME/.go \ $GOPATH/bin \ $DOTFILES_PATH/common/bin \ @@ -13,14 +13,14 @@ set -U fish_user_paths \ $HOME/.netlify/helper/bin for d in $ENV_PATH/*/bin - test -d $d && set -Ua fish_user_paths $d + test -d $d && set -ga fish_user_paths $d end -test -d $HOME/.local/bin && set -Ua fish_user_paths $HOME/.local/bin -test -d $HOME/.bin && set -Ua fish_user_paths $HOME/.local/bin +test -d $HOME/.local/bin && set -ga fish_user_paths $HOME/.local/bin +test -d $HOME/.bin && set -ga fish_user_paths $HOME/.local/bin -has_command python && set -Ua fish_user_paths (python -m site --user-base)/bin -has_command ruby && set -Ua fish_user_paths (ruby -e 'print Gem.user_dir')/bin +has_command python && set -ga fish_user_paths (python -m site --user-base)/bin +has_command ruby && set -ga fish_user_paths (ruby -e 'print Gem.user_dir')/bin if set -q NICE_HOME else diff --git a/common/git/config b/common/git/config index ad2210f..bf05120 100644 --- a/common/git/config +++ b/common/git/config @@ -1,6 +1,3 @@ -[push] - default = current - [user] name = Daniel Flanagan email = daniel@lyte.dev diff --git a/host/laptop/third/config.d.fish b/host/laptop/third/config.d.fish index 956d991..a3fce7c 100644 --- a/host/laptop/third/config.d.fish +++ b/host/laptop/third/config.d.fish @@ -1,2 +1,2 @@ set e $argv[1] -set -Ua fish_user_paths $e/bin +set -ga fish_user_paths $e/bin From 703a42a5f8454e2a4305f9dd56a17b5fff7fbf34 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 14 May 2021 15:13:43 -0500 Subject: [PATCH 005/103] For macOS --- common/bin/pass-otp | 2 +- common/fish/config.fish | 15 +++++++++------ common/fish/paths.fish | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/common/bin/pass-otp b/common/bin/pass-otp index 92f9a1d..023a8d3 100755 --- a/common/bin/pass-otp +++ b/common/bin/pass-otp @@ -5,7 +5,7 @@ key="$1"; shift args=("$@") -otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp.*: ?.*$' | cut -d ':' -f 2 | sed 's/ //g')" +otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp' | cut -d ':' -f 2 | sed 's/ //g')" otp_status="$?" [[ $otp_status != 0 ]] && { echo "pass command failed with exit code $otp_status"; exit 1; } [[ -z $otp ]] && { echo "No OTP secret found for pass entry '$key'"; exit 2; } diff --git a/common/fish/config.fish b/common/fish/config.fish index f3fa1b2..3604a90 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -40,6 +40,15 @@ function fish_greeting; test -f /proc/sys/kernel/pty/nr && printf "%6d PTYs open\n" (cat /proc/sys/kernel/pty/nr) end +if has_command brew && test -f (brew --prefix asdf)/lib/asdf.fish + set -Ux ASDF_DIR (brew --prefix asdf) + source (brew --prefix asdf)/lib/asdf.fish +else if test -f $HOME/.asdf/asdf.fish + source $HOME/.asdf/asdf.fish +else if test -f /opt/asdf-vm/asdf.fish + source /opt/asdf-vm/asdf.fish +end + # assume the user uses "$HOME" to just store their mess of dotfiles and other # nonsense that clutters it up and that they have a preferred starting # directory where they keep the stuff they actually care about @@ -47,9 +56,3 @@ end if test $PWD = $HOME; or test $PWD = $NICE_HOME; cd $NICE_HOME || cd end - -if test -f $HOME/.asdf/asdf.fish - source $HOME/.asdf/asdf.fish -else if test -f /opt/asdf-vm/asdf.fish - source /opt/asdf-vm/asdf.fish -end diff --git a/common/fish/paths.fish b/common/fish/paths.fish index bc5df33..a720dbd 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -2,7 +2,7 @@ set -Ux GOPATH $HOME/.go -set -g fish_user_paths \ +set paths_candidates \ $HOME/.go \ $GOPATH/bin \ $DOTFILES_PATH/common/bin \ @@ -12,7 +12,7 @@ set -g fish_user_paths \ $HOME/.yarn/bin \ $HOME/.netlify/helper/bin -for d in $ENV_PATH/*/bin +for d in $paths_candidates $ENV_PATH/*/bin test -d $d && set -ga fish_user_paths $d end From 916ac3c7d0779ea08af03b6c67f1bb424c298e77 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 14 May 2021 15:16:27 -0500 Subject: [PATCH 006/103] Only load vconsole for linux --- common/fish/config.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/fish/config.fish b/common/fish/config.fish index 3604a90..68d5af2 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -13,7 +13,7 @@ end status --is-interactive || exit -$DOTFILES_PATH/common/colors/vconsole +test (uname) = Linux && $DOTFILES_PATH/common/colors/vconsole for f in key-bindings colors prompt aliases source $FISH_PATH/$f.fish end From a8b20eb79cff13029d095573cd8e0ddf5aa29199 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 14 May 2021 15:20:44 -0500 Subject: [PATCH 007/103] Paths --- common/fish/paths.fish | 10 +++++----- host/laptop/third/config.d.fish | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/fish/paths.fish b/common/fish/paths.fish index a720dbd..6ee9655 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -13,14 +13,14 @@ set paths_candidates \ $HOME/.netlify/helper/bin for d in $paths_candidates $ENV_PATH/*/bin - test -d $d && set -ga fish_user_paths $d + test -d $d && set -gxa fish_user_paths $d end -test -d $HOME/.local/bin && set -ga fish_user_paths $HOME/.local/bin -test -d $HOME/.bin && set -ga fish_user_paths $HOME/.local/bin +test -d $HOME/.local/bin && set -gxa fish_user_paths $HOME/.local/bin +test -d $HOME/.bin && set -gxa fish_user_paths $HOME/.local/bin -has_command python && set -ga fish_user_paths (python -m site --user-base)/bin -has_command ruby && set -ga fish_user_paths (ruby -e 'print Gem.user_dir')/bin +has_command python && set -gxa fish_user_paths (python -m site --user-base)/bin +has_command ruby && set -gxa fish_user_paths (ruby -e 'print Gem.user_dir')/bin if set -q NICE_HOME else diff --git a/host/laptop/third/config.d.fish b/host/laptop/third/config.d.fish index a3fce7c..3e438fa 100644 --- a/host/laptop/third/config.d.fish +++ b/host/laptop/third/config.d.fish @@ -1,2 +1,2 @@ set e $argv[1] -set -ga fish_user_paths $e/bin +set -gxa fish_user_paths $e/bin From 2981d01c4f2f3629ab43de5454940a4152e92d71 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 14 May 2021 15:23:18 -0500 Subject: [PATCH 008/103] More paths --- common/fish/paths.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/common/fish/paths.fish b/common/fish/paths.fish index 6ee9655..e5256aa 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -12,6 +12,7 @@ set paths_candidates \ $HOME/.yarn/bin \ $HOME/.netlify/helper/bin +set -ge fish_user_paths for d in $paths_candidates $ENV_PATH/*/bin test -d $d && set -gxa fish_user_paths $d end From e9abc1afd015a2fe561a9acbc6bf73905e2ade03 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 29 May 2021 22:51:54 -0500 Subject: [PATCH 009/103] Little things --- common/neovim/.gitignore | 1 + common/neovim/coc-settings.json | 9 +++++++++ common/neovim/init.vim | 9 +++++++++ common/tmux/conf | 6 +++--- host/desktop/bin/reboot-to-windows | 3 ++- os/linux/sway/config | 1 + 6 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 common/neovim/coc-settings.json diff --git a/common/neovim/.gitignore b/common/neovim/.gitignore index 9f28ab9..e103c94 100644 --- a/common/neovim/.gitignore +++ b/common/neovim/.gitignore @@ -3,3 +3,4 @@ !/init.vim !/nvim_lsp.lua !/ftplugin +!/coc-settings.json diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json new file mode 100644 index 0000000..5f10bc3 --- /dev/null +++ b/common/neovim/coc-settings.json @@ -0,0 +1,9 @@ +{ + "coc.preferences.formatOnSaveFiletypes": ["ex", "exs", "elixir"], + "diagnostic-languageserver.filetypes": { + "elixir": ["mix_credo", "mix_credo_compile"], + "eelixir": ["mix_credo", "mix_credo_compile"] + }, + "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", + "codeLens.enable": true +} diff --git a/common/neovim/init.vim b/common/neovim/init.vim index e39342d..b42b4ed 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -8,6 +8,7 @@ if empty(glob($vimdir.'/autoload/plug.vim')) autocmd VimEnter * PlugInstall --sync | source $vimdir.'init.vim' endif +" let g:coc_global_extensions = ['coc-elixir', 'coc-diagnostic'] let g:completion_enable_auto_popup = 0 let g:indent_guide_auto_colors = 1 let g:indent_guides_enable_on_vim_startup = 1 @@ -246,3 +247,11 @@ augroup END set statusline=%!StatusLine() imap (completion_trigger) + +if filereadable(expand($ENV_PATH.'/init.vim')) + source "$ENV_PATH/init.vim" +endif + +for f in glob($ENV_PATH.'/*/init.d.vim', 0, 1) + source "$f" +endfor diff --git a/common/tmux/conf b/common/tmux/conf index d08d662..8414093 100644 --- a/common/tmux/conf +++ b/common/tmux/conf @@ -35,10 +35,10 @@ set -g status-interval 5 set -g status-left-length 50 set -g window-status-style "fg=colour8 bg=colour0" set -g window-status-current-style "fg=colour8 bg=colour0" -set -g window-status-format " #I" +set -g window-status-format " #W" set -g window-status-separator "" -set -g window-status-current-format " #I" -set -g status-left "#h:#S #I" +set -g window-status-current-format " #W" +set -g status-left "#h:#S #W" set -g status-right-length 280 set -g status-right "#(kubeline && printf ' ')#{pane_current_path} #(cd '#{pane_current_path}' && git rev-parse --abbrev-ref --sq HEAD | tr -d \"'\")#{pane_current_command}" set -g message-style "fg=colour7 bg=colour18" diff --git a/host/desktop/bin/reboot-to-windows b/host/desktop/bin/reboot-to-windows index cfd84f6..6e56140 100755 --- a/host/desktop/bin/reboot-to-windows +++ b/host/desktop/bin/reboot-to-windows @@ -1,3 +1,4 @@ #!/usr/bin/env sh -sudo efibootmgr -n 0000 +# use `efibootmgr` to list boot entries +sudo efibootmgr -n 0002 sudo reboot diff --git a/os/linux/sway/config b/os/linux/sway/config index 8cf5631..679cf66 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -14,6 +14,7 @@ smart_borders on|no_gaps hide_edge_borders smart_no_gaps default_border pixel 5 focus_follows_mouse no +mouse_warping none input type:touchscreen { events disabled From 81106dad968d6b0756f7d1c18a64b71db714f8a8 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 29 May 2021 22:52:00 -0500 Subject: [PATCH 010/103] Little things --- common/bin/dotfiles-setup | 3 ++- common/mutt/rc | 2 ++ common/wezterm/wezterm.lua | 25 +++++++++++++++++++++++++ os/linux/sway/config | 1 + 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 common/wezterm/wezterm.lua diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 0e0b613..2f86dc9 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -38,6 +38,7 @@ pushd $dfp l common/tmux/conf $h/.tmux.conf l common/fish $c/fish l common/neovim $c/nvim +l common/wezterm $c/wezterm l common/colors/vim $c/nvim/colors/base16-donokai.vim l common/weechat $h/.weechat l common/scim/rc $h/.scimrc @@ -47,7 +48,7 @@ l common/kak $c/kak l common/gpg/agent.conf $h/.gnupg/gpg-agent.conf l common/htop/rc $c/htop/htoprc l common/kitty $c/kitty -l common/mutt/rc $c/.muttrc +l common/mutt/rc $h/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs l common/data/user-dirs $c/user-dirs.dirs diff --git a/common/mutt/rc b/common/mutt/rc index 91ae8f1..081e601 100644 --- a/common/mutt/rc +++ b/common/mutt/rc @@ -45,3 +45,5 @@ set editor = "nvim" set charset = "utf-8" set header_cache = "~/.cache/mutt/headers" set message_cachedir = "~/.cache/mutt/bodies" + +set new_mail_command="notify-send 'New Email' '%n new messages, %u unread.' &" diff --git a/common/wezterm/wezterm.lua b/common/wezterm/wezterm.lua new file mode 100644 index 0000000..1ad9d96 --- /dev/null +++ b/common/wezterm/wezterm.lua @@ -0,0 +1,25 @@ +local w = require 'wezterm' +return { + color_schemes = { + ["Donokai"] = { + background = "#111111", + foreground = "#ffffff", + cursor_bg = "#333333", + cursor_fg = "#ffffff", + cursor_border = "#666666", + selection_fg = "black", + selection_bg = "cyan", + + ansi = {"#111111", "#f92672", "#a6e22e", "#f4bf75", "#ae81ff", "#fd971f", "#a1efe4", "#888888"}, + brights = {"#333333", "#f92672", "#a6e22e", "#f4bf75", "#ae81ff", "#fd971f", "#a1efe4", "#888888"}, + -- ansi = {"black", "maroon", "green", "olive", "navy", "purple", "teal", "silver"}, + -- brights = {"grey", "red", "lime", "yellow", "blue", "fuchsia", "aqua", "white"}, + } + }, + color_scheme = "Donokai", + colors = { + }, + font = w.font("Iosevka"), + font_size = 14, + enable_wayland = true, +} diff --git a/os/linux/sway/config b/os/linux/sway/config index 6cbbf08..7dee090 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -166,6 +166,7 @@ client.focused_inactive #111111 #111111 #ffffff #111111 #111111 client.unfocused #111111 #111111 #ffffff #111111 #111111 exec_always 'killall kanshi; kanshi' +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec mako exec pipewire exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." From d3ec523494f806e553252657f47e144a95987bad Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 31 May 2021 21:11:41 -0500 Subject: [PATCH 011/103] pre lua --- os/linux/sway/config | 3 --- 1 file changed, 3 deletions(-) diff --git a/os/linux/sway/config b/os/linux/sway/config index ea9973c..7dee090 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -157,9 +157,6 @@ mode "resize" { bindsym escape mode "default" } -for_window [title="."] title_format "%title" -for_window [app_id="__focused__"] title_format "%title" - for_window [app_id="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable # for_window [class=".*"] layout splitv From 1f799972bc00c0733c1f60a04e36aef7e44db46e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 1 Jun 2021 22:29:03 -0500 Subject: [PATCH 012/103] Aliases --- common/fish/aliases.fish | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/fish/aliases.fish b/common/fish/aliases.fish index 7cb42ee..5132838 100755 --- a/common/fish/aliases.fish +++ b/common/fish/aliases.fish @@ -14,16 +14,16 @@ set -gx CDPATH $CDPATH . $NICE_HOME function d -w cd --description "Quickly jump to NICE_HOME (or given relative or absolute path) and list files." if scount $argv - cd $argv || exit 1 + cd $argv else - cd $NICE_HOME || exit 1 + cd $NICE_HOME end la end function c -w cd --description "Quickly jump to a subdirectory of NICE_HOME (or just to NICE_HOME if none given)" if scount $argv - cd $NICE_HOME && d $argv || exit 1 + cd $NICE_HOME && d $argv else d $NICE_HOME end @@ -86,6 +86,7 @@ alias vi "$EDITOR" alias v "$EDITOR" alias e "$EDITOR" alias se "sudo -E $EDITOR" +alias sv "sudo -E $EDITOR" alias svim "se" alias vltl "$EDITOR (ltl)" From 334842d234cab551e015d9a8a085ab5fb6f8e072 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 21 Jun 2021 11:14:28 -0500 Subject: [PATCH 013/103] SWAY --- common/neovim/coc-settings.json | 6 +++++- common/neovim/init.vim | 10 ++++++---- host/laptop/third/sway/config | 1 + os/linux/kanshi/config | 10 ++++++++++ os/linux/sway/config | 18 +++++++++--------- os/linux/waybar/config | 4 ++-- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index 5f10bc3..a80b71d 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -2,7 +2,11 @@ "coc.preferences.formatOnSaveFiletypes": ["ex", "exs", "elixir"], "diagnostic-languageserver.filetypes": { "elixir": ["mix_credo", "mix_credo_compile"], - "eelixir": ["mix_credo", "mix_credo_compile"] + "eelixir": ["mix_credo", "mix_credo_compile"], + "sh": "shellcheck" + }, + "diagnostic-languageserver.formatFiletypes": { + "sh": "shfmt" }, "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", "codeLens.enable": true diff --git a/common/neovim/init.vim b/common/neovim/init.vim index b42b4ed..480f5bf 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -142,6 +142,10 @@ xnoremap < >gv nnoremap gd :call CocAction('jumpDefinition') +nmap gd (coc-definition) +nmap gy :call CocActionAsync('doHover') +nmap gi (coc-implementation) +nmap gr (coc-references) " TODO: learn about the wildmenu `q:` @@ -238,10 +242,8 @@ function! StatusLine() " endtry endfunction -augroup slime - au! - autocmd BufNewFile,BufRead *.slimleex set syntax=slim -augroup END +augroup slime | au! BufNewFile,BufRead *.slimleex set syntax=slim | augroup END +augroup ctmpl | au! BufNewFile,BufRead *.ctmpl set syntax=gohtmltmpl | augroup END " set laststatus=0 showtabline tabline=%!StatusLine() set statusline=%!StatusLine() diff --git a/host/laptop/third/sway/config b/host/laptop/third/sway/config index 4f2bccd..335c3a2 100644 --- a/host/laptop/third/sway/config +++ b/host/laptop/third/sway/config @@ -1,4 +1,5 @@ exec libinput-gestures -c $DOTFILES_PATH/os/linux/libinput/sway-gestures.conf +exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' bindswitch lid:toggle exec swaylock diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 6a21bae..e6093d2 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -5,6 +5,16 @@ profile desktop-H-2x4kside2 { exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } +profile desktop-H-2x4kside2 { + output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 0,1200 scale 1 transform normal + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 3440,0 scale 1 transform 90 + exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" +} + +profile desktop-H-2x4kside2 { + output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform normal +} + # profile desktop-H-2x4kside2 { # output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 # output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal diff --git a/os/linux/sway/config b/os/linux/sway/config index d99d6be..8b6bf94 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -160,26 +160,26 @@ mode "resize" { for_window [app_id="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable -# for_window [class=".*"] layout splitv +for_window [class=".*"] layout floating enable +for_window [class=".*"] layout splith client.focused #66d9ef #66d9ef #66d9ef #66d9ef #66d9ef client.focused_inactive #111111 #111111 #ffffff #111111 #111111 client.unfocused #111111 #111111 #ffffff #111111 #111111 -exec_always 'killall kanshi; kanshi' -exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway -exec mako -exec pipewire -exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." - bar { swaybar_command waybar } -# TODO: exec_always? +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway +exec mako +exec pipewire exec gammastep -t 6500:3500 -l 39.0:-94.5 -exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' +exec_always 'killall kanshi; kanshi' +exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." + +no_focus [class=".*"] output * bg $HOME/.wallpaper fill include $XDG_CONFIG_HOME/lytedev-env/*/sway/config diff --git a/os/linux/waybar/config b/os/linux/waybar/config index e667b11..5967425 100644 --- a/os/linux/waybar/config +++ b/os/linux/waybar/config @@ -3,8 +3,8 @@ "position": "bottom", "output": ["eDP-1", "DP-1"], "height": 32, - "modules-left": ["sway/workspaces"], - "modules-center": ["clock"], + "modules-left": ["clock"], + "modules-center": ["sway/workspaces"], "modules-right": [ "idle_inhibitor", "pulseaudio", From 3ad8d66cb1f6cd48f030f2b7c28e6f4b77bc491b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 30 Jun 2021 23:27:49 -0500 Subject: [PATCH 014/103] Line numbers because of all the pairing --- common/neovim/init.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/neovim/init.vim b/common/neovim/init.vim index 480f5bf..dddf5b6 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -257,3 +257,5 @@ endif for f in glob($ENV_PATH.'/*/init.d.vim', 0, 1) source "$f" endfor + +set number From 248376dfc723bcf04c5923af80d5ca20ec7a05f2 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 1 Jul 2021 14:25:11 -0500 Subject: [PATCH 015/103] Add cuelang plugin --- common/neovim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/neovim/init.vim b/common/neovim/init.vim index dddf5b6..c86cd59 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -37,7 +37,7 @@ call plug#begin($vimdir.'/plugged') Plug 'wellle/targets.vim' " adds some more handy text objects Plug 'tpope/vim-obsession' " even better session handling Plug 'dhruvasagar/vim-prosession' " even better session handling - Plug 'dhruvasagar/vim-prosession' " even better session handling + Plug 'jjo/vim-cue' " CUE lang Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() From 7ac090f38eb356c6463ed828d051f9933847d60f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 1 Jul 2021 14:26:17 -0500 Subject: [PATCH 016/103] Set prosession dir --- common/neovim/init.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/neovim/init.vim b/common/neovim/init.vim index c86cd59..1a25a1c 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -5,7 +5,7 @@ let $vimdir = $XDG_CONFIG_HOME.'/nvim' if empty(glob($vimdir.'/autoload/plug.vim')) silent !curl -fLo $vimdir/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | source $vimdir.'init.vim' + autocmd VimEnter * PlugInstall --sync | source $vimdir.'/init.vim' endif " let g:coc_global_extensions = ['coc-elixir', 'coc-diagnostic'] @@ -14,6 +14,7 @@ let g:indent_guide_auto_colors = 1 let g:indent_guides_enable_on_vim_startup = 1 let g:jsonnet_fmt_on_save = 0 let g:skipview_files = ['COMMIT_EDITMSG'] +let g:prosession_dir = $vimdir.'/sessions' " let g:fzf_preview_window = ['down:40%:hidden', 'ctrl-/'] call plug#begin($vimdir.'/plugged') From d06de64995017e48c7f5be43c495fcad0b476265 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 08:28:41 -0500 Subject: [PATCH 017/103] Sops and age for those secrets --- os/linux/debian/provisioning/install-packages.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/linux/debian/provisioning/install-packages.bash b/os/linux/debian/provisioning/install-packages.bash index 89dc519..8bc3fc4 100755 --- a/os/linux/debian/provisioning/install-packages.bash +++ b/os/linux/debian/provisioning/install-packages.bash @@ -26,6 +26,8 @@ sudo apt install \ unzip \ lua5.3 luajit \ jq \ + age \ + sops \ w3m \ ranger \ inotify-tools \ From 5648a2b23b8b030176c315687099879c35996d61 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 08:31:49 -0500 Subject: [PATCH 018/103] Add sops and age properly lolololol --- os/linux/arch/provision.d/20-install-packages.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/os/linux/arch/provision.d/20-install-packages.bash b/os/linux/arch/provision.d/20-install-packages.bash index 1d37f6a..2c7f8c8 100755 --- a/os/linux/arch/provision.d/20-install-packages.bash +++ b/os/linux/arch/provision.d/20-install-packages.bash @@ -38,6 +38,7 @@ yay -Sy --needed --noconfirm \ jq `# CLI for Interacting with JSON` \ httpie `# httpie and neovim dependencies` \ docker docker-compose `# Yummy containers` \ + age sops `# Simple Secretes Managements` \ inotify-tools `# Watching` \ fish `# Shell` \ time `# GNU time` \ From 5603a8bcd5c26c872305f2bf04a76891a7486bfc Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 08:32:51 -0500 Subject: [PATCH 019/103] Add note to readme --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index ecb8598..01c73f5 100644 --- a/readme.md +++ b/readme.md @@ -39,6 +39,7 @@ dotfiles-setup # To Do ++ Layered gitconfig? + Get out of Google! + `calcurse` for Calendar management? + `aerc` or `neomutt` for email? From 1939ce2e3d9bbe5c661e9e89f368165d36be627c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 31 May 2021 22:17:04 -0500 Subject: [PATCH 020/103] WIP lua conversion --- common/neovim/.gitignore | 1 + common/neovim/init.lua | 301 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 302 insertions(+) create mode 100644 common/neovim/init.lua diff --git a/common/neovim/.gitignore b/common/neovim/.gitignore index e103c94..1adac55 100644 --- a/common/neovim/.gitignore +++ b/common/neovim/.gitignore @@ -1,6 +1,7 @@ /* !/.gitignore !/init.vim +!/init.lua !/nvim_lsp.lua !/ftplugin !/coc-settings.json diff --git a/common/neovim/init.lua b/common/neovim/init.lua new file mode 100644 index 0000000..aae3b66 --- /dev/null +++ b/common/neovim/init.lua @@ -0,0 +1,301 @@ +local execute = vim.api.nvim_command +local kmap = vim.api.nvim_set_keymap +local kmapnore = function(mode, keys, command) + kmap(mode, keys, command, {noremap=true}) +end + +-- plugin manager +local vimdir = vim.fn.getenv("XDG_CONFIG_HOME")..'/nvim' +local packer_install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' + +if vim.fn.empty(vim.fn.glob(packer_install_path)) > 0 then + execute("!git clone https://github.com/wbthomason/packer.nvim "..install_path) +end + +vim.api.nvim_exec([[ + augroup Packer + autocmd! + autocmd BufWritePost init.lua PackerCompile + augroup end +]], false) + +local use = require('packer').use + +require('packer').startup(function() + use 'wbthomason/packer.nvim' + use 'editorconfig/editorconfig-vim' + use 'tpope/vim-sleuth' + use 'vim-scripts/LargeFile' + use 'vim-scripts/restore_view.vim' + use 'christoomey/vim-tmux-navigator' + use 'tpope/vim-fugitive' + use 'tpope/vim-rhubarb' + use 'tpope/vim-commentary' + use 'tpope/vim-repeat' + use 'machakann/vim-sandwich' + use 'michaeljsmith/vim-indent-object' + use 'wellle/targets.vim' + use 'bkad/CamelCaseMotion' + use 'ludovicchabant/vim-gutentags' + use 'tpope/vim-obsession' + use 'dhruvasagar/vim-prosession' + use {'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}} + use 'joshdick/onedark.vim' + use {'lukas-reineke/indent-blankline.nvim', branch="lua"} + use {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}} + use 'neovim/nvim-lspconfig' + use 'hrsh7th/nvim-compe' + use 'sheerun/vim-polyglot' +end) + +local globals = { + mapleader=" ", + maplocalleader=" ", + completion_enable_auto_popup=0, + indent_guide_auto_colors=1, + indent_guides_enable_on_vim_startup=1, + skipview_files={'COMMIT_EDITMSG'}, + indent_blankline_char="โ”Š", + indent_blankline_filetype_exclude={'help', 'packer'}, + indent_blankline_buftype_exclude={'terminal', 'nofile'}, + indent_blankline_char_highlight='LineNr', +} + +for k,v in pairs(globals) do + vim.g[k] = v +end + +local options = { + inccommand="nosplit", + tabstop=2, + softtabstop=2, + smartindent=true, + list=true, + listchars='trail:-,tab: ,trail:~', + linebreak=true, + formatoptions='crql1jn', + synmaxcol=200, + lazyredraw=true, + scrolloff=8, + sidescrolloff=15, + mouse='a', + splitright=true, + splitbelow=true, + errorbells=false, + visualbell=true, + backup=false, + writebackup=false, + swapfile=false, + timeout=true, + timeoutlen=150, + hidden=true, + shortmess='filnxToOFIac', + history=100000, + undofile=true, + undofir=vimdir..'/undo', + undolevels=100000, + undoreload=100000, + spellfile=vimdir..'/spell/en.utf-8.add', + ignorecase=true, + smartcase=true, + incsearch=true, + wrapscan=true, + hlsearch=true, + foldmethod='syntax', + foldlevel=99, + foldnextmax=10, + foldlevelstart=99, + autowrite=false, + autochdir=true, + autoread=true, + modeline=false, + showmode=false, + showcmd=false, + laststatus=2, + ruler=false, + termguicolors=true, +} + +for k,v in pairs(options) do + vim.o[k] = v +end + +-- let &fcs = 'eob: ' + +vim.cmd[[colorscheme base16-donokai]] + +-- hi Search cterm=NONE ctermbg=blue ctermfg=black +-- hi LineNr ctermbg=none ctermfg=8 +-- hi CursorLineNr ctermbg=18 ctermfg=gray +-- hi IndentGuidesEven ctermbg=18 +-- hi Normal ctermbg=NONE +-- hi ColorColumn ctermbg=18 +-- hi TooLongColorColumn ctermbg=18 ctermfg=1 +-- hi ActiveBuffer ctermbg=4 ctermfg=0 +-- hi DirtyBuffer ctermbg=3 ctermfg=0 +-- hi StatusLine ctermbg=18 ctermfg=7 +-- hi StatusLineNC ctermbg=18 ctermfg=7 + +execute[[call matchadd('ColorColumn', '\\%81v', 100)]] +execute[[call matchadd('TooLongColorColumn', '\\%121v', 200)]] + +vim.cmd[[command! W write]] + +local escapes = {'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} +for keys in escapes do + kmap('i', keys, '') +end + +kmapnore('n', '', ':qa') +kmapnore('n', '', '') + +require('telescope').setup{ + defaults={ + mappings={ + i={ + [""]=false, + [""]=false, + }, + }, + generic_sorter=require'telescope.sorters'.get_fzy_sorter, + file_sorter=require'telescope.sorters'.get_fzy_sorter, + } +} + +-- TODO: telescope bindings +-- kmapnore('n', '', ':GitFiles') +-- nnoremap :Files +-- nnoremap :GFiles? +-- nnoremap :Buffers + +kmapnore('n', '', ':TmuxNavigateLeft') +kmapnore('n', '', ':TmuxNavigateDown') +kmapnore('n', '', ':TmuxNavigateUp') +kmapnore('n', '', ':TmuxNavigateRight') +kmapnore('t', '', ':TmuxNavigateLeft') +kmapnore('t', '', ':TmuxNavigateDown') +kmapnore('t', '', ':TmuxNavigateUp') +kmapnore('t', '', ':TmuxNavigateRight') + +kmap('', ' ,w', 'CamelCaseMotion_w') +kmap('', ' ,b', 'CamelCaseMotion_b') +kmap('', ' ,e', 'CamelCaseMotion_e') +kmap('', ' ,ge', 'CamelCaseMotion_ge') +kmap('o', ' ib', 'CamelCaseMotion_ib') +kmap('x', ' ib', 'CamelCaseMotion_ib') +kmap('o', ' ie', 'CamelCaseMotion_ie') +kmap('x', ' ie', 'CamelCaseMotion_ie') + +kmap('', '', 'mw:%s/\\s\\+$//:let @/ = ""\'w') +kmap('', '', ':setlocal spell!') +kmapnore('n', ' n', "'Nn'[v:searchforward]") +kmapnore('n', ' N', "'nN'[v:searchforward]") +kmapnore('c', '', '') +kmapnore('c', '', '') +kmapnore('x', '<', '', '>gv') + +-- TODO: learn about the wildmenu `q:` +kmap('', '', '', {noremap=true, silent=true}) + +kmap('n', ' r', ':source '..vimdir..'/init.vim:echo \'Reloaded init.vim\'') +kmap('n', ' gv', ':e '..vimdir..'/init.vim') +kmap('n', ' w', ':bd') +kmap('n', ' h', ':b#') +kmap('n', ' k', ':bnext') +kmap('n', ' j', ':bprevious') +kmap('n', '/', ':let @/ = "":') + +nnoremap t :split:term:resize 24:startinsert +tnoremap :q! + +function! NeatFoldText() + " TODO: finish this! + let lines_count = v:foldend - v:foldstart + 1 + let foldchar = matchstr(&fillchars, 'fold:\zs.') + let foldtextstart = strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) + let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) + let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn + return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) +endfunction +set foldtext=NeatFoldText() + +" TODO: only update this portion when needed instead of every render? +function! StatusLineBufferByNum(bufnum) + let l:bufinfo = getbufinfo(a:bufnum)[0] + let l:prefix = ' %#InactiveBuffer#' + let l:suffix = '%* ' + + if l:bufinfo.changed + let l:prefix = '%#DirtyBuffer# ' + let l:suffix = ' %*' + end + + if l:bufinfo['hidden'] == 0 && index(l:bufinfo['windows'], g:statusline_winid) >= 0 + let l:prefix = '%#ActiveBuffer# ' + let l:suffix = ' %*' + if l:bufinfo.changed + let l:prefix = '%#ActiveBuffer# *' + let l:suffix = ' %*' + end + endif + + return l:prefix . fnamemodify(bufname(a:bufnum), ':t') . l:suffix +endfunction + +au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif + +let g:status_line_max_length = 5 +function! StatusLineBuffers() + " TODO: mark buffers with unsaved changes + let l:active_index = -1 + let l:acc = [] + for l:bufnum in nvim_list_bufs() + let l:bufinfo = getbufinfo(l:bufnum)[0] + if l:bufinfo.listed == 0 + continue + end + let l:entry = StatusLineBufferByNum(bufnum) + let l:acc = add(l:acc, l:entry) + if l:entry =~ "^%#ActiveBuffer#" + let l:active_index = index(l:acc, l:entry) + endif + endfor + if l:active_index >= 0 + " TODO: instead implement this as a wraparound carousel? + let l:offset = g:status_line_max_length / 2 + let l:min_buf_num = max([0, (l:active_index - offset)]) + let l:max_buf_num = min([(len(l:acc) - 1), (l:min_buf_num + g:status_line_max_length - 1)]) + let l:min_buf_num = max([0, (l:max_buf_num - g:status_line_max_length + 1)]) + let l:buflist = join(l:acc[(l:min_buf_num):(l:max_buf_num)], '') + let l:prefix = "" + let l:suffix = "" + if l:min_buf_num > 0 + let l:prefix = "< " + endif + if l:max_buf_num < len(l:acc) - 1 + let l:suffix = " >" + endif + return l:prefix . l:buflist . l:suffix + else + return join(l:acc, '') + endif +endfunction + +function! StatusLine() + " try + return StatusLineBuffers().'%*%=%c,%l/%L (%p%%)' + " catch + " return 'buflisterr%*%=%c,%l/%L (%p%%)' + " endtry +endfunction + +augroup slime + au! + autocmd BufNewFile,BufRead *.slimleex set syntax=slim +augroup END + +" set laststatus=0 showtabline tabline=%!StatusLine() +set statusline=%!StatusLine() + +imap (completion_trigger) From e3adbdf8147037e39314593c7a26f5b3e5581e65 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 1 Jun 2021 22:29:17 -0500 Subject: [PATCH 021/103] WIP --- common/neovim/init.lua | 149 ++++++++++++++++++++--------------------- 1 file changed, 73 insertions(+), 76 deletions(-) diff --git a/common/neovim/init.lua b/common/neovim/init.lua index aae3b66..3f2ab62 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -9,7 +9,7 @@ local vimdir = vim.fn.getenv("XDG_CONFIG_HOME")..'/nvim' local packer_install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if vim.fn.empty(vim.fn.glob(packer_install_path)) > 0 then - execute("!git clone https://github.com/wbthomason/packer.nvim "..install_path) + execute("!git clone https://github.com/wbthomason/packer.nvim "..packer_install_path) end vim.api.nvim_exec([[ @@ -205,97 +205,94 @@ kmap('n', ' h', ':b#') kmap('n', ' k', ':bnext') kmap('n', ' j', ':bprevious') kmap('n', '/', ':let @/ = "":') +kmapnore('n', 't', ':split:term:resize 24:startinsert') +kmapnore('t', '', ':q!') -nnoremap t :split:term:resize 24:startinsert -tnoremap :q! +function neatFoldText() + -- TODO: finish this! + -- local lines_count = vim.foldend - vim.foldstart + 1 + -- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.') + -- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) + -- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) + -- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn + -- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) +end +-- set foldtext=NeatFoldText() -function! NeatFoldText() - " TODO: finish this! - let lines_count = v:foldend - v:foldstart + 1 - let foldchar = matchstr(&fillchars, 'fold:\zs.') - let foldtextstart = strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) - let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) - let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn - return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) -endfunction -set foldtext=NeatFoldText() +-- TODO: only update this portion when needed instead of every render? +function statusLineBufferByNum(bufnum) + local bufinfo = vim.fn.getbufinfo(bufnum)[0] + local prefix = ' %#InactiveBuffer#' + local suffix = '%* ' -" TODO: only update this portion when needed instead of every render? -function! StatusLineBufferByNum(bufnum) - let l:bufinfo = getbufinfo(a:bufnum)[0] - let l:prefix = ' %#InactiveBuffer#' - let l:suffix = '%* ' - - if l:bufinfo.changed - let l:prefix = '%#DirtyBuffer# ' - let l:suffix = ' %*' + if bufinfo.changed then + prefix = '%#DirtyBuffer# ' + suffix = ' %*' end - if l:bufinfo['hidden'] == 0 && index(l:bufinfo['windows'], g:statusline_winid) >= 0 - let l:prefix = '%#ActiveBuffer# ' - let l:suffix = ' %*' - if l:bufinfo.changed - let l:prefix = '%#ActiveBuffer# *' - let l:suffix = ' %*' + if bufinfo.hidden == 0 and vim.fn.index(bufinfo.windows, vim.g.statusline_winid) >= 0 then + prefix = '%#ActiveBuffer# ' + suffix = ' %*' + if bufinfo.changed then + prefix = '%#ActiveBuffer# *' + suffix = ' %*' end - endif + end - return l:prefix . fnamemodify(bufname(a:bufnum), ':t') . l:suffix -endfunction + return prefix..vim.fn.fnamemodify(vim.fn.bufname(bufnum), ':t')..suffix +end -au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif +execute[[au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif]] -let g:status_line_max_length = 5 -function! StatusLineBuffers() - " TODO: mark buffers with unsaved changes - let l:active_index = -1 - let l:acc = [] - for l:bufnum in nvim_list_bufs() - let l:bufinfo = getbufinfo(l:bufnum)[0] - if l:bufinfo.listed == 0 - continue +local status_line_max_length = 5 + +function statusLineBuffers() + -- TODO: mark buffers with unsaved changes + + local active_index = -1 + local acc = {} + for bufnum in vim.fn.nvim_list_bufs() do + local bufinfo = vim.fn.getbufinfo(bufnum)[0] + if bufinfo.listed ~= 0 then + local entry = statusLineBufferByNum(bufnum) + table.insert(acc, entry) + if vim.fn.matchstr(entry, '^%#ActiveBuffer#') then + active_index = vim.fn.index(acc, entry) + end end - let l:entry = StatusLineBufferByNum(bufnum) - let l:acc = add(l:acc, l:entry) - if l:entry =~ "^%#ActiveBuffer#" - let l:active_index = index(l:acc, l:entry) - endif - endfor - if l:active_index >= 0 - " TODO: instead implement this as a wraparound carousel? - let l:offset = g:status_line_max_length / 2 - let l:min_buf_num = max([0, (l:active_index - offset)]) - let l:max_buf_num = min([(len(l:acc) - 1), (l:min_buf_num + g:status_line_max_length - 1)]) - let l:min_buf_num = max([0, (l:max_buf_num - g:status_line_max_length + 1)]) - let l:buflist = join(l:acc[(l:min_buf_num):(l:max_buf_num)], '') - let l:prefix = "" - let l:suffix = "" - if l:min_buf_num > 0 - let l:prefix = "< " - endif - if l:max_buf_num < len(l:acc) - 1 - let l:suffix = " >" - endif - return l:prefix . l:buflist . l:suffix + end + if active_index >= 0 then + -- TODO: instead implement this as a wraparound carousel? + local offset = status_line_max_length / 2 + local min_buf_num = math.max(0, (active_index - offset)) + local max_buf_num = math.min(#acc - 1, min_buf_num + status_line_max_length - 1) + min_buf_num = math.max(0, max_buf_num - status_line_max_length + 1) + local buflist = table.concat({table.unpack(acc, min_buf_num, max_buf_num)}, '') + local prefix = '' + local suffix = '' + if min_buf_num > 0 then + prefix = '< ' + end + if max_buf_num < (#acc - 1) then + suffix = ' >' + end + return prefix..buflist..suffix else - return join(l:acc, '') - endif -endfunction + return table.concat(acc, '') + end +end -function! StatusLine() - " try - return StatusLineBuffers().'%*%=%c,%l/%L (%p%%)' - " catch - " return 'buflisterr%*%=%c,%l/%L (%p%%)' - " endtry -endfunction +function statusLine() + return statusLineBuffers()..'%*%=%c,%l/%L (%p%%)' +end +vim.api.nvim_exec[[ augroup slime au! autocmd BufNewFile,BufRead *.slimleex set syntax=slim augroup END +]] -" set laststatus=0 showtabline tabline=%!StatusLine() -set statusline=%!StatusLine() +vim.o.statusline = '%'..statusLine() -imap (completion_trigger) +kmap('i', ' ', '(completion_trigger)') From a7b4b583e4c8ce5d7a933e129558e59788000848 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 2 Jun 2021 00:59:02 -0500 Subject: [PATCH 022/103] Wiiip --- .gitignore | 2 + common/neovim/init.lua | 381 +++++++++++++++++------------------------ common/neovim/init.vim | 262 ---------------------------- 3 files changed, 160 insertions(+), 485 deletions(-) delete mode 100644 common/neovim/init.vim diff --git a/.gitignore b/.gitignore index 1e10d06..83909e5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ fishd.tmp.* # TODO: should be unnecessary once color generation is homegrown /colors/gen/vendor /colors/gen/tmp + +/tags diff --git a/common/neovim/init.lua b/common/neovim/init.lua index 3f2ab62..049454c 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -1,193 +1,189 @@ -local execute = vim.api.nvim_command -local kmap = vim.api.nvim_set_keymap -local kmapnore = function(mode, keys, command) - kmap(mode, keys, command, {noremap=true}) -end +vim.g.vimdir = vim.fn.getenv('XDG_CONFIG_HOME')..'/nvim' -- plugin manager -local vimdir = vim.fn.getenv("XDG_CONFIG_HOME")..'/nvim' local packer_install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' +local execute = vim.api.nvim_command + if vim.fn.empty(vim.fn.glob(packer_install_path)) > 0 then - execute("!git clone https://github.com/wbthomason/packer.nvim "..packer_install_path) + vim.fn.system{'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} + execute'packadd packer.nvim' end vim.api.nvim_exec([[ - augroup Packer - autocmd! - autocmd BufWritePost init.lua PackerCompile - augroup end + augroup Packer + autocmd! + autocmd BufWritePost init.lua PackerCompile + augroup end ]], false) local use = require('packer').use require('packer').startup(function() - use 'wbthomason/packer.nvim' + use 'wbthomason/packer.nvim' use 'editorconfig/editorconfig-vim' use 'tpope/vim-sleuth' use 'vim-scripts/LargeFile' use 'vim-scripts/restore_view.vim' use 'christoomey/vim-tmux-navigator' - use 'tpope/vim-fugitive' - use 'tpope/vim-rhubarb' - use 'tpope/vim-commentary' + use 'tpope/vim-fugitive' + use 'tpope/vim-rhubarb' + use 'tpope/vim-commentary' use 'tpope/vim-repeat' use 'machakann/vim-sandwich' use 'michaeljsmith/vim-indent-object' use 'wellle/targets.vim' use 'bkad/CamelCaseMotion' - use 'ludovicchabant/vim-gutentags' + use 'ludovicchabant/vim-gutentags' use 'tpope/vim-obsession' use 'dhruvasagar/vim-prosession' - use {'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}} - use 'joshdick/onedark.vim' - use {'lukas-reineke/indent-blankline.nvim', branch="lua"} - use {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}} - use 'neovim/nvim-lspconfig' - use 'hrsh7th/nvim-compe' + use {'nvim-telescope/telescope.nvim', requires={{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}} + use 'joshdick/onedark.vim' + use {'lukas-reineke/indent-blankline.nvim', branch='lua'} + use {'lewis6991/gitsigns.nvim', requires={'nvim-lua/plenary.nvim'}} + use 'neovim/nvim-lspconfig' + use 'hrsh7th/nvim-compe' use 'sheerun/vim-polyglot' + use {'neoclide/coc.nvim', branch='release'} end) local globals = { - mapleader=" ", - maplocalleader=" ", - completion_enable_auto_popup=0, - indent_guide_auto_colors=1, - indent_guides_enable_on_vim_startup=1, - skipview_files={'COMMIT_EDITMSG'}, - indent_blankline_char="โ”Š", - indent_blankline_filetype_exclude={'help', 'packer'}, - indent_blankline_buftype_exclude={'terminal', 'nofile'}, - indent_blankline_char_highlight='LineNr', + mapleader=' ', + maplocalleader=' ', + completion_enable_auto_popup=0, + skipview_files={'COMMIT_EDITMSG'}, + indent_blankline_char='โ–', + indent_blankline_filetype_exclude={'help', 'packer'}, + indent_blankline_buftype_exclude={'terminal', 'nofile'}, + indent_blankline_char_highlight='LineNr', } for k,v in pairs(globals) do - vim.g[k] = v + vim.g[k] = v end local options = { - inccommand="nosplit", - tabstop=2, - softtabstop=2, - smartindent=true, - list=true, - listchars='trail:-,tab: ,trail:~', - linebreak=true, - formatoptions='crql1jn', - synmaxcol=200, - lazyredraw=true, - scrolloff=8, - sidescrolloff=15, - mouse='a', - splitright=true, - splitbelow=true, - errorbells=false, - visualbell=true, - backup=false, - writebackup=false, - swapfile=false, - timeout=true, - timeoutlen=150, - hidden=true, - shortmess='filnxToOFIac', - history=100000, - undofile=true, - undofir=vimdir..'/undo', - undolevels=100000, - undoreload=100000, - spellfile=vimdir..'/spell/en.utf-8.add', - ignorecase=true, - smartcase=true, - incsearch=true, - wrapscan=true, - hlsearch=true, - foldmethod='syntax', - foldlevel=99, - foldnextmax=10, - foldlevelstart=99, - autowrite=false, - autochdir=true, - autoread=true, - modeline=false, - showmode=false, - showcmd=false, - laststatus=2, - ruler=false, - termguicolors=true, + inccommand='nosplit', + tabstop=2, + softtabstop=2, + shiftwidth=2, + smartindent=true, + list=true, + listchars='trail:ยท,tab: ,trail:~', + linebreak=true, + formatoptions='crql1jn', + synmaxcol=200, + lazyredraw=true, + scrolloff=8, + sidescrolloff=15, + mouse='a', + splitright=true, + splitbelow=true, + errorbells=false, + visualbell=true, + backup=false, + writebackup=false, + swapfile=false, + timeout=true, + timeoutlen=150, + hidden=true, + shortmess='filnxToOFIac', + history=1000, + undofile=true, + undodir=vim.g.vimdir..'/undo', + undolevels=1000, + undoreload=1000, + spellfile=vim.g.vimdir..'/spell/en.utf-8.add', + ignorecase=true, + smartcase=true, + incsearch=true, + wrapscan=true, + hlsearch=true, + foldmethod='syntax', + foldlevel=99, + foldnestmax=10, + foldlevelstart=99, + autowrite=false, + autochdir=true, + autoread=true, + modeline=false, + showmode=false, + showcmd=false, + laststatus=2, + ruler=false, + termguicolors=true, } for k,v in pairs(options) do - vim.o[k] = v + -- print(tostring(k)..tostring(v)) + vim.o[k] = v end -- let &fcs = 'eob: ' vim.cmd[[colorscheme base16-donokai]] --- hi Search cterm=NONE ctermbg=blue ctermfg=black --- hi LineNr ctermbg=none ctermfg=8 --- hi CursorLineNr ctermbg=18 ctermfg=gray --- hi IndentGuidesEven ctermbg=18 --- hi Normal ctermbg=NONE --- hi ColorColumn ctermbg=18 --- hi TooLongColorColumn ctermbg=18 ctermfg=1 --- hi ActiveBuffer ctermbg=4 ctermfg=0 --- hi DirtyBuffer ctermbg=3 ctermfg=0 --- hi StatusLine ctermbg=18 ctermfg=7 --- hi StatusLineNC ctermbg=18 ctermfg=7 +vim.cmd[[ +hi Search cterm=NONE ctermbg=blue ctermfg=black +hi LineNr ctermbg=none ctermfg=8 +hi CursorLineNr ctermbg=18 ctermfg=gray +hi IndentGuidesEven ctermbg=18 +hi Normal ctermbg=NONE +hi ColorColumn ctermbg=18 +hi TooLongColorColumn ctermbg=18 ctermfg=1 +hi ActiveBuffer ctermbg=4 ctermfg=0 +hi DirtyBuffer ctermbg=3 ctermfg=0 +hi StatusLine ctermbg=18 ctermfg=7 +hi StatusLineNC ctermbg=18 ctermfg=7 +]] execute[[call matchadd('ColorColumn', '\\%81v', 100)]] execute[[call matchadd('TooLongColorColumn', '\\%121v', 200)]] vim.cmd[[command! W write]] -local escapes = {'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} -for keys in escapes do - kmap('i', keys, '') +function kmap(mode, keys, command, opts) + if opts == nil then opts = {} end + vim.api.nvim_set_keymap(mode, keys, command, opts) end -kmapnore('n', '', ':qa') +function kmapnore(mode, keys, command) + kmap(mode, keys, command, {noremap=true}) +end + +local escapes = {'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} +for _,keys in ipairs(escapes) do + kmap('i', keys, '') +end + +kmapnore('n', '', ':qa') kmapnore('n', '', '') -require('telescope').setup{ - defaults={ - mappings={ - i={ - [""]=false, - [""]=false, - }, - }, - generic_sorter=require'telescope.sorters'.get_fzy_sorter, - file_sorter=require'telescope.sorters'.get_fzy_sorter, - } -} +kmapnore('n', '', 'Telescope git_files') +kmapnore('n', '', 'Telescope live_grep') +kmapnore('n', '', 'Telescope buffers') +-- kmapnore('n', '???', 'Telescope help_tags') --- TODO: telescope bindings --- kmapnore('n', '', ':GitFiles') --- nnoremap :Files --- nnoremap :GFiles? --- nnoremap :Buffers +kmapnore('n', '', ':TmuxNavigateLeft') +kmapnore('n', '', ':TmuxNavigateDown') +kmapnore('n', '', ':TmuxNavigateUp') +kmapnore('n', '', ':TmuxNavigateRight') +kmapnore('t', '', ':TmuxNavigateLeft') +kmapnore('t', '', ':TmuxNavigateDown') +kmapnore('t', '', ':TmuxNavigateUp') +kmapnore('t', '', ':TmuxNavigateRight') -kmapnore('n', '', ':TmuxNavigateLeft') -kmapnore('n', '', ':TmuxNavigateDown') -kmapnore('n', '', ':TmuxNavigateUp') -kmapnore('n', '', ':TmuxNavigateRight') -kmapnore('t', '', ':TmuxNavigateLeft') -kmapnore('t', '', ':TmuxNavigateDown') -kmapnore('t', '', ':TmuxNavigateUp') -kmapnore('t', '', ':TmuxNavigateRight') +kmap('', ',w', 'CamelCaseMotion_w', {silent=true}) +kmap('', ',b', 'CamelCaseMotion_b', {silent=true}) +kmap('', ',e', 'CamelCaseMotion_e', {silent=true}) +kmap('', ',ge', 'CamelCaseMotion_ge', {silent=true}) +kmap('o', 'ib', 'CamelCaseMotion_ib', {silent=true}) +kmap('x', 'ib', 'CamelCaseMotion_ib', {silent=true}) +kmap('o', 'ie', 'CamelCaseMotion_ie', {silent=true}) +kmap('x', 'ie', 'CamelCaseMotion_ie', {silent=true}) -kmap('', ' ,w', 'CamelCaseMotion_w') -kmap('', ' ,b', 'CamelCaseMotion_b') -kmap('', ' ,e', 'CamelCaseMotion_e') -kmap('', ' ,ge', 'CamelCaseMotion_ge') -kmap('o', ' ib', 'CamelCaseMotion_ib') -kmap('x', ' ib', 'CamelCaseMotion_ib') -kmap('o', ' ie', 'CamelCaseMotion_ie') -kmap('x', ' ie', 'CamelCaseMotion_ie') - -kmap('', '', 'mw:%s/\\s\\+$//:let @/ = ""\'w') -kmap('', '', ':setlocal spell!') +kmap('', '', 'mw:%s/\\s\\+$//:let @/ = ""\'w') +kmap('', '', ':setlocal spell!') kmapnore('n', ' n', "'Nn'[v:searchforward]") kmapnore('n', ' N', "'nN'[v:searchforward]") kmapnore('c', '', '') @@ -198,101 +194,40 @@ kmapnore('x', '>', '>gv') -- TODO: learn about the wildmenu `q:` kmap('', '', '', {noremap=true, silent=true}) -kmap('n', ' r', ':source '..vimdir..'/init.vim:echo \'Reloaded init.vim\'') -kmap('n', ' gv', ':e '..vimdir..'/init.vim') -kmap('n', ' w', ':bd') -kmap('n', ' h', ':b#') -kmap('n', ' k', ':bnext') -kmap('n', ' j', ':bprevious') -kmap('n', '/', ':let @/ = "":') -kmapnore('n', 't', ':split:term:resize 24:startinsert') -kmapnore('t', '', ':q!') +kmap('n', 'r', ':luafile '..vim.g.vimdir..'/init.lua:echo \'Reloaded init.lua\'', {silent=true}) +kmap('n', 'gv', ':e '..vim.g.vimdir..'/init.lua', {silent=true}) +kmap('n', 'w', ':bd', {silent=true}) +kmap('n', 'h', ':b#', {silent=true}) +kmap('n', 'k', ':bnext', {silent=true}) +kmap('n', 'j', ':bprevious', {silent=true}) +kmap('n', '/', ':let @/ = "":', {silent=true}) +kmapnore('n', 't', ':split:term:resize 24:startinsert', {silent=true}) +kmapnore('t', '', ':q!', {silent=true}) -function neatFoldText() - -- TODO: finish this! - -- local lines_count = vim.foldend - vim.foldstart + 1 - -- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.') - -- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) - -- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) - -- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn - -- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) -end --- set foldtext=NeatFoldText() - --- TODO: only update this portion when needed instead of every render? -function statusLineBufferByNum(bufnum) - local bufinfo = vim.fn.getbufinfo(bufnum)[0] - local prefix = ' %#InactiveBuffer#' - local suffix = '%* ' - - if bufinfo.changed then - prefix = '%#DirtyBuffer# ' - suffix = ' %*' - end - - if bufinfo.hidden == 0 and vim.fn.index(bufinfo.windows, vim.g.statusline_winid) >= 0 then - prefix = '%#ActiveBuffer# ' - suffix = ' %*' - if bufinfo.changed then - prefix = '%#ActiveBuffer# *' - suffix = ' %*' - end - end - - return prefix..vim.fn.fnamemodify(vim.fn.bufname(bufnum), ':t')..suffix -end +kmap('i', '', '(completion_trigger)', {silent=true}) execute[[au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif]] -local status_line_max_length = 5 - -function statusLineBuffers() - -- TODO: mark buffers with unsaved changes - - local active_index = -1 - local acc = {} - for bufnum in vim.fn.nvim_list_bufs() do - local bufinfo = vim.fn.getbufinfo(bufnum)[0] - if bufinfo.listed ~= 0 then - local entry = statusLineBufferByNum(bufnum) - table.insert(acc, entry) - if vim.fn.matchstr(entry, '^%#ActiveBuffer#') then - active_index = vim.fn.index(acc, entry) - end - end - end - if active_index >= 0 then - -- TODO: instead implement this as a wraparound carousel? - local offset = status_line_max_length / 2 - local min_buf_num = math.max(0, (active_index - offset)) - local max_buf_num = math.min(#acc - 1, min_buf_num + status_line_max_length - 1) - min_buf_num = math.max(0, max_buf_num - status_line_max_length + 1) - local buflist = table.concat({table.unpack(acc, min_buf_num, max_buf_num)}, '') - local prefix = '' - local suffix = '' - if min_buf_num > 0 then - prefix = '< ' - end - if max_buf_num < (#acc - 1) then - suffix = ' >' - end - return prefix..buflist..suffix - else - return table.concat(acc, '') - end -end - -function statusLine() - return statusLineBuffers()..'%*%=%c,%l/%L (%p%%)' -end - -vim.api.nvim_exec[[ +vim.api.nvim_exec([[ augroup slime - au! - autocmd BufNewFile,BufRead *.slimleex set syntax=slim + au! + autocmd BufNewFile,BufRead *.slimleex set syntax=slim augroup END -]] +]], false) -vim.o.statusline = '%'..statusLine() +require('telescope').setup{ + defaults={ + mappings={ + i={ + ['']=false, + ['']=false, + }, + }, + generic_sorter=require'telescope.sorters'.get_fzy_sorter, + file_sorter=require'telescope.sorters'.get_fzy_sorter, + } +} -kmap('i', ' ', '(completion_trigger)') +require('fold').setup() +require('statusline').setup() +require('lsp').setup() diff --git a/common/neovim/init.vim b/common/neovim/init.vim deleted file mode 100644 index 1a25a1c..0000000 --- a/common/neovim/init.vim +++ /dev/null @@ -1,262 +0,0 @@ -set fileencoding=utf8 - -let $vimdir = $XDG_CONFIG_HOME.'/nvim' - -if empty(glob($vimdir.'/autoload/plug.vim')) - silent !curl -fLo $vimdir/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | source $vimdir.'/init.vim' -endif - -" let g:coc_global_extensions = ['coc-elixir', 'coc-diagnostic'] -let g:completion_enable_auto_popup = 0 -let g:indent_guide_auto_colors = 1 -let g:indent_guides_enable_on_vim_startup = 1 -let g:jsonnet_fmt_on_save = 0 -let g:skipview_files = ['COMMIT_EDITMSG'] -let g:prosession_dir = $vimdir.'/sessions' -" let g:fzf_preview_window = ['down:40%:hidden', 'ctrl-/'] - -call plug#begin($vimdir.'/plugged') - Plug 'junegunn/vim-plug' " plugin manager should manage itself - Plug 'sheerun/vim-polyglot' " handles language-specific configuration - Plug 'neovim/nvim-lspconfig' " deeper language integration via language servers - Plug 'nvim-lua/completion-nvim' " language server completion - Plug 'junegunn/fzf' " fzf - Plug 'junegunn/fzf.vim' " helpers for using fzf in vim - Plug 'editorconfig/editorconfig-vim' " loads project-specific editor settings - Plug 'tpope/vim-sleuth' " try and detect indent method - Plug 'vim-scripts/LargeFile' " gracefully handle very large files - Plug 'vim-scripts/restore_view.vim' " persistent buffer views - Plug 'nathanaelkane/vim-indent-guides' " indentation guides - Plug 'christoomey/vim-tmux-navigator' " allow window navigation to play nicely with tmux - Plug 'tpope/vim-commentary' " toggle comments in code easily - Plug 'tpope/vim-repeat' " better vim repeating for plugin-provided actions - Plug 'machakann/vim-sandwich' " quickly modify text surrounding objects - Plug 'michaeljsmith/vim-indent-object' " adds an indentation level text object - Plug 'bkad/CamelCaseMotion' " camel case and underscore word movements - Plug 'wellle/targets.vim' " adds some more handy text objects - Plug 'tpope/vim-obsession' " even better session handling - Plug 'dhruvasagar/vim-prosession' " even better session handling - Plug 'jjo/vim-cue' " CUE lang - Plug 'neoclide/coc.nvim', {'branch': 'release'} -call plug#end() - -" luafile $vimdir/lsp.lua -" autocmd BufEnter * lua require('completion').on_attach() - -filetype on -filetype indent on -filetype plugin on - -" use :h option-list if you need to know what these do -set encoding=utf8 -set tabstop=2 shiftwidth=2 softtabstop=2 noexpandtab -set autoindent smartindent -set list nostartofline listchars=trail:ยท,tab:\ \ ,trail:~ -set linebreak formatoptions=crql1jn " TODO: see if there is more in `:h fo-table` -set synmaxcol=200 -set lazyredraw -set scrolloff=8 sidescrolloff=15 -set mouse=a -set splitright splitbelow -set noerrorbells visualbell t_vb= -set nobackup nowritebackup noswapfile -set timeout ttimeoutlen=100 timeoutlen=150 -set hidden shortmess+=Iac -set history=1000 -set undofile undodir=$vimdir/undo undolevels=1000 undoreload=10000 -set spellfile=$vimdir/spell/en.utf-8.add -set ignorecase smartcase incsearch wrapscan hlsearch -set foldmethod=syntax foldlevel=99 foldnestmax=10 foldlevelstart=99 " TODO: get good at folding -set noautowrite autochdir autoread -set nomodeline noshowmode noshowcmd laststatus=2 noruler -set clipboard+=unnamedplus -set t_Co=256 -let &fcs = 'eob: ' - -syntax enable -colorscheme base16-donokai - -hi Search cterm=NONE ctermbg=blue ctermfg=black -hi LineNr ctermbg=none ctermfg=8 -hi CursorLineNr ctermbg=18 ctermfg=gray -hi IndentGuidesEven ctermbg=18 -hi Normal ctermbg=NONE -hi ColorColumn ctermbg=18 -hi TooLongColorColumn ctermbg=18 ctermfg=1 -hi ActiveBuffer ctermbg=4 ctermfg=0 -hi DirtyBuffer ctermbg=3 ctermfg=0 -hi StatusLine ctermbg=18 ctermfg=7 -hi StatusLineNC ctermbg=18 ctermfg=7 - -call matchadd('ColorColumn', '\%81v', 100) -call matchadd('TooLongColorColumn', '\%121v', 200) - -command! W write - -inoremap jj -inoremap jJ -inoremap Jj -inoremap JJ -inoremap jk -inoremap jK -inoremap Jk -inoremap JK - -nnoremap :qa -inoremap - -nnoremap :GitFiles -nnoremap :Files -nnoremap :GFiles? -nnoremap :Buffers - -nnoremap :TmuxNavigateLeft -nnoremap :TmuxNavigateDown -nnoremap :TmuxNavigateUp -nnoremap :TmuxNavigateRight -tnoremap :TmuxNavigateLeft -tnoremap :TmuxNavigateDown -tnoremap :TmuxNavigateUp -tnoremap :TmuxNavigateRight - -map ,w CamelCaseMotion_w -map ,b CamelCaseMotion_b -map ,e CamelCaseMotion_e -map ,ge CamelCaseMotion_ge -omap ib CamelCaseMotion_ib -xmap ib CamelCaseMotion_ib -omap ie CamelCaseMotion_ie -xmap ie CamelCaseMotion_ie - -map mw:%s/\s\+$//:let @/ = ""'w -map :setlocal spell! - -nnoremap n 'Nn'[v:searchforward] -nnoremap N 'nN'[v:searchforward] - -cnoremap -cnoremap - -xnoremap < >gv - -nnoremap gd :call CocAction('jumpDefinition') -nmap gd (coc-definition) -nmap gy :call CocActionAsync('doHover') -nmap gi (coc-implementation) -nmap gr (coc-references) - -" TODO: learn about the wildmenu `q:` - -let mapleader = "\" -nnoremap r :source $vimdir/init.vim:echo 'Reloaded init.vim' -nnoremap gv :e $vimdir/init.vim -nnoremap w :bd -nnoremap h :b# -nnoremap k :bnext -nnoremap j :bprevious -nnoremap / :let @/ = "": - -nnoremap t :split:term:resize 24:startinsert -tnoremap :q! - -function! NeatFoldText() - " TODO: finish this! - let lines_count = v:foldend - v:foldstart + 1 - let foldchar = matchstr(&fillchars, 'fold:\zs.') - let foldtextstart = strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) - let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) - let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn - return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) -endfunction -set foldtext=NeatFoldText() - -" TODO: only update this portion when needed instead of every render? -function! StatusLineBufferByNum(bufnum) - let l:bufinfo = getbufinfo(a:bufnum)[0] - let l:prefix = ' %#InactiveBuffer#' - let l:suffix = '%* ' - - if l:bufinfo.changed - let l:prefix = '%#DirtyBuffer# ' - let l:suffix = ' %*' - end - - if l:bufinfo['hidden'] == 0 && index(l:bufinfo['windows'], g:statusline_winid) >= 0 - let l:prefix = '%#ActiveBuffer# ' - let l:suffix = ' %*' - if l:bufinfo.changed - let l:prefix = '%#ActiveBuffer# *' - let l:suffix = ' %*' - end - endif - - return l:prefix . fnamemodify(bufname(a:bufnum), ':t') . l:suffix -endfunction - -au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif - -let g:status_line_max_length = 5 -function! StatusLineBuffers() - " TODO: mark buffers with unsaved changes - let l:active_index = -1 - let l:acc = [] - for l:bufnum in nvim_list_bufs() - let l:bufinfo = getbufinfo(l:bufnum)[0] - if l:bufinfo.listed == 0 - continue - end - let l:entry = StatusLineBufferByNum(bufnum) - let l:acc = add(l:acc, l:entry) - if l:entry =~ "^%#ActiveBuffer#" - let l:active_index = index(l:acc, l:entry) - endif - endfor - if l:active_index >= 0 - " TODO: instead implement this as a wraparound carousel? - let l:offset = g:status_line_max_length / 2 - let l:min_buf_num = max([0, (l:active_index - offset)]) - let l:max_buf_num = min([(len(l:acc) - 1), (l:min_buf_num + g:status_line_max_length - 1)]) - let l:min_buf_num = max([0, (l:max_buf_num - g:status_line_max_length + 1)]) - let l:buflist = join(l:acc[(l:min_buf_num):(l:max_buf_num)], '') - let l:prefix = "" - let l:suffix = "" - if l:min_buf_num > 0 - let l:prefix = "< " - endif - if l:max_buf_num < len(l:acc) - 1 - let l:suffix = " >" - endif - return l:prefix . l:buflist . l:suffix - else - return join(l:acc, '') - endif -endfunction - -function! StatusLine() - " try - return StatusLineBuffers().'%*%=%c,%l/%L (%p%%)' - " catch - " return 'buflisterr%*%=%c,%l/%L (%p%%)' - " endtry -endfunction - -augroup slime | au! BufNewFile,BufRead *.slimleex set syntax=slim | augroup END -augroup ctmpl | au! BufNewFile,BufRead *.ctmpl set syntax=gohtmltmpl | augroup END - -" set laststatus=0 showtabline tabline=%!StatusLine() -set statusline=%!StatusLine() - -imap (completion_trigger) - -if filereadable(expand($ENV_PATH.'/init.vim')) - source "$ENV_PATH/init.vim" -endif - -for f in glob($ENV_PATH.'/*/init.d.vim', 0, 1) - source "$f" -endfor - -set number From 780686f18537346a68978232f033c49a06769221 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 2 Jun 2021 21:51:58 -0500 Subject: [PATCH 023/103] Add tmux aliases --- common/bin/tdf | 2 ++ common/bin/tls | 2 ++ 2 files changed, 4 insertions(+) create mode 100755 common/bin/tdf create mode 100755 common/bin/tls diff --git a/common/bin/tdf b/common/bin/tdf new file mode 100755 index 0000000..96d3cd2 --- /dev/null +++ b/common/bin/tdf @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +tmux new-session -s dotfiles -c "$DOTFILES_PATH" diff --git a/common/bin/tls b/common/bin/tls new file mode 100755 index 0000000..2ef55ac --- /dev/null +++ b/common/bin/tls @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +tmux list-sessions From aeddca41b1a601b78bf82f78165652befdbd0d9c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 11 Jun 2021 21:32:54 -0500 Subject: [PATCH 024/103] More WIP --- common/bin/tdf | 4 +- common/bin/tenv | 3 + common/bin/tmux-lyte-session | 5 ++ common/neovim/.gitignore | 2 +- common/neovim/init.lua | 6 +- common/neovim/lua/fold.lua | 12 +++ common/neovim/lua/lsp.lua | 86 ++++++++++++++++++++ common/neovim/{ => lua}/nvim_lsp.lua | 0 common/neovim/lua/statusline.lua | 72 ++++++++++++++++ os/linux/kanshi/config | 6 ++ os/linux/kanshi/desktop-single-workspace.sh | 1 - os/linux/kanshi/laptop-single-workspace.bash | 6 ++ 12 files changed, 196 insertions(+), 7 deletions(-) create mode 100755 common/bin/tenv create mode 100755 common/bin/tmux-lyte-session create mode 100644 common/neovim/lua/fold.lua create mode 100644 common/neovim/lua/lsp.lua rename common/neovim/{ => lua}/nvim_lsp.lua (100%) create mode 100644 common/neovim/lua/statusline.lua create mode 100644 os/linux/kanshi/laptop-single-workspace.bash diff --git a/common/bin/tdf b/common/bin/tdf index 96d3cd2..e712a4a 100755 --- a/common/bin/tdf +++ b/common/bin/tdf @@ -1,2 +1,2 @@ -#!/usr/bin/env sh -tmux new-session -s dotfiles -c "$DOTFILES_PATH" +#!/usr/bin/env fish +tmux-lyte-session dotfiles $DOTFILES_PATH diff --git a/common/bin/tenv b/common/bin/tenv new file mode 100755 index 0000000..39fa9c8 --- /dev/null +++ b/common/bin/tenv @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +d="$(command ls $ENV_PATH | fzf)" +tmux-lyte-session "env-$d" "$ENV_PATH/$d" diff --git a/common/bin/tmux-lyte-session b/common/bin/tmux-lyte-session new file mode 100755 index 0000000..d3e67db --- /dev/null +++ b/common/bin/tmux-lyte-session @@ -0,0 +1,5 @@ +#!/usr/bin/env fish +set session_name $argv[1] +set dir (set -q $argv[2] && echo $argv2 || pwd) +tmux new-session -D -s $session_name -c $dir || \ + tmux attach-session -d -t $session_name diff --git a/common/neovim/.gitignore b/common/neovim/.gitignore index 1adac55..030b11f 100644 --- a/common/neovim/.gitignore +++ b/common/neovim/.gitignore @@ -2,6 +2,6 @@ !/.gitignore !/init.vim !/init.lua -!/nvim_lsp.lua !/ftplugin +!/lua !/coc-settings.json diff --git a/common/neovim/init.lua b/common/neovim/init.lua index 049454c..1dbaddc 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -228,6 +228,6 @@ require('telescope').setup{ } } -require('fold').setup() -require('statusline').setup() -require('lsp').setup() +require('./fold').setup() +require('./statusline').setup() +require('./lsp').setup() diff --git a/common/neovim/lua/fold.lua b/common/neovim/lua/fold.lua new file mode 100644 index 0000000..bd8bed5 --- /dev/null +++ b/common/neovim/lua/fold.lua @@ -0,0 +1,12 @@ +function NeatFoldText() + -- TODO: finish this! + -- local lines_count = vim.foldend - vim.foldstart + 1 + -- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.') + -- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) + -- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) + -- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn + -- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) +end +-- set foldtext=NeatFoldText() + +return {setup = function() end} diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua new file mode 100644 index 0000000..a29f968 --- /dev/null +++ b/common/neovim/lua/lsp.lua @@ -0,0 +1,86 @@ +local opts = {noremap=true, silent=true} + +vim.api.nvim_set_keymap('n', '[g', '(coc-diagnostic-prev)', opts) +vim.api.nvim_set_keymap('n', ']g', '(coc-diagnostic-next)', opts) + +vim.api.nvim_set_keymap('n', 'gd', '(coc-definition)', opts) +vim.api.nvim_set_keymap('n', 'gy', '(coc-type-definition)', opts) + +local nvim_lsp = require('lspconfig') +local on_attach = function(_client, bufnr) + vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + local kmaps = { + ['gD']='lua vim.lsp.buf.declaration()' + } + + for k,v in pairs(kmaps) do + vim.api.nvim_buf_set_keymap(bufnr, 'n', k, v, opts) + end + + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) +end + +local servers = {'clangd', 'rust_analyzer', 'pyright', 'tsserver'} +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup{on_attach=on_attach} +end + +local sumneko_root_path = vim.fn.getenv('HOME')..'/.local/bin/sumneko_lua' +local sumneko_binary_path = '/bin/linux/lua-language-server' +nvim_lsp.sumneko_lua.setup{ + cmd={sumneko_root_path .. sumneko_binary_path, '-E', sumneko_root_path..'/main.lua'}; + on_attach=on_attach, + settings={ + Lua={ + runtime={ + version='LuaJIT', + path=vim.split(package.path, ';'), + }, + diagnostics={ + globals={'vim'}, + }, + workspace={ + library={ + [vim.fn.expand('$VIMRUNTIME/lua')] = true, + [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, + }, + }, + }, + }, +} + +vim.cmd "command! Format execute 'lua vim.lsp.buf.formatting()'" +vim.o.completeopt = 'menuone,noinsert' + +-- Compe setup +require'compe'.setup{ + enabled=true, + autocomplete=true, + debug=false, + min_length=1, + preselect='enable', + throttle_time=80, + source_timeout=200, + incomplete_delay=400, + max_abbr_width=100, + max_kind_width=100, + max_menu_width=100, + documentation=true, + source={path=true, nvim_lsp=true}, +} + +return { + setup=function() + end +} diff --git a/common/neovim/nvim_lsp.lua b/common/neovim/lua/nvim_lsp.lua similarity index 100% rename from common/neovim/nvim_lsp.lua rename to common/neovim/lua/nvim_lsp.lua diff --git a/common/neovim/lua/statusline.lua b/common/neovim/lua/statusline.lua new file mode 100644 index 0000000..c8b34e5 --- /dev/null +++ b/common/neovim/lua/statusline.lua @@ -0,0 +1,72 @@ +-- TODO: make override-able +vim.g.status_line_max_length = 5 + +-- TODO: only update this portion when needed instead of every render? + +function StatusLineBufferByNum(bufnum) + local bufinfo = vim.fn.getbufinfo(bufnum) + local prefix = ' %#InactiveBuffer#' + local suffix = '%* ' + + if bufinfo.changed then + prefix = '%#DirtyBuffer# ' + suffix = ' %*' + end + + if bufinfo.hidden == 0 and vim.fn.index(bufinfo.windows, vim.g.statusline_winid) >= 0 then + prefix = '%#ActiveBuffer# ' + suffix = ' %*' + if bufinfo.changed then + prefix = '%#ActiveBuffer# *' + suffix = ' %*' + end + end + + return prefix..vim.fn.fnamemodify(vim.fn.bufname(bufnum), ':t')..suffix +end + +function StatusLineBuffers() + -- TODO: mark buffers with unsaved changes + + local active_index = -1 + local acc = {} + for _,bufnum in ipairs(vim.api.nvim_list_bufs()) do + local bufinfo = vim.fn.getbufinfo(bufnum) + if bufinfo.listed ~= 0 then + local entry = StatusLineBufferByNum(bufnum) + table.insert(acc, entry) + if vim.fn.matchstr(entry, '^%#ActiveBuffer#') then + active_index = vim.fn.index(acc, entry) + end + end + end + if active_index >= 0 then + -- TODO: instead implement this as a wraparound carousel? + local offset = vim.g.status_line_max_length / 2 + local min_buf_num = math.max(0, (active_index - offset)) + local max_buf_num = math.min(#acc - 1, min_buf_num + vim.g.status_line_max_length - 1) + min_buf_num = math.max(0, max_buf_num - vim.g.status_line_max_length + 1) + local buflist = table.concat({unpack(acc, min_buf_num, max_buf_num)}, '') + local prefix = '' + local suffix = '' + if min_buf_num > 0 then + prefix = '< ' + end + if max_buf_num < (#acc - 1) then + suffix = ' >' + end + return prefix..buflist..suffix + else + return table.concat(acc, '') + end +end + +function StatusLine() + return StatusLineBuffers()..'%*%=%c,%l/%L (%p%%)' +end + +return { + setup=function() + vim.o.statusline = ''..StatusLine() + end +} diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index e6093d2..85117a8 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -32,6 +32,12 @@ profile desktop-ultrawide { exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-single-workspace.sh" } +profile laptop-with-display { + output "Sharp Corporation 0x144A 0x00000000" enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal + output DP-1 enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal + exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-single-workspace.bash" +} + profile laptop { output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal } diff --git a/os/linux/kanshi/desktop-single-workspace.sh b/os/linux/kanshi/desktop-single-workspace.sh index 69b1fdc..6c14e03 100644 --- a/os/linux/kanshi/desktop-single-workspace.sh +++ b/os/linux/kanshi/desktop-single-workspace.sh @@ -1,4 +1,3 @@ - #!/usr/bin/env bash move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } diff --git a/os/linux/kanshi/laptop-single-workspace.bash b/os/linux/kanshi/laptop-single-workspace.bash new file mode 100644 index 0000000..10c6239 --- /dev/null +++ b/os/linux/kanshi/laptop-single-workspace.bash @@ -0,0 +1,6 @@ + +#!/usr/bin/env bash + +move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } +setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; } +setup_output eDP-1 1 2 3 4 5 6 7 8 9 From a037661cf43d164b4afe63453ced8d236e81b40e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 13 Jun 2021 11:02:27 -0500 Subject: [PATCH 025/103] Still more --- common/neovim/init.lua | 260 ++++--------------------------- common/neovim/lua/config.moon | 0 common/neovim/lua/keymap.lua | 68 ++++++++ common/neovim/lua/options.lua | 89 +++++++++++ common/neovim/lua/plugins.lua | 43 +++++ common/neovim/lua/statusline.lua | 40 ++--- 6 files changed, 254 insertions(+), 246 deletions(-) create mode 100644 common/neovim/lua/config.moon create mode 100644 common/neovim/lua/keymap.lua create mode 100644 common/neovim/lua/options.lua create mode 100644 common/neovim/lua/plugins.lua diff --git a/common/neovim/init.lua b/common/neovim/init.lua index 1dbaddc..001b02e 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -1,233 +1,41 @@ -vim.g.vimdir = vim.fn.getenv('XDG_CONFIG_HOME')..'/nvim' - --- plugin manager -local packer_install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' - -local execute = vim.api.nvim_command - -if vim.fn.empty(vim.fn.glob(packer_install_path)) > 0 then - vim.fn.system{'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} - execute'packadd packer.nvim' -end - -vim.api.nvim_exec([[ - augroup Packer - autocmd! - autocmd BufWritePost init.lua PackerCompile - augroup end -]], false) - -local use = require('packer').use - -require('packer').startup(function() - use 'wbthomason/packer.nvim' - use 'editorconfig/editorconfig-vim' - use 'tpope/vim-sleuth' - use 'vim-scripts/LargeFile' - use 'vim-scripts/restore_view.vim' - use 'christoomey/vim-tmux-navigator' - use 'tpope/vim-fugitive' - use 'tpope/vim-rhubarb' - use 'tpope/vim-commentary' - use 'tpope/vim-repeat' - use 'machakann/vim-sandwich' - use 'michaeljsmith/vim-indent-object' - use 'wellle/targets.vim' - use 'bkad/CamelCaseMotion' - use 'ludovicchabant/vim-gutentags' - use 'tpope/vim-obsession' - use 'dhruvasagar/vim-prosession' - use {'nvim-telescope/telescope.nvim', requires={{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}} - use 'joshdick/onedark.vim' - use {'lukas-reineke/indent-blankline.nvim', branch='lua'} - use {'lewis6991/gitsigns.nvim', requires={'nvim-lua/plenary.nvim'}} - use 'neovim/nvim-lspconfig' - use 'hrsh7th/nvim-compe' - use 'sheerun/vim-polyglot' - use {'neoclide/coc.nvim', branch='release'} -end) - -local globals = { - mapleader=' ', - maplocalleader=' ', - completion_enable_auto_popup=0, - skipview_files={'COMMIT_EDITMSG'}, - indent_blankline_char='โ–', - indent_blankline_filetype_exclude={'help', 'packer'}, - indent_blankline_buftype_exclude={'terminal', 'nofile'}, - indent_blankline_char_highlight='LineNr', -} - -for k,v in pairs(globals) do - vim.g[k] = v -end - -local options = { - inccommand='nosplit', - tabstop=2, - softtabstop=2, - shiftwidth=2, - smartindent=true, - list=true, - listchars='trail:ยท,tab: ,trail:~', - linebreak=true, - formatoptions='crql1jn', - synmaxcol=200, - lazyredraw=true, - scrolloff=8, - sidescrolloff=15, - mouse='a', - splitright=true, - splitbelow=true, - errorbells=false, - visualbell=true, - backup=false, - writebackup=false, - swapfile=false, - timeout=true, - timeoutlen=150, - hidden=true, - shortmess='filnxToOFIac', - history=1000, - undofile=true, - undodir=vim.g.vimdir..'/undo', - undolevels=1000, - undoreload=1000, - spellfile=vim.g.vimdir..'/spell/en.utf-8.add', - ignorecase=true, - smartcase=true, - incsearch=true, - wrapscan=true, - hlsearch=true, - foldmethod='syntax', - foldlevel=99, - foldnestmax=10, - foldlevelstart=99, - autowrite=false, - autochdir=true, - autoread=true, - modeline=false, - showmode=false, - showcmd=false, - laststatus=2, - ruler=false, - termguicolors=true, -} - -for k,v in pairs(options) do - -- print(tostring(k)..tostring(v)) - vim.o[k] = v -end - --- let &fcs = 'eob: ' - -vim.cmd[[colorscheme base16-donokai]] - -vim.cmd[[ -hi Search cterm=NONE ctermbg=blue ctermfg=black -hi LineNr ctermbg=none ctermfg=8 -hi CursorLineNr ctermbg=18 ctermfg=gray -hi IndentGuidesEven ctermbg=18 -hi Normal ctermbg=NONE -hi ColorColumn ctermbg=18 -hi TooLongColorColumn ctermbg=18 ctermfg=1 -hi ActiveBuffer ctermbg=4 ctermfg=0 -hi DirtyBuffer ctermbg=3 ctermfg=0 -hi StatusLine ctermbg=18 ctermfg=7 -hi StatusLineNC ctermbg=18 ctermfg=7 -]] - -execute[[call matchadd('ColorColumn', '\\%81v', 100)]] -execute[[call matchadd('TooLongColorColumn', '\\%121v', 200)]] - -vim.cmd[[command! W write]] - -function kmap(mode, keys, command, opts) - if opts == nil then opts = {} end - vim.api.nvim_set_keymap(mode, keys, command, opts) -end - -function kmapnore(mode, keys, command) - kmap(mode, keys, command, {noremap=true}) -end - -local escapes = {'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} -for _,keys in ipairs(escapes) do - kmap('i', keys, '') -end - -kmapnore('n', '', ':qa') -kmapnore('n', '', '') - -kmapnore('n', '', 'Telescope git_files') -kmapnore('n', '', 'Telescope live_grep') -kmapnore('n', '', 'Telescope buffers') --- kmapnore('n', '???', 'Telescope help_tags') - -kmapnore('n', '', ':TmuxNavigateLeft') -kmapnore('n', '', ':TmuxNavigateDown') -kmapnore('n', '', ':TmuxNavigateUp') -kmapnore('n', '', ':TmuxNavigateRight') -kmapnore('t', '', ':TmuxNavigateLeft') -kmapnore('t', '', ':TmuxNavigateDown') -kmapnore('t', '', ':TmuxNavigateUp') -kmapnore('t', '', ':TmuxNavigateRight') - -kmap('', ',w', 'CamelCaseMotion_w', {silent=true}) -kmap('', ',b', 'CamelCaseMotion_b', {silent=true}) -kmap('', ',e', 'CamelCaseMotion_e', {silent=true}) -kmap('', ',ge', 'CamelCaseMotion_ge', {silent=true}) -kmap('o', 'ib', 'CamelCaseMotion_ib', {silent=true}) -kmap('x', 'ib', 'CamelCaseMotion_ib', {silent=true}) -kmap('o', 'ie', 'CamelCaseMotion_ie', {silent=true}) -kmap('x', 'ie', 'CamelCaseMotion_ie', {silent=true}) - -kmap('', '', 'mw:%s/\\s\\+$//:let @/ = ""\'w') -kmap('', '', ':setlocal spell!') -kmapnore('n', ' n', "'Nn'[v:searchforward]") -kmapnore('n', ' N', "'nN'[v:searchforward]") -kmapnore('c', '', '') -kmapnore('c', '', '') -kmapnore('x', '<', '', '>gv') +local kmap = vim.api.nvim_set_keymap +local excmd = vim.api.nvim_command +local nvim_exec = vim.api.nvim_exec -- TODO: learn about the wildmenu `q:` -kmap('', '', '', {noremap=true, silent=true}) +-- TODO: what is `let &fcs = 'eob: '` for? -kmap('n', 'r', ':luafile '..vim.g.vimdir..'/init.lua:echo \'Reloaded init.lua\'', {silent=true}) -kmap('n', 'gv', ':e '..vim.g.vimdir..'/init.lua', {silent=true}) -kmap('n', 'w', ':bd', {silent=true}) -kmap('n', 'h', ':b#', {silent=true}) -kmap('n', 'k', ':bnext', {silent=true}) -kmap('n', 'j', ':bprevious', {silent=true}) -kmap('n', '/', ':let @/ = "":', {silent=true}) -kmapnore('n', 't', ':split:term:resize 24:startinsert', {silent=true}) -kmapnore('t', '', ':q!', {silent=true}) +local evalvim = function(vimscript, output) + if (output == nil) then + output = false + end + nvim_exec(vimscript, output) +end -kmap('i', '', '(completion_trigger)', {silent=true}) +require('plugins').setup() +require'options' +require'keymap' -execute[[au BufReadPost * | if stridx(&ft, 'commit') >= 0 | exe "startinsert!" | endif]] - -vim.api.nvim_exec([[ -augroup slime - au! - autocmd BufNewFile,BufRead *.slimleex set syntax=slim -augroup END -]], false) - -require('telescope').setup{ - defaults={ - mappings={ - i={ - ['']=false, - ['']=false, - }, +do + local plugin_setups = { + telescope = { + defaults = { + mappings = {i = {['c-u'] = false, ['c-d'] = false}}, + generic_sorter = require('telescope.sorters').get_fzy_sorter, + file_sorter = require('telescope.sorters').get_fzy_sorter, + } }, - generic_sorter=require'telescope.sorters'.get_fzy_sorter, - file_sorter=require'telescope.sorters'.get_fzy_sorter, + fold = true, + statusline = true, + lsp = true, } -} - -require('./fold').setup() -require('./statusline').setup() -require('./lsp').setup() + for k,v in pairs(plugin_setups) do + if type(v) == 'function' then + v(require(k)) + elseif type(v) == 'table' then + require(k).setup(v) + elseif v == true then + require(k).setup() + end + end +end diff --git a/common/neovim/lua/config.moon b/common/neovim/lua/config.moon new file mode 100644 index 0000000..e69de29 diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua new file mode 100644 index 0000000..0bdc213 --- /dev/null +++ b/common/neovim/lua/keymap.lua @@ -0,0 +1,68 @@ +local vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim' + +for _,keys in ipairs{'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} do kmap('i', keys, '', {}) end + +local m = { + s = {silent = true}, + n = {noremap = true}, + sn = {silent = true, noremap = true}, +} +local keymap = { + n = { + ['r'] = {':luafile ' .. vimdir .. '/init.lua:echo \'Reloaded init.lua\'', m.s}, + ['gv'] = {':e ' .. vimdir .. '/init.lua', m.s}, + ['w'] = {':bd', m.s}, + ['h'] = {'b#', m.s}, + ['k'] = {':bnext', m.s}, + ['j'] = {':bprevious', m.s}, + ['/'] = {':let @/ = "":', m.s}, + [''] = ':qa', + [''] = 'Telescope git_files', + [''] = 'Telescope live_grep', + [''] = 'Telescope buffers', + ['t'] = 'Telescope help_tags', + [''] = ':TmuxNavigateLeft', + [''] = ':TmuxNavigateDown', + [''] = ':TmuxNavigateUp', + [''] = ':TmuxNavigateRight', + [' n'] = "'Nn'[v:searchforward]", + [' N'] = "'nN'[v:searchforward]", + }, + t = {}, + [''] = { + [''] = {'', m.sn}, + [''] = 'mw:%s/\\s\\+$//:let @/ = ""\'w', + [''] = ':setlocal spell!', + [',w'] = {'CamelCaseMotion_w', m.s}, + [',b'] = {'CamelCaseMotion_b', m.s}, + [',e'] = {'CamelCaseMotion_e', m.s}, + [',ge'] = {'CamelCaseMotion_ge', m.s}, + }, + o = { + ['ib'] = {'CamelCaseMotion_ib', m.s}, + ['ie'] = {'CamelCaseMotion_ie', m.s}, + }, + x = { + ['<'] = ''] = '>gv', + ['ib'] = {'CamelCaseMotion_ib', m.s}, + ['ie'] = {'CamelCaseMotion_ie', m.s}, + }, + c = { + [''] = '', + [''] = '', + }, + i = { + [''] = '', + [''] = {'(completion_trigger)', m.s}, + }, +} +for mode,mappings in pairs(keymap) do + for key,bind in pairs(mappings) do + if type(bind) == 'table' then + vim.api.nvim_set_keymap(mode, key, bind[1], bind[2]) + else + vim.api.nvim_set_keymap(mode, key, bind, {}) + end + end +end diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua new file mode 100644 index 0000000..3a48dd4 --- /dev/null +++ b/common/neovim/lua/options.lua @@ -0,0 +1,89 @@ +local globals = { + mapleader = ' ', + maplocalleader = ' ', + completion_enable_auto_popup = 0, + skipview_files = {'COMMIT_EDITMSG'}, + indent_blankline_char = 'โ–', + indent_blankline_filetype_exclude = {'help', 'packer'}, + indent_blankline_buftype_exclude = {'terminal', 'nofile'}, + indent_blankline_char_highlight = 'LineNr', +} +for k,v in pairs(globals) do vim.g[k] = v end + +local options = { + inccommand = 'nosplit', + tabstop = 2, + softtabstop = 2, + shiftwidth = 2, + smartindent = true, + list = true, + listchars = 'trail:ยท,tab: ', + linebreak = true, + formatoptions = 'crql1jn', + synmaxcol = 200, + lazyredraw = true, + scrolloff = 8, + sidescrolloff = 15, + mouse = 'a', + splitright = true, + splitbelow = true, + errorbells = false, + visualbell = true, + backup = false, + writebackup = false, + swapfile = false, + timeout = true, + timeoutlen = 150, + hidden = true, + shortmess = 'filnxToOFIac', + history = 1000, + undofile = true, + undodir = vimdir .. '/undo', + undolevels = 1000, + undoreload = 1000, + spellfile = vimdir .. '/spell/en.utf-8.add', + ignorecase = true, + smartcase = true, + incsearch = true, + wrapscan = true, + hlsearch = true, + foldmethod = 'syntax', + foldlevel = 99, + foldnestmax = 10, + foldlevelstart = 99, + autowrite = false, + autochdir = true, + autoread = true, + modeline = false, + showmode = false, + showcmd = false, + laststatus = 2, + ruler = false, + termguicolors = true, +} +for k,v in pairs(options) do + vim.o[k] = v +end + +vim.api.nvim_exec([[ + hi Search cterm=NONE ctermbg=blue ctermfg=black + hi LineNr ctermbg=0 ctermfg=8 + hi CursorLineNr ctermbg=18 ctermfg=gray + hi IndentGuidesEven ctermbg=18 + hi Normal ctermbg=NONE + hi ActiveBuffer ctermbg=4 ctermfg=0 + hi DirtyBuffer ctermbg=3 ctermfg=0 + hi StatusLine ctermbg=1 ctermfg=7 + hi StatusLineNC ctermbg=2 ctermfg=7 + command! W write + augroup oncommit + au! BufReadPost * + if stridx(&ft, 'commit') >= 0 + exe "startinsert!" + endif + augroup END + augroup slime + au! BufNewFile,BufRead *.slimleex set syntax=slim + augroup END + colorscheme base16-donokai +]], false) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua new file mode 100644 index 0000000..f406bfd --- /dev/null +++ b/common/neovim/lua/plugins.lua @@ -0,0 +1,43 @@ +local setup = function() + local packer_install_path = "#{fn.stdpath 'data'}/site/pack/packer/start/packer.nvim" + if #vim.fn.glob(packer_install_path) > 0 then + vim.fn.system {'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} + vim.api.nvim_command'packadd packer.nvim' + end + + local packer = require'packer' + packer.startup(function() + local plugins = { + 'wbthomason/packer.nvim', + 'editorconfig/editorconfig-vim', + 'tpope/vim-sleuth', + 'vim-scripts/LargeFile', + 'vim-scripts/restore_view.vim', + 'christoomey/vim-tmux-navigator', + 'tpope/vim-fugitive', + 'tpope/vim-rhubarb', + 'tpope/vim-commentary', + 'tpope/vim-repeat', + 'machakann/vim-sandwich', + 'michaeljsmith/vim-indent-object', + 'wellle/targets.vim', + 'bkad/CamelCaseMotion', + 'ludovicchabant/vim-gutentags', + 'tpope/vim-obsession', + 'dhruvasagar/vim-prosession', + {'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}}, + 'joshdick/onedark.vim', + {'lukas-reineke/indent-blankline.nvim', branch = 'lua'}, + {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}}, + 'neovim/nvim-lspconfig', + 'hrsh7th/nvim-compe', + 'sheerun/vim-polyglot', + {'neoclide/coc.nvim', branch = 'release'}, + } + for _,plugin in ipairs(plugins) do + packer.use(plugin) + end + end) +end + +return {setup = setup} diff --git a/common/neovim/lua/statusline.lua b/common/neovim/lua/statusline.lua index c8b34e5..87522f8 100644 --- a/common/neovim/lua/statusline.lua +++ b/common/neovim/lua/statusline.lua @@ -1,10 +1,10 @@ --- TODO: make override-able -vim.g.status_line_max_length = 5 +local fn = vim.fn +local api = vim.api +local status_line_max_length = 5 -- TODO: only update this portion when needed instead of every render? - -function StatusLineBufferByNum(bufnum) - local bufinfo = vim.fn.getbufinfo(bufnum) +local status_line_buffer_by_num = function(bufnum) + local bufinfo = fn.getbufinfo(bufnum) local prefix = ' %#InactiveBuffer#' local suffix = '%* ' @@ -13,7 +13,7 @@ function StatusLineBufferByNum(bufnum) suffix = ' %*' end - if bufinfo.hidden == 0 and vim.fn.index(bufinfo.windows, vim.g.statusline_winid) >= 0 then + if bufinfo.hidden == 0 and fn.index(bufinfo.windows, vim.g.statusline_winid) >= 0 then prefix = '%#ActiveBuffer# ' suffix = ' %*' if bufinfo.changed then @@ -22,31 +22,31 @@ function StatusLineBufferByNum(bufnum) end end - return prefix..vim.fn.fnamemodify(vim.fn.bufname(bufnum), ':t')..suffix + return prefix .. fn.fnamemodify(fn.bufname(bufnum), ':t') .. suffix end -function StatusLineBuffers() +local status_line_buffers = function() -- TODO: mark buffers with unsaved changes local active_index = -1 local acc = {} - for _,bufnum in ipairs(vim.api.nvim_list_bufs()) do - local bufinfo = vim.fn.getbufinfo(bufnum) + for _,bufnum in ipairs(api.nvim_list_bufs()) do + local bufinfo = fn.getbufinfo(bufnum) if bufinfo.listed ~= 0 then - local entry = StatusLineBufferByNum(bufnum) + local entry = status_line_buffer_by_num(bufnum) table.insert(acc, entry) - if vim.fn.matchstr(entry, '^%#ActiveBuffer#') then - active_index = vim.fn.index(acc, entry) + if fn.matchstr(entry, '^%#ActiveBuffer#') then + active_index = fn.index(acc, entry) end end end if active_index >= 0 then -- TODO: instead implement this as a wraparound carousel? - local offset = vim.g.status_line_max_length / 2 + local offset = status_line_max_length / 2 local min_buf_num = math.max(0, (active_index - offset)) - local max_buf_num = math.min(#acc - 1, min_buf_num + vim.g.status_line_max_length - 1) - min_buf_num = math.max(0, max_buf_num - vim.g.status_line_max_length + 1) - local buflist = table.concat({unpack(acc, min_buf_num, max_buf_num)}, '') + local max_buf_num = math.min(#acc - 1, min_buf_num + status_line_max_length - 1) + min_buf_num = math.max(0, max_buf_num - status_line_max_length + 1) + local buflist = table.concat({unpack(acc, min_buf_num+1, max_buf_num+1)}, '') local prefix = '' local suffix = '' if min_buf_num > 0 then @@ -55,18 +55,18 @@ function StatusLineBuffers() if max_buf_num < (#acc - 1) then suffix = ' >' end - return prefix..buflist..suffix + return prefix .. buflist .. suffix else return table.concat(acc, '') end end function StatusLine() - return StatusLineBuffers()..'%*%=%c,%l/%L (%p%%)' + return status_line_buffers() .. '%*%=%c,%l/%L (%p%%)' end return { setup=function() - vim.o.statusline = ''..StatusLine() + vim.o.statusline = '%!v:lua.StatusLine()' end } From be04b8aaf064a708d3d182d2f518de22fb564540 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 11:01:15 -0500 Subject: [PATCH 026/103] Colors overhaul --- common/bin/dns-cleaner | 7 + common/bin/dns-deleter | 11 + common/colors/generator/.gitignore | 1 - common/colors/generator/gen.bash | 47 --- common/colors/generator/gen.moon | 20 -- common/colors/generator/schemes/bright.yml | 18 -- common/colors/generator/schemes/donokai.moon | 22 -- common/colors/generator/schemes/donokai.yml | 18 -- .../colors/generator/schemes/donokaiblack.yml | 18 -- common/colors/generator/schemes/holodized.yml | 37 --- common/colors/generator/templates/shell | 250 --------------- common/colors/generator/templates/shell.moon | 255 --------------- common/colors/set-theme.bash | 13 - common/colors/shell | 132 ++++---- common/colors/vconsole | 96 +++--- common/colors/vim | 302 ------------------ common/colors/xresources | 52 --- common/neovim/.gitignore | 1 + common/neovim/init.lua | 54 ++-- common/neovim/lua/keymap.lua | 11 +- common/neovim/lua/lsp.lua | 4 +- common/neovim/lua/options.lua | 50 +-- common/neovim/lua/plugins.lua | 6 +- 23 files changed, 179 insertions(+), 1246 deletions(-) create mode 100755 common/bin/dns-cleaner create mode 100755 common/bin/dns-deleter delete mode 100644 common/colors/generator/.gitignore delete mode 100755 common/colors/generator/gen.bash delete mode 100755 common/colors/generator/gen.moon delete mode 100644 common/colors/generator/schemes/bright.yml delete mode 100644 common/colors/generator/schemes/donokai.moon delete mode 100644 common/colors/generator/schemes/donokai.yml delete mode 100644 common/colors/generator/schemes/donokaiblack.yml delete mode 100644 common/colors/generator/schemes/holodized.yml delete mode 100755 common/colors/generator/templates/shell delete mode 100644 common/colors/generator/templates/shell.moon delete mode 100755 common/colors/set-theme.bash delete mode 100644 common/colors/vim delete mode 100644 common/colors/xresources diff --git a/common/bin/dns-cleaner b/common/bin/dns-cleaner new file mode 100755 index 0000000..442b141 --- /dev/null +++ b/common/bin/dns-cleaner @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -x -e +API="https://api.netlify.com/api/v1" +TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" +URL="$API/dns_zones/lyte_dev/dns_records?access_token=$TOKEN" +curl -sL "$URL" > /tmp/zone.json diff --git a/common/bin/dns-deleter b/common/bin/dns-deleter new file mode 100755 index 0000000..953fef1 --- /dev/null +++ b/common/bin/dns-deleter @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +API="https://api.netlify.com/api/v1" +TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" +while read -r l; do + set -x -e + ID="$(echo $l | awk '{print $2}')" + URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" + curl -X DELETE -sL "$URL" & +done +wait diff --git a/common/colors/generator/.gitignore b/common/colors/generator/.gitignore deleted file mode 100644 index 22d0d82..0000000 --- a/common/colors/generator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/common/colors/generator/gen.bash b/common/colors/generator/gen.bash deleted file mode 100755 index df3acf4..0000000 --- a/common/colors/generator/gen.bash +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -SCHEME="donokai" -TYPE="dark" - -# v=$(ruby --version) - -if [[ $? -eq 0 ]]; then - if [[ -n $1 ]]; then SCHEME=$1; fi - if [[ -n $2 ]]; then TYPE=$2; fi - - DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd) - - mkdir -p "$DIR/vendor" - - B16_DIR="$DIR/vendor/base16-builder" - COLORS_PATH="$B16_DIR/output" - - if [ -d "$B16_DIR" ]; then - echo "Skipping repo pull down..." - rm -rf "$COLORS_PATH" - mkdir -p "$COLORS_PATH" - else - git clone https://github.com/lytedev/base16-builder.git "$DIR/vendor/base16-builder" - fi - - "$DIR/vendor/base16-builder/base16" -t vim -s "$DIR/schemes/$SCHEME.yml" - "$DIR/vendor/base16-builder/base16" -t vconsole -s "$DIR/schemes/$SCHEME.yml" - "$DIR/vendor/base16-builder/base16" -t xresources -s "$DIR/schemes/$SCHEME.yml" - "$DIR/vendor/base16-builder/base16" -t shell -s "$DIR/schemes/$SCHEME.yml" - - # replace existing color files - rm -f "$DIR/../shell" - rm -f "$DIR/../vconsole" - rm -f "$DIR/../vim" - rm -f "$DIR/../xresources" - cp "$COLORS_PATH/xresources/base16-$SCHEME.$TYPE.xresources" "$DIR/../xresources" - cp "$COLORS_PATH/vconsole/base16-$SCHEME.$TYPE.sh" "$DIR/../vconsole" - cp "$COLORS_PATH/vim/base16-$SCHEME.vim" "$DIR/../vim" - cp "$COLORS_PATH/shell/base16-$SCHEME.$TYPE.sh" "$DIR/../shell" - chmod +x "$DIR/../shell" - chmod +x "$DIR/../vconsole" - - echo "Colors have been regenerated. You will need to re-link them." -else - echo "Ruby isn't installed." -fi diff --git a/common/colors/generator/gen.moon b/common/colors/generator/gen.moon deleted file mode 100755 index 0a3a826..0000000 --- a/common/colors/generator/gen.moon +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env moon - -scheme_file = "donokai" -template_file = [ - "shell" -] - -scheme = require(scheme_file)! - -scheme.meta = scheme.meta || {} -scheme.meta.author = scheme.meta.author || "Unknown Author" -scheme.meta.name = scheme.meta.name || "Unnamed Color Scheme" - -for f in template_files - template_data = require(t)! - - colors = scheme.colors - if "function" == type template_data.color_map - colors = {template_data.color_map(k, v) for k, v in pairs(colors)} - diff --git a/common/colors/generator/schemes/bright.yml b/common/colors/generator/schemes/bright.yml deleted file mode 100644 index bfe73eb..0000000 --- a/common/colors/generator/schemes/bright.yml +++ /dev/null @@ -1,18 +0,0 @@ -scheme: "Bright" -author: "Chris Kempson (http://chriskempson.com)" -base00: "111111" -base01: "303030" -base02: "505050" -base03: "b0b0b0" -base04: "d0d0d0" -base05: "e0e0e0" -base06: "f5f5f5" -base07: "ffffff" -base08: "fb0120" -base09: "fc6d24" -base0A: "fda331" -base0B: "a1c659" -base0C: "76c7b7" -base0D: "6fb3d2" -base0E: "d381c3" -base0F: "be643c" diff --git a/common/colors/generator/schemes/donokai.moon b/common/colors/generator/schemes/donokai.moon deleted file mode 100644 index 0891293..0000000 --- a/common/colors/generator/schemes/donokai.moon +++ /dev/null @@ -1,22 +0,0 @@ -=> - meta: - name: "Donokai" - author: "Daniel Flanagan (https://lyte.dev)" - - colors: - base00: "111111" -- background, dark grey - base01: "383830" -- lighter grey - base02: "49483e" -- lighter grey - base03: "75715e" -- pale-ish yellow - base04: "a59f85" -- lighter peuce - base05: "f8f8f2" -- foreground white - base06: "f5f4f1" -- foreground 2 white - base07: "f9f8f5" -- foreground 3 white - base08: "f92672" -- magenta - base09: "fd971f" -- orange - base0A: "f4bf75" -- yellow - base0B: "a6e22e" -- green - base0C: "a1efe4" -- cyan - base0D: "66d9ef" -- blue - base0E: "ae81ff" -- purple - base0F: "cc6633" -- pale orange diff --git a/common/colors/generator/schemes/donokai.yml b/common/colors/generator/schemes/donokai.yml deleted file mode 100644 index b88099d..0000000 --- a/common/colors/generator/schemes/donokai.yml +++ /dev/null @@ -1,18 +0,0 @@ -scheme: "Donokai" -author: "Daniel Flanagan(https://lytedev.io)" -base00: "111111" # background, dark grey -base01: "383830" # lighter grey -base02: "49483e" # lighter grey -base03: "75715e" # pale-ish yellow -base04: "a59f85" # lighter peuce -base05: "f8f8f2" # foreground white -base06: "f5f4f1" # foreground 2 white -base07: "f9f8f5" # foreground 3 white -base08: "f92672" # magenta -base09: "fd971f" # orange -base0A: "f4bf75" # yellow -base0B: "a6e22e" # green -base0C: "a1efe4" # cyan -base0D: "66d9ef" # blue -base0E: "ae81ff" # purple -base0F: "cc6633" # pale orange diff --git a/common/colors/generator/schemes/donokaiblack.yml b/common/colors/generator/schemes/donokaiblack.yml deleted file mode 100644 index 8a16901..0000000 --- a/common/colors/generator/schemes/donokaiblack.yml +++ /dev/null @@ -1,18 +0,0 @@ -scheme: "Donokai-BLACK" -author: "Daniel Flanagan(https://lytedev.io)" -base00: "000000" # background, dark grey -base01: "383830" # lighter grey -base02: "49483e" # lighter grey -base03: "75715e" # pale-ish yellow -base04: "a59f85" # lighter peuce -base05: "f8f8f2" # foreground white -base06: "f5f4f1" # foreground 2 white -base07: "f9f8f5" # foreground 3 white -base08: "f92672" # magenta -base09: "fd971f" # orange -base0A: "f4bf75" # yellow -base0B: "a6e22e" # green -base0C: "a1efe4" # cyan -base0D: "66d9ef" # blue -base0E: "ae81ff" # purple -base0F: "cc6633" # pale orange diff --git a/common/colors/generator/schemes/holodized.yml b/common/colors/generator/schemes/holodized.yml deleted file mode 100644 index dc8fc1e..0000000 --- a/common/colors/generator/schemes/holodized.yml +++ /dev/null @@ -1,37 +0,0 @@ -scheme: "Holodized" -author: "Daniel Flanagan(https://lytedev.io)" -base00: "eeeeee" # background, light cream -base01: "ddd6c3" # darker cream -base02: "ada693" # darker cream -base03: "8d8673" # pale-ish yellow -base04: "554f45" # darker peuce -base05: "111111" # foreground dark grey -base06: "555555" # foreground 2 dark grey -base07: "888888" # foreground 3 dark grey -base08: "990833" # magenta -base09: "8d370f" # orange -base0A: "947010" # yellow -base0B: "06623e" # green -base0C: "006677" # cyan -base0D: "004488" # blue -base0E: "4e117f" # purple -base0F: "883311" # pale orange - -# scheme: "Holodized" -# author: "Daniel Flanagan @lytedev (modified Solarized Light)" -# base00: "fdf6e3" -# base01: "eee8d5" -# base02: "93a1a1" -# base03: "839496" -# base04: "657b83" -# base05: "111111" -# base06: "073642" -# base07: "002b36" -# base08: "8c220f" -# base09: "8b2b06" -# base0A: "b58900" -# base0B: "859900" -# base0C: "2aa198" -# base0D: "268bd2" -# base0E: "6c71c4" -# base0F: "d33682" diff --git a/common/colors/generator/templates/shell b/common/colors/generator/templates/shell deleted file mode 100755 index b9d353c..0000000 --- a/common/colors/generator/templates/shell +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/sh -# Base16 <%= @.scheme %> - Shell color setup script -# <%= @author %> - -if [ "${TERM%%-*}" = 'linux' ]; then - # This script doesn't support linux console (use 'vconsole' template instead) - return 2>/dev/null || exit 0 -fi - -color00="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00 - Black -color01="<%= split_by_slash(@base["08"]["hex"]) %>" # Base 08 - Red -color02="<%= split_by_slash(@base["0B"]["hex"]) %>" # Base 0B - Green -color03="<%= split_by_slash(@base["0A"]["hex"]) %>" # Base 0A - Yellow -color04="<%= split_by_slash(@base["0D"]["hex"]) %>" # Base 0D - Blue -color05="<%= split_by_slash(@base["0E"]["hex"]) %>" # Base 0E - Magenta -color06="<%= split_by_slash(@base["0C"]["hex"]) %>" # Base 0C - Cyan -color07="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 - White -color08="<%= split_by_slash(@base["03"]["hex"]) %>" # Base 03 - Bright Black -color09=$color01 # Base 08 - Bright Red -color10=$color02 # Base 0B - Bright Green -color11=$color03 # Base 0A - Bright Yellow -color12=$color04 # Base 0D - Bright Blue -color13=$color05 # Base 0E - Bright Magenta -color14=$color06 # Base 0C - Bright Cyan -color15="<%= split_by_slash(@base["07"]["hex"]) %>" # Base 07 - Bright White -color16="<%= split_by_slash(@base["09"]["hex"]) %>" # Base 09 -color17="<%= split_by_slash(@base["0F"]["hex"]) %>" # Base 0F -color18="<%= split_by_slash(@base["01"]["hex"]) %>" # Base 01 -color19="<%= split_by_slash(@base["02"]["hex"]) %>" # Base 02 -color20="<%= split_by_slash(@base["04"]["hex"]) %>" # Base 04 -color21="<%= split_by_slash(@base["06"]["hex"]) %>" # Base 06 -color_foreground="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 -color_background="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00 -color_cursor="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 - -if [ -n "$TMUX" ]; then - # tell tmux to pass the escape sequences through - # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) - printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\" -elif [ "${TERM%%-*}" = "screen" ]; then - # GNU screen (screen, screen-256color, screen-256color-bce) - printf_template="\033P\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033P\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033P\033]%s%s\007\033\\" -elif [[ $- != *i* ]]; then - # non-interactive - alias printf=/bin/false -else - printf_template="\033]4;%d;rgb:%s\033\\" - printf_template_var="\033]%d;rgb:%s\033\\" - printf_template_custom="\033]%s%s\033\\" -fi - -# 16 color space -printf $printf_template 0 $color00 -printf $printf_template 1 $color01 -printf $printf_template 2 $color02 -printf $printf_template 3 $color03 -printf $printf_template 4 $color04 -printf $printf_template 5 $color05 -printf $printf_template 6 $color06 -printf $printf_template 7 $color07 -printf $printf_template 8 $color08 -printf $printf_template 9 $color09 -printf $printf_template 10 $color10 -printf $printf_template 11 $color11 -printf $printf_template 12 $color12 -printf $printf_template 13 $color13 -printf $printf_template 14 $color14 -printf $printf_template 15 $color15 - -# 256 color space -printf $printf_template 16 $color16 -printf $printf_template 17 $color17 -printf $printf_template 18 $color18 -printf $printf_template 19 $color19 -printf $printf_template 20 $color20 -printf $printf_template 21 $color21 - -# foreground / background / cursor color -if [ -n "$ITERM_SESSION_ID" ]; then - # iTerm2 proprietary escape codes - printf $printf_template_custom Pg <%= @base["05"]["hex"] %> # forground - printf $printf_template_custom Ph <%= @base["00"]["hex"] %> # background - printf $printf_template_custom Pi <%= @base["05"]["hex"] %> # bold color - printf $printf_template_custom Pj <%= @base["02"]["hex"] %> # selection color - printf $printf_template_custom Pk <%= @base["05"]["hex"] %> # selected text color - printf $printf_template_custom Pl <%= @base["05"]["hex"] %> # cursor - printf $printf_template_custom Pm <%= @base["00"]["hex"] %> # cursor text -else - printf $printf_template_var 10 $color_foreground - printf $printf_template_var 11 $color_background - printf $printf_template_custom 12 ";7" # cursor (reverse video) -fi - -# clean up -unset printf_template -unset printf_template_var -unset color00 -unset color01 -unset color02 -unset color03 -unset color04 -unset color05 -unset color06 -unset color07 -unset color08 -unset color09 -unset color10 -unset color11 -unset color12 -unset color13 -unset color14 -unset color15 -unset color16 -unset color17 -unset color18 -unset color19 -unset color20 -unset color21 -unset color_foreground -unset color_background -unset color_cursor -#!/bin/sh -# Base16 Donokai - Shell color setup script -# Daniel Flanagan(https://lytedev.io) - -if [ "${TERM%%-*}" = 'linux' ]; then - # This script doesn't support linux console (use 'vconsole' template instead) - return 2>/dev/null || exit 0 -fi - -color00="11/11/11" # Base 00 - Black -color01="f9/26/72" # Base 08 - Red -color02="a6/e2/2e" # Base 0B - Green -color03="f4/bf/75" # Base 0A - Yellow -color04="66/d9/ef" # Base 0D - Blue -color05="ae/81/ff" # Base 0E - Magenta -color06="a1/ef/e4" # Base 0C - Cyan -color07="f8/f8/f2" # Base 05 - White -color08="75/71/5e" # Base 03 - Bright Black -color09=$color01 # Base 08 - Bright Red -color10=$color02 # Base 0B - Bright Green -color11=$color03 # Base 0A - Bright Yellow -color12=$color04 # Base 0D - Bright Blue -color13=$color05 # Base 0E - Bright Magenta -color14=$color06 # Base 0C - Bright Cyan -color15="f9/f8/f5" # Base 07 - Bright White -color16="fd/97/1f" # Base 09 -color17="cc/66/33" # Base 0F -color18="38/38/30" # Base 01 -color19="49/48/3e" # Base 02 -color20="a5/9f/85" # Base 04 -color21="f5/f4/f1" # Base 06 -color_foreground="f8/f8/f2" # Base 05 -color_background="11/11/11" # Base 00 -color_cursor="f8/f8/f2" # Base 05 - -if [ -n "$TMUX" ]; then - # tell tmux to pass the escape sequences through - # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) - printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\" -elif [ "${TERM%%-*}" = "screen" ]; then - # GNU screen (screen, screen-256color, screen-256color-bce) - printf_template="\033P\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033P\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033P\033]%s%s\007\033\\" -elif [[ $- != *i* ]]; then - # non-interactive - alias printf=/bin/false -else - printf_template="\033]4;%d;rgb:%s\033\\" - printf_template_var="\033]%d;rgb:%s\033\\" - printf_template_custom="\033]%s%s\033\\" -fi - -# 16 color space -printf $printf_template 0 $color00 -printf $printf_template 1 $color01 -printf $printf_template 2 $color02 -printf $printf_template 3 $color03 -printf $printf_template 4 $color04 -printf $printf_template 5 $color05 -printf $printf_template 6 $color06 -printf $printf_template 7 $color07 -printf $printf_template 8 $color08 -printf $printf_template 9 $color09 -printf $printf_template 10 $color10 -printf $printf_template 11 $color11 -printf $printf_template 12 $color12 -printf $printf_template 13 $color13 -printf $printf_template 14 $color14 -printf $printf_template 15 $color15 - -# 256 color space -printf $printf_template 16 $color16 -printf $printf_template 17 $color17 -printf $printf_template 18 $color18 -printf $printf_template 19 $color19 -printf $printf_template 20 $color20 -printf $printf_template 21 $color21 - -# foreground / background / cursor color -if [ -n "$ITERM_SESSION_ID" ]; then - # iTerm2 proprietary escape codes - printf $printf_template_custom Pg f8f8f2 # forground - printf $printf_template_custom Ph 111111 # background - printf $printf_template_custom Pi f8f8f2 # bold color - printf $printf_template_custom Pj 49483e # selection color - printf $printf_template_custom Pk f8f8f2 # selected text color - printf $printf_template_custom Pl f8f8f2 # cursor - printf $printf_template_custom Pm 111111 # cursor text -else - printf $printf_template_var 10 $color_foreground - printf $printf_template_var 11 $color_background - printf $printf_template_custom 12 ";7" # cursor (reverse video) -fi - -# clean up -unset printf_template -unset printf_template_var -unset color00 -unset color01 -unset color02 -unset color03 -unset color04 -unset color05 -unset color06 -unset color07 -unset color08 -unset color09 -unset color10 -unset color11 -unset color12 -unset color13 -unset color14 -unset color15 -unset color16 -unset color17 -unset color18 -unset color19 -unset color20 -unset color21 -unset color_foreground -unset color_background -unset color_cursor diff --git a/common/colors/generator/templates/shell.moon b/common/colors/generator/templates/shell.moon deleted file mode 100644 index f8e6372..0000000 --- a/common/colors/generator/templates/shell.moon +++ /dev/null @@ -1,255 +0,0 @@ -=> - color_map: (k, v) -> - r, g, b = v\match "(%d%d)(%d%d)(%d%d)" - k, "#{r}/#{g}/#{b}" - - content: [===[#!/bin/sh -# #{@.meta.name} by #{@.meta.author} %> - -if [ "${TERM%%-*}" = 'linux' ]; then - # This script doesn't support linux console (use 'vconsole' template instead) - return 2>/dev/null || exit 0 -fi - -color00="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00 - Black -color01="<%= split_by_slash(@base["08"]["hex"]) %>" # Base 08 - Red -color02="<%= split_by_slash(@base["0B"]["hex"]) %>" # Base 0B - Green -color03="<%= split_by_slash(@base["0A"]["hex"]) %>" # Base 0A - Yellow -color04="<%= split_by_slash(@base["0D"]["hex"]) %>" # Base 0D - Blue -color05="<%= split_by_slash(@base["0E"]["hex"]) %>" # Base 0E - Magenta -color06="<%= split_by_slash(@base["0C"]["hex"]) %>" # Base 0C - Cyan -color07="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 - White -color08="<%= split_by_slash(@base["03"]["hex"]) %>" # Base 03 - Bright Black -color09=$color01 # Base 08 - Bright Red -color10=$color02 # Base 0B - Bright Green -color11=$color03 # Base 0A - Bright Yellow -color12=$color04 # Base 0D - Bright Blue -color13=$color05 # Base 0E - Bright Magenta -color14=$color06 # Base 0C - Bright Cyan -color15="<%= split_by_slash(@base["07"]["hex"]) %>" # Base 07 - Bright White -color16="<%= split_by_slash(@base["09"]["hex"]) %>" # Base 09 -color17="<%= split_by_slash(@base["0F"]["hex"]) %>" # Base 0F -color18="<%= split_by_slash(@base["01"]["hex"]) %>" # Base 01 -color19="<%= split_by_slash(@base["02"]["hex"]) %>" # Base 02 -color20="<%= split_by_slash(@base["04"]["hex"]) %>" # Base 04 -color21="<%= split_by_slash(@base["06"]["hex"]) %>" # Base 06 -color_foreground="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 -color_background="<%= split_by_slash(@base["00"]["hex"]) %>" # Base 00 -color_cursor="<%= split_by_slash(@base["05"]["hex"]) %>" # Base 05 - -if [ -n "$TMUX" ]; then - # tell tmux to pass the escape sequences through - # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) - printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\" -elif [ "${TERM%%-*}" = "screen" ]; then - # GNU screen (screen, screen-256color, screen-256color-bce) - printf_template="\033P\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033P\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033P\033]%s%s\007\033\\" -elif [[ $- != *i* ]]; then - # non-interactive - alias printf=/bin/false -else - printf_template="\033]4;%d;rgb:%s\033\\" - printf_template_var="\033]%d;rgb:%s\033\\" - printf_template_custom="\033]%s%s\033\\" -fi - -# 16 color space -printf $printf_template 0 $color00 -printf $printf_template 1 $color01 -printf $printf_template 2 $color02 -printf $printf_template 3 $color03 -printf $printf_template 4 $color04 -printf $printf_template 5 $color05 -printf $printf_template 6 $color06 -printf $printf_template 7 $color07 -printf $printf_template 8 $color08 -printf $printf_template 9 $color09 -printf $printf_template 10 $color10 -printf $printf_template 11 $color11 -printf $printf_template 12 $color12 -printf $printf_template 13 $color13 -printf $printf_template 14 $color14 -printf $printf_template 15 $color15 - -# 256 color space -printf $printf_template 16 $color16 -printf $printf_template 17 $color17 -printf $printf_template 18 $color18 -printf $printf_template 19 $color19 -printf $printf_template 20 $color20 -printf $printf_template 21 $color21 - -# foreground / background / cursor color -if [ -n "$ITERM_SESSION_ID" ]; then - # iTerm2 proprietary escape codes - printf $printf_template_custom Pg <%= @base["05"]["hex"] %> # forground - printf $printf_template_custom Ph <%= @base["00"]["hex"] %> # background - printf $printf_template_custom Pi <%= @base["05"]["hex"] %> # bold color - printf $printf_template_custom Pj <%= @base["02"]["hex"] %> # selection color - printf $printf_template_custom Pk <%= @base["05"]["hex"] %> # selected text color - printf $printf_template_custom Pl <%= @base["05"]["hex"] %> # cursor - printf $printf_template_custom Pm <%= @base["00"]["hex"] %> # cursor text -else - printf $printf_template_var 10 $color_foreground - printf $printf_template_var 11 $color_background - printf $printf_template_custom 12 ";7" # cursor (reverse video) -fi - -# clean up -unset printf_template -unset printf_template_var -unset color00 -unset color01 -unset color02 -unset color03 -unset color04 -unset color05 -unset color06 -unset color07 -unset color08 -unset color09 -unset color10 -unset color11 -unset color12 -unset color13 -unset color14 -unset color15 -unset color16 -unset color17 -unset color18 -unset color19 -unset color20 -unset color21 -unset color_foreground -unset color_background -unset color_cursor -#!/bin/sh -# Base16 Donokai - Shell color setup script -# Daniel Flanagan(https://lytedev.io) - -if [ "${TERM%%-*}" = 'linux' ]; then - # This script doesn't support linux console (use 'vconsole' template instead) - return 2>/dev/null || exit 0 -fi - -color00="11/11/11" # Base 00 - Black -color01="f9/26/72" # Base 08 - Red -color02="a6/e2/2e" # Base 0B - Green -color03="f4/bf/75" # Base 0A - Yellow -color04="66/d9/ef" # Base 0D - Blue -color05="ae/81/ff" # Base 0E - Magenta -color06="a1/ef/e4" # Base 0C - Cyan -color07="f8/f8/f2" # Base 05 - White -color08="75/71/5e" # Base 03 - Bright Black -color09=$color01 # Base 08 - Bright Red -color10=$color02 # Base 0B - Bright Green -color11=$color03 # Base 0A - Bright Yellow -color12=$color04 # Base 0D - Bright Blue -color13=$color05 # Base 0E - Bright Magenta -color14=$color06 # Base 0C - Bright Cyan -color15="f9/f8/f5" # Base 07 - Bright White -color16="fd/97/1f" # Base 09 -color17="cc/66/33" # Base 0F -color18="38/38/30" # Base 01 -color19="49/48/3e" # Base 02 -color20="a5/9f/85" # Base 04 -color21="f5/f4/f1" # Base 06 -color_foreground="f8/f8/f2" # Base 05 -color_background="11/11/11" # Base 00 -color_cursor="f8/f8/f2" # Base 05 - -if [ -n "$TMUX" ]; then - # tell tmux to pass the escape sequences through - # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) - printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\" -elif [ "${TERM%%-*}" = "screen" ]; then - # GNU screen (screen, screen-256color, screen-256color-bce) - printf_template="\033P\033]4;%d;rgb:%s\007\033\\" - printf_template_var="\033P\033]%d;rgb:%s\007\033\\" - printf_template_custom="\033P\033]%s%s\007\033\\" -elif [[ $- != *i* ]]; then - # non-interactive - alias printf=/bin/false -else - printf_template="\033]4;%d;rgb:%s\033\\" - printf_template_var="\033]%d;rgb:%s\033\\" - printf_template_custom="\033]%s%s\033\\" -fi - -# 16 color space -printf $printf_template 0 $color00 -printf $printf_template 1 $color01 -printf $printf_template 2 $color02 -printf $printf_template 3 $color03 -printf $printf_template 4 $color04 -printf $printf_template 5 $color05 -printf $printf_template 6 $color06 -printf $printf_template 7 $color07 -printf $printf_template 8 $color08 -printf $printf_template 9 $color09 -printf $printf_template 10 $color10 -printf $printf_template 11 $color11 -printf $printf_template 12 $color12 -printf $printf_template 13 $color13 -printf $printf_template 14 $color14 -printf $printf_template 15 $color15 - -# 256 color space -printf $printf_template 16 $color16 -printf $printf_template 17 $color17 -printf $printf_template 18 $color18 -printf $printf_template 19 $color19 -printf $printf_template 20 $color20 -printf $printf_template 21 $color21 - -# foreground / background / cursor color -if [ -n "$ITERM_SESSION_ID" ]; then - # iTerm2 proprietary escape codes - printf $printf_template_custom Pg f8f8f2 # forground - printf $printf_template_custom Ph 111111 # background - printf $printf_template_custom Pi f8f8f2 # bold color - printf $printf_template_custom Pj 49483e # selection color - printf $printf_template_custom Pk f8f8f2 # selected text color - printf $printf_template_custom Pl f8f8f2 # cursor - printf $printf_template_custom Pm 111111 # cursor text -else - printf $printf_template_var 10 $color_foreground - printf $printf_template_var 11 $color_background - printf $printf_template_custom 12 ";7" # cursor (reverse video) -fi - -# clean up -unset printf_template -unset printf_template_var -unset color00 -unset color01 -unset color02 -unset color03 -unset color04 -unset color05 -unset color06 -unset color07 -unset color08 -unset color09 -unset color10 -unset color11 -unset color12 -unset color13 -unset color14 -unset color15 -unset color16 -unset color17 -unset color18 -unset color19 -unset color20 -unset color21 -unset color_foreground -unset color_background -unset color_cursor -]===] diff --git a/common/colors/set-theme.bash b/common/colors/set-theme.bash deleted file mode 100755 index 1fd3de9..0000000 --- a/common/colors/set-theme.bash +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd) - -THEME="$1" - -echo "$THEME" - -"$DIR/generator/gen.bash" "$THEME" -"$DOTFILES_PATH/apps/de/x/loadresources" -resrc -restartbar -# TODO: set GTK theme to "Arc-Dark" or "Arc-Light" diff --git a/common/colors/shell b/common/colors/shell index ebeb6fc..889f8fb 100755 --- a/common/colors/shell +++ b/common/colors/shell @@ -1,37 +1,27 @@ #!/bin/sh -# Base16 Donokai - Shell color setup script -# Daniel Flanagan(https://lytedev.io) if [ "${TERM%%-*}" = 'linux' ]; then - # This script doesn't support linux console (use 'vconsole' template instead) - return 2>/dev/null || exit 0 + return 2>/dev/null || exit 0 fi -color00="11/11/11" # Base 00 - Black -color01="f9/26/72" # Base 08 - Red -color02="a6/e2/2e" # Base 0B - Green -color03="f4/bf/75" # Base 0A - Yellow -color04="66/d9/ef" # Base 0D - Blue -color05="ae/81/ff" # Base 0E - Magenta -color06="a1/ef/e4" # Base 0C - Cyan -color07="f8/f8/f2" # Base 05 - White -color08="75/71/5e" # Base 03 - Bright Black -color09=$color01 # Base 08 - Bright Red -color10=$color02 # Base 0B - Bright Green -color11=$color03 # Base 0A - Bright Yellow -color12=$color04 # Base 0D - Bright Blue -color13=$color05 # Base 0E - Bright Magenta -color14=$color06 # Base 0C - Bright Cyan -color15="f9/f8/f5" # Base 07 - Bright White +black="11/11/11" +red="f9/26/72" +green="a6/e2/2e" +yellow="f4/bf/75" +blue="66/d9/ef" +magenta="ae/81/ff" +cyan="a1/ef/e4" +white="cccccc" +black2="75/71/5e" +white2="f8/f8/f8" + +# TODO: name these? color16="fd/97/1f" # Base 09 color17="cc/66/33" # Base 0F color18="38/38/30" # Base 01 color19="49/48/3e" # Base 02 color20="a5/9f/85" # Base 04 color21="f5/f4/f1" # Base 06 -color_foreground="f8/f8/f2" # Base 05 -color_background="11/11/11" # Base 00 -color_cursor="f8/f8/f2" # Base 05 if [ -n "$TMUX" ]; then # tell tmux to pass the escape sequences through @@ -53,33 +43,36 @@ else printf_template_custom="\033]%s%s\033\\" fi -# 16 color space -printf $printf_template 0 $color00 -printf $printf_template 1 $color01 -printf $printf_template 2 $color02 -printf $printf_template 3 $color03 -printf $printf_template 4 $color04 -printf $printf_template 5 $color05 -printf $printf_template 6 $color06 -printf $printf_template 7 $color07 -printf $printf_template 8 $color08 -printf $printf_template 9 $color09 -printf $printf_template 10 $color10 -printf $printf_template 11 $color11 -printf $printf_template 12 $color12 -printf $printf_template 13 $color13 -printf $printf_template 14 $color14 -printf $printf_template 15 $color15 +c() { + t="${1}"; shift + c="${1}"; shift + for n in "$@"; do + printf "$t" "$n" "$c" + done +} -# 256 color space -printf $printf_template 16 $color16 -printf $printf_template 17 $color17 -printf $printf_template 18 $color18 -printf $printf_template 19 $color19 -printf $printf_template 20 $color20 -printf $printf_template 21 $color21 +ct() { c "$printf_template" "$@"; } +cv() { c "$printf_template" "$@"; } +cc() { c "$printf_template" "$@"; } + +ct $black 0 +ct $red 1 9 +ct $green 2 10 +ct $yellow 3 11 +ct $blue 4 12 +ct $magenta 5 13 +ct $cyan 6 14 +ct $white 7 10 +ct $black2 8 +ct $white2 15 + +ct $color16 16 +ct $color17 17 +ct $color18 18 +ct $color19 19 +ct $color20 20 +ct $color21 21 -# foreground / background / cursor color if [ -n "$ITERM_SESSION_ID" ]; then # iTerm2 proprietary escape codes printf $printf_template_custom Pg f8f8f2 # forground @@ -90,36 +83,33 @@ if [ -n "$ITERM_SESSION_ID" ]; then printf $printf_template_custom Pl f8f8f2 # cursor printf $printf_template_custom Pm 111111 # cursor text else - printf $printf_template_var 10 $color_foreground - printf $printf_template_var 11 $color_background - printf $printf_template_custom 12 ";7" # cursor (reverse video) + cv $white 10 + cv $black 11 + cc ";7" 12 fi -# clean up +unset -f c +unset -f ct +unset -f cv +unset -f cc + +unset black +unset red +unset green +unset yellow +unset blue +unset magenta +unset cyan +unset white +unset black2 +unset white2 + unset printf_template unset printf_template_var -unset color00 -unset color01 -unset color02 -unset color03 -unset color04 -unset color05 -unset color06 -unset color07 -unset color08 -unset color09 -unset color10 -unset color11 -unset color12 -unset color13 -unset color14 -unset color15 +unset printf_template_custom unset color16 unset color17 unset color18 unset color19 unset color20 unset color21 -unset color_foreground -unset color_background -unset color_cursor diff --git a/common/colors/vconsole b/common/colors/vconsole index f742227..02e23c1 100755 --- a/common/colors/vconsole +++ b/common/colors/vconsole @@ -1,62 +1,48 @@ #!/bin/sh -# Base16 Donokai - Virtual console color setup script -# Daniel Flanagan(https://lytedev.io) -color00="111111" # Base 00 - Black -color01="f92672" # Base 08 - Red -color02="a6e22e" # Base 0B - Green -color03="f4bf75" # Base 0A - Yellow -color04="66d9ef" # Base 0D - Blue -color05="ae81ff" # Base 0E - Magenta -color06="a1efe4" # Base 0C - Cyan -color07="f8f8f2" # Base 05 - White -color08="75715e" # Base 03 - Bright Black -color09=$color01 # Base 08 - Bright Red -color10=$color02 # Base 0B - Bright Green -color11=$color03 # Base 0A - Bright Yellow -color12=$color04 # Base 0D - Bright Blue -color13=$color05 # Base 0E - Bright Magenta -color14=$color06 # Base 0C - Bright Cyan -color15="f9f8f5" # Base 07 - Bright White +black="111111" # black +red="f92672" # red +green="a6e22e" # green +yellow="f4bf75" # yellow +blue="66d9ef" # blue +magenta="ae81ff" # magenta +cyan="a1efe4" # cyan +white="cccccc" # white +black2="75715e" # black +white2="f8f8f8" # white -# 16 color space -echo -e "\e]P0$color00" -echo -e "\e]P1$color01" -echo -e "\e]P2$color02" -echo -e "\e]P3$color03" -echo -e "\e]P4$color04" -echo -e "\e]P5$color05" -echo -e "\e]P6$color06" -echo -e "\e]P7$color07" -echo -e "\e]P8$color08" -echo -e "\e]P9$color09" -echo -e "\e]PA$color10" -echo -e "\e]PB$color11" -echo -e "\e]PC$color12" -echo -e "\e]PD$color13" -echo -e "\e]PE$color14" -echo -e "\e]PF$color15" -if [ -x /sbin/clear ]; then +c() { + c="${1}"; shift + for n in "$@"; do + echo -e "\e]P${n}${c}"; + done +} + +c $black 0 +c $red 1 9 +c $green 2 A +c $yellow 3 B +c $blue 4 C +c $magenta 5 D +c $cyan 6 E +c $white 7 +c $black2 8 +c $white2 F + +if [ -x /sbin/clear ]; then /sbin/clear else - echo -e "\e[H" - echo -e "\e[2J" + echo -e "\e[H\e[2J" fi -# clean up -unset color00 -unset color01 -unset color02 -unset color03 -unset color04 -unset color05 -unset color06 -unset color07 -unset color08 -unset color09 -unset color10 -unset color11 -unset color12 -unset color13 -unset color14 -unset color15 +unset -f c +unset black +unset red +unset green +unset yellow +unset blue +unset magenta +unset cyan +unset white +unset black2 +unset white2 diff --git a/common/colors/vim b/common/colors/vim deleted file mode 100644 index f05d312..0000000 --- a/common/colors/vim +++ /dev/null @@ -1,302 +0,0 @@ -let s:gui00 = "111111" -let s:gui01 = "383830" -let s:gui02 = "49483e" -let s:gui03 = "75715e" -let s:gui04 = "a59f85" -let s:gui05 = "f8f8f2" -let s:gui06 = "f5f4f1" -let s:gui07 = "f9f8f5" -let s:gui08 = "f92672" -let s:gui09 = "fd971f" -let s:gui0A = "f4bf75" -let s:gui0B = "a6e22e" -let s:gui0C = "a1efe4" -let s:gui0D = "66d9ef" -let s:gui0E = "ae81ff" -let s:gui0F = "cc6633" - -" Terminal color definitions -let s:cterm00 = "00" -let s:cterm03 = "08" -let s:cterm05 = "07" -let s:cterm07 = "15" -let s:cterm08 = "01" -let s:cterm0A = "03" -let s:cterm0B = "02" -let s:cterm0C = "06" -let s:cterm0D = "04" -let s:cterm0E = "05" -if exists('base16colorspace') && base16colorspace == "256" - let s:cterm01 = "18" - let s:cterm02 = "19" - let s:cterm04 = "20" - let s:cterm06 = "21" - let s:cterm09 = "16" - let s:cterm0F = "17" -else - let s:cterm01 = "10" - let s:cterm02 = "11" - let s:cterm04 = "12" - let s:cterm06 = "13" - let s:cterm09 = "09" - let s:cterm0F = "14" -endif - -" Theme setup -hi clear -syntax reset -let g:colors_name = "base16-donokai" - -" Highlighting function -fun hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) - if a:guifg != "" - exec "hi " . a:group . " guifg=#" . s:gui(a:guifg) - endif - if a:guibg != "" - exec "hi " . a:group . " guibg=#" . s:gui(a:guibg) - endif - if a:ctermfg != "" - exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg) - endif - if a:ctermbg != "" - exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg) - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr - endif - if a:guisp != "" - exec "hi " . a:group . " guisp=#" . a:guisp - endif -endfun - -" Return GUI color for light/dark variants -fun s:gui(color) - if &background == "dark" - return a:color - endif - - if a:color == s:gui00 - return s:gui07 - elseif a:color == s:gui01 - return s:gui06 - elseif a:color == s:gui02 - return s:gui05 - elseif a:color == s:gui03 - return s:gui04 - elseif a:color == s:gui04 - return s:gui03 - elseif a:color == s:gui05 - return s:gui02 - elseif a:color == s:gui06 - return s:gui01 - elseif a:color == s:gui07 - return s:gui00 - endif - - return a:color -endfun - -" Return terminal color for light/dark variants -fun s:cterm(color) - if &background == "dark" - return a:color - endif - - if a:color == s:cterm00 - return s:cterm07 - elseif a:color == s:cterm01 - return s:cterm06 - elseif a:color == s:cterm02 - return s:cterm05 - elseif a:color == s:cterm03 - return s:cterm04 - elseif a:color == s:cterm04 - return s:cterm03 - elseif a:color == s:cterm05 - return s:cterm02 - elseif a:color == s:cterm06 - return s:cterm01 - elseif a:color == s:cterm07 - return s:cterm00 - endif - - return a:color -endfun - -" Vim editor colors -call hi("Bold", "", "", "", "", "bold", "") -call hi("Debug", s:gui08, "", s:cterm08, "", "", "") -call hi("Directory", s:gui0D, "", s:cterm0D, "", "", "") -call hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "") -call hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") -call hi("Exception", s:gui08, "", s:cterm08, "", "", "") -call hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "") -call hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") -call hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "") -call hi("Italic", "", "", "", "", "none", "") -call hi("Macro", s:gui08, "", s:cterm08, "", "", "") -call hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "", "") -call hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "") -call hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "") -call hi("Question", s:gui0D, "", s:cterm0D, "", "", "") -call hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "") -call hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "") -call hi("TooLong", s:gui08, "", s:cterm08, "", "", "") -call hi("Underlined", s:gui08, "", s:cterm08, "", "", "") -call hi("Visual", "", s:gui02, "", s:cterm02, "", "") -call hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "") -call hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "") -call hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "") -call hi("Title", s:gui0D, "", s:cterm0D, "", "none", "") -call hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") -call hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "") -call hi("NonText", s:gui03, "", s:cterm03, "", "", "") -call hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") -call hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") -call hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") -call hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "") -call hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") -call hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none", "") -call hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "") -call hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "") -call hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "") -call hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") -call hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "") -call hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "") -call hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") -call hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") -call hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "") - -" Standard syntax highlighting -call hi("Boolean", s:gui09, "", s:cterm09, "", "", "") -call hi("Character", s:gui08, "", s:cterm08, "", "", "") -call hi("Comment", s:gui03, "", s:cterm03, "", "", "") -call hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "") -call hi("Constant", s:gui09, "", s:cterm09, "", "", "") -call hi("Define", s:gui0E, "", s:cterm0E, "", "none", "") -call hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "") -call hi("Float", s:gui09, "", s:cterm09, "", "", "") -call hi("Function", s:gui0D, "", s:cterm0D, "", "", "") -call hi("Identifier", s:gui08, "", s:cterm08, "", "none", "") -call hi("Include", s:gui0D, "", s:cterm0D, "", "", "") -call hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "") -call hi("Label", s:gui0A, "", s:cterm0A, "", "", "") -call hi("Number", s:gui09, "", s:cterm09, "", "", "") -call hi("Operator", s:gui05, "", s:cterm05, "", "none", "") -call hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "") -call hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "") -call hi("Special", s:gui0C, "", s:cterm0C, "", "", "") -call hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "") -call hi("Statement", s:gui08, "", s:cterm08, "", "", "") -call hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "") -call hi("String", s:gui0B, "", s:cterm0B, "", "", "") -call hi("Structure", s:gui0E, "", s:cterm0E, "", "", "") -call hi("Tag", s:gui0A, "", s:cterm0A, "", "", "") -call hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "") -call hi("Type", s:gui0A, "", s:cterm0A, "", "none", "") -call hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "") - -" C highlighting -call hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "") -call hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "") - -" C# highlighting -call hi("csClass", s:gui0A, "", s:cterm0A, "", "", "") -call hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "") -call hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "") -call hi("csType", s:gui08, "", s:cterm08, "", "", "") -call hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "") -call hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "") -call hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "") - -" CSS highlighting -call hi("cssBraces", s:gui05, "", s:cterm05, "", "", "") -call hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "") -call hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "") - -" Diff highlighting -call hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") -call hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") -call hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") -call hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") -call hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") -call hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") -call hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") -call hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") -call hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") - -" Git highlighting -call hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "", "") -call hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "", "") - -" GitGutter highlighting -call hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") -call hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") -call hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") -call hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "") - -" HTML highlighting -call hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "") -call hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "") -call hi("htmlEndTag", s:gui05, "", s:cterm05, "", "", "") -call hi("htmlTag", s:gui05, "", s:cterm05, "", "", "") - -" JavaScript highlighting -call hi("javaScript", s:gui05, "", s:cterm05, "", "", "") -call hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "") -call hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "") - -" Markdown highlighting -call hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "") -call hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") -call hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "") -call hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "") - -" NERDTree highlighting -call hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "") -call hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "") - -" PHP highlighting -call hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "") -call hi("phpComparison", s:gui05, "", s:cterm05, "", "", "") -call hi("phpParent", s:gui05, "", s:cterm05, "", "", "") - -" Python highlighting -call hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "") -call hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "") - -" Ruby highlighting -call hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "") -call hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "") -call hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "", "") -call hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "") -call hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "") -call hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "") -call hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "") - -" SASS highlighting -call hi("sassidChar", s:gui08, "", s:cterm08, "", "", "") -call hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "") -call hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "") -call hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "") -call hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "") - -" Signify highlighting -call hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") -call hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") -call hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") - -" Spelling highlighting -call hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08) -call hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C) -call hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D) -call hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E) - -" Remove functions -delf hi -delf gui -delf cterm - -" Remove color variables -unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F -unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F diff --git a/common/colors/xresources b/common/colors/xresources deleted file mode 100644 index c524547..0000000 --- a/common/colors/xresources +++ /dev/null @@ -1,52 +0,0 @@ -! Base16 Donokai -! Scheme: Daniel Flanagan(https://lytedev.io) - -#define base00 #111111 -#define base01 #383830 -#define base02 #49483e -#define base03 #75715e -#define base04 #a59f85 -#define base05 #f8f8f2 -#define base06 #f5f4f1 -#define base07 #f9f8f5 -#define base08 #f92672 -#define base09 #fd971f -#define base0A #f4bf75 -#define base0B #a6e22e -#define base0C #a1efe4 -#define base0D #66d9ef -#define base0E #ae81ff -#define base0F #cc6633 - -*foreground: base05 -*background: base00 -*cursorColor: base05 - -*color0: base00 -*color1: base08 -*color2: base0B -*color3: base0A -*color4: base0D -*color5: base0E -*color6: base0C -*color7: base05 - -*color8: base03 -*color9: base09 -*color10: base01 -*color11: base02 -*color12: base04 -*color13: base06 -*color14: base0F -*color15: base07 - -rofi.color-window: base00,base0D,base05,base00 -rofi.color-normal: base00,base05,base00,base0D,base00 -rofi.color-normal: base00,base05,base00,base0D,base00 -rofi.color-active: base00,base05,base00,base0D,base00 -rofi.color-urgent: base00,base05,base00,base0D,base00 - -bspwm.normal_border_color: base00 -bspwm.focused_border_color: base0D -bspwm.active_border_color: base00 -bspwm.presel_feedback_color: base0D diff --git a/common/neovim/.gitignore b/common/neovim/.gitignore index 030b11f..d2d6e35 100644 --- a/common/neovim/.gitignore +++ b/common/neovim/.gitignore @@ -5,3 +5,4 @@ !/ftplugin !/lua !/coc-settings.json +!/colors/donokai.vim diff --git a/common/neovim/init.lua b/common/neovim/init.lua index 001b02e..e56ac36 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -1,41 +1,33 @@ -local kmap = vim.api.nvim_set_keymap -local excmd = vim.api.nvim_command -local nvim_exec = vim.api.nvim_exec +vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim' -- TODO: learn about the wildmenu `q:` -- TODO: what is `let &fcs = 'eob: '` for? -local evalvim = function(vimscript, output) - if (output == nil) then - output = false - end - nvim_exec(vimscript, output) -end - require('plugins').setup() require'options' require'keymap' +require('fold').setup() +-- require('lsp').setup() +require('statusline').setup() -do - local plugin_setups = { - telescope = { - defaults = { - mappings = {i = {['c-u'] = false, ['c-d'] = false}}, - generic_sorter = require('telescope.sorters').get_fzy_sorter, - file_sorter = require('telescope.sorters').get_fzy_sorter, - } - }, - fold = true, - statusline = true, - lsp = true, - } - for k,v in pairs(plugin_setups) do - if type(v) == 'function' then - v(require(k)) - elseif type(v) == 'table' then - require(k).setup(v) - elseif v == true then - require(k).setup() - end +local plugin_setups = { + telescope = { + defaults = { + mappings = {i = {['c-u'] = false, ['c-d'] = false}}, + generic_sorter = require('telescope.sorters').get_fzy_sorter, + file_sorter = require('telescope.sorters').get_fzy_sorter, + } + }, +} + +for k,v in pairs(plugin_setups) do + if type(v) == 'function' then + v(require(k)) + elseif type(v) == 'table' then + require(k).setup(v) + elseif type(v) == 'string' then + require(k)[v]() + elseif v == true then + require(k) end end diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua index 0bdc213..a318497 100644 --- a/common/neovim/lua/keymap.lua +++ b/common/neovim/lua/keymap.lua @@ -1,6 +1,4 @@ -local vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim' - -for _,keys in ipairs{'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} do kmap('i', keys, '', {}) end +for _,keys in ipairs{'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} do vim.api.nvim_set_keymap('i', keys, '', {}) end local m = { s = {silent = true}, @@ -9,12 +7,13 @@ local m = { } local keymap = { n = { - ['r'] = {':luafile ' .. vimdir .. '/init.lua:echo \'Reloaded init.lua\'', m.s}, - ['gv'] = {':e ' .. vimdir .. '/init.lua', m.s}, + ['r'] = {':luafile ' .. vim.g.vimdir .. '/init.lua:echo \'Reloaded init.lua\'', m.s}, + ['gv'] = {':e ' .. vim.g.vimdir .. '/init.lua', m.s}, ['w'] = {':bd', m.s}, - ['h'] = {'b#', m.s}, + ['h'] = {':b#', m.s}, ['k'] = {':bnext', m.s}, ['j'] = {':bprevious', m.s}, + ['m'] = {':lua print()', m.s}, ['/'] = {':let @/ = "":', m.s}, [''] = ':qa', [''] = 'Telescope git_files', diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index a29f968..e0c514b 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -63,8 +63,7 @@ nvim_lsp.sumneko_lua.setup{ vim.cmd "command! Format execute 'lua vim.lsp.buf.formatting()'" vim.o.completeopt = 'menuone,noinsert' --- Compe setup -require'compe'.setup{ +--[[require'compe'.setup{ enabled=true, autocomplete=true, debug=false, @@ -79,6 +78,7 @@ require'compe'.setup{ documentation=true, source={path=true, nvim_lsp=true}, } +]]-- return { setup=function() diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 3a48dd4..23b77f4 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -38,10 +38,10 @@ local options = { shortmess = 'filnxToOFIac', history = 1000, undofile = true, - undodir = vimdir .. '/undo', + undodir = vim.g.vimdir .. '/undo', undolevels = 1000, undoreload = 1000, - spellfile = vimdir .. '/spell/en.utf-8.add', + spellfile = vim.g.vimdir .. '/spell/en.utf-8.add', ignorecase = true, smartcase = true, incsearch = true, @@ -59,31 +59,31 @@ local options = { showcmd = false, laststatus = 2, ruler = false, - termguicolors = true, + number = true, } for k,v in pairs(options) do vim.o[k] = v end -vim.api.nvim_exec([[ - hi Search cterm=NONE ctermbg=blue ctermfg=black - hi LineNr ctermbg=0 ctermfg=8 - hi CursorLineNr ctermbg=18 ctermfg=gray - hi IndentGuidesEven ctermbg=18 - hi Normal ctermbg=NONE - hi ActiveBuffer ctermbg=4 ctermfg=0 - hi DirtyBuffer ctermbg=3 ctermfg=0 - hi StatusLine ctermbg=1 ctermfg=7 - hi StatusLineNC ctermbg=2 ctermfg=7 - command! W write - augroup oncommit - au! BufReadPost * - if stridx(&ft, 'commit') >= 0 - exe "startinsert!" - endif - augroup END - augroup slime - au! BufNewFile,BufRead *.slimleex set syntax=slim - augroup END - colorscheme base16-donokai -]], false) +vim.api.nvim_command'colorscheme donokai' + +vim.api.nvim_command[[ +function! SynGroup() + let l:s = synID(line('.'), col('.'), 1) + echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') +endfun +nnoremap :call SynGroup() +]] + +-- vim.api.nvim_command[[ +-- command! W write +-- augroup oncommit +-- au! BufReadPost * +-- if stridx(&ft, 'commit') >= 0 +-- exe "startinsert!" +-- endif +-- augroup END +-- augroup slime +-- au! BufNewFile,BufRead *.slimleex set syntax=slim +-- augroup END +-- ]] diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index f406bfd..48d4414 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -1,6 +1,6 @@ local setup = function() - local packer_install_path = "#{fn.stdpath 'data'}/site/pack/packer/start/packer.nvim" - if #vim.fn.glob(packer_install_path) > 0 then + local packer_install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' + if #vim.fn.glob(packer_install_path) == 0 then vim.fn.system {'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} vim.api.nvim_command'packadd packer.nvim' end @@ -27,7 +27,7 @@ local setup = function() 'dhruvasagar/vim-prosession', {'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}}, 'joshdick/onedark.vim', - {'lukas-reineke/indent-blankline.nvim', branch = 'lua'}, + 'lukas-reineke/indent-blankline.nvim', {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}}, 'neovim/nvim-lspconfig', 'hrsh7th/nvim-compe', From b2d18aaf7814c000fcb5daefe72d643fe45c5d82 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 11:04:25 -0500 Subject: [PATCH 027/103] Add color scheme --- .gitignore | 4 - common/neovim/.gitignore | 2 +- common/neovim/colors/donokai.vim | 129 +++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 common/neovim/colors/donokai.vim diff --git a/.gitignore b/.gitignore index 83909e5..2e3a803 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,4 @@ *.secret fishd.tmp.* -# TODO: should be unnecessary once color generation is homegrown -/colors/gen/vendor -/colors/gen/tmp - /tags diff --git a/common/neovim/.gitignore b/common/neovim/.gitignore index d2d6e35..8058520 100644 --- a/common/neovim/.gitignore +++ b/common/neovim/.gitignore @@ -5,4 +5,4 @@ !/ftplugin !/lua !/coc-settings.json -!/colors/donokai.vim +!/colors diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim new file mode 100644 index 0000000..d51f4cb --- /dev/null +++ b/common/neovim/colors/donokai.vim @@ -0,0 +1,129 @@ +" let s:black = '00' +" let s:black2 = '08' +" let s:white = '07' +" let s:white2 = '15' +" let s:red = '01' +" let s:green = '02' +" let s:yellow = '03' +" let s:blue = '04' +" let s:magenta = '05' +" let s:cyan = '06' +" let s:darkgrey = '18' + +" let s:cterm02 = '19' +" let s:cterm04 = '20' +" let s:cterm06 = '21' +" let s:cterm09 = '16' +" let s:cterm0F = '17' + +hi clear +syntax reset + +hi normal cterm=none ctermfg=7 +hi bold cterm=bold + +hi statusline cterm=none ctermfg=7 ctermbg=18 +hi activebuffer cterm=none ctermfg=7 ctermbg=18 +hi linenr cterm=none ctermfg=18 +hi indentblanklinechar cterm=none ctermfg=18 +hi signcolumn cterm=none ctermfg=18 ctermbg=0 + +hi LspDiagnosticsSignWarning cterm=none ctermfg=1 ctermbg=0 +hi lspdiagnosticsvirtualtextwarning cterm=none ctermfg=1 ctermbg=0 + +hi comment cterm=none ctermfg=18 +hi keyword cterm=none ctermfg=7 +hi operator cterm=none ctermfg=7 +hi repeat cterm=none ctermfg=1 +hi type cterm=none ctermfg=3 +hi string cterm=none ctermfg=2 +hi noise cterm=none ctermfg=5 ctermbg=0 +hi statement cterm=none ctermfg=1 ctermbg=0 +hi conditional cterm=none ctermfg=1 ctermbg=0 +hi structure cterm=none ctermfg=4 ctermbg=0 + +hi matchparen cterm=reverse ctermfg=7 ctermbg=0 +hi search cterm=reverse ctermfg=7 ctermbg=0 + +hi todo cterm=none ctermfg=7 ctermbg=18 + +" vim tui elements +" call hi('Debug', s:gui08, '', s:cterm08, '', '', '') +" call hi('Directory', s:gui0D, '', s:cterm0D, '', '', '') +" call hi('Error', s:gui00, s:gui08, s:cterm00, s:cterm08, '', '') +" call hi('ErrorMsg', s:gui08, s:gui00, s:cterm08, s:cterm00, '', '') +" call hi('Exception', s:gui08, '', s:cterm08, '', '', '') +" call hi('FoldColumn', s:gui0C, s:gui01, s:cterm0C, s:cterm01, '', '') +" call hi('Folded', s:gui03, s:gui01, s:cterm03, s:cterm01, '', '') +" call hi('IncSearch', s:gui01, s:gui09, s:cterm01, s:cterm09, 'none', '') +" call hi('Italic', '', '', '', '', 'none', '') +" call hi('Macro', s:gui08, '', s:cterm08, '', '', '') +" call hi('MatchParen', s:gui00, s:gui03, s:cterm00, s:cterm03, '', '') +" call hi('ModeMsg', s:gui0B, '', s:cterm0B, '', '', '') +" call hi('MoreMsg', s:gui0B, '', s:cterm0B, '', '', '') +" call hi('Question', s:gui0D, '', s:cterm0D, '', '', '') +" call hi('Search', s:gui03, s:gui0A, s:cterm03, s:cterm0A, '', '') +" call hi('SpecialKey', s:gui03, '', s:cterm03, '', '', '') +" call hi('TooLong', s:gui08, '', s:cterm08, '', '', '') +" call hi('Underlined', s:gui08, '', s:cterm08, '', '', '') +" call hi('Visual', '', s:gui02, '', s:cterm02, '', '') +" call hi('VisualNOS', s:gui08, '', s:cterm08, '', '', '') +" call hi('WarningMsg', s:gui08, '', s:cterm08, '', '', '') +" call hi('WildMenu', s:gui08, s:gui0A, s:cterm08, '', '', '') +" call hi('Title', s:gui0D, '', s:cterm0D, '', 'none', '') +" call hi('Conceal', s:gui0D, s:gui00, s:cterm0D, s:cterm00, '', '') +" call hi('Cursor', s:gui00, s:gui05, s:cterm00, s:cterm05, '', '') +" call hi('NonText', s:gui03, '', s:cterm03, '', '', '') +" call hi('Normal', s:gui05, s:gui00, s:cterm05, s:cterm00, '', '') +" call hi('VertSplit', s:gui02, s:gui02, s:cterm02, s:cterm02, 'none', '') +" call hi('ColorColumn', '', s:gui01, '', s:cterm01, 'none', '') +" call hi('CursorColumn', '', s:gui01, '', s:cterm01, 'none', '') +" call hi('CursorLine', '', s:gui01, '', s:cterm01, 'none', '') +" call hi('CursorLineNr', s:gui03, s:gui01, s:cterm03, s:cterm01, '', '') +" call hi('PMenu', s:gui04, s:gui01, s:cterm04, s:cterm01, 'none', '') +" call hi('PMenuSel', s:gui01, s:gui04, s:cterm01, s:cterm04, '', '') +" call hi('TabLine', s:gui03, s:gui01, s:cterm03, s:cterm01, 'none', '') +" call hi('TabLineFill', s:gui03, s:gui01, s:cterm03, s:cterm01, 'none', '') +" call hi('TabLineSel', s:gui0B, s:gui01, s:cterm0B, s:cterm01, 'none', '') + +" standard syntax +" call hi('Boolean', s:gui09, '', s:cterm09, '', '', '') +" call hi('Character', s:gui08, '', s:cterm08, '', '', '') +" call hi('Comment', s:gui03, '', s:cterm03, '', '', '') +" call hi('Conditional', s:gui0E, '', s:cterm0E, '', '', '') +" call hi('Constant', s:gui09, '', s:cterm09, '', '', '') +" call hi('Define', s:gui0E, '', s:cterm0E, '', 'none', '') +" call hi('Delimiter', s:gui0F, '', s:cterm0F, '', '', '') +" call hi('Float', s:gui09, '', s:cterm09, '', '', '') +" call hi('Function', s:gui0D, '', s:cterm0D, '', '', '') +" call hi('Identifier', s:gui08, '', s:cterm08, '', 'none', '') +" call hi('Include', s:gui0D, '', s:cterm0D, '', '', '') +" call hi('Keyword', s:gui0E, '', s:cterm0E, '', '', '') +" call hi('Label', s:gui0A, '', s:cterm0A, '', '', '') +" call hi('Number', s:gui09, '', s:cterm09, '', '', '') +" call hi('Operator', s:gui05, '', s:cterm05, '', 'none', '') +" call hi('PreProc', s:gui0A, '', s:cterm0A, '', '', '') +" call hi('Repeat', s:gui0A, '', s:cterm0A, '', '', '') +" call hi('Special', s:gui0C, '', s:cterm0C, '', '', '') +" call hi('SpecialChar', s:gui0F, '', s:cterm0F, '', '', '') +" call hi('Statement', s:gui08, '', s:cterm08, '', '', '') +" call hi('StorageClass', s:gui0A, '', s:cterm0A, '', '', '') +" call hi('String', s:gui0B, '', s:cterm0B, '', '', '') +" call hi('Structure', s:gui0E, '', s:cterm0E, '', '', '') +" call hi('Tag', s:gui0A, '', s:cterm0A, '', '', '') +" call hi('Todo', s:gui0A, s:gui01, s:cterm0A, s:cterm01, '', '') +" call hi('Type', s:gui0A, '', s:cterm0A, '', 'none', '') +" call hi('Typedef', s:gui0A, '', s:cterm0A, '', '', '') +" call hi('DiffAdd', s:gui0B, s:gui01, s:cterm0B, s:cterm01, '', '') +" call hi('DiffChange', s:gui03, s:gui01, s:cterm03, s:cterm01, '', '') +" call hi('DiffDelete', s:gui08, s:gui01, s:cterm08, s:cterm01, '', '') +" call hi('DiffText', s:gui0D, s:gui01, s:cterm0D, s:cterm01, '', '') +" call hi('DiffAdded', s:gui0B, s:gui00, s:cterm0B, s:cterm00, '', '') +" call hi('DiffFile', s:gui08, s:gui00, s:cterm08, s:cterm00, '', '') +" call hi('DiffNewFile', s:gui0B, s:gui00, s:cterm0B, s:cterm00, '', '') +" call hi('DiffLine', s:gui0D, s:gui00, s:cterm0D, s:cterm00, '', '') +" call hi('DiffRemoved', s:gui08, s:gui00, s:cterm08, s:cterm00, '', '') +" call hi('SpellBad', '', s:gui00, '', s:cterm00, 'undercurl', s:gui08) +" call hi('SpellLocal', '', s:gui00, '', s:cterm00, 'undercurl', s:gui0C) +" call hi('SpellCap', '', s:gui00, '', s:cterm00, 'undercurl', s:gui0D) +" call hi('SpellRare', '', s:gui00, '', s:cterm00, 'undercurl', s:gui0E) From 74511c4731c23387638ed71fbc2bca740560d61c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 11:05:19 -0500 Subject: [PATCH 028/103] de nontext --- common/neovim/colors/donokai.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index d51f4cb..1c8e600 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -41,6 +41,7 @@ hi noise cterm=none ctermfg=5 ctermbg=0 hi statement cterm=none ctermfg=1 ctermbg=0 hi conditional cterm=none ctermfg=1 ctermbg=0 hi structure cterm=none ctermfg=4 ctermbg=0 +hi nontext ctermfg=0 ctermbg=0 hi matchparen cterm=reverse ctermfg=7 ctermbg=0 hi search cterm=reverse ctermfg=7 ctermbg=0 From a364587edd7c7a6a83b5f70fd2062002531700a0 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 11:12:49 -0500 Subject: [PATCH 029/103] Seems to work great! --- common/neovim/colors/donokai.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 1c8e600..5ba2bd4 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -41,6 +41,9 @@ hi noise cterm=none ctermfg=5 ctermbg=0 hi statement cterm=none ctermfg=1 ctermbg=0 hi conditional cterm=none ctermfg=1 ctermbg=0 hi structure cterm=none ctermfg=4 ctermbg=0 +hi special cterm=none ctermfg=5 ctermbg=0 +hi preproc cterm=none ctermfg=1 ctermbg=0 +hi identifier cterm=none ctermfg=6 ctermbg=0 hi nontext ctermfg=0 ctermbg=0 hi matchparen cterm=reverse ctermfg=7 ctermbg=0 From 07536113161bfd9843e8f0f5373bd4cd2eaebca2 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 11:14:43 -0500 Subject: [PATCH 030/103] TODO --- common/neovim/colors/donokai.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 5ba2bd4..243d7ec 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -46,6 +46,8 @@ hi preproc cterm=none ctermfg=1 ctermbg=0 hi identifier cterm=none ctermfg=6 ctermbg=0 hi nontext ctermfg=0 ctermbg=0 +# TODO: diagnostics popups, telescope dialogs + hi matchparen cterm=reverse ctermfg=7 ctermbg=0 hi search cterm=reverse ctermfg=7 ctermbg=0 From 6d8fd970b5a950de832d3ce94aad9875e58b25e8 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 4 Jul 2021 11:15:20 -0500 Subject: [PATCH 031/103] Fix todo comment --- common/neovim/colors/donokai.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 243d7ec..7359a21 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -46,7 +46,7 @@ hi preproc cterm=none ctermfg=1 ctermbg=0 hi identifier cterm=none ctermfg=6 ctermbg=0 hi nontext ctermfg=0 ctermbg=0 -# TODO: diagnostics popups, telescope dialogs +" TODO: diagnostics popups, telescope dialogs hi matchparen cterm=reverse ctermfg=7 ctermbg=0 hi search cterm=reverse ctermfg=7 ctermbg=0 From 291e531f87fe42d5e6f69fea565da834aaf7b079 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 5 Jul 2021 23:12:53 -0500 Subject: [PATCH 032/103] Bold font --- common/kitty/kitty.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/common/kitty/kitty.conf b/common/kitty/kitty.conf index 7f35845..16d8f6b 100644 --- a/common/kitty/kitty.conf +++ b/common/kitty/kitty.conf @@ -1,4 +1,5 @@ font_family Iosevka +bold_font Iosevka Heavy font_size 11.0 allow_remote_control yes From 1ad2af5824f16b6d8167dea02cf82358bebf3d75 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 6 Jul 2021 00:53:57 -0500 Subject: [PATCH 033/103] Fix some things, mainly statusline and minor colorscheme tweaks --- common/bin/tenv | 4 ++-- common/bin/tmux-lyte-session | 1 + common/kitty/kitty.conf | 2 ++ common/neovim/coc-settings.json | 13 ------------- common/neovim/colors/donokai.vim | 33 ++++++++++++++++++++++++-------- common/neovim/init.lua | 19 ++++++++++++++++++ common/neovim/lua/statusline.lua | 30 ++++++++++++++++++----------- 7 files changed, 68 insertions(+), 34 deletions(-) delete mode 100644 common/neovim/coc-settings.json diff --git a/common/bin/tenv b/common/bin/tenv index 39fa9c8..49a4f7f 100755 --- a/common/bin/tenv +++ b/common/bin/tenv @@ -1,3 +1,3 @@ #!/usr/bin/env sh -d="$(command ls $ENV_PATH | fzf)" -tmux-lyte-session "env-$d" "$ENV_PATH/$d" +d="$(command ls $ENV_PATH | fzf)" && \ + tmux-lyte-session "env-$d" "$ENV_PATH/$d" diff --git a/common/bin/tmux-lyte-session b/common/bin/tmux-lyte-session index d3e67db..eb23a06 100755 --- a/common/bin/tmux-lyte-session +++ b/common/bin/tmux-lyte-session @@ -1,4 +1,5 @@ #!/usr/bin/env fish + set session_name $argv[1] set dir (set -q $argv[2] && echo $argv2 || pwd) tmux new-session -D -s $session_name -c $dir || \ diff --git a/common/kitty/kitty.conf b/common/kitty/kitty.conf index 16d8f6b..3901a49 100644 --- a/common/kitty/kitty.conf +++ b/common/kitty/kitty.conf @@ -2,6 +2,8 @@ font_family Iosevka bold_font Iosevka Heavy font_size 11.0 +font_features Iosevka -calt +FSTA +MTLB +HSKL +JSPT +dlig + allow_remote_control yes repaint_delay 5 input_delay 5 diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json deleted file mode 100644 index a80b71d..0000000 --- a/common/neovim/coc-settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "coc.preferences.formatOnSaveFiletypes": ["ex", "exs", "elixir"], - "diagnostic-languageserver.filetypes": { - "elixir": ["mix_credo", "mix_credo_compile"], - "eelixir": ["mix_credo", "mix_credo_compile"], - "sh": "shellcheck" - }, - "diagnostic-languageserver.formatFiletypes": { - "sh": "shfmt" - }, - "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", - "codeLens.enable": true -} diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 7359a21..420776d 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -22,15 +22,20 @@ syntax reset hi normal cterm=none ctermfg=7 hi bold cterm=bold +" hi statusline cterm=none ctermfg=7 ctermbg=18 hi statusline cterm=none ctermfg=7 ctermbg=18 -hi activebuffer cterm=none ctermfg=7 ctermbg=18 +hi statuslinenc cterm=none ctermfg=18 ctermbg=0 +hi inactivebuffer cterm=none ctermbg=18 ctermfg=7 +hi activebuffer cterm=none ctermfg=0 ctermbg=4 +hi dirtybuffer cterm=none ctermfg=0 ctermbg=1 +hi activedirtybuffer cterm=none ctermfg=0 ctermbg=3 hi linenr cterm=none ctermfg=18 hi indentblanklinechar cterm=none ctermfg=18 hi signcolumn cterm=none ctermfg=18 ctermbg=0 +hi matchparen cterm=none ctermbg=5 ctermfg=0 +hi search cterm=bold ctermbg=4 -hi LspDiagnosticsSignWarning cterm=none ctermfg=1 ctermbg=0 -hi lspdiagnosticsvirtualtextwarning cterm=none ctermfg=1 ctermbg=0 - +hi todo cterm=none ctermfg=7 ctermbg=18 hi comment cterm=none ctermfg=18 hi keyword cterm=none ctermfg=7 hi operator cterm=none ctermfg=7 @@ -43,15 +48,27 @@ hi conditional cterm=none ctermfg=1 ctermbg=0 hi structure cterm=none ctermfg=4 ctermbg=0 hi special cterm=none ctermfg=5 ctermbg=0 hi preproc cterm=none ctermfg=1 ctermbg=0 -hi identifier cterm=none ctermfg=6 ctermbg=0 +hi identifier cterm=none ctermfg=4 ctermbg=0 +hi constant cterm=none ctermfg=1 hi nontext ctermfg=0 ctermbg=0 " TODO: diagnostics popups, telescope dialogs -hi matchparen cterm=reverse ctermfg=7 ctermbg=0 -hi search cterm=reverse ctermfg=7 ctermbg=0 +hi LspDiagnosticsSignWarning cterm=none ctermfg=1 ctermbg=0 +hi lspdiagnosticsvirtualtextwarning cterm=none ctermfg=1 ctermbg=0 -hi todo cterm=none ctermfg=7 ctermbg=18 +hi TelescopeBorder ctermfg=18 +hi TelescopePromptBorder ctermfg=18 +hi TelescopeResultsBorder ctermfg=18 +hi TelescopePreviewBorder ctermfg=18 + +hi TelescopeSelection ctermbg=18 ctermfg=7 +hi TelescopeSelectionCaret ctermfg=7 +hi TelescopeMultiSelection ctermfg=7 +hi TelescopeNormal ctermfg=7 + +hi TelescopeMatching ctermfg=0 ctermbg=4 +hi TelescopePromptPrefix guifg=red " vim tui elements " call hi('Debug', s:gui08, '', s:cterm08, '', '', '') diff --git a/common/neovim/init.lua b/common/neovim/init.lua index e56ac36..add9d03 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -10,9 +10,28 @@ require('fold').setup() -- require('lsp').setup() require('statusline').setup() +function Dbg(a, d) + if d == nil then d = 0 end + if type(a) == 'table' then + local s = '{\n' + local indent = string.rep(' ', d) + for k,v in pairs(a) do + s = s .. ' ' .. indent .. tostring(k) .. '=' .. Dbg(v, d+1) .. '\n' + end + return s .. '\n' .. indent .. '}' + elseif type(a) == 'string' then + return a + elseif type(a) == 'number' then + return tostring(a) + else + return 'type:'..type(a)..',tostring:'..tostring(a) + end +end + local plugin_setups = { telescope = { defaults = { + prompt_prefix = "", mappings = {i = {['c-u'] = false, ['c-d'] = false}}, generic_sorter = require('telescope.sorters').get_fzy_sorter, file_sorter = require('telescope.sorters').get_fzy_sorter, diff --git a/common/neovim/lua/statusline.lua b/common/neovim/lua/statusline.lua index 87522f8..5bc66c5 100644 --- a/common/neovim/lua/statusline.lua +++ b/common/neovim/lua/statusline.lua @@ -4,25 +4,28 @@ local status_line_max_length = 5 -- TODO: only update this portion when needed instead of every render? local status_line_buffer_by_num = function(bufnum) - local bufinfo = fn.getbufinfo(bufnum) + local is_active = false + local bufinfo = fn.getbufinfo(bufnum)[1] local prefix = ' %#InactiveBuffer#' local suffix = '%* ' - if bufinfo.changed then + if bufinfo.changed == 1 then prefix = '%#DirtyBuffer# ' suffix = ' %*' end - if bufinfo.hidden == 0 and fn.index(bufinfo.windows, vim.g.statusline_winid) >= 0 then + local windex = fn.index(bufinfo.windows, vim.g.statusline_winid) + if bufinfo.hidden and windex >= 0 then + is_active = true prefix = '%#ActiveBuffer# ' suffix = ' %*' - if bufinfo.changed then - prefix = '%#ActiveBuffer# *' + if bufinfo.changed == 1 then + prefix = '%#ActiveDirtyBuffer# *' suffix = ' %*' end end - return prefix .. fn.fnamemodify(fn.bufname(bufnum), ':t') .. suffix + return (prefix .. fn.fnamemodify(fn.bufname(bufnum), ':t') .. suffix), is_active end local status_line_buffers = function() @@ -31,12 +34,12 @@ local status_line_buffers = function() local active_index = -1 local acc = {} for _,bufnum in ipairs(api.nvim_list_bufs()) do - local bufinfo = fn.getbufinfo(bufnum) + local bufinfo = fn.getbufinfo(bufnum)[1] if bufinfo.listed ~= 0 then - local entry = status_line_buffer_by_num(bufnum) + local entry, is_active = status_line_buffer_by_num(bufnum) table.insert(acc, entry) - if fn.matchstr(entry, '^%#ActiveBuffer#') then - active_index = fn.index(acc, entry) + if is_active then + active_index = #acc end end end @@ -57,7 +60,12 @@ local status_line_buffers = function() end return prefix .. buflist .. suffix else - return table.concat(acc, '') + local suffix = '' + if #acc - 1 >status_line_max_length then + suffix = ' >' + end + local buflist = table.concat({unpack(acc, 1, math.min(#acc, status_line_max_length))}, '') + return buflist .. suffix .. active_index end end From 296dd40613f47bb5023958a10bd483eda90c42e3 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 7 Jul 2021 10:45:46 -0500 Subject: [PATCH 034/103] Update to use 256color grayscale colors --- common/colors/shell | 27 ------------------ common/colors/vconsole | 8 +++--- common/fish/aliases.fish | 1 + common/neovim/colors/base16-donokai.vim | 1 + common/neovim/colors/donokai.vim | 28 +++++++++---------- .../arch/provision.d/20-install-packages.bash | 1 + 6 files changed, 20 insertions(+), 46 deletions(-) create mode 120000 common/neovim/colors/base16-donokai.vim diff --git a/common/colors/shell b/common/colors/shell index 889f8fb..c402a23 100755 --- a/common/colors/shell +++ b/common/colors/shell @@ -12,16 +12,6 @@ blue="66/d9/ef" magenta="ae/81/ff" cyan="a1/ef/e4" white="cccccc" -black2="75/71/5e" -white2="f8/f8/f8" - -# TODO: name these? -color16="fd/97/1f" # Base 09 -color17="cc/66/33" # Base 0F -color18="38/38/30" # Base 01 -color19="49/48/3e" # Base 02 -color20="a5/9f/85" # Base 04 -color21="f5/f4/f1" # Base 06 if [ -n "$TMUX" ]; then # tell tmux to pass the escape sequences through @@ -63,15 +53,6 @@ ct $blue 4 12 ct $magenta 5 13 ct $cyan 6 14 ct $white 7 10 -ct $black2 8 -ct $white2 15 - -ct $color16 16 -ct $color17 17 -ct $color18 18 -ct $color19 19 -ct $color20 20 -ct $color21 21 if [ -n "$ITERM_SESSION_ID" ]; then # iTerm2 proprietary escape codes @@ -101,15 +82,7 @@ unset blue unset magenta unset cyan unset white -unset black2 -unset white2 unset printf_template unset printf_template_var unset printf_template_custom -unset color16 -unset color17 -unset color18 -unset color19 -unset color20 -unset color21 diff --git a/common/colors/vconsole b/common/colors/vconsole index 02e23c1..0d95e6a 100755 --- a/common/colors/vconsole +++ b/common/colors/vconsole @@ -8,13 +8,13 @@ blue="66d9ef" # blue magenta="ae81ff" # magenta cyan="a1efe4" # cyan white="cccccc" # white -black2="75715e" # black -white2="f8f8f8" # white +black2="75715e" # black2 +white2="f8f8f8" # white2 c() { c="${1}"; shift for n in "$@"; do - echo -e "\e]P${n}${c}"; + printf "\e]P%d%s" "$n" "$c"; done } @@ -32,7 +32,7 @@ c $white2 F if [ -x /sbin/clear ]; then /sbin/clear else - echo -e "\e[H\e[2J" + printf "\e[H\e[2J" fi unset -f c diff --git a/common/fish/aliases.fish b/common/fish/aliases.fish index 5132838..6a682ea 100755 --- a/common/fish/aliases.fish +++ b/common/fish/aliases.fish @@ -107,6 +107,7 @@ alias dd "dd status=progress" alias wifi "sudo iwctl" alias year 'cal (date +%Y)' alias mount 'sudo -E mount' +alias umount 'sudo -E umount' alias pa pulsemixer alias mail neomutt alias wje work-journal-entry diff --git a/common/neovim/colors/base16-donokai.vim b/common/neovim/colors/base16-donokai.vim new file mode 120000 index 0000000..3af3c64 --- /dev/null +++ b/common/neovim/colors/base16-donokai.vim @@ -0,0 +1 @@ +/home/daniel/.home/.config/lytedev-dotfiles/common/colors/vim \ No newline at end of file diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 420776d..aae6dab 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -8,7 +8,6 @@ " let s:blue = '04' " let s:magenta = '05' " let s:cyan = '06' -" let s:darkgrey = '18' " let s:cterm02 = '19' " let s:cterm04 = '20' @@ -22,21 +21,20 @@ syntax reset hi normal cterm=none ctermfg=7 hi bold cterm=bold -" hi statusline cterm=none ctermfg=7 ctermbg=18 -hi statusline cterm=none ctermfg=7 ctermbg=18 -hi statuslinenc cterm=none ctermfg=18 ctermbg=0 -hi inactivebuffer cterm=none ctermbg=18 ctermfg=7 +hi statusline cterm=none ctermfg=7 ctermbg=234 +hi statuslinenc cterm=none ctermfg=234 ctermbg=0 +hi inactivebuffer cterm=none ctermbg=234 ctermfg=7 hi activebuffer cterm=none ctermfg=0 ctermbg=4 hi dirtybuffer cterm=none ctermfg=0 ctermbg=1 hi activedirtybuffer cterm=none ctermfg=0 ctermbg=3 -hi linenr cterm=none ctermfg=18 -hi indentblanklinechar cterm=none ctermfg=18 -hi signcolumn cterm=none ctermfg=18 ctermbg=0 +hi linenr cterm=none ctermfg=236 +hi indentblanklinechar cterm=none ctermfg=236 +hi signcolumn cterm=none ctermfg=234 ctermbg=0 hi matchparen cterm=none ctermbg=5 ctermfg=0 hi search cterm=bold ctermbg=4 -hi todo cterm=none ctermfg=7 ctermbg=18 -hi comment cterm=none ctermfg=18 +hi todo cterm=none ctermfg=7 ctermbg=236 +hi comment cterm=none ctermfg=236 hi keyword cterm=none ctermfg=7 hi operator cterm=none ctermfg=7 hi repeat cterm=none ctermfg=1 @@ -57,12 +55,12 @@ hi nontext ctermfg=0 ctermbg=0 hi LspDiagnosticsSignWarning cterm=none ctermfg=1 ctermbg=0 hi lspdiagnosticsvirtualtextwarning cterm=none ctermfg=1 ctermbg=0 -hi TelescopeBorder ctermfg=18 -hi TelescopePromptBorder ctermfg=18 -hi TelescopeResultsBorder ctermfg=18 -hi TelescopePreviewBorder ctermfg=18 +hi TelescopeBorder ctermfg=234 +hi TelescopePromptBorder ctermfg=234 +hi TelescopeResultsBorder ctermfg=234 +hi TelescopePreviewBorder ctermfg=234 -hi TelescopeSelection ctermbg=18 ctermfg=7 +hi TelescopeSelection ctermbg=234 ctermfg=7 hi TelescopeSelectionCaret ctermfg=7 hi TelescopeMultiSelection ctermfg=7 hi TelescopeNormal ctermfg=7 diff --git a/os/linux/arch/provision.d/20-install-packages.bash b/os/linux/arch/provision.d/20-install-packages.bash index 2c7f8c8..accbe2c 100755 --- a/os/linux/arch/provision.d/20-install-packages.bash +++ b/os/linux/arch/provision.d/20-install-packages.bash @@ -31,6 +31,7 @@ yay -Sy --needed --noconfirm \ neovim-nightly-bin `# Text Editors` \ sc-im `# Spreadsheets` \ unzip `# Simple Unzipping` \ + ctags `# Tags` \ tmux `# Terminal Multiplexer` \ kitty `# Almost Better Terminal Emulator` \ curl `# HTTP Utility` \ From e8ebb5d0e8a110a90c89dcdca4c20d05a334b48b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 7 Jul 2021 10:57:59 -0500 Subject: [PATCH 035/103] Minor color scheme changes --- common/neovim/colors/donokai.vim | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index aae6dab..71f9d89 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -1,20 +1,3 @@ -" let s:black = '00' -" let s:black2 = '08' -" let s:white = '07' -" let s:white2 = '15' -" let s:red = '01' -" let s:green = '02' -" let s:yellow = '03' -" let s:blue = '04' -" let s:magenta = '05' -" let s:cyan = '06' - -" let s:cterm02 = '19' -" let s:cterm04 = '20' -" let s:cterm06 = '21' -" let s:cterm09 = '16' -" let s:cterm0F = '17' - hi clear syntax reset @@ -27,14 +10,18 @@ hi inactivebuffer cterm=none ctermbg=234 ctermfg=7 hi activebuffer cterm=none ctermfg=0 ctermbg=4 hi dirtybuffer cterm=none ctermfg=0 ctermbg=1 hi activedirtybuffer cterm=none ctermfg=0 ctermbg=3 -hi linenr cterm=none ctermfg=236 +hi pmenu cterm=none ctermfg=7 ctermbg=236 +hi pmenusel cterm=none ctermbg=4 ctermfg=0 +hi pmenusbar cterm=none ctermbg=236 ctermfg=240 +hi pmenuthumb cterm=none ctermbg=240 ctermfg=240 +hi linenr cterm=none ctermfg=240 hi indentblanklinechar cterm=none ctermfg=236 hi signcolumn cterm=none ctermfg=234 ctermbg=0 hi matchparen cterm=none ctermbg=5 ctermfg=0 hi search cterm=bold ctermbg=4 -hi todo cterm=none ctermfg=7 ctermbg=236 -hi comment cterm=none ctermfg=236 +hi todo cterm=none ctermfg=7 ctermbg=240 +hi comment cterm=none ctermfg=240 hi keyword cterm=none ctermfg=7 hi operator cterm=none ctermfg=7 hi repeat cterm=none ctermfg=1 @@ -60,7 +47,7 @@ hi TelescopePromptBorder ctermfg=234 hi TelescopeResultsBorder ctermfg=234 hi TelescopePreviewBorder ctermfg=234 -hi TelescopeSelection ctermbg=234 ctermfg=7 +hi TelescopeSelection ctermbg=236 ctermfg=7 hi TelescopeSelectionCaret ctermfg=7 hi TelescopeMultiSelection ctermfg=7 hi TelescopeNormal ctermfg=7 From 0f00298156d6f18bd75157f172ea2e1ee41fc765 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 7 Jul 2021 11:22:42 -0500 Subject: [PATCH 036/103] Update diff colors --- common/neovim/colors/donokai.vim | 3 +++ common/neovim/lua/options.lua | 26 ++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 71f9d89..48d3a57 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -36,6 +36,9 @@ hi preproc cterm=none ctermfg=1 ctermbg=0 hi identifier cterm=none ctermfg=4 ctermbg=0 hi constant cterm=none ctermfg=1 hi nontext ctermfg=0 ctermbg=0 +hi diffoldfile cterm=none ctermfg=1 +hi diffremoved cterm=none ctermfg=1 +hi diffadded cterm=none ctermfg=2 " TODO: diagnostics popups, telescope dialogs diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 23b77f4..2d58930 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -69,21 +69,19 @@ vim.api.nvim_command'colorscheme donokai' vim.api.nvim_command[[ function! SynGroup() - let l:s = synID(line('.'), col('.'), 1) - echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') + let l:s = synID(line('.'), col('.'), 1) + echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') endfun nnoremap :call SynGroup() ]] --- vim.api.nvim_command[[ --- command! W write --- augroup oncommit --- au! BufReadPost * --- if stridx(&ft, 'commit') >= 0 --- exe "startinsert!" --- endif --- augroup END --- augroup slime --- au! BufNewFile,BufRead *.slimleex set syntax=slim --- augroup END --- ]] +vim.api.nvim_command[[ + command! W write + command! X writequit + augroup gitcommit + au! VimEnter COMMIT_EDITMSG exec 'norm gg' | startinsert! + augroup END + augroup slime + au! BufNewFile,BufRead *.slimleex set syntax=slim + augroup END +]] From 87ca18d78e837c12f528825f9f601a6cb27549b4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 7 Jul 2021 12:03:48 -0500 Subject: [PATCH 037/103] Fix gitcommit starting in insert mode --- common/neovim/lua/keymap.lua | 2 +- common/neovim/lua/options.lua | 20 ++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua index a318497..7db7ec9 100644 --- a/common/neovim/lua/keymap.lua +++ b/common/neovim/lua/keymap.lua @@ -13,7 +13,6 @@ local keymap = { ['h'] = {':b#', m.s}, ['k'] = {':bnext', m.s}, ['j'] = {':bprevious', m.s}, - ['m'] = {':lua print()', m.s}, ['/'] = {':let @/ = "":', m.s}, [''] = ':qa', [''] = 'Telescope git_files', @@ -26,6 +25,7 @@ local keymap = { [''] = ':TmuxNavigateRight', [' n'] = "'Nn'[v:searchforward]", [' N'] = "'nN'[v:searchforward]", + [''] = ':lua SynGroup()' }, t = {}, [''] = { diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 2d58930..4c82096 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -67,21 +67,13 @@ end vim.api.nvim_command'colorscheme donokai' -vim.api.nvim_command[[ -function! SynGroup() - let l:s = synID(line('.'), col('.'), 1) - echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') -endfun -nnoremap :call SynGroup() -]] +function SynGroup() + local s = vim.fn.synID(vim.fn.line('.'), vim.fn.col('.'), 1) + print(vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name')) +end vim.api.nvim_command[[ + au! FileType gitcommit exec 'norm gg' | startinsert! + au! BufNewFile,BufRead *.slimleex set syntax=slim command! W write - command! X writequit - augroup gitcommit - au! VimEnter COMMIT_EDITMSG exec 'norm gg' | startinsert! - augroup END - augroup slime - au! BufNewFile,BufRead *.slimleex set syntax=slim - augroup END ]] From 112b157f2f7dd36b8df490a40179f644f9eba0e9 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 7 Jul 2021 12:27:05 -0500 Subject: [PATCH 038/103] Undo nvim diff viewier for now since it's broken --- common/git/config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/git/config b/common/git/config index bf05120..de277c2 100644 --- a/common/git/config +++ b/common/git/config @@ -58,11 +58,11 @@ [pager] branch = false # remove ansi codes, pad each file's diff with newlines, show as diff, remove top padding - diff = nvim -c 'silent %sm/\\e[^mK]*[mK]//g' \ - -c 'silent %s/^diff/\\r\\rdiff/' \ - -c 'silent set ft=diff' \ - -c 'silent execute \"normal gg2dd\"' \ - -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' + # diff = nvim -c 'silent %sm/\\e[^mK]*[mK]//g' \ + # -c 'silent %s/^diff/\\r\\rdiff/' \ + # -c 'silent set ft=diff' \ + # -c 'silent execute \"normal gg2dd\"' \ + # -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' [url "git@github.com:postmates"] insteadOf = https://github.com/postmates From 3f4c5e6d2ce7cd8a2eeb448b3a046aeb4b6c5715 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 8 Jul 2021 09:39:31 -0500 Subject: [PATCH 039/103] Re-add my basic coc config for elixir --- common/neovim/coc-settings.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 common/neovim/coc-settings.json diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json new file mode 100644 index 0000000..b840e05 --- /dev/null +++ b/common/neovim/coc-settings.json @@ -0,0 +1,9 @@ +{ + "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs"], + "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", + "diagnostic-languageserver.filetypes": { + "elixir": ["mix_credo", "mix_credo_compile"], + "eelixir": ["mix_credo", "mix_credo_compile"] + } +} + From ae33b20c6536b6d5371797f2518b33776bd1d423 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 13 Jul 2021 01:10:51 -0500 Subject: [PATCH 040/103] Switch to custom Iosevka font, other fixes --- common/bin/dns-cleaner | 2 +- common/bin/dns-deleter | 9 ++++- common/bin/dns-deleter-matching | 11 ++++++ common/colors/vconsole | 48 ------------------------ common/fish/config.fish | 1 - common/kitty/kitty.conf | 14 ++++--- common/{colors/shell => terminal_colors} | 0 7 files changed, 28 insertions(+), 57 deletions(-) create mode 100644 common/bin/dns-deleter-matching delete mode 100755 common/colors/vconsole rename common/{colors/shell => terminal_colors} (100%) diff --git a/common/bin/dns-cleaner b/common/bin/dns-cleaner index 442b141..7b065de 100755 --- a/common/bin/dns-cleaner +++ b/common/bin/dns-cleaner @@ -4,4 +4,4 @@ set -x -e API="https://api.netlify.com/api/v1" TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" URL="$API/dns_zones/lyte_dev/dns_records?access_token=$TOKEN" -curl -sL "$URL" > /tmp/zone.json +curl -vvv -sL "$URL" > /tmp/zone.json diff --git a/common/bin/dns-deleter b/common/bin/dns-deleter index 953fef1..c4e92af 100755 --- a/common/bin/dns-deleter +++ b/common/bin/dns-deleter @@ -2,10 +2,15 @@ API="https://api.netlify.com/api/v1" TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" +counter=0 while read -r l; do - set -x -e + counter=$((counter+1)) ID="$(echo $l | awk '{print $2}')" URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" - curl -X DELETE -sL "$URL" & + curl -vvv -X DELETE -sL "$URL" 2>&1 | grep 'ratelimit-remaining' & + echo "counter: $counter" + jq 'del(.[] | select(.id == "'$ID'"))' /tmp/zone.json > /tmp/zone2.json + mv /tmp/zone2.json /tmp/zone.json + [ $counter -gt 480 ] && break done wait diff --git a/common/bin/dns-deleter-matching b/common/bin/dns-deleter-matching new file mode 100644 index 0000000..cf6c334 --- /dev/null +++ b/common/bin/dns-deleter-matching @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +API="https://api.netlify.com/api/v1" +TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" +while read -r l; do + set -x -e + ID="$(echo $l | awk '{print $2}')" + URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" + curl -X DELETE -sL "$URL" +done +wait diff --git a/common/colors/vconsole b/common/colors/vconsole deleted file mode 100755 index 0d95e6a..0000000 --- a/common/colors/vconsole +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -black="111111" # black -red="f92672" # red -green="a6e22e" # green -yellow="f4bf75" # yellow -blue="66d9ef" # blue -magenta="ae81ff" # magenta -cyan="a1efe4" # cyan -white="cccccc" # white -black2="75715e" # black2 -white2="f8f8f8" # white2 - -c() { - c="${1}"; shift - for n in "$@"; do - printf "\e]P%d%s" "$n" "$c"; - done -} - -c $black 0 -c $red 1 9 -c $green 2 A -c $yellow 3 B -c $blue 4 C -c $magenta 5 D -c $cyan 6 E -c $white 7 -c $black2 8 -c $white2 F - -if [ -x /sbin/clear ]; then - /sbin/clear -else - printf "\e[H\e[2J" -fi - -unset -f c -unset black -unset red -unset green -unset yellow -unset blue -unset magenta -unset cyan -unset white -unset black2 -unset white2 diff --git a/common/fish/config.fish b/common/fish/config.fish index 68d5af2..c29afb8 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -13,7 +13,6 @@ end status --is-interactive || exit -test (uname) = Linux && $DOTFILES_PATH/common/colors/vconsole for f in key-bindings colors prompt aliases source $FISH_PATH/$f.fish end diff --git a/common/kitty/kitty.conf b/common/kitty/kitty.conf index 3901a49..3f6429c 100644 --- a/common/kitty/kitty.conf +++ b/common/kitty/kitty.conf @@ -1,16 +1,20 @@ -font_family Iosevka -bold_font Iosevka Heavy +font_family iosevkalyte +# bold_font Iosevka Heavy +# italic_font Iosevka Italic +# bold_italic_font Iosevka Heavy Italic font_size 11.0 -font_features Iosevka -calt +FSTA +MTLB +HSKL +JSPT +dlig +# use `kitty + list-fonts --psnames` to get the font's PostScript name +# font_features IosevkaLyte +# font_features Iosevka-Heavy +calt +dlig +# font_features Iosevka-Italic +calt +dlig +# font_features Iosevka-Heavy-Italic +calt +dlig allow_remote_control yes repaint_delay 5 input_delay 5 sync_to_monitor yes -disable_ligatures always - adjust_line_height 0 window_padding_width 10.0 window_margin_width 0.0 diff --git a/common/colors/shell b/common/terminal_colors similarity index 100% rename from common/colors/shell rename to common/terminal_colors From e0bcf03ce4a934395f43cc1bfbd24db745c4ece7 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 15 Jul 2021 02:35:38 -0500 Subject: [PATCH 041/103] Have keybindings for both launchers until I figure out what to do --- os/linux/sway/config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/os/linux/sway/config b/os/linux/sway/config index 8b6bf94..3dfa05e 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -41,13 +41,14 @@ input type:touchpad { } bindsym $mod+control+space exec makoctl dismiss -bindsym $mod+shift+space exec makoctl invoke +# bindsym $mod+shift+space exec makoctl invoke bindsym $mod+return exec kitty --single-instance bindsym $mod+shift+return exec floating-term bindsym $mod+shift+alt+return exec kitty bindsym $mod+c kill bindsym $mod+shift+c kill # TODO: kill -9? -bindsym $mod+space exec wofi --show drun +bindsym $mod+shift+space exec wofi --show drun +bindsym $mod+space exec app-launcher bindsym $mod+shift+s exec clipshot bindsym $mod+e exec thunar bindsym $mod+shift+r reload From aadcbd23ba59c4d13bb27c28d31d48cee06e408f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 16 Jul 2021 21:38:18 -0500 Subject: [PATCH 042/103] Add cue --- common/neovim/lua/plugins.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index 48d4414..70ab795 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -31,6 +31,7 @@ local setup = function() {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}}, 'neovim/nvim-lspconfig', 'hrsh7th/nvim-compe', + 'jjo/vim-cue', 'sheerun/vim-polyglot', {'neoclide/coc.nvim', branch = 'release'}, } From e4809c0baf423166e972952aa11ecdc8bff2930c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 19 Jul 2021 21:02:01 -0500 Subject: [PATCH 043/103] Migrate to pass's otp extension --- common/bin/pass-migrate-to-pass-otp | 6 ++++++ common/bin/pass-otp | 14 ++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100755 common/bin/pass-migrate-to-pass-otp diff --git a/common/bin/pass-migrate-to-pass-otp b/common/bin/pass-migrate-to-pass-otp new file mode 100755 index 0000000..a6979aa --- /dev/null +++ b/common/bin/pass-migrate-to-pass-otp @@ -0,0 +1,6 @@ +#!/usr/bin/env fish + +set entry $argv[1] +set otp_secret (pass $entry | awk -F': ' '/^otp/{gsub(/\s/,"",$2);print $2}') +set otp_uri "otpauth://totp/totp-secret?secret=$otp_secret&issuer=$entry" +echo $otp_uri | pass otp append $entry diff --git a/common/bin/pass-otp b/common/bin/pass-otp index 023a8d3..f5e81af 100755 --- a/common/bin/pass-otp +++ b/common/bin/pass-otp @@ -1,12 +1,6 @@ #!/usr/bin/env bash -# TODO: check for pass - -key="$1"; shift -args=("$@") - -otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp' | cut -d ':' -f 2 | sed 's/ //g')" -otp_status="$?" -[[ $otp_status != 0 ]] && { echo "pass command failed with exit code $otp_status"; exit 1; } -[[ -z $otp ]] && { echo "No OTP secret found for pass entry '$key'"; exit 2; } -simple-otp "$otp" +echo 'This script is deprecated. Install and use the pass-otp extension. + yay -S pass-otp + pass otp $args' +exit 1 From ada22cdc5d663b6da1cb49691a541210212f124b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 19 Jul 2021 22:34:33 -0500 Subject: [PATCH 044/103] Options --- common/bin/pass-chooser | 2 +- common/neovim/colors/donokai.vim | 1 + common/neovim/lua/options.lua | 11 ++++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common/bin/pass-chooser b/common/bin/pass-chooser index bd5c566..31c385f 100755 --- a/common/bin/pass-chooser +++ b/common/bin/pass-chooser @@ -1,2 +1,2 @@ #!/usr/bin/env sh -env FZFP_HEIGHT="100%" floating-term bash -c "fzfp | head -n 1 | wl-copy &" +env FZFP_HEIGHT="100%" floating-term fish -c "fzfp | head -n 1 | clip &" diff --git a/common/neovim/colors/donokai.vim b/common/neovim/colors/donokai.vim index 48d3a57..51f026d 100644 --- a/common/neovim/colors/donokai.vim +++ b/common/neovim/colors/donokai.vim @@ -19,6 +19,7 @@ hi indentblanklinechar cterm=none ctermfg=236 hi signcolumn cterm=none ctermfg=234 ctermbg=0 hi matchparen cterm=none ctermbg=5 ctermfg=0 hi search cterm=bold ctermbg=4 +hi incsearch cterm=bold ctermbg=4 hi todo cterm=none ctermfg=7 ctermbg=240 hi comment cterm=none ctermfg=240 diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 4c82096..2f81dea 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -72,8 +72,9 @@ function SynGroup() print(vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name')) end -vim.api.nvim_command[[ - au! FileType gitcommit exec 'norm gg' | startinsert! - au! BufNewFile,BufRead *.slimleex set syntax=slim - command! W write -]] +print(vim.api.nvim_exec([[ +au! TextYankPost * silent! lua vim.highlight.on_yank { higroup='Search', timeout=200 } +au! FileType gitcommit exec 'norm gg' | startinsert! +au! BufNewFile,BufRead *.slimleex set syntax=slime +command! W write +]], true)) From 4612634b21d97b65bf531e158fbf76ff1d983880 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 22 Jul 2021 18:51:27 -0500 Subject: [PATCH 045/103] Stuff --- common/neovim/coc-settings.json | 2 +- common/neovim/lua/options.lua | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index b840e05..6d4b2ee 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -1,5 +1,5 @@ { - "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs"], + "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "js", "jsx", "ts", "tsx", "svelte", "css", "markdown"], "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", "diagnostic-languageserver.filetypes": { "elixir": ["mix_credo", "mix_credo_compile"], diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 2f81dea..115e859 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -7,10 +7,19 @@ local globals = { indent_blankline_filetype_exclude = {'help', 'packer'}, indent_blankline_buftype_exclude = {'terminal', 'nofile'}, indent_blankline_char_highlight = 'LineNr', + svelte_preprocessors = {'typescript', 'coffeescript', 'sass', 'pug'}, + svelte_preprocessor_tags = { + {name = 'sass', tag = 'lang', as = 'sass'}, + {name = 'coffeescript', tag = 'lang', as = 'coffeescript'}, + {name = 'pug', tag = 'pug', as = 'pug'}, + }, + svelte_indent_script = 0, + svelte_indent_style = 0, } for k,v in pairs(globals) do vim.g[k] = v end local options = { + clipboard = 'unnamedplus', inccommand = 'nosplit', tabstop = 2, softtabstop = 2, From 245a0a97441cfbfd788b5ac6ef9f14ab5b12d43e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 24 Sep 2021 13:06:43 -0500 Subject: [PATCH 046/103] Stuff? --- common/bin/dns-cleaner | 7 - common/bin/dns-deleter | 26 ++- common/bin/dns-deleter-matching | 0 common/fish/aliases.fish | 1 + common/fish/completions/nvm.fish | 19 ++ common/fish/conf.d/nvm.fish | 28 +++ common/fish/config.fish | 2 + common/fish/functions/_nvm_index_update.fish | 12 + common/fish/functions/_nvm_list.fish | 11 + .../fish/functions/_nvm_version_activate.fish | 4 + .../functions/_nvm_version_deactivate.fish | 5 + common/fish/functions/nvm.fish | 206 ++++++++++++++++++ common/fish/paths.fish | 1 + common/git/config | 24 +- common/mutt/rc | 6 + common/neovim/coc-settings.json | 10 +- os/linux/kanshi/config | 3 - os/linux/kanshi/desktop-H-workspaces.sh | 9 +- os/linux/sway/config | 3 + os/linux/waybar/config | 2 +- readme.md | 70 +++--- 21 files changed, 376 insertions(+), 73 deletions(-) mode change 100644 => 100755 common/bin/dns-deleter-matching create mode 100644 common/fish/completions/nvm.fish create mode 100644 common/fish/conf.d/nvm.fish create mode 100644 common/fish/functions/_nvm_index_update.fish create mode 100644 common/fish/functions/_nvm_list.fish create mode 100644 common/fish/functions/_nvm_version_activate.fish create mode 100644 common/fish/functions/_nvm_version_deactivate.fish create mode 100644 common/fish/functions/nvm.fish diff --git a/common/bin/dns-cleaner b/common/bin/dns-cleaner index 7b065de..e69de29 100755 --- a/common/bin/dns-cleaner +++ b/common/bin/dns-cleaner @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -x -e -API="https://api.netlify.com/api/v1" -TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" -URL="$API/dns_zones/lyte_dev/dns_records?access_token=$TOKEN" -curl -vvv -sL "$URL" > /tmp/zone.json diff --git a/common/bin/dns-deleter b/common/bin/dns-deleter index c4e92af..3df9dd8 100755 --- a/common/bin/dns-deleter +++ b/common/bin/dns-deleter @@ -1,16 +1,22 @@ #!/usr/bin/env bash +hostname="${1}"; shift || { + echo "No hostname arg to delete provided." + exit 1 +} API="https://api.netlify.com/api/v1" TOKEN="$(pass netlify | grep -i token | tr -d ' ' | cut -d ':' -f 2)" counter=0 -while read -r l; do - counter=$((counter+1)) - ID="$(echo $l | awk '{print $2}')" - URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" - curl -vvv -X DELETE -sL "$URL" 2>&1 | grep 'ratelimit-remaining' & - echo "counter: $counter" - jq 'del(.[] | select(.id == "'$ID'"))' /tmp/zone.json > /tmp/zone2.json - mv /tmp/zone2.json /tmp/zone.json - [ $counter -gt 480 ] && break -done +curl -sL "$API/dns_zones/lyte_dev/dns_records?access_token=$TOKEN" | \ + jq -r '.[] | select(.hostname=="'"$hostname"'") | .hostname+": "+.id' | \ + while read -r l; do + counter=$((counter+1)) + ID="$(echo $l | awk '{print $2}')" + URL="$API/dns_zones/lyte_dev/dns_records/$ID?access_token=$TOKEN" + curl -vvv -X DELETE -sL "$URL" 2>&1 | grep 'ratelimit-remaining' & + echo "counter: $counter" + jq 'del(.[] | select(.id == "'$ID'"))' /tmp/zone.json > /tmp/zone2.json + mv /tmp/zone2.json /tmp/zone.json + [ $counter -gt 450 ] && break + done wait diff --git a/common/bin/dns-deleter-matching b/common/bin/dns-deleter-matching old mode 100644 new mode 100755 diff --git a/common/fish/aliases.fish b/common/fish/aliases.fish index 6a682ea..e3b8354 100755 --- a/common/fish/aliases.fish +++ b/common/fish/aliases.fish @@ -111,3 +111,4 @@ alias umount 'sudo -E umount' alias pa pulsemixer alias mail neomutt alias wje work-journal-entry +alias miex 'iex -S mix' diff --git a/common/fish/completions/nvm.fish b/common/fish/completions/nvm.fish new file mode 100644 index 0000000..e94e50c --- /dev/null +++ b/common/fish/completions/nvm.fish @@ -0,0 +1,19 @@ +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" + +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate a version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( + test -e $nvm_data && string split ' ' <$nvm_data/.index +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall a version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( + _nvm_list | string split ' ' | string replace system '' +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( + set --query nvm_default_version && echo default +)" diff --git a/common/fish/conf.d/nvm.fish b/common/fish/conf.d/nvm.fish new file mode 100644 index 0000000..a82c8bd --- /dev/null +++ b/common/fish/conf.d/nvm.fish @@ -0,0 +1,28 @@ +function _nvm_install --on-event nvm_install + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + set --universal nvm_data $XDG_DATA_HOME/nvm + set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist + + test ! -d $nvm_data && command mkdir -p $nvm_data + echo "Downloading the Node distribution index for the first time..." 2>/dev/null + _nvm_index_update $nvm_mirror $nvm_data/.index +end + +function _nvm_update --on-event nvm_update + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + set --universal nvm_data $XDG_DATA_HOME/nvm + set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist +end + +function _nvm_uninstall --on-event nvm_uninstall + command rm -rf $nvm_data + + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + + set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source + functions --erase (functions --all | string match --entire --regex -- "^_nvm_") +end + +status is-interactive && + set --query nvm_default_version && ! set --query nvm_current_version && + nvm use $nvm_default_version >/dev/null diff --git a/common/fish/config.fish b/common/fish/config.fish index c29afb8..afe4a79 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -55,3 +55,5 @@ end if test $PWD = $HOME; or test $PWD = $NICE_HOME; cd $NICE_HOME || cd end + +# test -f '/home/daniel/.home/.config/netlify/helper/path.fish.inc' && source '/home/daniel/.home/.config/netlify/helper/path.fish.inc' diff --git a/common/fish/functions/_nvm_index_update.fish b/common/fish/functions/_nvm_index_update.fish new file mode 100644 index 0000000..9bdd18a --- /dev/null +++ b/common/fish/functions/_nvm_index_update.fish @@ -0,0 +1,12 @@ +function _nvm_index_update --argument-names mirror index + command curl --location --silent $mirror/index.tab | command awk -v OFS=\t ' + /v0.9.12/ { exit } # Unsupported + NR > 1 { + print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "") + } + ' >$index.temp 2>/dev/null && command mv $index.temp $index && return + + command rm -f $index.temp + echo "nvm: Invalid index or unavailable host: \"$mirror\"" >&2 + return 1 +end diff --git a/common/fish/functions/_nvm_list.fish b/common/fish/functions/_nvm_list.fish new file mode 100644 index 0000000..fb5ab0e --- /dev/null +++ b/common/fish/functions/_nvm_list.fish @@ -0,0 +1,11 @@ +function _nvm_list + set --local versions $nvm_data/* + set --query versions[1] && + string match --entire --regex -- (string match --regex -- "v\d.+" $versions | + string escape --style=regex | + string join "|" + ) <$nvm_data/.index + + command --all node | + string match --quiet --invert --regex -- "^$nvm_data" && echo system +end diff --git a/common/fish/functions/_nvm_version_activate.fish b/common/fish/functions/_nvm_version_activate.fish new file mode 100644 index 0000000..b2aee92 --- /dev/null +++ b/common/fish/functions/_nvm_version_activate.fish @@ -0,0 +1,4 @@ +function _nvm_version_activate --argument-names v + set --global --export nvm_current_version $v + set --prepend PATH $nvm_data/$v/bin +end diff --git a/common/fish/functions/_nvm_version_deactivate.fish b/common/fish/functions/_nvm_version_deactivate.fish new file mode 100644 index 0000000..540f697 --- /dev/null +++ b/common/fish/functions/_nvm_version_deactivate.fish @@ -0,0 +1,5 @@ +function _nvm_version_deactivate --argument-names v + test "$nvm_current_version" = "$v" && set --erase nvm_current_version + set --local index (contains --index -- $nvm_data/$v/bin $PATH) && + set --erase PATH[$index] +end diff --git a/common/fish/functions/nvm.fish b/common/fish/functions/nvm.fish new file mode 100644 index 0000000..ee54cf0 --- /dev/null +++ b/common/fish/functions/nvm.fish @@ -0,0 +1,206 @@ +function nvm --argument-names cmd v --description "Node version manager" + if test -z "$v" && contains -- "$cmd" install use + for file in .nvmrc .node-version + set file (_nvm_find_up $PWD $file) && read v <$file && break + end + if test -z "$v" + echo "nvm: Invalid version or missing \".nvmrc\" file" >&2 + return 1 + end + end + + switch "$cmd" + case -v --version + echo "nvm, version 2.2.5" + case "" -h --help + echo "Usage: nvm install Download and activate the specified Node version" + echo " nvm install Install version from nearest .nvmrc file" + echo " nvm use Activate a version in the current shell" + echo " nvm use Activate version from nearest .nvmrc file" + echo " nvm list List installed versions" + echo " nvm list-remote List versions available to install" + echo " nvm list-remote List versions matching a given regular expression" + echo " nvm current Print the currently-active version" + echo " nvm uninstall Uninstall a version" + echo "Options:" + echo " -v or --version Print version" + echo " -h or --help Print this help message" + echo "Variables:" + echo " nvm_arch Override architecture, e.g. x64-musl" + echo " nvm_mirror Set the Node download mirror" + echo " nvm_default_version Set the default version for new shells" + case install + _nvm_index_update $nvm_mirror $nvm_data/.index || return + + string match --entire --regex -- (_nvm_version_match $v) <$nvm_data/.index | read v alias + + if ! set --query v[1] + echo "nvm: Invalid version number or alias: \"$argv[2..-1]\"" >&2 + return 1 + end + + if test ! -e $nvm_data/$v + set --local os (command uname -s | string lower) + set --local ext tar.gz + set --local arch (command uname -m) + + switch $os + case aix + set arch ppc64 + case sunos + case linux + case darwin + case {MSYS_NT,MINGW\*_NT}\* + set os win + set ext zip + case \* + echo "nvm: Unsupported operating system: \"$os\"" >&2 + return 1 + end + + switch $arch + case i\*86 + set arch x86 + case x86_64 + set arch x64 + case arm64 + string match --regex --quiet "v(?\d+)" $v + if test "$os" = darwin -a $major -lt 16 + set arch x64 + end + case armv6 armv6l + set arch armv6l + case armv7 armv7l + set arch armv7l + case armv8 armv8l aarch64 + set arch arm64 + end + + set --query nvm_arch && set arch $nvm_arch + + set --local dir "node-$v-$os-$arch" + set --local url $nvm_mirror/$v/$dir.$ext + + command mkdir -p $nvm_data/$v + + echo -e "Installing Node \x1b[1m$v\x1b[22m $alias" + echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m" + + if ! command curl --progress-bar --location $url \ + | command tar --extract --gzip --directory $nvm_data/$v 2>/dev/null + command rm -rf $nvm_data/$v + echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2 + return 1 + end + + echo -en "\033[F\33[2K\x1b[0m" + + if test "$os" = win + command mv $nvm_data/$v/$dir $nvm_data/$v/bin + else + command mv $nvm_data/$v/$dir/* $nvm_data/$v + command rm -rf $nvm_data/$v/$dir + end + end + + if test $v != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + _nvm_version_activate $v + end + + printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case use + test $v = default && set v $nvm_default_version + _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ + + if ! set --query v[1] + echo "nvm: Node version not installed or invalid: \"$argv[2..-1]\"" >&2 + return 1 + end + + if test $v != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + test $v != system && _nvm_version_activate $v + end + + printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case uninstall + if test -z "$v" + echo "nvm: Not enough arguments for command: \"$cmd\"" >&2 + return 1 + end + + test $v = default && test ! -z "$nvm_default_version" && set v $nvm_default_version + + _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ + + if ! set -q v[1] + echo "nvm: Node version not installed or invalid: \"$argv[2..-1]\"" >&2 + return 1 + end + + printf "Uninstalling Node %s %s\n" $v (string replace ~ \~ "$nvm_data/$v/bin/node") + + _nvm_version_deactivate $v + + command rm -rf $nvm_data/$v + case current + _nvm_current + case ls list + _nvm_list | _nvm_list_format (_nvm_current) $argv[2] + case lsr {ls,list}-remote + _nvm_index_update $nvm_mirror $nvm_data/.index || return + _nvm_list | command awk ' + FILENAME == "-" && (is_local[$1] = FNR == NR) { next } { + print $0 (is_local[$1] ? " โœ“" : "") + } + ' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2] + case \* + echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h)" >&2 + return 1 + end +end + +function _nvm_find_up --argument-names path file + test -e "$path/$file" && echo $path/$file || begin + test "$path" != / || return + _nvm_find_up (command dirname $path) $file + end +end + +function _nvm_version_match --argument-names v + string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $v | + string replace --filter --regex -- '^v?(\d+)' 'v$1' | + string escape --style=regex || + string lower '\b'$v'(?:/\w+)?$' +end + +function _nvm_list_format --argument-names current regex + command awk -v current="$current" -v regex="$regex" ' + $0 ~ regex { + aliases[versions[i++] = $1] = $2 " " $3 + pad = (n = length($1)) > pad ? n : pad + } + END { + if (!i) exit 1 + while (i--) + printf((current == versions[i] ? " โ–ถ " : " ") "%"pad"s %s\n", + versions[i], aliases[versions[i]]) + } + ' +end + +function _nvm_current + command --search --quiet node || return + set --query nvm_current_version && echo $nvm_current_version || echo system +end + +function _nvm_node_info + set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm))) + test -f $npm_path/package.json || set --local npm_version_default (command npm --version) + command node --eval " + console.log(process.version) + console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version) + console.log(process.execPath.replace(require('os').homedir(), '~')) + " +end diff --git a/common/fish/paths.fish b/common/fish/paths.fish index e5256aa..df4bcbb 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -8,6 +8,7 @@ set paths_candidates \ $DOTFILES_PATH/common/bin \ $HOME/.bin \ $HOME/.cargo/bin \ + $HOME/.deno/bin \ $HOME/.nimble/bin \ $HOME/.yarn/bin \ $HOME/.netlify/helper/bin diff --git a/common/git/config b/common/git/config index de277c2..c7a3544 100644 --- a/common/git/config +++ b/common/git/config @@ -64,24 +64,26 @@ # -c 'silent execute \"normal gg2dd\"' \ # -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' -[url "git@github.com:postmates"] - insteadOf = https://github.com/postmates - [commit] gpgsign = true [gpg] program = gpg2 -[include] - path = $ENV_PATH/gitconfig +# [include] + # path = $ENV_PATH/gitconfig [color] ui = auto +[http "https://git-p1ap1.divvy.co"] + proxy = socks://localhost:9982 + +[url "git@git-p1ap1.divvy.co"] + proxy = https://github.com/postmates + +[push] + default = current + # This next lines include Netlify's Git Credential Helper configuration in your Git configuration. -[include] - path = /home/daniel/.home/.netlify/helper/git-config -[init] - defaultBranch = master -[branch] - autoSetupMerge = always +# [include] + # path = /home/daniel/.home/.config/netlify/helper/git-config diff --git a/common/mutt/rc b/common/mutt/rc index 081e601..15c9d39 100644 --- a/common/mutt/rc +++ b/common/mutt/rc @@ -34,16 +34,22 @@ bind pager j half-down bind pager J next-entry bind pager K previous-entry bind index \CR imap-fetch-mail +bind index \CR imap-fetch-mail bind attach,index g first-entry bind attach,index G last-entry macro index,pager A s>y +macro index \' "~R !~D !~F\ ++[Gmail]/All " \ +"Archive" set record = "" set editor = "nvim" set charset = "utf-8" set header_cache = "~/.cache/mutt/headers" set message_cachedir = "~/.cache/mutt/bodies" +set timeout = 60 +set sort = reverse-date set new_mail_command="notify-send 'New Email' '%n new messages, %u unread.' &" diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index 6d4b2ee..cab6783 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -1,5 +1,13 @@ { - "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "js", "jsx", "ts", "tsx", "svelte", "css", "markdown"], + "languageserver": { + "arduino":{ + "command":"/home/daniel/.home/.go/bin/arduino-language-server", + "rootPatterns":["*.ino"], + "filetypes":["arduino"], + "args":["-cli", "/usr/bin/arduino-cli", "-clangd", "/usr/bin/clangd", "-cli-config", "/path/to/arduino-cli.yaml"] + } + }, + "coc.preferences.formatOnSaveFiletypes": ["svelte", "css", "markdown"], "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", "diagnostic-languageserver.filetypes": { "elixir": ["mix_credo", "mix_credo_compile"], diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 85117a8..122209e 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -8,7 +8,6 @@ profile desktop-H-2x4kside2 { profile desktop-H-2x4kside2 { output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 0,1200 scale 1 transform normal output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 3440,0 scale 1 transform 90 - exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } profile desktop-H-2x4kside2 { @@ -29,13 +28,11 @@ profile tv4k { profile desktop-ultrawide { output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,560 scale 1 transform normal - exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-single-workspace.sh" } profile laptop-with-display { output "Sharp Corporation 0x144A 0x00000000" enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal output DP-1 enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal - exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-single-workspace.bash" } profile laptop { diff --git a/os/linux/kanshi/desktop-H-workspaces.sh b/os/linux/kanshi/desktop-H-workspaces.sh index 2cb03a8..91c9cda 100755 --- a/os/linux/kanshi/desktop-H-workspaces.sh +++ b/os/linux/kanshi/desktop-H-workspaces.sh @@ -12,11 +12,8 @@ setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; s set -x -setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8 -setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5 -setup_output 'Samsung Electric Company CF791 HTRJ500315' 3 2 -setup_output 'Dell Inc. DELL U2720Q CWTM623' 7 -setup_output 'Dell Inc. DELL U2720Q D3TM623' 4 -setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 +setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 +setup_output 'Dell Inc. DELL U2720Q D3TM623' 8 +setup_output 'Samsung Electric Company CF791 HTRJ500315' 2 3 4 5 6 7 1 rm "$LOCKFILE" diff --git a/os/linux/sway/config b/os/linux/sway/config index 3dfa05e..6095c33 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -161,6 +161,9 @@ mode "resize" { for_window [app_id="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable +for_window [app_id="zoom"] border none, floating enable +for_window [app_id="zoom" title="^zoom$"] border none, floating enable +bindsym $mod+shift+alt+f for_window [class=".*"] floating toggle for_window [class=".*"] layout floating enable for_window [class=".*"] layout splith diff --git a/os/linux/waybar/config b/os/linux/waybar/config index 5967425..a8f1cab 100644 --- a/os/linux/waybar/config +++ b/os/linux/waybar/config @@ -1,7 +1,7 @@ { "layer": "top", "position": "bottom", - "output": ["eDP-1", "DP-1"], + "output": ["eDP-1", "DP-3"], "height": 32, "modules-left": ["clock"], "modules-center": ["sway/workspaces"], diff --git a/readme.md b/readme.md index 01c73f5..1be64d2 100644 --- a/readme.md +++ b/readme.md @@ -10,16 +10,16 @@ like. # Dependencies -+ `fish` -+ `bat` -+ `fd` -+ `sd` -+ `fzf` -+ `tmux` -+ `rsync` -+ `exa` -+ `nnn` -+ `nvim` +- `fish` +- `bat` +- `fd` +- `sd` +- `fzf` +- `tmux` +- `rsync` +- `exa` +- `nnn` +- `nvim` # Setup @@ -35,33 +35,35 @@ dotfiles-setup # Basic Usage - - # To Do -+ Layered gitconfig? -+ Get out of Google! - + `calcurse` for Calendar management? - + `aerc` or `neomutt` for email? - + My home-grown backup network for Drive? - + Photos? -+ Hibernation and proper power management for laptop? -+ **Learn to use `journalctl`** -+ Fix sway workspaces on desktop? -+ Neovim LSP -+ Move to NixOS (WIP) or Guix? Declarative is the future! -+ Better/more secure remote management configuration in dotfiles? [1][1] -+ Setup network file share? -+ Home VPN -+ Add vim in the terminal as the handler for many MIME types (xdg-open and such) - for the rare time I'm in a file manager or for opening easily from - the browser. - + This goes for navigating "into" a file in `nnn` -+ Unify all the common variables... somehow? (and use templates and `envsubst`?) -+ [Vimux](https://github.com/benmills/vimux)? -+ Investigate systemd services that may help with various tasks (homed, etc.) -+ Be more macOS friendly, since work may require that +- Wifi + Home DNS +- Rotate/switch gpg keys and password-store, setup properly on phone + - Maybe something age/sops-based? + +- Layered gitconfig? +- Get out of Google! + - `calcurse` for Calendar management? + - `aerc` or `neomutt` for email? + - My home-grown backup network for Drive? + - Photos? +- Hibernation and proper power management for laptop? +- **Learn to use `journalctl`** +- Fix sway workspaces on desktop? +- Neovim LSP +- Move to NixOS (WIP) or Guix? Declarative is the future! +- Better/more secure remote management configuration in dotfiles? [1][1] +- Setup network file share? +- Home VPN +- Add vim in the terminal as the handler for many MIME types (xdg-open and such) + for the rare time I'm in a file manager or for opening easily from + the browser. + - This goes for navigating "into" a file in `nnn` +- Unify all the common variables... somehow? (and use templates and `envsubst`?) +- [Vimux](https://github.com/benmills/vimux)? +- Investigate systemd services that may help with various tasks (homed, etc.) +- Be more macOS friendly, since work may require that [upstream]: https://git.faceless.lytedev.io/lytedev/dotfiles [github]: https://github.com/lytedev/dotfiles From 2b5e04de44b30b5fb095237fe8745ef29b7b77d3 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 4 Oct 2021 09:13:52 -0500 Subject: [PATCH 047/103] Remove private url --- common/fish/aliases.fish | 3 +-- common/fish/paths.fish | 1 + common/git/config | 4 ++++ common/htop/rc | 15 ++++++++++----- common/neovim/coc-settings.json | 2 +- os/linux/bin/wm | 2 +- os/linux/kanshi/config | 13 +++++++------ os/linux/sway/config | 1 + 8 files changed, 26 insertions(+), 15 deletions(-) diff --git a/common/fish/aliases.fish b/common/fish/aliases.fish index 6a682ea..39705a2 100755 --- a/common/fish/aliases.fish +++ b/common/fish/aliases.fish @@ -100,8 +100,7 @@ alias sctlu "systemctl --user" alias bt "sctl start bluetooth && sudo bluetoothctl" alias btctl "bt" alias resrc "source $XDG_CONFIG_HOME/fish/config.fish; fish_user_key_bindings" -alias sc "sc-im" -alias scs "sc-im $NOTES_PATH/_scratch.sc" +alias scs "sc $NOTES_PATH/_scratch.sc" alias disks "lsblk && df -h" alias dd "dd status=progress" alias wifi "sudo iwctl" diff --git a/common/fish/paths.fish b/common/fish/paths.fish index e5256aa..df4bcbb 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -8,6 +8,7 @@ set paths_candidates \ $DOTFILES_PATH/common/bin \ $HOME/.bin \ $HOME/.cargo/bin \ + $HOME/.deno/bin \ $HOME/.nimble/bin \ $HOME/.yarn/bin \ $HOME/.netlify/helper/bin diff --git a/common/git/config b/common/git/config index de277c2..79cd1fc 100644 --- a/common/git/config +++ b/common/git/config @@ -75,6 +75,10 @@ [include] path = $ENV_PATH/gitconfig + +[include] + path = $HOME/.config/lytedev-env/divvy/gitconfig + [color] ui = auto diff --git a/common/htop/rc b/common/htop/rc index 9e52749..0914ef8 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -1,8 +1,10 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. +htop_version=3.1.0 +config_reader_min_version=2 fields=0 48 17 18 38 39 40 2 46 47 49 1 sort_key=46 -sort_direction=1 +sort_direction=-1 tree_sort_key=0 tree_sort_direction=1 hide_kernel_threads=1 @@ -11,6 +13,7 @@ shadow_other_users=0 show_thread_names=0 show_program_path=0 highlight_base_name=1 +highlight_deleted_exe=1 highlight_megabytes=1 highlight_threads=1 highlight_changes=0 @@ -20,6 +23,7 @@ strip_exe_from_cmdline=1 show_merged_command=0 tree_view=0 tree_view_always_by_pid=0 +all_branches_collapsed=0 header_margin=1 detailed_cpu_time=0 cpu_count_from_one=1 @@ -32,8 +36,9 @@ account_guest_in_cpu_meter=0 color_scheme=0 enable_mouse=1 delay=15 -left_meters=LeftCPUs2 Memory Swap -left_meter_modes=1 1 1 -right_meters=RightCPUs2 Tasks LoadAverage Uptime -right_meter_modes=1 2 2 2 hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=LeftCPUs2 Memory Swap +column_meter_modes_0=1 1 1 +column_meters_1=RightCPUs2 Tasks LoadAverage Uptime +column_meter_modes_1=1 2 2 2 diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index b840e05..37ba1f8 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -1,5 +1,5 @@ { - "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs"], + "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "typescript"], "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", "diagnostic-languageserver.filetypes": { "elixir": ["mix_credo", "mix_credo_compile"], diff --git a/os/linux/bin/wm b/os/linux/bin/wm index bd3ce33..60795af 100755 --- a/os/linux/bin/wm +++ b/os/linux/bin/wm @@ -1,2 +1,2 @@ #!/usr/bin/env sh -"$(dirname $0)/../sway/init" +exec "$(dirname "$0")/../sway/init" diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 85117a8..ce004b8 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -1,3 +1,10 @@ +profile laptop-with-display2 { + output "Samsung Electric Company SAMSUNG 0x00000F00" enable mode 1280x720@60Hz position 0,0 scale 1 transform normal + + output eDP-1 enable position 1280,0 scale 2 transform normal + exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-single-workspace.bash" +} + profile desktop-H-2x4kside2 { output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1 transform 270 output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 2160,1200 scale 1 transform normal @@ -32,12 +39,6 @@ profile desktop-ultrawide { exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-single-workspace.sh" } -profile laptop-with-display { - output "Sharp Corporation 0x144A 0x00000000" enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal - output DP-1 enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal - exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-single-workspace.bash" -} - profile laptop { output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal } diff --git a/os/linux/sway/config b/os/linux/sway/config index 3dfa05e..545bcb4 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -175,6 +175,7 @@ bar { exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec mako exec pipewire +exec /usr/lib/kdeconnectd exec gammastep -t 6500:3500 -l 39.0:-94.5 exec_always 'killall kanshi; kanshi' From 441003f265397794d8ff91b92673b47bd01aa0e7 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 4 Oct 2021 09:18:12 -0500 Subject: [PATCH 048/103] Remove private url --- common/git/config | 6 ------ 1 file changed, 6 deletions(-) diff --git a/common/git/config b/common/git/config index 8794af2..571c598 100644 --- a/common/git/config +++ b/common/git/config @@ -79,11 +79,5 @@ [color] ui = auto -[http "https://git-p1ap1.divvy.co"] - proxy = socks://localhost:9982 - -[url "git@git-p1ap1.divvy.co"] - proxy = https://github.com/postmates - [push] default = current From 8057ec3c3c0b19bdd8d9046702a7981f2dd5f7fe Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 25 Oct 2021 10:24:26 -0500 Subject: [PATCH 049/103] update desktop --- os/linux/kanshi/config | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 122209e..9518c7d 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -1,7 +1,7 @@ profile desktop-H-2x4kside2 { - output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1 transform 270 + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 0,0 scale 1 transform 270 output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 2160,1200 scale 1 transform normal - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 5600,0 scale 1 transform 90 + output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 5600,0 scale 1 transform 90 exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } @@ -21,6 +21,11 @@ profile desktop-H-2x4kside2 { # exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" # } +profile tv4ktest { + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 0,900 scale 1.5 transform normal + output "Samsung Electric Company SyncMaster H1AK500000" enable mode 3840x2160@60Hz position 2560,0 scale 1.0 transform normal +} + profile tv4k { output "Samsung Electric Company CF791 HTRJ500315" disable output "Samsung Electric Company SyncMaster H1AK500000" enable mode 4096x2160@60Hz position 0,0 scale 1 transform normal From c6b19fcbb44fab5a82fe2ee8cab12f505b048b47 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 29 Oct 2021 11:32:16 -0500 Subject: [PATCH 050/103] Basic backup scripts fixed up --- common/bin/backupify | 52 ++++++++++++++++++++++++++++------------- common/bin/unbackupify | 49 ++++++++++++++++++++++++++++---------- common/kitty/kitty.conf | 13 ++++++----- 3 files changed, 80 insertions(+), 34 deletions(-) diff --git a/common/bin/backupify b/common/bin/backupify index 0bc4a07..16e45ab 100755 --- a/common/bin/backupify +++ b/common/bin/backupify @@ -1,26 +1,46 @@ #!/usr/bin/env fish -set host rift -set dir /storage/daniel/backups -set ext .tar.zstd.gpg +# deps: fish, zstd, gpg, ssh + +set -q HOST || set HOST (head -n 1 /etc/hostname | tr -d '\n') + +# use the backup-host in the ~/.ssh/config as the default backup remote host +set -q BACKUP_REMOTE_HOST || set BACKUP_REMOTE_HOST backup-host + +# use a user-specific dir by default to backup to +set -q BACKUP_REMOTE_DIR || set BACKUP_REMOTE_DIR "/storage/"(whoami)"/backups/$HOST" + +set BACKUP_FILE_EXT .tar.zstd.gpg if not set -q argv[1] - echo "No directory provided" + echo "No target file or directory provided" exit 2 end -if not test -d $argv[1] - echo "Invalid directory given: $argv[1]" + +set target $argv[1] +if not test -d $target + echo "Target '$target' is not a directory" exit 1 end -set fn (date +%Y%m%d_%H%M%S)(basename $argv[1]) -pushd (dirname $argv[1]) + +set remote_path + +pushd (dirname $target) >/dev/null # TODO: progress bar/status? -echo "Streaming PGP encrypted backup of $argv[1] to host rift via ssh at $dir/$fn$ext..." -tar cvf - (basename $argv[1]) 2>/dev/null | - zstd --ultra -T2 -22 | - gpg --encrypt --recipient daniel@lyte.dev | - ssh $host "cat - > $dir/$fn$ext" -popd + set friendly_target (pwd) + set path_friendly_target (pwd | cut -c2- | string replace -a / %) + set backup_file_name (date +%Y-%m-%d_%H-%M-%S)_"$path_friendly_target" + + set remote_path "$BACKUP_REMOTE_DIR/$backup_file_name$BACKUP_FILE_EXT" + echo "Streaming PGP encrypted backup of $friendly_target to SSH host $BACKUP_REMOTE_HOST at $remote_path" + ssh $BACKUP_REMOTE_HOST "mkdir -p $BACKUP_REMOTE_DIR" + # TODO: progress indicator? + tar cf - . | + zstd --ultra -T2 -22 | + gpg --encrypt --recipient daniel@lyte.dev | + ssh $BACKUP_REMOTE_HOST "cat - > $remote_path" +popd >/dev/null + # TODO: checksum? -echo "Uploaded to host rift via ssh at $dir/$fn$ext" -echo ' Run `unbackupify '$fn$ext'` to restore!' +echo "Uploaded to host rift via ssh at $remote_path" +echo " Run 'unbackupify \"$backup_file_name$BACKUP_FILE_EXT\"' to restore!" diff --git a/common/bin/unbackupify b/common/bin/unbackupify index 92a8e6e..aa05137 100755 --- a/common/bin/unbackupify +++ b/common/bin/unbackupify @@ -1,18 +1,43 @@ #!/usr/bin/env fish -set host rift -set dir /storage/daniel/backups -set ext .tar.zstd.gpg +# deps: fish, zstd, gpg, ssh -if not set -q argv[1] - echo "No backup filename provided" - exit 2 +set -q HOST || set HOST (head -n 1 /etc/hostname | tr -d '\n') + +# use the backup-host in the ~/.ssh/config as the default backup remote host +set -q BACKUP_REMOTE_HOST || set BACKUP_REMOTE_HOST backup-host + +# use a user-specific dir by default to backup to +set -q BACKUP_REMOTE_DIR || set BACKUP_REMOTE_DIR "/storage/"(whoami)"/backups/$HOST" + +set BACKUP_FILE_EXT .tar.zstd.gpg + +set target $argv[1] +if test $target = '--list-backup-files' + ssh $BACKUP_REMOTE_HOST "command ls -1 $BACKUP_REMOTE_DIR" + exit 0 +else if test (count $argv) -lt 1 + echo "No remote backup filename provided (use --list-backup-files to show)" + exit 1 end + # TODO: autocomplete? # TODO: checksum? -set fn $argv[1] -ssh $host "cat $dir/$fn$ext" | - gpg --decrypt | - zstd --ultra -T2 -22 -dc | - tar -xvf - -echo "Restored!" +# TODO: progress indicator? + +set local_dir (echo $target | awk -F. '{print $1}') +mkdir $local_dir || begin + echo "Local unbackup directory '$local_dir' exists" + exit 2 +end + +pushd $local_dir >/dev/null + + ssh $BACKUP_REMOTE_HOST "cat $BACKUP_REMOTE_DIR/$target" | + gpg --decrypt 2>/dev/null | + zstd --ultra -T2 -22 -dc | + tar -xf - + +popd >/dev/null + +echo "Restored to $local_dir" diff --git a/common/kitty/kitty.conf b/common/kitty/kitty.conf index 3f6429c..29976cb 100644 --- a/common/kitty/kitty.conf +++ b/common/kitty/kitty.conf @@ -1,8 +1,8 @@ -font_family iosevkalyte -# bold_font Iosevka Heavy -# italic_font Iosevka Italic -# bold_italic_font Iosevka Heavy Italic -font_size 11.0 +font_family IosevkaLyte +bold_font IosevkaLyte Heavy +italic_font IosevkaLyte Italic +bold_italic_font IosevkaLyte Heavy Italic +font_size 12.5 # use `kitty + list-fonts --psnames` to get the font's PostScript name # font_features IosevkaLyte @@ -23,8 +23,9 @@ map ctrl+shift+equal change_font_size all +0.5 map ctrl+shift+minus change_font_size all -0.5 map shift+insert paste_from_clipboard map ctrl+shift+v paste_from_selection +map ctrl+shift+c copy_to_clipboard -enable_audio_bell no +enable_audio_bell yes url_style single From 6b374f6278997e250b924d0b5e520b6034db9341 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 12:01:43 -0500 Subject: [PATCH 051/103] Cleanup --- common/bash/rc | 9 ++ common/bin/arch-in-docker | 7 + common/bin/dotfiles-clone-and-setup | 8 ++ common/bin/dotfiles-setup | 7 +- common/bin/editscrot | 5 +- common/bin/ltl | 13 -- common/bin/ltld | 13 -- common/bin/scount | 6 - common/fish/aliases.fish | 113 ---------------- common/fish/colors.fish | 11 -- common/fish/config.fish | 43 +------ common/fish/functions.fish | 164 ++++++++++++++++++++++++ common/fish/key-bindings.fish | 35 +---- common/fish/paths.fish | 89 +++++++------ common/fish/prompt.fish | 17 +-- common/fish/vars.fish | 24 ++++ common/htop/rc | 4 +- common/neovim/colors/base16-donokai.vim | 2 +- os/linux/config.d.fish | 5 + os/linux/sway/init | 34 +++-- readme.md | 83 ++++++------ 21 files changed, 354 insertions(+), 338 deletions(-) create mode 100644 common/bash/rc create mode 100755 common/bin/arch-in-docker create mode 100644 common/bin/dotfiles-clone-and-setup delete mode 100755 common/bin/ltl delete mode 100755 common/bin/ltld delete mode 100755 common/bin/scount delete mode 100755 common/fish/aliases.fish mode change 100755 => 100644 common/fish/colors.fish create mode 100644 common/fish/functions.fish mode change 100755 => 100644 common/fish/key-bindings.fish mode change 100755 => 100644 common/fish/paths.fish mode change 100755 => 100644 common/fish/prompt.fish create mode 100644 common/fish/vars.fish create mode 100644 os/linux/config.d.fish diff --git a/common/bash/rc b/common/bash/rc new file mode 100644 index 0000000..8412f44 --- /dev/null +++ b/common/bash/rc @@ -0,0 +1,9 @@ +# return if not running interactively +[[ $- != *i* ]] && return + +command -v fish >/dev/null 2>&1 && grep fish /etc/shells >/dev/null 2>&1 && { + echo "This user is configured to use 'fish' as its primary shell." + echo " You may want to run 'chsh' and set your shell to $(grep fish /etc/shells | head -n1)'." + echo " You may also temporarily use fish by simply running 'fish'." + echo " If you're in bash for intentionally for some reason, then ignore this message." +} diff --git a/common/bin/arch-in-docker b/common/bin/arch-in-docker new file mode 100755 index 0000000..54edeec --- /dev/null +++ b/common/bin/arch-in-docker @@ -0,0 +1,7 @@ +#!/usr/bin/env fish + +if test (count $argv) -lt 2 + docker run -it --rm archlinux bash +else + docker run -it --rm $argv[1..-2] archlinux $argv[-1] +end diff --git a/common/bin/dotfiles-clone-and-setup b/common/bin/dotfiles-clone-and-setup new file mode 100644 index 0000000..5d90580 --- /dev/null +++ b/common/bin/dotfiles-clone-and-setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +command -v git >/dev/null 2>&1 || { echo "git not installed"; exit 1; } +command -v fish >/dev/null 2>&1 || { echo "fish not installed"; exit 2; } + +mkdir -p "$HOME/.config" +git clone https://git.lyte.dev/lytedev/dotfiles.git "$HOME/.config/lytedev-dotfiles" +exec "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 4a29504..b8cd790 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -7,8 +7,8 @@ set dfp (realpath (dirname (status -f))/../..) set lock_file $HOME/.using-lytedev-dotfiles.lock if not test -f $lock_file - echo This will delete existing files. Make sure you know what you\'re doing. - printf 'Are you sure you want to continue? [y/N] ' + echo "This will delete existing files. Make sure you know what you're doing." + echo 'Are you sure you want to continue? [y/N]' read response set response (string lower $response) if string match $response y @@ -38,6 +38,7 @@ end pushd $dfp l common/tmux/conf $h/.tmux.conf l common/fish $c/fish +l common/bash/rc $h/.bashrc l common/neovim $c/nvim l common/wezterm $c/wezterm l common/colors/vim $c/nvim/colors/base16-donokai.vim @@ -59,6 +60,6 @@ for s in $c/lytedev-env/*/dotfiles-setup.d.fish end # execute the user's shell -set ush (getent passwd $LOGNAME | cut -d: -f7) +set ush (getent passwd (whoami) | cut -d: -f7) echo "Dotfiles Installed! Don't forget to setup environments!" exec $ush diff --git a/common/bin/editscrot b/common/bin/editscrot index b4bfe63..1fe6f6c 100755 --- a/common/bin/editscrot +++ b/common/bin/editscrot @@ -1,2 +1,3 @@ -#!/usr/bin/env bash -krita "$(ltl "$NICE_HOME/img/scrots/")" +#!/usr/bin/env sh +opener="$(command -v xdg-open 2>&1 >/dev/null && echo "xdg-open" || echo "open")" +exec nohup "$opener" "$NICE_HOME/img/scrots/$(ls -t "$NICE_HOME/img/scrots/" | head -n1)" >/dev/null 2>&1 & diff --git a/common/bin/ltl b/common/bin/ltl deleted file mode 100755 index 4f3414f..0000000 --- a/common/bin/ltl +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env fish - -# Echoes the newest file in the specified directory (or current directory if none is given) - -set d $argv[1] . -set -l l "" -for f in $d[1]/* - if test -z $l; set l $f; continue; end - if command test $f -nt $l; and test ! -d $f - set l $f - end -end -echo $l diff --git a/common/bin/ltld b/common/bin/ltld deleted file mode 100755 index 35bd118..0000000 --- a/common/bin/ltld +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env fish - -# Echoes the newest subdirectory in the specified directory (or current directory if none is given) - -set d $argv[1] . -set -l l "" -for f in $d[1]/* - if test -z $l; set l $f; continue; end - if command test $f -nt $l; and test -d $f - set l $f - end -end -echo $l diff --git a/common/bin/scount b/common/bin/scount deleted file mode 100755 index 9454c83..0000000 --- a/common/bin/scount +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env fish - -# Silent count - -count $argv > /dev/null - diff --git a/common/fish/aliases.fish b/common/fish/aliases.fish deleted file mode 100755 index 34336ab..0000000 --- a/common/fish/aliases.fish +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env fish - -alias ls 'exa --group-directories-first' -alias tree 'ls --tree --level=3' -alias lA 'ls -a' -alias ll 'ls -l' -alias la 'll -a' -alias lt 'll -s modified' -alias lT 'lt -r' -alias lc 'lt -s accessed' -alias lC 'lc -r' - -set -gx CDPATH $CDPATH . $NICE_HOME - -function d -w cd --description "Quickly jump to NICE_HOME (or given relative or absolute path) and list files." - if scount $argv - cd $argv - else - cd $NICE_HOME - end - la -end - -function c -w cd --description "Quickly jump to a subdirectory of NICE_HOME (or just to NICE_HOME if none given)" - if scount $argv - cd $NICE_HOME && d $argv - else - d $NICE_HOME - end -end - -alias cd.. "d .." -alias cdd "d $DOTFILES_PATH" -alias cde "d $XDG_CONFIG_HOME/lytedev-env" -alias cdc "d $XDG_CONFIG_HOME" -alias cdn "d $NOTES_PATH" -alias cdl "d $XDG_DOWNLOAD_DIR" -alias cdg "d $XDG_GAMES_DIR" -alias .. "d .." -alias ... "d ../.." -alias .... "d ../../.." -alias ..... "d ../../../.." -alias ...... "d ../../../../.." -alias ....... "d ../../../../../.." -alias ........ "d ../../../../../../.." -alias ......... "d ../../../../../../../.." - -function r --wraps nnn --description 'Run nnn with support for jump-to-directory-on-exit via ^G' - # TODO: this would break with multiple nnn instances, right? - # probably need to mktemp instead - set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" - nnn -P p $argv - test -e $NNN_TMPFILE && source $NNN_TMPFILE && rm $NNN_TMPFILE -end -alias l r - -alias t "tmux" -alias rcp 'rsync -r -ah --progress' -alias cat bat - -function g -w git - if scount $argv; git $argv - else; git status; end -end - -alias dlf "docker logs --tail=500 -f" -alias dclf "docker-compose logs --tail=500 -f" -alias ctop "docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest" - -function chat - set -l pass (pass config/weechat-passphrase | head -n 1) - env WEECHAT_PASSPHRASE=$pass weechat -end - -function rgl; rg --color always $argv | less -r; end - -alias k "kubectl" -alias kg "k get" - -alias rg "rg --text" -alias grep "rg" -alias gr "rg" - -alias vim "$EDITOR" -alias vi "$EDITOR" -alias v "$EDITOR" -alias e "$EDITOR" -alias se "sudo -E $EDITOR" -alias sv "sudo -E $EDITOR" -alias svim "se" - -alias vltl "$EDITOR (ltl)" -alias cdltl "cd (ltld)" - -function pp; while not ping -n 1 -t 5 8.8.8.8; sleep 1; end; end -alias p "ping 8.8.8.8" -alias C "clear; set -q TMUX && tmux clear-history || true" -alias sctl "sudo systemctl" -alias sctlu "systemctl --user" -alias bt "sctl start bluetooth && sudo bluetoothctl" -alias btctl "bt" -alias resrc "source $XDG_CONFIG_HOME/fish/config.fish; fish_user_key_bindings" -alias scs "sc $NOTES_PATH/_scratch.sc" -alias disks "lsblk && df -h" -alias dd "dd status=progress" -alias wifi "sudo iwctl" -alias year 'cal (date +%Y)' -alias mount 'sudo -E mount' -alias umount 'sudo -E umount' -alias pa pulsemixer -alias mail neomutt -alias wje work-journal-entry -alias miex 'iex -S mix' diff --git a/common/fish/colors.fish b/common/fish/colors.fish old mode 100755 new mode 100644 index 88164b7..453b05a --- a/common/fish/colors.fish +++ b/common/fish/colors.fish @@ -1,13 +1,3 @@ -#!/usr/bin/env fish - -# TODO: once, I could set backgrounds - -# unused since we handle it ourselves in fish_prompt -set -U fish_color_cwd magenta -set -U fish_color_cwd_root red -set -U fish_color_host normal -set -U fish_color_user blue - set -U fish_color_normal normal # default color set -U fish_color_command white # base command being run (>ls< -la) set -U fish_color_param white # command's parameters @@ -25,7 +15,6 @@ set -U fish_color_selection blue # vi mode visual selection (only fg) set -U fish_color_valid_path yellow # if an argument is a valid path (only -u?) set -U fish_color_comment 666 brblack # comments like this one! -# pager shown when completing set -U fish_pager_color_completion white # main color for pager set -U fish_pager_color_description magenta # color for meta description set -U fish_pager_color_prefix blue # the string being completed diff --git a/common/fish/config.fish b/common/fish/config.fish index afe4a79..38304c8 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -1,11 +1,4 @@ -#!/usr/bin/env fish - -set -Ux XDG_CONFIG_HOME $HOME/.config -set -Ux DOTFILES_PATH $XDG_CONFIG_HOME/lytedev-dotfiles -set -Ux ENV_PATH $XDG_CONFIG_HOME/lytedev-env -set -Ux FISH_PATH $XDG_CONFIG_HOME/fish - -source $FISH_PATH/paths.fish +source (dirname (status --current-filename))/paths.fish for s in $ENV_PATH/*/config.d.fish source $s (dirname $s) @@ -13,32 +6,10 @@ end status --is-interactive || exit -for f in key-bindings colors prompt aliases +for f in vars colors prompt functions key-bindings source $FISH_PATH/$f.fish end -has_command nnn && source $DOTFILES_PATH/common/nnn/config.fish - -set -Ux _JAVA_AWT_WM_NONREPARENTING 1 -set -Ux TERMINAL kitty -set -Ux BROWSER firefox-nightly -set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history -set -Ux LESS "-r" -set -Ux LS_COLORS 'ow=01;36;40' # more sane ls colors -set -Ux EXA_COLORS '*=0' -set -Ux EDITOR nvim -set -Ux VISUAL nvim -set -Ux PAGER less -set -Ux MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_on_startup=0" +Man!' - -function fish_greeting; - set_color -b black brblack - printf "%s@%s %s\n" $USER (hostname) (date) - printf "%6d processes running\n" (ps -aux | wc -l) - has_command free && printf "%6sGB memory available\n" (free -g | grep '^Mem:' | tr -s ' ' | cut -d ' ' -f7) - test -f /proc/sys/kernel/pty/nr && printf "%6d PTYs open\n" (cat /proc/sys/kernel/pty/nr) -end - if has_command brew && test -f (brew --prefix asdf)/lib/asdf.fish set -Ux ASDF_DIR (brew --prefix asdf) source (brew --prefix asdf)/lib/asdf.fish @@ -48,12 +19,4 @@ else if test -f /opt/asdf-vm/asdf.fish source /opt/asdf-vm/asdf.fish end -# assume the user uses "$HOME" to just store their mess of dotfiles and other -# nonsense that clutters it up and that they have a preferred starting -# directory where they keep the stuff they actually care about -# we only do this if the user is opening a shell at $HOME -if test $PWD = $HOME; or test $PWD = $NICE_HOME; - cd $NICE_HOME || cd -end - -# test -f '/home/daniel/.home/.config/netlify/helper/path.fish.inc' && source '/home/daniel/.home/.config/netlify/helper/path.fish.inc' +test $PWD = $HOME && begin; cd $NICE_HOME || cd; end diff --git a/common/fish/functions.fish b/common/fish/functions.fish new file mode 100644 index 0000000..838532e --- /dev/null +++ b/common/fish/functions.fish @@ -0,0 +1,164 @@ +function has_command --wraps=command --description "Exits non-zero if the given command cannot be found" + command --quiet --search $argv[1] +end + +if has_command exa + alias ls 'exa --group-directories-first' + alias tree 'ls --tree --level=3' + alias lt 'll --sort=modified' + alias lc 'lt --sort=accessed' + alias lT 'lt --reverse' + alias lC 'lc --reverse' +end + +alias lA 'ls --all' +alias ll 'ls -l' +alias la 'll --all' + +function scount --wraps=count --description "Silent count exits with a non-zero status if no arguments given to count" + count $argv > /dev/null +end + +function d --wraps=cd --description "Quickly jump to NICE_HOME (or given relative or absolute path) and list files." + if scount $argv + cd $argv + else + cd $NICE_HOME + end + la +end + +function c --wraps=cd --description "Quickly jump to a subdirectory of NICE_HOME (or just to NICE_HOME if none given)" + if scount $argv + cd $NICE_HOME && d $argv + else + d $NICE_HOME + end +end + +alias cd.. "d .." +alias cdd "d $DOTFILES_PATH" +alias cde "d $XDG_CONFIG_HOME/lytedev-env" +alias cdc "d $XDG_CONFIG_HOME" +alias cdn "d $NOTES_PATH" +alias cdl "d $XDG_DOWNLOAD_DIR" +alias cdg "d $XDG_GAMES_DIR" +alias .. "d .." +alias ... "d ../.." +alias .... "d ../../.." +alias ..... "d ../../../.." +alias ...... "d ../../../../.." +alias ....... "d ../../../../../.." +alias ........ "d ../../../../../../.." +alias ......... "d ../../../../../../../.." + +if has_command nnn + function r --wraps nnn --description 'Run nnn with support for jump-to-directory-on-exit via ^G' + # TODO: this would break with multiple nnn instances, right? + # probably need to mktemp instead + set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" + nnn -P p $argv + test -e $NNN_TMPFILE && source $NNN_TMPFILE && rm $NNN_TMPFILE + end + alias l r +end + +has_command tmux && alias t "tmux" +has_command rsync && alias rcp 'rsync -r -ah --progress' +has_command bat && alias cat bat + +if has_command git + function g -w git + if scount $argv; git $argv + else; git status; end + end +end + +if has_command docker + alias dlf "docker logs --tail=500 -f" + alias ctop "docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest" +end + +if has_command docker-compose + alias dclf "docker-compose logs --tail=500 -f" +end + +if has_command weechat + function chat + set -l pass (pass config/weechat-passphrase | head -n 1) + env WEECHAT_PASSPHRASE=$pass weechat + end +end + +if has_command rg + function rgl; rg --color always $argv | less -r; end + alias rg "rg --text" + alias grep "rg" + alias gr "rg" +end + +if has_command kubectl + alias k "kubectl" + alias kg "k get" +end + +alias vim $EDITOR +alias vi $EDITOR +alias v $EDITOR +alias e $EDITOR +alias sv "sudo -E $EDITOR" +alias se sv +alias svim sv + +function ltl --wraps=ls --description "Echoes the name of the file most recently modified either in the current directory or in the given path" + set d $argv[1] . + set -l l "" + for f in $d[1]/* + if test -z $l; set l $f; continue; end + if command test $f -nt $l; and test ! -d $f + set l $f + end + end + echo $l +end + +function ltld --wraps=ls --description "Echoes the name of the directory most recently modified either in the current directory or in the given path" + set d $argv[1] . + set -l l "" + for f in $d[1]/* + if test -z $l; set l $f; continue; end + if command test $f -nt $l; and test -d $f + set l $f + end + end + echo $l +end + +alias vltl "$EDITOR (ltl)" +alias cdltl "cd (ltld)" + +alias p "ping 8.8.8.8" +function pp --description "Keeps trying to ping 8.8.8.8 forever" + while not ping -n 1 -t 5 8.8.8.8 + sleep 1 + end +end + +alias C "clear; set -q TMUX && begin; has_command tmux && tmux clear-history; end || true" + +if has_command systemctl + alias sctl "sudo systemctl" + alias sctlu "systemctl --user" + alias bt "sctl start bluetooth && sudo bluetoothctl" + alias btctl "bt" +end + +alias resrc "source $XDG_CONFIG_HOME/fish/config.fish; fish_user_key_bindings" +has_command sc && alias scs "sc $NOTES_PATH/_scratch.sc" + +alias dd "dd status=progress" +alias year 'cal (date +%Y)' +alias mount 'sudo -E mount' +alias umount 'sudo -E umount' + +has_command xdg-open && alias open xdg-open diff --git a/common/fish/key-bindings.fish b/common/fish/key-bindings.fish old mode 100755 new mode 100644 index b9d39ff..50bcdc9 --- a/common/fish/key-bindings.fish +++ b/common/fish/key-bindings.fish @@ -1,11 +1,7 @@ -#!/usr/bin/env fish - function fish_user_key_bindings - # has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git' - test -f $HOME/.fzf/shell/key-bindings.fish && source $HOME/.fzf/shell/key-bindings.fish - fzf_key_bindings + type -q fzf_key_bindings && fzf_key_bindings fish_vi_key_bindings insert --no-erase set vi_esc "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char force-repaint; end" @@ -23,36 +19,7 @@ function fish_user_key_bindings bind -M insert \cn down-or-search bind -M insert \ce end-of-line bind -M insert \ca beginning-of-line - bind -M insert \cw forward-word bind -M insert \cv edit_command_buffer bind -M default \cv edit_command_buffer - - bind -M insert \ee false - bind -M insert \ev false - bind -M default \ee false - bind -M default \ev false - - bind -M insert --erase \ct - bind -M default --erase \ct - bind --erase \c\t - bind --erase \cs - bind --erase btab - bind --erase --preset -M visual -k btab - bind --erase --preset -M insert -k btab - bind --erase --preset -M default -k btab - bind --erase --preset -k btab - bind --erase -M visual -k btab - bind --erase -M insert -k btab - bind --erase -M default -k btab - bind --erase -k btab - - bind --erase \cs - bind --erase -M insert \cs - bind --erase -M default \cs - - bind -M insert \cs 'tmux info && tmux attach -t default || tmux new-session -s default' - bind -M default \cs 'tmux info && tmux attach -t default || tmux new-session -s default' - bind -M insert \ct 'tmux info && tmux new-window -t default || tmux new-session -s default' - bind -M default \ct 'tmux info && tmux new-window -t default || tmux new-session -s default' end diff --git a/common/fish/paths.fish b/common/fish/paths.fish old mode 100755 new mode 100644 index df4bcbb..4c7fa5a --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -1,61 +1,70 @@ -#!/usr/bin/env fish +set --export --universal XDG_CONFIG_HOME $HOME/.config +set --export --universal DOTFILES_PATH $XDG_CONFIG_HOME/lytedev-dotfiles +set --export --universal ENV_PATH $XDG_CONFIG_HOME/lytedev-env +set --export --universal FISH_PATH $XDG_CONFIG_HOME/fish -set -Ux GOPATH $HOME/.go +if not set --query NICE_HOME + # default NICE_HOME to HOME + set --export --universal NICE_HOME $HOME + + # if HOME ends with a dir called .home, assume that NICE_HOME is HOME's parent dir + test (basename $HOME) = .home && set --export --universal NICE_HOME (realpath $HOME/..) +end + +# reset paths on shell start +set --erase --global fish_user_paths + +# add NICE_HOME to CDPATH (see `man 1 cd`) +set --erase CDPATH +set --export --global CDPATH . $NICE_HOME + +set --export --universal GOPATH $HOME/.go set paths_candidates \ - $HOME/.go \ - $GOPATH/bin \ $DOTFILES_PATH/common/bin \ $HOME/.bin \ - $HOME/.cargo/bin \ + $HOME/.local/bin \ $HOME/.deno/bin \ - $HOME/.nimble/bin \ $HOME/.yarn/bin \ + $HOME/.nimble/bin \ + $HOME/.cargo/bin \ + $HOME/.go \ + $GOPATH/bin \ $HOME/.netlify/helper/bin -set -ge fish_user_paths +# add candidate paths to PATH if they exist for d in $paths_candidates $ENV_PATH/*/bin - test -d $d && set -gxa fish_user_paths $d + test -d $d && set --append --export --global fish_user_paths $d end -test -d $HOME/.local/bin && set -gxa fish_user_paths $HOME/.local/bin -test -d $HOME/.bin && set -gxa fish_user_paths $HOME/.local/bin +command --search --quiet python && \ + set --append --export --global fish_user_paths (python -m site --user-base)/bin -has_command python && set -gxa fish_user_paths (python -m site --user-base)/bin -has_command ruby && set -gxa fish_user_paths (ruby -e 'print Gem.user_dir')/bin +command --search --quiet ruby && \ + set --append --export --global fish_user_paths (ruby -e 'print Gem.user_dir')/bin -if set -q NICE_HOME -else - set -Ux NICE_HOME $HOME - test (basename $HOME) = .home && set -Ux NICE_HOME (realpath $HOME/..) - test -f $HOME/.nice_home && set -Ux NICE_HOME (cat $HOME/.nice_home) - test -f $ENV_PATH/.nice_home && set -Ux NICE_HOME (cat $ENV_PATH/.nice_home) -end -for p in $NICE_HOME $HOME $ENV_PATH - test -f $p/.nice_home && set -Ux NICE_HOME (cat $p/.nice_home) -end +set --export --universal NOTES_PATH $NICE_HOME/doc/notes +set --export --universal SCROTS_PATH $NICE_HOME/img/scrots +set --export --universal USER_LOGS_PATH $NICE_HOME/doc/logs -set -Ux NOTES_PATH $NICE_HOME/doc/notes -set -Ux SCROTS_PATH $NICE_HOME/img/scrots -set -Ux USER_LOGS_PATH $NICE_HOME/doc/logs +set --export --universal XDG_DESKTOP_DIR $HOME/desktop +set --export --universal XDG_PUBLICSHARE_DIR $HOME/public +set --export --universal XDG_TEMPLATES_DIR $HOME/templates -set -Ux XDG_DESKTOP_DIR $HOME/desktop -set -Ux XDG_PUBLICSHARE_DIR $HOME/public -set -Ux XDG_TEMPLATES_DIR $HOME/templates +set --export --universal XDG_DOCUMENTS_DIR $NICE_HOME/doc +set --export --universal XDG_DOWNLOAD_DIR $NICE_HOME/dl +set --export --universal XDG_MUSIC_DIR $NICE_HOME/music +set --export --universal XDG_PICTURES_DIR $NICE_HOME/img +set --export --universal XDG_VIDEOS_DIR $NICE_HOME/video +set --export --universal XDG_GAMES_DIR $NICE_HOME/games -set -Ux XDG_DOCUMENTS_DIR $NICE_HOME/doc -set -Ux XDG_DOWNLOAD_DIR $NICE_HOME/dl -set -Ux XDG_MUSIC_DIR $NICE_HOME/music -set -Ux XDG_PICTURES_DIR $NICE_HOME/img -set -Ux XDG_VIDEOS_DIR $NICE_HOME/video -set -Ux XDG_GAMES_DIR $NICE_HOME/games - -set -Ux TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/ -set -Ux NOTES_PATH $XDG_DOCUMENTS_DIR/notes -set -Ux USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs -set -Ux SCROTS_PATH $XDG_PICTURES_DIR/scrots +set --export --universal TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/ +set --export --universal NOTES_PATH $XDG_DOCUMENTS_DIR/notes +set --export --universal USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs +set --export --universal SCROTS_PATH $XDG_PICTURES_DIR/scrots if test -n "$NIX_PATH" set NIX_PATH : end -set -Ux NIX_PATH $HOME/.nix-defexpr/channels:$NIX_PATH +test -d $HOME/.nix-defexpr/channels && \ + set --export --universal NIX_PATH $HOME/.nix-defexpr/channels:$NIX_PATH diff --git a/common/fish/prompt.fish b/common/fish/prompt.fish old mode 100755 new mode 100644 index 1c410d9..902841f --- a/common/fish/prompt.fish +++ b/common/fish/prompt.fish @@ -1,17 +1,18 @@ -#!/usr/bin/env fish +set MAX_PATH_PIECE_CHARS 3 -# TODO: if root, background instead? +function get_hostname + has_command hostname && hostname || cat /etc/hostname +end -set MAX_PATH_PIECE_CHARS $BASH_PROMPT_MAX_PATH_PIECE_CHARS 3 +function fish_greeting + set_color -b black brblack + printf "%s@%s %s\n" $USER (get_hostname) (date) +end -# prompt rendering functions function preprocess_pwd test (pwd) = / && echo "/" && return 1 test (pwd) = $NICE_HOME && echo "~" && return 0 - # with ellipsis - # echo "$(<<< "$p" cut -c2- | awk '{split($0,p,"/");for(k in p){if(k==length(p)){printf "/%s",p[k]}else{if(length(p[k])>'" - # $((MAX_PATH_PIECE_CHARS+1))"'){printf "/%.'"$((MAX_PATH_PIECE_CHARS))"'sโ€ฆ",p[k]}else{printf "/%s",p[k]}}}}')" - # without ellipsis + # TODO: fix for macOS echo (pwd) | cut -c2- | \ awk '{split($0,p,"/");for(k in p){if(k==length(p)){printf "/%s",p[k]}else{printf "/%.'$MAX_PATH_PIECE_CHARS[1]'s",p[k]}}}' end diff --git a/common/fish/vars.fish b/common/fish/vars.fish new file mode 100644 index 0000000..b98c79e --- /dev/null +++ b/common/fish/vars.fish @@ -0,0 +1,24 @@ +# sane ls colors +set --export --universal LS_COLORS 'ow=01;36;40' +set --export --universal EXA_COLORS '*=0' + +# iex history +set --export --universal ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" + +set --export --universal TERMINAL kitty +set --export --universal BROWSER firefox-nightly + +set --export --universal PAGER less +set --export --universal LESS "-r" + +set --export --universal MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_on_startup=0" +Man!' + +if command --search --quiet nvim + set --export --universal EDITOR nvim + set --export --universal VISUAL nvim +else + set --export --universal EDITOR vi + set --export --universal VISUAL vi +end + +# has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git' diff --git a/common/htop/rc b/common/htop/rc index 0914ef8..4790124 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -1,9 +1,9 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -htop_version=3.1.0 +htop_version=3.1.1 config_reader_min_version=2 fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=46 +sort_key=47 sort_direction=-1 tree_sort_key=0 tree_sort_direction=1 diff --git a/common/neovim/colors/base16-donokai.vim b/common/neovim/colors/base16-donokai.vim index 3af3c64..3397d0b 120000 --- a/common/neovim/colors/base16-donokai.vim +++ b/common/neovim/colors/base16-donokai.vim @@ -1 +1 @@ -/home/daniel/.home/.config/lytedev-dotfiles/common/colors/vim \ No newline at end of file +/root/.config/lytedev-dotfiles/common/colors/vim \ No newline at end of file diff --git a/os/linux/config.d.fish b/os/linux/config.d.fish new file mode 100644 index 0000000..8e08863 --- /dev/null +++ b/os/linux/config.d.fish @@ -0,0 +1,5 @@ +alias disks "lsblk && df -h" +has_command nmtui && alias wifi "sudo -E nmtui" +has_command pulsemixer && alias pa pulsemixer +has_command neomutt && alias mail neomutt +has_command iex && alias miex 'iex -S mix' diff --git a/os/linux/sway/init b/os/linux/sway/init index c540974..97f9b27 100755 --- a/os/linux/sway/init +++ b/os/linux/sway/init @@ -1,29 +1,37 @@ #!/usr/bin/env fish -set -q XDG_CONFIG_HOME || begin +set --query XDG_CONFIG_HOME || begin echo XDG_CONFIG_HOME not set exit 1 end -set -q DOTFILES_PATH || begin +set --query DOTFILES_PATH || begin echo DOTFILES_PATH not set exit 1 end -# set -Ux QT_QPA_PLATFORM xcb -# set -Ux QT_QPA_PLATFORM_PLUGIN_PATH /usr/lib/qt/plugins -set -Ux CLUTTER_BACKEND wayland -set -Ux SDL_VIDEODRIVER wayland -set -Ux MOZ_ENABLE_WAYLAND 1 -set -Ux XDG_CURRENT_DESKTOP sway +# set --export --universal QT_QPA_PLATFORM xcb +# set --export --universal QT_QPA_PLATFORM_PLUGIN_PATH /usr/lib/qt/plugins + +set --export --universal CLUTTER_BACKEND wayland +set --export --universal SDL_VIDEODRIVER wayland +set --export --universal MOZ_ENABLE_WAYLAND 1 +set --export --universal XDG_CURRENT_DESKTOP sway +set --export --universal _JAVA_AWT_WM_NONREPARENTING 1 for s in $ENV_PATH/*/sway-init.d.fish source $s (dirname $s) end -set initstr "\n(date): Initializsing Sway WM" -set elogfile ~/.sway.error.log -set logfile ~/.sway.log +set --query SWAY_LOGGING || set SWAY_LOGGING 0 -echo $initstr >> $logfile; echo $initstr >> $elogfile -exec sway >> $logfile 2>> $elogfile +if test $SWAY_LOGGING = 1 + set initstr "\n(date): Starting Sway" + set elogfile ~/.sway.error.log + set logfile ~/.sway.log + + echo $initstr >> $logfile; echo $initstr >> $elogfile + exec sway >> $logfile 2>> $elogfile +else + exec sway +end diff --git a/readme.md b/readme.md index 1be64d2..ded9c94 100644 --- a/readme.md +++ b/readme.md @@ -1,72 +1,77 @@ # lytedev's dotfiles -My various configuration files. Don't use them directly, just take what you -like. +My various configuration files. I can't recommend using them directly, just +take what you like. [๐Ÿ–ฅ๏ธ Upstream][upstream] โ€ข [๐Ÿ™ GitHub Mirror][github] ![Battlestation][battlestation-photo] ![Desktop Screenshot][desktop-screenshot] -# Dependencies +# Basic Setup -- `fish` -- `bat` -- `fd` -- `sd` -- `fzf` -- `tmux` -- `rsync` -- `exa` -- `nnn` -- `nvim` + curl -LsSf https://lyte.dev/df.sh | sh -# Setup +## I don't like `curl ... | sh` -``` -set dfp ~/.config/lytedev-dotfiles -git clone https://git.lyte.dev/lytedev/dotfiles.git $dfp && cd $dfp -./common/bin/dotfiles-setup -# symlink host/os-specific directories -ezln ./os/linux $ENV_PATH/linux -# setup again once env has all the layers you want -dotfiles-setup -``` +Clone the repo: -# Basic Usage + git clone https://git.lyte.dev/lytedev/dotfiles.git "$HOME/.config/lytedev-dotfiles" + +Inspect and run the common (no macOS- or Linux-specific configuration) setup +`fish` script: + + $EDITOR "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" + "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" + +## Advanced Setup + +You will want to symlink relevant environment layers into the `$ENV_PATH` in +order to have your OS-specific applications be configured and common +applications configured for the host OS. + +There's a handy `fzf`-based script that makes this super easy: + + dotfiles-link-environments # note that you can select multiple with TAB + +You can also list the possible environments: + + cat $DOTFILES_PATH/common/envs + +And then link them yourself (note the replacing of slashes with dashes): + + ln -s (pwd)/os/linux $ENV_PATH/os-linux + ln -s (pwd)/os/linux/arch $ENV_PATH/os-linux-arch + ln -s (pwd)/host/laptop $ENV_PATH/host-laptop + ln -s (pwd)/host/laptop/third $ENV_PATH/os-laptop-third + +And run setup again once you've finished linking all related environments: + + dotfiles-setup # To Do -- Wifi + Home DNS -- Rotate/switch gpg keys and password-store, setup properly on phone - - - Maybe something age/sops-based? - +- Home DNS/Wireguard VPN? - Layered gitconfig? - Get out of Google! - `calcurse` for Calendar management? - `aerc` or `neomutt` for email? - My home-grown backup network for Drive? - Photos? -- Hibernation and proper power management for laptop? - **Learn to use `journalctl`** -- Fix sway workspaces on desktop? - Neovim LSP -- Move to NixOS (WIP) or Guix? Declarative is the future! -- Better/more secure remote management configuration in dotfiles? [1][1] -- Setup network file share? -- Home VPN +- Move to NixOS or Guix? Declarative may be the future...? +- Better/more secure remote management configuration? + - Why can't I hold all these SSH keys/configs/target hosts? +- Setup network file share that's easily accessible from Windows and macOS hosts? + - Samba? - Add vim in the terminal as the handler for many MIME types (xdg-open and such) for the rare time I'm in a file manager or for opening easily from the browser. - This goes for navigating "into" a file in `nnn` -- Unify all the common variables... somehow? (and use templates and `envsubst`?) -- [Vimux](https://github.com/benmills/vimux)? - Investigate systemd services that may help with various tasks (homed, etc.) -- Be more macOS friendly, since work may require that [upstream]: https://git.faceless.lytedev.io/lytedev/dotfiles [github]: https://github.com/lytedev/dotfiles [desktop-screenshot]: https://files.lyte.dev/unix/desktop-screenshot.png [battlestation-photo]: https://files.lyte.dev/unix/battlestation.jpg -[1]: https://smallstep.com/blog/ssh-tricks-and-tips/ From e1ea5a28c3c29a04bd98efea27613149cd0187c4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 12:18:12 -0500 Subject: [PATCH 052/103] More cleanup --- common/bash/rc | 3 ++- common/fish/vars.fish | 5 ++++- common/neovim/colors/base16-donokai.vim | 2 +- readme.md | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/common/bash/rc b/common/bash/rc index 8412f44..5e059fb 100644 --- a/common/bash/rc +++ b/common/bash/rc @@ -4,6 +4,7 @@ command -v fish >/dev/null 2>&1 && grep fish /etc/shells >/dev/null 2>&1 && { echo "This user is configured to use 'fish' as its primary shell." echo " You may want to run 'chsh' and set your shell to $(grep fish /etc/shells | head -n1)'." - echo " You may also temporarily use fish by simply running 'fish'." + echo " Once that's done, simply run 'fish'." + echo " You can also try fish temporarily by running 'fish'. No 'chsh' commitment required." echo " If you're in bash for intentionally for some reason, then ignore this message." } diff --git a/common/fish/vars.fish b/common/fish/vars.fish index b98c79e..675496b 100644 --- a/common/fish/vars.fish +++ b/common/fish/vars.fish @@ -16,7 +16,10 @@ set --export --universal MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_ if command --search --quiet nvim set --export --universal EDITOR nvim set --export --universal VISUAL nvim -else +else if command --search --quiet vim + set --export --universal EDITOR vim + set --export --universal VISUAL vim +else if command --search --quiet vi set --export --universal EDITOR vi set --export --universal VISUAL vi end diff --git a/common/neovim/colors/base16-donokai.vim b/common/neovim/colors/base16-donokai.vim index 3397d0b..3af3c64 120000 --- a/common/neovim/colors/base16-donokai.vim +++ b/common/neovim/colors/base16-donokai.vim @@ -1 +1 @@ -/root/.config/lytedev-dotfiles/common/colors/vim \ No newline at end of file +/home/daniel/.home/.config/lytedev-dotfiles/common/colors/vim \ No newline at end of file diff --git a/readme.md b/readme.md index ded9c94..099bc1c 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ take what you like. # Basic Setup - curl -LsSf https://lyte.dev/df.sh | sh + curl -Ss https://lyte.dev/df.sh | sh ## I don't like `curl ... | sh` @@ -44,6 +44,7 @@ And then link them yourself (note the replacing of slashes with dashes): ln -s (pwd)/os/linux/arch $ENV_PATH/os-linux-arch ln -s (pwd)/host/laptop $ENV_PATH/host-laptop ln -s (pwd)/host/laptop/third $ENV_PATH/os-laptop-third + # etc... And run setup again once you've finished linking all related environments: From 45bae8f96e51c9f46ba80492895d418bc19e28a5 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 12:43:32 -0500 Subject: [PATCH 053/103] Underp --- common/bin/dotfiles-link-environments | 50 ++++++++++++++++++--------- host/desktop/desktop | 1 - 2 files changed, 34 insertions(+), 17 deletions(-) delete mode 120000 host/desktop/desktop diff --git a/common/bin/dotfiles-link-environments b/common/bin/dotfiles-link-environments index 0d157d0..2da58f3 100755 --- a/common/bin/dotfiles-link-environments +++ b/common/bin/dotfiles-link-environments @@ -1,21 +1,39 @@ #!/usr/bin/env fish -set dfp (realpath (dirname (status -f))/../..) -function files - cat $argv[1] | while read -l l - test -d $l && echo $l +has_command fzf || begin + echo "fzf not installed" + exit 1 +end + +mkdir -p $ENV_PATH + +function filter_existing_directory + while read -l l + test -d $DOTFILES_PATH/$l && echo $l end end -files $dfp/common/envs | \ - fzf --multi --prompt "Select applicable environments (multi-select w/ TAB): " \ - --preview-window="up:50%:noborder" \ - --preview="ls -la --color=always {}" | \ - string trim | \ - read -a -d \n -z lines -mkdir -p $ENV_PATH -for l in $lines - test $l = "" && continue - set ll (string replace -a / - $l) - echo "Linking $ENV_PATH/$ll to $dfp/$l" - ln -s $dfp/$l $ENV_PATH/$ll &>/dev/null + +function reject_empty_lines + while read -l l + test $l = "" || echo $l + end end + +function link + while read -l l + set safe_fn (string replace -a / - $l) + echo "Linking $ENV_PATH/$safe_fn to $DOTFILES_PATH/$l" + rm -f $ENV_PATH/$safe_fn + ln -s $DOTFILES_PATH/$l $ENV_PATH/$safe_fn + end +end + +cat $DOTFILES_PATH/common/envs | + filter_existing_directory | + fzf --multi \ + --prompt "Select applicable environments (multi-select w/ TAB): " \ + --preview-window="up:50%:noborder" \ + --preview="ls -la --color=always $DOTFILES_PATH/{}" | + string trim | + reject_empty_lines | + link diff --git a/host/desktop/desktop b/host/desktop/desktop deleted file mode 120000 index bedc7ee..0000000 --- a/host/desktop/desktop +++ /dev/null @@ -1 +0,0 @@ -/home/daniel/.home/.config/lytedev-dotfiles/host/desktop \ No newline at end of file From 31087c20c33118e4525d6dc352f68caf784cd13c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 12:52:33 -0500 Subject: [PATCH 054/103] Move todos out and clarify in readme --- common/bin/dotfiles-link-environments | 16 +++++++------- readme.md | 31 ++++++--------------------- todo.md | 19 ++++++++++++++++ 3 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 todo.md diff --git a/common/bin/dotfiles-link-environments b/common/bin/dotfiles-link-environments index 2da58f3..c21ea9f 100755 --- a/common/bin/dotfiles-link-environments +++ b/common/bin/dotfiles-link-environments @@ -8,23 +8,23 @@ end mkdir -p $ENV_PATH function filter_existing_directory - while read -l l - test -d $DOTFILES_PATH/$l && echo $l + while read -l line + test -d $DOTFILES_PATH/$line && echo $line end end function reject_empty_lines - while read -l l - test $l = "" || echo $l + while read -l line + test $line = "" || echo $line end end function link - while read -l l - set safe_fn (string replace -a / - $l) - echo "Linking $ENV_PATH/$safe_fn to $DOTFILES_PATH/$l" + while read -l line + set safe_fn (string replace -a / - $line) + echo "Linking $ENV_PATH/$safe_fn to $DOTFILES_PATH/$line" rm -f $ENV_PATH/$safe_fn - ln -s $DOTFILES_PATH/$l $ENV_PATH/$safe_fn + ln -s $DOTFILES_PATH/$line $ENV_PATH/$safe_fn end end diff --git a/readme.md b/readme.md index 099bc1c..653aadc 100644 --- a/readme.md +++ b/readme.md @@ -30,15 +30,18 @@ You will want to symlink relevant environment layers into the `$ENV_PATH` in order to have your OS-specific applications be configured and common applications configured for the host OS. -There's a handy `fzf`-based script that makes this super easy: +There's a handy `fzf`-based script that makes this super easy (note that you +can select multiple environments with TAB): - dotfiles-link-environments # note that you can select multiple with TAB + dotfiles-link-environments You can also list the possible environments: cat $DOTFILES_PATH/common/envs -And then link them yourself (note the replacing of slashes with dashes): +And then link them yourself (note that environments must be in $ENV_PATH and +cannot be nested, so replacing slashes with dashes is a nice way to show what's +going on): ln -s (pwd)/os/linux $ENV_PATH/os-linux ln -s (pwd)/os/linux/arch $ENV_PATH/os-linux-arch @@ -50,28 +53,6 @@ And run setup again once you've finished linking all related environments: dotfiles-setup -# To Do - -- Home DNS/Wireguard VPN? -- Layered gitconfig? -- Get out of Google! - - `calcurse` for Calendar management? - - `aerc` or `neomutt` for email? - - My home-grown backup network for Drive? - - Photos? -- **Learn to use `journalctl`** -- Neovim LSP -- Move to NixOS or Guix? Declarative may be the future...? -- Better/more secure remote management configuration? - - Why can't I hold all these SSH keys/configs/target hosts? -- Setup network file share that's easily accessible from Windows and macOS hosts? - - Samba? -- Add vim in the terminal as the handler for many MIME types (xdg-open and such) - for the rare time I'm in a file manager or for opening easily from - the browser. - - This goes for navigating "into" a file in `nnn` -- Investigate systemd services that may help with various tasks (homed, etc.) - [upstream]: https://git.faceless.lytedev.io/lytedev/dotfiles [github]: https://github.com/lytedev/dotfiles [desktop-screenshot]: https://files.lyte.dev/unix/desktop-screenshot.png diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..fec7f8e --- /dev/null +++ b/todo.md @@ -0,0 +1,19 @@ +- Home DNS/Wireguard VPN? +- Layered gitconfig? +- Get out of Google! + - `calcurse` for Calendar management? + - `aerc` or `neomutt` for email? + - My home-grown backup network for Drive? + - Photos? +- **Learn to use `journalctl`** +- Neovim LSP +- Move to NixOS or Guix? Declarative may be the future...? +- Better/more secure remote management configuration? + - Why can't I hold all these SSH keys/configs/target hosts? +- Setup network file share that's easily accessible from Windows and macOS hosts? + - Samba? +- Add vim in the terminal as the handler for many MIME types (xdg-open and such) + for the rare time I'm in a file manager or for opening easily from + the browser. + - This goes for navigating "into" a file in `nnn` +- Investigate systemd services that may help with various tasks (homed, etc.) From 273d0e4ccc06696437f95048b07eb012e916b835 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 12:53:42 -0500 Subject: [PATCH 055/103] Update wording in readme about post setup --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 653aadc..d1b9580 100644 --- a/readme.md +++ b/readme.md @@ -24,7 +24,7 @@ Inspect and run the common (no macOS- or Linux-specific configuration) setup $EDITOR "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" -## Advanced Setup +## Post-Setup You will want to symlink relevant environment layers into the `$ENV_PATH` in order to have your OS-specific applications be configured and common From 9e76d7838c4364c0b9c9c78f0b54629bad6e9025 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:24:05 -0500 Subject: [PATCH 056/103] Add structure section to readme --- readme.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/readme.md b/readme.md index d1b9580..3236a91 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,44 @@ take what you like. ![Battlestation][battlestation-photo] ![Desktop Screenshot][desktop-screenshot] +# Repo Structure + +My dotfiles are composed together by layering "environments" since I want my dotfiles to be flexible across servers, laptops, desktops, and even my phone (via Termux). + + lytedev-dotfiles + |- common --- common to all hosts and operating systems + | |- bin ------- programs or scripts useful to all hosts/OSs + | |- data ------ shared storage for certain scripts + | `- {app...} -- configuration related to {app} + |- host ----- specific to specific hosts or types of hosts + | |- desktop --- for desktop-class machines + | |- headless -- for server-class machines with no display/GUI + | `- laptop ---- for portable, battery-having machines + `- os ------- specific to operating systems + |- linux ----- + | |- desktop ------ for desktop-class machines + | |- headless ----- for server-class machines with no display/GUI + | |- bin ---------- programs/scripts useful to linux machines + | |- {distro...} -- configuration related to {distro} + | `- {app...} ----- linux-specific configuration related to {app} + `- macos ----- for those stupid macbooks work tries to make you use + +Any environment should be able to extend the configuration of any application +in some unique way. This isn't possible with all applications, of course, since +some programs do not make it easy (or possible) to include multiple +configuration files or to extend a single file by having it include others via +globs or some other mechanism. + +One example of doing this well is with fish: + + for s in $ENV_PATH/*/config.d.fish; source $s (dirname $s); end + +This way, if any environment (a dir in $ENV_PATH) has a `config.f.fish` script +inside, it will be sourced by the main configuration file. + +Likewise, some setup only happens in certain environments via the +`dotfiles-setup.d.fish` script. + # Basic Setup curl -Ss https://lyte.dev/df.sh | sh From b33ae77613098159840fc8591f419156a1816acf Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:24:53 -0500 Subject: [PATCH 057/103] Forgot a piece --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 3236a91..94a24c8 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,7 @@ My dotfiles are composed together by layering "environments" since I want my dot | |- headless -- for server-class machines with no display/GUI | `- laptop ---- for portable, battery-having machines `- os ------- specific to operating systems - |- linux ----- + |- linux ----- you alread know <3 | |- desktop ------ for desktop-class machines | |- headless ----- for server-class machines with no display/GUI | |- bin ---------- programs/scripts useful to linux machines From 23c80e4a17ccac6fe11f39129c87b835fb51effc Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:27:04 -0500 Subject: [PATCH 058/103] Add note on layers --- readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.md b/readme.md index 94a24c8..e4d4769 100644 --- a/readme.md +++ b/readme.md @@ -46,6 +46,12 @@ inside, it will be sourced by the main configuration file. Likewise, some setup only happens in certain environments via the `dotfiles-setup.d.fish` script. +One important note on environments is that even though they are laid out like +a tree (directories), you do NOT automatically get the parent-environment's +configuration, so if you are setting up a Arch Linux desktop machine, you +cannot only link the `os/linux/arch` and `host/desktop` environments but will +also need to include `os/linux` if you want the Linux-generic configuration. + # Basic Setup curl -Ss https://lyte.dev/df.sh | sh From 5471969c79e9376d3eb871a5c6f1450fce73504a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:27:46 -0500 Subject: [PATCH 059/103] Move things around --- readme.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/readme.md b/readme.md index e4d4769..cea9c83 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,22 @@ take what you like. ![Battlestation][battlestation-photo] ![Desktop Screenshot][desktop-screenshot] +# Basic Setup + + curl -Ss https://lyte.dev/df.sh | sh + +## I don't like `curl ... | sh` + +Clone the repo: + + git clone https://git.lyte.dev/lytedev/dotfiles.git "$HOME/.config/lytedev-dotfiles" + +Inspect and run the common (no macOS- or Linux-specific configuration) setup +`fish` script: + + $EDITOR "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" + "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" + # Repo Structure My dotfiles are composed together by layering "environments" since I want my dotfiles to be flexible across servers, laptops, desktops, and even my phone (via Termux). @@ -52,23 +68,7 @@ configuration, so if you are setting up a Arch Linux desktop machine, you cannot only link the `os/linux/arch` and `host/desktop` environments but will also need to include `os/linux` if you want the Linux-generic configuration. -# Basic Setup - - curl -Ss https://lyte.dev/df.sh | sh - -## I don't like `curl ... | sh` - -Clone the repo: - - git clone https://git.lyte.dev/lytedev/dotfiles.git "$HOME/.config/lytedev-dotfiles" - -Inspect and run the common (no macOS- or Linux-specific configuration) setup -`fish` script: - - $EDITOR "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" - "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" - -## Post-Setup +# Post-Setup You will want to symlink relevant environment layers into the `$ENV_PATH` in order to have your OS-specific applications be configured and common From b99c34f4a7be2fbbc789faf189f4911911721509 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:28:25 -0500 Subject: [PATCH 060/103] Move screenshots --- readme.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index cea9c83..fef2f66 100644 --- a/readme.md +++ b/readme.md @@ -3,10 +3,9 @@ My various configuration files. I can't recommend using them directly, just take what you like. -[๐Ÿ–ฅ๏ธ Upstream][upstream] โ€ข [๐Ÿ™ GitHub Mirror][github] +## Links -![Battlestation][battlestation-photo] -![Desktop Screenshot][desktop-screenshot] +[๐Ÿ–ฅ๏ธ Upstream][upstream] โ€ข [๐Ÿ™ GitHub Mirror][github] # Basic Setup @@ -97,6 +96,13 @@ And run setup again once you've finished linking all related environments: dotfiles-setup +# Screenshots + +## Arch Linux Desktop + +![Battlestation][battlestation-photo] +![Desktop Screenshot][desktop-screenshot] + [upstream]: https://git.faceless.lytedev.io/lytedev/dotfiles [github]: https://github.com/lytedev/dotfiles [desktop-screenshot]: https://files.lyte.dev/unix/desktop-screenshot.png From 215ffbc9ca5b72ceeb942b246dc856665f3bf621 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:36:35 -0500 Subject: [PATCH 061/103] Take 2 --- readme.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index fef2f66..c7d7963 100644 --- a/readme.md +++ b/readme.md @@ -9,18 +9,11 @@ take what you like. # Basic Setup - curl -Ss https://lyte.dev/df.sh | sh + curl -LO lyte.dev/df.sh && . df.sh -## I don't like `curl ... | sh` - -Clone the repo: +## Manual Setup git clone https://git.lyte.dev/lytedev/dotfiles.git "$HOME/.config/lytedev-dotfiles" - -Inspect and run the common (no macOS- or Linux-specific configuration) setup -`fish` script: - - $EDITOR "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup" # Repo Structure From 2573d63ae5f54bf8f7582bbe86cd31ff6f27e085 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 3 Nov 2021 13:43:35 -0500 Subject: [PATCH 062/103] Add note on updating --- readme.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index c7d7963..dcc9e81 100644 --- a/readme.md +++ b/readme.md @@ -89,6 +89,28 @@ And run setup again once you've finished linking all related environments: dotfiles-setup +# Updating + +Fork this repo, update your origin to point to your fork, and commit changes: + + git remote origin set-url $YOUR_REPO + +Then you can just pull your changes down from wherever. + +## No I want your updates + +You don't. I rip and tear my dotfiles all the time and will break your entire +machine. Remember about not using other people's dotfiles directly? + +But if you must, you can add an upstream remote to point to my repo: + + git remote add upstream https://git.lyte.dev/lytedev/dotfiles.git + +Then you can fetch and merge in my changes whenever you want: + + git fetch upstream + git merge upstream/master + # Screenshots ## Arch Linux Desktop @@ -96,7 +118,7 @@ And run setup again once you've finished linking all related environments: ![Battlestation][battlestation-photo] ![Desktop Screenshot][desktop-screenshot] -[upstream]: https://git.faceless.lytedev.io/lytedev/dotfiles +[upstream]: https://git.lyte.dev/lytedev/dotfiles [github]: https://github.com/lytedev/dotfiles [desktop-screenshot]: https://files.lyte.dev/unix/desktop-screenshot.png [battlestation-photo]: https://files.lyte.dev/unix/battlestation.jpg From 4c032ab8c19f891e7f3500965d5c7c2412fe1b75 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 8 Nov 2021 23:41:55 -0600 Subject: [PATCH 063/103] Add config for pgcli and blender --- common/bin/dotfiles-setup | 2 ++ common/blender/userpref.blend | Bin 0 -> 143904 bytes common/neovim/coc-settings.json | 4 ++++ common/pgcli/config | 3 +++ 4 files changed, 9 insertions(+) create mode 100644 common/blender/userpref.blend create mode 100644 common/pgcli/config diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index b8cd790..735036e 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -50,9 +50,11 @@ l common/kak $c/kak l common/gpg/agent.conf $h/.gnupg/gpg-agent.conf l common/htop/rc $c/htop/htoprc l common/kitty $c/kitty +l common/pgcli $c/pgcli l common/mutt/rc $h/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs +l common/blender/userpref.blend $c/blender/2.93/config/userpref.blend popd for s in $c/lytedev-env/*/dotfiles-setup.d.fish diff --git a/common/blender/userpref.blend b/common/blender/userpref.blend new file mode 100644 index 0000000000000000000000000000000000000000..8847340084b012c679a465bc0cc3d116d6cb7235 GIT binary patch literal 143904 zcmeFa3$X3iUElYYjU6F7rKZrSJPo`S!yz47X7}^` z{(kHK|L=3pwIwXs#+)mi{a-S!3-Fg2#Z@c@R2ft>JO$`Tn=x`M_6I z)#ESvE8q2p@2#rWUR726U%mY0XU}|n^-2Yw(Z5G;|IV&H=-&LsGrd8#H@Loc_8Ap$ zn)!4DPDkJ?ZUo+O;hqQo`8m4vbKm{Shu=|E*Cw9%CZ1nU@>N$qcGc}S@qFG_T-Q%K zbUFghXawHyhG&%hH1p{Qd_|4GDg1v$P3LK6PDkK$1WrfbbOfH}2%OTtr#Vok*-l5` zbOcUE;45qdPVxU&*o2;T=X3;4N8oe>PDkK$1WrfbbOcUE;B*8|N8oe>KF0`r3-7L~ z{=EIK4!`+7z2kZKX!+msNV+X$5DwT+)x{k&)VwT|cWBkw!%`|>{e6G#72LAhh@r52!B|ZOxf9lrqr}$Gp@V&Q{KgIve z}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rddGn=R`5)=KpD+%1RnC!P%oRq}f7Q|0$8@ZAMt)cSm;A1Aj(ih0$n zUd^*)Ft63Cb&d>EW@J~JdPDg{KTc4F>cpRug6GV5S{x$2>JOSuU&0tp{xjvmnCW}# za8TasMau=8TPU3>KG%3Q*C{CVo1FF*~TAD*0>K zEjQMtk67pVnwQKTG+blniB%?SwbNGeUr@+5g8Cb^N9tF&tAe|#eha5QpA6Of3!LhH zChhr5{=G8k=VVS2`pA6-*P2iZ_c58gsrlQRjYCu$uTq zR#U%?vl&0l{I*VW(z<0rW+>aQA8O%e(O$_StgL8QoMjT|Zq`Dq=09aP{~ay;g}7UY zyM@s{V)ih@oz~4yWN)Hec86)sNtbmw>5>*VacWPT)IYDbL#wQVjWPO9_T^W4GjME%hTzn$YaGGpSPHcAfeyHi$rKu<{J-Fl94^E~w8xi|EI5bfr^gx?SP<7WcpVSums zzl*JlupbD6Fdyu9K>}m9JWK8+kOS&_8N&5azbmJk>YI=L9%O0E?{dtqfT3_D41?h? z0BGz72VqsX5Nn zHsMsimUTO_?tp2?yAyP#!d*P)A}gI!P8FxS zxnCFV!98=O$jLmrr&GLdfeAzVP2PjQ>3(H2xHfMSl&xg>N zXD33vN&i?mI9ryHF)T?kjQ`7$i~aAWU*JTj4`sHmbHBo)AM^pgAOELjZt{beJp>QK zhx7-m;2U8n*X&S#%0B&4l%XT&t#N{H+yPE;9j5wAdtR72Y!>MfwDs^c8(D?OP`b|X zi*+fN(BGL$*qhkrLOQ*}DXxj}c&QGRALZFV%m?zG4CFmAWnv!n6SGgzTPMB_3d|K3 zrJv3@RA0n=-n&QqJa)CnLrNa~Dn(7+nTO>w&72K{IxihaO95%Pyk4JsX74rBCOM I2tDWbKTiy!(f|Me literal 0 HcmV?d00001 diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index 2b9beff..f2edd32 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -1,6 +1,10 @@ { "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "typescript", "css", "markdown"], "languageserver": { + "nim": { + "command": "nimlsp", + "filetypes": ["nim"] + }, "arduino": { "command":"/home/daniel/.home/.go/bin/arduino-language-server", "rootPatterns":["*.ino"], diff --git a/common/pgcli/config b/common/pgcli/config new file mode 100644 index 0000000..63a2e6f --- /dev/null +++ b/common/pgcli/config @@ -0,0 +1,3 @@ +[main] +expand = True +enable_pager = False From 547aed390bce0ae13509bbfc7e662a92fa7d00c3 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 9 Nov 2021 09:11:40 -0600 Subject: [PATCH 064/103] Finally get multiple gitconfigs layering --- common/envs | 1 + common/git/config | 36 +++++++++++++++--------------------- host/personal/gitconfig | 5 +++++ 3 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 host/personal/gitconfig diff --git a/common/envs b/common/envs index 84da938..72e9c37 100644 --- a/common/envs +++ b/common/envs @@ -21,3 +21,4 @@ host/laptop/divvy-macbook host/laptop/postmates-macbook host/laptop/uber-macbook host/laptop/val-macbook +host/personal diff --git a/common/git/config b/common/git/config index 571c598..cb6cb2a 100644 --- a/common/git/config +++ b/common/git/config @@ -1,6 +1,5 @@ [user] name = Daniel Flanagan - email = daniel@lyte.dev [filter "lfs"] clean = git-lfs clean -- %f @@ -9,14 +8,14 @@ required = true [core] - editor = nvim + editor = $EDITOR excludesfile = /home/daniel/.home/.gitignore [http "https://gopkg.in"] followRedirects = true [diff] - tool = nvimdiff + tool = $EDITOR -d [difftool] prompt = false @@ -34,8 +33,8 @@ ds = diff --staged dt = difftool f = fetch - l = log --pretty=format:'%h %ad%x09%an%x09%s' --date=short --decorate - graph = log --graph --abbrev-commit --decorate --oneline --all + l = log --graph --abbrev-commit --decorate --oneline --all + plainlog = log --pretty=format:'%h %ad%x09%an%x09%s' --date=short --decorate ls = ls-files mm = merge master p = push @@ -46,38 +45,33 @@ sur = submodule update --remote [merge] - tool = nvimdiff + tool = $EDITOR -d conflictstyle = diff3 [mergetool] prompt = false [mergetool "nvimdiff"] - cmd = nvimdiff $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c '$wincmd J' + cmd = $EDITOR -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c '$wincmd J' [pager] branch = false # remove ansi codes, pad each file's diff with newlines, show as diff, remove top padding - # diff = nvim -c 'silent %sm/\\e[^mK]*[mK]//g' \ - # -c 'silent %s/^diff/\\r\\rdiff/' \ - # -c 'silent set ft=diff' \ - # -c 'silent execute \"normal gg2dd\"' \ - # -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' - -[commit] - gpgsign = true + diff = nvim -c 'silent %sm/\\e[^mK]*[mK]//g' \ + -c 'silent %s/^diff/\\r\\rdiff/' \ + -c 'silent set ft=diff' \ + -c 'silent execute \"normal gg2dd\"' \ + -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' [gpg] program = gpg2 -[include] - path = $ENV_PATH/gitconfig - -[include] - path = $HOME/.config/lytedev-env/divvy/gitconfig - [color] ui = auto [push] default = current + +[include] + path = ~/.config/lytedev-env/host-personal/gitconfig + path = ~/.config/lytedev-env/divvy/gitconfig diff --git a/host/personal/gitconfig b/host/personal/gitconfig new file mode 100644 index 0000000..0ae5d91 --- /dev/null +++ b/host/personal/gitconfig @@ -0,0 +1,5 @@ +[user] + email = daniel@lyte.dev + +[commit] + gpgsign = true From 555bbecc208e3f1f962f321f6d775af828cab818 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 9 Nov 2021 10:26:05 -0600 Subject: [PATCH 065/103] Cuelang fix --- common/neovim/lua/plugins.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index 70ab795..223b6f7 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -5,6 +5,8 @@ local setup = function() vim.api.nvim_command'packadd packer.nvim' end + vim.g.polyglot_disabled = {'cue'} + local packer = require'packer' packer.startup(function() local plugins = { From df56dc051f96dab818aeab2ca2799d60ebb0940a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 9 Nov 2021 11:55:22 -0600 Subject: [PATCH 066/103] Update readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index dcc9e81..239adf8 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@ take what you like. # Basic Setup - curl -LO lyte.dev/df.sh && . df.sh + curl -LO lyte.dev/df.sh && sh -i df.sh ## Manual Setup From b6ae2318e3f7d5312fda72ca91c64c4173cc3a32 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Nov 2021 11:44:26 -0600 Subject: [PATCH 067/103] Improve backup scripts --- common/bin/backupify | 10 ++++++++-- common/bin/unbackupify | 15 ++++++++++++++- common/neovim/coc-settings.json | 7 +------ common/neovim/lua/keymap.lua | 4 +++- os/linux/sway/config | 1 + 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/common/bin/backupify b/common/bin/backupify index 16e45ab..1623895 100755 --- a/common/bin/backupify +++ b/common/bin/backupify @@ -33,12 +33,18 @@ pushd (dirname $target) >/dev/null set remote_path "$BACKUP_REMOTE_DIR/$backup_file_name$BACKUP_FILE_EXT" echo "Streaming PGP encrypted backup of $friendly_target to SSH host $BACKUP_REMOTE_HOST at $remote_path" - ssh $BACKUP_REMOTE_HOST "mkdir -p $BACKUP_REMOTE_DIR" + ssh $BACKUP_REMOTE_HOST "mkdir -p $BACKUP_REMOTE_DIR" || begin + echo "Failed to SSH to $BACKUP_REMOTE_HOST and create remote dir $BACKUP_REMOTE_DIR" + exit 3 + end # TODO: progress indicator? tar cf - . | zstd --ultra -T2 -22 | gpg --encrypt --recipient daniel@lyte.dev | - ssh $BACKUP_REMOTE_HOST "cat - > $remote_path" + ssh $BACKUP_REMOTE_HOST "cat - > $remote_path" || begin + echo "Failed to stream backup" + exit 4 + end popd >/dev/null # TODO: checksum? diff --git a/common/bin/unbackupify b/common/bin/unbackupify index aa05137..bfd2c20 100755 --- a/common/bin/unbackupify +++ b/common/bin/unbackupify @@ -21,6 +21,16 @@ else if test (count $argv) -lt 1 exit 1 end +ssh $BACKUP_REMOTE_HOST "echo 1" &>/dev/null || begin + echo "Cannot ssh to $BACKUP_REMOTE_HOST" + exit 6 +end + +ssh $BACKUP_REMOTE_HOST "test -d $BACKUP_REMOTE_DIR/$target" || begin + echo "Remote directory $BACKUP_REMOTE_DIR/$target does not exist on $BACKUP_REMOTE_HOST (use --list-backup-files to show)" + exit 5 +end + # TODO: autocomplete? # TODO: checksum? # TODO: progress indicator? @@ -36,7 +46,10 @@ pushd $local_dir >/dev/null ssh $BACKUP_REMOTE_HOST "cat $BACKUP_REMOTE_DIR/$target" | gpg --decrypt 2>/dev/null | zstd --ultra -T2 -22 -dc | - tar -xf - + tar -xf - || begin + echo "Failed to stream backup" + exit 4 + end popd >/dev/null diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index f2edd32..e2cbd22 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -4,15 +4,10 @@ "nim": { "command": "nimlsp", "filetypes": ["nim"] - }, - "arduino": { - "command":"/home/daniel/.home/.go/bin/arduino-language-server", - "rootPatterns":["*.ino"], - "filetypes":["arduino"], - "args":["-cli", "/usr/bin/arduino-cli", "-clangd", "/usr/bin/clangd", "-cli-config", "/path/to/arduino-cli.yaml"] } }, "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", + "rust-analyzer.checkOnSave.command": "clippy", "diagnostic-languageserver.filetypes": { "elixir": ["mix_credo", "mix_credo_compile"], "eelixir": ["mix_credo", "mix_credo_compile"] diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua index 7db7ec9..aa228b7 100644 --- a/common/neovim/lua/keymap.lua +++ b/common/neovim/lua/keymap.lua @@ -25,7 +25,9 @@ local keymap = { [''] = ':TmuxNavigateRight', [' n'] = "'Nn'[v:searchforward]", [' N'] = "'nN'[v:searchforward]", - [''] = ':lua SynGroup()' + [''] = ':lua SynGroup()', + ['g]'] = '(coc-diagnostic-next)', + ['g['] = '(coc-diagnostic-prev)', }, t = {}, [''] = { diff --git a/os/linux/sway/config b/os/linux/sway/config index e1e7353..9f712f8 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -176,6 +176,7 @@ bar { } exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway +exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec mako exec pipewire exec /usr/lib/kdeconnectd From 466c011bb7822549421aac3418a9d121512d0d2b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Nov 2021 11:49:20 -0600 Subject: [PATCH 068/103] Prevent use of kittens over ssh for nnn previews --- common/nnn/plugins/preview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/nnn/plugins/preview b/common/nnn/plugins/preview index 54c1ee6..d437c5e 100755 --- a/common/nnn/plugins/preview +++ b/common/nnn/plugins/preview @@ -4,7 +4,7 @@ SPLIT="$SPLIT" TERMINAL="$TERMINAL" USE_SCOPE="${USE_SCOPE:-0}" IN_KITTY=0 -[ -n "$KITTY_WINDOW_ID" ] && kitty @ ls --no-response >/dev/null 2>&1 && IN_KITTY=1 +[ -z "$SSH_CONNECTION" ] && [ -n "$KITTY_WINDOW_ID" ] && kitty @ ls --no-response >/dev/null 2>&1 && IN_KITTY=1 if [ -e "${TMUX%%,*}" ] && tmux -V | grep -q '[ -][3456789]\.'; then TERMINAL=tmux From 6005e2c28709b7317f38bec58786eedfde9fdd12 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Nov 2021 11:54:42 -0600 Subject: [PATCH 069/103] Prevent nnn previews using kitty over ssh --- common/nnn/plugins/preview | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/nnn/plugins/preview b/common/nnn/plugins/preview index d437c5e..8553652 100755 --- a/common/nnn/plugins/preview +++ b/common/nnn/plugins/preview @@ -14,6 +14,9 @@ else TERMINAL="${TERMINAL:-xterm}" fi +# we can't actually work if we're about to try the kitty method over SSH, so just exit +[ -n "$SSH_CONNECTION" ] && [ "$TERMINAL" = "kitty" ] && exit 0 + if [ -z "$SPLIT" ] && [ $(($(tput lines) * 2)) -gt "$(tput cols)" ]; then SPLIT='h' elif [ "$SPLIT" != 'h' ]; then From 8589a263ffbe2475d801a2cf1e67ea458a6ca29e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Nov 2021 12:08:51 -0600 Subject: [PATCH 070/103] Fixes for nnn and ^G functionality and add lat alias --- common/fish/functions.fish | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/fish/functions.fish b/common/fish/functions.fish index 838532e..1b8e14d 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -4,8 +4,10 @@ end if has_command exa alias ls 'exa --group-directories-first' + alias l ls alias tree 'ls --tree --level=3' alias lt 'll --sort=modified' + alias lat 'la --sort=modified' alias lc 'lt --sort=accessed' alias lT 'lt --reverse' alias lC 'lc --reverse' @@ -56,9 +58,10 @@ if has_command nnn function r --wraps nnn --description 'Run nnn with support for jump-to-directory-on-exit via ^G' # TODO: this would break with multiple nnn instances, right? # probably need to mktemp instead - set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" + set -u NNN_TMPFILE (mktemp) + export NNN_TMPFILE nnn -P p $argv - test -e $NNN_TMPFILE && source $NNN_TMPFILE && rm $NNN_TMPFILE + test -e $NNN_TMPFILE && source $NNN_TMPFILE && cp $NNN_TMPFILE ~/.nnn-last-tmpfile && rm $NNN_TMPFILE end alias l r end From 99e0f0c36e6a421c0c2aabb9775a9f89b134d58c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Nov 2021 13:08:37 -0600 Subject: [PATCH 071/103] TPM --- common/bin/tmux-lyte-session | 8 +++++--- common/bin/tmux-session-dir | 9 +++++++++ common/bin/tmux-session-preview | 13 +++++++++++++ common/bin/tmuxswitcher | 11 ++++++++++- common/envs | 2 +- common/fish/key-bindings.fish | 2 ++ common/tmux/conf | 5 ++++- host/desktop/tmux.d.conf | 0 host/{ => layer}/personal/gitconfig | 0 host/layer/personal/tmux-tpm.conf | 13 +++++++++++++ host/layer/personal/tmux.d.conf | 3 +++ 11 files changed, 60 insertions(+), 6 deletions(-) create mode 100755 common/bin/tmux-session-dir create mode 100755 common/bin/tmux-session-preview create mode 100644 host/desktop/tmux.d.conf rename host/{ => layer}/personal/gitconfig (100%) create mode 100644 host/layer/personal/tmux-tpm.conf create mode 100644 host/layer/personal/tmux.d.conf diff --git a/common/bin/tmux-lyte-session b/common/bin/tmux-lyte-session index eb23a06..d823b37 100755 --- a/common/bin/tmux-lyte-session +++ b/common/bin/tmux-lyte-session @@ -1,6 +1,8 @@ #!/usr/bin/env fish set session_name $argv[1] -set dir (set -q $argv[2] && echo $argv2 || pwd) -tmux new-session -D -s $session_name -c $dir || \ - tmux attach-session -d -t $session_name + +set d (set -q $argv[2] && echo $argv2 || pwd) + +tmux new-session -D -s "$session_name" -c "$d" || \ + tmux attach-session -d -t "$session_name" -c "$d" diff --git a/common/bin/tmux-session-dir b/common/bin/tmux-session-dir new file mode 100755 index 0000000..105327b --- /dev/null +++ b/common/bin/tmux-session-dir @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# if inside a session, use the current session +# if not, a session must be specified after the dir +d="${1}" +[ -z "$d" ] && d="#{pane_current_path}" +target_session="${2}" +[ -n "$TMUX" ] && target_session="." +tmux attach-session -t "$target_session" -c "$d" diff --git a/common/bin/tmux-session-preview b/common/bin/tmux-session-preview new file mode 100755 index 0000000..0684b1c --- /dev/null +++ b/common/bin/tmux-session-preview @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +session_data="$1" +session_id="$(echo "$session_data" | cut -d':' -f1)" + +S="$(tmux ls -F'#{session_id} #{session_name}: #{T:tree_mode_format}' | grep ^"$session_id")" +session_info="${S##$s}" +session_name="$(echo "$session_info" | cut -d ':' -f1)" + +echo "RAW: $1" +echo "S: $S" +echo "INFO: $session_info" +echo "NAME: $session_name" diff --git a/common/bin/tmuxswitcher b/common/bin/tmuxswitcher index 73c9882..fd5d5fe 100755 --- a/common/bin/tmuxswitcher +++ b/common/bin/tmuxswitcher @@ -7,7 +7,16 @@ t="tmux switch-client -t" sess="$({ tmux display-message -p -F "$fmt" && tmux list-sessions -F "$fmt"; } \ | awk '!seen[$1]++' \ | column -t -s'|' \ - | fzf -q '$' --reverse --prompt 'switch session: ' -1 \ + | fzf -q '$' --reverse --prompt 'switch session: ' -1 --preview "tmux-session-preview {}" \ | cut -d':' -f1)" +[ -z "$sess" ] && exit 1 + $t $sess + + + +# | while read w; do + # set W (tmux lsw -t"{}" -F'#{window_id}#{T:tree_mode_format}' | grep ^"$w") + # echo " ๏ฌŒ ${W##$w}" + # end diff --git a/common/envs b/common/envs index 72e9c37..4b3a558 100644 --- a/common/envs +++ b/common/envs @@ -21,4 +21,4 @@ host/laptop/divvy-macbook host/laptop/postmates-macbook host/laptop/uber-macbook host/laptop/val-macbook -host/personal +host/layer/personal diff --git a/common/fish/key-bindings.fish b/common/fish/key-bindings.fish index 50bcdc9..c91988f 100644 --- a/common/fish/key-bindings.fish +++ b/common/fish/key-bindings.fish @@ -22,4 +22,6 @@ function fish_user_key_bindings bind -M insert \cv edit_command_buffer bind -M default \cv edit_command_buffer + + bind -M insert \cs tmuxswitcher end diff --git a/common/tmux/conf b/common/tmux/conf index 8414093..31e85aa 100644 --- a/common/tmux/conf +++ b/common/tmux/conf @@ -62,7 +62,8 @@ bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl bind-key K kill-pane bind-key C-S-k kill-window -# attempt at integrating nested tmux sessions nicely +# TODO: handle tmux nesting by being able to toggle the prefix (and indicate in status bar?) + # bind -T root F12 \ # set prefix None \;\ # set key-table off \;\ @@ -75,3 +76,5 @@ bind-key C-S-k kill-window # set -u key-table \;\ # set status on \;\ # refresh-client -S + +source-file "$ENV_PATH/*/tmux.d.conf" diff --git a/host/desktop/tmux.d.conf b/host/desktop/tmux.d.conf new file mode 100644 index 0000000..e69de29 diff --git a/host/personal/gitconfig b/host/layer/personal/gitconfig similarity index 100% rename from host/personal/gitconfig rename to host/layer/personal/gitconfig diff --git a/host/layer/personal/tmux-tpm.conf b/host/layer/personal/tmux-tpm.conf new file mode 100644 index 0000000..307b98f --- /dev/null +++ b/host/layer/personal/tmux-tpm.conf @@ -0,0 +1,13 @@ +bind-key Z "display-message yotpm" + +set -g @tpm_plugins ' \ + tmux-plugins/tpm \ + tmux-plugins/tmux-sensible \ + tmux-plugins/tmux-resurrect \ + tmux-plugins/tmux-continuum \ +' + +set -g @continuum-restore 'on' +set -g @continuum-boot 'on' + +run '~/.tmux/plugins/tpm/tpm' diff --git a/host/layer/personal/tmux.d.conf b/host/layer/personal/tmux.d.conf new file mode 100644 index 0000000..370571c --- /dev/null +++ b/host/layer/personal/tmux.d.conf @@ -0,0 +1,3 @@ +bind-key Z "display-message yo" + +if-shell -b "test -d $HOME/.tmux/plugins/tpm" "source-file $ENV_PATH/host-layer-personal/tmux-tpm.conf" From df9e5ac0773556782dc12874692cd1e9c51196ea Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 24 Nov 2021 09:36:02 -0600 Subject: [PATCH 072/103] Fix tmux env not propogating DISPLAY vars --- common/bin/upload | 31 ++++++++++++++++++++++++------- common/fish/functions.fish | 9 +++++++++ common/git/config | 2 +- common/neovim/coc-settings.json | 5 +++++ common/tmux/conf | 2 ++ 5 files changed, 41 insertions(+), 8 deletions(-) diff --git a/common/bin/upload b/common/bin/upload index 404751b..486819d 100755 --- a/common/bin/upload +++ b/common/bin/upload @@ -5,24 +5,41 @@ HOST="faceless" f="${1}" + +[ "${f}" = "" ] && echo "No file provided. Exiting." >&2 && exit 2 +[ ! -e "${f}" ] && echo "File '$f' does not exist. Exiting." >&2 && exit 1 + +is_dir="$([ ! -e "${f}" ]; echo "$?")" + +set -xe + fname="${2:-$(basename "${f}")}" subdir="${3:-uploads}" internal_dir="/home/daniel/public-static-files/${subdir}" url="https://files.lyte.dev/${subdir}/${fname}" -[ "${f}" = "" ] && echo "No file provided. Exiting." >&2 && exit 2 -[ ! -f "${f}" ] && echo "File '$f' does not exist. Exiting." >&2 && exit 1 - if [ "$(curl -s -o /dev/null -w "%{http_code}" "${url}")" -eq 200 ]; then echo "ERROR: A file already exists at ${url}" exit 3 fi -ssh "$HOST" mkdir -p "$(dirname "${internal_dir}/${fname}")" -rsync --progress --no-owner --no-group --chmod=644 --ignore-existing "${f}" "${HOST}:${internal_dir}/${fname}" | tee "${HOME}/.upload.log" -code="$?" -echo "Uploaded to: ${url}" +flags=644 +code="" +if [ "$is_dir" = "0" ]; then + ssh "$HOST" mkdir -p "$(dirname "${internal_dir}/${fname}")" + rsync --progress --no-owner --no-group --chmod="$flags" --ignore-existing \ + "${f}" "${HOST}:${internal_dir}/${fname}" | tee "${HOME}/.upload.log" + code="$?" +else + ssh "$HOST" mkdir -p "${internal_dir}/${fname}" + flags=755 + rsync --recursive --progress --no-owner --no-group --chmod="$flags" \ + "${f}" "${HOST}:${internal_dir}" | tee "${HOME}/.upload.log" + code="$?" +fi if [ "$code" -ne 0 ]; then printf "ERROR: The file failed to upload - perhaps rsync failed for some reason?\n See \"%s/.upload.log\" for details\n" "$HOME" +else + echo "Uploaded to: ${url}" fi diff --git a/common/fish/functions.fish b/common/fish/functions.fish index 1b8e14d..bd3273d 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -165,3 +165,12 @@ alias mount 'sudo -E mount' alias umount 'sudo -E umount' has_command xdg-open && alias open xdg-open + +function fish_preexec + test -n $TMUX && begin + set envlist (tmux show-environment) + for var in DISPLAY WAYLAND_DISPLAY + set -gx $var (echo $envlist | rg '^'$var'=(.*)$' -r '$1') + end + end +end diff --git a/common/git/config b/common/git/config index cb6cb2a..89a716b 100644 --- a/common/git/config +++ b/common/git/config @@ -73,5 +73,5 @@ default = current [include] - path = ~/.config/lytedev-env/host-personal/gitconfig + path = ~/.config/lytedev-env/host-layer-personal/gitconfig path = ~/.config/lytedev-env/divvy/gitconfig diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index e2cbd22..ff7540d 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -4,6 +4,11 @@ "nim": { "command": "nimlsp", "filetypes": ["nim"] + }, + "godot": { + "host": "127.0.0.1", + "filetypes": ["gd", "gdscript3"], + "port": 6008 } }, "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", diff --git a/common/tmux/conf b/common/tmux/conf index 31e85aa..5530295 100644 --- a/common/tmux/conf +++ b/common/tmux/conf @@ -19,6 +19,8 @@ bind s run "tmux split-window -l 12 'tmuxswitcher'" bind M-l source-file "$XDG_CONFIG_HOME/tmux/layouts/dev.tmux" +set -g update-environment "WAYLAND_DISPLAY DISPLAY" + set -g default-terminal "kitty" set -g mouse on set -g escape-time 0 From 39a63ad8360b31f0795f3d17e8108cffb3aeace1 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 29 Nov 2021 08:25:13 -0600 Subject: [PATCH 073/103] Bash rc --- common/bash/rc | 2 +- common/bin/launch | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/bash/rc b/common/bash/rc index 5e059fb..58215a5 100644 --- a/common/bash/rc +++ b/common/bash/rc @@ -6,5 +6,5 @@ command -v fish >/dev/null 2>&1 && grep fish /etc/shells >/dev/null 2>&1 && { echo " You may want to run 'chsh' and set your shell to $(grep fish /etc/shells | head -n1)'." echo " Once that's done, simply run 'fish'." echo " You can also try fish temporarily by running 'fish'. No 'chsh' commitment required." - echo " If you're in bash for intentionally for some reason, then ignore this message." + echo " If you're in bash intentionally for some reason, then ignore this message." } diff --git a/common/bin/launch b/common/bin/launch index 3e1b1ee..daef507 100755 --- a/common/bin/launch +++ b/common/bin/launch @@ -13,5 +13,7 @@ app="$( grep "\S" | \ fzf )" +# if no app is selected, just exit +test -z "$app" && exit 1 echo "$app $(date +%s)" >> "$LAUNCHER_HISTORY_FILE" echo "$app" From 1c31aeef0f12871c0979e8c6e2f37d3ebf218c84 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 9 Dec 2021 10:55:52 -0600 Subject: [PATCH 074/103] Stuff? --- common/neovim/coc-settings.json | 4 ++++ common/neovim/lua/plugins.lua | 6 ++++-- os/linux/sway/config | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index ff7540d..d4195fd 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -5,6 +5,10 @@ "command": "nimlsp", "filetypes": ["nim"] }, + "zls": { + "command": "~/zls/zls", + "filetypes": ["zig"] + }, "godot": { "host": "127.0.0.1", "filetypes": ["gd", "gdscript3"], diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index 223b6f7..df3e529 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -27,10 +27,12 @@ local setup = function() 'ludovicchabant/vim-gutentags', 'tpope/vim-obsession', 'dhruvasagar/vim-prosession', + 'nvim-lua/popup.nvim', + 'nvim-lua/plenary.nvim', {'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}}, - 'joshdick/onedark.vim', + -- 'joshdick/onedark.vim', 'lukas-reineke/indent-blankline.nvim', - {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}}, + -- {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}}, 'neovim/nvim-lspconfig', 'hrsh7th/nvim-compe', 'jjo/vim-cue', diff --git a/os/linux/sway/config b/os/linux/sway/config index 9f712f8..f226730 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -29,6 +29,7 @@ input type:keyboard { } input type:pointer { + accel_profile flat pointer_accel 0 } From 7ee2475d15dc4b375d8b23adbac67136cbcf3084 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 9 Dec 2021 10:56:47 -0600 Subject: [PATCH 075/103] sc --- common/sc-im/lua/dice.lua | 95 +++++++++++++++++++++++++++++++++++++++ common/sc-im/lua/h.lua | 0 common/sc-im/scimrc | 20 +++++++++ 3 files changed, 115 insertions(+) create mode 100644 common/sc-im/lua/dice.lua create mode 100644 common/sc-im/lua/h.lua create mode 100644 common/sc-im/scimrc diff --git a/common/sc-im/lua/dice.lua b/common/sc-im/lua/dice.lua new file mode 100644 index 0000000..6f345a5 --- /dev/null +++ b/common/sc-im/lua/dice.lua @@ -0,0 +1,95 @@ +local os = require "os" +local math = require "math" + +math.randomseed(os.clock()) + +function table.tostring(self, indent, done) + local result = "" + done = done or {} + indent = indent or 0 + if type(self) == "table" then + for key, value in pairs(self) do + result = result .. string.rep(" ", indent) + if type(value) == "table" and not done[value] then + done[value] = true + result = result .. + string.format( + "[%s] => table\n", + tostring(key) + ) .. + "{\n" .. + table.tostring(value, indent + 2, done) .. + "}\n" + else + result = result .. + string.format("[%s] => %s\n", + tostring(key), + tostring(value) + ) + end + end + else + result = result .. self .. "\n" + end + return result +end + +function log(s) + s = "[timestamp: " .. tostring(os.time()) .. "]\n" .. s + local out = s:gsub("\n", "\n ") + local file = io.open("/tmp/sc-im-dice.log", "a+") + file:write("\n") + file:write(out) + io.close(file) +end + +local dstr_matcher = "(%d*)d(%d+)" + +function dstr(n, s, fl) + n = tonumber(n) or 1 + local sum = 0 + for di = 1, n do + sum = sum + math.random(1, tonumber(s)) + end + return sum +end + +function rolls(s) + local pieces = {} + for nd, ds in s:gmatch(dstr_matcher) do + local sum = dstr(tonumber(nd), tonumber(ds)) + pieces[#pieces+1] = { + tostring(nd) .. "d" .. tostring(ds), + tostring(sum) + } + end + return pieces +end + +function replacerolls(s, rolls) + local result = s + for k, n in ipairs(rolls) do + result = result:gsub(n[1], n[2], 1) + end + return result +end + +function evalreturn(s) + local f = loadstring("return " .. s) + return f() +end + +function sc_parserollstr(s) + local r = rolls(s) + log(table.tostring(r)) + return evalreturn(replacerolls(s, r)) +end + +function sc_rollres(c, r) + local os = require "os" + local seed = (os.time() + os.clock()) * 10000000 + math.randomseed(seed) + log("Setting Seed: " .. tostring(seed)) + local sum = sc_parserollstr(sc.lgetstr(c, r)) + sc.lsetnum(c, r, sum) +end diff --git a/common/sc-im/lua/h.lua b/common/sc-im/lua/h.lua new file mode 100644 index 0000000..e69de29 diff --git a/common/sc-im/scimrc b/common/sc-im/scimrc new file mode 100644 index 0000000..9d914fd --- /dev/null +++ b/common/sc-im/scimrc @@ -0,0 +1,20 @@ +set autocalc +set numeric +set numeric_decimal=0 +set overlap +set xlsx_readformulas + +color "type=HEADINGS fg=WHITE bg=BLACK bold=0 dim=0 standout=0 reverse=0" +color "type=HEADINGS_ODD fg=WHITE bg=BLACK bold=0 dim=0 standout=0 reverse=0" +color "type=CELL_SELECTION_SC fg=WHITE bg=BLACK bold=1 dim=0 standout=1" +color "type=CELL_SELECTION fg=WHITE bg=BLACK bold=1 dim=0 standout=1" +color "type=STRG fg=WHITE bg=BLACK bold=0 dim=1" +color "type=NUMB fg=BLUE bg=BLACK bold=0 dim=1" +color "type=EXPRESSION fg=GREEN bg=BLACK bold=0 dim=1" +color "type=CELL_NEGATIVE fg=RED bg=BLACK bold=0 dim=1" + +nmap "J" "" +nmap "fi" ":format \"0\"" +nmap "B" "Vir" +nmap " " "Ek" + From 818ced88817e8901e51c4ba150b12dccf53c3f99 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 9 Dec 2021 17:45:26 -0600 Subject: [PATCH 076/103] Fix fonts --- os/linux/sway/config | 2 +- os/linux/sway/lock | 2 +- os/linux/waybar/style.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/os/linux/sway/config b/os/linux/sway/config index f226730..e313a9e 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -184,7 +184,7 @@ exec /usr/lib/kdeconnectd exec gammastep -t 6500:3500 -l 39.0:-94.5 exec_always 'killall kanshi; kanshi' -exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." +exec_always notify-send -a "sway" -i ~/.wallpaper "sway configuration loaded" no_focus [class=".*"] output * bg $HOME/.wallpaper fill diff --git a/os/linux/sway/lock b/os/linux/sway/lock index 97553be..c81aa58 100644 --- a/os/linux/sway/lock +++ b/os/linux/sway/lock @@ -1,6 +1,6 @@ color=111111ff image=/home/daniel/.home/.wallpaper -font=Iosevka +font=IosevkaLyte font-size=24 indicator-idle-visible diff --git a/os/linux/waybar/style.css b/os/linux/waybar/style.css index a3b69d0..2051179 100644 --- a/os/linux/waybar/style.css +++ b/os/linux/waybar/style.css @@ -1,7 +1,7 @@ * { border: none; border-radius: 0; - font-family: "Iosevka", "Font Awesome 5 Free", sans-serif; + font-family: "IosevkaLyte", "Font Awesome 5 Free", sans-serif; font-size: 16px; min-height: 0; } From 5c41d8e523b72115f0f4dcee8de51a122439a25a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 13 Dec 2021 09:32:25 -0600 Subject: [PATCH 077/103] Update mako font --- os/linux/mako/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/linux/mako/config b/os/linux/mako/config index 2ccf86e..fd44a15 100644 --- a/os/linux/mako/config +++ b/os/linux/mako/config @@ -2,7 +2,7 @@ max-visible=5 default-timeout=30000 background-color=#111111 border-color=#666666 -font=Iosevka 11 +font=IosevkaLyte 11 progress-color=source #33333388 # format="%s default-timeout=15000 From 3e69c4b49b726d33ddef11cdbb439646b93afe98 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 23 Dec 2021 07:01:27 -0600 Subject: [PATCH 078/103] Cleanup --- common/bin/dotfiles-setup | 1 + common/lemonade/config.toml | 2 ++ .../arch/provision.d/20-install-packages.bash | 26 ++++++++----------- .../provision.d/optional/ui-packages.bash | 24 ++++++++++------- os/linux/kanshi/config | 6 ++--- os/linux/sway/lock | 3 ++- 6 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 common/lemonade/config.toml diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 735036e..72f81b4 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -55,6 +55,7 @@ l common/mutt/rc $h/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs l common/blender/userpref.blend $c/blender/2.93/config/userpref.blend +l common/lemonade/config.toml $c/lemonade.toml popd for s in $c/lytedev-env/*/dotfiles-setup.d.fish diff --git a/common/lemonade/config.toml b/common/lemonade/config.toml new file mode 100644 index 0000000..6c6f94e --- /dev/null +++ b/common/lemonade/config.toml @@ -0,0 +1,2 @@ +host = '127.0.0.1' +line-ending = 'cr' diff --git a/os/linux/arch/provision.d/20-install-packages.bash b/os/linux/arch/provision.d/20-install-packages.bash index accbe2c..db88ddd 100755 --- a/os/linux/arch/provision.d/20-install-packages.bash +++ b/os/linux/arch/provision.d/20-install-packages.bash @@ -1,11 +1,11 @@ #!/usr/bin/env bash -if grep -E -q '^\[multilib\]$' /etc/pacman.conf; then - echo "Multilib Repository Already Enabled!" -else - echo "Enabling Multilib Repository (with sudo)..." - sudo sh -c 'echo -e "\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf' -fi +# if grep -E -q '^\[multilib\]$' /etc/pacman.conf; then +# echo "Multilib Repository Already Enabled!" +# else +# echo "Enabling Multilib Repository (with sudo)..." +# sudo sh -c 'echo -e "\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf' +# fi yay -Sy --needed --noconfirm \ fwupd \ @@ -25,20 +25,17 @@ yay -Sy --needed --noconfirm \ openssh mosh `# Remote Access` \ openssl `# Crypto` \ asdf-vm `# Runtime Version Manager` \ - pass passff-host `# Password Management` \ + pass `# Password Management` \ hexyl `# CLI Hex Viewer` \ rsync `# File Transfer` \ - neovim-nightly-bin `# Text Editors` \ - sc-im `# Spreadsheets` \ + neovim `# Text Editors` \ unzip `# Simple Unzipping` \ - ctags `# Tags` \ tmux `# Terminal Multiplexer` \ - kitty `# Almost Better Terminal Emulator` \ - curl `# HTTP Utility` \ + kitty-terminfo `# Almost Better Terminal Emulator` \ + curl `# It's curl, c'mon` \ w3m `# Terminal Browser` \ jq `# CLI for Interacting with JSON` \ - httpie `# httpie and neovim dependencies` \ - docker docker-compose `# Yummy containers` \ + xh `# New HTTP Utility` \ age sops `# Simple Secretes Managements` \ inotify-tools `# Watching` \ fish `# Shell` \ @@ -49,5 +46,4 @@ yay -Sy --needed --noconfirm \ reflector-simple `# Simplify Mirror Management` \ inetutils `# netutils` \ nnn `# CLI File Manager` \ - ntfs-3g `# Windows filesystem stuff` \ man-db man-pages `# Come On, Man!` diff --git a/os/linux/arch/provision.d/optional/ui-packages.bash b/os/linux/arch/provision.d/optional/ui-packages.bash index 7eda7dd..216f9b4 100755 --- a/os/linux/arch/provision.d/optional/ui-packages.bash +++ b/os/linux/arch/provision.d/optional/ui-packages.bash @@ -1,15 +1,14 @@ #!/usr/bin/env bash -if grep -E -q '^\[multilib\]$' /etc/pacman.conf; then - echo "Multilib Repository Already Enabled!" -else - echo "Enabling Multilib Repository (with sudo)..." - sudo sh -c 'echo -e "\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf' -fi +# if grep -E -q '^\[multilib\]$' /etc/pacman.conf; then +# echo "Multilib Repository Already Enabled!" +# else +# echo "Enabling Multilib Repository (with sudo)..." +# sudo sh -c 'echo -e "\n\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf' +# fi # TODO: some of these may be laptop-only? - -# TODO: switch to Nautilus? +# TODO: switch from Thunar to Nautilus? yay -Sy --needed \ xf86-input-libinput \ @@ -18,6 +17,7 @@ yay -Sy --needed \ arc-gtk-theme `# GTK Theme` \ elementary-icon-theme `# GUI File Explorer Icons` \ thunar thunar-volman gvfs `# GUI File Explorer + Volume Management/Auto-Mount Disks)` \ + ttf-iosevka-lyte `# My font` \ ttf-opensans `# Fonts` \ avr-libc avr-gcc dfu-programmer dfu-util `# Keyboard Programming Utilities` \ gimp inkscape krita `# Image/Vector Editing Applications` \ @@ -31,7 +31,10 @@ yay -Sy --needed \ elixir nodejs erlang rustup `# Langs` \ php `# PHP Language` \ nginx `# Web Server` \ + python python-pip `# Python 3 Language` \ + ctags `# Tags` \ postgresql pgcli `# RDBMS` \ + sc-im `# Spreadsheets` \ cloc `# For counting lines of code` \ noto-fonts noto-fonts-emoji `# Emoji` \ discord `# Voice Chat` \ @@ -42,8 +45,9 @@ yay -Sy --needed \ glu mesa wxgtk2 libpng `# Graphical Libs` \ gammastep `# Redshift for Wayland` \ dmenu `# Application Launcher` \ - python python-pip `# Python 3 Language` \ - firefox-nightly `# Default Web Browser` \ + firefox-developer-edition `# Default Web Browser` \ + passff-host `# Pass integration in Firefox` \ + kitty `# Terinal Emulator` \ alsa-utils `# Audio Utilities` \ alsa-plugins `# Plugins for ALSA` \ pavucontrol pulsemixer `# Audio Backend and Controls` \ diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 7928d1c..0323632 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -49,10 +49,10 @@ profile desktop-ultrawide { # } profile laptop-with-display { - output "Sharp Corporation 0x144A 0x00000000" enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal - output DP-1 enable mode 1920x1080@60Hz position 0,0 scale 1 transform normal + output eDP-1 enable mode 3200x1800@60Hz position 213,1440 scale 1.5 transform normal + output DP-1 enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform normal } profile laptop { - output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal + output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 1.5 transform normal } diff --git a/os/linux/sway/lock b/os/linux/sway/lock index c81aa58..6b48c86 100644 --- a/os/linux/sway/lock +++ b/os/linux/sway/lock @@ -1,7 +1,8 @@ color=111111ff image=/home/daniel/.home/.wallpaper font=IosevkaLyte -font-size=24 +show-failed-attempts +ignore-empty-password indicator-idle-visible indicator-radius=150 From 549c5bb4e3cc60b45f51afb4e42fd910f987733d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 23 Dec 2021 12:03:19 -0600 Subject: [PATCH 079/103] Sway and tmux --- common/fish/paths.fish | 1 - common/fish/vars.fish | 3 ++- host/layer/personal/tmux-tpm.conf | 9 ++++++--- host/layer/personal/tmux.d.conf | 2 +- os/linux/bin/sway-init-tmux | 5 +++++ os/linux/sway/config | 2 ++ 6 files changed, 16 insertions(+), 6 deletions(-) create mode 100755 os/linux/bin/sway-init-tmux diff --git a/common/fish/paths.fish b/common/fish/paths.fish index 4c7fa5a..b6b5376 100644 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -58,7 +58,6 @@ set --export --universal XDG_PICTURES_DIR $NICE_HOME/img set --export --universal XDG_VIDEOS_DIR $NICE_HOME/video set --export --universal XDG_GAMES_DIR $NICE_HOME/games -set --export --universal TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/ set --export --universal NOTES_PATH $XDG_DOCUMENTS_DIR/notes set --export --universal USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs set --export --universal SCROTS_PATH $XDG_PICTURES_DIR/scrots diff --git a/common/fish/vars.fish b/common/fish/vars.fish index 675496b..2b0e249 100644 --- a/common/fish/vars.fish +++ b/common/fish/vars.fish @@ -6,7 +6,8 @@ set --export --universal EXA_COLORS '*=0' set --export --universal ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" set --export --universal TERMINAL kitty -set --export --universal BROWSER firefox-nightly +set --export --universal TERMINAL_ARGS '--single-instance' +set --export --universal BROWSER firefox-developer-edition set --export --universal PAGER less set --export --universal LESS "-r" diff --git a/host/layer/personal/tmux-tpm.conf b/host/layer/personal/tmux-tpm.conf index 307b98f..bc7f117 100644 --- a/host/layer/personal/tmux-tpm.conf +++ b/host/layer/personal/tmux-tpm.conf @@ -1,4 +1,4 @@ -bind-key Z "display-message yotpm" +bind-key X "display-message PLUGINSCONFIGURED" set -g @tpm_plugins ' \ tmux-plugins/tpm \ @@ -7,7 +7,10 @@ set -g @tpm_plugins ' \ tmux-plugins/tmux-continuum \ ' -set -g @continuum-restore 'on' -set -g @continuum-boot 'on' +set -g @resurrect-save 'V' +set -g @resurrect-restore 'L' + +# set -g @continuum-restore 'on' +# set -g @continuum-boot 'on' run '~/.tmux/plugins/tpm/tpm' diff --git a/host/layer/personal/tmux.d.conf b/host/layer/personal/tmux.d.conf index 370571c..7e8e35f 100644 --- a/host/layer/personal/tmux.d.conf +++ b/host/layer/personal/tmux.d.conf @@ -1,3 +1,3 @@ -bind-key Z "display-message yo" +bind-key Z "display-message PERSONALLAYER" if-shell -b "test -d $HOME/.tmux/plugins/tpm" "source-file $ENV_PATH/host-layer-personal/tmux-tpm.conf" diff --git a/os/linux/bin/sway-init-tmux b/os/linux/bin/sway-init-tmux new file mode 100755 index 0000000..2539410 --- /dev/null +++ b/os/linux/bin/sway-init-tmux @@ -0,0 +1,5 @@ +#!/usr/bin/env fish +# +tmux new-session -d -s sway +tmux run-shell "$HOME/.tmux/plugins/tmux-resurrect/scripts/restore.sh" +kitty --single-instance fish -C 'tmux attach -t sway' diff --git a/os/linux/sway/config b/os/linux/sway/config index e313a9e..37516e4 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -182,6 +182,8 @@ exec mako exec pipewire exec /usr/lib/kdeconnectd exec gammastep -t 6500:3500 -l 39.0:-94.5 +exec sway-init-tmux +exec $term exec_always 'killall kanshi; kanshi' exec_always notify-send -a "sway" -i ~/.wallpaper "sway configuration loaded" From 0cc35f6720d7808624a2b4128a8f3a2eeef77365 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 23 Dec 2021 12:20:59 -0600 Subject: [PATCH 080/103] Tmux session work --- common/bin/s | 2 +- common/bin/tmux-lyte-session | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/bin/s b/common/bin/s index 37660b0..e84f8bb 100755 --- a/common/bin/s +++ b/common/bin/s @@ -1,3 +1,3 @@ #!/usr/bin/env bash -N _scratch +tmux-lyte-session notes $NOTES_DIR -- fish -C "N _scratch" diff --git a/common/bin/tmux-lyte-session b/common/bin/tmux-lyte-session index d823b37..ac9a2f3 100755 --- a/common/bin/tmux-lyte-session +++ b/common/bin/tmux-lyte-session @@ -1,8 +1,6 @@ #!/usr/bin/env fish set session_name $argv[1] - -set d (set -q $argv[2] && echo $argv2 || pwd) - -tmux new-session -D -s "$session_name" -c "$d" || \ - tmux attach-session -d -t "$session_name" -c "$d" +set dir (set -q argv[2] && echo $argv[2] || pwd) +tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] || \ + tmux attach-session -d -t "$session_name" -c "$dir" From 5acb13e483f728b9063e90725e536df5b049fe82 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 19 Jan 2022 10:06:05 -0600 Subject: [PATCH 081/103] Add helix config and dc alias --- common/bin/dotfiles-setup | 1 + common/fish/functions.fish | 1 + common/helix/config.toml | 2 ++ common/htop/rc | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 common/helix/config.toml diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 72f81b4..998a462 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -47,6 +47,7 @@ l common/scim/rc $h/.scimrc l common/scim/lua $h/.scim/lua l common/nnn $c/nnn l common/kak $c/kak +l common/helix $c/helix l common/gpg/agent.conf $h/.gnupg/gpg-agent.conf l common/htop/rc $c/htop/htoprc l common/kitty $c/kitty diff --git a/common/fish/functions.fish b/common/fish/functions.fish index bd3273d..10b868e 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -165,6 +165,7 @@ alias mount 'sudo -E mount' alias umount 'sudo -E umount' has_command xdg-open && alias open xdg-open +has_command docker && alias dc "docker compose" function fish_preexec test -n $TMUX && begin diff --git a/common/helix/config.toml b/common/helix/config.toml new file mode 100644 index 0000000..168f24d --- /dev/null +++ b/common/helix/config.toml @@ -0,0 +1,2 @@ +[keys.insert] +j = { k = "normal_mode" } diff --git a/common/htop/rc b/common/htop/rc index 4790124..b1cd180 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -1,6 +1,6 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -htop_version=3.1.1 +htop_version=3.1.2 config_reader_min_version=2 fields=0 48 17 18 38 39 40 2 46 47 49 1 sort_key=47 From 4527c3c87c603398876c6441395c66535311af46 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 1 Feb 2022 17:10:13 -0600 Subject: [PATCH 082/103] Add nginx public share stuff - should probably move some stuff to ansible? --- common/bin/dotfiles-init | 81 ++++++++++--------- common/envs | 1 + common/fish/functions.fish | 2 +- common/fish/vars.fish | 2 + common/htop/rc | 2 +- common/neovim/coc-settings.json | 54 ++++++++++++- common/tmux/conf | 70 ++++++++-------- .../.nginx-autoindex-after.html | 1 + .../.nginx-autoindex-before.html | 60 ++++++++++++++ .../nginx-user-public/dotfiles-setup.d.fish | 11 +++ .../nginx-user-public/user-public-http.conf | 13 +++ .../nginx-user-public/user-public-server.conf | 13 +++ host/layer/personal/dotfiles-setup.d.fish | 8 ++ 13 files changed, 240 insertions(+), 78 deletions(-) create mode 100644 host/layer/nginx-user-public/.nginx-autoindex-after.html create mode 100644 host/layer/nginx-user-public/.nginx-autoindex-before.html create mode 100644 host/layer/nginx-user-public/dotfiles-setup.d.fish create mode 100644 host/layer/nginx-user-public/user-public-http.conf create mode 100644 host/layer/nginx-user-public/user-public-server.conf create mode 100644 host/layer/personal/dotfiles-setup.d.fish diff --git a/common/bin/dotfiles-init b/common/bin/dotfiles-init index 3594349..e9b8718 100755 --- a/common/bin/dotfiles-init +++ b/common/bin/dotfiles-init @@ -8,52 +8,55 @@ export CURDIR dfp="$(realpath "$(dirname "$0")"/../..)" detect_os() { - # NixOS - if head /etc/os-release --lines 1 | grep 'NixOS$' >/dev/null 2>&1; then - ln -s "$dfp/os/linux/nix" "$ENV_PATH/os-linux-nix" >/dev/null 2>&1 - return - fi + # NixOS + if head /etc/os-release --lines 1 | grep 'NixOS$' > /dev/null 2>&1; then + ln -s "$dfp/os/linux/nix" "$ENV_PATH/os-linux-nix" > /dev/null 2>&1 + return + fi - # Arch Linux - if head /etc/os-release --lines 1 | grep 'Arch Linux' >/dev/null 2>&1; then - ln -s "$dfp/os/linux/arch" "$ENV_PATH/os-linux-arch" >/dev/null 2>&1 - return - fi + # Arch Linux + if head /etc/os-release --lines 1 | grep 'Arch Linux' > /dev/null 2>&1; then + ln -s "$dfp/os/linux/arch" "$ENV_PATH/os-linux-arch" > /dev/null 2>&1 + return + fi - # Pacman-based - if command -v pacman; then - ln -s "$dfp/os/linux/arch" "$ENV_PATH/os-linux-arch" >/dev/null 2>&1 - return - fi + # Pacman-based + if command -v pacman; then + ln -s "$dfp/os/linux/arch" "$ENV_PATH/os-linux-arch" > /dev/null 2>&1 + return + fi - # TODO: Debian + # TODO: Debian - echo "Failed to auto-detect your OS! Please setup your environments and run this script again." - exit 3 + echo "Failed to auto-detect your OS! Please setup your environments and run this script again." + exit 3 } -if command -v git >/dev/null 2>&1; then - if [ -f "$dfp/common/envs" ]; then - # TODO: more shared init stuff? - mkdir -p $ENV_PATH - detect_os - ls -la -R $ENV_PATH/* - find "$ENV_PATH" | while read -r s; do - f="$s/dotfiles-init.d.sh" - if [ -f "$f" ]; then - CURDIR="$s" - . "$f" - fi - done - $dfp/common/bin/dotfiles-setup - else - git clone "https://git.lyte.dev/lytedev/dotfiles.git" "$XDG_CONFIG_HOME/lytedev-dotfiles" - cd "$XDG_CONFIG_HOME/lytedev-dotfiles" || { echo "Could not cd to dotfiles dir"; exit 2; } - . ./common/bin/dotfiles-init - fi +if command -v git > /dev/null 2>&1; then + if [ -f "$dfp/common/envs" ]; then + # TODO: more shared init stuff? + mkdir -p "$ENV_PATH" + detect_os + ls -la -R "$ENV_PATH/*" + find "$ENV_PATH" | while read -r s; do + f="$s/dotfiles-init.d.sh" + if [ -f "$f" ]; then + CURDIR="$s" + . "$f" + fi + done + $dfp/common/bin/dotfiles-setup + else + git clone "https://git.lyte.dev/lytedev/dotfiles.git" "$XDG_CONFIG_HOME/lytedev-dotfiles" + cd "$XDG_CONFIG_HOME/lytedev-dotfiles" || { + echo "Could not cd to dotfiles dir" + exit 2 + } + . ./common/bin/dotfiles-init + fi else - echo "git not installed" - exit 1 + echo "git not installed" + exit 1 fi # TODO: run provision script diff --git a/common/envs b/common/envs index 4b3a558..c14dd3d 100644 --- a/common/envs +++ b/common/envs @@ -22,3 +22,4 @@ host/laptop/postmates-macbook host/laptop/uber-macbook host/laptop/val-macbook host/layer/personal +host/layer/nginx-user-public diff --git a/common/fish/functions.fish b/common/fish/functions.fish index 10b868e..e32d927 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -142,7 +142,7 @@ alias cdltl "cd (ltld)" alias p "ping 8.8.8.8" function pp --description "Keeps trying to ping 8.8.8.8 forever" - while not ping -n 1 -t 5 8.8.8.8 + while not ping -n 1 -w 5 8.8.8.8 sleep 1 end end diff --git a/common/fish/vars.fish b/common/fish/vars.fish index 2b0e249..6514e7f 100644 --- a/common/fish/vars.fish +++ b/common/fish/vars.fish @@ -25,4 +25,6 @@ else if command --search --quiet vi set --export --universal VISUAL vi end +set --export --universal SOPS_AGE_KEY_FILE "$XDG_CONFIG_HOME/sops/age/keys.txt" + # has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git' diff --git a/common/htop/rc b/common/htop/rc index b1cd180..da3a701 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -3,7 +3,7 @@ htop_version=3.1.2 config_reader_min_version=2 fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=47 +sort_key=46 sort_direction=-1 tree_sort_key=0 tree_sort_direction=1 diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index d4195fd..9461396 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -1,5 +1,5 @@ { - "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "typescript", "css", "markdown"], + "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "typescript", "css", "markdown", "sh", "bash"], "languageserver": { "nim": { "command": "nimlsp", @@ -17,9 +17,55 @@ }, "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", "rust-analyzer.checkOnSave.command": "clippy", - "diagnostic-languageserver.filetypes": { - "elixir": ["mix_credo", "mix_credo_compile"], - "eelixir": ["mix_credo", "mix_credo_compile"] + "diagnostic-languageserver": { + "enable": true, + "mergeConfig": true, + "linters": { + "shellcheck": { + "command": "shellcheck", + "debounce": 100, + "args": [ + "-x", + "--format", + "json1", + "-" + ], + "sourceName": "shellcheck", + "parseJson": { + "errorsRoot": "comments", + "line": "line", + "column": "column", + "endLine": "endLine", + "endColumn": "endColumn", + "message": "${message} [${code}]", + "security": "level" + }, + "securities": { + "error": "error", + "warning": "warning", + "info": "info", + "style": "hint" + } + } + }, + "filetypes": { + "elixir": ["mix_credo", "mix_credo_compile"], + "eelixir": ["mix_credo", "mix_credo_compile"], + "sh": "shellcheck", + "bash": "shellcheck" + }, + "formatters": { + "shfmt": { + "command": "shfmt", + "args": ["-i", "2", "-bn", "-ci", "-sr", "-kp"] + } + }, + "formatFiletypes": { + "elixir": "mix_format", + "eelixir": "mix_format", + "sh": "shfmt", + "bash": "shfmt" + } } } diff --git a/common/tmux/conf b/common/tmux/conf index 5530295..1203785 100644 --- a/common/tmux/conf +++ b/common/tmux/conf @@ -1,26 +1,28 @@ unbind C-b set -g prefix C-s -bind-key s send-prefix +bind s send-prefix -bind-key v split-window -h -bind-key b split-window -bind-key T source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf" -bind-key O display-message "#(tmux-save-buffer '#S')" -bind-key H set -s status -bind-key -n C-l select-pane -R -bind-key -n C-k select-pane -U -bind-key -n C-j select-pane -D -bind-key -n C-h select-pane -L -bind-key -n C-t new-window -bind-key Tab next-window -bind-key -n C-Tab next-window -bind-key -n C-S-Tab previous-window +bind v split-window -h +bind b split-window +bind T source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf" +bind O display-message "#(tmux-save-buffer '#S')" +bind D attach-session -t . -c '#{pane_current_path}' \; display-message "Set session path to #{pane_current_path}" +bind H set -s status +bind -n C-l select-pane -R +bind -n C-k select-pane -U +bind -n C-j select-pane -D +bind -n C-h select-pane -L +bind -n C-t new-window +bind Tab next-window +bind -n C-Tab next-window +bind -n C-S-Tab previous-window bind s run "tmux split-window -l 12 'tmuxswitcher'" bind M-l source-file "$XDG_CONFIG_HOME/tmux/layouts/dev.tmux" set -g update-environment "WAYLAND_DISPLAY DISPLAY" +# TODO: check if kitty is installed? set -g default-terminal "kitty" set -g mouse on set -g escape-time 0 @@ -42,7 +44,11 @@ set -g window-status-separator "" set -g window-status-current-format " #W" set -g status-left "#h:#S #W" set -g status-right-length 280 -set -g status-right "#(kubeline && printf ' ')#{pane_current_path} #(cd '#{pane_current_path}' && git rev-parse --abbrev-ref --sq HEAD | tr -d \"'\")#{pane_current_command}" +set -g status-right "#(kubeline && printf ' ')" + set -ag status-right "#(pwd | $XDG_CONFIG_HOME/lytedev-dotfiles/common/bin/glancepath) " + set -ag status-right "#(cd '#{pane_current_path}' && git rev-parse --abbrev-ref --sq HEAD | tr -d \"'\")" + set -ag status-right "#{pane_current_command}" + set -g message-style "fg=colour7 bg=colour18" set -g pane-active-border-style bg=black,fg=blue set -g pane-border-style bg=black,fg=colour18 @@ -54,29 +60,27 @@ set -g window-status-current-format "" # present a menu of urls to open from the visible pane # TODO: fzf-ify this -bind-key u capture-pane \;\ - save-buffer /tmp/tmux-buffer \;\ - split-window -l 10 "urlscan /tmp/tmux-buffer" +# bind u capture-pane \;\ +# save-buffer /tmp/tmux-buffer \;\ +# split-window -l 10 "urlscan /tmp/tmux-buffer" -bind-key -T copy-mode-vi "y" send-keys -X copy-pipe-and-cancel 'wl-copy' -bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy'; \ +bind -T copy-mode-vi "y" send-keys -X copy-pipe-no-clear 'wl-copy' \; display-message 'Copied to clipboard!' +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear 'wl-copy' \; display-message 'Copied to clipboard!' -bind-key K kill-pane -bind-key C-S-k kill-window +bind K kill-pane +bind C-S-k kill-window # TODO: handle tmux nesting by being able to toggle the prefix (and indicate in status bar?) -# bind -T root F12 \ -# set prefix None \;\ -# set key-table off \;\ -# set status off \ -# if -F "#{pane_in_mode}" "send-keys -X cancel" \;\ -# refresh-client -S \;\ +# TODO: styles after `set -u key-table` +#if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ +bind -T root F12 set -g prefix None \; set -g key-table off \; display-message "Keys OFF" \; refresh-client -S -# bind -T off F12 \ -# set -u prefix \;\ -# set -u key-table \;\ -# set status on \;\ -# refresh-client -S +# TODO: styles after `set -u key-table` +bind -T off F12 \ + set -g -u prefix \;\ + set -g -u key-table \;\ + display-message "Keys ON" \;\ + refresh-client -S source-file "$ENV_PATH/*/tmux.d.conf" diff --git a/host/layer/nginx-user-public/.nginx-autoindex-after.html b/host/layer/nginx-user-public/.nginx-autoindex-after.html new file mode 100644 index 0000000..a446d53 --- /dev/null +++ b/host/layer/nginx-user-public/.nginx-autoindex-after.html @@ -0,0 +1 @@ + diff --git a/host/layer/nginx-user-public/.nginx-autoindex-before.html b/host/layer/nginx-user-public/.nginx-autoindex-before.html new file mode 100644 index 0000000..f7b6f40 --- /dev/null +++ b/host/layer/nginx-user-public/.nginx-autoindex-before.html @@ -0,0 +1,60 @@ + + + + + + + diff --git a/host/layer/nginx-user-public/dotfiles-setup.d.fish b/host/layer/nginx-user-public/dotfiles-setup.d.fish new file mode 100644 index 0000000..15ea258 --- /dev/null +++ b/host/layer/nginx-user-public/dotfiles-setup.d.fish @@ -0,0 +1,11 @@ +#!/usr/bin/env fish +set me (status -f) +set dfp $argv[1] +set h $argv[2] +set c $argv[3] + +pushd (dirname $me) +sudo ln -s (pwd)/user-public-http.conf /etc/nginx/user-public-http.conf +sudo ln -s (pwd)/user-public-server.conf /etc/nginx/user-public-server.conf +sudo ln -s (pwd)/.nginx-autoindex-before.html /usr/share/nginx/html/.nginx-autoindex-before.html +sudo ln -s (pwd)/.nginx-autoindex-after.html /usr/share/nginx/html/.nginx-autoindex-after.html diff --git a/host/layer/nginx-user-public/user-public-http.conf b/host/layer/nginx-user-public/user-public-http.conf new file mode 100644 index 0000000..5b63a87 --- /dev/null +++ b/host/layer/nginx-user-public/user-public-http.conf @@ -0,0 +1,13 @@ +disable_symlinks off; + +# for wasm games +types { + application/octet-stream clr; + application/octet-stream pdb; +} + +gzip on; +gzip_min_length 10240; +gzip_proxied expired no-cache no-store private auth; +gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml application/wasm; +gzip_disable msie6; diff --git a/host/layer/nginx-user-public/user-public-server.conf b/host/layer/nginx-user-public/user-public-server.conf new file mode 100644 index 0000000..c430984 --- /dev/null +++ b/host/layer/nginx-user-public/user-public-server.conf @@ -0,0 +1,13 @@ +# need CORS? +# location ~* \.(eot|ttf|woff|woff2)$ { +# add_header Access-Control-Allow-Origin *; +# } + +location ~ ^/~(.+?)(/.*)?$ { + disable_symlinks off; + alias /home/$1/public$2; + index index.html index.htm; + autoindex on; + add_before_body "/.nginx-autoindex-before.html"; + add_after_body "/.nginx-autoindex-after.html"; +} diff --git a/host/layer/personal/dotfiles-setup.d.fish b/host/layer/personal/dotfiles-setup.d.fish new file mode 100644 index 0000000..b1241a8 --- /dev/null +++ b/host/layer/personal/dotfiles-setup.d.fish @@ -0,0 +1,8 @@ +#!/usr/bin/env fish +set me (status -f) +set dfp $argv[1] +set h $argv[2] +set c $argv[3] + +pushd (dirname $me) +# l app $c/app From 7624209ca160a64d28dc82ea6dd57345a2e4b97a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 2 Feb 2022 09:49:11 -0600 Subject: [PATCH 083/103] Cleanup --- common/fish/.gitignore | 4 + common/fish/completions/fisher.fish | 7 - common/fish/completions/kubectl.fish | 1654 ----------------- common/fish/completions/nvm.fish | 19 - common/fish/conf.d/nvm.fish | 28 - common/fish/functions/_nvm_index_update.fish | 12 - common/fish/functions/_nvm_list.fish | 11 - .../fish/functions/_nvm_version_activate.fish | 4 - .../functions/_nvm_version_deactivate.fish | 5 - common/fish/functions/nvm.fish | 206 -- 10 files changed, 4 insertions(+), 1946 deletions(-) delete mode 100644 common/fish/completions/fisher.fish delete mode 100644 common/fish/completions/kubectl.fish delete mode 100644 common/fish/completions/nvm.fish delete mode 100644 common/fish/conf.d/nvm.fish delete mode 100644 common/fish/functions/_nvm_index_update.fish delete mode 100644 common/fish/functions/_nvm_list.fish delete mode 100644 common/fish/functions/_nvm_version_activate.fish delete mode 100644 common/fish/functions/_nvm_version_deactivate.fish delete mode 100644 common/fish/functions/nvm.fish diff --git a/common/fish/.gitignore b/common/fish/.gitignore index 0fcf980..3ac921e 100644 --- a/common/fish/.gitignore +++ b/common/fish/.gitignore @@ -1 +1,5 @@ fish_* + +completions +conf.d +functions diff --git a/common/fish/completions/fisher.fish b/common/fish/completions/fisher.fish deleted file mode 100644 index 4e1016a..0000000 --- a/common/fish/completions/fisher.fish +++ /dev/null @@ -1,7 +0,0 @@ -complete -c fisher -x -l help -d "print usage help" -complete -c fisher -x -l version -d "print fisher version" -complete -c fisher -x -n "__fish_use_subcommand" -a install -d "install plugins" -complete -c fisher -x -n "__fish_use_subcommand" -a update -d "update installed plugins" -complete -c fisher -x -n "__fish_use_subcommand" -a remove -d "remove installed plugins" -complete -c fisher -x -n "__fish_use_subcommand" -a list -d "list installed plugins matching " -complete -c fisher -x -n "__fish_seen_subcommand_from update remove" -a "(fisher list)" \ No newline at end of file diff --git a/common/fish/completions/kubectl.fish b/common/fish/completions/kubectl.fish deleted file mode 100644 index 5664689..0000000 --- a/common/fish/completions/kubectl.fish +++ /dev/null @@ -1,1654 +0,0 @@ -# -set -q FISH_KUBECTL_COMPLETION_TIMEOUT; or set FISH_KUBECTL_COMPLETION_TIMEOUT 5s -set -q FISH_KUBECTL_COMPLETION_COMPLETE_CRDS; or set FISH_KUBECTL_COMPLETION_COMPLETE_CRDS 1 -set __fish_kubectl_timeout "--request-timeout=$FISH_KUBECTL_COMPLETION_TIMEOUT" -set __fish_kubectl_all_namespaces_flags "--all-namespaces" "--all-namespaces=true" -set __fish_kubectl_subresource_commands get describe delete edit label explain -set __fish_kubectl_commands alpha \ - annotate \ - api-resources \ - api-versions \ - apply \ - attach \ - auth \ - autoscale \ - certificate \ - cluster-info \ - completion \ - config \ - convert \ - cordon \ - cp \ - create \ - delete \ - describe \ - diff \ - drain \ - edit \ - exec \ - explain \ - expose \ - get \ - kustomize \ - label \ - logs \ - options \ - patch \ - plugin \ - port-forward \ - proxy \ - replace \ - rollout \ - run \ - scale \ - set \ - taint \ - top \ - uncordon \ - version \ - wait - -function __fish_kubectl - set -l context_args - - if set -l context_flags (__fish_kubectl_get_context_flags | string split " ") - for c in $context_flags - set context_args $context_args $c - end - end - - command kubectl $__fish_kubectl_timeout $context_args $argv -end - -function __fish_kubectl_get_commands - echo alpha\t'Commands for features in alpha' - echo annotate\t'Update the annotations on a resource' - echo api-resources\t'Print the supported API resources on the server' - echo api-versions\t'Print the supported API versions on the server, in the form of "group/version"' - echo apply\t'Apply a configuration to a resource by filename or stdin' - echo attach\t'Attach to a running container' - echo auth\t'Inspect authorization' - echo autoscale\t'Auto-scale a Deployment, ReplicaSet, or ReplicationController' - echo certificate\t'Modify certificate resources.' - echo cluster-info\t'Display cluster info' - echo completion\t'Output shell completion code for the specified shell (bash or zsh)' - echo config\t'Modify kubeconfig files' - echo convert\t'Convert config files between different API versions' - echo cordon\t'Mark node as unschedulable' - echo cp\t'Copy files and directories to and from containers.' - echo create\t'Create a resource from a file or from stdin.' - echo delete\t'Delete resources by filenames, stdin, resources and names, or by resources and label selector' - echo describe\t'Show details of a specific resource or group of resources' - echo diff\t'Diff live version against would-be applied version' - echo drain\t'Drain node in preparation for maintenance' - echo edit\t'Edit a resource on the server' - echo exec\t'Execute a command in a container' - echo explain\t'Documentation of resources' - echo expose\t'Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service' - echo get\t'Display one or many resources' - echo kustomize\t'Build a kustomization target from a directory or a remote url.' - echo label\t'Update the labels on a resource' - echo logs\t'Print the logs for a container in a pod' - echo options\t'Print the list of flags inherited by all commands' - echo patch\t'Update field(s) of a resource using strategic merge patch' - echo plugin\t'Provides utilities for interacting with plugins.' - echo port-forward\t'Forward one or more local ports to a pod' - echo proxy\t'Run a proxy to the Kubernetes API server' - echo replace\t'Replace a resource by filename or stdin' - echo rollout\t'Manage the rollout of a resource' - echo run\t'Run a particular image on the cluster' - echo scale\t'Set a new size for a Deployment, ReplicaSet or Replication Controller' - echo set\t'Set specific features on objects' - echo taint\t'Update the taints on one or more nodes' - echo top\t'Display Resource (CPU/Memory/Storage) usage.' - echo uncordon\t'Mark node as schedulable' - echo version\t'Print the client and server version information' - echo wait\t'Experimental: Wait for a specific condition on one or many resources.' -end - -set __fish_kubectl_resources \ - all \ - certificatesigningrequests csr \ - clusterrolebindings \ - clusterroles \ - clusters \ - componentstatuses cs \ - configmaps configmap cm \ - controllerrevisions \ - cronjobs cj \ - customresourcedefinition crd crds \ - daemonsets ds \ - deployments deployment deploy \ - endpoints ep \ - events ev \ - horizontalpodautoscalers hpa \ - ingresses ingress ing \ - jobs job \ - limitranges limits \ - namespaces namespace ns \ - networkpolicies netpol \ - nodes node no \ - persistentvolumeclaims pvc \ - persistentvolumes pv \ - poddisruptionbudgets pdb \ - podpreset \ - pods pod po \ - podsecuritypolicies psp \ - podtemplates \ - replicasets rs \ - replicationcontrollers rc \ - resourcequotas quota \ - rolebindings \ - roles \ - secrets secret \ - serviceaccounts sa \ - services service svc \ - statefulsets sts \ - storageclass storageclasses sc - -set __fish_kubectl_cached_crds "" -set __fish_kubectl_last_crd_fetch "" - -function __fish_kubectl_actually_get_crds - set __fish_kubectl_cached_crds (__fish_kubectl get crd -o jsonpath='{range .items[*]}{.spec.names.plural}{"\n"}{.spec.names.singular}{"\n"}{range .spec.names.shortNames[]}{@}{"\n"}{end}{end}' 2>/dev/null) - set __fish_kubectl_last_crd_fetch (__fish_kubectl_get_current_time) - for i in $__fish_kubectl_cached_crds - echo $i - end -end - -function __fish_kubectl_get_current_time - date +'%s' -end - -function __fish_kubectl_get_crds - if test -z "$__fish_kubectl_last_crd_fetch"; or test -z "$__fish_kubectl_cached_crds" - __fish_kubectl_actually_get_crds - return 0 - end - - set -l ct (__fish_kubectl_get_current_time) - set -l duration (math $ct-$__fish_kubectl_last_crd_fetch) - # Only fetch crds if we have not fetched them within the past 30 seconds. - if test "$duration" -gt 30 - __fish_kubectl_actually_get_crds - return 0 - end - - for i in $__fish_kubectl_cached_crds - echo $i - end -end - -function __fish_kubectl_seen_subcommand_from_regex - set -l cmd (commandline -poc) - set -e cmd[1] - for i in $cmd - for r in $argv - if string match -r -- $r $i - return 0 - end - end - end - return 1 -end - -function __fish_kubectl_needs_command -d 'Test if kubectl has yet to be given the subcommand' - for i in (commandline -opc) - if contains -- $i $__fish_kubectl_commands - echo "$i" - return 1 - end - end - return 0 -end - -function __fish_kubectl_needs_resource -d 'Test if kubectl has yet to be given the subcommand resource' - set -l resources (__fish_kubectl_print_resource_types) - for i in (commandline -opc) - if contains -- $i $resources - return 1 - end - end - return 0 -end - -function __fish_kubectl_using_command - set -l cmd (__fish_kubectl_needs_command) - test -z "$cmd" - and return 1 - - contains -- $cmd $argv - and echo "$cmd" - and return 0 - - return 1 -end - -function __fish_kubectl_using_resource - set -l cmd (__fish_kubectl_needs_resource) - test -z "$cmd" - and return 1 - - contains -- $cmd $argv - and echo "$cmd" - and return 0 - - return 1 -end - -function __fish_kubectl_has_partial_resource_match - set -l last (commandline -opt) - if not set -l matches (string match -- "(.*)/" $last) - return - end - - if string match -q -- "(.*)/" $last - return 0 - end - - return 1 -end - -function __fish_kubectl_print_matching_resources - set -l last (commandline -opt) - if not set -l matches (string match -r -- "(.*)/" $last) - return - end - set -l prefix $matches[2] - set -l resources (__fish_kubectl_print_resource "$prefix") - for i in $resources - echo "$prefix/$i" - end -end - -function __fish_kubectl_get_context_flags - set -l cmd (commandline -opc) - if [ (count $cmd) -eq 0 ] - return 1 - end - - set -l foundContext 0 - - for c in $cmd - test $foundContext -eq 1 - set -l out "--context" "$c" - and echo $out - and return 0 - - if string match -q -r -- "--context=" "$c" - set -l out (string split -- "=" "$c" | string join " ") - and echo $out - and return 0 - else if contains -- "$c" "--context" - set foundContext 1 - end - end - - return 1 -end - -function __fish_kubectl_get_ns_flags - set -l cmd (commandline -opc) - if [ (count $cmd) -eq 0 ] - return 1 - end - - set -l foundNamespace 0 - - for c in $cmd - test $foundNamespace -eq 1 - set -l out "--namespace" "$c" - and echo $out - and return 0 - - if contains -- $c $__kubectl_all_namespaces_flags - echo "--all-namespaces" - return 0 - end - - if contains -- $c "--namespace" "-n" - set foundNamespace 1 - end - end - - return 1 -end - -function __fish_kubectl_print_resource_types - for r in $__fish_kubectl_resources - echo $r - end - - if test $FISH_KUBECTL_COMPLETION_COMPLETE_CRDS -eq 1 - set -l crds (__fish_kubectl_get_crds) - - for r in $crds - echo $r - end - end -end - -function __fish_kubectl_print_current_resources -d 'Prints current resources' - set -l found 0 - # There is probably a better way to do this... - # found === 1 means that we have not yet found the crd type - # found === 2 means that we have not yet found the crd name, but have found the type - set -l current_resource - set -l crd_types (__fish_kubectl_get_crds) - for i in (commandline -opc) - if test $found -eq 0 - if contains -- $i $__fish_kubectl_subresource_commands - set found 1 - end - end - - if test $found -eq 1 - if contains -- $i $crd_types - set -l out (__fish_kubectl_print_resource $i) - for item in $out - echo "$item" - end - return 0 - end - end - end -end - -function __fish_kubectl_print_resource -d 'Print a list of resources' -a resource - set -l args - if set -l ns_flags (__fish_kubectl_get_ns_flags | string split " ") - for ns in $ns_flags - set args $args $ns - end - end - - set args $args get "$resource" - __fish_kubectl $args --no-headers 2>/dev/null | awk '{print $1}' | string replace -r '(.*)/' '' -end - -function __fish_kubectl_get_config -a type - set -l template "{{ range .$type }}"'{{ .name }}{{"\n"}}{{ end }}' - __fish_kubectl config view -o template --template="$template" -end - -function __fish_kubectl_get_rollout_resources - set -l args - if set -l ns_flags (__fish_kubectl_get_ns_flags | string split " ") - for ns in $ns_flags - set args $args $ns - end - end - - set -l template '{range .items[*]}{.metadata.name}{"\n"}{end}' - - set -l deploys (__fish_kubectl $args get deploy -o jsonpath="$template" 2>/dev/null) - set -l daemonsets (__fish_kubectl $args get ds -o jsonpath="$template" 2>/dev/null) - set -l sts (__fish_kubectl $args get sts -o jsonpath="$template" 2>/dev/null) - - for i in $deploys - echo "deploy/$i" - echo "deployment/$i" - echo "deployments/$i" - end - - for i in $daemonsets - echo "daemonset/$i" - echo "daemonsets/$i" - echo "ds/$i" - end - - for i in $sts - echo "statefulset/$i" - echo "statefulsets/$i" - echo "sts/$i" - end -end - -complete -c kubectl -f -n '__fish_kubectl_needs_command' -a '(__fish_kubectl_get_commands)' - -for subcmd in $__fish_kubectl_subresource_commands - complete -c kubectl -f -n "__fish_kubectl_using_command $subcmd; and not __fish_seen_subcommand_from (__fish_kubectl_print_resource_types)" -a '(__fish_kubectl_print_resource_types)' -d 'Resource' - complete -c kubectl -f -n "__fish_kubectl_using_command $subcmd; and __fish_kubectl_has_partial_resource_match" -a '(__fish_kubectl_print_matching_resources)' -d 'Resource' - for resource in $__fish_kubectl_resources - complete -c kubectl -f -n "__fish_kubectl_using_command $subcmd; and __fish_seen_subcommand_from $resource" -a "(__fish_kubectl_print_resource $resource)" -d "$resource" - end - - if test $FISH_KUBECTL_COMPLETION_COMPLETE_CRDS -eq 1 - complete -c kubectl -f -n "__fish_kubectl_using_command $subcmd; and __fish_seen_subcommand_from (__fish_kubectl_get_crds)" -a '(__fish_kubectl_print_current_resources)' -d 'CRD' - end -end - -complete -c kubectl -f -n "__fish_seen_subcommand_from log logs exec port-forward" -a '(__fish_kubectl_print_resource pods)' -d 'Pod' -complete -c kubectl -f -n "__fish_seen_subcommand_from top; and __fish_seen_subcommand_from po pod pods" -a '(__fish_kubectl_print_resource pods)' -d 'Pod' -complete -c kubectl -f -n "__fish_seen_subcommand_from top; and __fish_seen_subcommand_from no node nodes" -a '(__fish_kubectl_print_resource nodes)' -d 'Node' - -for subcmd in cordon uncordon drain taint - complete -c kubectl -f -n "__fish_seen_subcommand_from $subcmd" -a '(__fish_kubectl_print_resource nodes)' -d 'Node' -end - -set -l __fish_kubectl_config_complete_contexts \ - delete-context \ - get-contexts \ - rename-contexts \ - set-context \ - use-context - -set -l __fish_kubectl_config_complete_clusters \ - delete-cluster \ - get-clusters \ - set-cluster - -complete -c kubectl -f -n "__fish_seen_subcommand_from config; and __fish_seen_subcommand_from $__fish_kubectl_config_complete_contexts" -a '(__fish_kubectl_get_config contexts)' -d 'Context' -complete -c kubectl -f -n "__fish_seen_subcommand_from config; and __fish_seen_subcommand_from $__fish_kubectl_config_complete_clusters" -a '(__fish_kubectl_get_config clusters)' -d 'Cluster' -complete -c kubectl -f -n "__fish_seen_subcommand_from rollout; and __fish_seen_subcommand_from (__fish_kubectl_get_rollout_commands_without_descriptions)" -a '(__fish_kubectl_get_rollout_resources)' -complete -c kubectl -f -r -l as -d 'Username to impersonate for the operation' -complete -c kubectl -f -r -l as-group -d 'Group to impersonate for the operation, this flag can be repeated to specify multiple groups.' -complete -c kubectl -r -l cache-dir -d 'Default HTTP cache directory' -complete -c kubectl -r -l certificate-authority -d 'Path to a cert file for the certificate authority' -complete -c kubectl -r -l client-certificate -d 'Path to a client certificate file for TLS' -complete -c kubectl -r -l client-key -d 'Path to a client key file for TLS' -complete -c kubectl -f -r -l cluster -d 'The name of the kubeconfig cluster to use' -a '(__fish_kubectl_get_config clusters)' -complete -c kubectl -f -r -l context -d 'The name of the kubeconfig context to use' -a '(__fish_kubectl_get_config contexts)' -complete -c kubectl -f -l insecure-skip-tls-verify -d 'If true, the server\'s certificate will not be checked for validity. This will make your HTTPS connections insecure' -complete -c kubectl -r -l kubeconfig -d 'Path to the kubeconfig file to use for CLI requests.' -complete -c kubectl -f -l match-server-version -d 'Require server version to match client version' -complete -c kubectl -f -r -s n -l namespace -d 'If present, the namespace scope for this CLI request' -a '(__fish_kubectl_print_resource namespace)' -complete -c kubectl -f -r -l password -d 'Password for basic authentication to the API server' -complete -c kubectl -f -r -l profile -d 'Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex)' -complete -c kubectl -f -r -l profile-output -d 'Name of the file to write the profile to' -complete -c kubectl -f -r -l request-timeout -d 'The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don\'t timeout requests.' -complete -c kubectl -f -r -s s -l server -d 'The address and port of the Kubernetes API server' -complete -c kubectl -f -r -l tls-server-name -d 'Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used' -complete -c kubectl -f -r -l token -d 'Bearer token for authentication to the API server' -complete -c kubectl -f -r -l user -d 'The name of the kubeconfig user to use' -a '(__fish_kubectl_get_config users)' -complete -c kubectl -f -r -l username -d 'Username for basic authentication to the API server' - -# Completions for the "kubectl alpha" command -function __fish_kubectl_get_alpha_commands - echo debug\t'Attach a debug container to a running pod' -end - -function __fish_kubectl_get_alpha_commands_without_descriptions - __fish_kubectl_get_alpha_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command alpha; and not __fish_seen_subcommand_from (__fish_kubectl_get_alpha_commands_without_descriptions)" -a '(__fish_kubectl_get_alpha_commands)' - -# Completions for the "kubectl alpha debug" command -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -l arguments-only -d 'If specified, everything after -- will be passed to the new container as Args instead of Command.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -l attach -d 'If true, wait for the Pod to start running, and then attach to the Pod as if \'kubectl attach ...\' were called. Default false, unless \'-i/--stdin\' is set, in which case the default is true.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -r -l container -d 'Container name to use for debug container.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -r -l env -d 'Environment variables to set in the container.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -r -l image -d 'Container image to use for debug container.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -r -l image-pull-policy -d 'The image pull policy for the container.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -l quiet -d 'If true, suppress prompt messages.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -s i -l stdin -d 'Keep stdin open on the container(s) in the pod, even if nothing is attached.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -r -l target -d 'Target processes in this container name.' -complete -c kubectl -f -n '__fish_seen_subcommand_from alpha debug' -s t -l tty -d 'Allocated a TTY for each container in the pod.' - -# Completions for the "kubectl annotate" command -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -r -l field-selector -d 'Selector (field query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.' -complete -c kubectl -n '__fish_seen_subcommand_from annotate' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to update the annotation' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -l local -d 'If true, annotation will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -l overwrite -d 'If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -r -l resource-version -d 'If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from annotate' -r -s l -l selector -d 'Selector (label query) to filter on, not including uninitialized ones, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2).' -complete -c kubectl -n '__fish_seen_subcommand_from annotate' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl api-resources" command -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -r -l api-group -d 'Limit to resources in the specified API group.' -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -l cached -d 'Use the cached list of resources if available.' -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -l namespaced -d 'If false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.' -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -l no-headers -d 'When using the default or custom-column output format, don\'t print headers (default print headers).' -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -r -s o -l output -d 'Output format. One of: wide|name.' -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -r -l sort-by -d 'If non-empty, sort nodes list using specified field. The field can be either \'name\' or \'kind\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from api-resources' -r -l verbs -d 'Limit to resources that support the specified verbs.' - -# Completions for the "kubectl apply" command -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l all -d 'Select all resources in the namespace of the specified resource types.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l cascade -d 'If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -l field-manager -d 'Name of the manager used to track field ownership.' -complete -c kubectl -n '__fish_seen_subcommand_from apply' -r -s f -l filename -d 'that contains the configuration to apply' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l force -d 'If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l force-conflicts -d 'If true, server-side apply will force the changes against conflicts.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -l grace-period -d 'Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -s k -l kustomize -d 'Process a kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l openapi-patch -d 'If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi spec. Otherwise, fall back to use baked-in types.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l overwrite -d 'Automatically resolve conflicts between the modified and live configuration by using values from the modified configuration' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l prune -d 'Automatically delete resource objects, including the uninitialized ones, that do not appear in the configs and are created by either apply or create --save-config. Should be used with either -l or --all.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -l prune-whitelist -d 'Overwrite the default whitelist with for --prune' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l server-side -d 'If true, apply runs in the server instead of the client.' -complete -c kubectl -n '__fish_seen_subcommand_from apply' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -r -l timeout -d 'The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply' -l wait -d 'If true, wait for resources to be gone before returning. This waits for finalizers.' -function __fish_kubectl_get_apply_commands - echo edit-last-applied\t'Edit latest last-applied-configuration annotations of a resource/object' - echo set-last-applied\t'Set the last-applied-configuration annotation on a live object to match the contents of a file.' - echo view-last-applied\t'View latest last-applied-configuration annotations of a resource/object' -end - -function __fish_kubectl_get_apply_commands_without_descriptions - __fish_kubectl_get_apply_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command apply; and not __fish_seen_subcommand_from (__fish_kubectl_get_apply_commands_without_descriptions)" -a '(__fish_kubectl_get_apply_commands)' - -# Completions for the "kubectl apply edit-last-applied" command -complete -c kubectl -f -n '__fish_seen_subcommand_from apply edit-last-applied' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from apply edit-last-applied' -r -s f -l filename -d 'Filename, directory, or URL to files to use to edit the resource' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply edit-last-applied' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply edit-last-applied' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply edit-last-applied' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply edit-last-applied' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from apply edit-last-applied' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply edit-last-applied' -l windows-line-endings -d 'Defaults to the line ending native to your platform.' - -# Completions for the "kubectl apply set-last-applied" command -complete -c kubectl -f -n '__fish_seen_subcommand_from apply set-last-applied' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply set-last-applied' -l create-annotation -d 'Will create \'last-applied-configuration\' annotations if current objects doesn\'t have one' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply set-last-applied' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from apply set-last-applied' -r -s f -l filename -d 'Filename, directory, or URL to files that contains the last-applied-configuration annotations' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply set-last-applied' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -n '__fish_seen_subcommand_from apply set-last-applied' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl apply view-last-applied" command -complete -c kubectl -f -n '__fish_seen_subcommand_from apply view-last-applied' -l all -d 'Select all resources in the namespace of the specified resource types' -complete -c kubectl -n '__fish_seen_subcommand_from apply view-last-applied' -r -s f -l filename -d 'Filename, directory, or URL to files that contains the last-applied-configuration annotations' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply view-last-applied' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply view-last-applied' -r -s o -l output -d 'Output format. Must be one of yaml|json' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply view-last-applied' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from apply view-last-applied' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' - -# Completions for the "kubectl attach" command -complete -c kubectl -f -n '__fish_seen_subcommand_from attach' -r -s c -l container -d 'Container name. If omitted, the first container in the pod will be chosen' -complete -c kubectl -f -n '__fish_seen_subcommand_from attach' -r -l pod-running-timeout -d 'The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running' -complete -c kubectl -f -n '__fish_seen_subcommand_from attach' -s i -l stdin -d 'Pass stdin to the container' -complete -c kubectl -f -n '__fish_seen_subcommand_from attach' -s t -l tty -d 'Stdin is a TTY' - -# Completions for the "kubectl auth" command -function __fish_kubectl_get_auth_commands - echo can-i\t'Check whether an action is allowed' - echo reconcile\t'Reconciles rules for RBAC Role, RoleBinding, ClusterRole, and ClusterRole binding objects' -end - -function __fish_kubectl_get_auth_commands_without_descriptions - __fish_kubectl_get_auth_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command auth; and not __fish_seen_subcommand_from (__fish_kubectl_get_auth_commands_without_descriptions)" -a '(__fish_kubectl_get_auth_commands)' - -# Completions for the "kubectl auth can-i" command -complete -c kubectl -f -n '__fish_seen_subcommand_from auth can-i' -s A -l all-namespaces -d 'If true, check the specified action in all namespaces.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth can-i' -l list -d 'If true, prints all allowed actions.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth can-i' -l no-headers -d 'If true, prints allowed actions without headers' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth can-i' -s q -l quiet -d 'If true, suppress output and just return the exit code.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth can-i' -r -l subresource -d 'SubResource such as pod/log or deployment/scale' - -# Completions for the "kubectl auth reconcile" command -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from auth reconcile' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to reconcile.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -l remove-extra-permissions -d 'If true, removes extra permissions added to roles' -complete -c kubectl -f -n '__fish_seen_subcommand_from auth reconcile' -l remove-extra-subjects -d 'If true, removes extra subjects added to rolebindings' -complete -c kubectl -n '__fish_seen_subcommand_from auth reconcile' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl autoscale" command -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -l cpu-percent -d 'The target average CPU utilization (represented as a percent of requested CPU) over all the pods. If it\'s not specified or negative, a default autoscaling policy will be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from autoscale' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to autoscale.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -l generator -d 'The name of the API generator to use. Currently there is only 1 generator.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -l max -d 'The upper limit for the number of pods that can be set by the autoscaler. Required.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -l min -d 'The lower limit for the number of pods that can be set by the autoscaler. If it\'s not specified or negative, the server will apply a default value.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -l name -d 'The name for the newly created object. If not specified, the name of the input resource will be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from autoscale' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from autoscale' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl certificate" command -function __fish_kubectl_get_certificate_commands - echo approve\t'Approve a certificate signing request' - echo deny\t'Deny a certificate signing request' -end - -function __fish_kubectl_get_certificate_commands_without_descriptions - __fish_kubectl_get_certificate_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command certificate; and not __fish_seen_subcommand_from (__fish_kubectl_get_certificate_commands_without_descriptions)" -a '(__fish_kubectl_get_certificate_commands)' - -# Completions for the "kubectl certificate approve" command -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate approve' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from certificate approve' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to update' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate approve' -l force -d 'Update the CSR even if it is already approved.' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate approve' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate approve' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate approve' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from certificate approve' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl certificate deny" command -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate deny' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from certificate deny' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to update' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate deny' -l force -d 'Update the CSR even if it is already denied.' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate deny' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate deny' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from certificate deny' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from certificate deny' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl cluster-info" command -function __fish_kubectl_get_cluster_info_commands - echo dump\t'Dump lots of relevant info for debugging and diagnosis' -end - -function __fish_kubectl_get_cluster_info_commands_without_descriptions - __fish_kubectl_get_cluster_info_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command cluster-info; and not __fish_seen_subcommand_from (__fish_kubectl_get_cluster_info_commands_without_descriptions)" -a '(__fish_kubectl_get_cluster_info_commands)' - -# Completions for the "kubectl cluster-info dump" command -complete -c kubectl -f -n '__fish_seen_subcommand_from cluster-info dump' -s A -l all-namespaces -d 'If true, dump all namespaces. If true, --namespaces is ignored.' -complete -c kubectl -f -n '__fish_seen_subcommand_from cluster-info dump' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from cluster-info dump' -r -l namespaces -d 'A comma separated list of namespaces to dump.' -complete -c kubectl -f -n '__fish_seen_subcommand_from cluster-info dump' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from cluster-info dump' -r -l output-directory -d 'Where to output the files. If empty or \'-\' uses stdout, otherwise creates a directory hierarchy in that directory' -complete -c kubectl -f -n '__fish_seen_subcommand_from cluster-info dump' -r -l pod-running-timeout -d 'The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running' -complete -c kubectl -n '__fish_seen_subcommand_from cluster-info dump' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl config" command -function __fish_kubectl_get_config_commands - echo current-context\t'Displays the current-context' - echo delete-cluster\t'Delete the specified cluster from the kubeconfig' - echo delete-context\t'Delete the specified context from the kubeconfig' - echo get-clusters\t'Display clusters defined in the kubeconfig' - echo get-contexts\t'Describe one or many contexts' - echo rename-context\t'Renames a context from the kubeconfig file.' - echo set\t'Sets an individual value in a kubeconfig file' - echo set-cluster\t'Sets a cluster entry in kubeconfig' - echo set-context\t'Sets a context entry in kubeconfig' - echo set-credentials\t'Sets a user entry in kubeconfig' - echo unset\t'Unsets an individual value in a kubeconfig file' - echo use-context\t'Sets the current-context in a kubeconfig file' - echo use\t'Sets the current-context in a kubeconfig file' - echo view\t'Display merged kubeconfig settings or a specified kubeconfig file' -end - -function __fish_kubectl_get_config_commands_without_descriptions - __fish_kubectl_get_config_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command config; and not __fish_seen_subcommand_from (__fish_kubectl_get_config_commands_without_descriptions)" -a '(__fish_kubectl_get_config_commands)' - -# Completions for the "kubectl config get-contexts" command -complete -c kubectl -f -n '__fish_seen_subcommand_from config get-contexts' -l no-headers -d 'When using the default or custom-column output format, don\'t print headers (default print headers).' -complete -c kubectl -f -n '__fish_seen_subcommand_from config get-contexts' -r -s o -l output -d 'Output format. One of: name' - -# Completions for the "kubectl config set" command -complete -c kubectl -f -n '__fish_seen_subcommand_from config set' -r -l set-raw-bytes -d 'When writing a []byte PROPERTY_VALUE, write the given string directly without base64 decoding.' - -# Completions for the "kubectl config set-cluster" command -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-cluster' -r -l embed-certs -d 'embed-certs for the cluster entry in kubeconfig' - -# Completions for the "kubectl config set-context" command -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-context' -l current -d 'Modify the current context' - -# Completions for the "kubectl config set-credentials" command -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l auth-provider -d 'Auth provider for the user entry in kubeconfig' -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l auth-provider-arg -d '\'key=value\' arguments for the auth provider' -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l embed-certs -d 'Embed client cert/key for the user entry in kubeconfig' -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l exec-api-version -d 'API version of the exec credential plugin for the user entry in kubeconfig' -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l exec-arg -d 'New arguments for the exec credential plugin command for the user entry in kubeconfig' -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l exec-command -d 'Command for the exec credential plugin for the user entry in kubeconfig' -complete -c kubectl -f -n '__fish_seen_subcommand_from config set-credentials' -r -l exec-env -d '\'key=value\' environment values for the exec credential plugin' - -# Completions for the "kubectl config view" command -complete -c kubectl -f -n '__fish_seen_subcommand_from config view' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from config view' -l flatten -d 'Flatten the resulting kubeconfig file into self-contained output (useful for creating portable kubeconfig files)' -complete -c kubectl -f -n '__fish_seen_subcommand_from config view' -r -l merge -d 'Merge the full hierarchy of kubeconfig files' -complete -c kubectl -f -n '__fish_seen_subcommand_from config view' -l minify -d 'Remove all information not used by current-context from the output' -complete -c kubectl -f -n '__fish_seen_subcommand_from config view' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from config view' -l raw -d 'Display raw byte data' -complete -c kubectl -n '__fish_seen_subcommand_from config view' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl convert" command -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from convert' -r -s f -l filename -d 'Filename, directory, or URL to files to need to get converted.' -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -l local -d 'If true, convert will NOT try to contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -r -l output-version -d 'Output the formatted object with the given group version (for ex: \'extensions/v1beta1\').' -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from convert' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from convert' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl cordon" command -complete -c kubectl -f -n '__fish_seen_subcommand_from cordon' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from cordon' -r -s l -l selector -d 'Selector (label query) to filter on' - -# Completions for the "kubectl cp" command -complete -c kubectl -f -n '__fish_seen_subcommand_from cp' -r -s c -l container -d 'Container name. If omitted, the first container in the pod will be chosen' -complete -c kubectl -f -n '__fish_seen_subcommand_from cp' -l no-preserve -d 'The copied file/directory\'s ownership and permissions will not be preserved in the container' - -# Completions for the "kubectl create" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -l edit -d 'Edit the API resource before creating' -complete -c kubectl -n '__fish_seen_subcommand_from create' -r -s f -l filename -d 'Filename, directory, or URL to files to use to create the resource' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -r -l raw -d 'Raw URI to POST to the server. Uses the transport specified by the kubeconfig file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -n '__fish_seen_subcommand_from create' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create' -l windows-line-endings -d 'Only relevant if --edit=true. Defaults to the line ending native to your platform.' -function __fish_kubectl_get_create_commands - echo clusterrole\t'Create a ClusterRole.' - echo clusterrolebinding\t'Create a ClusterRoleBinding for a particular ClusterRole' - echo configmap\t'Create a configmap from a local file, directory or literal value' - echo cm\t'Create a configmap from a local file, directory or literal value' - echo cronjob\t'Create a cronjob with the specified name.' - echo cj\t'Create a cronjob with the specified name.' - echo deployment\t'Create a deployment with the specified name.' - echo deploy\t'Create a deployment with the specified name.' - echo job\t'Create a job with the specified name.' - echo namespace\t'Create a namespace with the specified name' - echo ns\t'Create a namespace with the specified name' - echo poddisruptionbudget\t'Create a pod disruption budget with the specified name.' - echo pdb\t'Create a pod disruption budget with the specified name.' - echo priorityclass\t'Create a priorityclass with the specified name.' - echo pc\t'Create a priorityclass with the specified name.' - echo quota\t'Create a quota with the specified name.' - echo resourcequota\t'Create a quota with the specified name.' - echo role\t'Create a role with single rule.' - echo rolebinding\t'Create a RoleBinding for a particular Role or ClusterRole' - echo secret\t'Create a secret using specified subcommand' - echo service\t'Create a service using specified subcommand.' - echo svc\t'Create a service using specified subcommand.' - echo serviceaccount\t'Create a service account with the specified name' - echo sa\t'Create a service account with the specified name' -end - -function __fish_kubectl_get_create_commands_without_descriptions - __fish_kubectl_get_create_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command create; and not __fish_seen_subcommand_from (__fish_kubectl_get_create_commands_without_descriptions)" -a '(__fish_kubectl_get_create_commands)' - -# Completions for the "kubectl create clusterrole" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -l aggregation-rule -d 'An aggregation label selector for combining ClusterRoles.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -l non-resource-url -d 'A partial url that user should have access to.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -l resource -d 'Resource that the rule applies to' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -l resource-name -d 'Resource in the white list that the rule applies to, repeat this flag for multiple items' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create clusterrole' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrole' -r -l verb -d 'Verb that applies to the resources contained in the rule' - -# Completions for the "kubectl create clusterrolebinding" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -r -l clusterrole -d 'ClusterRole this ClusterRoleBinding should reference' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -r -l group -d 'Groups to bind to the clusterrole' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -r -l serviceaccount -d 'Service accounts to bind to the clusterrole, in the format :' -complete -c kubectl -n '__fish_seen_subcommand_from create clusterrolebinding' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create clusterrolebinding' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create configmap" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -l append-hash -d 'Append a hash of the configmap to its name.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -l append-hash -d 'Append a hash of the configmap to its name.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -r -l from-env-file -d 'Specify the path to a file to read lines of key=val pairs to create a configmap (i.e. a Docker .env file).' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -r -l from-env-file -d 'Specify the path to a file to read lines of key=val pairs to create a configmap (i.e. a Docker .env file).' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -r -l from-file -d 'Key file can be specified using its file path, in which case file basename will be used as configmap key, or optionally with a key and file path, in which case the given key will be used. Specifying a directory will iterate each named file in the directory whose basename is a valid configmap key.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -r -l from-file -d 'Key file can be specified using its file path, in which case file basename will be used as configmap key, or optionally with a key and file path, in which case the given key will be used. Specifying a directory will iterate each named file in the directory whose basename is a valid configmap key.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -r -l from-literal -d 'Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -r -l from-literal -d 'Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create configmap' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create cm' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create configmap' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cm' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create cronjob" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -r -l image -d 'Image name to run.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -r -l image -d 'Image name to run.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -r -l restart -d 'job\'s restart policy. supported values: OnFailure, Never' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -r -l restart -d 'job\'s restart policy. supported values: OnFailure, Never' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -r -l schedule -d 'A schedule in the Cron format the job should be run with.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -r -l schedule -d 'A schedule in the Cron format the job should be run with.' -complete -c kubectl -n '__fish_seen_subcommand_from create cronjob' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create cj' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cronjob' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create cj' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create deployment" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create deployment' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deploy' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deployment' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deploy' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deployment' -r -l image -d 'Image name to run.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deploy' -r -l image -d 'Image name to run.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deployment' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deploy' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deployment' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deploy' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create deployment' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create deploy' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deployment' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create deploy' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create job" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -r -l from -d 'The name of the resource to create a Job from (only cronjob is supported).' -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -r -l image -d 'Image name to run.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create job' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create job' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create namespace" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create namespace' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create ns' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create namespace' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create ns' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create namespace' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create ns' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create namespace' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create ns' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create namespace' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create ns' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create namespace' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create ns' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create poddisruptionbudget" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -r -l max-unavailable -d 'The maximum number or percentage of unavailable pods this budget requires.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -r -l max-unavailable -d 'The maximum number or percentage of unavailable pods this budget requires.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -r -l min-available -d 'The minimum number or percentage of available pods this budget requires.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -r -l min-available -d 'The minimum number or percentage of available pods this budget requires.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -r -l selector -d 'A label selector to use for this budget. Only equality-based selector requirements are supported.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -r -l selector -d 'A label selector to use for this budget. Only equality-based selector requirements are supported.' -complete -c kubectl -n '__fish_seen_subcommand_from create poddisruptionbudget' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create pdb' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create poddisruptionbudget' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pdb' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create priorityclass" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -r -l description -d 'description is an arbitrary string that usually provides guidelines on when this priority class should be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -r -l description -d 'description is an arbitrary string that usually provides guidelines on when this priority class should be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -l global-default -d 'global-default specifies whether this PriorityClass should be considered as the default priority.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -l global-default -d 'global-default specifies whether this PriorityClass should be considered as the default priority.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -r -l preemption-policy -d 'preemption-policy is the policy for preempting pods with lower priority.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -r -l preemption-policy -d 'preemption-policy is the policy for preempting pods with lower priority.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create priorityclass' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create pc' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create priorityclass' -r -l value -d 'the value of this priority class.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create pc' -r -l value -d 'the value of this priority class.' - -# Completions for the "kubectl create quota" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -r -l hard -d 'A comma-delimited set of resource=quantity pairs that define a hard limit.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -r -l hard -d 'A comma-delimited set of resource=quantity pairs that define a hard limit.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -r -l scopes -d 'A comma-delimited set of quota scopes that must all match each object tracked by the quota.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -r -l scopes -d 'A comma-delimited set of quota scopes that must all match each object tracked by the quota.' -complete -c kubectl -n '__fish_seen_subcommand_from create quota' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create resourcequota' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create quota' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create resourcequota' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create role" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -r -l resource -d 'Resource that the rule applies to' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -r -l resource-name -d 'Resource in the white list that the rule applies to, repeat this flag for multiple items' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create role' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create role' -r -l verb -d 'Verb that applies to the resources contained in the rule' - -# Completions for the "kubectl create rolebinding" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -r -l clusterrole -d 'ClusterRole this RoleBinding should reference' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -r -l group -d 'Groups to bind to the role' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -r -l role -d 'Role this RoleBinding should reference' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -r -l serviceaccount -d 'Service accounts to bind to the role, in the format :' -complete -c kubectl -n '__fish_seen_subcommand_from create rolebinding' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create rolebinding' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create secret" command -function __fish_kubectl_get_create_secret_commands - echo docker-registry\t'Create a secret for use with a Docker registry' - echo generic\t'Create a secret from a local file, directory or literal value' - echo tls\t'Create a TLS secret' -end - -function __fish_kubectl_get_create_secret_commands_without_descriptions - __fish_kubectl_get_create_secret_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command secret; and not __fish_seen_subcommand_from (__fish_kubectl_get_create_secret_commands_without_descriptions)" -a '(__fish_kubectl_get_create_secret_commands)' - -# Completions for the "kubectl create secret docker-registry" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -l append-hash -d 'Append a hash of the secret to its name.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -l docker-email -d 'Email for Docker registry' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -l docker-password -d 'Password for Docker registry authentication' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -l docker-server -d 'Server location for Docker registry' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -l docker-username -d 'Username for Docker registry authentication' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -l from-file -d 'Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create secret docker-registry' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret docker-registry' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create secret generic" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -l append-hash -d 'Append a hash of the secret to its name.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -r -l from-env-file -d 'Specify the path to a file to read lines of key=val pairs to create a secret (i.e. a Docker .env file).' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -r -l from-file -d 'Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -r -l from-literal -d 'Specify a key and literal value to insert in secret (i.e. mykey=somevalue)' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create secret generic' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -r -l type -d 'The type of secret to create' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret generic' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create secret tls" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret tls' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret tls' -l append-hash -d 'Append a hash of the secret to its name.' -complete -c kubectl -n '__fish_seen_subcommand_from create secret tls' -r -l cert -d 'Path to PEM encoded public key certificate.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret tls' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from create secret tls' -r -l key -d 'Path to private key associated with given certificate.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret tls' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret tls' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create secret tls' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create secret tls' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create service" command -function __fish_kubectl_get_create_service_commands - echo clusterip\t'Create a ClusterIP service.' - echo externalname\t'Create an ExternalName service.' - echo loadbalancer\t'Create a LoadBalancer service.' - echo nodeport\t'Create a NodePort service.' -end - -function __fish_kubectl_get_create_service_commands_without_descriptions - __fish_kubectl_get_create_service_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command service; and not __fish_seen_subcommand_from (__fish_kubectl_get_create_service_commands_without_descriptions)" -a '(__fish_kubectl_get_create_service_commands)' -complete -c kubectl -f -n "__fish_kubectl_using_command svc; and not __fish_seen_subcommand_from (__fish_kubectl_get_create_service_commands_without_descriptions)" -a '(__fish_kubectl_get_create_service_commands)' - -# Completions for the "kubectl create service clusterip" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -r -l clusterip -d 'Assign your own ClusterIP or set to \'None\' for a \'headless\' service (no loadbalancing).' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -r -l tcp -d 'Port pairs can be specified as \':\'.' -complete -c kubectl -n '__fish_seen_subcommand_from create service clusterip' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service clusterip' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create service externalname" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -r -l external-name -d 'External name of service' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -r -l tcp -d 'Port pairs can be specified as \':\'.' -complete -c kubectl -n '__fish_seen_subcommand_from create service externalname' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service externalname' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create service loadbalancer" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create service loadbalancer' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service loadbalancer' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service loadbalancer' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service loadbalancer' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service loadbalancer' -r -l tcp -d 'Port pairs can be specified as \':\'.' -complete -c kubectl -n '__fish_seen_subcommand_from create service loadbalancer' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service loadbalancer' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create service nodeport" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -r -l node-port -d 'Port used to expose the service on each node in a cluster.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -r -l tcp -d 'Port pairs can be specified as \':\'.' -complete -c kubectl -n '__fish_seen_subcommand_from create service nodeport' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create service nodeport' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl create serviceaccount" command -complete -c kubectl -f -n '__fish_seen_subcommand_from create serviceaccount' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create sa' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create serviceaccount' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create sa' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create serviceaccount' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create sa' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create serviceaccount' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from create sa' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from create serviceaccount' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from create sa' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from create serviceaccount' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from create sa' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl delete" command -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -l all -d 'Delete all resources, including uninitialized ones, in the namespace of the specified resource types.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -l cascade -d 'If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -l field-selector -d 'Selector (field query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.' -complete -c kubectl -n '__fish_seen_subcommand_from delete' -r -s f -l filename -d 'containing the resource to delete.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -l force -d 'If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -l grace-period -d 'Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -l ignore-not-found -d 'Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -s k -l kustomize -d 'Process a kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -l now -d 'If true, resources are signaled for immediate shutdown (same as --grace-period=1).' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -s o -l output -d 'Output mode. Use "-o name" for shorter output (resource/name).' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -l raw -d 'Raw URI to DELETE to the server. Uses the transport specified by the kubeconfig file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -s l -l selector -d 'Selector (label query) to filter on, not including uninitialized ones.' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -r -l timeout -d 'The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object' -complete -c kubectl -f -n '__fish_seen_subcommand_from delete' -l wait -d 'If true, wait for resources to be gone before returning. This waits for finalizers.' - -# Completions for the "kubectl describe" command -complete -c kubectl -f -n '__fish_seen_subcommand_from describe' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -n '__fish_seen_subcommand_from describe' -r -s f -l filename -d 'Filename, directory, or URL to files containing the resource to describe' -complete -c kubectl -f -n '__fish_seen_subcommand_from describe' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from describe' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from describe' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from describe' -l show-events -d 'If true, display events related to the described object.' - -# Completions for the "kubectl diff" command -complete -c kubectl -f -n '__fish_seen_subcommand_from diff' -r -l field-manager -d 'Name of the manager used to track field ownership.' -complete -c kubectl -n '__fish_seen_subcommand_from diff' -r -s f -l filename -d 'Filename, directory, or URL to files contains the configuration to diff' -complete -c kubectl -f -n '__fish_seen_subcommand_from diff' -l force-conflicts -d 'If true, server-side apply will force the changes against conflicts.' -complete -c kubectl -f -n '__fish_seen_subcommand_from diff' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from diff' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from diff' -l server-side -d 'If true, apply runs in the server instead of the client.' - -# Completions for the "kubectl drain" command -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -l delete-local-data -d 'Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -l disable-eviction -d 'Force drain to use delete, even if eviction is supported. This will bypass checking PodDisruptionBudgets, use with caution.' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -l force -d 'Continue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet.' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -r -l grace-period -d 'Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -l ignore-daemonsets -d 'Ignore DaemonSet-managed pods.' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -r -l pod-selector -d 'Label selector to filter pods on the node' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -r -s l -l selector -d 'Selector (label query) to filter on' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -r -l skip-wait-for-delete-timeout -d 'If pod DeletionTimestamp older than N seconds, skip waiting for the pod. Seconds must be greater than 0 to skip.' -complete -c kubectl -f -n '__fish_seen_subcommand_from drain' -r -l timeout -d 'The length of time to wait before giving up, zero means infinite' - -# Completions for the "kubectl edit" command -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from edit' -r -s f -l filename -d 'Filename, directory, or URL to files to use to edit the resource' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -l output-patch -d 'Output the patch if the resource is edited.' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from edit' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from edit' -l windows-line-endings -d 'Defaults to the line ending native to your platform.' - -# Completions for the "kubectl exec" command -complete -c kubectl -f -n '__fish_seen_subcommand_from exec' -r -s c -l container -d 'Container name. If omitted, the first container in the pod will be chosen' -complete -c kubectl -n '__fish_seen_subcommand_from exec' -r -s f -l filename -d 'to use to exec into the resource' -complete -c kubectl -f -n '__fish_seen_subcommand_from exec' -r -l pod-running-timeout -d 'The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running' -complete -c kubectl -f -n '__fish_seen_subcommand_from exec' -s i -l stdin -d 'Pass stdin to the container' -complete -c kubectl -f -n '__fish_seen_subcommand_from exec' -s t -l tty -d 'Stdin is a TTY' - -# Completions for the "kubectl explain" command -complete -c kubectl -f -n '__fish_seen_subcommand_from explain' -r -l api-version -d 'Get different explanations for particular API version' -complete -c kubectl -f -n '__fish_seen_subcommand_from explain' -l recursive -d 'Print the fields of fields (Currently only 1 level deep)' - -# Completions for the "kubectl expose" command -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l cluster-ip -d 'ClusterIP to be assigned to the service. Leave empty to auto-allocate, or set to \'None\' to create a headless service.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l external-ip -d 'Additional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP.' -complete -c kubectl -n '__fish_seen_subcommand_from expose' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to expose a service' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l generator -d 'The name of the API generator to use. There are 2 generators: \'service/v1\' and \'service/v2\'. The only difference between them is that service port in v1 is named \'default\', while it is left unnamed in v2. Default is \'service/v2\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -s l -l labels -d 'Labels to apply to the service created by this call.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l load-balancer-ip -d 'IP to assign to the LoadBalancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l name -d 'The name for the newly created object.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l overrides -d 'An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l port -d 'The port that the service should serve on. Copied from the resource being exposed, if unspecified' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l protocol -d 'The network protocol for the service to be created. Default is \'TCP\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l selector -d 'A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.)' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l session-affinity -d 'If non-empty, set the session affinity for the service to this; legal values: \'None\', \'ClientIP\'' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l target-port -d 'Name or number for the port on the container that the service should direct traffic to. Optional.' -complete -c kubectl -n '__fish_seen_subcommand_from expose' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from expose' -r -l type -d 'Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is \'ClusterIP\'.' - -# Completions for the "kubectl get" command -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -l chunk-size -d 'Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -l field-selector -d 'Selector (field query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.' -complete -c kubectl -n '__fish_seen_subcommand_from get' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l ignore-not-found -d 'If the requested object does not exist the command will return exit code 0.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -s L -l label-columns -d 'Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l no-headers -d 'When using the default or custom-column output format, don\'t print headers (default print headers).' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -s o -l output -d 'Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l output-watch-events -d 'Output watch event objects when --watch or --watch-only is used. Existing objects are output as initial ADDED events.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -l raw -d 'Raw URI to request from the server. Uses the transport specified by the kubeconfig file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l server-print -d 'If true, have the server return the appropriate table output. Supports extension APIs and CRDs.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l show-kind -d 'If present, list the resource type for the requested object(s).' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l show-labels -d 'When printing, show all labels as the last column (default hide labels column)' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -r -l sort-by -d 'If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. \'{.metadata.name}\'). The field in the API resource specified by this JSONPath expression must be an integer or a string.' -complete -c kubectl -n '__fish_seen_subcommand_from get' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -s w -l watch -d 'After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.' -complete -c kubectl -f -n '__fish_seen_subcommand_from get' -l watch-only -d 'Watch for changes to the requested object(s), without listing/getting first.' - -# Completions for the "kubectl label" command -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -r -l field-selector -d 'Selector (field query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.' -complete -c kubectl -n '__fish_seen_subcommand_from label' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to update the labels' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -l list -d 'If true, display the labels for a given resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -l local -d 'If true, label will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -l overwrite -d 'If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -r -l resource-version -d 'If non-empty, the labels update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from label' -r -s l -l selector -d 'Selector (label query) to filter on, not including uninitialized ones, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2).' -complete -c kubectl -n '__fish_seen_subcommand_from label' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl logs" command -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -l all-containers -d 'Get all containers\' logs in the pod(s).' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -s c -l container -d 'Print the logs of this container' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -s f -l follow -d 'Specify if the logs should be streamed.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -l ignore-errors -d 'If watching / following pod logs, allow for any errors that occur to be non-fatal' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -l insecure-skip-tls-verify-backend -d 'Skip verifying the identity of the kubelet that logs are requested from. In theory, an attacker could provide invalid log content back. You might want to use this if your kubelet serving certificates have expired.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -l limit-bytes -d 'Maximum bytes of logs to return. Defaults to no limit.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -l max-log-requests -d 'Specify maximum number of concurrent logs to follow when using by a selector. Defaults to 5.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -l pod-running-timeout -d 'The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -l prefix -d 'Prefix each log line with the log source (pod name and container name)' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -s p -l previous -d 'If true, print the logs for the previous instance of the container in a pod if it exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -s l -l selector -d 'Selector (label query) to filter on.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -l since -d 'Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -l since-time -d 'Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -r -l tail -d 'Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines otherwise 10, if a selector is provided.' -complete -c kubectl -f -n '__fish_seen_subcommand_from logs' -l timestamps -d 'Include timestamps on each line in the log output' - -# Completions for the "kubectl patch" command -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from patch' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to update' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -l local -d 'If true, patch will operate on the content of the file, not the server-side resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -r -s p -l patch -d 'The patch to be applied to the resource JSON file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from patch' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from patch' -r -l type -d 'The type of patch being provided; one of [json merge strategic]' - -# Completions for the "kubectl plugin" command -function __fish_kubectl_get_plugin_commands - echo list\t'list all visible plugin executables on a user\'s PATH' -end - -function __fish_kubectl_get_plugin_commands_without_descriptions - __fish_kubectl_get_plugin_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command plugin; and not __fish_seen_subcommand_from (__fish_kubectl_get_plugin_commands_without_descriptions)" -a '(__fish_kubectl_get_plugin_commands)' - -# Completions for the "kubectl plugin list" command -complete -c kubectl -f -n '__fish_seen_subcommand_from plugin list' -l name-only -d 'If true, display only the binary name of each plugin, rather than its full path' - -# Completions for the "kubectl port-forward" command -complete -c kubectl -f -n '__fish_seen_subcommand_from port-forward' -r -l address -d 'Addresses to listen on (comma separated). Only accepts IP addresses or localhost as a value. When localhost is supplied, kubectl will try to bind on both 127.0.0.1 and ::1 and will fail if neither of these addresses are available to bind.' -complete -c kubectl -f -n '__fish_seen_subcommand_from port-forward' -r -l pod-running-timeout -d 'The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running' - -# Completions for the "kubectl proxy" command -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l accept-hosts -d 'Regular expression for hosts that the proxy should accept.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l accept-paths -d 'Regular expression for paths that the proxy should accept.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l address -d 'The IP address on which to serve on.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l api-prefix -d 'Prefix to serve the proxied API under.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -l disable-filter -d 'If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l keepalive -d 'keepalive specifies the keep-alive period for an active network connection. Set to 0 to disable keepalive.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -s p -l port -d 'The port on which to run the proxy. Set to 0 to pick a random port.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l reject-methods -d 'Regular expression for HTTP methods that the proxy should reject (example --reject-methods=\'POST,PUT,PATCH\'). ' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -l reject-paths -d 'Regular expression for paths that the proxy should reject. Paths specified here will be rejected even accepted by --accept-paths.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -s u -l unix-socket -d 'Unix socket on which to run the proxy.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -s w -l www -d 'Also serve static files from the given directory under the specified prefix.' -complete -c kubectl -f -n '__fish_seen_subcommand_from proxy' -r -s P -l www-prefix -d 'Prefix to serve static files under, if static file directory is specified.' - -# Completions for the "kubectl replace" command -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -l cascade -d 'If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from replace' -r -s f -l filename -d 'to use to replace the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -l force -d 'If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -r -l grace-period -d 'Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -r -s k -l kustomize -d 'Process a kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -r -l raw -d 'Raw URI to PUT to the server. Uses the transport specified by the kubeconfig file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -n '__fish_seen_subcommand_from replace' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -r -l timeout -d 'The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -l validate -d 'If true, use a schema to validate the input before sending it' -complete -c kubectl -f -n '__fish_seen_subcommand_from replace' -l wait -d 'If true, wait for resources to be gone before returning. This waits for finalizers.' - -# Completions for the "kubectl rollout" command -function __fish_kubectl_get_rollout_commands - echo history\t'View rollout history' - echo pause\t'Mark the provided resource as paused' - echo restart\t'Restart a resource' - echo resume\t'Resume a paused resource' - echo status\t'Show the status of the rollout' - echo undo\t'Undo a previous rollout' -end - -function __fish_kubectl_get_rollout_commands_without_descriptions - __fish_kubectl_get_rollout_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command rollout; and not __fish_seen_subcommand_from (__fish_kubectl_get_rollout_commands_without_descriptions)" -a '(__fish_kubectl_get_rollout_commands)' - -# Completions for the "kubectl rollout history" command -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout history' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout history' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout history' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout history' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout history' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout history' -r -l revision -d 'See the details, including podTemplate of the revision specified' -complete -c kubectl -n '__fish_seen_subcommand_from rollout history' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl rollout pause" command -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout pause' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout pause' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout pause' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout pause' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout pause' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout pause' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl rollout restart" command -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout restart' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout restart' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout restart' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout restart' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout restart' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout restart' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl rollout resume" command -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout resume' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout resume' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout resume' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout resume' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout resume' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout resume' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl rollout status" command -complete -c kubectl -n '__fish_seen_subcommand_from rollout status' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout status' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout status' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout status' -r -l revision -d 'Pin to a specific revision for showing its status. Defaults to 0 (last revision).' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout status' -r -l timeout -d 'The length of time to wait before ending watch, zero means never. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout status' -s w -l watch -d 'Watch the status of the rollout until it\'s done.' - -# Completions for the "kubectl rollout undo" command -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout undo' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout undo' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout undo' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout undo' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout undo' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout undo' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from rollout undo' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from rollout undo' -r -l to-revision -d 'The revision to rollback to. Default to 0 (last revision).' - -# Completions for the "kubectl run" command -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l attach -d 'If true, wait for the Pod to start running, and then attach to the Pod as if \'kubectl attach ...\' were called. Default false, unless \'-i/--stdin\' is set, in which case the default is true. With \'--restart=Never\' the exit code of the container process is returned.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l cascade -d 'If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l command -d 'If true and extra arguments are present, use them as the \'command\' field in the container, rather than the \'args\' field which is the default.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l env -d 'Environment variables to set in the container.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l expose -d 'If true, service is created for the container(s) which are run' -complete -c kubectl -n '__fish_seen_subcommand_from run' -r -s f -l filename -d 'to use to replace the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l force -d 'If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l grace-period -d 'Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l hostport -d 'The host port mapping for the container port. To demonstrate a single-machine container.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l image -d 'The image for the container to run.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l image-pull-policy -d 'The image pull policy for the container. If left empty, this value will not be specified by the client and defaulted by the server' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -s k -l kustomize -d 'Process a kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -s l -l labels -d 'Comma separated labels to apply to the pod(s). Will override previous values.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l leave-stdin-open -d 'If the pod is started in interactive mode or with stdin, leave stdin open after the first attach completes. By default, stdin will be closed after the first attach completes.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l limits -d 'The resource requirement limits for this container. For example, \'cpu=200m,memory=512Mi\'. Note that server side components may assign limits depending on the server configuration, such as limit ranges.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l overrides -d 'An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l pod-running-timeout -d 'The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l port -d 'The port that this container exposes.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l quiet -d 'If true, suppress prompt messages.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l requests -d 'The resource requirement requests for this container. For example, \'cpu=100m,memory=256Mi\'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l restart -d 'The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to \'Always\' a deployment is created, if set to \'OnFailure\' a job is created, if set to \'Never\', a regular pod is created. For the latter two --replicas must be 1. Default \'Always\', for CronJobs `Never`.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l rm -d 'If true, delete resources created in this command for attached containers.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l save-config -d 'If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l serviceaccount -d 'Service account to set in the pod spec.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -s i -l stdin -d 'Keep stdin open on the container(s) in the pod, even if nothing is attached.' -complete -c kubectl -n '__fish_seen_subcommand_from run' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -r -l timeout -d 'The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -s t -l tty -d 'Allocated a TTY for each container in the pod.' -complete -c kubectl -f -n '__fish_seen_subcommand_from run' -l wait -d 'If true, wait for resources to be gone before returning. This waits for finalizers.' - -# Completions for the "kubectl scale" command -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -l all -d 'Select all resources in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -l current-replicas -d 'Precondition for current size. Requires that the current size of the resource match this value in order to scale.' -complete -c kubectl -n '__fish_seen_subcommand_from scale' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to set a new size' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -l replicas -d 'The new desired number of replicas. Required.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -l resource-version -d 'Precondition for resource version. Requires that the current resource version match this value in order to scale.' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -n '__fish_seen_subcommand_from scale' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from scale' -r -l timeout -d 'The length of time to wait before giving up on a scale operation, zero means don\'t wait. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).' - -# Completions for the "kubectl set" command -function __fish_kubectl_get_set_commands - echo env\t'Update environment variables on a pod template' - echo image\t'Update image of a pod template' - echo resources\t'Update resource requests/limits on objects with pod templates' - echo selector\t'Set the selector on a resource' - echo serviceaccount\t'Update ServiceAccount of a resource' - echo sa\t'Update ServiceAccount of a resource' - echo subject\t'Update User, Group or ServiceAccount in a RoleBinding/ClusterRoleBinding' -end - -function __fish_kubectl_get_set_commands_without_descriptions - __fish_kubectl_get_set_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command set; and not __fish_seen_subcommand_from (__fish_kubectl_get_set_commands_without_descriptions)" -a '(__fish_kubectl_get_set_commands)' - -# Completions for the "kubectl set env" command -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -l all -d 'If true, select all resources in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -s c -l containers -d 'The names of containers in the selected pod templates to change - may use wildcards' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -s e -l env -d 'Specify a key-value pair for an environment variable to set into each container.' -complete -c kubectl -n '__fish_seen_subcommand_from set env' -r -s f -l filename -d 'Filename, directory, or URL to files the resource to update the env' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -l from -d 'The name of a resource from which to inject environment variables' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -l keys -d 'Comma-separated list of keys to import from specified resource' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -l list -d 'If true, display the environment and any changes in the standard format. this flag will removed when we have kubectl view env.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -l local -d 'If true, set env will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -l overwrite -d 'If true, allow environment to be overwritten, otherwise reject updates that overwrite existing environment.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -l prefix -d 'Prefix to append to variable names' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -l resolve -d 'If true, show secret or configmap references when listing variables' -complete -c kubectl -f -n '__fish_seen_subcommand_from set env' -r -s l -l selector -d 'Selector (label query) to filter on' -complete -c kubectl -n '__fish_seen_subcommand_from set env' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl set image" command -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from set image' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -l local -d 'If true, set image will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set image' -r -s l -l selector -d 'Selector (label query) to filter on, not including uninitialized ones, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -n '__fish_seen_subcommand_from set image' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl set resources" command -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -s c -l containers -d 'The names of containers in the selected pod templates to change, all containers are selected by default - may use wildcards' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from set resources' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -l limits -d 'The resource requirement requests for this container. For example, \'cpu=100m,memory=256Mi\'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -l local -d 'If true, set resources will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -l requests -d 'The resource requirement requests for this container. For example, \'cpu=100m,memory=256Mi\'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set resources' -r -s l -l selector -d 'Selector (label query) to filter on, not including uninitialized ones,supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -n '__fish_seen_subcommand_from set resources' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl set selector" command -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -l all -d 'Select all resources in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from set selector' -r -s f -l filename -d 'identifying the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -l local -d 'If true, annotation will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set selector' -r -l resource-version -d 'If non-empty, the selectors update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.' -complete -c kubectl -n '__fish_seen_subcommand_from set selector' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl set serviceaccount" command -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from set serviceaccount' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -n '__fish_seen_subcommand_from set sa' -r -s f -l filename -d 'Filename, directory, or URL to files identifying the resource to get from a server.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -l local -d 'If true, set serviceaccount will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -l local -d 'If true, set serviceaccount will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -l record -d 'Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set serviceaccount' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set sa' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -n '__fish_seen_subcommand_from set serviceaccount' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -n '__fish_seen_subcommand_from set sa' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl set subject" command -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -l all -d 'Select all resources, including uninitialized ones, in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -n '__fish_seen_subcommand_from set subject' -r -s f -l filename -d 'Filename, directory, or URL to files the resource to update the subjects' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -r -l group -d 'Groups to bind to the role' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -r -s k -l kustomize -d 'Process the kustomization directory. This flag can\'t be used together with -f or -R.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -l local -d 'If true, set subject will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -r -s l -l selector -d 'Selector (label query) to filter on, not including uninitialized ones, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from set subject' -r -l serviceaccount -d 'Service accounts to bind to the role' -complete -c kubectl -n '__fish_seen_subcommand_from set subject' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' - -# Completions for the "kubectl taint" command -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -l all -d 'Select all nodes in the cluster' -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -l overwrite -d 'If true, allow taints to be overwritten, otherwise reject taint updates that overwrite existing taints.' -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -n '__fish_seen_subcommand_from taint' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from taint' -l validate -d 'If true, use a schema to validate the input before sending it' - -# Completions for the "kubectl top" command -function __fish_kubectl_get_top_commands - echo node\t'Display Resource (CPU/Memory/Storage) usage of nodes' - echo nodes\t'Display Resource (CPU/Memory/Storage) usage of nodes' - echo no\t'Display Resource (CPU/Memory/Storage) usage of nodes' - echo pod\t'Display Resource (CPU/Memory/Storage) usage of pods' - echo pods\t'Display Resource (CPU/Memory/Storage) usage of pods' - echo po\t'Display Resource (CPU/Memory/Storage) usage of pods' -end - -function __fish_kubectl_get_top_commands_without_descriptions - __fish_kubectl_get_top_commands | string replace -r '\t.*$' '' -end - -complete -c kubectl -f -n "__fish_kubectl_using_command top; and not __fish_seen_subcommand_from (__fish_kubectl_get_top_commands_without_descriptions)" -a '(__fish_kubectl_get_top_commands)' - -# Completions for the "kubectl top node" command -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -r -l heapster-namespace -d 'Namespace Heapster service is located in' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -r -l heapster-namespace -d 'Namespace Heapster service is located in' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -r -l heapster-namespace -d 'Namespace Heapster service is located in' -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -r -l heapster-port -d 'Port name in service to use' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -r -l heapster-port -d 'Port name in service to use' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -r -l heapster-port -d 'Port name in service to use' -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -r -l heapster-scheme -d 'Scheme (http or https) to connect to Heapster as' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -r -l heapster-scheme -d 'Scheme (http or https) to connect to Heapster as' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -r -l heapster-scheme -d 'Scheme (http or https) to connect to Heapster as' -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -r -l heapster-service -d 'Name of Heapster service' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -r -l heapster-service -d 'Name of Heapster service' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -r -l heapster-service -d 'Name of Heapster service' -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -l no-headers -d 'If present, print output without headers' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -l no-headers -d 'If present, print output without headers' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -l no-headers -d 'If present, print output without headers' -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from top node' -r -l sort-by -d 'If non-empty, sort nodes list using specified field. The field can be either \'cpu\' or \'memory\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top nodes' -r -l sort-by -d 'If non-empty, sort nodes list using specified field. The field can be either \'cpu\' or \'memory\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top no' -r -l sort-by -d 'If non-empty, sort nodes list using specified field. The field can be either \'cpu\' or \'memory\'.' - -# Completions for the "kubectl top pod" command -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -l containers -d 'If present, print usage of containers within a pod.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -l containers -d 'If present, print usage of containers within a pod.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -l containers -d 'If present, print usage of containers within a pod.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -r -l heapster-namespace -d 'Namespace Heapster service is located in' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -r -l heapster-namespace -d 'Namespace Heapster service is located in' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -r -l heapster-namespace -d 'Namespace Heapster service is located in' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -r -l heapster-port -d 'Port name in service to use' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -r -l heapster-port -d 'Port name in service to use' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -r -l heapster-port -d 'Port name in service to use' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -r -l heapster-scheme -d 'Scheme (http or https) to connect to Heapster as' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -r -l heapster-scheme -d 'Scheme (http or https) to connect to Heapster as' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -r -l heapster-scheme -d 'Scheme (http or https) to connect to Heapster as' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -r -l heapster-service -d 'Name of Heapster service' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -r -l heapster-service -d 'Name of Heapster service' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -r -l heapster-service -d 'Name of Heapster service' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -l no-headers -d 'If present, print output without headers.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -l no-headers -d 'If present, print output without headers.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -l no-headers -d 'If present, print output without headers.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pod' -r -l sort-by -d 'If non-empty, sort pods list using specified field. The field can be either \'cpu\' or \'memory\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top pods' -r -l sort-by -d 'If non-empty, sort pods list using specified field. The field can be either \'cpu\' or \'memory\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from top po' -r -l sort-by -d 'If non-empty, sort pods list using specified field. The field can be either \'cpu\' or \'memory\'.' - -# Completions for the "kubectl uncordon" command -complete -c kubectl -f -n '__fish_seen_subcommand_from uncordon' -r -l dry-run -d 'Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from uncordon' -r -s l -l selector -d 'Selector (label query) to filter on' - -# Completions for the "kubectl version" command -complete -c kubectl -f -n '__fish_seen_subcommand_from version' -l client -d 'If true, shows client version only (no server required).' -complete -c kubectl -f -n '__fish_seen_subcommand_from version' -r -s o -l output -d 'One of \'yaml\' or \'json\'.' -complete -c kubectl -f -n '__fish_seen_subcommand_from version' -l short -d 'If true, print just the version number.' - -# Completions for the "kubectl wait" command -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -l all -d 'Select all resources in the namespace of the specified resource types' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -s A -l all-namespaces -d 'If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -l allow-missing-template-keys -d 'If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -r -l field-selector -d 'Selector (field query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.' -complete -c kubectl -n '__fish_seen_subcommand_from wait' -r -s f -l filename -d 'identifying the resource.' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -r -l for -d 'The condition to wait on: [delete|condition=condition-name].' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -l local -d 'If true, annotation will NOT contact api-server but run locally.' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -r -s o -l output -d 'Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -s R -l recursive -d 'Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -r -s l -l selector -d 'Selector (label query) to filter on, supports \'=\', \'==\', and \'!=\'.(e.g. -l key1=value1,key2=value2)' -complete -c kubectl -n '__fish_seen_subcommand_from wait' -r -l template -d 'Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].' -complete -c kubectl -f -n '__fish_seen_subcommand_from wait' -r -l timeout -d 'The length of time to wait before giving up. Zero means check once and don\'t wait, negative means wait for a week.' diff --git a/common/fish/completions/nvm.fish b/common/fish/completions/nvm.fish deleted file mode 100644 index e94e50c..0000000 --- a/common/fish/completions/nvm.fish +++ /dev/null @@ -1,19 +0,0 @@ -complete --command nvm --exclusive --long version --description "Print version" -complete --command nvm --exclusive --long help --description "Print help" - -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate a version in the current shell" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active version" -complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( - test -e $nvm_data && string split ' ' <$nvm_data/.index -)" -complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall a version" -complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( - _nvm_list | string split ' ' | string replace system '' -)" -complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( - set --query nvm_default_version && echo default -)" diff --git a/common/fish/conf.d/nvm.fish b/common/fish/conf.d/nvm.fish deleted file mode 100644 index a82c8bd..0000000 --- a/common/fish/conf.d/nvm.fish +++ /dev/null @@ -1,28 +0,0 @@ -function _nvm_install --on-event nvm_install - set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share - set --universal nvm_data $XDG_DATA_HOME/nvm - set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist - - test ! -d $nvm_data && command mkdir -p $nvm_data - echo "Downloading the Node distribution index for the first time..." 2>/dev/null - _nvm_index_update $nvm_mirror $nvm_data/.index -end - -function _nvm_update --on-event nvm_update - set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share - set --universal nvm_data $XDG_DATA_HOME/nvm - set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist -end - -function _nvm_uninstall --on-event nvm_uninstall - command rm -rf $nvm_data - - set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version - - set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source - functions --erase (functions --all | string match --entire --regex -- "^_nvm_") -end - -status is-interactive && - set --query nvm_default_version && ! set --query nvm_current_version && - nvm use $nvm_default_version >/dev/null diff --git a/common/fish/functions/_nvm_index_update.fish b/common/fish/functions/_nvm_index_update.fish deleted file mode 100644 index 9bdd18a..0000000 --- a/common/fish/functions/_nvm_index_update.fish +++ /dev/null @@ -1,12 +0,0 @@ -function _nvm_index_update --argument-names mirror index - command curl --location --silent $mirror/index.tab | command awk -v OFS=\t ' - /v0.9.12/ { exit } # Unsupported - NR > 1 { - print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "") - } - ' >$index.temp 2>/dev/null && command mv $index.temp $index && return - - command rm -f $index.temp - echo "nvm: Invalid index or unavailable host: \"$mirror\"" >&2 - return 1 -end diff --git a/common/fish/functions/_nvm_list.fish b/common/fish/functions/_nvm_list.fish deleted file mode 100644 index fb5ab0e..0000000 --- a/common/fish/functions/_nvm_list.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _nvm_list - set --local versions $nvm_data/* - set --query versions[1] && - string match --entire --regex -- (string match --regex -- "v\d.+" $versions | - string escape --style=regex | - string join "|" - ) <$nvm_data/.index - - command --all node | - string match --quiet --invert --regex -- "^$nvm_data" && echo system -end diff --git a/common/fish/functions/_nvm_version_activate.fish b/common/fish/functions/_nvm_version_activate.fish deleted file mode 100644 index b2aee92..0000000 --- a/common/fish/functions/_nvm_version_activate.fish +++ /dev/null @@ -1,4 +0,0 @@ -function _nvm_version_activate --argument-names v - set --global --export nvm_current_version $v - set --prepend PATH $nvm_data/$v/bin -end diff --git a/common/fish/functions/_nvm_version_deactivate.fish b/common/fish/functions/_nvm_version_deactivate.fish deleted file mode 100644 index 540f697..0000000 --- a/common/fish/functions/_nvm_version_deactivate.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _nvm_version_deactivate --argument-names v - test "$nvm_current_version" = "$v" && set --erase nvm_current_version - set --local index (contains --index -- $nvm_data/$v/bin $PATH) && - set --erase PATH[$index] -end diff --git a/common/fish/functions/nvm.fish b/common/fish/functions/nvm.fish deleted file mode 100644 index ee54cf0..0000000 --- a/common/fish/functions/nvm.fish +++ /dev/null @@ -1,206 +0,0 @@ -function nvm --argument-names cmd v --description "Node version manager" - if test -z "$v" && contains -- "$cmd" install use - for file in .nvmrc .node-version - set file (_nvm_find_up $PWD $file) && read v <$file && break - end - if test -z "$v" - echo "nvm: Invalid version or missing \".nvmrc\" file" >&2 - return 1 - end - end - - switch "$cmd" - case -v --version - echo "nvm, version 2.2.5" - case "" -h --help - echo "Usage: nvm install Download and activate the specified Node version" - echo " nvm install Install version from nearest .nvmrc file" - echo " nvm use Activate a version in the current shell" - echo " nvm use Activate version from nearest .nvmrc file" - echo " nvm list List installed versions" - echo " nvm list-remote List versions available to install" - echo " nvm list-remote List versions matching a given regular expression" - echo " nvm current Print the currently-active version" - echo " nvm uninstall Uninstall a version" - echo "Options:" - echo " -v or --version Print version" - echo " -h or --help Print this help message" - echo "Variables:" - echo " nvm_arch Override architecture, e.g. x64-musl" - echo " nvm_mirror Set the Node download mirror" - echo " nvm_default_version Set the default version for new shells" - case install - _nvm_index_update $nvm_mirror $nvm_data/.index || return - - string match --entire --regex -- (_nvm_version_match $v) <$nvm_data/.index | read v alias - - if ! set --query v[1] - echo "nvm: Invalid version number or alias: \"$argv[2..-1]\"" >&2 - return 1 - end - - if test ! -e $nvm_data/$v - set --local os (command uname -s | string lower) - set --local ext tar.gz - set --local arch (command uname -m) - - switch $os - case aix - set arch ppc64 - case sunos - case linux - case darwin - case {MSYS_NT,MINGW\*_NT}\* - set os win - set ext zip - case \* - echo "nvm: Unsupported operating system: \"$os\"" >&2 - return 1 - end - - switch $arch - case i\*86 - set arch x86 - case x86_64 - set arch x64 - case arm64 - string match --regex --quiet "v(?\d+)" $v - if test "$os" = darwin -a $major -lt 16 - set arch x64 - end - case armv6 armv6l - set arch armv6l - case armv7 armv7l - set arch armv7l - case armv8 armv8l aarch64 - set arch arm64 - end - - set --query nvm_arch && set arch $nvm_arch - - set --local dir "node-$v-$os-$arch" - set --local url $nvm_mirror/$v/$dir.$ext - - command mkdir -p $nvm_data/$v - - echo -e "Installing Node \x1b[1m$v\x1b[22m $alias" - echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m" - - if ! command curl --progress-bar --location $url \ - | command tar --extract --gzip --directory $nvm_data/$v 2>/dev/null - command rm -rf $nvm_data/$v - echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2 - return 1 - end - - echo -en "\033[F\33[2K\x1b[0m" - - if test "$os" = win - command mv $nvm_data/$v/$dir $nvm_data/$v/bin - else - command mv $nvm_data/$v/$dir/* $nvm_data/$v - command rm -rf $nvm_data/$v/$dir - end - end - - if test $v != "$nvm_current_version" - set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version - _nvm_version_activate $v - end - - printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) - case use - test $v = default && set v $nvm_default_version - _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ - - if ! set --query v[1] - echo "nvm: Node version not installed or invalid: \"$argv[2..-1]\"" >&2 - return 1 - end - - if test $v != "$nvm_current_version" - set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version - test $v != system && _nvm_version_activate $v - end - - printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) - case uninstall - if test -z "$v" - echo "nvm: Not enough arguments for command: \"$cmd\"" >&2 - return 1 - end - - test $v = default && test ! -z "$nvm_default_version" && set v $nvm_default_version - - _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ - - if ! set -q v[1] - echo "nvm: Node version not installed or invalid: \"$argv[2..-1]\"" >&2 - return 1 - end - - printf "Uninstalling Node %s %s\n" $v (string replace ~ \~ "$nvm_data/$v/bin/node") - - _nvm_version_deactivate $v - - command rm -rf $nvm_data/$v - case current - _nvm_current - case ls list - _nvm_list | _nvm_list_format (_nvm_current) $argv[2] - case lsr {ls,list}-remote - _nvm_index_update $nvm_mirror $nvm_data/.index || return - _nvm_list | command awk ' - FILENAME == "-" && (is_local[$1] = FNR == NR) { next } { - print $0 (is_local[$1] ? " โœ“" : "") - } - ' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2] - case \* - echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h)" >&2 - return 1 - end -end - -function _nvm_find_up --argument-names path file - test -e "$path/$file" && echo $path/$file || begin - test "$path" != / || return - _nvm_find_up (command dirname $path) $file - end -end - -function _nvm_version_match --argument-names v - string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $v | - string replace --filter --regex -- '^v?(\d+)' 'v$1' | - string escape --style=regex || - string lower '\b'$v'(?:/\w+)?$' -end - -function _nvm_list_format --argument-names current regex - command awk -v current="$current" -v regex="$regex" ' - $0 ~ regex { - aliases[versions[i++] = $1] = $2 " " $3 - pad = (n = length($1)) > pad ? n : pad - } - END { - if (!i) exit 1 - while (i--) - printf((current == versions[i] ? " โ–ถ " : " ") "%"pad"s %s\n", - versions[i], aliases[versions[i]]) - } - ' -end - -function _nvm_current - command --search --quiet node || return - set --query nvm_current_version && echo $nvm_current_version || echo system -end - -function _nvm_node_info - set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm))) - test -f $npm_path/package.json || set --local npm_version_default (command npm --version) - command node --eval " - console.log(process.version) - console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version) - console.log(process.execPath.replace(require('os').homedir(), '~')) - " -end From af84e19b49bdee210612d64faf35b8345a7256f9 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 3 Feb 2022 14:02:12 -0600 Subject: [PATCH 084/103] Add fish_ssh_agent --- common/fish/functions.fish | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/common/fish/functions.fish b/common/fish/functions.fish index e32d927..c889885 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -175,3 +175,36 @@ function fish_preexec end end end + +# source: +# https://github.com/ivakyb/fish_ssh_agent/blob/master/functions/fish_ssh_agent.fish +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 From d23da598fedc999741fe1646d7d5d91f0ae88d2e Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 4 Feb 2022 15:21:44 -0600 Subject: [PATCH 085/103] Tinkering --- common/fish/functions.fish | 6 +++++- os/linux/kanshi/config | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/fish/functions.fish b/common/fish/functions.fish index c889885..601334a 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -140,7 +140,11 @@ end alias vltl "$EDITOR (ltl)" alias cdltl "cd (ltld)" -alias p "ping 8.8.8.8" +function p + set ip 8.8.8.8 + set -q argv[1] && set ip $argv[1] + ping $ip +end function pp --description "Keeps trying to ping 8.8.8.8 forever" while not ping -n 1 -w 5 8.8.8.8 sleep 1 diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 0323632..8f155aa 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -54,5 +54,5 @@ profile laptop-with-display { } profile laptop { - output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 1.5 transform normal + output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal } From 14ce495a1a18eaed859f81f0726ca046d3655249 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 7 Feb 2022 15:20:19 -0600 Subject: [PATCH 086/103] Add XDG_DATA_HOME --- common/fish/paths.fish | 4 ++++ common/git/config | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/common/fish/paths.fish b/common/fish/paths.fish index b6b5376..d8b495b 100644 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -1,4 +1,8 @@ set --export --universal XDG_CONFIG_HOME $HOME/.config +set --export --universal XDG_CACHE_HOME $HOME/.cache +set --export --universal XDG_DATA_HOME $HOME/.local/share +set --export --universal XDG_STATE_HOME $HOME/.local/state + set --export --universal DOTFILES_PATH $XDG_CONFIG_HOME/lytedev-dotfiles set --export --universal ENV_PATH $XDG_CONFIG_HOME/lytedev-env set --export --universal FISH_PATH $XDG_CONFIG_HOME/fish diff --git a/common/git/config b/common/git/config index 89a716b..e0bc12e 100644 --- a/common/git/config +++ b/common/git/config @@ -72,6 +72,12 @@ [push] default = current +[sendemail] + smtpserver = smtp.mailgun.org + smtpuser = daniel@lyte.dev + smtrpencryption = tls + smtpserverport = 587 + [include] path = ~/.config/lytedev-env/host-layer-personal/gitconfig path = ~/.config/lytedev-env/divvy/gitconfig From 85f2227695b9cffda4487ffa4b4dfad52ac8c532 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 18 Feb 2022 10:53:18 -0600 Subject: [PATCH 087/103] Fix pipewire stuff --- common/fish/functions.fish | 2 +- common/htop/rc | 2 +- os/linux/sway/config | 16 ++++++++-------- os/linux/sway/init | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/common/fish/functions.fish b/common/fish/functions.fish index 601334a..54cd557 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -143,7 +143,7 @@ alias cdltl "cd (ltld)" function p set ip 8.8.8.8 set -q argv[1] && set ip $argv[1] - ping $ip + ping $ip $argv[2..] end function pp --description "Keeps trying to ping 8.8.8.8 forever" while not ping -n 1 -w 5 8.8.8.8 diff --git a/common/htop/rc b/common/htop/rc index da3a701..7a98287 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -21,7 +21,7 @@ highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=0 -tree_view=0 +tree_view=1 tree_view_always_by_pid=0 all_branches_collapsed=0 header_margin=1 diff --git a/os/linux/sway/config b/os/linux/sway/config index 37516e4..d62ac6b 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -176,19 +176,19 @@ bar { swaybar_command waybar } -exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway -exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec mako -exec pipewire -exec /usr/lib/kdeconnectd exec gammastep -t 6500:3500 -l 39.0:-94.5 -exec sway-init-tmux -exec $term - exec_always 'killall kanshi; kanshi' -exec_always notify-send -a "sway" -i ~/.wallpaper "sway configuration loaded" +# exec /usr/lib/kdeconnectd +# exec sway-init-tmux +# exec $term +# exec_always notify-send -a "sway" -i ~/.wallpaper "sway configuration loaded" + +# prevents all windows from stealing focus no_focus [class=".*"] + output * bg $HOME/.wallpaper fill +include /etc/sway/config.d/* include $XDG_CONFIG_HOME/lytedev-env/*/sway/config diff --git a/os/linux/sway/init b/os/linux/sway/init index 97f9b27..fa40d65 100755 --- a/os/linux/sway/init +++ b/os/linux/sway/init @@ -14,14 +14,14 @@ end # set --export --universal QT_QPA_PLATFORM_PLUGIN_PATH /usr/lib/qt/plugins set --export --universal CLUTTER_BACKEND wayland -set --export --universal SDL_VIDEODRIVER wayland +# set --export --universal SDL_VIDEODRIVER wayland set --export --universal MOZ_ENABLE_WAYLAND 1 set --export --universal XDG_CURRENT_DESKTOP sway set --export --universal _JAVA_AWT_WM_NONREPARENTING 1 -for s in $ENV_PATH/*/sway-init.d.fish - source $s (dirname $s) -end +# for s in $ENV_PATH/*/sway-init.d.fish +# source $s (dirname $s) +# end set --query SWAY_LOGGING || set SWAY_LOGGING 0 From 4d937dd8b0524e5159d37836f28d29668d483d28 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 28 Feb 2022 23:04:37 -0600 Subject: [PATCH 088/103] MATURE LIGATURE --- common/bin/terminal-rendering-test | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/bin/terminal-rendering-test b/common/bin/terminal-rendering-test index bf5c542..667e0a5 100755 --- a/common/bin/terminal-rendering-test +++ b/common/bin/terminal-rendering-test @@ -18,4 +18,8 @@ for s in {0..8}; do # text styles echo done echo -e "Emoji: ๐Ÿ˜ฑ๐Ÿ˜๐Ÿ˜ฌ๐ŸŽ‰" +echo -e "Possible Ligatures:" +echo -r " --> -> == != === ------> ** ++ |> <* := :: |] [| ===>" +echo -r " >= <= =>= ->- >>- <<- <***> =: <. <.> .> ~> ~~> ~~~~>" +echo -r " (* |- -| =!= :> |} {| >=> <=< ++++ ___" echo From 3e4f3183861bd75bc7d6fc38d9482da2c588609a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 3 Mar 2022 10:44:25 -0600 Subject: [PATCH 089/103] Firefox userchrome script --- common/bin/install-user-chrome-css.fish | 18 ++++++++++++++++++ common/bin/s | 2 +- common/bin/tmux-lyte-session | 9 +++++++-- common/firefox/userChrome.d.css | 3 +++ host/desktop/firefox/userChrome.d.css | 9 +++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100755 common/bin/install-user-chrome-css.fish create mode 100644 common/firefox/userChrome.d.css create mode 100644 host/desktop/firefox/userChrome.d.css diff --git a/common/bin/install-user-chrome-css.fish b/common/bin/install-user-chrome-css.fish new file mode 100755 index 0000000..93bba10 --- /dev/null +++ b/common/bin/install-user-chrome-css.fish @@ -0,0 +1,18 @@ +#!/usr/bin/env fish + +set profile_dirs ~/.mozilla/firefox/*.dev-edition-default + +for p in $profile_dirs + mkdir -p $p/chrome + set user_chrome_css_file $p/chrome/userChrome.css + echo '/* Generated by '(status -f)' -- do not edit manually! */' > $user_chrome_css_file + cat $DOTFILES_PATH/common/firefox/userChrome.d.css >> $user_chrome_css_file + echo >> $user_chrome_css_file + for file_part in $ENV_PATH/*/firefox/userChrome.d.css + cat $file_part >> $user_chrome_css_file + echo >> $user_chrome_css_file + end + echo Built $user_chrome_css_file +end + +echo Make sure you set 'toolkit.legacyUserProfileCustomizations.stylesheets' to true in about:config diff --git a/common/bin/s b/common/bin/s index e84f8bb..37660b0 100755 --- a/common/bin/s +++ b/common/bin/s @@ -1,3 +1,3 @@ #!/usr/bin/env bash -tmux-lyte-session notes $NOTES_DIR -- fish -C "N _scratch" +N _scratch diff --git a/common/bin/tmux-lyte-session b/common/bin/tmux-lyte-session index ac9a2f3..8a35a99 100755 --- a/common/bin/tmux-lyte-session +++ b/common/bin/tmux-lyte-session @@ -2,5 +2,10 @@ set session_name $argv[1] set dir (set -q argv[2] && echo $argv[2] || pwd) -tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] || \ - tmux attach-session -d -t "$session_name" -c "$dir" + +if set -q TMUX + tmux switch -t $session_name +else + tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] || \ + tmux switch -d -t "$session_name" -c "$dir" +end diff --git a/common/firefox/userChrome.d.css b/common/firefox/userChrome.d.css new file mode 100644 index 0000000..7aba8a5 --- /dev/null +++ b/common/firefox/userChrome.d.css @@ -0,0 +1,3 @@ +#webrtcIndiator { + display: none; +} diff --git a/host/desktop/firefox/userChrome.d.css b/host/desktop/firefox/userChrome.d.css new file mode 100644 index 0000000..a91f73b --- /dev/null +++ b/host/desktop/firefox/userChrome.d.css @@ -0,0 +1,9 @@ +#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) + #TabsToolbar + > .toolbar-items { + opacity: 0; + pointer-events: none; +} +#main-window:not([tabsintitlebar="true"]) #TabsToolbar { + visibility: collapse !important; +} From 460d693a54946404d3ea6609180f5d3b23852edf Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 9 Mar 2022 11:50:01 -0600 Subject: [PATCH 090/103] WIP get rid of coc --- common/neovim/coc-settings.json | 71 ------------- common/neovim/init.lua | 51 +--------- common/neovim/lua/config.moon | 0 common/neovim/lua/fold.lua | 12 --- common/neovim/lua/keymap.lua | 17 +++- common/neovim/lua/lsp.lua | 124 ++++++++++------------- common/neovim/lua/nvim_lsp.lua | 6 -- common/neovim/lua/options.lua | 20 +++- common/neovim/lua/plugins.lua | 165 ++++++++++++++++++++++--------- common/neovim/lua/statusline.lua | 6 +- 10 files changed, 205 insertions(+), 267 deletions(-) delete mode 100644 common/neovim/coc-settings.json delete mode 100644 common/neovim/lua/config.moon delete mode 100644 common/neovim/lua/nvim_lsp.lua diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json deleted file mode 100644 index 9461396..0000000 --- a/common/neovim/coc-settings.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "coc.preferences.formatOnSaveFiletypes": ["elixir", "ex", "exs", "typescript", "css", "markdown", "sh", "bash"], - "languageserver": { - "nim": { - "command": "nimlsp", - "filetypes": ["nim"] - }, - "zls": { - "command": "~/zls/zls", - "filetypes": ["zig"] - }, - "godot": { - "host": "127.0.0.1", - "filetypes": ["gd", "gdscript3"], - "port": 6008 - } - }, - "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", - "rust-analyzer.checkOnSave.command": "clippy", - "diagnostic-languageserver": { - "enable": true, - "mergeConfig": true, - "linters": { - "shellcheck": { - "command": "shellcheck", - "debounce": 100, - "args": [ - "-x", - "--format", - "json1", - "-" - ], - "sourceName": "shellcheck", - "parseJson": { - "errorsRoot": "comments", - "line": "line", - "column": "column", - "endLine": "endLine", - "endColumn": "endColumn", - "message": "${message} [${code}]", - "security": "level" - }, - "securities": { - "error": "error", - "warning": "warning", - "info": "info", - "style": "hint" - } - } - }, - "filetypes": { - "elixir": ["mix_credo", "mix_credo_compile"], - "eelixir": ["mix_credo", "mix_credo_compile"], - "sh": "shellcheck", - "bash": "shellcheck" - }, - "formatters": { - "shfmt": { - "command": "shfmt", - "args": ["-i", "2", "-bn", "-ci", "-sr", "-kp"] - } - }, - "formatFiletypes": { - "elixir": "mix_format", - "eelixir": "mix_format", - "sh": "shfmt", - "bash": "shfmt" - } - } -} - diff --git a/common/neovim/init.lua b/common/neovim/init.lua index add9d03..b57d79a 100644 --- a/common/neovim/init.lua +++ b/common/neovim/init.lua @@ -1,52 +1,7 @@ vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim' --- TODO: learn about the wildmenu `q:` --- TODO: what is `let &fcs = 'eob: '` for? - -require('plugins').setup() +require'plugins' require'options' require'keymap' -require('fold').setup() --- require('lsp').setup() -require('statusline').setup() - -function Dbg(a, d) - if d == nil then d = 0 end - if type(a) == 'table' then - local s = '{\n' - local indent = string.rep(' ', d) - for k,v in pairs(a) do - s = s .. ' ' .. indent .. tostring(k) .. '=' .. Dbg(v, d+1) .. '\n' - end - return s .. '\n' .. indent .. '}' - elseif type(a) == 'string' then - return a - elseif type(a) == 'number' then - return tostring(a) - else - return 'type:'..type(a)..',tostring:'..tostring(a) - end -end - -local plugin_setups = { - telescope = { - defaults = { - prompt_prefix = "", - mappings = {i = {['c-u'] = false, ['c-d'] = false}}, - generic_sorter = require('telescope.sorters').get_fzy_sorter, - file_sorter = require('telescope.sorters').get_fzy_sorter, - } - }, -} - -for k,v in pairs(plugin_setups) do - if type(v) == 'function' then - v(require(k)) - elseif type(v) == 'table' then - require(k).setup(v) - elseif type(v) == 'string' then - require(k)[v]() - elseif v == true then - require(k) - end -end +require'statusline' +require'lsp' diff --git a/common/neovim/lua/config.moon b/common/neovim/lua/config.moon deleted file mode 100644 index e69de29..0000000 diff --git a/common/neovim/lua/fold.lua b/common/neovim/lua/fold.lua index bd8bed5..e69de29 100644 --- a/common/neovim/lua/fold.lua +++ b/common/neovim/lua/fold.lua @@ -1,12 +0,0 @@ -function NeatFoldText() - -- TODO: finish this! - -- local lines_count = vim.foldend - vim.foldstart + 1 - -- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.') - -- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) - -- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) - -- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn - -- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) -end --- set foldtext=NeatFoldText() - -return {setup = function() end} diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua index aa228b7..b62a651 100644 --- a/common/neovim/lua/keymap.lua +++ b/common/neovim/lua/keymap.lua @@ -7,33 +7,42 @@ local m = { } local keymap = { n = { + ['/'] = {':let @/ = "":', m.s}, + ['r'] = {':luafile ' .. vim.g.vimdir .. '/init.lua:echo \'Reloaded init.lua\'', m.s}, ['gv'] = {':e ' .. vim.g.vimdir .. '/init.lua', m.s}, + ['w'] = {':bd', m.s}, ['h'] = {':b#', m.s}, ['k'] = {':bnext', m.s}, ['j'] = {':bprevious', m.s}, - ['/'] = {':let @/ = "":', m.s}, + [''] = ':qa', + [''] = 'Telescope git_files', [''] = 'Telescope live_grep', [''] = 'Telescope buffers', ['t'] = 'Telescope help_tags', + [''] = ':TmuxNavigateLeft', [''] = ':TmuxNavigateDown', [''] = ':TmuxNavigateUp', [''] = ':TmuxNavigateRight', + [' n'] = "'Nn'[v:searchforward]", [' N'] = "'nN'[v:searchforward]", [''] = ':lua SynGroup()', - ['g]'] = '(coc-diagnostic-next)', - ['g['] = '(coc-diagnostic-prev)', }, + + -- terminal bindings t = {}, + [''] = { [''] = {'', m.sn}, + + -- remove trailing whitespace [''] = 'mw:%s/\\s\\+$//:let @/ = ""\'w', - [''] = ':setlocal spell!', + ['gs'] = ':setlocal spell!', [',w'] = {'CamelCaseMotion_w', m.s}, [',b'] = {'CamelCaseMotion_b', m.s}, [',e'] = {'CamelCaseMotion_e', m.s}, diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index e0c514b..d46268f 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -1,86 +1,64 @@ -local opts = {noremap=true, silent=true} +local lsp = require'lspconfig' +-- local coq = require'coq' -vim.api.nvim_set_keymap('n', '[g', '(coc-diagnostic-prev)', opts) -vim.api.nvim_set_keymap('n', ']g', '(coc-diagnostic-next)', opts) +-- TODO: replace with nvim lsp bindings for jumping to next linting issue? +--vim.api.nvim_set_keymap('n', '[d', ')', opts) -vim.api.nvim_set_keymap('n', 'gd', '(coc-definition)', opts) -vim.api.nvim_set_keymap('n', 'gy', '(coc-type-definition)', opts) +local opts = { + noremap = true, + silent = true, +} -local nvim_lsp = require('lspconfig') -local on_attach = function(_client, bufnr) - vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - local kmaps = { - ['gD']='lua vim.lsp.buf.declaration()' - } +local on_attach = function(_, bufnr) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'e', 'lua vim.diagnostic.open_float()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'g]', 'lua vim.diagnostic.goto_next()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'g[', 'lua vim.diagnostic.goto_prev()', opts) - for k,v in pairs(kmaps) do - vim.api.nvim_buf_set_keymap(bufnr, 'n', k, v, opts) - end - - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting()', opts) end -local servers = {'clangd', 'rust_analyzer', 'pyright', 'tsserver'} -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup{on_attach=on_attach} +local common_config = { + capabilities = require'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities()), + on_attach = on_attach, + flags = { + debounce_text_changes = 150 + }, +} + +local lsp_configs = { + elixirls = { + cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' }, + }, + sumneko_lua = {}, + vimls = {}, + rust_analyzer = {}, + denols = {} +} + +for server, config in pairs(lsp_configs) do + for k,v in pairs(common_config) do config[k] = v end + lsp[server].setup(config) end -local sumneko_root_path = vim.fn.getenv('HOME')..'/.local/bin/sumneko_lua' -local sumneko_binary_path = '/bin/linux/lua-language-server' -nvim_lsp.sumneko_lua.setup{ - cmd={sumneko_root_path .. sumneko_binary_path, '-E', sumneko_root_path..'/main.lua'}; - on_attach=on_attach, - settings={ - Lua={ - runtime={ - version='LuaJIT', - path=vim.split(package.path, ';'), - }, - diagnostics={ - globals={'vim'}, - }, - workspace={ - library={ - [vim.fn.expand('$VIMRUNTIME/lua')] = true, - [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, - }, - }, - }, - }, -} +local lsp_installer = require'nvim-lsp-installer' +lsp_installer.on_server_ready(function(server) + local server_opts = {} -vim.cmd "command! Format execute 'lua vim.lsp.buf.formatting()'" -vim.o.completeopt = 'menuone,noinsert' + -- if server.name == "elixirls" then + -- server_opts.cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' } + -- end ---[[require'compe'.setup{ - enabled=true, - autocomplete=true, - debug=false, - min_length=1, - preselect='enable', - throttle_time=80, - source_timeout=200, - incomplete_delay=400, - max_abbr_width=100, - max_kind_width=100, - max_menu_width=100, - documentation=true, - source={path=true, nvim_lsp=true}, -} -]]-- - -return { - setup=function() - end -} + server:setup(server_opts) +end) diff --git a/common/neovim/lua/nvim_lsp.lua b/common/neovim/lua/nvim_lsp.lua deleted file mode 100644 index db29563..0000000 --- a/common/neovim/lua/nvim_lsp.lua +++ /dev/null @@ -1,6 +0,0 @@ --- local completion = require('completion') -local lsp = require('lspconfig') - -lsp.elixirls.setup{} -lsp.sumneko_lua.setup{} -lsp.vimls.setup{} diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 115e859..8e308ee 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -1,4 +1,8 @@ local globals = { + coq_settings = { + ['display.icons.mode'] = 'none' + }, + dashboard_default_executive = 'telescope', mapleader = ' ', maplocalleader = ' ', completion_enable_auto_popup = 0, @@ -81,9 +85,21 @@ function SynGroup() print(vim.fn.synIDattr(s, 'name') .. ' -> ' .. vim.fn.synIDattr(vim.fn.synIDtrans(s), 'name')) end -print(vim.api.nvim_exec([[ +vim.api.nvim_exec([[ au! TextYankPost * silent! lua vim.highlight.on_yank { higroup='Search', timeout=200 } au! FileType gitcommit exec 'norm gg' | startinsert! au! BufNewFile,BufRead *.slimleex set syntax=slime command! W write -]], true)) +]], true) +-- au! VimEnter * COQnow -s + +function NeatFoldText() + -- TODO: finish this! + -- local lines_count = vim.foldend - vim.foldstart + 1 + -- local foldchar = vim.fn.matchstr(vim.fillchars, 'fold:\\zs.') + -- local foldtextstart = vim.fn.strpart('^' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3) + -- let foldtextend = printf("%s %".(winwidth(0)-20)."dL", foldtextstart, getline(v:foldstart), lines_count) + -- let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn + -- return printf("%s%d", substitute(getline(v:foldstart), "^.", ">"), lines_count) +end +-- set foldtext=NeatFoldText() diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index df3e529..d5e0b75 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -1,48 +1,121 @@ -local setup = function() - local packer_install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' - if #vim.fn.glob(packer_install_path) == 0 then - vim.fn.system {'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} - vim.api.nvim_command'packadd packer.nvim' - end - - vim.g.polyglot_disabled = {'cue'} - - local packer = require'packer' - packer.startup(function() - local plugins = { - 'wbthomason/packer.nvim', - 'editorconfig/editorconfig-vim', - 'tpope/vim-sleuth', - 'vim-scripts/LargeFile', - 'vim-scripts/restore_view.vim', - 'christoomey/vim-tmux-navigator', - 'tpope/vim-fugitive', - 'tpope/vim-rhubarb', - 'tpope/vim-commentary', - 'tpope/vim-repeat', - 'machakann/vim-sandwich', - 'michaeljsmith/vim-indent-object', - 'wellle/targets.vim', - 'bkad/CamelCaseMotion', - 'ludovicchabant/vim-gutentags', - 'tpope/vim-obsession', - 'dhruvasagar/vim-prosession', - 'nvim-lua/popup.nvim', - 'nvim-lua/plenary.nvim', - {'nvim-telescope/telescope.nvim', requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}}}, - -- 'joshdick/onedark.vim', - 'lukas-reineke/indent-blankline.nvim', - -- {'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}}, - 'neovim/nvim-lspconfig', - 'hrsh7th/nvim-compe', - 'jjo/vim-cue', - 'sheerun/vim-polyglot', - {'neoclide/coc.nvim', branch = 'release'}, - } - for _,plugin in ipairs(plugins) do - packer.use(plugin) - end - end) +local packer_install_path = vim.fn.stdpath'data' .. '/site/pack/packer/start/packer.nvim' +if #vim.fn.glob(packer_install_path) == 0 then + vim.fn.system{'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} + vim.api.nvim_command'packadd packer.nvim' end -return {setup = setup} +local packer = require'packer' +packer.startup(function() + local plugins = { + 'wbthomason/packer.nvim', -- neovim plugin manager + + 'vim-scripts/LargeFile', -- degrade gracefully with large files + 'tpope/vim-repeat', -- enable repeat for plugin maps + 'tpope/vim-sleuth', -- use whatever whitespace is in the file + 'editorconfig/editorconfig-vim', -- handle .editorconfig files + 'christoomey/vim-tmux-navigator', -- navigate vim splits and tmux panes fluidly + 'machakann/vim-sandwich', -- edit surrounding characters + 'michaeljsmith/vim-indent-object', -- adds indent-level text objects + 'wellle/targets.vim', -- add many other text objects + 'bkad/CamelCaseMotion', -- invaluable motions for properly operating on various casings + + { + -- session management + 'olimorris/persisted.nvim', + config = function() + -- TODO: only load session if no arguments passed? + require'persisted'.setup{ + autoload = true, + } + end + }, + { + -- toggle comments + 'terrortylor/nvim-comment', + config = function() + require'nvim_comment'.setup() + end + }, + { + -- fuzzy finder + 'nvim-telescope/telescope.nvim', + requires = { + 'nvim-lua/popup.nvim', + 'nvim-lua/plenary.nvim', + } + }, + -- TODO: add keymap ig for toggling these + 'lukas-reineke/indent-blankline.nvim', -- indentation guide lines + 'neovim/nvim-lspconfig', + 'williamboman/nvim-lsp-installer', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', + { + 'hrsh7th/nvim-cmp', + config = function() + local cmp = require'cmp' + + cmp.setup{ + mapping = { + [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), + [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), + [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), + [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. + [''] = cmp.mapping{ + i = cmp.mapping.abort(), + c = cmp.mapping.close(), + }, + [''] = cmp.mapping.confirm{select = true}, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }, + sources = cmp.config.sources{ + { name = 'nvim_lsp' }, + { name = 'buffer' }, + }, + } + + cmp.setup.cmdline('/', { + sources = { + {name = 'buffer'}, + } + }) + + cmp.setup.cmdline(':', { + sources = cmp.config.sources({ + {name = 'path'} + }, { + {name = 'cmdline'} + }) + }) + end, + }, + -- TODO: automate this installation process of :COQdeps:COQnow + -- {'ms-jpq/coq_nvim', branch = 'coq'}, + -- {'ms-jpq/coq.thirdparty', branch = '3p'}, + { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate', + config = function() + require'nvim-treesitter.configs'.setup { + ensure_installed = "maintained", + sync_install = false, + ignore_install = {}, + indent = { + enable = true, + }, + highlight = { + enable = true, + disable = {}, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + -- additional_vim_regex_highlighting = false, + }, + } + end + }, + } + for _,plugin in pairs(plugins) do packer.use(plugin) end +end) diff --git a/common/neovim/lua/statusline.lua b/common/neovim/lua/statusline.lua index 5bc66c5..c5061d1 100644 --- a/common/neovim/lua/statusline.lua +++ b/common/neovim/lua/statusline.lua @@ -73,8 +73,4 @@ function StatusLine() return status_line_buffers() .. '%*%=%c,%l/%L (%p%%)' end -return { - setup=function() - vim.o.statusline = '%!v:lua.StatusLine()' - end -} +vim.o.statusline = '%!v:lua.StatusLine()' From 1dfcc4d76408fb8e6593015f4df0e19e29440a76 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 9 Mar 2022 12:04:12 -0600 Subject: [PATCH 091/103] Comment plugins --- common/neovim/lua/plugins.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index d5e0b75..bbcab19 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -46,13 +46,14 @@ packer.startup(function() }, -- TODO: add keymap ig for toggling these 'lukas-reineke/indent-blankline.nvim', -- indentation guide lines - 'neovim/nvim-lspconfig', - 'williamboman/nvim-lsp-installer', - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-cmdline', + 'neovim/nvim-lspconfig', -- language server configuration helper + 'williamboman/nvim-lsp-installer', -- plugin containing installation commands for many language servers + 'hrsh7th/cmp-nvim-lsp', -- add lsp to completion engine + 'hrsh7th/cmp-buffer', -- add buffer information to completion engine + 'hrsh7th/cmp-path', -- add filesystem information to complete enging + 'hrsh7th/cmp-cmdline', -- add completion for vim commands { + -- completion engine 'hrsh7th/nvim-cmp', config = function() local cmp = require'cmp' @@ -94,6 +95,7 @@ packer.startup(function() -- {'ms-jpq/coq_nvim', branch = 'coq'}, -- {'ms-jpq/coq.thirdparty', branch = '3p'}, { + -- syntax highlighting and indentation 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function() From adacb5c6c0b73575b970029ac99980df4db36576 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 9 Mar 2022 12:54:46 -0600 Subject: [PATCH 092/103] Add vim global to lua lsp --- common/neovim/lua/lsp.lua | 10 +++++++++- common/neovim/lua/options.lua | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index d46268f..e32ce58 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -41,7 +41,15 @@ local lsp_configs = { elixirls = { cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' }, }, - sumneko_lua = {}, + sumneko_lua = { + settings = { + Lua = { + diagnostics = { + globals = {'vim'} + } + } + } + }, vimls = {}, rust_analyzer = {}, denols = {} diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index 8e308ee..b273be9 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -65,7 +65,7 @@ local options = { foldnestmax = 10, foldlevelstart = 99, autowrite = false, - autochdir = true, + autochdir = false, autoread = true, modeline = false, showmode = false, From c59fc57dd4980a3e4c96db517402d8b595eadab2 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 9 Mar 2022 13:37:25 -0600 Subject: [PATCH 093/103] Fix session handling --- common/neovim/lua/keymap.lua | 6 ++++++ common/neovim/lua/options.lua | 4 ++-- common/neovim/lua/plugins.lua | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua index b62a651..bdaaf61 100644 --- a/common/neovim/lua/keymap.lua +++ b/common/neovim/lua/keymap.lua @@ -32,6 +32,12 @@ local keymap = { [' n'] = "'Nn'[v:searchforward]", [' N'] = "'nN'[v:searchforward]", [''] = ':lua SynGroup()', + + ['s'] = "SessionToggleecho 'Persisting Session: ' .. g:persisting .. ' (' .. getcwd() .. ')'", + ['S'] = "SessionSaveecho 'Saved Session: ' .. getcwd()", + ['l'] = "SessionLoadecho 'Loaded Session: ' .. getcwd()", + ['L'] = "SessionLoadLastecho 'Loaded Last Session: ' .. getcwd()", + ['d'] = "SessionDeleteecho 'Deleted Session for cwd: ' .. getcwd()", }, -- terminal bindings diff --git a/common/neovim/lua/options.lua b/common/neovim/lua/options.lua index b273be9..72896a0 100644 --- a/common/neovim/lua/options.lua +++ b/common/neovim/lua/options.lua @@ -51,10 +51,10 @@ local options = { shortmess = 'filnxToOFIac', history = 1000, undofile = true, - undodir = vim.g.vimdir .. '/undo', + undodir = vim.fn.stdpath'data' .. '/undo', undolevels = 1000, undoreload = 1000, - spellfile = vim.g.vimdir .. '/spell/en.utf-8.add', + spellfile = vim.fn.stdpath'data' .. '/spell/en.utf-8.add', ignorecase = true, smartcase = true, incsearch = true, diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index bbcab19..f61425a 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -23,9 +23,10 @@ packer.startup(function() -- session management 'olimorris/persisted.nvim', config = function() - -- TODO: only load session if no arguments passed? + local should_autoload = #vim.v.argv == 1 require'persisted'.setup{ - autoload = true, + autoload = should_autoload, + autosave = should_autoload, } end }, From d357b591c9c41c11aada568b234613d45faa26b1 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 16 Mar 2022 00:16:55 -0500 Subject: [PATCH 094/103] completions --- common/bin/pass-otp | 6 ------ common/fish/config.fish | 23 +++++++++++++++++++++++ common/fish/pass-otp-completions.fish | 4 ++++ 3 files changed, 27 insertions(+), 6 deletions(-) delete mode 100755 common/bin/pass-otp create mode 100644 common/fish/pass-otp-completions.fish diff --git a/common/bin/pass-otp b/common/bin/pass-otp deleted file mode 100755 index f5e81af..0000000 --- a/common/bin/pass-otp +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -echo 'This script is deprecated. Install and use the pass-otp extension. - yay -S pass-otp - pass otp $args' -exit 1 diff --git a/common/fish/config.fish b/common/fish/config.fish index 38304c8..a9f764c 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -19,4 +19,27 @@ else if test -f /opt/asdf-vm/asdf.fish source /opt/asdf-vm/asdf.fish end +if test -f /usr/share/password-store/extensions/otp.bash + source $FISH_PATH/pass-otp-completions.fish +end + +if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + set nix_profiles /nix/var/nix/profiles/default $HOME/.nix-profile + set --export --universal NIX_PROFILES "$nix_profiles" + + if set -q NIX_SSL_CERT_FILE + : + elif test -e /etc/ssl/certs/ca-certificates.crt + set --export --universal NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt + else + for p in (string split $NIX_PROFILES) + test -e $p/etc/ssl/certs/ca-bundle.crt && \ + set --export --universal NIX_SSL_CERT_FILE=$p/etc/ssl/certs/ca-bundle.crt + end + end + + set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin +end + + test $PWD = $HOME && begin; cd $NICE_HOME || cd; end diff --git a/common/fish/pass-otp-completions.fish b/common/fish/pass-otp-completions.fish new file mode 100644 index 0000000..933868b --- /dev/null +++ b/common/fish/pass-otp-completions.fish @@ -0,0 +1,4 @@ +#!/usr/bin/env fish +complete -c pass -f -n '__fish_pass_needs_command' -a otp -d 'Command: show TOTP code' +complete -c pass -f -n '__fish_pass_uses_command otp' -s c -l clip -d 'Put TOTP code in clipboard' +complete -c pass -f -n '__fish_pass_uses_command otp' -a "(__fish_pass_print_entries)" From 3a13cbc38d07143ad00c2b697648822e7d2ce284 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 16 Mar 2022 00:53:49 -0500 Subject: [PATCH 095/103] Add snippet engine for cmp --- common/neovim/lua/plugins.lua | 51 +++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index f61425a..a6dd337 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -4,6 +4,11 @@ if #vim.fn.glob(packer_install_path) == 0 then vim.api.nvim_command'packadd packer.nvim' end +local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil +end + local packer = require'packer' packer.startup(function() local plugins = { @@ -45,21 +50,38 @@ packer.startup(function() 'nvim-lua/plenary.nvim', } }, + { + 'nvim-telescope/telescope-fzf-native.nvim', + run = 'make', + }, + { + 'tzachar/cmp-fuzzy-path', + requires = {'hrsh7th/nvim-cmp', 'tzachar/fuzzy.nvim'}, + }, -- TODO: add keymap ig for toggling these 'lukas-reineke/indent-blankline.nvim', -- indentation guide lines + 'L3MON4D3/LuaSnip', + 'neovim/nvim-lspconfig', -- language server configuration helper 'williamboman/nvim-lsp-installer', -- plugin containing installation commands for many language servers 'hrsh7th/cmp-nvim-lsp', -- add lsp to completion engine 'hrsh7th/cmp-buffer', -- add buffer information to completion engine 'hrsh7th/cmp-path', -- add filesystem information to complete enging 'hrsh7th/cmp-cmdline', -- add completion for vim commands + 'saadparwaiz1/cmp_luasnip', { -- completion engine 'hrsh7th/nvim-cmp', config = function() local cmp = require'cmp' + local luasnip = require'luasnip' cmp.setup{ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, mapping = { [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), @@ -70,16 +92,41 @@ packer.startup(function() c = cmp.mapping.close(), }, [''] = cmp.mapping.confirm{select = true}, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), }, - sources = cmp.config.sources{ + sources = cmp.config.sources({ { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, { { name = 'buffer' }, - }, + { name = 'path' }, + { name = 'fuzzy_path' }, + }), } cmp.setup.cmdline('/', { sources = { {name = 'buffer'}, + {name = 'fuzzy_path'}, } }) From a199c64f283f6f2e50da63c44c1bb9973675fd32 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 16 Mar 2022 01:07:27 -0500 Subject: [PATCH 096/103] Add some useful bindings --- common/neovim/lua/lsp.lua | 3 ++- common/neovim/lua/plugins.lua | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index e32ce58..1c92abe 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -18,7 +18,8 @@ local on_attach = function(_, bufnr) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'i', '', 'lua vim.lsp.buf.signature_help()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index a6dd337..a8d91f2 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -10,6 +10,7 @@ local has_words_before = function() end local packer = require'packer' + packer.startup(function() local plugins = { 'wbthomason/packer.nvim', -- neovim plugin manager @@ -64,6 +65,7 @@ packer.startup(function() 'neovim/nvim-lspconfig', -- language server configuration helper 'williamboman/nvim-lsp-installer', -- plugin containing installation commands for many language servers + 'hrsh7th/cmp-nvim-lsp-signature-help', 'hrsh7th/cmp-nvim-lsp', -- add lsp to completion engine 'hrsh7th/cmp-buffer', -- add buffer information to completion engine 'hrsh7th/cmp-path', -- add filesystem information to complete enging @@ -115,6 +117,7 @@ packer.startup(function() }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, + { name = 'nvim_lsp_signature_help' }, { name = 'luasnip' }, }, { { name = 'buffer' }, From 2293d02ad2908922aa207e9bd25045752eb48f4b Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 28 Mar 2022 09:47:54 -0500 Subject: [PATCH 097/103] ts --- common/neovim/lua/lsp.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index 1c92abe..85f51a6 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -53,7 +53,12 @@ local lsp_configs = { }, vimls = {}, rust_analyzer = {}, - denols = {} + tsserver = { + + }, + denols = { + root_dir = lsp.util.root_pattern("deno.json"), + }, } for server, config in pairs(lsp_configs) do From 6a4008221efc9b74dd71f7fde6e37999ece22695 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 28 Mar 2022 09:57:47 -0500 Subject: [PATCH 098/103] Dunno --- common/fish/functions.fish | 5 ++++- common/fish/paths.fish | 1 + common/git/config | 3 +++ common/neovim/lua/lsp.lua | 7 ++++++- common/neovim/lua/plugins.lua | 7 ++++--- os/linux/kanshi/config | 11 +++-------- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/common/fish/functions.fish b/common/fish/functions.fish index 54cd557..9a06b0f 100644 --- a/common/fish/functions.fish +++ b/common/fish/functions.fish @@ -169,7 +169,10 @@ alias mount 'sudo -E mount' alias umount 'sudo -E umount' has_command xdg-open && alias open xdg-open -has_command docker && alias dc "docker compose" +has_command docker && begin + alias dc "docker compose" + alias dk "docker" +end function fish_preexec test -n $TMUX && begin diff --git a/common/fish/paths.fish b/common/fish/paths.fish index d8b495b..a8451ef 100644 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -23,6 +23,7 @@ set --erase CDPATH set --export --global CDPATH . $NICE_HOME set --export --universal GOPATH $HOME/.go +set --export --universal GOBIN $GOPATH/bin set paths_candidates \ $DOTFILES_PATH/common/bin \ diff --git a/common/git/config b/common/git/config index e0bc12e..97c83c0 100644 --- a/common/git/config +++ b/common/git/config @@ -63,6 +63,9 @@ -c 'silent execute \"normal gg2dd\"' \ -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' +[url "git@git-p1ap1.divvy.co:"] + insteadOf = https://git-p1ap1.divvy.co + [gpg] program = gpg2 diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index 1c92abe..4857f08 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -9,7 +9,11 @@ local opts = { silent = true, } -local on_attach = function(_, bufnr) +local lsp_format = require'lsp-format' + +local on_attach = function(client, bufnr) + lsp_format.on_attach(client) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'e', 'lua vim.diagnostic.open_float()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'g]', 'lua vim.diagnostic.goto_next()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'g[', 'lua vim.diagnostic.goto_prev()', opts) @@ -39,6 +43,7 @@ local common_config = { } local lsp_configs = { + gopls = {}, elixirls = { cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' }, }, diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index a8d91f2..37428bd 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -5,7 +5,7 @@ if #vim.fn.glob(packer_install_path) == 0 then end local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + local line, col = vim.api.nvim_win_get_cursor(0) return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end @@ -102,7 +102,7 @@ packer.startup(function() elseif has_words_before() then cmp.complete() else - fallback() + -- fallback() end end, { "i", "s" }), [""] = cmp.mapping(function(fallback) @@ -111,7 +111,7 @@ packer.startup(function() elseif luasnip.jumpable(-1) then luasnip.jump(-1) else - fallback() + -- fallback() end end, { "i", "s" }), }, @@ -169,6 +169,7 @@ packer.startup(function() } end }, + 'lukas-reineke/lsp-format.nvim', } for _,plugin in pairs(plugins) do packer.use(plugin) end end) diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 8f155aa..fd507ed 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -12,11 +12,6 @@ profile desktop-H-2x4kside2 { exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } -profile desktop-H-2x4kside2 { - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 0,1200 scale 1 transform normal - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 3440,0 scale 1 transform 90 -} - profile desktop-H-2x4kside2 { output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform normal } @@ -28,9 +23,9 @@ profile desktop-H-2x4kside2 { # exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" # } -profile tv4ktest { - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 0,900 scale 1.5 transform normal - output "Samsung Electric Company SyncMaster H1AK500000" enable mode 3840x2160@60Hz position 2560,0 scale 1.0 transform normal +profile desktop-primary { + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 0,500 scale 1.5 transform 90 + output "Samsung Electric Company SyncMaster H1AK500000" enable mode 3840x2160@60Hz position 1440,0 scale 1.0 transform normal } profile tv4k { From 2a7e660f61ea69ed0e76139529bdd6d034775e2f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 5 Apr 2022 09:59:12 -0500 Subject: [PATCH 099/103] I guess tab works again? --- common/git/config | 3 --- common/neovim/lua/plugins.lua | 10 +++++++--- common/neovim/lua/statusline.lua | 12 +++++++++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/common/git/config b/common/git/config index 97c83c0..e0bc12e 100644 --- a/common/git/config +++ b/common/git/config @@ -63,9 +63,6 @@ -c 'silent execute \"normal gg2dd\"' \ -c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' -[url "git@git-p1ap1.divvy.co:"] - insteadOf = https://git-p1ap1.divvy.co - [gpg] program = gpg2 diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index 37428bd..787ab45 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -93,8 +93,11 @@ packer.startup(function() i = cmp.mapping.abort(), c = cmp.mapping.close(), }, + [''] = cmp.config.disable, + [''] = cmp.config.disable, [''] = cmp.mapping.confirm{select = true}, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [""] = cmp.mapping(function(fallback) + --[[ [""] = cmp.mapping(function(fallback) + if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_jumpable() then @@ -102,7 +105,7 @@ packer.startup(function() elseif has_words_before() then cmp.complete() else - -- fallback() + fallback() end end, { "i", "s" }), [""] = cmp.mapping(function(fallback) @@ -111,9 +114,10 @@ packer.startup(function() elseif luasnip.jumpable(-1) then luasnip.jump(-1) else - -- fallback() + fallback() end end, { "i", "s" }), + ]]-- }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, diff --git a/common/neovim/lua/statusline.lua b/common/neovim/lua/statusline.lua index c5061d1..91c18da 100644 --- a/common/neovim/lua/statusline.lua +++ b/common/neovim/lua/statusline.lua @@ -69,8 +69,18 @@ local status_line_buffers = function() end end +local whitespace = function() + local result = "" + if vim.o.expandtab == true then + result = result .. vim.o.shiftwidth .. "S" + else + result = result .. vim.o.tabstop .. "T" + end + return result +end + function StatusLine() - return status_line_buffers() .. '%*%=%c,%l/%L (%p%%)' + return status_line_buffers() .. '%*%=%{&filetype} %l;%c (%p%%/%L) ' .. whitespace() end vim.o.statusline = '%!v:lua.StatusLine()' From cacfc8adff9c9581760fa297f2f2dc26e8e4fc8a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 5 Apr 2022 09:59:39 -0500 Subject: [PATCH 100/103] Whitespace --- common/neovim/lua/plugins.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index 787ab45..facfa1f 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -5,8 +5,8 @@ if #vim.fn.glob(packer_install_path) == 0 then end local has_words_before = function() - local line, col = vim.api.nvim_win_get_cursor(0) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + local line, col = vim.api.nvim_win_get_cursor(0) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end local packer = require'packer' @@ -64,7 +64,7 @@ packer.startup(function() 'L3MON4D3/LuaSnip', 'neovim/nvim-lspconfig', -- language server configuration helper - 'williamboman/nvim-lsp-installer', -- plugin containing installation commands for many language servers + 'williamboman/nvim-lsp-installer', -- plugin containing installation commands for many language servers 'hrsh7th/cmp-nvim-lsp-signature-help', 'hrsh7th/cmp-nvim-lsp', -- add lsp to completion engine 'hrsh7th/cmp-buffer', -- add buffer information to completion engine From 82bceebbfd7992b8d4492f956b5df5315671ae80 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 12 Apr 2022 10:56:01 -0500 Subject: [PATCH 101/103] Tickles --- common/bin/git-cleanup-local-branches | 5 +++++ common/neovim/lua/lsp.lua | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 common/bin/git-cleanup-local-branches diff --git a/common/bin/git-cleanup-local-branches b/common/bin/git-cleanup-local-branches new file mode 100644 index 0000000..8094c0d --- /dev/null +++ b/common/bin/git-cleanup-local-branches @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +git branch --merged | \ + grep -v "(^\*|master|main|dev)" | \ + xargs git branch -dr diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index 5780a73..1193845 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -58,9 +58,8 @@ local lsp_configs = { }, vimls = {}, rust_analyzer = {}, - tsserver = { - - }, + tsserver = {}, + pylsp = {}, denols = { root_dir = lsp.util.root_pattern("deno.json"), }, From 1d7acb6a57e117d9c7297872b889d3cdcdd2f1c0 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Fri, 15 Apr 2022 12:52:46 -0500 Subject: [PATCH 102/103] LSP nvim stuff --- common/neovim/lua/keymap.lua | 49 ++++++++-------- common/neovim/lua/lsp.lua | 59 ++++++++++--------- common/neovim/lua/plugins.lua | 103 +++++++++++++++++++--------------- common/tmux/conf | 2 +- 4 files changed, 114 insertions(+), 99 deletions(-) diff --git a/common/neovim/lua/keymap.lua b/common/neovim/lua/keymap.lua index bdaaf61..414ae64 100644 --- a/common/neovim/lua/keymap.lua +++ b/common/neovim/lua/keymap.lua @@ -1,21 +1,21 @@ -for _,keys in ipairs{'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK'} do vim.api.nvim_set_keymap('i', keys, '', {}) end +for _, keys in ipairs { 'jj', 'jJ', 'Jj', 'JJ', 'jk', 'jK', 'Jk', 'JK' } do vim.api.nvim_set_keymap('i', keys, '', {}) end local m = { - s = {silent = true}, - n = {noremap = true}, - sn = {silent = true, noremap = true}, + s = { silent = true }, + n = { noremap = true }, + sn = { silent = true, noremap = true }, } local keymap = { n = { - ['/'] = {':let @/ = "":', m.s}, + ['/'] = { ':let @/ = "":', m.s }, - ['r'] = {':luafile ' .. vim.g.vimdir .. '/init.lua:echo \'Reloaded init.lua\'', m.s}, - ['gv'] = {':e ' .. vim.g.vimdir .. '/init.lua', m.s}, + ['r'] = { ':luafile ' .. vim.g.vimdir .. '/init.lua:echo \'Reloaded init.lua\'', m.s }, + ['gv'] = { ':e ' .. vim.g.vimdir .. '/init.lua', m.s }, - ['w'] = {':bd', m.s}, - ['h'] = {':b#', m.s}, - ['k'] = {':bnext', m.s}, - ['j'] = {':bprevious', m.s}, + ['w'] = { ':bd', m.s }, + ['h'] = { ':b#', m.s }, + ['k'] = { ':bnext', m.s }, + ['j'] = { ':bprevious', m.s }, [''] = ':qa', @@ -44,37 +44,32 @@ local keymap = { t = {}, [''] = { - [''] = {'', m.sn}, + [''] = { '', m.sn }, -- remove trailing whitespace [''] = 'mw:%s/\\s\\+$//:let @/ = ""\'w', ['gs'] = ':setlocal spell!', - [',w'] = {'CamelCaseMotion_w', m.s}, - [',b'] = {'CamelCaseMotion_b', m.s}, - [',e'] = {'CamelCaseMotion_e', m.s}, - [',ge'] = {'CamelCaseMotion_ge', m.s}, + [',w'] = { 'CamelCaseMotion_w', m.s }, + [',b'] = { 'CamelCaseMotion_b', m.s }, + [',e'] = { 'CamelCaseMotion_e', m.s }, + [',ge'] = { 'CamelCaseMotion_ge', m.s }, }, o = { - ['ib'] = {'CamelCaseMotion_ib', m.s}, - ['ie'] = {'CamelCaseMotion_ie', m.s}, + ['ib'] = { 'CamelCaseMotion_ib', m.s }, + ['ie'] = { 'CamelCaseMotion_ie', m.s }, }, x = { ['<'] = ''] = '>gv', - ['ib'] = {'CamelCaseMotion_ib', m.s}, - ['ie'] = {'CamelCaseMotion_ie', m.s}, - }, - c = { - [''] = '', - [''] = '', + ['ib'] = { 'CamelCaseMotion_ib', m.s }, + ['ie'] = { 'CamelCaseMotion_ie', m.s }, }, i = { [''] = '', - [''] = {'(completion_trigger)', m.s}, }, } -for mode,mappings in pairs(keymap) do - for key,bind in pairs(mappings) do +for mode, mappings in pairs(keymap) do + for key, bind in pairs(mappings) do if type(bind) == 'table' then vim.api.nvim_set_keymap(mode, key, bind[1], bind[2]) else diff --git a/common/neovim/lua/lsp.lua b/common/neovim/lua/lsp.lua index 1193845..06b1e8d 100644 --- a/common/neovim/lua/lsp.lua +++ b/common/neovim/lua/lsp.lua @@ -1,4 +1,4 @@ -local lsp = require'lspconfig' +local lsp = require 'lspconfig' -- local coq = require'coq' -- TODO: replace with nvim lsp bindings for jumping to next linting issue? @@ -9,7 +9,7 @@ local opts = { silent = true, } -local lsp_format = require'lsp-format' +local lsp_format = require 'lsp-format' local on_attach = function(client, bufnr) lsp_format.on_attach(client) @@ -18,24 +18,25 @@ local on_attach = function(client, bufnr) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'g]', 'lua vim.diagnostic.goto_next()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'g[', 'lua vim.diagnostic.goto_prev()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'i', '', 'lua vim.lsp.buf.signature_help()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'lua vim.lsp.buf.definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', 'lua vim.lsp.buf.hover()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', 'lua vim.lsp.buf.implementation()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', '', 'lua vim.lsp.buf.signature_help()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'i', '', 'lua vim.lsp.buf.signature_help()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting_seq_sync()', opts) end +local capabilities = require 'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities()) local common_config = { - capabilities = require'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities()), + capabilities = capabilities, on_attach = on_attach, flags = { debounce_text_changes = 150 @@ -45,13 +46,19 @@ local common_config = { local lsp_configs = { gopls = {}, elixirls = { - cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' }, + cmd = { vim.fn.expand '~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' }, + settings = { + elixirLS = { + dialyzerEnabled = true, + fetchDeps = false, + } + } }, sumneko_lua = { settings = { Lua = { diagnostics = { - globals = {'vim'} + globals = { 'vim' } } } } @@ -66,17 +73,17 @@ local lsp_configs = { } for server, config in pairs(lsp_configs) do - for k,v in pairs(common_config) do config[k] = v end + for k, v in pairs(common_config) do config[k] = v end lsp[server].setup(config) end -local lsp_installer = require'nvim-lsp-installer' +local lsp_installer = require 'nvim-lsp-installer' lsp_installer.on_server_ready(function(server) - local server_opts = {} + local server_opts = {} - -- if server.name == "elixirls" then - -- server_opts.cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' } - -- end + -- if server.name == "elixirls" then + -- server_opts.cmd = { vim.fn.expand'~/.local/share/nvim/lsp_servers/elixir/elixir-ls/language_server.sh' } + -- end - server:setup(server_opts) + server:setup(server_opts) end) diff --git a/common/neovim/lua/plugins.lua b/common/neovim/lua/plugins.lua index facfa1f..309ce3e 100644 --- a/common/neovim/lua/plugins.lua +++ b/common/neovim/lua/plugins.lua @@ -1,7 +1,7 @@ -local packer_install_path = vim.fn.stdpath'data' .. '/site/pack/packer/start/packer.nvim' +local packer_install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' if #vim.fn.glob(packer_install_path) == 0 then - vim.fn.system{'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path} - vim.api.nvim_command'packadd packer.nvim' + vim.fn.system { 'git', 'clone', 'https://github.com/wbthomason/packer.nvim', packer_install_path } + vim.api.nvim_command 'packadd packer.nvim' end local has_words_before = function() @@ -9,7 +9,7 @@ local has_words_before = function() return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end -local packer = require'packer' +local packer = require 'packer' packer.startup(function() local plugins = { @@ -22,7 +22,7 @@ packer.startup(function() 'christoomey/vim-tmux-navigator', -- navigate vim splits and tmux panes fluidly 'machakann/vim-sandwich', -- edit surrounding characters 'michaeljsmith/vim-indent-object', -- adds indent-level text objects - 'wellle/targets.vim', -- add many other text objects + -- 'wellle/targets.vim', -- add many other text objects 'bkad/CamelCaseMotion', -- invaluable motions for properly operating on various casings { @@ -30,7 +30,7 @@ packer.startup(function() 'olimorris/persisted.nvim', config = function() local should_autoload = #vim.v.argv == 1 - require'persisted'.setup{ + require 'persisted'.setup { autoload = should_autoload, autosave = should_autoload, } @@ -40,7 +40,7 @@ packer.startup(function() -- toggle comments 'terrortylor/nvim-comment', config = function() - require'nvim_comment'.setup() + require 'nvim_comment'.setup() end }, { @@ -57,7 +57,7 @@ packer.startup(function() }, { 'tzachar/cmp-fuzzy-path', - requires = {'hrsh7th/nvim-cmp', 'tzachar/fuzzy.nvim'}, + requires = { 'hrsh7th/nvim-cmp', 'tzachar/fuzzy.nvim' }, }, -- TODO: add keymap ig for toggling these 'lukas-reineke/indent-blankline.nvim', -- indentation guide lines @@ -70,15 +70,38 @@ packer.startup(function() 'hrsh7th/cmp-buffer', -- add buffer information to completion engine 'hrsh7th/cmp-path', -- add filesystem information to complete enging 'hrsh7th/cmp-cmdline', -- add completion for vim commands + 'onsails/lspkind-nvim', 'saadparwaiz1/cmp_luasnip', { -- completion engine 'hrsh7th/nvim-cmp', config = function() - local cmp = require'cmp' - local luasnip = require'luasnip' + local cmp = require 'cmp' + local luasnip = require 'luasnip' - cmp.setup{ + local prev_item = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end + + local next_item = function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end + + cmp.setup { snippet = { expand = function(args) luasnip.lsp_expand(args.body) @@ -88,36 +111,16 @@ packer.startup(function() [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), - [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. - [''] = cmp.mapping{ + [''] = cmp.config.disable, + [''] = cmp.mapping { i = cmp.mapping.abort(), c = cmp.mapping.close(), }, - [''] = cmp.config.disable, - [''] = cmp.config.disable, - [''] = cmp.mapping.confirm{select = true}, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - --[[ [""] = cmp.mapping(function(fallback) - - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - ]]-- + [''] = cmp.mapping.confirm { select = false }, + [""] = cmp.mapping(next_item, { "i", "s" }), + [""] = cmp.mapping(prev_item, { "i", "s" }), + [''] = cmp.mapping(next_item, { "i", "s" }), + [''] = cmp.mapping(prev_item, { "i", "s" }), }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, @@ -128,20 +131,30 @@ packer.startup(function() { name = 'path' }, { name = 'fuzzy_path' }, }), + formatting = { + format = require("lspkind").cmp_format { + with_text = true, + menu = { + nvim_lsp = "[LSP]", + }, + } + }, } cmp.setup.cmdline('/', { + -- mapping = cmp.mapping.preset.cmdline(), sources = { - {name = 'buffer'}, - {name = 'fuzzy_path'}, + { name = 'buffer' }, + { name = 'fuzzy_path' }, } }) cmp.setup.cmdline(':', { + -- mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ - {name = 'path'} + { name = 'path' } }, { - {name = 'cmdline'} + { name = 'cmdline' } }) }) end, @@ -154,8 +167,8 @@ packer.startup(function() 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function() - require'nvim-treesitter.configs'.setup { - ensure_installed = "maintained", + require 'nvim-treesitter.configs'.setup { + ensure_installed = "all", sync_install = false, ignore_install = {}, indent = { @@ -175,5 +188,5 @@ packer.startup(function() }, 'lukas-reineke/lsp-format.nvim', } - for _,plugin in pairs(plugins) do packer.use(plugin) end + for _, plugin in pairs(plugins) do packer.use(plugin) end end) diff --git a/common/tmux/conf b/common/tmux/conf index 1203785..b56729e 100644 --- a/common/tmux/conf +++ b/common/tmux/conf @@ -30,7 +30,7 @@ set -g monitor-activity on set -g visual-bell on set -g bell-action other set -g mode-keys vi -set -g history-limit 102400000 +set -g history-limit 1024000 set -g status on set -g status-position bottom set -g status-bg colour0 From b4e8a6fbcf405ec350a21995d79c9f42fdb2e2b3 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 3 May 2022 12:57:21 -0500 Subject: [PATCH 103/103] Lock --- os/linux/sway/lock | 1 - os/linux/waybar/config | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/os/linux/sway/lock b/os/linux/sway/lock index 6b48c86..ba92cee 100644 --- a/os/linux/sway/lock +++ b/os/linux/sway/lock @@ -4,7 +4,6 @@ font=IosevkaLyte show-failed-attempts ignore-empty-password -indicator-idle-visible indicator-radius=150 indicator-thickness=30 diff --git a/os/linux/waybar/config b/os/linux/waybar/config index a8f1cab..f261646 100644 --- a/os/linux/waybar/config +++ b/os/linux/waybar/config @@ -13,7 +13,7 @@ "memory", // "temperature", "backlight", - "battery", + // "battery", "tray" ], "sway/workspaces": {