Compare commits
2 Commits
main
..
bfcce94ed0
| Author | SHA1 | Date | |
|---|---|---|---|
| bfcce94ed0 | |||
| 181f2adfaa |
+16
-23
@@ -1,10 +1,3 @@
|
||||
if [[ $- == *i* ]]; then # in interactive session
|
||||
# ble.sh
|
||||
# https://github.com/akinomyoga/ble.sh#13-set-up-bashrc
|
||||
BLE="${HOME}/programs/ble.sh/out/ble.sh"
|
||||
[[ -f ${BLE} ]] && source ${BLE} --noattach
|
||||
fi
|
||||
|
||||
# Navigation
|
||||
alias vim="nvim"
|
||||
alias lg="lazygit"
|
||||
@@ -17,6 +10,10 @@ alias dedsstore="find . -name \".DS_Store\" -delete"
|
||||
alias c="clear"
|
||||
alias dps="docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}'"
|
||||
|
||||
# Difftastic Config
|
||||
export DFT_TAB_WIDTH=4
|
||||
export DFT_BACKGROUND=light
|
||||
|
||||
# History
|
||||
HISTSIZE=50000
|
||||
HISTFILESIZE=50000
|
||||
@@ -28,10 +25,6 @@ if [ "$BASH" != "" ]; then
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
if [ -f /usr/share/bash-completion/completions/git ]; then
|
||||
source /usr/share/bash-completion/completions/git
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${OSTYPE}" == "linux-gnu"* ]]; then
|
||||
@@ -71,11 +64,10 @@ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Golang
|
||||
# NOTE: Go is installed with Homebrew and automatically placed on the path
|
||||
export PATH=$PATH:${HOME}/go/bin
|
||||
export PATH=$PATH:/usr/local/go/bin:${HOME}/go/bin
|
||||
|
||||
export TERM="xterm-256color"
|
||||
export EDITOR=$(which nvim)
|
||||
export EDITOR=$(which vim)
|
||||
|
||||
# Adding applications to path
|
||||
if [[ -d ${HOME}/.dotfiles/bin/linux ]]; then
|
||||
@@ -85,13 +77,8 @@ if [[ -d ${HOME}/bin ]]; then
|
||||
export PATH=$PATH:${HOME}/bin
|
||||
fi
|
||||
|
||||
|
||||
# Enable atuin
|
||||
# https://docs.atuin.sh
|
||||
eval "$(atuin init bash)"
|
||||
|
||||
# fzf
|
||||
#eval "$(fzf --bash)"
|
||||
eval "$(fzf --bash)"
|
||||
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#ccd0da,bg:#eff1f5,spinner:#dc8a78,hl:#d20f39 \
|
||||
@@ -124,6 +111,15 @@ _git_top() {
|
||||
fi
|
||||
}
|
||||
|
||||
function up() {
|
||||
num=1
|
||||
if [ $# -gt 0 ]; then
|
||||
num=$1
|
||||
fi
|
||||
|
||||
cd $(printf '../%.0s' $(seq 1 $num))
|
||||
}
|
||||
|
||||
# Add color shortcuts
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
c_reset=`tput sgr0`
|
||||
@@ -178,6 +174,3 @@ elif [ "$BASH" != "" ]; then
|
||||
PS1="\n╔ \w\$(prev_status_prompt)\$(git_prompt) -- \$(date '+%y-%m-%dT%H:%M:%S')\n╚ \h\$ "
|
||||
fi
|
||||
|
||||
# ble.sh
|
||||
# https://github.com/akinomyoga/ble.sh#13-set-up-bashrc
|
||||
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||
@@ -36,50 +36,29 @@
|
||||
sync = "!git fetch -p && git rebase origin/$(git default-branch)"
|
||||
|
||||
[core]
|
||||
editor = /home/linuxbrew/.linuxbrew/bin/nvim
|
||||
editor = vim
|
||||
pager = delta
|
||||
attributesfile = /home/tgrosinger/.gitattributes
|
||||
excludesfile = /home/tgrosinger/.gitignore_global
|
||||
|
||||
[help]
|
||||
autocorrect = prompt
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[push]
|
||||
default = simple
|
||||
autoSetupRemote = true
|
||||
|
||||
[diff]
|
||||
colorMoved = default
|
||||
algorithm = histogram
|
||||
mnemonicPrefix = true
|
||||
renames = true
|
||||
|
||||
[include]
|
||||
path = /home/tgrosinger/.config/delta/themes/catppuccin.gitconfig
|
||||
|
||||
[delta]
|
||||
# Does not behave well for comments
|
||||
#features = catppuccin-latte
|
||||
navigate = true
|
||||
light = true
|
||||
side-by-side = true
|
||||
line-numbers = true
|
||||
#map-styles = bold purple => syntax magenta, bold cyan => syntax blue
|
||||
map-styles = bold purple => syntax magenta, bold cyan => syntax blue
|
||||
|
||||
[branch]
|
||||
autosetuprebase = always
|
||||
sort = -committerdate
|
||||
|
||||
[rebase]
|
||||
autoSquash = true
|
||||
autoStash = true
|
||||
updateRefs = true
|
||||
|
||||
[tag]
|
||||
sort = version:refname
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
@@ -94,12 +73,7 @@
|
||||
insteadOf = https://gitlab.i.extrahop.com/
|
||||
|
||||
[merge]
|
||||
conflictstyle = zdiff3
|
||||
conflictstyle = diff3
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
@@ -0,0 +1,31 @@
|
||||
customCommands:
|
||||
- key: '<c-P>'
|
||||
context: 'global'
|
||||
command: 'git push --force-with-lease'
|
||||
description: 'Force push with lease.'
|
||||
gui:
|
||||
timeFormat: '2006-01-02'
|
||||
mouseEvents: false
|
||||
theme:
|
||||
activeBorderColor:
|
||||
- '#40a02b'
|
||||
- bold
|
||||
inactiveBorderColor:
|
||||
- '#6c6f85'
|
||||
optionsTextColor:
|
||||
- '#1e66f5'
|
||||
selectedLineBgColor:
|
||||
- '#ccd0da'
|
||||
cherryPickedCommitBgColor:
|
||||
- '#bcc0cc'
|
||||
cherryPickedCommitFgColor:
|
||||
- '#40a02b'
|
||||
unstagedChangesColor:
|
||||
- '#d20f39'
|
||||
defaultFgColor:
|
||||
- '#4c4f69'
|
||||
searchingActiveBorderColor:
|
||||
- '#df8e1d'
|
||||
authorColors:
|
||||
'*': '#7287fd'
|
||||
|
||||
@@ -6,7 +6,7 @@ set-option -g history-limit 10000
|
||||
set -s escape-time 0
|
||||
|
||||
### Fix supporting italics
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -g default-terminal "tmux"
|
||||
|
||||
### Use the system clipboard
|
||||
set -g set-clipboard on
|
||||
@@ -14,16 +14,11 @@ set -g set-clipboard on
|
||||
### Reload the config with r
|
||||
bind-key r source-file ~/.tmux.conf\; display-message "Reloaded config"
|
||||
|
||||
### Kill the current session
|
||||
bind-key X confirm-before -p "Kill session #S? (y/n)" kill-session
|
||||
|
||||
### Mouse mode on by default; toggle with prefix + m
|
||||
set -g mouse on
|
||||
### Toggle Mouse Mode
|
||||
bind-key m set-window-option mouse\; display-message "mouse support is now #{?mouse,on,off}"
|
||||
|
||||
### Open LazyGit in a popup
|
||||
bind-key g display-popup -E -d '#{pane_current_path}' -w 90% -h 90% lazygit
|
||||
bind-key G new-window -c '#{pane_current_path}' -n "gh-dash" gh dash
|
||||
|
||||
# New panes and windows have same cwd as the one opening it
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
@@ -44,15 +39,6 @@ bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||
|
||||
# Improved support for Claude Code CLI.
|
||||
set -g allow-passthrough on
|
||||
set -as terminal-features 'xterm-ghostty*:RGB'
|
||||
|
||||
# Extended key reporting (requires tmux 3.5+).
|
||||
# Apply with: tmux kill-server && tmux
|
||||
set -g extended-keys on
|
||||
set -g extended-keys-format csi-u
|
||||
|
||||
# change windows
|
||||
bind -n S-Right next-window
|
||||
bind -n S-Left previous-window
|
||||
@@ -85,16 +71,8 @@ set -g @catppuccin_window_status_enable "no"
|
||||
|
||||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
# set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
|
||||
# Session persistence (resurrect + continuum)
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-save-interval '10'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
@@ -1,8 +1,29 @@
|
||||
# Tony's DotFiles
|
||||
Tony's DotFiles
|
||||
===============
|
||||
|
||||
## Scripts
|
||||
This is a collection of all the files that I want very easily available on any new machine that I sit down at. The install script is designed to be run either from the cloned repository or as a stand-alone script through curl. See the usage details for examples.
|
||||
|
||||
`install-packages.sh` is not really meant to be run automatically, and is instead mostly just documentation of what packages I have installed and how they were added.
|
||||
WARNING
|
||||
-------
|
||||
|
||||
`run-stow.sh` just links the dotfiles from this repo into their correct locations.
|
||||
The install script provided with these dotfiles is destructive and will overwrite files without asking. To ensure that you do not lose anything important please backup your .bashrc, .gitconfig, .gitignore, .inputrc, .tmux.conf, and .vimrc files in your home directory.
|
||||
|
||||
I can not be held responsible if you lose any important data.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
**Method 1**
|
||||
|
||||
The first method requires cloning the repository and running the install script manually.
|
||||
|
||||
git clone ssh://git@git.grosinger.net:22322/tgrosinger/dotfiles.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
./install.sh
|
||||
|
||||
**Method 2**
|
||||
|
||||
The second method does not require cloning the repository however it does require that Git and Curl is installed on the target machine.
|
||||
|
||||
\curl -sSL https://git.grosinger.net/tgrosinger/dotfiles/raw/branch/main/install.sh | bash
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
gitmux_v0.11.4
|
||||
gitmux_v0.10.4
|
||||
Executable
BIN
Binary file not shown.
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
SHARE="tony"
|
||||
MOUNTPOINT="${HOME}/Voyager"
|
||||
HOST="192.168.1.66"
|
||||
CREDENTIALS="${HOME}/.voyager-credentials"
|
||||
|
||||
mkdir -p ${MOUNTPOINT}
|
||||
sudo mount -t cifs -o credentials=${CREDENTIALS},uid=$(id -u),gid=$(id -g) //${HOST}/${SHARE} ${MOUNTPOINT}
|
||||
@@ -1,8 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
podman run --rm -i \
|
||||
-v ${HOME}/Music:/downloads:z \
|
||||
--userns keep-id:uid=1000,gid=1000 \
|
||||
--entrypoint scdl \
|
||||
yt-dlp:latest $@
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
podman run --rm -i \
|
||||
-v ${HOME}/Music:/downloads:z \
|
||||
--userns keep-id:uid=1000,gid=1000 \
|
||||
--entrypoint spotdl \
|
||||
yt-dlp:latest $@
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
1717557458.178399 client started (1726322): version 3.2a, socket /tmp/tmux-1000/default, protocol 8
|
||||
1717557458.178416 on Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024
|
||||
1717557458.178418 using libevent 2.1.12-stable (poll); ncurses 6.3
|
||||
1717557458.178424 flags are 0x10010000
|
||||
1717557458.178426 socket is /tmp/tmux-1000/default
|
||||
1717557458.178432 trying connect
|
||||
1717557458.178472 add peer 0x56182b408210: 6 ((nil))
|
||||
1717557458.178604 sending message 100 to peer 0x56182b408210 (4 bytes)
|
||||
1717557458.178607 sending message 111 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178608 sending message 101 to peer 0x56182b408210 (15 bytes)
|
||||
1717557458.178609 sending message 109 to peer 0x56182b408210 (4 bytes)
|
||||
1717557458.178611 sending message 102 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178612 sending message 108 to peer 0x56182b408210 (37 bytes)
|
||||
1717557458.178613 sending message 112 to peer 0x56182b408210 (58 bytes)
|
||||
1717557458.178615 sending message 112 to peer 0x56182b408210 (5 bytes)
|
||||
1717557458.178616 sending message 112 to peer 0x56182b408210 (5 bytes)
|
||||
1717557458.178617 sending message 112 to peer 0x56182b408210 (6 bytes)
|
||||
1717557458.178619 sending message 112 to peer 0x56182b408210 (6 bytes)
|
||||
1717557458.178620 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178621 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178622 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178624 sending message 112 to peer 0x56182b408210 (14 bytes)
|
||||
1717557458.178625 sending message 112 to peer 0x56182b408210 (19 bytes)
|
||||
1717557458.178626 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178627 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178628 sending message 112 to peer 0x56182b408210 (15 bytes)
|
||||
1717557458.178630 sending message 112 to peer 0x56182b408210 (21 bytes)
|
||||
1717557458.178631 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178632 sending message 112 to peer 0x56182b408210 (7 bytes)
|
||||
1717557458.178634 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178635 sending message 112 to peer 0x56182b408210 (7 bytes)
|
||||
1717557458.178636 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178638 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178639 sending message 112 to peer 0x56182b408210 (21 bytes)
|
||||
1717557458.178640 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178641 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178643 sending message 112 to peer 0x56182b408210 (16 bytes)
|
||||
1717557458.178644 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178645 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178647 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178648 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178649 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178650 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178652 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178653 sending message 112 to peer 0x56182b408210 (7 bytes)
|
||||
1717557458.178654 sending message 112 to peer 0x56182b408210 (7 bytes)
|
||||
1717557458.178655 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178657 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178658 sending message 112 to peer 0x56182b408210 (15 bytes)
|
||||
1717557458.178659 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178660 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178662 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178663 sending message 112 to peer 0x56182b408210 (14 bytes)
|
||||
1717557458.178664 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178666 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178667 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178668 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178670 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178671 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178675 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178677 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178678 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178679 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178680 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178682 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178683 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178684 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178685 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178687 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178688 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178689 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178690 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178692 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178693 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178694 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178695 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178697 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178698 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178699 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178700 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178702 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178703 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178704 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178705 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178707 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178708 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178709 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178710 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178712 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178713 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178714 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178715 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178717 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178718 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178719 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178720 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178722 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178723 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178724 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178725 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178727 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178728 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178729 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178730 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178732 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178733 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178734 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178735 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178737 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178738 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178739 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178740 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178742 sending message 112 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178743 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178744 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178745 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178749 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178750 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178751 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178752 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178754 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178755 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178756 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178757 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178758 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178760 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178761 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178762 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178763 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178765 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178766 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178767 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178768 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178770 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178771 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178772 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178773 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178774 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178776 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178777 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178778 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178779 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178781 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178782 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178783 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178784 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178786 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178787 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178788 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178789 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178790 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178792 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178793 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178794 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178795 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178797 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178798 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178799 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178800 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178802 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178803 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178804 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178805 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178807 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178808 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178809 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178810 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178812 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178813 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178814 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178815 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178817 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178819 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178820 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178822 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178823 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178824 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178825 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178827 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178828 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178829 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178830 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178831 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178832 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178834 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178835 sending message 112 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178836 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178837 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178839 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178840 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178842 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178843 sending message 112 to peer 0x56182b408210 (21 bytes)
|
||||
1717557458.178844 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178845 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178846 sending message 112 to peer 0x56182b408210 (6 bytes)
|
||||
1717557458.178848 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178849 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178850 sending message 112 to peer 0x56182b408210 (24 bytes)
|
||||
1717557458.178851 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178852 sending message 112 to peer 0x56182b408210 (9 bytes)
|
||||
1717557458.178854 sending message 112 to peer 0x56182b408210 (70 bytes)
|
||||
1717557458.178855 sending message 112 to peer 0x56182b408210 (69 bytes)
|
||||
1717557458.178856 sending message 112 to peer 0x56182b408210 (12 bytes)
|
||||
1717557458.178857 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178859 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178860 sending message 112 to peer 0x56182b408210 (24 bytes)
|
||||
1717557458.178861 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178863 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178864 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178865 sending message 112 to peer 0x56182b408210 (10 bytes)
|
||||
1717557458.178866 sending message 112 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178867 sending message 112 to peer 0x56182b408210 (15 bytes)
|
||||
1717557458.178868 sending message 112 to peer 0x56182b408210 (5 bytes)
|
||||
1717557458.178870 sending message 104 to peer 0x56182b408210 (0 bytes)
|
||||
1717557458.178872 sending message 110 to peer 0x56182b408210 (0 bytes)
|
||||
1717557458.178873 sending message 107 to peer 0x56182b408210 (4 bytes)
|
||||
1717557458.178874 sending message 105 to peer 0x56182b408210 (16 bytes)
|
||||
1717557458.178875 sending message 105 to peer 0x56182b408210 (20 bytes)
|
||||
1717557458.178876 sending message 105 to peer 0x56182b408210 (66 bytes)
|
||||
1717557458.178878 sending message 105 to peer 0x56182b408210 (24 bytes)
|
||||
1717557458.178880 sending message 105 to peer 0x56182b408210 (26 bytes)
|
||||
1717557458.178881 sending message 105 to peer 0x56182b408210 (23 bytes)
|
||||
1717557458.178882 sending message 105 to peer 0x56182b408210 (38 bytes)
|
||||
1717557458.178883 sending message 105 to peer 0x56182b408210 (48 bytes)
|
||||
1717557458.178885 sending message 105 to peer 0x56182b408210 (46 bytes)
|
||||
1717557458.178886 sending message 105 to peer 0x56182b408210 (19 bytes)
|
||||
1717557458.178887 sending message 105 to peer 0x56182b408210 (57 bytes)
|
||||
1717557458.178888 sending message 105 to peer 0x56182b408210 (43 bytes)
|
||||
1717557458.178889 sending message 105 to peer 0x56182b408210 (18 bytes)
|
||||
1717557458.178892 sending message 105 to peer 0x56182b408210 (19 bytes)
|
||||
1717557458.178893 sending message 105 to peer 0x56182b408210 (20 bytes)
|
||||
1717557458.178894 sending message 105 to peer 0x56182b408210 (115 bytes)
|
||||
1717557458.178895 sending message 105 to peer 0x56182b408210 (21 bytes)
|
||||
1717557458.178897 sending message 105 to peer 0x56182b408210 (41 bytes)
|
||||
1717557458.178898 sending message 105 to peer 0x56182b408210 (19 bytes)
|
||||
1717557458.178899 sending message 105 to peer 0x56182b408210 (139 bytes)
|
||||
1717557458.178901 sending message 105 to peer 0x56182b408210 (22 bytes)
|
||||
1717557458.178902 sending message 105 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178903 sending message 105 to peer 0x56182b408210 (37 bytes)
|
||||
1717557458.178905 sending message 105 to peer 0x56182b408210 (26 bytes)
|
||||
1717557458.178906 sending message 105 to peer 0x56182b408210 (86 bytes)
|
||||
1717557458.178907 sending message 105 to peer 0x56182b408210 (30 bytes)
|
||||
1717557458.178908 sending message 105 to peer 0x56182b408210 (20 bytes)
|
||||
1717557458.178910 sending message 105 to peer 0x56182b408210 (33 bytes)
|
||||
1717557458.178911 sending message 105 to peer 0x56182b408210 (16 bytes)
|
||||
1717557458.178912 sending message 105 to peer 0x56182b408210 (13 bytes)
|
||||
1717557458.178913 sending message 105 to peer 0x56182b408210 (50 bytes)
|
||||
1717557458.178914 sending message 105 to peer 0x56182b408210 (11 bytes)
|
||||
1717557458.178916 sending message 105 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.178917 sending message 105 to peer 0x56182b408210 (14 bytes)
|
||||
1717557458.178918 sending message 105 to peer 0x56182b408210 (56 bytes)
|
||||
1717557458.178920 sending message 105 to peer 0x56182b408210 (32 bytes)
|
||||
1717557458.178921 sending message 105 to peer 0x56182b408210 (33 bytes)
|
||||
1717557458.178923 sending message 105 to peer 0x56182b408210 (65 bytes)
|
||||
1717557458.178924 sending message 105 to peer 0x56182b408210 (1511 bytes)
|
||||
1717557458.178931 sending message 105 to peer 0x56182b408210 (54 bytes)
|
||||
1717557458.178933 sending message 105 to peer 0x56182b408210 (201 bytes)
|
||||
1717557458.178934 sending message 105 to peer 0x56182b408210 (57 bytes)
|
||||
1717557458.178935 sending message 105 to peer 0x56182b408210 (16 bytes)
|
||||
1717557458.178937 sending message 105 to peer 0x56182b408210 (40 bytes)
|
||||
1717557458.178938 sending message 105 to peer 0x56182b408210 (53 bytes)
|
||||
1717557458.178939 sending message 105 to peer 0x56182b408210 (16 bytes)
|
||||
1717557458.178940 sending message 105 to peer 0x56182b408210 (21 bytes)
|
||||
1717557458.178942 sending message 105 to peer 0x56182b408210 (18 bytes)
|
||||
1717557458.178943 sending message 105 to peer 0x56182b408210 (16 bytes)
|
||||
1717557458.178944 sending message 105 to peer 0x56182b408210 (34 bytes)
|
||||
1717557458.178945 sending message 106 to peer 0x56182b408210 (0 bytes)
|
||||
1717557458.178948 sending message 200 to peer 0x56182b408210 (4 bytes)
|
||||
1717557458.178949 client loop enter
|
||||
1717557458.179345 peer 0x56182b408210 message 303
|
||||
1717557458.179350 open write file 2 -
|
||||
1717557458.179354 sending message 305 to peer 0x56182b408210 (8 bytes)
|
||||
1717557458.179358 write check file 2
|
||||
1717557458.179459 peer 0x56182b408210 message 304
|
||||
1717557458.179463 write 58 to file 2
|
||||
1717557458.179465 peer 0x56182b408210 message 203
|
||||
1717557458.179467 file 2 58 bytes left
|
||||
1717557458.179485 write check file 2
|
||||
1717557458.179489 client loop exit
|
||||
@@ -1,7 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
podman run --rm \
|
||||
-v ${HOME}/Videos/youtube:/downloads:z \
|
||||
--userns keep-id:uid=1000,gid=1000 \
|
||||
yt-dlp:latest -S 'res:1080' $@
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
podman run --rm \
|
||||
-v ${HOME}/Videos/youtube:/downloads:z \
|
||||
--userns keep-id:uid=1000,gid=1000 \
|
||||
yt-dlp:latest --embed-metadata -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -S 'res:1080' $@
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# blerc
|
||||
|
||||
# Cannot use ctrl+enter from inside tmux when using tmux-navigator because
|
||||
# ctrl+enter and ctrl+j are the same key in the terminal. Bind sending
|
||||
# multi-line commands to ctrl+m instead.
|
||||
# https://github.com/microsoft/terminal/issues/6912
|
||||
ble-bind -m vi_imap -f C-m accept-line
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
{
|
||||
"attribution": {
|
||||
"commit": "",
|
||||
"pr": ""
|
||||
},
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(npx tsc:*)",
|
||||
"Bash(pnpm run build:*)",
|
||||
"Bash(pnpm tsc:*)",
|
||||
"Bash(pnpm build:*)",
|
||||
"Bash(pnpm test:*)",
|
||||
"Bash(pnpm install:*)",
|
||||
"Bash(git diff:*)"
|
||||
],
|
||||
"deny": [
|
||||
"Bash(git push *)",
|
||||
"Bash(ssh *)",
|
||||
"Bash(ssh)",
|
||||
"Bash(scp *)"
|
||||
],
|
||||
"defaultMode": "auto"
|
||||
},
|
||||
"hooks": {
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Bash",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "~/.claude/hooks/block-dangerous-git.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash /home/tgrosinger/.claude/statusline-command.sh"
|
||||
},
|
||||
"enabledPlugins": {
|
||||
"pr-review-toolkit@claude-plugins-official": true,
|
||||
"gopls-lsp@claude-plugins-official": true,
|
||||
"frontend-design@claude-plugins-official": true,
|
||||
"code-simplifier@claude-plugins-official": true,
|
||||
"skill-creator@claude-plugins-official": true,
|
||||
"typescript-lsp@claude-plugins-official": true,
|
||||
"claude-md-management@claude-plugins-official": true,
|
||||
"security-guidance@claude-plugins-official": true
|
||||
},
|
||||
"sandbox": {
|
||||
"enabled": true,
|
||||
"autoAllowBashIfSandboxed": true,
|
||||
"allowUnsandboxedCommands": false,
|
||||
"network": {
|
||||
"allowedDomains": [
|
||||
"github.com",
|
||||
"*.github.com",
|
||||
"*.githubusercontent.com",
|
||||
"registry.npmjs.org",
|
||||
"proxy.golang.org",
|
||||
"sum.golang.org",
|
||||
"cache.nixos.org",
|
||||
"nodejs.org",
|
||||
"go.dev",
|
||||
"dl.google.com",
|
||||
"mise.en.dev"
|
||||
]
|
||||
},
|
||||
"filesystem": {
|
||||
"allowWrite": [
|
||||
"~/.local/share/pnpm",
|
||||
"~/.cache/pnpm"
|
||||
],
|
||||
"denyRead": [
|
||||
"~/.ssh",
|
||||
"~/.config/Signal",
|
||||
"~/Documents"
|
||||
]
|
||||
},
|
||||
"excludedCommands": [
|
||||
"git push *",
|
||||
"brew *",
|
||||
"devbox add *",
|
||||
"nix *"
|
||||
]
|
||||
},
|
||||
"spinnerVerbs": {
|
||||
"mode": "replace",
|
||||
"verbs": [
|
||||
"Thinking"
|
||||
]
|
||||
},
|
||||
"effortLevel": "high",
|
||||
"tui": "fullscreen",
|
||||
"voice": {
|
||||
"enabled": false,
|
||||
"mode": "hold"
|
||||
},
|
||||
"prefersReducedMotion": true,
|
||||
"autoMemoryEnabled": true,
|
||||
"autoDreamEnabled": true,
|
||||
"theme": "light",
|
||||
"editorMode": "vim",
|
||||
"agentPushNotifEnabled": true,
|
||||
"skipAutoPermissionPrompt": true
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
---
|
||||
name: brainstorming
|
||||
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
|
||||
source: Modified from https://github.com/obra/superpowers/blob/main/skills/brainstorming/SKILL.md
|
||||
---
|
||||
|
||||
# Brainstorming Ideas Into Designs
|
||||
|
||||
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
||||
|
||||
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
||||
|
||||
<HARD-GATE>
|
||||
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
||||
</HARD-GATE>
|
||||
|
||||
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
||||
|
||||
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
||||
|
||||
## Checklist
|
||||
|
||||
You MUST create a task for each of these items and complete them in order:
|
||||
|
||||
1. **Explore project context** — check files, docs, recent commits
|
||||
3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
||||
4. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
||||
5. **Present design** — in sections scaled to their complexity, get user approval after each section
|
||||
6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
|
||||
7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
|
||||
8. **User reviews written spec** — ask user to review the spec file before proceeding
|
||||
9. **Transition to implementation** — invoke skills such as grill-with-docs or to-prd to create implementation plan
|
||||
|
||||
## Process Flow
|
||||
|
||||
```dot
|
||||
digraph brainstorming {
|
||||
"Explore project context" [shape=box];
|
||||
"Visual questions ahead?" [shape=diamond];
|
||||
"Ask clarifying questions" [shape=box];
|
||||
"Propose 2-3 approaches" [shape=box];
|
||||
"Present design sections" [shape=box];
|
||||
"User approves design?" [shape=diamond];
|
||||
"Write design doc" [shape=box];
|
||||
"Spec self-review\n(fix inline)" [shape=box];
|
||||
"User reviews spec?" [shape=diamond];
|
||||
"Transition to implementation" [shape=doublecircle];
|
||||
|
||||
"Explore project context" -> "Visual questions ahead?";
|
||||
"Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
|
||||
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
||||
"Propose 2-3 approaches" -> "Present design sections";
|
||||
"Present design sections" -> "User approves design?";
|
||||
"User approves design?" -> "Present design sections" [label="no, revise"];
|
||||
"User approves design?" -> "Write design doc" [label="yes"];
|
||||
"Write design doc" -> "Spec self-review\n(fix inline)";
|
||||
"Spec self-review\n(fix inline)" -> "User reviews spec?";
|
||||
"User reviews spec?" -> "Write design doc" [label="changes requested"];
|
||||
"User reviews spec?" -> "Transition to implementation" [label="approved"];
|
||||
}
|
||||
```
|
||||
|
||||
**The terminal state is writing a plan.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skills you invoke after brainstorming are grill-with-docs or to-prd.
|
||||
|
||||
## The Process
|
||||
|
||||
**Understanding the idea:**
|
||||
|
||||
- Check out the current project state first (files, docs, recent commits)
|
||||
- Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
|
||||
- If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
|
||||
- For appropriately-scoped projects, ask questions one at a time to refine the idea
|
||||
- Prefer multiple choice questions when possible, but open-ended is fine too
|
||||
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
||||
- Focus on understanding: purpose, constraints, success criteria
|
||||
|
||||
**Exploring approaches:**
|
||||
|
||||
- Propose 2-3 different approaches with trade-offs
|
||||
- Present options conversationally with your recommendation and reasoning
|
||||
- Lead with your recommended option and explain why
|
||||
|
||||
**Presenting the design:**
|
||||
|
||||
- Once you believe you understand what you're building, present the design
|
||||
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
||||
- Ask after each section whether it looks right so far
|
||||
- Cover: architecture, components, data flow, error handling, testing
|
||||
- Be ready to go back and clarify if something doesn't make sense
|
||||
|
||||
**Design for isolation and clarity:**
|
||||
|
||||
- Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
|
||||
- For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
|
||||
- Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
|
||||
- Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
|
||||
|
||||
**Working in existing codebases:**
|
||||
|
||||
- Explore the current structure before proposing changes. Follow existing patterns.
|
||||
- Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
|
||||
- Don't propose unrelated refactoring. Stay focused on what serves the current goal.
|
||||
|
||||
## After the Design
|
||||
|
||||
**Documentation:**
|
||||
|
||||
- Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
|
||||
- (User preferences for spec location override this default)
|
||||
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
||||
- Commit the design document to git
|
||||
|
||||
**Spec Self-Review:**
|
||||
After writing the spec document, look at it with fresh eyes:
|
||||
|
||||
1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
|
||||
2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
|
||||
3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
|
||||
4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
|
||||
|
||||
Fix any issues inline. No need to re-review — just fix and move on.
|
||||
|
||||
**User Review Gate:**
|
||||
After the spec review loop passes, ask the user to review the written spec before proceeding:
|
||||
|
||||
> "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
|
||||
|
||||
Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
|
||||
|
||||
**Implementation:**
|
||||
|
||||
- Invoke the grill-with-docs skill to create a detailed implementation plan
|
||||
- Do NOT invoke any other skill. grill-with-docs is the next step.
|
||||
|
||||
## Key Principles
|
||||
|
||||
- **One question at a time** - Don't overwhelm with multiple questions
|
||||
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
||||
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
||||
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
||||
- **Incremental validation** - Present design, get approval before moving on
|
||||
- **Be flexible** - Go back and clarify when something doesn't make sense
|
||||
|
||||
@@ -1,644 +0,0 @@
|
||||
---
|
||||
name: json-canvas
|
||||
description: Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
|
||||
source: https://github.com/kepano/obsidian-skills/blob/main/skills/json-canvas/SKILL.md
|
||||
---
|
||||
|
||||
# JSON Canvas Skill
|
||||
|
||||
This skill enables Claude Code to create and edit valid JSON Canvas files (`.canvas`) used in Obsidian and other applications.
|
||||
|
||||
## Overview
|
||||
|
||||
JSON Canvas is an open file format for infinite canvas data. Canvas files use the `.canvas` extension and contain valid JSON following the [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/).
|
||||
|
||||
## File Structure
|
||||
|
||||
A canvas file contains two top-level arrays:
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [],
|
||||
"edges": []
|
||||
}
|
||||
```
|
||||
|
||||
- `nodes` (optional): Array of node objects
|
||||
- `edges` (optional): Array of edge objects connecting nodes
|
||||
|
||||
## Nodes
|
||||
|
||||
Nodes are objects placed on the canvas. There are four node types:
|
||||
- `text` - Text content with Markdown
|
||||
- `file` - Reference to files/attachments
|
||||
- `link` - External URL
|
||||
- `group` - Visual container for other nodes
|
||||
|
||||
### Z-Index Ordering
|
||||
|
||||
Nodes are ordered by z-index in the array:
|
||||
- First node = bottom layer (displayed below others)
|
||||
- Last node = top layer (displayed above others)
|
||||
|
||||
### Generic Node Attributes
|
||||
|
||||
All nodes share these attributes:
|
||||
|
||||
| Attribute | Required | Type | Description |
|
||||
|-----------|----------|------|-------------|
|
||||
| `id` | Yes | string | Unique identifier for the node |
|
||||
| `type` | Yes | string | Node type: `text`, `file`, `link`, or `group` |
|
||||
| `x` | Yes | integer | X position in pixels |
|
||||
| `y` | Yes | integer | Y position in pixels |
|
||||
| `width` | Yes | integer | Width in pixels |
|
||||
| `height` | Yes | integer | Height in pixels |
|
||||
| `color` | No | canvasColor | Node color (see Color section) |
|
||||
|
||||
### Text Nodes
|
||||
|
||||
Text nodes contain Markdown content.
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "6f0ad84f44ce9c17",
|
||||
"type": "text",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 400,
|
||||
"height": 200,
|
||||
"text": "# Hello World\n\nThis is **Markdown** content."
|
||||
}
|
||||
```
|
||||
|
||||
| Attribute | Required | Type | Description |
|
||||
|-----------|----------|------|-------------|
|
||||
| `text` | Yes | string | Plain text with Markdown syntax |
|
||||
|
||||
### File Nodes
|
||||
|
||||
File nodes reference files or attachments (images, videos, PDFs, notes, etc.).
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "a1b2c3d4e5f67890",
|
||||
"type": "file",
|
||||
"x": 500,
|
||||
"y": 0,
|
||||
"width": 400,
|
||||
"height": 300,
|
||||
"file": "Attachments/diagram.png"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "b2c3d4e5f6789012",
|
||||
"type": "file",
|
||||
"x": 500,
|
||||
"y": 400,
|
||||
"width": 400,
|
||||
"height": 300,
|
||||
"file": "Notes/Project Overview.md",
|
||||
"subpath": "#Implementation"
|
||||
}
|
||||
```
|
||||
|
||||
| Attribute | Required | Type | Description |
|
||||
|-----------|----------|------|-------------|
|
||||
| `file` | Yes | string | Path to file within the system |
|
||||
| `subpath` | No | string | Link to heading or block (starts with `#`) |
|
||||
|
||||
### Link Nodes
|
||||
|
||||
Link nodes display external URLs.
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "c3d4e5f678901234",
|
||||
"type": "link",
|
||||
"x": 1000,
|
||||
"y": 0,
|
||||
"width": 400,
|
||||
"height": 200,
|
||||
"url": "https://obsidian.md"
|
||||
}
|
||||
```
|
||||
|
||||
| Attribute | Required | Type | Description |
|
||||
|-----------|----------|------|-------------|
|
||||
| `url` | Yes | string | External URL |
|
||||
|
||||
### Group Nodes
|
||||
|
||||
Group nodes are visual containers for organizing other nodes.
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "d4e5f6789012345a",
|
||||
"type": "group",
|
||||
"x": -50,
|
||||
"y": -50,
|
||||
"width": 1000,
|
||||
"height": 600,
|
||||
"label": "Project Overview",
|
||||
"color": "4"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "e5f67890123456ab",
|
||||
"type": "group",
|
||||
"x": 0,
|
||||
"y": 700,
|
||||
"width": 800,
|
||||
"height": 500,
|
||||
"label": "Resources",
|
||||
"background": "Attachments/background.png",
|
||||
"backgroundStyle": "cover"
|
||||
}
|
||||
```
|
||||
|
||||
| Attribute | Required | Type | Description |
|
||||
|-----------|----------|------|-------------|
|
||||
| `label` | No | string | Text label for the group |
|
||||
| `background` | No | string | Path to background image |
|
||||
| `backgroundStyle` | No | string | Background rendering style |
|
||||
|
||||
#### Background Styles
|
||||
|
||||
| Value | Description |
|
||||
|-------|-------------|
|
||||
| `cover` | Fills entire width and height of node |
|
||||
| `ratio` | Maintains aspect ratio of background image |
|
||||
| `repeat` | Repeats image as pattern in both directions |
|
||||
|
||||
## Edges
|
||||
|
||||
Edges are lines connecting nodes.
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "f67890123456789a",
|
||||
"fromNode": "6f0ad84f44ce9c17",
|
||||
"toNode": "a1b2c3d4e5f67890"
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "0123456789abcdef",
|
||||
"fromNode": "6f0ad84f44ce9c17",
|
||||
"fromSide": "right",
|
||||
"fromEnd": "none",
|
||||
"toNode": "b2c3d4e5f6789012",
|
||||
"toSide": "left",
|
||||
"toEnd": "arrow",
|
||||
"color": "1",
|
||||
"label": "leads to"
|
||||
}
|
||||
```
|
||||
|
||||
| Attribute | Required | Type | Default | Description |
|
||||
|-----------|----------|------|---------|-------------|
|
||||
| `id` | Yes | string | - | Unique identifier for the edge |
|
||||
| `fromNode` | Yes | string | - | Node ID where connection starts |
|
||||
| `fromSide` | No | string | - | Side where edge starts |
|
||||
| `fromEnd` | No | string | `none` | Shape at edge start |
|
||||
| `toNode` | Yes | string | - | Node ID where connection ends |
|
||||
| `toSide` | No | string | - | Side where edge ends |
|
||||
| `toEnd` | No | string | `arrow` | Shape at edge end |
|
||||
| `color` | No | canvasColor | - | Line color |
|
||||
| `label` | No | string | - | Text label for the edge |
|
||||
|
||||
### Side Values
|
||||
|
||||
| Value | Description |
|
||||
|-------|-------------|
|
||||
| `top` | Top edge of node |
|
||||
| `right` | Right edge of node |
|
||||
| `bottom` | Bottom edge of node |
|
||||
| `left` | Left edge of node |
|
||||
|
||||
### End Shapes
|
||||
|
||||
| Value | Description |
|
||||
|-------|-------------|
|
||||
| `none` | No endpoint shape |
|
||||
| `arrow` | Arrow endpoint |
|
||||
|
||||
## Colors
|
||||
|
||||
The `canvasColor` type can be specified in two ways:
|
||||
|
||||
### Hex Colors
|
||||
|
||||
```json
|
||||
{
|
||||
"color": "#FF0000"
|
||||
}
|
||||
```
|
||||
|
||||
### Preset Colors
|
||||
|
||||
```json
|
||||
{
|
||||
"color": "1"
|
||||
}
|
||||
```
|
||||
|
||||
| Preset | Color |
|
||||
|--------|-------|
|
||||
| `"1"` | Red |
|
||||
| `"2"` | Orange |
|
||||
| `"3"` | Yellow |
|
||||
| `"4"` | Green |
|
||||
| `"5"` | Cyan |
|
||||
| `"6"` | Purple |
|
||||
|
||||
Note: Specific color values for presets are intentionally undefined, allowing applications to use their own brand colors.
|
||||
|
||||
## Complete Examples
|
||||
|
||||
### Simple Canvas with Text and Connections
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "8a9b0c1d2e3f4a5b",
|
||||
"type": "text",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 300,
|
||||
"height": 150,
|
||||
"text": "# Main Idea\n\nThis is the central concept."
|
||||
},
|
||||
{
|
||||
"id": "1a2b3c4d5e6f7a8b",
|
||||
"type": "text",
|
||||
"x": 400,
|
||||
"y": -100,
|
||||
"width": 250,
|
||||
"height": 100,
|
||||
"text": "## Supporting Point A\n\nDetails here."
|
||||
},
|
||||
{
|
||||
"id": "2b3c4d5e6f7a8b9c",
|
||||
"type": "text",
|
||||
"x": 400,
|
||||
"y": 100,
|
||||
"width": 250,
|
||||
"height": 100,
|
||||
"text": "## Supporting Point B\n\nMore details."
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "3c4d5e6f7a8b9c0d",
|
||||
"fromNode": "8a9b0c1d2e3f4a5b",
|
||||
"fromSide": "right",
|
||||
"toNode": "1a2b3c4d5e6f7a8b",
|
||||
"toSide": "left"
|
||||
},
|
||||
{
|
||||
"id": "4d5e6f7a8b9c0d1e",
|
||||
"fromNode": "8a9b0c1d2e3f4a5b",
|
||||
"fromSide": "right",
|
||||
"toNode": "2b3c4d5e6f7a8b9c",
|
||||
"toSide": "left"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Project Board with Groups
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "5e6f7a8b9c0d1e2f",
|
||||
"type": "group",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 300,
|
||||
"height": 500,
|
||||
"label": "To Do",
|
||||
"color": "1"
|
||||
},
|
||||
{
|
||||
"id": "6f7a8b9c0d1e2f3a",
|
||||
"type": "group",
|
||||
"x": 350,
|
||||
"y": 0,
|
||||
"width": 300,
|
||||
"height": 500,
|
||||
"label": "In Progress",
|
||||
"color": "3"
|
||||
},
|
||||
{
|
||||
"id": "7a8b9c0d1e2f3a4b",
|
||||
"type": "group",
|
||||
"x": 700,
|
||||
"y": 0,
|
||||
"width": 300,
|
||||
"height": 500,
|
||||
"label": "Done",
|
||||
"color": "4"
|
||||
},
|
||||
{
|
||||
"id": "8b9c0d1e2f3a4b5c",
|
||||
"type": "text",
|
||||
"x": 20,
|
||||
"y": 50,
|
||||
"width": 260,
|
||||
"height": 80,
|
||||
"text": "## Task 1\n\nImplement feature X"
|
||||
},
|
||||
{
|
||||
"id": "9c0d1e2f3a4b5c6d",
|
||||
"type": "text",
|
||||
"x": 370,
|
||||
"y": 50,
|
||||
"width": 260,
|
||||
"height": 80,
|
||||
"text": "## Task 2\n\nReview PR #123",
|
||||
"color": "2"
|
||||
},
|
||||
{
|
||||
"id": "0d1e2f3a4b5c6d7e",
|
||||
"type": "text",
|
||||
"x": 720,
|
||||
"y": 50,
|
||||
"width": 260,
|
||||
"height": 80,
|
||||
"text": "## Task 3\n\n~~Setup CI/CD~~"
|
||||
}
|
||||
],
|
||||
"edges": []
|
||||
}
|
||||
```
|
||||
|
||||
### Research Canvas with Files and Links
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "1e2f3a4b5c6d7e8f",
|
||||
"type": "text",
|
||||
"x": 300,
|
||||
"y": 200,
|
||||
"width": 400,
|
||||
"height": 200,
|
||||
"text": "# Research Topic\n\n## Key Questions\n\n- How does X affect Y?\n- What are the implications?",
|
||||
"color": "5"
|
||||
},
|
||||
{
|
||||
"id": "2f3a4b5c6d7e8f9a",
|
||||
"type": "file",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 250,
|
||||
"height": 150,
|
||||
"file": "Literature/Paper A.pdf"
|
||||
},
|
||||
{
|
||||
"id": "3a4b5c6d7e8f9a0b",
|
||||
"type": "file",
|
||||
"x": 0,
|
||||
"y": 200,
|
||||
"width": 250,
|
||||
"height": 150,
|
||||
"file": "Notes/Meeting Notes.md",
|
||||
"subpath": "#Key Insights"
|
||||
},
|
||||
{
|
||||
"id": "4b5c6d7e8f9a0b1c",
|
||||
"type": "link",
|
||||
"x": 0,
|
||||
"y": 400,
|
||||
"width": 250,
|
||||
"height": 100,
|
||||
"url": "https://example.com/research"
|
||||
},
|
||||
{
|
||||
"id": "5c6d7e8f9a0b1c2d",
|
||||
"type": "file",
|
||||
"x": 750,
|
||||
"y": 150,
|
||||
"width": 300,
|
||||
"height": 250,
|
||||
"file": "Attachments/diagram.png"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "6d7e8f9a0b1c2d3e",
|
||||
"fromNode": "2f3a4b5c6d7e8f9a",
|
||||
"fromSide": "right",
|
||||
"toNode": "1e2f3a4b5c6d7e8f",
|
||||
"toSide": "left",
|
||||
"label": "supports"
|
||||
},
|
||||
{
|
||||
"id": "7e8f9a0b1c2d3e4f",
|
||||
"fromNode": "3a4b5c6d7e8f9a0b",
|
||||
"fromSide": "right",
|
||||
"toNode": "1e2f3a4b5c6d7e8f",
|
||||
"toSide": "left",
|
||||
"label": "informs"
|
||||
},
|
||||
{
|
||||
"id": "8f9a0b1c2d3e4f5a",
|
||||
"fromNode": "4b5c6d7e8f9a0b1c",
|
||||
"fromSide": "right",
|
||||
"toNode": "1e2f3a4b5c6d7e8f",
|
||||
"toSide": "left",
|
||||
"toEnd": "arrow",
|
||||
"color": "6"
|
||||
},
|
||||
{
|
||||
"id": "9a0b1c2d3e4f5a6b",
|
||||
"fromNode": "1e2f3a4b5c6d7e8f",
|
||||
"fromSide": "right",
|
||||
"toNode": "5c6d7e8f9a0b1c2d",
|
||||
"toSide": "left",
|
||||
"label": "visualized by"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Flowchart
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a0b1c2d3e4f5a6b7",
|
||||
"type": "text",
|
||||
"x": 200,
|
||||
"y": 0,
|
||||
"width": 150,
|
||||
"height": 60,
|
||||
"text": "**Start**",
|
||||
"color": "4"
|
||||
},
|
||||
{
|
||||
"id": "b1c2d3e4f5a6b7c8",
|
||||
"type": "text",
|
||||
"x": 200,
|
||||
"y": 100,
|
||||
"width": 150,
|
||||
"height": 60,
|
||||
"text": "Step 1:\nGather data"
|
||||
},
|
||||
{
|
||||
"id": "c2d3e4f5a6b7c8d9",
|
||||
"type": "text",
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
"width": 150,
|
||||
"height": 80,
|
||||
"text": "**Decision**\n\nIs data valid?",
|
||||
"color": "3"
|
||||
},
|
||||
{
|
||||
"id": "d3e4f5a6b7c8d9e0",
|
||||
"type": "text",
|
||||
"x": 400,
|
||||
"y": 200,
|
||||
"width": 150,
|
||||
"height": 60,
|
||||
"text": "Process data"
|
||||
},
|
||||
{
|
||||
"id": "e4f5a6b7c8d9e0f1",
|
||||
"type": "text",
|
||||
"x": 0,
|
||||
"y": 200,
|
||||
"width": 150,
|
||||
"height": 60,
|
||||
"text": "Request new data",
|
||||
"color": "1"
|
||||
},
|
||||
{
|
||||
"id": "f5a6b7c8d9e0f1a2",
|
||||
"type": "text",
|
||||
"x": 400,
|
||||
"y": 320,
|
||||
"width": 150,
|
||||
"height": 60,
|
||||
"text": "**End**",
|
||||
"color": "4"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "a6b7c8d9e0f1a2b3",
|
||||
"fromNode": "a0b1c2d3e4f5a6b7",
|
||||
"fromSide": "bottom",
|
||||
"toNode": "b1c2d3e4f5a6b7c8",
|
||||
"toSide": "top"
|
||||
},
|
||||
{
|
||||
"id": "b7c8d9e0f1a2b3c4",
|
||||
"fromNode": "b1c2d3e4f5a6b7c8",
|
||||
"fromSide": "bottom",
|
||||
"toNode": "c2d3e4f5a6b7c8d9",
|
||||
"toSide": "top"
|
||||
},
|
||||
{
|
||||
"id": "c8d9e0f1a2b3c4d5",
|
||||
"fromNode": "c2d3e4f5a6b7c8d9",
|
||||
"fromSide": "right",
|
||||
"toNode": "d3e4f5a6b7c8d9e0",
|
||||
"toSide": "left",
|
||||
"label": "Yes",
|
||||
"color": "4"
|
||||
},
|
||||
{
|
||||
"id": "d9e0f1a2b3c4d5e6",
|
||||
"fromNode": "c2d3e4f5a6b7c8d9",
|
||||
"fromSide": "left",
|
||||
"toNode": "e4f5a6b7c8d9e0f1",
|
||||
"toSide": "right",
|
||||
"label": "No",
|
||||
"color": "1"
|
||||
},
|
||||
{
|
||||
"id": "e0f1a2b3c4d5e6f7",
|
||||
"fromNode": "e4f5a6b7c8d9e0f1",
|
||||
"fromSide": "top",
|
||||
"fromEnd": "none",
|
||||
"toNode": "b1c2d3e4f5a6b7c8",
|
||||
"toSide": "left",
|
||||
"toEnd": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "f1a2b3c4d5e6f7a8",
|
||||
"fromNode": "d3e4f5a6b7c8d9e0",
|
||||
"fromSide": "bottom",
|
||||
"toNode": "f5a6b7c8d9e0f1a2",
|
||||
"toSide": "top"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## ID Generation
|
||||
|
||||
Node and edge IDs must be unique strings. Obsidian generates 16-character hexadecimal IDs:
|
||||
|
||||
```json
|
||||
"id": "6f0ad84f44ce9c17"
|
||||
"id": "a3b2c1d0e9f8g7h6"
|
||||
"id": "1234567890abcdef"
|
||||
```
|
||||
|
||||
This format is a 16-character lowercase hex string (64-bit random value).
|
||||
|
||||
## Layout Guidelines
|
||||
|
||||
### Positioning
|
||||
|
||||
- Coordinates can be negative (canvas extends infinitely)
|
||||
- `x` increases to the right
|
||||
- `y` increases downward
|
||||
- Position refers to top-left corner of node
|
||||
|
||||
### Recommended Sizes
|
||||
|
||||
| Node Type | Suggested Width | Suggested Height |
|
||||
|-----------|-----------------|------------------|
|
||||
| Small text | 200-300 | 80-150 |
|
||||
| Medium text | 300-450 | 150-300 |
|
||||
| Large text | 400-600 | 300-500 |
|
||||
| File preview | 300-500 | 200-400 |
|
||||
| Link preview | 250-400 | 100-200 |
|
||||
| Group | Varies | Varies |
|
||||
|
||||
### Spacing
|
||||
|
||||
- Leave 20-50px padding inside groups
|
||||
- Space nodes 50-100px apart for readability
|
||||
- Align nodes to grid (multiples of 10 or 20) for cleaner layouts
|
||||
|
||||
## Validation Rules
|
||||
|
||||
1. All `id` values must be unique across nodes and edges
|
||||
2. `fromNode` and `toNode` must reference existing node IDs
|
||||
3. Required fields must be present for each node type
|
||||
4. `type` must be one of: `text`, `file`, `link`, `group`
|
||||
5. `backgroundStyle` must be one of: `cover`, `ratio`, `repeat`
|
||||
6. `fromSide`, `toSide` must be one of: `top`, `right`, `bottom`, `left`
|
||||
7. `fromEnd`, `toEnd` must be one of: `none`, `arrow`
|
||||
8. Color presets must be `"1"` through `"6"` or valid hex color
|
||||
|
||||
## References
|
||||
|
||||
- [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/)
|
||||
- [JSON Canvas GitHub](https://github.com/obsidianmd/jsoncanvas)
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
---
|
||||
name: magpie-review
|
||||
description: Run a multi-AI adversarial code review using the `magpie` CLI. Multiple AI models independently review the changes, debate findings, and a verifier audits each issue against the actual code. Use whenever the user asks for a "magpie review", a "multi-AI review", an "adversarial review", a "second opinion review", or wants magpie to look at local uncommitted changes, the current branch, or a GitHub PR. Also use when the user wants to `magpie discuss` a topic or do a whole-repo review.
|
||||
---
|
||||
|
||||
# magpie-review
|
||||
|
||||
Wraps the `magpie` CLI to run adversarial multi-AI code reviews. Magpie spawns several reviewer models (Claude Code, Codex, Gemini, etc.) that independently review a change, debate across rounds, then a verifier audits each reported issue against the actual code.
|
||||
|
||||
## When to pick which mode
|
||||
|
||||
Magpie supports three review targets — pick based on what the user is reviewing:
|
||||
|
||||
| User's intent | Command |
|
||||
|---|---|
|
||||
| Review work I haven't committed yet (staged + unstaged) | `magpie review --local` |
|
||||
| Review the commits on my current branch vs a base | `magpie review --branch [base]` (base defaults to `main`) |
|
||||
| Review a GitHub PR | `magpie review <pr-number>` or `magpie review <pr-url>` |
|
||||
| Review specific files only | `magpie review --files <path> [path...]` |
|
||||
| Review the entire repository | `magpie review --repo` |
|
||||
| Discuss a topic / design question | `magpie discuss "<topic>"` or `magpie discuss <path-to-file.md>` |
|
||||
|
||||
If the user is ambiguous (e.g. "review my changes"), check `git status` and `git log @{u}..HEAD` to figure out whether they mean uncommitted, committed-but-unpushed, or already-pushed work — then pick the matching mode rather than guessing.
|
||||
|
||||
## Running a review
|
||||
|
||||
Always run `magpie` from inside the target repo's working tree. For PR mode it uses the `origin` remote to find the repo by default.
|
||||
|
||||
### Common flags
|
||||
|
||||
These apply to both `review` and `discuss` unless noted:
|
||||
|
||||
- `-i, --interactive` — Pause between turns for Q&A. Use when the user wants to drive the review themselves.
|
||||
- `-a, --all` — Use every configured reviewer without an interactive picker. Good for non-interactive/batch runs.
|
||||
- `--reviewers <ids>` — Comma-separated reviewer IDs (e.g. `claude-code,gemini-cli`) when you want a specific subset.
|
||||
- `-r, --rounds <n>` — Cap the debate rounds (default 5).
|
||||
- `--no-converge` — Disable early-stop on consensus. Use when you want the full debate even if reviewers agree quickly.
|
||||
- `-o, --output <file>` and `-f, --format <markdown|json>` — Save results to a file.
|
||||
- `--fail-fast` — Abort the whole flow if any reviewer fails. Default is resilient (continues with surviving reviewers). Use fail-fast when debugging provider/auth issues or when the user wants a guarantee every reviewer participated.
|
||||
- `--plan-only` — Generate the review plan without running reviewers. Useful for a quick preview of what magpie *would* do.
|
||||
|
||||
### `review`-only flags worth knowing
|
||||
|
||||
- `--skip-context` — Skip the context-gathering phase (call chains, related PRs). Faster, less informed.
|
||||
- `--no-post` — Skip the post-debate GitHub comment-posting flow. Use in non-interactive contexts where you just want the review output, not the interactive post-each-issue loop.
|
||||
- `--no-conclusion` — Skip the final summarizer. Useful for bot/CI use.
|
||||
- `--git-remote <remote>` — Override the remote used for PR-URL detection (default `origin`).
|
||||
- `--reanalyze` — Bypass the analyzer cache and re-analyze from scratch.
|
||||
|
||||
### Repo-mode flags (with `--repo`)
|
||||
|
||||
- `--path <subdir>` — Limit the repo review to a subdirectory.
|
||||
- `--ignore <patterns...>` — Skip matching paths.
|
||||
- `--quick` — Architecture overview only.
|
||||
- `--deep` — Full analysis, no prompts.
|
||||
- `--list-sessions` / `--session <id>` / `--export <file>` — Manage long-running repo review sessions (they persist so you can pause and resume).
|
||||
|
||||
## Interactive vs non-interactive
|
||||
|
||||
Magpie's default flow includes interactive prompts (reviewer selection, per-issue post/edit/skip after the debate). When you (Claude) are invoking magpie programmatically on the user's behalf:
|
||||
|
||||
- Prefer `-a` (or `--reviewers`) to skip the reviewer-selection prompt.
|
||||
- Prefer `--no-post` to skip the per-issue posting loop — the user can still read the review output.
|
||||
- If you want a clean machine-readable result, add `-f json -o <file>`.
|
||||
|
||||
When the user wants to drive the review themselves, hand the command back to them to run (e.g. via `! magpie review ...`) so they get the interactive UX rather than running it through a tool call.
|
||||
|
||||
## Running it as a long task (it takes minutes)
|
||||
|
||||
A full review runs several models across multiple debate rounds, so it takes minutes. Run it as a background `Bash` task with `run_in_background: true` and save the output (`-f markdown -o <file>`). The background task auto-notifies you when it completes — that completion notification is all you need; read the saved output file then.
|
||||
|
||||
- **Do not add a separate `Monitor` on the same output file.** The background task already notifies on completion, so a monitor watching the same file is redundant. Only add a `Monitor` if you genuinely need streamed interim progress, and even then it is usually unnecessary for a fire-and-forget review.
|
||||
- **Never copy the output path by hand.** Pass the same explicit `-o <file>` path you chose (e.g. `/tmp/magpie-review.md`) to your follow-up `Read` — don't transcribe the long auto-generated task-output path from the completion notification, which is easy to typo.
|
||||
- **Don't suppress stderr** (`2>/dev/null`) on magpie or on any watcher command. If something fails — bad path, auth error, missing reviewer — you want to see why, not a bare non-zero exit. Use `2>&1 | tee <log>` if you want both a saved log and visible errors.
|
||||
|
||||
## Examples
|
||||
|
||||
**User: "Have magpie look at what I'm working on right now."**
|
||||
They likely mean uncommitted work. Run:
|
||||
```
|
||||
magpie review --local
|
||||
```
|
||||
|
||||
**User: "Get a magpie review on this branch before I push."**
|
||||
Current branch vs main:
|
||||
```
|
||||
magpie review --branch
|
||||
```
|
||||
|
||||
**User: "Run magpie on PR 4521."**
|
||||
```
|
||||
magpie review 4521
|
||||
```
|
||||
|
||||
**User: "Use magpie to review just the changes to `src/auth/`."**
|
||||
Pick the files mode:
|
||||
```
|
||||
magpie review --files src/auth/login.ts src/auth/session.ts
|
||||
```
|
||||
|
||||
**User: "Get a fast magpie sanity check on PR 4521 — I just want the output, don't post anything."**
|
||||
```
|
||||
magpie review 4521 -a --no-post --skip-context
|
||||
```
|
||||
|
||||
**User: "Have magpie debate whether we should adopt tRPC."**
|
||||
```
|
||||
magpie discuss "Should we adopt tRPC for our internal APIs?"
|
||||
```
|
||||
|
||||
## Configuration notes
|
||||
|
||||
- Magpie reads `~/.magpie/config.yaml` for providers, reviewers, analyzer, summarizer, and the context-gatherer config.
|
||||
- CLI providers (`claude-code`, `codex-cli`, `gemini-cli`, `qwen-code`, `opencode-cli`) use the user's existing subscriptions/logins — no API keys needed and they're the recommended choice.
|
||||
- If the user hasn't run `magpie init` yet, suggest `magpie init` (interactive) or `magpie init -y` (defaults) before the first review.
|
||||
- If `magpie` is not on PATH, the project at `/home/tgrosinger/code/magpie` may need `npm install && npm run build && npm link` from its root.
|
||||
|
||||
## When *not* to use this skill
|
||||
|
||||
- The user is asking how magpie itself is implemented or wants to modify magpie's source — that's a normal code task in the magpie repo, not an invocation of this skill.
|
||||
- The user wants a single-model review (just Claude reviewing the diff). Use the built-in `/code-review` skill instead.
|
||||
@@ -1,620 +0,0 @@
|
||||
---
|
||||
name: obsidian-bases
|
||||
description: Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
|
||||
source: https://github.com/kepano/obsidian-skills/blob/main/skills/obsidian-bases/SKILL.md
|
||||
---
|
||||
|
||||
# Obsidian Bases Skill
|
||||
|
||||
This skill enables Claude Code to create and edit valid Obsidian Bases (`.base` files) including views, filters, formulas, and all related configurations.
|
||||
|
||||
## Overview
|
||||
|
||||
Obsidian Bases are YAML-based files that define dynamic views of notes in an Obsidian vault. A Base file can contain multiple views, global filters, formulas, property configurations, and custom summaries.
|
||||
|
||||
## File Format
|
||||
|
||||
Base files use the `.base` extension and contain valid YAML. They can also be embedded in Markdown code blocks.
|
||||
|
||||
## Complete Schema
|
||||
|
||||
```yaml
|
||||
# Global filters apply to ALL views in the base
|
||||
filters:
|
||||
# Can be a single filter string
|
||||
# OR a recursive filter object with and/or/not
|
||||
and: []
|
||||
or: []
|
||||
not: []
|
||||
|
||||
# Define formula properties that can be used across all views
|
||||
formulas:
|
||||
formula_name: 'expression'
|
||||
|
||||
# Configure display names and settings for properties
|
||||
properties:
|
||||
property_name:
|
||||
displayName: "Display Name"
|
||||
formula.formula_name:
|
||||
displayName: "Formula Display Name"
|
||||
file.ext:
|
||||
displayName: "Extension"
|
||||
|
||||
# Define custom summary formulas
|
||||
summaries:
|
||||
custom_summary_name: 'values.mean().round(3)'
|
||||
|
||||
# Define one or more views
|
||||
views:
|
||||
- type: table | cards | list | map
|
||||
name: "View Name"
|
||||
limit: 10 # Optional: limit results
|
||||
groupBy: # Optional: group results
|
||||
property: property_name
|
||||
direction: ASC | DESC
|
||||
filters: # View-specific filters
|
||||
and: []
|
||||
order: # Properties to display in order
|
||||
- file.name
|
||||
- property_name
|
||||
- formula.formula_name
|
||||
summaries: # Map properties to summary formulas
|
||||
property_name: Average
|
||||
```
|
||||
|
||||
## Filter Syntax
|
||||
|
||||
Filters narrow down results. They can be applied globally or per-view.
|
||||
|
||||
### Filter Structure
|
||||
|
||||
```yaml
|
||||
# Single filter
|
||||
filters: 'status == "done"'
|
||||
|
||||
# AND - all conditions must be true
|
||||
filters:
|
||||
and:
|
||||
- 'status == "done"'
|
||||
- 'priority > 3'
|
||||
|
||||
# OR - any condition can be true
|
||||
filters:
|
||||
or:
|
||||
- 'file.hasTag("book")'
|
||||
- 'file.hasTag("article")'
|
||||
|
||||
# NOT - exclude matching items
|
||||
filters:
|
||||
not:
|
||||
- 'file.hasTag("archived")'
|
||||
|
||||
# Nested filters
|
||||
filters:
|
||||
or:
|
||||
- file.hasTag("tag")
|
||||
- and:
|
||||
- file.hasTag("book")
|
||||
- file.hasLink("Textbook")
|
||||
- not:
|
||||
- file.hasTag("book")
|
||||
- file.inFolder("Required Reading")
|
||||
```
|
||||
|
||||
### Filter Operators
|
||||
|
||||
| Operator | Description |
|
||||
|----------|-------------|
|
||||
| `==` | equals |
|
||||
| `!=` | not equal |
|
||||
| `>` | greater than |
|
||||
| `<` | less than |
|
||||
| `>=` | greater than or equal |
|
||||
| `<=` | less than or equal |
|
||||
| `&&` | logical and |
|
||||
| `\|\|` | logical or |
|
||||
| <code>!</code> | logical not |
|
||||
|
||||
## Properties
|
||||
|
||||
### Three Types of Properties
|
||||
|
||||
1. **Note properties** - From frontmatter: `note.author` or just `author`
|
||||
2. **File properties** - File metadata: `file.name`, `file.mtime`, etc.
|
||||
3. **Formula properties** - Computed values: `formula.my_formula`
|
||||
|
||||
### File Properties Reference
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `file.name` | String | File name |
|
||||
| `file.basename` | String | File name without extension |
|
||||
| `file.path` | String | Full path to file |
|
||||
| `file.folder` | String | Parent folder path |
|
||||
| `file.ext` | String | File extension |
|
||||
| `file.size` | Number | File size in bytes |
|
||||
| `file.ctime` | Date | Created time |
|
||||
| `file.mtime` | Date | Modified time |
|
||||
| `file.tags` | List | All tags in file |
|
||||
| `file.links` | List | Internal links in file |
|
||||
| `file.backlinks` | List | Files linking to this file |
|
||||
| `file.embeds` | List | Embeds in the note |
|
||||
| `file.properties` | Object | All frontmatter properties |
|
||||
|
||||
### The `this` Keyword
|
||||
|
||||
- In main content area: refers to the base file itself
|
||||
- When embedded: refers to the embedding file
|
||||
- In sidebar: refers to the active file in main content
|
||||
|
||||
## Formula Syntax
|
||||
|
||||
Formulas compute values from properties. Defined in the `formulas` section.
|
||||
|
||||
```yaml
|
||||
formulas:
|
||||
# Simple arithmetic
|
||||
total: "price * quantity"
|
||||
|
||||
# Conditional logic
|
||||
status_icon: 'if(done, "✅", "⏳")'
|
||||
|
||||
# String formatting
|
||||
formatted_price: 'if(price, price.toFixed(2) + " dollars")'
|
||||
|
||||
# Date formatting
|
||||
created: 'file.ctime.format("YYYY-MM-DD")'
|
||||
|
||||
# Complex expressions
|
||||
days_old: '((now() - file.ctime) / 86400000).round(0)'
|
||||
```
|
||||
|
||||
## Functions Reference
|
||||
|
||||
### Global Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `date()` | `date(string): date` | Parse string to date. Format: `YYYY-MM-DD HH:mm:ss` |
|
||||
| `duration()` | `duration(string): duration` | Parse duration string |
|
||||
| `now()` | `now(): date` | Current date and time |
|
||||
| `today()` | `today(): date` | Current date (time = 00:00:00) |
|
||||
| `if()` | `if(condition, trueResult, falseResult?)` | Conditional |
|
||||
| `min()` | `min(n1, n2, ...): number` | Smallest number |
|
||||
| `max()` | `max(n1, n2, ...): number` | Largest number |
|
||||
| `number()` | `number(any): number` | Convert to number |
|
||||
| `link()` | `link(path, display?): Link` | Create a link |
|
||||
| `list()` | `list(element): List` | Wrap in list if not already |
|
||||
| `file()` | `file(path): file` | Get file object |
|
||||
| `image()` | `image(path): image` | Create image for rendering |
|
||||
| `icon()` | `icon(name): icon` | Lucide icon by name |
|
||||
| `html()` | `html(string): html` | Render as HTML |
|
||||
| `escapeHTML()` | `escapeHTML(string): string` | Escape HTML characters |
|
||||
|
||||
### Any Type Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `isTruthy()` | `any.isTruthy(): boolean` | Coerce to boolean |
|
||||
| `isType()` | `any.isType(type): boolean` | Check type |
|
||||
| `toString()` | `any.toString(): string` | Convert to string |
|
||||
|
||||
### Date Functions & Fields
|
||||
|
||||
**Fields:** `date.year`, `date.month`, `date.day`, `date.hour`, `date.minute`, `date.second`, `date.millisecond`
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `date()` | `date.date(): date` | Remove time portion |
|
||||
| `format()` | `date.format(string): string` | Format with Moment.js pattern |
|
||||
| `time()` | `date.time(): string` | Get time as string |
|
||||
| `relative()` | `date.relative(): string` | Human-readable relative time |
|
||||
| `isEmpty()` | `date.isEmpty(): boolean` | Always false for dates |
|
||||
|
||||
### Date Arithmetic
|
||||
|
||||
```yaml
|
||||
# Duration units: y/year/years, M/month/months, d/day/days,
|
||||
# w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
|
||||
|
||||
# Add/subtract durations
|
||||
"date + \"1M\"" # Add 1 month
|
||||
"date - \"2h\"" # Subtract 2 hours
|
||||
"now() + \"1 day\"" # Tomorrow
|
||||
"today() + \"7d\"" # A week from today
|
||||
|
||||
# Subtract dates for millisecond difference
|
||||
"now() - file.ctime"
|
||||
|
||||
# Complex duration arithmetic
|
||||
"now() + (duration('1d') * 2)"
|
||||
```
|
||||
|
||||
### String Functions
|
||||
|
||||
**Field:** `string.length`
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `contains()` | `string.contains(value): boolean` | Check substring |
|
||||
| `containsAll()` | `string.containsAll(...values): boolean` | All substrings present |
|
||||
| `containsAny()` | `string.containsAny(...values): boolean` | Any substring present |
|
||||
| `startsWith()` | `string.startsWith(query): boolean` | Starts with query |
|
||||
| `endsWith()` | `string.endsWith(query): boolean` | Ends with query |
|
||||
| `isEmpty()` | `string.isEmpty(): boolean` | Empty or not present |
|
||||
| `lower()` | `string.lower(): string` | To lowercase |
|
||||
| `title()` | `string.title(): string` | To Title Case |
|
||||
| `trim()` | `string.trim(): string` | Remove whitespace |
|
||||
| `replace()` | `string.replace(pattern, replacement): string` | Replace pattern |
|
||||
| `repeat()` | `string.repeat(count): string` | Repeat string |
|
||||
| `reverse()` | `string.reverse(): string` | Reverse string |
|
||||
| `slice()` | `string.slice(start, end?): string` | Substring |
|
||||
| `split()` | `string.split(separator, n?): list` | Split to list |
|
||||
|
||||
### Number Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `abs()` | `number.abs(): number` | Absolute value |
|
||||
| `ceil()` | `number.ceil(): number` | Round up |
|
||||
| `floor()` | `number.floor(): number` | Round down |
|
||||
| `round()` | `number.round(digits?): number` | Round to digits |
|
||||
| `toFixed()` | `number.toFixed(precision): string` | Fixed-point notation |
|
||||
| `isEmpty()` | `number.isEmpty(): boolean` | Not present |
|
||||
|
||||
### List Functions
|
||||
|
||||
**Field:** `list.length`
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `contains()` | `list.contains(value): boolean` | Element exists |
|
||||
| `containsAll()` | `list.containsAll(...values): boolean` | All elements exist |
|
||||
| `containsAny()` | `list.containsAny(...values): boolean` | Any element exists |
|
||||
| `filter()` | `list.filter(expression): list` | Filter by condition (uses `value`, `index`) |
|
||||
| `map()` | `list.map(expression): list` | Transform elements (uses `value`, `index`) |
|
||||
| `reduce()` | `list.reduce(expression, initial): any` | Reduce to single value (uses `value`, `index`, `acc`) |
|
||||
| `flat()` | `list.flat(): list` | Flatten nested lists |
|
||||
| `join()` | `list.join(separator): string` | Join to string |
|
||||
| `reverse()` | `list.reverse(): list` | Reverse order |
|
||||
| `slice()` | `list.slice(start, end?): list` | Sublist |
|
||||
| `sort()` | `list.sort(): list` | Sort ascending |
|
||||
| `unique()` | `list.unique(): list` | Remove duplicates |
|
||||
| `isEmpty()` | `list.isEmpty(): boolean` | No elements |
|
||||
|
||||
### File Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `asLink()` | `file.asLink(display?): Link` | Convert to link |
|
||||
| `hasLink()` | `file.hasLink(otherFile): boolean` | Has link to file |
|
||||
| `hasTag()` | `file.hasTag(...tags): boolean` | Has any of the tags |
|
||||
| `hasProperty()` | `file.hasProperty(name): boolean` | Has property |
|
||||
| `inFolder()` | `file.inFolder(folder): boolean` | In folder or subfolder |
|
||||
|
||||
### Link Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `asFile()` | `link.asFile(): file` | Get file object |
|
||||
| `linksTo()` | `link.linksTo(file): boolean` | Links to file |
|
||||
|
||||
### Object Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `isEmpty()` | `object.isEmpty(): boolean` | No properties |
|
||||
| `keys()` | `object.keys(): list` | List of keys |
|
||||
| `values()` | `object.values(): list` | List of values |
|
||||
|
||||
### Regular Expression Functions
|
||||
|
||||
| Function | Signature | Description |
|
||||
|----------|-----------|-------------|
|
||||
| `matches()` | `regexp.matches(string): boolean` | Test if matches |
|
||||
|
||||
## View Types
|
||||
|
||||
### Table View
|
||||
|
||||
```yaml
|
||||
views:
|
||||
- type: table
|
||||
name: "My Table"
|
||||
order:
|
||||
- file.name
|
||||
- status
|
||||
- due_date
|
||||
summaries:
|
||||
price: Sum
|
||||
count: Average
|
||||
```
|
||||
|
||||
### Cards View
|
||||
|
||||
```yaml
|
||||
views:
|
||||
- type: cards
|
||||
name: "Gallery"
|
||||
order:
|
||||
- file.name
|
||||
- cover_image
|
||||
- description
|
||||
```
|
||||
|
||||
### List View
|
||||
|
||||
```yaml
|
||||
views:
|
||||
- type: list
|
||||
name: "Simple List"
|
||||
order:
|
||||
- file.name
|
||||
- status
|
||||
```
|
||||
|
||||
### Map View
|
||||
|
||||
Requires latitude/longitude properties and the Maps plugin.
|
||||
|
||||
```yaml
|
||||
views:
|
||||
- type: map
|
||||
name: "Locations"
|
||||
# Map-specific settings for lat/lng properties
|
||||
```
|
||||
|
||||
## Default Summary Formulas
|
||||
|
||||
| Name | Input Type | Description |
|
||||
|------|------------|-------------|
|
||||
| `Average` | Number | Mathematical mean |
|
||||
| `Min` | Number | Smallest number |
|
||||
| `Max` | Number | Largest number |
|
||||
| `Sum` | Number | Sum of all numbers |
|
||||
| `Range` | Number | Max - Min |
|
||||
| `Median` | Number | Mathematical median |
|
||||
| `Stddev` | Number | Standard deviation |
|
||||
| `Earliest` | Date | Earliest date |
|
||||
| `Latest` | Date | Latest date |
|
||||
| `Range` | Date | Latest - Earliest |
|
||||
| `Checked` | Boolean | Count of true values |
|
||||
| `Unchecked` | Boolean | Count of false values |
|
||||
| `Empty` | Any | Count of empty values |
|
||||
| `Filled` | Any | Count of non-empty values |
|
||||
| `Unique` | Any | Count of unique values |
|
||||
|
||||
## Complete Examples
|
||||
|
||||
### Task Tracker Base
|
||||
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- file.hasTag("task")
|
||||
- 'file.ext == "md"'
|
||||
|
||||
formulas:
|
||||
days_until_due: 'if(due, ((date(due) - today()) / 86400000).round(0), "")'
|
||||
is_overdue: 'if(due, date(due) < today() && status != "done", false)'
|
||||
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
|
||||
|
||||
properties:
|
||||
status:
|
||||
displayName: Status
|
||||
formula.days_until_due:
|
||||
displayName: "Days Until Due"
|
||||
formula.priority_label:
|
||||
displayName: Priority
|
||||
|
||||
views:
|
||||
- type: table
|
||||
name: "Active Tasks"
|
||||
filters:
|
||||
and:
|
||||
- 'status != "done"'
|
||||
order:
|
||||
- file.name
|
||||
- status
|
||||
- formula.priority_label
|
||||
- due
|
||||
- formula.days_until_due
|
||||
groupBy:
|
||||
property: status
|
||||
direction: ASC
|
||||
summaries:
|
||||
formula.days_until_due: Average
|
||||
|
||||
- type: table
|
||||
name: "Completed"
|
||||
filters:
|
||||
and:
|
||||
- 'status == "done"'
|
||||
order:
|
||||
- file.name
|
||||
- completed_date
|
||||
```
|
||||
|
||||
### Reading List Base
|
||||
|
||||
```yaml
|
||||
filters:
|
||||
or:
|
||||
- file.hasTag("book")
|
||||
- file.hasTag("article")
|
||||
|
||||
formulas:
|
||||
reading_time: 'if(pages, (pages * 2).toString() + " min", "")'
|
||||
status_icon: 'if(status == "reading", "📖", if(status == "done", "✅", "📚"))'
|
||||
year_read: 'if(finished_date, date(finished_date).year, "")'
|
||||
|
||||
properties:
|
||||
author:
|
||||
displayName: Author
|
||||
formula.status_icon:
|
||||
displayName: ""
|
||||
formula.reading_time:
|
||||
displayName: "Est. Time"
|
||||
|
||||
views:
|
||||
- type: cards
|
||||
name: "Library"
|
||||
order:
|
||||
- cover
|
||||
- file.name
|
||||
- author
|
||||
- formula.status_icon
|
||||
filters:
|
||||
not:
|
||||
- 'status == "dropped"'
|
||||
|
||||
- type: table
|
||||
name: "Reading List"
|
||||
filters:
|
||||
and:
|
||||
- 'status == "to-read"'
|
||||
order:
|
||||
- file.name
|
||||
- author
|
||||
- pages
|
||||
- formula.reading_time
|
||||
```
|
||||
|
||||
### Project Notes Base
|
||||
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- file.inFolder("Projects")
|
||||
- 'file.ext == "md"'
|
||||
|
||||
formulas:
|
||||
last_updated: 'file.mtime.relative()'
|
||||
link_count: 'file.links.length'
|
||||
|
||||
summaries:
|
||||
avgLinks: 'values.filter(value.isType("number")).mean().round(1)'
|
||||
|
||||
properties:
|
||||
formula.last_updated:
|
||||
displayName: "Updated"
|
||||
formula.link_count:
|
||||
displayName: "Links"
|
||||
|
||||
views:
|
||||
- type: table
|
||||
name: "All Projects"
|
||||
order:
|
||||
- file.name
|
||||
- status
|
||||
- formula.last_updated
|
||||
- formula.link_count
|
||||
summaries:
|
||||
formula.link_count: avgLinks
|
||||
groupBy:
|
||||
property: status
|
||||
direction: ASC
|
||||
|
||||
- type: list
|
||||
name: "Quick List"
|
||||
order:
|
||||
- file.name
|
||||
- status
|
||||
```
|
||||
|
||||
### Daily Notes Index
|
||||
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- file.inFolder("Daily Notes")
|
||||
- '/^\d{4}-\d{2}-\d{2}$/.matches(file.basename)'
|
||||
|
||||
formulas:
|
||||
word_estimate: '(file.size / 5).round(0)'
|
||||
day_of_week: 'date(file.basename).format("dddd")'
|
||||
|
||||
properties:
|
||||
formula.day_of_week:
|
||||
displayName: "Day"
|
||||
formula.word_estimate:
|
||||
displayName: "~Words"
|
||||
|
||||
views:
|
||||
- type: table
|
||||
name: "Recent Notes"
|
||||
limit: 30
|
||||
order:
|
||||
- file.name
|
||||
- formula.day_of_week
|
||||
- formula.word_estimate
|
||||
- file.mtime
|
||||
```
|
||||
|
||||
## Embedding Bases
|
||||
|
||||
Embed in Markdown files:
|
||||
|
||||
```markdown
|
||||
![[MyBase.base]]
|
||||
|
||||
<!-- Specific view -->
|
||||
![[MyBase.base#View Name]]
|
||||
```
|
||||
|
||||
## YAML Quoting Rules
|
||||
|
||||
- Use single quotes for formulas containing double quotes: `'if(done, "Yes", "No")'`
|
||||
- Use double quotes for simple strings: `"My View Name"`
|
||||
- Escape nested quotes properly in complex expressions
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Filter by Tag
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- file.hasTag("project")
|
||||
```
|
||||
|
||||
### Filter by Folder
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- file.inFolder("Notes")
|
||||
```
|
||||
|
||||
### Filter by Date Range
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- 'file.mtime > now() - "7d"'
|
||||
```
|
||||
|
||||
### Filter by Property Value
|
||||
```yaml
|
||||
filters:
|
||||
and:
|
||||
- 'status == "active"'
|
||||
- 'priority >= 3'
|
||||
```
|
||||
|
||||
### Combine Multiple Conditions
|
||||
```yaml
|
||||
filters:
|
||||
or:
|
||||
- and:
|
||||
- file.hasTag("important")
|
||||
- 'status != "done"'
|
||||
- and:
|
||||
- 'priority == 1'
|
||||
- 'due != ""'
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
- [Bases Syntax](https://help.obsidian.md/bases/syntax)
|
||||
- [Functions](https://help.obsidian.md/bases/functions)
|
||||
- [Views](https://help.obsidian.md/bases/views)
|
||||
- [Formulas](https://help.obsidian.md/formulas)
|
||||
|
||||
@@ -1,622 +0,0 @@
|
||||
---
|
||||
name: obsidian-markdown
|
||||
description: Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
|
||||
source: https://github.com/kepano/obsidian-skills/blob/main/skills/obsidian-markdown/SKILL.md
|
||||
---
|
||||
|
||||
# Obsidian Flavored Markdown Skill
|
||||
|
||||
This skill enables Claude Code to create and edit valid Obsidian Flavored Markdown, including all Obsidian-specific syntax extensions.
|
||||
|
||||
## Overview
|
||||
|
||||
Obsidian uses a combination of Markdown flavors:
|
||||
- [CommonMark](https://commonmark.org/)
|
||||
- [GitHub Flavored Markdown](https://github.github.com/gfm/)
|
||||
- [LaTeX](https://www.latex-project.org/) for math
|
||||
- Obsidian-specific extensions (wikilinks, callouts, embeds, etc.)
|
||||
|
||||
## Basic Formatting
|
||||
|
||||
### Paragraphs and Line Breaks
|
||||
|
||||
```markdown
|
||||
This is a paragraph.
|
||||
|
||||
This is another paragraph (blank line between creates separate paragraphs).
|
||||
|
||||
For a line break within a paragraph, add two spaces at the end
|
||||
or use Shift+Enter.
|
||||
```
|
||||
|
||||
### Headings
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
#### Heading 4
|
||||
##### Heading 5
|
||||
###### Heading 6
|
||||
```
|
||||
|
||||
### Text Formatting
|
||||
|
||||
| Style | Syntax | Example | Output |
|
||||
|-------|--------|---------|--------|
|
||||
| Bold | `**text**` or `__text__` | `**Bold**` | **Bold** |
|
||||
| Italic | `*text*` or `_text_` | `*Italic*` | *Italic* |
|
||||
| Bold + Italic | `***text***` | `***Both***` | ***Both*** |
|
||||
| Strikethrough | `~~text~~` | `~~Striked~~` | ~~Striked~~ |
|
||||
| Highlight | `==text==` | `==Highlighted==` | ==Highlighted== |
|
||||
| Inline code | `` `code` `` | `` `code` `` | `code` |
|
||||
|
||||
### Escaping Formatting
|
||||
|
||||
Use backslash to escape special characters:
|
||||
```markdown
|
||||
\*This won't be italic\*
|
||||
\#This won't be a heading
|
||||
1\. This won't be a list item
|
||||
```
|
||||
|
||||
Common characters to escape: `\*`, `\_`, `\#`, `` \` ``, `\|`, `\~`
|
||||
|
||||
## Internal Links (Wikilinks)
|
||||
|
||||
### Basic Links
|
||||
|
||||
```markdown
|
||||
[[Note Name]]
|
||||
[[Note Name.md]]
|
||||
[[Note Name|Display Text]]
|
||||
```
|
||||
|
||||
### Link to Headings
|
||||
|
||||
```markdown
|
||||
[[Note Name#Heading]]
|
||||
[[Note Name#Heading|Custom Text]]
|
||||
[[#Heading in same note]]
|
||||
[[##Search all headings in vault]]
|
||||
```
|
||||
|
||||
### Link to Blocks
|
||||
|
||||
```markdown
|
||||
[[Note Name#^block-id]]
|
||||
[[Note Name#^block-id|Custom Text]]
|
||||
```
|
||||
|
||||
Define a block ID by adding `^block-id` at the end of a paragraph:
|
||||
```markdown
|
||||
This is a paragraph that can be linked to. ^my-block-id
|
||||
```
|
||||
|
||||
For lists and quotes, add the block ID on a separate line:
|
||||
```markdown
|
||||
> This is a quote
|
||||
> With multiple lines
|
||||
|
||||
^quote-id
|
||||
```
|
||||
|
||||
### Search Links
|
||||
|
||||
```markdown
|
||||
[[##heading]] Search for headings containing "heading"
|
||||
[[^^block]] Search for blocks containing "block"
|
||||
```
|
||||
|
||||
## Markdown-Style Links
|
||||
|
||||
```markdown
|
||||
[Display Text](Note%20Name.md)
|
||||
[Display Text](Note%20Name.md#Heading)
|
||||
[Display Text](https://example.com)
|
||||
[Note](obsidian://open?vault=VaultName&file=Note.md)
|
||||
```
|
||||
|
||||
Note: Spaces must be URL-encoded as `%20` in Markdown links.
|
||||
|
||||
## Embeds
|
||||
|
||||
### Embed Notes
|
||||
|
||||
```markdown
|
||||
![[Note Name]]
|
||||
![[Note Name#Heading]]
|
||||
![[Note Name#^block-id]]
|
||||
```
|
||||
|
||||
### Embed Images
|
||||
|
||||
```markdown
|
||||
![[image.png]]
|
||||
![[image.png|640x480]] Width x Height
|
||||
![[image.png|300]] Width only (maintains aspect ratio)
|
||||
```
|
||||
|
||||
### External Images
|
||||
|
||||
```markdown
|
||||

|
||||

|
||||
```
|
||||
|
||||
### Embed Audio
|
||||
|
||||
```markdown
|
||||
![[audio.mp3]]
|
||||
![[audio.ogg]]
|
||||
```
|
||||
|
||||
### Embed PDF
|
||||
|
||||
```markdown
|
||||
![[document.pdf]]
|
||||
![[document.pdf#page=3]]
|
||||
![[document.pdf#height=400]]
|
||||
```
|
||||
|
||||
### Embed Lists
|
||||
|
||||
```markdown
|
||||
![[Note#^list-id]]
|
||||
```
|
||||
|
||||
Where the list has been defined with a block ID:
|
||||
```markdown
|
||||
- Item 1
|
||||
- Item 2
|
||||
- Item 3
|
||||
|
||||
^list-id
|
||||
```
|
||||
|
||||
### Embed Search Results
|
||||
|
||||
````markdown
|
||||
```query
|
||||
tag:#project status:done
|
||||
```
|
||||
````
|
||||
|
||||
## Callouts
|
||||
|
||||
### Basic Callout
|
||||
|
||||
```markdown
|
||||
> [!note]
|
||||
> This is a note callout.
|
||||
|
||||
> [!info] Custom Title
|
||||
> This callout has a custom title.
|
||||
|
||||
> [!tip] Title Only
|
||||
```
|
||||
|
||||
### Foldable Callouts
|
||||
|
||||
```markdown
|
||||
> [!faq]- Collapsed by default
|
||||
> This content is hidden until expanded.
|
||||
|
||||
> [!faq]+ Expanded by default
|
||||
> This content is visible but can be collapsed.
|
||||
```
|
||||
|
||||
### Nested Callouts
|
||||
|
||||
```markdown
|
||||
> [!question] Outer callout
|
||||
> > [!note] Inner callout
|
||||
> > Nested content
|
||||
```
|
||||
|
||||
### Supported Callout Types
|
||||
|
||||
| Type | Aliases | Description |
|
||||
|------|---------|-------------|
|
||||
| `note` | - | Blue, pencil icon |
|
||||
| `abstract` | `summary`, `tldr` | Teal, clipboard icon |
|
||||
| `info` | - | Blue, info icon |
|
||||
| `todo` | - | Blue, checkbox icon |
|
||||
| `tip` | `hint`, `important` | Cyan, flame icon |
|
||||
| `success` | `check`, `done` | Green, checkmark icon |
|
||||
| `question` | `help`, `faq` | Yellow, question mark |
|
||||
| `warning` | `caution`, `attention` | Orange, warning icon |
|
||||
| `failure` | `fail`, `missing` | Red, X icon |
|
||||
| `danger` | `error` | Red, zap icon |
|
||||
| `bug` | - | Red, bug icon |
|
||||
| `example` | - | Purple, list icon |
|
||||
| `quote` | `cite` | Gray, quote icon |
|
||||
|
||||
### Custom Callouts (CSS)
|
||||
|
||||
```css
|
||||
.callout[data-callout="custom-type"] {
|
||||
--callout-color: 255, 0, 0;
|
||||
--callout-icon: lucide-alert-circle;
|
||||
}
|
||||
```
|
||||
|
||||
## Lists
|
||||
|
||||
### Unordered Lists
|
||||
|
||||
```markdown
|
||||
- Item 1
|
||||
- Item 2
|
||||
- Nested item
|
||||
- Another nested
|
||||
- Item 3
|
||||
|
||||
* Also works with asterisks
|
||||
+ Or plus signs
|
||||
```
|
||||
|
||||
### Ordered Lists
|
||||
|
||||
```markdown
|
||||
1. First item
|
||||
2. Second item
|
||||
1. Nested numbered
|
||||
2. Another nested
|
||||
3. Third item
|
||||
|
||||
1) Alternative syntax
|
||||
2) With parentheses
|
||||
```
|
||||
|
||||
### Task Lists
|
||||
|
||||
```markdown
|
||||
- [ ] Incomplete task
|
||||
- [x] Completed task
|
||||
- [ ] Task with sub-tasks
|
||||
- [ ] Subtask 1
|
||||
- [x] Subtask 2
|
||||
```
|
||||
|
||||
## Quotes
|
||||
|
||||
```markdown
|
||||
> This is a blockquote.
|
||||
> It can span multiple lines.
|
||||
>
|
||||
> And include multiple paragraphs.
|
||||
>
|
||||
> > Nested quotes work too.
|
||||
```
|
||||
|
||||
## Code
|
||||
|
||||
### Inline Code
|
||||
|
||||
```markdown
|
||||
Use `backticks` for inline code.
|
||||
Use double backticks for ``code with a ` backtick inside``.
|
||||
```
|
||||
|
||||
### Code Blocks
|
||||
|
||||
````markdown
|
||||
```
|
||||
Plain code block
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Syntax highlighted code block
|
||||
function hello() {
|
||||
console.log("Hello, world!");
|
||||
}
|
||||
```
|
||||
|
||||
```python
|
||||
# Python example
|
||||
def greet(name):
|
||||
print(f"Hello, {name}!")
|
||||
```
|
||||
````
|
||||
|
||||
### Nesting Code Blocks
|
||||
|
||||
Use more backticks or tildes for the outer block:
|
||||
|
||||
`````markdown
|
||||
````markdown
|
||||
Here's how to create a code block:
|
||||
```js
|
||||
console.log("Hello")
|
||||
```
|
||||
````
|
||||
`````
|
||||
|
||||
## Tables
|
||||
|
||||
```markdown
|
||||
| Header 1 | Header 2 | Header 3 |
|
||||
|----------|----------|----------|
|
||||
| Cell 1 | Cell 2 | Cell 3 |
|
||||
| Cell 4 | Cell 5 | Cell 6 |
|
||||
```
|
||||
|
||||
### Alignment
|
||||
|
||||
```markdown
|
||||
| Left | Center | Right |
|
||||
|:---------|:--------:|---------:|
|
||||
| Left | Center | Right |
|
||||
```
|
||||
|
||||
### Using Pipes in Tables
|
||||
|
||||
Escape pipes with backslash:
|
||||
```markdown
|
||||
| Column 1 | Column 2 |
|
||||
|----------|----------|
|
||||
| [[Link\|Display]] | ![[Image\|100]] |
|
||||
```
|
||||
|
||||
## Math (LaTeX)
|
||||
|
||||
### Inline Math
|
||||
|
||||
```markdown
|
||||
This is inline math: $e^{i\pi} + 1 = 0$
|
||||
```
|
||||
|
||||
### Block Math
|
||||
|
||||
```markdown
|
||||
$$
|
||||
\begin{vmatrix}
|
||||
a & b \\
|
||||
c & d
|
||||
\end{vmatrix} = ad - bc
|
||||
$$
|
||||
```
|
||||
|
||||
### Common Math Syntax
|
||||
|
||||
```markdown
|
||||
$x^2$ Superscript
|
||||
$x_i$ Subscript
|
||||
$\frac{a}{b}$ Fraction
|
||||
$\sqrt{x}$ Square root
|
||||
$\sum_{i=1}^{n}$ Summation
|
||||
$\int_a^b$ Integral
|
||||
$\alpha, \beta$ Greek letters
|
||||
```
|
||||
|
||||
## Diagrams (Mermaid)
|
||||
|
||||
````markdown
|
||||
```mermaid
|
||||
graph TD
|
||||
A[Start] --> B{Decision}
|
||||
B -->|Yes| C[Do this]
|
||||
B -->|No| D[Do that]
|
||||
C --> E[End]
|
||||
D --> E
|
||||
```
|
||||
````
|
||||
|
||||
### Sequence Diagrams
|
||||
|
||||
````markdown
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
Alice->>Bob: Hello Bob
|
||||
Bob-->>Alice: Hi Alice
|
||||
```
|
||||
````
|
||||
|
||||
### Linking in Diagrams
|
||||
|
||||
````markdown
|
||||
```mermaid
|
||||
graph TD
|
||||
A[Biology]
|
||||
B[Chemistry]
|
||||
A --> B
|
||||
class A,B internal-link;
|
||||
```
|
||||
````
|
||||
|
||||
## Footnotes
|
||||
|
||||
```markdown
|
||||
This sentence has a footnote[^1].
|
||||
|
||||
[^1]: This is the footnote content.
|
||||
|
||||
You can also use named footnotes[^note].
|
||||
|
||||
[^note]: Named footnotes still appear as numbers.
|
||||
|
||||
Inline footnotes are also supported.^[This is an inline footnote.]
|
||||
```
|
||||
|
||||
## Comments
|
||||
|
||||
```markdown
|
||||
This is visible %%but this is hidden%% text.
|
||||
|
||||
%%
|
||||
This entire block is hidden.
|
||||
It won't appear in reading view.
|
||||
%%
|
||||
```
|
||||
|
||||
## Horizontal Rules
|
||||
|
||||
```markdown
|
||||
---
|
||||
***
|
||||
___
|
||||
- - -
|
||||
* * *
|
||||
```
|
||||
|
||||
## Properties (Frontmatter)
|
||||
|
||||
Properties use YAML frontmatter at the start of a note:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: My Note Title
|
||||
date: 2024-01-15
|
||||
tags:
|
||||
- project
|
||||
- important
|
||||
aliases:
|
||||
- My Note
|
||||
- Alternative Name
|
||||
cssclasses:
|
||||
- custom-class
|
||||
status: in-progress
|
||||
rating: 4.5
|
||||
completed: false
|
||||
due: 2024-02-01T14:30:00
|
||||
---
|
||||
```
|
||||
|
||||
### Property Types
|
||||
|
||||
| Type | Example |
|
||||
|------|---------|
|
||||
| Text | `title: My Title` |
|
||||
| Number | `rating: 4.5` |
|
||||
| Checkbox | `completed: true` |
|
||||
| Date | `date: 2024-01-15` |
|
||||
| Date & Time | `due: 2024-01-15T14:30:00` |
|
||||
| List | `tags: [one, two]` or YAML list |
|
||||
| Links | `related: "[[Other Note]]"` |
|
||||
|
||||
### Default Properties
|
||||
|
||||
- `tags` - Note tags
|
||||
- `aliases` - Alternative names for the note
|
||||
- `cssclasses` - CSS classes applied to the note
|
||||
|
||||
## Tags
|
||||
|
||||
```markdown
|
||||
#tag
|
||||
#nested/tag
|
||||
#tag-with-dashes
|
||||
#tag_with_underscores
|
||||
|
||||
In frontmatter:
|
||||
---
|
||||
tags:
|
||||
- tag1
|
||||
- nested/tag2
|
||||
---
|
||||
```
|
||||
|
||||
Tags can contain:
|
||||
- Letters (any language)
|
||||
- Numbers (not as first character)
|
||||
- Underscores `_`
|
||||
- Hyphens `-`
|
||||
- Forward slashes `/` (for nesting)
|
||||
|
||||
## HTML Content
|
||||
|
||||
Obsidian supports HTML within Markdown:
|
||||
|
||||
```markdown
|
||||
<div class="custom-container">
|
||||
<span style="color: red;">Colored text</span>
|
||||
</div>
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
Hidden content here.
|
||||
</details>
|
||||
|
||||
<kbd>Ctrl</kbd> + <kbd>C</kbd>
|
||||
```
|
||||
|
||||
## Complete Example
|
||||
|
||||
````markdown
|
||||
---
|
||||
title: Project Alpha
|
||||
date: 2024-01-15
|
||||
tags:
|
||||
- project
|
||||
- active
|
||||
status: in-progress
|
||||
priority: high
|
||||
---
|
||||
|
||||
# Project Alpha
|
||||
|
||||
## Overview
|
||||
|
||||
This project aims to [[improve workflow]] using modern techniques.
|
||||
|
||||
> [!important] Key Deadline
|
||||
> The first milestone is due on ==January 30th==.
|
||||
|
||||
## Tasks
|
||||
|
||||
- [x] Initial planning
|
||||
- [x] Resource allocation
|
||||
- [ ] Development phase
|
||||
- [ ] Backend implementation
|
||||
- [ ] Frontend design
|
||||
- [ ] Testing
|
||||
- [ ] Deployment
|
||||
|
||||
## Technical Notes
|
||||
|
||||
The main algorithm uses the formula $O(n \log n)$ for sorting.
|
||||
|
||||
```python
|
||||
def process_data(items):
|
||||
return sorted(items, key=lambda x: x.priority)
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
A[Input] --> B[Process]
|
||||
B --> C[Output]
|
||||
B --> D[Cache]
|
||||
```
|
||||
|
||||
## Related Documents
|
||||
|
||||
- ![[Meeting Notes 2024-01-10#Decisions]]
|
||||
- [[Budget Allocation|Budget]]
|
||||
- [[Team Members]]
|
||||
|
||||
## References
|
||||
|
||||
For more details, see the official documentation[^1].
|
||||
|
||||
[^1]: https://example.com/docs
|
||||
|
||||
%%
|
||||
Internal notes:
|
||||
- Review with team on Friday
|
||||
- Consider alternative approaches
|
||||
%%
|
||||
````
|
||||
|
||||
## References
|
||||
|
||||
- [Basic formatting syntax](https://help.obsidian.md/syntax)
|
||||
- [Advanced formatting syntax](https://help.obsidian.md/advanced-syntax)
|
||||
- [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown)
|
||||
- [Internal links](https://help.obsidian.md/links)
|
||||
- [Embed files](https://help.obsidian.md/embeds)
|
||||
- [Callouts](https://help.obsidian.md/callouts)
|
||||
- [Properties](https://help.obsidian.md/properties)
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
name: process-compose
|
||||
description: Inspect a running process-compose project read-only. Use when the user asks what services/processes are running, whether a service is up or healthy, what state a process is in, or to read a service's recent log output — or mentions process-compose (pc) by name.
|
||||
---
|
||||
|
||||
# Inspecting process-compose
|
||||
|
||||
The `process-compose` CLI is a thin **client**. It does not read your config or
|
||||
processes directly — it queries a process-compose **server** that is already
|
||||
running (the one started by `process-compose up`). Every command below talks to
|
||||
that server over TCP, default `localhost:8080`.
|
||||
|
||||
This skill is **read-only**: never start, stop, restart, or scale processes.
|
||||
|
||||
## Connecting
|
||||
|
||||
- Default target is `localhost:8080`. If a project runs on another port, pass
|
||||
`-p PORT` (or set `PC_PORT_NUM`); the port is whatever that project's
|
||||
`process-compose.yaml` / launch command set.
|
||||
- A "connection refused" error means **no server is running on that port**, not
|
||||
a bad command. Report that the project isn't up rather than retrying variants.
|
||||
- `pc` is a fish abbreviation for `process-compose` and exists only in an
|
||||
interactive fish shell. In scripts and Bash calls use the full `process-compose`.
|
||||
|
||||
## Read commands
|
||||
|
||||
List every process with its status (one line each):
|
||||
|
||||
```
|
||||
process-compose process list -o wide
|
||||
```
|
||||
|
||||
Add `-o json` when you need to parse fields (status, health, pid, restarts, exit
|
||||
code) rather than display them.
|
||||
|
||||
Full state of one process:
|
||||
|
||||
```
|
||||
process-compose process get NAME -o json
|
||||
```
|
||||
|
||||
Recent log lines for a process (tail the last N — adjust the number to the need):
|
||||
|
||||
```
|
||||
process-compose process logs NAME -n 100
|
||||
```
|
||||
|
||||
Multiple processes: comma-separate them (`proc1,proc2`). A whole namespace:
|
||||
`-N NAMESPACE`.
|
||||
|
||||
Whole-project state (is everything ready):
|
||||
|
||||
```
|
||||
process-compose project state
|
||||
```
|
||||
|
||||
## Never do
|
||||
|
||||
- **No TUI.** Bare `process-compose`, `up`, and `attach` launch the interactive
|
||||
full-screen TUI and hang a non-interactive shell. Always use a subcommand.
|
||||
- **No `-f` / `--follow`** on `logs` — it streams forever and blocks. Use `-n` to
|
||||
pull a finite tail instead.
|
||||
- **No mutations** — `start`, `stop`, `restart`, `scale`, `down` are out of scope
|
||||
for this skill.
|
||||
@@ -1,307 +0,0 @@
|
||||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
// Remove undesired defaults
|
||||
{
|
||||
"key": "ctrl+\\",
|
||||
"command": "-workbench.action.splitEditor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+\\",
|
||||
"command": "-workbench.action.splitEditorOrthogonal"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+\\",
|
||||
"command": "-workbench.action.splitEditorLeft"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+\\",
|
||||
"command": "-workbench.action.splitEditorUp"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+\\",
|
||||
"command": "-workbench.action.splitEditorDown"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+\\",
|
||||
"command": "-workbench.action.splitEditorRight"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+left",
|
||||
"command": "-workbench.action.focusLeftGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+right",
|
||||
"command": "-workbench.action.focusRightGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+up",
|
||||
"command": "-workbench.action.focusAboveGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+down",
|
||||
"command": "-workbench.action.focusBelowGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+`",
|
||||
"command": "-workbench.action.terminal.new",
|
||||
"when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+t",
|
||||
"command": "-workbench.action.showAllSymbols"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "-workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+`",
|
||||
"command": "-workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminal.active"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "-extension.vim_ctrl+p",
|
||||
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "-extension.vim_ctrl+h",
|
||||
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "-extension.vim_navigateCtrlL",
|
||||
"when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "-workbench.action.quickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "-workbench.action.quickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f12",
|
||||
"command": "-editor.action.revealDefinition",
|
||||
"when": "editorHasDefinitionProvider && editorTextFocus && isWeb"
|
||||
},
|
||||
{
|
||||
"key": "f12",
|
||||
"command": "-editor.action.revealDefinition",
|
||||
"when": "editorHasDefinitionProvider && editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+m",
|
||||
"command": "-workbench.actions.view.problems",
|
||||
"when": "workbench.panel.markers.view.active"
|
||||
},
|
||||
{
|
||||
"key": "alt+left",
|
||||
"command": "-workbench.action.navigateBack",
|
||||
"when": "canNavigateBack"
|
||||
},
|
||||
{
|
||||
"key": "alt+right",
|
||||
"command": "-workbench.action.navigateForward",
|
||||
"when": "canNavigateForward && editorTextFocus && vim.active"
|
||||
},
|
||||
// Editing
|
||||
{
|
||||
"key": "shift+k",
|
||||
"command": "editor.action.showHover",
|
||||
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
|
||||
},
|
||||
{
|
||||
"key": "escape",
|
||||
"command": "workbench.action.closeSidebar",
|
||||
"when": "sideBarVisible && vim.mode != 'Insert'"
|
||||
},
|
||||
// Navigating and language inspection
|
||||
// Editor pane navigation and management
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "workbench.action.focusAboveGroup",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "workbench.action.focusBelowGroup",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "workbench.action.focusLeftGroup",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "workbench.action.focusRightGroup",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b shift+5",
|
||||
"command": "workbench.action.newGroupRight",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b shift+'",
|
||||
"command": "workbench.action.newGroupBelow",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b z",
|
||||
"command": "workbench.action.toggleEditorWidths",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
// Terminal Tmux pane navigation and management
|
||||
{
|
||||
"key": "ctrl+t",
|
||||
"command": "workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminal.active"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+`",
|
||||
"command": "workbench.action.toggleMaximizedPanel"
|
||||
},
|
||||
// These escape codes allow sending keyboard shortcuts to tmux
|
||||
// when normally vs-code would not send any chorded keyboard shortcuts.
|
||||
// It also is setup so that these keyboard shortcuts work in both the editor
|
||||
// and the terminal, but have different commands.
|
||||
// Resources:
|
||||
// - https://code.visualstudio.com/docs/terminal/advanced#_custom-sequence-keybindings
|
||||
// - https://stackoverflow.com/questions/61742559/need-vscode-sendsequence-keybindings-for-previous-command-next-command-move-to
|
||||
// - https://gist.github.com/riipandi/2f304a1cbf7615a8f912473b5f4a7cc3
|
||||
// - `showkey -a`
|
||||
{
|
||||
"key": "ctrl+b p",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u0070"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b n",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u006e"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b d",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u0064"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u001b[A"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u001b[B"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u001b[D"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u001b[C"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b shift+5",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u0025"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b shift+'",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u0022"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b ,",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u002c"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b shift+;",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u003a"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b c",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u0063"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b [",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u005b"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b z",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u007a"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b g",
|
||||
"command": "workbench.action.terminal.sendSequence",
|
||||
"args": {
|
||||
"text": "\u0002\u0067"
|
||||
},
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+o",
|
||||
"command": "workbench.action.navigateBack",
|
||||
"when": "canNavigateBack"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+i",
|
||||
"command": "workbench.action.navigateForward",
|
||||
"when": "canNavigateForward && editorTextFocus && vim.active"
|
||||
}
|
||||
]
|
||||
@@ -1,287 +0,0 @@
|
||||
{
|
||||
//
|
||||
// Languages
|
||||
//
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "vscode.html-language-features"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "vscode.json-language-features"
|
||||
},
|
||||
"[templ]": {
|
||||
"editor.defaultFormatter": "a-h.templ"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"emmet.includeLanguages": {
|
||||
"templ": "html"
|
||||
},
|
||||
"go.buildTags": "unit",
|
||||
"go.toolsManagement.autoUpdate": true,
|
||||
"gopls": {
|
||||
// Supported by Catppuccin
|
||||
"ui.semanticTokens": true,
|
||||
"build.buildFlags": [
|
||||
"-tags=unit"
|
||||
]
|
||||
},
|
||||
"javascript.updateImportsOnFileMove.enabled": "always",
|
||||
"tailwindCSS.includeLanguages": {
|
||||
"templ": "html"
|
||||
},
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
"files.readonlyInclude": {
|
||||
"**/.cargo/registry/src/**/*.rs": true,
|
||||
"**/lib/rustlib/src/rust/library/**/*.rs": true,
|
||||
},
|
||||
//
|
||||
// Remote Settings
|
||||
//
|
||||
"dev.containers.dockerPath": "docker",
|
||||
"dev.containers.executeInWSL": true,
|
||||
"dotfiles.installCommand": "install.sh",
|
||||
"dotfiles.repository": "https://github.com/tgrosinger/dotfiles.git",
|
||||
"dotfiles.targetPath": "~/.dotfiles",
|
||||
//
|
||||
// Fonts and Appearance
|
||||
//
|
||||
"editor.fontFamily": "JetBrainsMono Nerd Font, JetBrains Mono, 'Courier New', monospace",
|
||||
"editor.fontLigatures": true,
|
||||
//
|
||||
// Theme
|
||||
//
|
||||
"editor.semanticHighlighting.enabled": true,
|
||||
// prevent VSCode from modifying the terminal colors
|
||||
"terminal.integrated.minimumContrastRatio": 1,
|
||||
// make the window's titlebar use the workbench colors
|
||||
"window.titleBarStyle": "custom",
|
||||
//
|
||||
// Editor Behavior
|
||||
//
|
||||
"diffEditor.experimental.showMoves": true,
|
||||
"editor.accessibilitySupport": "off",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.guides.bracketPairs": "active",
|
||||
"editor.lineNumbers": "relative",
|
||||
"editor.linkedEditing": true,
|
||||
"editor.minimap.enabled": false,
|
||||
"editor.renderWhitespace": "trailing",
|
||||
"editor.stickyScroll.enabled": true,
|
||||
"editor.wordWrap": "off",
|
||||
"files.associations": {
|
||||
"*.gohtml": "html"
|
||||
},
|
||||
"git.ignoreMissingGitWarning": true,
|
||||
"githubPullRequests.pullBranch": "never",
|
||||
"githubPullRequests.terminalLinksHandler": "github",
|
||||
//
|
||||
// GitLens
|
||||
//
|
||||
"gitlens.advanced.telemetry.enabled": false,
|
||||
"gitlens.hovers.currentLine.over": "line",
|
||||
"gitlens.telemetry.enabled": false,
|
||||
"remote.autoForwardPortsSource": "hybrid",
|
||||
"remote.containers.dotfiles.installCommand": "install.sh",
|
||||
"remote.containers.dotfiles.repository": "https://github.com/tgrosinger/dotfiles.git",
|
||||
"remote.containers.dotfiles.targetPath": "~/.dotfiles",
|
||||
"scm.workingSets.enabled": true,
|
||||
"settingsSync.ignoredExtensions": [
|
||||
"bradlc.vscode-tailwindcss"
|
||||
],
|
||||
//
|
||||
// Telemetry
|
||||
//
|
||||
"telemetry.telemetryLevel": "off",
|
||||
"workbench.enableExperiments": false,
|
||||
"workbench.settings.enableNaturalLanguageSearch": false,
|
||||
"extensions.ignoreRecommendations": true,
|
||||
//
|
||||
// Vim
|
||||
//
|
||||
"vim.leader": " ",
|
||||
"vim.handleKeys": {
|
||||
// ctrl-o functionality in the plugin is not very reliable or predictable.
|
||||
"<C-o>": false
|
||||
},
|
||||
"vim.normalModeKeyBindings": [
|
||||
// NOTE: It is recommended to put keybindings here instead of keybindings.json
|
||||
// https://github.com/VSCodeVim/Vim?tab=readme-ov-file#remapping-more-complex-key-combinations
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"c",
|
||||
"r"
|
||||
],
|
||||
"commands": [
|
||||
"editor.action.rename"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"f",
|
||||
"f"
|
||||
],
|
||||
"commands": [
|
||||
"workbench.action.quickOpen"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
" "
|
||||
],
|
||||
"commands": [
|
||||
"workbench.action.quickOpen"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"s",
|
||||
"g"
|
||||
],
|
||||
"commands": [
|
||||
"workbench.action.findInFiles"
|
||||
]
|
||||
},
|
||||
{
|
||||
// NOTE: This is defined here because otherwise the "g" "d" chord in a keybinding
|
||||
// would take over from the "leader" "s" "g" command above.
|
||||
"before": [
|
||||
"g",
|
||||
"r"
|
||||
],
|
||||
"commands": [
|
||||
"editor.action.goToReferences"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"r",
|
||||
"n"
|
||||
],
|
||||
"commands": [
|
||||
"editor.action.rename"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"q"
|
||||
],
|
||||
"commands": [
|
||||
"workbench.actions.view.problems"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"c",
|
||||
"a"
|
||||
],
|
||||
"commands": [
|
||||
"editor.action.quickFix"
|
||||
]
|
||||
},
|
||||
{
|
||||
"before": [
|
||||
"leader",
|
||||
"a",
|
||||
"i"
|
||||
],
|
||||
"commands": [
|
||||
"inlineChat.start"
|
||||
]
|
||||
},
|
||||
{
|
||||
// Vim-surround key-bindings to match what I use in Vim.
|
||||
// https://github.com/VSCodeVim/Vim#vim-surround
|
||||
"before": [
|
||||
"g",
|
||||
"s",
|
||||
"r"
|
||||
],
|
||||
"after": [
|
||||
"c",
|
||||
"s"
|
||||
]
|
||||
}
|
||||
],
|
||||
//
|
||||
// Window
|
||||
//
|
||||
"window.newWindowDimensions": "inherit",
|
||||
"workbench.colorTheme": "Catppuccin Latte",
|
||||
"workbench.colorCustomizations": {
|
||||
// Overrides Theme Default Colors for InlayHints feature
|
||||
"editorInlayHint.background": "#e4e4e4cc",
|
||||
"editorInlayHint.foreground": "#2e6340cc",
|
||||
// Overrides Theme Parameter hints fg for InlayHints feature
|
||||
"editorInlayHint.parameterBackground": "#e4e4e4cc",
|
||||
"editorInlayHint.parameterForeground": "#2e6340cc",
|
||||
// Overrides Theme Type hints fg for InlayHints feature
|
||||
"editorInlayHint.typeBackground": "#e4e4e4cc",
|
||||
"editorInlayHint.typeForeground": "#2e6340cc"
|
||||
},
|
||||
"workbench.editor.empty.hint": "hidden",
|
||||
"workbench.sideBar.location": "right",
|
||||
"workbench.iconTheme": "catppuccin-latte",
|
||||
"lazygit-vscode.autoMaximizeWindow": true,
|
||||
"rust-analyzer.check.command": "clippy",
|
||||
"[less]": {
|
||||
"editor.defaultFormatter": "vscode.css-language-features"
|
||||
},
|
||||
"svelte.enable-ts-plugin": true,
|
||||
//
|
||||
// File watcher
|
||||
//
|
||||
"files.watcherExclude": {
|
||||
"**/.git/objects/**": true,
|
||||
"**/node_modules/**": true
|
||||
},
|
||||
"find-it-faster.general.batTheme": "GitHub",
|
||||
"find-it-faster.general.showMaximizedTerminal": true,
|
||||
"github.copilot.chat.codesearch.enabled": true,
|
||||
"github.copilot.chat.agent.thinkingTool": true,
|
||||
"github.copilot.chat.editor.temporalContext.enabled": true,
|
||||
"github.copilot.chat.edits.temporalContext.enabled": true,
|
||||
"github.copilot.chat.languageContext.fix.typescript.enabled": true,
|
||||
"github.copilot.chat.languageContext.inline.typescript.enabled": true,
|
||||
"github.copilot.chat.languageContext.typescript.enabled": true,
|
||||
"vim.highlightedyank.enable": true,
|
||||
"vim.showMarksInGutter": true,
|
||||
"telemetry.editStats.enabled": false,
|
||||
"telemetry.feedback.enabled": false,
|
||||
"inlineChat.enableV2": true,
|
||||
"git.blame.editorDecoration.enabled": true,
|
||||
"gitlens.plusFeatures.enabled": false,
|
||||
"javascript.inlayHints.parameterNames.enabled": "all",
|
||||
"javascript.inlayHints.propertyDeclarationTypes.enabled": true,
|
||||
"javascript.inlayHints.parameterTypes.enabled": true,
|
||||
"javascript.inlayHints.variableTypes.enabled": true,
|
||||
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
|
||||
"typescript.inlayHints.parameterNames.enabled": "all",
|
||||
"typescript.inlayHints.parameterTypes.enabled": true,
|
||||
"typescript.inlayHints.propertyDeclarationTypes.enabled": true,
|
||||
"typescript.inlayHints.variableTypes.enabled": true,
|
||||
"editor.inlayHints.fontFamily": "Sriracha",
|
||||
"github.copilot.nextEditSuggestions.enabled": true,
|
||||
"gitlens.ai.model": "vscode",
|
||||
"gitlens.ai.vscode.model": "copilot:gpt-4.1",
|
||||
"workbench.startupEditor": "none"
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
[general]
|
||||
import = [
|
||||
"~/.config/alacritty/themes/catppuccin_latte.toml"
|
||||
]
|
||||
|
||||
[font]
|
||||
normal = { family = "JetBrainsMonoNerdFontMono", style = "Regular" }
|
||||
bold = { family = "JetBrainsMonoNerdFontMono", style = "Bold" }
|
||||
italic = { family = "JetBrainsMonoNerdFontMono", style = "Italic" }
|
||||
bold_italic = { family = "JetBrainsMonoNerdFontMono", style = "BoldItalic" }
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = "Return"
|
||||
mods = "Shift"
|
||||
chars = "\u001b\r"
|
||||
@@ -1,76 +0,0 @@
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
background = '#EFF1F5' # base
|
||||
foreground = '#4C4F69' # text
|
||||
# Bright and dim foreground colors
|
||||
dim_foreground = '#4C4F69' # text
|
||||
bright_foreground = '#4C4F69' # text
|
||||
|
||||
# Cursor colors
|
||||
[colors.cursor]
|
||||
text = '#EFF1F5' # base
|
||||
cursor = '#DC8A78' # rosewater
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
text = '#EFF1F5' # base
|
||||
cursor = '#7287FD' # lavender
|
||||
|
||||
# Search colors
|
||||
[colors.search.matches]
|
||||
foreground = '#EFF1F5' # base
|
||||
background = '#6C6F85' # subtext0
|
||||
|
||||
[colors.search.focused_match]
|
||||
foreground = '#EFF1F5' # base
|
||||
background = '#40A02B' # green
|
||||
|
||||
[colors.footer_bar]
|
||||
foreground = '#EFF1F5' # base
|
||||
background = '#6C6F85' # subtext0
|
||||
|
||||
# Keyboard regex hints
|
||||
[colors.hints.start]
|
||||
foreground = '#EFF1F5' # base
|
||||
background = '#DF8E1D' # yellow
|
||||
|
||||
[colors.hints.end]
|
||||
foreground = '#EFF1F5' # base
|
||||
background = '#6C6F85' # subtext0
|
||||
|
||||
# Selection colors
|
||||
[colors.selection]
|
||||
text = '#EFF1F5' # base
|
||||
background = '#DC8A78' # rosewater
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#5C5F77' # subtext1
|
||||
red = '#D20F39' # red
|
||||
green = '#40A02B' # green
|
||||
yellow = '#DF8E1D' # yellow
|
||||
blue = '#1E66F5' # blue
|
||||
magenta = '#EA76CB' # pink
|
||||
cyan = '#179299' # teal
|
||||
white = '#ACB0BE' # surface2
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#6C6F85' # subtext0
|
||||
red = '#D20F39' # red
|
||||
green = '#40A02B' # green
|
||||
yellow = '#DF8E1D' # yellow
|
||||
blue = '#1E66F5' # blue
|
||||
magenta = '#EA76CB' # pink
|
||||
cyan = '#179299' # teal
|
||||
white = '#BCC0CC' # surface1
|
||||
|
||||
# Dim colors
|
||||
[colors.dim]
|
||||
black = '#5C5F77' # subtext1
|
||||
red = '#D20F39' # red
|
||||
green = '#40A02B' # green
|
||||
yellow = '#DF8E1D' # yellow
|
||||
blue = '#1E66F5' # blue
|
||||
magenta = '#EA76CB' # pink
|
||||
cyan = '#179299' # teal
|
||||
white = '#ACB0BE' # surface2
|
||||
@@ -1,21 +0,0 @@
|
||||
# https://docs.atuin.sh/configuration/config/
|
||||
|
||||
workspaces = true
|
||||
keymap_mode = "auto"
|
||||
enter_accept = true
|
||||
|
||||
history_filter = [
|
||||
"^cd$",
|
||||
"^lg$",
|
||||
"^ls$",
|
||||
"^clear$",
|
||||
"^vim$",
|
||||
"^youtube-dl"
|
||||
]
|
||||
|
||||
[search]
|
||||
## The list of enabled filter modes, in order of priority.
|
||||
## The "workspace" mode is skipped when not in a workspace or workspaces = false.
|
||||
## Default filter mode can be overridden with the filter_mode setting.
|
||||
#filters = [ "global", "host", "session", "session-preload", "workspace", "directory" ]
|
||||
filters = [ "global", "workspace", "directory" ]
|
||||
@@ -1 +0,0 @@
|
||||
--theme="Catppuccin Latte"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,286 +0,0 @@
|
||||
#? Config file for btop v.1.4.7
|
||||
|
||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||
color_theme = "/home/tgrosinger/.config/btop/themes/catppuccin_latte.theme"
|
||||
|
||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||
theme_background = true
|
||||
|
||||
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||
truecolor = true
|
||||
|
||||
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||
force_tty = false
|
||||
|
||||
#* Option to disable presets. Either the default preset, custom presets, or all presets.
|
||||
#* "Off" All presets are enabled.
|
||||
#* "Default" preset is disabled.#* "Custom" presets are disabled.#* "All" presets are disabled.
|
||||
disable_presets = "Off"
|
||||
|
||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||
#* Use whitespace " " as separator between different presets.
|
||||
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
|
||||
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
|
||||
|
||||
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||
vim_keys = false
|
||||
|
||||
#* Disable all mouse events.
|
||||
disable_mouse = false
|
||||
|
||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||
rounded_corners = true
|
||||
|
||||
#* Use terminal synchronized output sequences to reduce flickering on supported terminals.
|
||||
terminal_sync = true
|
||||
|
||||
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
||||
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||
#* "block" has half the resolution of braille but uses more common characters.
|
||||
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
|
||||
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
|
||||
graph_symbol = "braille"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_cpu = "default"
|
||||
|
||||
# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_gpu = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_mem = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_net = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_proc = "default"
|
||||
|
||||
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||
shown_boxes = "cpu mem net proc"
|
||||
|
||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||
update_ms = 2000
|
||||
|
||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||
proc_sorting = "cpu lazy"
|
||||
|
||||
#* Reverse sorting order, True or False.
|
||||
proc_reversed = false
|
||||
|
||||
#* Show processes as a tree.
|
||||
proc_tree = true
|
||||
|
||||
#* Use the cpu graph colors in the process list.
|
||||
proc_colors = true
|
||||
|
||||
#* Use a darkening gradient in the process list.
|
||||
proc_gradient = true
|
||||
|
||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||
proc_per_core = true
|
||||
|
||||
#* Show process memory as bytes instead of percent.
|
||||
proc_mem_bytes = true
|
||||
|
||||
#* Show cpu graph for each process.
|
||||
proc_cpu_graphs = true
|
||||
|
||||
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||
proc_info_smaps = false
|
||||
|
||||
#* Show proc box on left side of screen instead of right.
|
||||
proc_left = false
|
||||
|
||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||
proc_filter_kernel = false
|
||||
|
||||
#* Should the process list follow the selected process when detailed view is open.
|
||||
proc_follow_detailed = true
|
||||
|
||||
#* In tree-view, always accumulate child process resources in the parent process.
|
||||
proc_aggregate = false
|
||||
|
||||
#* Should cpu and memory usage display be preserved for dead processes when paused.
|
||||
keep_dead_proc_usage = false
|
||||
|
||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
cpu_graph_upper = "Auto"
|
||||
|
||||
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
cpu_graph_lower = "Auto"
|
||||
|
||||
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
|
||||
show_gpu_info = "Auto"
|
||||
|
||||
#* Toggles if the lower CPU graph should be inverted.
|
||||
cpu_invert_lower = true
|
||||
|
||||
#* Set to True to completely disable the lower CPU graph.
|
||||
cpu_single_graph = false
|
||||
|
||||
#* Show cpu box at bottom of screen instead of top.
|
||||
cpu_bottom = false
|
||||
|
||||
#* Shows the system uptime in the CPU box.
|
||||
show_uptime = true
|
||||
|
||||
#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo.
|
||||
show_cpu_watts = true
|
||||
|
||||
#* Show cpu temperature.
|
||||
check_temp = true
|
||||
|
||||
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||
cpu_sensor = "Auto"
|
||||
|
||||
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||
show_coretemp = true
|
||||
|
||||
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
||||
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
||||
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
|
||||
#* Example: "4:0 5:1 6:3"
|
||||
cpu_core_map = ""
|
||||
|
||||
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
|
||||
temp_scale = "celsius"
|
||||
|
||||
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||
base_10_sizes = false
|
||||
|
||||
#* Show CPU frequency.
|
||||
show_cpu_freq = true
|
||||
|
||||
#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average".
|
||||
freq_mode = "first"
|
||||
|
||||
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
||||
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
||||
clock_format = "%X"
|
||||
|
||||
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
|
||||
background_update = true
|
||||
|
||||
#* Custom cpu model name, empty string to disable.
|
||||
custom_cpu_name = ""
|
||||
|
||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
|
||||
disks_filter = ""
|
||||
|
||||
#* Show graphs instead of meters for memory values.
|
||||
mem_graphs = true
|
||||
|
||||
#* Show mem box below net box instead of above.
|
||||
mem_below_net = false
|
||||
|
||||
#* Count ZFS ARC in cached and available memory.
|
||||
zfs_arc_cached = true
|
||||
|
||||
#* If swap memory should be shown in memory box.
|
||||
show_swap = true
|
||||
|
||||
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||
swap_disk = true
|
||||
|
||||
#* If mem box should be split to also show disks info.
|
||||
show_disks = true
|
||||
|
||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||
only_physical = true
|
||||
|
||||
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||
use_fstab = true
|
||||
|
||||
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||
zfs_hide_datasets = false
|
||||
|
||||
#* Set to true to show available disk space for privileged users.
|
||||
disk_free_priv = false
|
||||
|
||||
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||
show_io_stat = true
|
||||
|
||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||
io_mode = false
|
||||
|
||||
#* Set to True to show combined read/write io graphs in io mode.
|
||||
io_graph_combined = false
|
||||
|
||||
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||
io_graph_speeds = ""
|
||||
|
||||
#* Swap the positions of the upload and download speed graphs. When true, upload will be on top.
|
||||
swap_upload_download = false
|
||||
|
||||
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
|
||||
net_download = 100
|
||||
|
||||
net_upload = 100
|
||||
|
||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||
net_auto = true
|
||||
|
||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||
net_sync = true
|
||||
|
||||
#* Starts with the Network Interface specified here.
|
||||
net_iface = ""
|
||||
|
||||
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
|
||||
base_10_bitrate = "Auto"
|
||||
|
||||
#* Show battery stats in top right if battery is present.
|
||||
show_battery = true
|
||||
|
||||
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||
selected_battery = "Auto"
|
||||
|
||||
#* Show power stats of battery next to charge indicator.
|
||||
show_battery_watts = true
|
||||
|
||||
#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||
log_level = "WARNING"
|
||||
|
||||
#* Automatically save current settings to config file on exit.
|
||||
save_config_on_exit = true
|
||||
|
||||
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||
nvml_measure_pcie_speeds = true
|
||||
|
||||
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||
rsmi_measure_pcie_speeds = true
|
||||
|
||||
#* Horizontally mirror the GPU graph.
|
||||
gpu_mirror_graph = true
|
||||
|
||||
#* Set which GPU vendors to show. Available values are "nvidia amd intel apple"
|
||||
shown_gpus = "nvidia amd intel"
|
||||
|
||||
#* Custom gpu0 model name, empty string to disable.
|
||||
custom_gpu_name0 = ""
|
||||
|
||||
#* Custom gpu1 model name, empty string to disable.
|
||||
custom_gpu_name1 = ""
|
||||
|
||||
#* Custom gpu2 model name, empty string to disable.
|
||||
custom_gpu_name2 = ""
|
||||
|
||||
#* Custom gpu3 model name, empty string to disable.
|
||||
custom_gpu_name3 = ""
|
||||
|
||||
#* Custom gpu4 model name, empty string to disable.
|
||||
custom_gpu_name4 = ""
|
||||
|
||||
#* Custom gpu5 model name, empty string to disable.
|
||||
custom_gpu_name5 = ""
|
||||
@@ -1,83 +0,0 @@
|
||||
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||
theme[main_bg]="#eff1f5"
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]="#4c4f69"
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]="#4c4f69"
|
||||
|
||||
# Highlight color for keyboard shortcuts
|
||||
theme[hi_fg]="#1e66f5"
|
||||
|
||||
# Background color of selected item in processes box
|
||||
theme[selected_bg]="#bcc0cc"
|
||||
|
||||
# Foreground color of selected item in processes box
|
||||
theme[selected_fg]="#1e66f5"
|
||||
|
||||
# Color of inactive/disabled text
|
||||
theme[inactive_fg]="#8c8fa1"
|
||||
|
||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||
theme[graph_text]="#dc8a78"
|
||||
|
||||
# Background color of the percentage meters
|
||||
theme[meter_bg]="#bcc0cc"
|
||||
|
||||
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
|
||||
theme[proc_misc]="#dc8a78"
|
||||
|
||||
# CPU, Memory, Network, Proc box outline colors
|
||||
theme[cpu_box]="#8839ef" #Mauve
|
||||
theme[mem_box]="#40a02b" #Green
|
||||
theme[net_box]="#e64553" #Maroon
|
||||
theme[proc_box]="#1e66f5" #Blue
|
||||
|
||||
# Box divider line and small boxes line color
|
||||
theme[div_line]="#9ca0b0"
|
||||
|
||||
# Temperature graph color (Green -> Yellow -> Red)
|
||||
theme[temp_start]="#40a02b"
|
||||
theme[temp_mid]="#df8e1d"
|
||||
theme[temp_end]="#d20f39"
|
||||
|
||||
# CPU graph colors (Teal -> Lavender)
|
||||
theme[cpu_start]="#179299"
|
||||
theme[cpu_mid]="#209fb5"
|
||||
theme[cpu_end]="#7287fd"
|
||||
|
||||
# Mem/Disk free meter (Mauve -> Lavender -> Blue)
|
||||
theme[free_start]="#8839ef"
|
||||
theme[free_mid]="#7287fd"
|
||||
theme[free_end]="#1e66f5"
|
||||
|
||||
# Mem/Disk cached meter (Sapphire -> Lavender)
|
||||
theme[cached_start]="#209fb5"
|
||||
theme[cached_mid]="#1e66f5"
|
||||
theme[cached_end]="#7287fd"
|
||||
|
||||
# Mem/Disk available meter (Peach -> Red)
|
||||
theme[available_start]="#fe640b"
|
||||
theme[available_mid]="#e64553"
|
||||
theme[available_end]="#d20f39"
|
||||
|
||||
# Mem/Disk used meter (Green -> Sky)
|
||||
theme[used_start]="#40a02b"
|
||||
theme[used_mid]="#179299"
|
||||
theme[used_end]="#04a5e5"
|
||||
|
||||
# Download graph colors (Peach -> Red)
|
||||
theme[download_start]="#fe640b"
|
||||
theme[download_mid]="#e64553"
|
||||
theme[download_end]="#d20f39"
|
||||
|
||||
# Upload graph colors (Green -> Sky)
|
||||
theme[upload_start]="#40a02b"
|
||||
theme[upload_mid]="#179299"
|
||||
theme[upload_end]="#04a5e5"
|
||||
|
||||
# Process box color gradient for threads, mem and cpu usage (Sapphire -> Mauve)
|
||||
theme[process_start]="#209fb5"
|
||||
theme[process_mid]="#7287fd"
|
||||
theme[process_end]="#8839ef"
|
||||
@@ -1,123 +0,0 @@
|
||||
[delta "catppuccin-latte"]
|
||||
blame-palette = "#eff1f5 #e6e9ef #dce0e8 #ccd0da #bcc0cc"
|
||||
commit-decoration-style = "#9ca0b0" bold box ul
|
||||
light = true
|
||||
file-decoration-style = "#9ca0b0"
|
||||
file-style = "#4c4f69"
|
||||
hunk-header-decoration-style = "#9ca0b0" box ul
|
||||
hunk-header-file-style = bold
|
||||
hunk-header-line-number-style = bold "#6c6f85"
|
||||
hunk-header-style = file line-number syntax
|
||||
line-numbers-left-style = "#9ca0b0"
|
||||
line-numbers-minus-style = bold "#d20f39"
|
||||
line-numbers-plus-style = bold "#40a02b"
|
||||
line-numbers-right-style = "#9ca0b0"
|
||||
line-numbers-zero-style = "#9ca0b0"
|
||||
# 35% red 65% base
|
||||
minus-emph-style = bold syntax "#e5a2b3"
|
||||
# 20% red 80% base
|
||||
minus-style = syntax "#e9c4cf"
|
||||
# 35% green 65% base
|
||||
plus-emph-style = bold syntax "#b2d5ae"
|
||||
# 20% green 80% base
|
||||
plus-style = syntax "#cce1cd"
|
||||
map-styles = \
|
||||
bold purple => syntax "#cbb1f2", \
|
||||
bold blue => syntax "#a6c1f5", \
|
||||
bold cyan => syntax "#9dd7ef", \
|
||||
bold yellow => syntax "#eacfa9"
|
||||
# Should match the name of the bat theme
|
||||
syntax-theme = Catppuccin Latte
|
||||
|
||||
[delta "catppuccin-frappe"]
|
||||
blame-palette = "#303446 #292c3c #232634 #414559 #51576d"
|
||||
commit-decoration-style = "#737994" bold box ul
|
||||
dark = true
|
||||
file-decoration-style = "#737994"
|
||||
file-style = "#c6d0f5"
|
||||
hunk-header-decoration-style = "#737994" box ul
|
||||
hunk-header-file-style = bold
|
||||
hunk-header-line-number-style = bold "#a5adce"
|
||||
hunk-header-style = file line-number syntax
|
||||
line-numbers-left-style = "#737994"
|
||||
line-numbers-minus-style = bold "#e78284"
|
||||
line-numbers-plus-style = bold "#a6d189"
|
||||
line-numbers-right-style = "#737994"
|
||||
line-numbers-zero-style = "#737994"
|
||||
# 35% red 65% base
|
||||
minus-emph-style = bold syntax "#704f5c"
|
||||
# 20% red 80% base
|
||||
minus-style = syntax "#544452"
|
||||
# 35% green 65% base
|
||||
plus-emph-style = bold syntax "#596b5e"
|
||||
# 20% green 80% base
|
||||
plus-style = syntax "#475453"
|
||||
map-styles = \
|
||||
bold purple => syntax "#66597e", \
|
||||
bold blue => syntax "#505d81", \
|
||||
bold cyan => syntax "#546b7a", \
|
||||
bold yellow => syntax "#6f6860"
|
||||
# Should match the name of the bat theme
|
||||
syntax-theme = Catppuccin Frappe
|
||||
|
||||
[delta "catppuccin-macchiato"]
|
||||
blame-palette = "#24273a #1e2030 #181926 #363a4f #494d64"
|
||||
commit-decoration-style = "#6e738d" bold box ul
|
||||
dark = true
|
||||
file-decoration-style = "#6e738d"
|
||||
file-style = "#cad3f5"
|
||||
hunk-header-decoration-style = "#6e738d" box ul
|
||||
hunk-header-file-style = bold
|
||||
hunk-header-line-number-style = bold "#a5adcb"
|
||||
hunk-header-style = file line-number syntax
|
||||
line-numbers-left-style = "#6e738d"
|
||||
line-numbers-minus-style = bold "#ed8796"
|
||||
line-numbers-plus-style = bold "#a6da95"
|
||||
line-numbers-right-style = "#6e738d"
|
||||
line-numbers-zero-style = "#6e738d"
|
||||
# 35% red 65% base
|
||||
minus-emph-style = bold syntax "#6a485a"
|
||||
# 20% red 80% base
|
||||
minus-style = syntax "#4c3a4c"
|
||||
# 35% green 65% base
|
||||
plus-emph-style = bold syntax "#51655a"
|
||||
# 20% green 80% base
|
||||
plus-style = syntax "#3e4b4c"
|
||||
map-styles = \
|
||||
bold purple => syntax "#5c517c", \
|
||||
bold blue => syntax "#47557b", \
|
||||
bold cyan => syntax "#4a6475", \
|
||||
bold yellow => syntax "#6a635d"
|
||||
# Should match the name of the bat theme
|
||||
syntax-theme = Catppuccin Macchiato
|
||||
|
||||
[delta "catppuccin-mocha"]
|
||||
blame-palette = "#1e1e2e #181825 #11111b #313244 #45475a"
|
||||
commit-decoration-style = "#6c7086" bold box ul
|
||||
dark = true
|
||||
file-decoration-style = "#6c7086"
|
||||
file-style = "#cdd6f4"
|
||||
hunk-header-decoration-style = "#6c7086" box ul
|
||||
hunk-header-file-style = bold
|
||||
hunk-header-line-number-style = bold "#a6adc8"
|
||||
hunk-header-style = file line-number syntax
|
||||
line-numbers-left-style = "#6c7086"
|
||||
line-numbers-minus-style = bold "#f38ba8"
|
||||
line-numbers-plus-style = bold "#a6e3a1"
|
||||
line-numbers-right-style = "#6c7086"
|
||||
line-numbers-zero-style = "#6c7086"
|
||||
# 35% red 65% base
|
||||
minus-emph-style = bold syntax "#694559"
|
||||
# 20% red 80% base
|
||||
minus-style = syntax "#493447"
|
||||
# 35% green 65% base
|
||||
plus-emph-style = bold syntax "#4e6356"
|
||||
# 20% green 80% base
|
||||
plus-style = syntax "#394545"
|
||||
map-styles = \
|
||||
bold purple => syntax "#5b4e74", \
|
||||
bold blue => syntax "#445375", \
|
||||
bold cyan => syntax "#446170", \
|
||||
bold yellow => syntax "#6b635b"
|
||||
# Should match the name of the bat theme
|
||||
syntax-theme = Catppuccin Mocha
|
||||
@@ -1,23 +0,0 @@
|
||||
|
||||
#
|
||||
# Catppuccin Latte
|
||||
# https://github.com/catppuccin/dunst/blob/main/themes/latte.conf
|
||||
#
|
||||
|
||||
[global]
|
||||
frame_color = "#1e66f5"
|
||||
separator_color= frame
|
||||
highlight = "#1e66f5"
|
||||
|
||||
[urgency_low]
|
||||
background = "#eff1f5"
|
||||
foreground = "#4c4f69"
|
||||
|
||||
[urgency_normal]
|
||||
background = "#eff1f5"
|
||||
foreground = "#4c4f69"
|
||||
|
||||
[urgency_critical]
|
||||
background = "#eff1f5"
|
||||
foreground = "#4c4f69"
|
||||
frame_color = "#fe640b"
|
||||
@@ -1,268 +0,0 @@
|
||||
# Fish Shell Completions
|
||||
# Copy or symlink to $XDG_CONFIG_HOME/fish/completions/bat.fish
|
||||
# ($XDG_CONFIG_HOME is usually set to ~/.config)
|
||||
|
||||
# `bat` is `batcat` on Debian and Ubuntu
|
||||
set bat bat
|
||||
|
||||
# Helper functions:
|
||||
|
||||
function __bat_complete_files -a token
|
||||
# Cheat to complete files by calling `complete -C` on a fake command name,
|
||||
# like `__fish_complete_directories` does.
|
||||
set -l fake_command aaabccccdeeeeefffffffffgghhhhhhiiiii
|
||||
complete -C"$fake_command $token"
|
||||
end
|
||||
|
||||
function __bat_complete_one_language -a comp
|
||||
command $bat --list-languages | string split -f1 : | string match -e "$comp"
|
||||
end
|
||||
|
||||
function __bat_complete_list_languages
|
||||
for spec in (command $bat --list-languages)
|
||||
set -l name (string split -f1 : $spec)
|
||||
for ext in (string split -f2 : $spec | string split ,)
|
||||
test -n "$ext"; or continue
|
||||
string match -rq '[/*]' $ext; and continue
|
||||
printf "%s\t%s\n" $ext $name
|
||||
end
|
||||
printf "%s\t\n" $name
|
||||
end
|
||||
end
|
||||
|
||||
function __bat_complete_map_syntax
|
||||
set -l token (commandline -ct)
|
||||
|
||||
if string match -qr '(?<glob>.+):(?<syntax>.*)' -- $token
|
||||
# If token ends with a colon, complete with the list of language names.
|
||||
set -f comps $glob:(__bat_complete_one_language $syntax)
|
||||
else if string match -qr '\*' -- $token
|
||||
# If token contains a globbing character (`*`), complete only possible
|
||||
# globs in the current directory
|
||||
set -f comps (__bat_complete_files $token | string match -er '[*]'):
|
||||
else
|
||||
# Complete files (and globs).
|
||||
set -f comps (__bat_complete_files $token | string match -erv '/$'):
|
||||
end
|
||||
|
||||
if set -q comps[1]
|
||||
printf "%s\t\n" $comps
|
||||
end
|
||||
end
|
||||
|
||||
function __bat_cache_subcommand
|
||||
__fish_seen_subcommand_from cache
|
||||
end
|
||||
|
||||
# Returns true if no exclusive arguments seen.
|
||||
function __bat_no_excl_args
|
||||
not __bat_cache_subcommand; and not __fish_seen_argument \
|
||||
-s h -l help \
|
||||
-s V -l version \
|
||||
-l acknowledgements \
|
||||
-l config-dir -l config-file \
|
||||
-l diagnostic \
|
||||
-l list-languages -l list-themes
|
||||
end
|
||||
|
||||
# Returns true if the 'cache' subcommand is seen without any exclusive arguments.
|
||||
function __bat_cache_no_excl
|
||||
__bat_cache_subcommand; and not __fish_seen_argument \
|
||||
-s h -l help \
|
||||
-l acknowledgements -l build -l clear
|
||||
end
|
||||
|
||||
function __bat_style_opts
|
||||
set -l style_opts \
|
||||
"default,recommended components" \
|
||||
"auto,same as 'default' unless piped" \
|
||||
"full,all components" \
|
||||
"plain,no components" \
|
||||
"changes,Git change markers" \
|
||||
"header,alias for header-filename" \
|
||||
"header-filename,filename above content" \
|
||||
"header-filesize,filesize above content" \
|
||||
"grid,lines b/w sidebar/header/content" \
|
||||
"numbers,line numbers in sidebar" \
|
||||
"rule,separate files" \
|
||||
"snip,separate ranges"
|
||||
|
||||
string replace , \t $style_opts
|
||||
end
|
||||
|
||||
# Use option argument descriptions to indicate which is the default, saving
|
||||
# horizontal space and making sure the option description isn't truncated.
|
||||
set -l color_opts '
|
||||
auto\tdefault
|
||||
never\t
|
||||
always\t
|
||||
'
|
||||
set -l decorations_opts $color_opts
|
||||
set -l paging_opts $color_opts
|
||||
|
||||
# Include some examples so we can indicate the default.
|
||||
set -l pager_opts '
|
||||
less\tdefault
|
||||
less\ -FR\t
|
||||
more\t
|
||||
vimpager\t
|
||||
builtin\t
|
||||
'
|
||||
|
||||
set -l italic_text_opts '
|
||||
always\t
|
||||
never\tdefault
|
||||
'
|
||||
|
||||
set -l wrap_opts '
|
||||
auto\tdefault
|
||||
never\t
|
||||
character\t
|
||||
'
|
||||
|
||||
# While --tabs theoretically takes any number, most people should be OK with these.
|
||||
# Specifying a list lets us explain what 0 does.
|
||||
set -l tabs_opts '
|
||||
0\tpass\ tabs\ through\ directly
|
||||
1\t
|
||||
2\t
|
||||
4\t
|
||||
8\t
|
||||
'
|
||||
|
||||
set -l special_themes '
|
||||
auto\tdefault,\ Choose\ a\ theme\ based\ on\ dark\ or\ light\ mode
|
||||
auto:always\tChoose\ a\ theme\ based\ on\ dark\ or\ light\ mode
|
||||
auto:system\tChoose\ a\ theme\ based\ on\ dark\ or\ light\ mode
|
||||
dark\tUse\ the\ theme\ specified\ by\ --theme-dark
|
||||
light\tUse\ the\ theme\ specified\ by\ --theme-light
|
||||
'
|
||||
|
||||
# Completions:
|
||||
|
||||
complete -c $bat -l acknowledgements -d "Print acknowledgements" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l binary -x -a "no-printing as-text" -d "How to treat binary content" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l cache-dir -f -d "Show bat's cache directory" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -s c -l chop-long-lines -d "Truncate all lines longer than screen width" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l color -x -a "$color_opts" -d "When to use colored output" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l completion -x -a "bash fish zsh ps1" -d "Show shell completion for a certain shell" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l config-dir -f -d "Display location of configuration directory" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l config-file -f -d "Display location of configuration file" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l decorations -x -a "$decorations_opts" -d "When to use --style decorations" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l diagnostic -d "Print diagnostic info for bug reports" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -s d -l diff -d "Only show lines with Git changes" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l diff-context -x -d "Show N context lines around Git changes" -n "__fish_seen_argument -s d -l diff"
|
||||
|
||||
complete -c $bat -l generate-config-file -f -d "Generates a default configuration file" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l file-name -x -d "Specify the display name" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s f -l force-colorization -d "Force color and decorations" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s h -d "Print a concise overview" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l help -f -d "Print all help information" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -s H -l highlight-line -x -d "Highlight line(s) N[:M]" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l ignored-suffix -x -d "Ignore extension" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l italic-text -x -a "$italic_text_opts" -d "When to use italic text in the output" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s l -l language -x -k -a "(__bat_complete_list_languages)" -d "Set the syntax highlighting language" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l lessopen -d "Enable the $LESSOPEN preprocessor" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -s r -l line-range -x -d "Only print lines [M]:[N] (either optional)" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l list-languages -f -d "List syntax highlighting languages" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l list-themes -f -d "List syntax highlighting themes" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -s m -l map-syntax -x -a "(__bat_complete_map_syntax)" -d "Map <glob pattern>:<language syntax>" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l no-config -d "Do not use the configuration file"
|
||||
|
||||
complete -c $bat -l no-custom-assets -d "Do not load custom assets"
|
||||
|
||||
complete -c $bat -l no-lessopen -d "Disable the $LESSOPEN preprocessor if enabled (overrides --lessopen)"
|
||||
|
||||
complete -c $bat -l nonprintable-notation -x -a "unicode caret" -d "Set notation for non-printable characters" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s n -l number -d "Only show line numbers, no other decorations" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l no-paging -d "Alias for --paging=never" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l pager -x -a "$pager_opts" -d "Which pager to use" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l paging -x -a "$paging_opts" -d "When to use the pager" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s p -l plain -d "Show plain style" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l set-terminal-title -d "Sets terminal title to filenames when using a pager" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s A -l show-all -d "Show non-printable characters" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s s -l squeeze-blank -d "Squeeze consecutive empty lines into a single empty line" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l squeeze-limit -x -d "Set the maximum number of consecutive empty lines to be printed" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l strip-ansi -x -a "auto never always" -d "Specify when to strip ANSI escape sequences from the input" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s p -l plain -d "Disable decorations" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -o pp -d "Disable decorations and paging" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s P -d "Disable paging" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l style -x -k -a "(__fish_complete_list , __bat_style_opts)" -d "Specify which non-content elements to display" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l tabs -x -a "$tabs_opts" -d "Set tab width" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l terminal-width -x -d "Set terminal <width>, +<offset>, or -<offset>" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l theme -x -a "$special_themes(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l theme-dark -x -a "(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme for dark backgrounds" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -l theme-light -x -a "(command $bat --list-themes | command cat)" -d "Set the syntax highlighting theme for light backgrounds" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s u -l unbuffered -d "This option exists for POSIX-compliance reasons" -n __bat_no_excl_args
|
||||
|
||||
complete -c $bat -s V -l version -f -d "Show version information" -n __fish_is_first_arg
|
||||
|
||||
complete -c $bat -l wrap -x -a "$wrap_opts" -d "Text-wrapping mode" -n __bat_no_excl_args
|
||||
|
||||
# Sub-command 'cache' completions
|
||||
## Completion of the 'cache' command itself is removed for better UX
|
||||
## See https://github.com/sharkdp/bat/issues/2085#issuecomment-1271646802
|
||||
|
||||
complete -c $bat -l build -f -d "Parse new definitions into cache" -n __bat_cache_no_excl
|
||||
|
||||
complete -c $bat -l clear -f -d "Reset definitions to defaults" -n __bat_cache_no_excl
|
||||
|
||||
complete -c $bat -l blank -f -d "Create new data instead of appending" -n "__bat_cache_subcommand; and not __fish_seen_argument -l clear"
|
||||
|
||||
complete -c $bat -l source -x -a "(__fish_complete_directories)" -d "Load syntaxes and themes from DIR" -n "__bat_cache_subcommand; and not __fish_seen_argument -l clear"
|
||||
|
||||
complete -c $bat -l target -x -a "(__fish_complete_directories)" -d "Store cache in DIR" -n __bat_cache_subcommand
|
||||
|
||||
complete -c $bat -l acknowledgements -d "Build acknowledgements.bin" -n __bat_cache_no_excl
|
||||
|
||||
complete -c $bat -s h -d "Print a concise overview of $bat-cache help" -n __bat_cache_no_excl
|
||||
|
||||
complete -c $bat -l help -f -d "Print all $bat-cache help" -n __bat_cache_no_excl
|
||||
|
||||
# vim:ft=fish
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
complete -c dev-switch -f -a '(git worktree list --porcelain 2>/dev/null | string match "worktree *" | string replace "worktree " "" | while read -l p; basename $p; end)'
|
||||
@@ -1,27 +0,0 @@
|
||||
function __dev_wt_completions
|
||||
# Existing worktrees: dev-wt matches by directory basename or branch name,
|
||||
# so offer both. Track branches that already have a worktree to avoid
|
||||
# duplicating them in the "create new" list below.
|
||||
set -l wt_branches
|
||||
set -l path ""
|
||||
for line in (git worktree list --porcelain 2>/dev/null)
|
||||
if string match -q "worktree *" -- $line
|
||||
set path (string replace "worktree " "" -- $line)
|
||||
printf '%s\tworktree\n' (basename $path)
|
||||
else if string match -q "branch *" -- $line
|
||||
set -l branch (string replace "branch refs/heads/" "" -- $line)
|
||||
set -a wt_branches $branch
|
||||
printf '%s\tworktree branch\n' $branch
|
||||
end
|
||||
end
|
||||
|
||||
# Remaining local branches: selecting one creates a new worktree for it.
|
||||
for branch in (git for-each-ref --format='%(refname:short)' refs/heads 2>/dev/null)
|
||||
if not contains -- $branch $wt_branches
|
||||
printf '%s\tbranch\n' $branch
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
complete -c dev-wt -f -n __fish_is_first_arg -a '(__dev_wt_completions)'
|
||||
complete -c dev-wt -s C -l repo -r -a '(__fish_complete_directories)' -d 'Operate on the repo at this path'
|
||||
@@ -1,235 +0,0 @@
|
||||
# fish completion for devbox -*- shell-script -*-
|
||||
|
||||
function __devbox_debug
|
||||
set -l file "$BASH_COMP_DEBUG_FILE"
|
||||
if test -n "$file"
|
||||
echo "$argv" >> $file
|
||||
end
|
||||
end
|
||||
|
||||
function __devbox_perform_completion
|
||||
__devbox_debug "Starting __devbox_perform_completion"
|
||||
|
||||
# Extract all args except the last one
|
||||
set -l args (commandline -opc)
|
||||
# Extract the last arg and escape it in case it is a space
|
||||
set -l lastArg (string escape -- (commandline -ct))
|
||||
|
||||
__devbox_debug "args: $args"
|
||||
__devbox_debug "last arg: $lastArg"
|
||||
|
||||
# Disable ActiveHelp which is not supported for fish shell
|
||||
set -l requestComp "DEVBOX_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
|
||||
|
||||
__devbox_debug "Calling $requestComp"
|
||||
set -l results (eval $requestComp 2> /dev/null)
|
||||
|
||||
# Some programs may output extra empty lines after the directive.
|
||||
# Let's ignore them or else it will break completion.
|
||||
# Ref: https://github.com/spf13/cobra/issues/1279
|
||||
for line in $results[-1..1]
|
||||
if test (string trim -- $line) = ""
|
||||
# Found an empty line, remove it
|
||||
set results $results[1..-2]
|
||||
else
|
||||
# Found non-empty line, we have our proper output
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
set -l comps $results[1..-2]
|
||||
set -l directiveLine $results[-1]
|
||||
|
||||
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
|
||||
# completions must be prefixed with the flag
|
||||
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
|
||||
|
||||
__devbox_debug "Comps: $comps"
|
||||
__devbox_debug "DirectiveLine: $directiveLine"
|
||||
__devbox_debug "flagPrefix: $flagPrefix"
|
||||
|
||||
for comp in $comps
|
||||
printf "%s%s\n" "$flagPrefix" "$comp"
|
||||
end
|
||||
|
||||
printf "%s\n" "$directiveLine"
|
||||
end
|
||||
|
||||
# this function limits calls to __devbox_perform_completion, by caching the result behind $__devbox_perform_completion_once_result
|
||||
function __devbox_perform_completion_once
|
||||
__devbox_debug "Starting __devbox_perform_completion_once"
|
||||
|
||||
if test -n "$__devbox_perform_completion_once_result"
|
||||
__devbox_debug "Seems like a valid result already exists, skipping __devbox_perform_completion"
|
||||
return 0
|
||||
end
|
||||
|
||||
set --global __devbox_perform_completion_once_result (__devbox_perform_completion)
|
||||
if test -z "$__devbox_perform_completion_once_result"
|
||||
__devbox_debug "No completions, probably due to a failure"
|
||||
return 1
|
||||
end
|
||||
|
||||
__devbox_debug "Performed completions and set __devbox_perform_completion_once_result"
|
||||
return 0
|
||||
end
|
||||
|
||||
# this function is used to clear the $__devbox_perform_completion_once_result variable after completions are run
|
||||
function __devbox_clear_perform_completion_once_result
|
||||
__devbox_debug ""
|
||||
__devbox_debug "========= clearing previously set __devbox_perform_completion_once_result variable =========="
|
||||
set --erase __devbox_perform_completion_once_result
|
||||
__devbox_debug "Successfully erased the variable __devbox_perform_completion_once_result"
|
||||
end
|
||||
|
||||
function __devbox_requires_order_preservation
|
||||
__devbox_debug ""
|
||||
__devbox_debug "========= checking if order preservation is required =========="
|
||||
|
||||
__devbox_perform_completion_once
|
||||
if test -z "$__devbox_perform_completion_once_result"
|
||||
__devbox_debug "Error determining if order preservation is required"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__devbox_perform_completion_once_result[-1])
|
||||
__devbox_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveKeepOrder 32
|
||||
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
|
||||
__devbox_debug "Keeporder is: $keeporder"
|
||||
|
||||
if test $keeporder -ne 0
|
||||
__devbox_debug "This does require order preservation"
|
||||
return 0
|
||||
end
|
||||
|
||||
__devbox_debug "This doesn't require order preservation"
|
||||
return 1
|
||||
end
|
||||
|
||||
|
||||
# This function does two things:
|
||||
# - Obtain the completions and store them in the global __devbox_comp_results
|
||||
# - Return false if file completion should be performed
|
||||
function __devbox_prepare_completions
|
||||
__devbox_debug ""
|
||||
__devbox_debug "========= starting completion logic =========="
|
||||
|
||||
# Start fresh
|
||||
set --erase __devbox_comp_results
|
||||
|
||||
__devbox_perform_completion_once
|
||||
__devbox_debug "Completion results: $__devbox_perform_completion_once_result"
|
||||
|
||||
if test -z "$__devbox_perform_completion_once_result"
|
||||
__devbox_debug "No completion, probably due to a failure"
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__devbox_perform_completion_once_result[-1])
|
||||
set --global __devbox_comp_results $__devbox_perform_completion_once_result[1..-2]
|
||||
|
||||
__devbox_debug "Completions are: $__devbox_comp_results"
|
||||
__devbox_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveError 1
|
||||
set -l shellCompDirectiveNoSpace 2
|
||||
set -l shellCompDirectiveNoFileComp 4
|
||||
set -l shellCompDirectiveFilterFileExt 8
|
||||
set -l shellCompDirectiveFilterDirs 16
|
||||
|
||||
if test -z "$directive"
|
||||
set directive 0
|
||||
end
|
||||
|
||||
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
|
||||
if test $compErr -eq 1
|
||||
__devbox_debug "Received error directive: aborting."
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
|
||||
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
|
||||
if test $filefilter -eq 1; or test $dirfilter -eq 1
|
||||
__devbox_debug "File extension filtering or directory filtering not supported"
|
||||
# Do full file completion instead
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
|
||||
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
|
||||
|
||||
__devbox_debug "nospace: $nospace, nofiles: $nofiles"
|
||||
|
||||
# If we want to prevent a space, or if file completion is NOT disabled,
|
||||
# we need to count the number of valid completions.
|
||||
# To do so, we will filter on prefix as the completions we have received
|
||||
# may not already be filtered so as to allow fish to match on different
|
||||
# criteria than the prefix.
|
||||
if test $nospace -ne 0; or test $nofiles -eq 0
|
||||
set -l prefix (commandline -t | string escape --style=regex)
|
||||
__devbox_debug "prefix: $prefix"
|
||||
|
||||
set -l completions (string match -r -- "^$prefix.*" $__devbox_comp_results)
|
||||
set --global __devbox_comp_results $completions
|
||||
__devbox_debug "Filtered completions are: $__devbox_comp_results"
|
||||
|
||||
# Important not to quote the variable for count to work
|
||||
set -l numComps (count $__devbox_comp_results)
|
||||
__devbox_debug "numComps: $numComps"
|
||||
|
||||
if test $numComps -eq 1; and test $nospace -ne 0
|
||||
# We must first split on \t to get rid of the descriptions to be
|
||||
# able to check what the actual completion will be.
|
||||
# We don't need descriptions anyway since there is only a single
|
||||
# real completion which the shell will expand immediately.
|
||||
set -l split (string split --max 1 \t $__devbox_comp_results[1])
|
||||
|
||||
# Fish won't add a space if the completion ends with any
|
||||
# of the following characters: @=/:.,
|
||||
set -l lastChar (string sub -s -1 -- $split)
|
||||
if not string match -r -q "[@=/:.,]" -- "$lastChar"
|
||||
# In other cases, to support the "nospace" directive we trick the shell
|
||||
# by outputting an extra, longer completion.
|
||||
__devbox_debug "Adding second completion to perform nospace directive"
|
||||
set --global __devbox_comp_results $split[1] $split[1].
|
||||
__devbox_debug "Completions are now: $__devbox_comp_results"
|
||||
end
|
||||
end
|
||||
|
||||
if test $numComps -eq 0; and test $nofiles -eq 0
|
||||
# To be consistent with bash and zsh, we only trigger file
|
||||
# completion when there are no other completions
|
||||
__devbox_debug "Requesting file completion"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
|
||||
# so we can properly delete any completions provided by another script.
|
||||
# Only do this if the program can be found, or else fish may print some errors; besides,
|
||||
# the existing completions will only be loaded if the program can be found.
|
||||
if type -q "devbox"
|
||||
# The space after the program name is essential to trigger completion for the program
|
||||
# and not completion of the program name itself.
|
||||
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
|
||||
complete --do-complete "devbox " > /dev/null 2>&1
|
||||
end
|
||||
|
||||
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||
complete -c devbox -e
|
||||
|
||||
# this will get called after the two calls below and clear the $__devbox_perform_completion_once_result global
|
||||
complete -c devbox -n '__devbox_clear_perform_completion_once_result'
|
||||
# The call to __devbox_prepare_completions will setup __devbox_comp_results
|
||||
# which provides the program's completion choices.
|
||||
# If this doesn't require order preservation, we don't use the -k flag
|
||||
complete -c devbox -n 'not __devbox_requires_order_preservation && __devbox_prepare_completions' -f -a '$__devbox_comp_results'
|
||||
# otherwise we use the -k flag
|
||||
complete -k -c devbox -n '__devbox_requires_order_preservation && __devbox_prepare_completions' -f -a '$__devbox_comp_results'
|
||||
@@ -1 +0,0 @@
|
||||
complete -c pandoc -f -a '(string match -r ".*\\.md\$" -- (ls))'
|
||||
@@ -1,235 +0,0 @@
|
||||
# fish completion for process-compose -*- shell-script -*-
|
||||
|
||||
function __process_compose_debug
|
||||
set -l file "$BASH_COMP_DEBUG_FILE"
|
||||
if test -n "$file"
|
||||
echo "$argv" >> $file
|
||||
end
|
||||
end
|
||||
|
||||
function __process_compose_perform_completion
|
||||
__process_compose_debug "Starting __process_compose_perform_completion"
|
||||
|
||||
# Extract all args except the last one
|
||||
set -l args (commandline -opc)
|
||||
# Extract the last arg and escape it in case it is a space
|
||||
set -l lastArg (string escape -- (commandline -ct))
|
||||
|
||||
__process_compose_debug "args: $args"
|
||||
__process_compose_debug "last arg: $lastArg"
|
||||
|
||||
# Disable ActiveHelp which is not supported for fish shell
|
||||
set -l requestComp "PROCESS_COMPOSE_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
|
||||
|
||||
__process_compose_debug "Calling $requestComp"
|
||||
set -l results (eval $requestComp 2> /dev/null)
|
||||
|
||||
# Some programs may output extra empty lines after the directive.
|
||||
# Let's ignore them or else it will break completion.
|
||||
# Ref: https://github.com/spf13/cobra/issues/1279
|
||||
for line in $results[-1..1]
|
||||
if test (string trim -- $line) = ""
|
||||
# Found an empty line, remove it
|
||||
set results $results[1..-2]
|
||||
else
|
||||
# Found non-empty line, we have our proper output
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
set -l comps $results[1..-2]
|
||||
set -l directiveLine $results[-1]
|
||||
|
||||
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
|
||||
# completions must be prefixed with the flag
|
||||
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
|
||||
|
||||
__process_compose_debug "Comps: $comps"
|
||||
__process_compose_debug "DirectiveLine: $directiveLine"
|
||||
__process_compose_debug "flagPrefix: $flagPrefix"
|
||||
|
||||
for comp in $comps
|
||||
printf "%s%s\n" "$flagPrefix" "$comp"
|
||||
end
|
||||
|
||||
printf "%s\n" "$directiveLine"
|
||||
end
|
||||
|
||||
# this function limits calls to __process_compose_perform_completion, by caching the result behind $__process_compose_perform_completion_once_result
|
||||
function __process_compose_perform_completion_once
|
||||
__process_compose_debug "Starting __process_compose_perform_completion_once"
|
||||
|
||||
if test -n "$__process_compose_perform_completion_once_result"
|
||||
__process_compose_debug "Seems like a valid result already exists, skipping __process_compose_perform_completion"
|
||||
return 0
|
||||
end
|
||||
|
||||
set --global __process_compose_perform_completion_once_result (__process_compose_perform_completion)
|
||||
if test -z "$__process_compose_perform_completion_once_result"
|
||||
__process_compose_debug "No completions, probably due to a failure"
|
||||
return 1
|
||||
end
|
||||
|
||||
__process_compose_debug "Performed completions and set __process_compose_perform_completion_once_result"
|
||||
return 0
|
||||
end
|
||||
|
||||
# this function is used to clear the $__process_compose_perform_completion_once_result variable after completions are run
|
||||
function __process_compose_clear_perform_completion_once_result
|
||||
__process_compose_debug ""
|
||||
__process_compose_debug "========= clearing previously set __process_compose_perform_completion_once_result variable =========="
|
||||
set --erase __process_compose_perform_completion_once_result
|
||||
__process_compose_debug "Successfully erased the variable __process_compose_perform_completion_once_result"
|
||||
end
|
||||
|
||||
function __process_compose_requires_order_preservation
|
||||
__process_compose_debug ""
|
||||
__process_compose_debug "========= checking if order preservation is required =========="
|
||||
|
||||
__process_compose_perform_completion_once
|
||||
if test -z "$__process_compose_perform_completion_once_result"
|
||||
__process_compose_debug "Error determining if order preservation is required"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__process_compose_perform_completion_once_result[-1])
|
||||
__process_compose_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveKeepOrder 32
|
||||
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
|
||||
__process_compose_debug "Keeporder is: $keeporder"
|
||||
|
||||
if test $keeporder -ne 0
|
||||
__process_compose_debug "This does require order preservation"
|
||||
return 0
|
||||
end
|
||||
|
||||
__process_compose_debug "This doesn't require order preservation"
|
||||
return 1
|
||||
end
|
||||
|
||||
|
||||
# This function does two things:
|
||||
# - Obtain the completions and store them in the global __process_compose_comp_results
|
||||
# - Return false if file completion should be performed
|
||||
function __process_compose_prepare_completions
|
||||
__process_compose_debug ""
|
||||
__process_compose_debug "========= starting completion logic =========="
|
||||
|
||||
# Start fresh
|
||||
set --erase __process_compose_comp_results
|
||||
|
||||
__process_compose_perform_completion_once
|
||||
__process_compose_debug "Completion results: $__process_compose_perform_completion_once_result"
|
||||
|
||||
if test -z "$__process_compose_perform_completion_once_result"
|
||||
__process_compose_debug "No completion, probably due to a failure"
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__process_compose_perform_completion_once_result[-1])
|
||||
set --global __process_compose_comp_results $__process_compose_perform_completion_once_result[1..-2]
|
||||
|
||||
__process_compose_debug "Completions are: $__process_compose_comp_results"
|
||||
__process_compose_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveError 1
|
||||
set -l shellCompDirectiveNoSpace 2
|
||||
set -l shellCompDirectiveNoFileComp 4
|
||||
set -l shellCompDirectiveFilterFileExt 8
|
||||
set -l shellCompDirectiveFilterDirs 16
|
||||
|
||||
if test -z "$directive"
|
||||
set directive 0
|
||||
end
|
||||
|
||||
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
|
||||
if test $compErr -eq 1
|
||||
__process_compose_debug "Received error directive: aborting."
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
|
||||
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
|
||||
if test $filefilter -eq 1; or test $dirfilter -eq 1
|
||||
__process_compose_debug "File extension filtering or directory filtering not supported"
|
||||
# Do full file completion instead
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
|
||||
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
|
||||
|
||||
__process_compose_debug "nospace: $nospace, nofiles: $nofiles"
|
||||
|
||||
# If we want to prevent a space, or if file completion is NOT disabled,
|
||||
# we need to count the number of valid completions.
|
||||
# To do so, we will filter on prefix as the completions we have received
|
||||
# may not already be filtered so as to allow fish to match on different
|
||||
# criteria than the prefix.
|
||||
if test $nospace -ne 0; or test $nofiles -eq 0
|
||||
set -l prefix (commandline -t | string escape --style=regex)
|
||||
__process_compose_debug "prefix: $prefix"
|
||||
|
||||
set -l completions (string match -r -- "^$prefix.*" $__process_compose_comp_results)
|
||||
set --global __process_compose_comp_results $completions
|
||||
__process_compose_debug "Filtered completions are: $__process_compose_comp_results"
|
||||
|
||||
# Important not to quote the variable for count to work
|
||||
set -l numComps (count $__process_compose_comp_results)
|
||||
__process_compose_debug "numComps: $numComps"
|
||||
|
||||
if test $numComps -eq 1; and test $nospace -ne 0
|
||||
# We must first split on \t to get rid of the descriptions to be
|
||||
# able to check what the actual completion will be.
|
||||
# We don't need descriptions anyway since there is only a single
|
||||
# real completion which the shell will expand immediately.
|
||||
set -l split (string split --max 1 \t $__process_compose_comp_results[1])
|
||||
|
||||
# Fish won't add a space if the completion ends with any
|
||||
# of the following characters: @=/:.,
|
||||
set -l lastChar (string sub -s -1 -- $split)
|
||||
if not string match -r -q "[@=/:.,]" -- "$lastChar"
|
||||
# In other cases, to support the "nospace" directive we trick the shell
|
||||
# by outputting an extra, longer completion.
|
||||
__process_compose_debug "Adding second completion to perform nospace directive"
|
||||
set --global __process_compose_comp_results $split[1] $split[1].
|
||||
__process_compose_debug "Completions are now: $__process_compose_comp_results"
|
||||
end
|
||||
end
|
||||
|
||||
if test $numComps -eq 0; and test $nofiles -eq 0
|
||||
# To be consistent with bash and zsh, we only trigger file
|
||||
# completion when there are no other completions
|
||||
__process_compose_debug "Requesting file completion"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
|
||||
# so we can properly delete any completions provided by another script.
|
||||
# Only do this if the program can be found, or else fish may print some errors; besides,
|
||||
# the existing completions will only be loaded if the program can be found.
|
||||
if type -q "process-compose"
|
||||
# The space after the program name is essential to trigger completion for the program
|
||||
# and not completion of the program name itself.
|
||||
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
|
||||
complete --do-complete "process-compose " > /dev/null 2>&1
|
||||
end
|
||||
|
||||
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||
complete -c process-compose -e
|
||||
|
||||
# this will get called after the two calls below and clear the $__process_compose_perform_completion_once_result global
|
||||
complete -c process-compose -n '__process_compose_clear_perform_completion_once_result'
|
||||
# The call to __process_compose_prepare_completions will setup __process_compose_comp_results
|
||||
# which provides the program's completion choices.
|
||||
# If this doesn't require order preservation, we don't use the -k flag
|
||||
complete -c process-compose -n 'not __process_compose_requires_order_preservation && __process_compose_prepare_completions' -f -a '$__process_compose_comp_results'
|
||||
# otherwise we use the -k flag
|
||||
complete -k -c process-compose -n '__process_compose_requires_order_preservation && __process_compose_prepare_completions' -f -a '$__process_compose_comp_results'
|
||||
@@ -1,57 +0,0 @@
|
||||
function __dev_repo_name
|
||||
# Use the main worktree (first entry) for consistent naming across worktrees
|
||||
set -l lines (git worktree list --porcelain | string replace -rf "^worktree " "")
|
||||
basename $lines[1]
|
||||
end
|
||||
|
||||
function __dev_clean_shell -d "Build a clean login shell command, unsetting devbox vars so they re-source"
|
||||
# Print one word per line; callers capture with (__dev_clean_shell).
|
||||
echo env
|
||||
for var in (set --names --export | string match 'DEVBOX_*')
|
||||
echo -- -u
|
||||
echo -- $var
|
||||
end
|
||||
echo -- (command -s fish)
|
||||
echo -- --login
|
||||
end
|
||||
|
||||
function __dev_create_session -a session dir
|
||||
if test -z "$dir"
|
||||
set dir (pwd)
|
||||
end
|
||||
if not tmux has-session -t "$session" 2>/dev/null
|
||||
# Clean login shell so the new directory re-sources its environment.
|
||||
set -l shell (__dev_clean_shell)
|
||||
|
||||
tmux new-session -d -s "$session" -c "$dir" -n dev $shell
|
||||
|
||||
# Ensure that new panes in this session also start with the clean environment.
|
||||
tmux set-option -t "$session" default-command (string join ' ' -- $shell)
|
||||
|
||||
set -l left (tmux display-message -t "$session:dev" -p '#{pane_id}')
|
||||
tmux split-window -h -t "$left" -c "$dir" $shell
|
||||
set -l right (tmux display-message -t "$session:dev" -p '#{pane_id}')
|
||||
tmux split-window -v -t "$right" -c "$dir" $shell
|
||||
set -l bottom_right (tmux display-message -t "$session:dev" -p '#{pane_id}')
|
||||
tmux send-keys -t "$left" 'vim' Enter
|
||||
tmux send-keys -t "$right" 'claude' Enter
|
||||
|
||||
tmux select-pane -t "$bottom_right"
|
||||
end
|
||||
end
|
||||
|
||||
function __dev_attach_session -a session
|
||||
if test -z "$TMUX"
|
||||
tmux attach-session -t "$session"
|
||||
else
|
||||
set -l current_session (tmux display-message -p '#S')
|
||||
if test "$current_session" != "$session"
|
||||
tmux switch-client -t "$session"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function __dev_wt_session_name -a repo branch
|
||||
set -l name "$repo-"(string replace -a '/' '-' -- $branch | string replace -a '\\' '-')
|
||||
string replace -a '.' '-' -- $name
|
||||
end
|
||||
@@ -1,14 +0,0 @@
|
||||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# the 'fish_key_bindings' variable from its old default scope (universal)
|
||||
# to its new default scope (global). We recommend you delete this file
|
||||
# and configure key bindings in ~/.config/fish/config.fish if needed.
|
||||
|
||||
set --global fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
# Prior to version 4.3, fish shipped an event handler that runs
|
||||
# `set --universal fish_key_bindings fish_default_key_bindings`
|
||||
# whenever the fish_key_bindings variable is erased.
|
||||
# This means that as long as any fish < 4.3 is still running on this system,
|
||||
# we cannot complete the migration.
|
||||
# As a workaround, erase the universal variable at every shell startup.
|
||||
set --erase --universal fish_key_bindings
|
||||
@@ -1,48 +0,0 @@
|
||||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# theme variables from universal to global scope.
|
||||
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
|
||||
# To customize your theme, delete this file and see
|
||||
# help interactive#syntax-highlighting
|
||||
# or
|
||||
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
|
||||
# for appropriate commands to add to ~/.config/fish/config.fish instead.
|
||||
# See also the release notes for fish 4.3.0 (run `help relnotes`).
|
||||
|
||||
set --global fish_color_autosuggestion 9ca0b0
|
||||
set --global fish_color_cancel d20f39
|
||||
set --global fish_color_command 1e66f5
|
||||
set --global fish_color_comment 8c8fa1
|
||||
set --global fish_color_cwd df8e1d
|
||||
set --global fish_color_cwd_root red
|
||||
set --global fish_color_end fe640b
|
||||
set --global fish_color_error d20f39
|
||||
set --global fish_color_escape e64553
|
||||
set --global fish_color_gray 9ca0b0
|
||||
set --global fish_color_history_current --bold
|
||||
set --global fish_color_host 1e66f5
|
||||
set --global fish_color_host_remote 40a02b
|
||||
set --global fish_color_keyword 8839ef
|
||||
set --global fish_color_normal 4c4f69
|
||||
set --global fish_color_operator ea76cb
|
||||
set --global fish_color_option 40a02b
|
||||
set --global fish_color_param dd7878
|
||||
set --global fish_color_quote 40a02b
|
||||
set --global fish_color_redirection ea76cb
|
||||
set --global fish_color_search_match --background=ccd0da
|
||||
set --global fish_color_selection --background=ccd0da
|
||||
set --global fish_color_status d20f39
|
||||
set --global fish_color_user 179299
|
||||
set --global fish_color_valid_path --underline
|
||||
set --global fish_pager_color_background
|
||||
set --global fish_pager_color_completion 4c4f69
|
||||
set --global fish_pager_color_description 9ca0b0
|
||||
set --global fish_pager_color_prefix ea76cb
|
||||
set --global fish_pager_color_progress 9ca0b0
|
||||
set --global fish_pager_color_secondary_background
|
||||
set --global fish_pager_color_secondary_completion
|
||||
set --global fish_pager_color_secondary_description
|
||||
set --global fish_pager_color_secondary_prefix
|
||||
set --global fish_pager_color_selected_background
|
||||
set --global fish_pager_color_selected_completion
|
||||
set --global fish_pager_color_selected_description
|
||||
set --global fish_pager_color_selected_prefix
|
||||
@@ -1,45 +0,0 @@
|
||||
# Mise shims so non-interactive shells (scripts, editor spawns) find tools.
|
||||
# Interactive sessions get exact versions from `mise activate` below.
|
||||
fish_add_path ~/.local/share/mise/shims
|
||||
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
|
||||
# Disable the welcome message
|
||||
# https://fishshell.com/docs/current/cmds/fish_greeting.html
|
||||
set -g fish_greeting
|
||||
|
||||
if test -f /home/linuxbrew/.linuxbrew/bin/brew
|
||||
/home/linuxbrew/.linuxbrew/bin/brew shellenv | source
|
||||
end
|
||||
if test -f $(which atuin)
|
||||
atuin init fish | source
|
||||
end
|
||||
|
||||
# Override globals
|
||||
set -gx EDITOR nvim
|
||||
|
||||
# Aliases
|
||||
alias vim="nvim"
|
||||
alias lg="lazygit"
|
||||
alias la="eza --long --header --git --group --time-style long-iso -a"
|
||||
alias record='wf-recorder -g "$(slurp)"'
|
||||
|
||||
# Set a location to store variables that should not be tracked in git.
|
||||
if test -f ~/.local/fish_env.fish
|
||||
source ~/.local/fish_env.fish
|
||||
end
|
||||
|
||||
# Abbreviations
|
||||
# https://fishshell.com/docs/current/cmds/abbr.html
|
||||
abbr --add --position command pc process-compose
|
||||
|
||||
# Set Path
|
||||
fish_add_path -p /home/tgrosinger/.dotfiles/bin/linux
|
||||
|
||||
# Per-directory toolchains and global tools.
|
||||
# https://mise.jdx.dev/getting-started.html
|
||||
if type -q mise
|
||||
mise activate fish | source
|
||||
end
|
||||
end
|
||||
@@ -1,4 +0,0 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:4300
|
||||
SETUVAR fish_user_paths:/home/tgrosinger/\x2elocal/bin\x1e/home/tgrosinger/\x2elocal/share/mise/shims\x1e/home/tgrosinger/go/bin\x1e/home/tgrosinger/\x2edotfiles/bin/linux
|
||||
@@ -1,70 +0,0 @@
|
||||
function dev-wt-pr -d "Open a GitHub PR in a worktree in a new tmux window (Octo review + Claude)" -a pr_number branch repo_path
|
||||
if test -z "$pr_number"
|
||||
echo "Usage: dev-wt-pr <pr-number> <branch> [repo-path]"
|
||||
return 1
|
||||
end
|
||||
|
||||
# Opens the PR in a new window of the current tmux session, so it must be run
|
||||
# from inside tmux. Running outside tmux is unsupported for now.
|
||||
if test -z "$TMUX"
|
||||
echo "dev-wt-pr must be run from inside a tmux session"
|
||||
return 1
|
||||
end
|
||||
|
||||
# gh-dash passes the repo path; default to the current directory otherwise.
|
||||
if test -n "$repo_path"
|
||||
cd "$repo_path"; or return 1
|
||||
end
|
||||
|
||||
set -l repo (__dev_repo_name 2>/dev/null)
|
||||
if test -z "$repo"
|
||||
echo "Not in a git repository"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l main_wt_path (git worktree list --porcelain | head -1 | string replace "worktree " "")
|
||||
set -l parent_dir (dirname "$main_wt_path")
|
||||
# Key the worktree on the PR number to stay unique and avoid slashes in
|
||||
# branch names producing nested directories.
|
||||
set -l wt_path "$parent_dir/$repo-pr-$pr_number"
|
||||
|
||||
# Create the worktree if it doesn't already exist.
|
||||
if not test -d "$wt_path"
|
||||
echo "Creating worktree for PR #$pr_number at $wt_path..."
|
||||
git worktree add --detach "$wt_path"; or return 1
|
||||
|
||||
# gh pr checkout handles both same-repo and fork PRs uniformly.
|
||||
if not fish -c "cd '$wt_path'; and gh pr checkout $pr_number"
|
||||
echo "Failed to check out PR #$pr_number"
|
||||
git worktree remove --force "$wt_path"
|
||||
return 1
|
||||
end
|
||||
|
||||
# Run repo-specific setup hook if present (matches dev-wt).
|
||||
set -l setup_hook "$main_wt_path/.worktree-setup.sh"
|
||||
if test -x "$setup_hook"
|
||||
echo "Running worktree setup hook..."
|
||||
bash "$setup_hook" "$wt_path" "$main_wt_path" "$pr_number"
|
||||
end
|
||||
end
|
||||
|
||||
# Window name like "123-fix-login"; flatten any slashes from the branch name.
|
||||
set -l window_name "$pr_number-"(string replace -a '/' '-' -- $branch)
|
||||
|
||||
# Reuse the window if it already exists (e.g. re-pressing the shortcut).
|
||||
if tmux list-windows -F '#{window_name}' 2>/dev/null | string match -q -- "$window_name"
|
||||
tmux select-window -t "$window_name"
|
||||
return
|
||||
end
|
||||
|
||||
# Clean login shell so the worktree re-sources its environment.
|
||||
set -l shell (__dev_clean_shell)
|
||||
|
||||
set -l win (tmux new-window -P -F '#{window_id}' -n "$window_name" -c "$wt_path" $shell)
|
||||
tmux send-keys -t "$win" 'nvim -c "Octo review start"' Enter
|
||||
|
||||
set -l right (tmux split-window -h -P -F '#{pane_id}' -t "$win" -c "$wt_path" $shell)
|
||||
tmux send-keys -t "$right" 'claude' Enter
|
||||
|
||||
tmux select-window -t "$win"
|
||||
end
|
||||
@@ -1,98 +0,0 @@
|
||||
function dev-wt -d "Switch to a tmux dev session for a worktree, creating it if needed"
|
||||
argparse 'C/repo=' -- $argv
|
||||
or return 1
|
||||
|
||||
set -l name $argv[1]
|
||||
|
||||
# With -C/--repo, behave exactly as if invoked from within that directory by
|
||||
# cd-ing there for the duration and restoring the caller's cwd afterward.
|
||||
if set -q _flag_repo
|
||||
if not test -d "$_flag_repo"
|
||||
echo "Not a directory: $_flag_repo"
|
||||
return 1
|
||||
end
|
||||
set -l prev_pwd $PWD
|
||||
cd "$_flag_repo"; or return 1
|
||||
__dev_wt_impl $name
|
||||
set -l rc $status
|
||||
cd "$prev_pwd"
|
||||
return $rc
|
||||
end
|
||||
|
||||
__dev_wt_impl $name
|
||||
end
|
||||
|
||||
function __dev_wt_impl -a name
|
||||
set -l repo (__dev_repo_name 2>/dev/null)
|
||||
if test -z "$repo"
|
||||
echo "Not in a git repository"
|
||||
return 1
|
||||
end
|
||||
|
||||
# No argument: switch to a session for the main repo (not a worktree)
|
||||
if test -z "$name"
|
||||
set -l main_wt_path (git worktree list --porcelain | head -1 | string replace "worktree " "")
|
||||
set -l session (string replace -a '.' '-' -- $repo)
|
||||
__dev_create_session $session $main_wt_path
|
||||
__dev_attach_session $session
|
||||
return
|
||||
end
|
||||
|
||||
set -l wt_path ""
|
||||
set -l wt_branch ""
|
||||
|
||||
# Search for worktree by directory basename or branch name
|
||||
set -l current_path ""
|
||||
set -l current_branch ""
|
||||
for line in (git worktree list --porcelain)
|
||||
if string match -q "worktree *" -- $line
|
||||
set current_path (string replace "worktree " "" -- $line)
|
||||
set current_branch ""
|
||||
else if string match -q "branch *" -- $line
|
||||
set current_branch (string replace "branch refs/heads/" "" -- $line)
|
||||
if test (basename "$current_path") = "$name"; or test "$current_branch" = "$name"
|
||||
set wt_path $current_path
|
||||
set wt_branch $current_branch
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# If worktree not found, create it
|
||||
if test -z "$wt_path"
|
||||
set -l main_wt_path (git worktree list --porcelain | head -1 | string replace "worktree " "")
|
||||
set -l parent_dir (dirname "$main_wt_path")
|
||||
set wt_path "$parent_dir/$repo-$name"
|
||||
set wt_branch "$name"
|
||||
|
||||
if test -d "$wt_path"
|
||||
echo "Error: directory already exists: $wt_path"
|
||||
return 1
|
||||
end
|
||||
|
||||
# Create branch from main if it doesn't exist
|
||||
if not git rev-parse --verify "$wt_branch" >/dev/null 2>&1
|
||||
echo "Creating branch '$wt_branch' from main..."
|
||||
git branch "$wt_branch" main
|
||||
end
|
||||
|
||||
echo "Creating worktree at $wt_path..."
|
||||
git worktree add "$wt_path" "$wt_branch"
|
||||
|
||||
# Run repo-specific setup hook if present
|
||||
set -l setup_hook "$main_wt_path/.worktree-setup.sh"
|
||||
if test -x "$setup_hook"
|
||||
echo "Running worktree setup hook..."
|
||||
bash "$setup_hook" "$wt_path" "$main_wt_path" "$wt_branch"
|
||||
end
|
||||
end
|
||||
|
||||
if test -z "$wt_branch"
|
||||
echo "Worktree '$name' has no branch (detached HEAD)"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l session (__dev_wt_session_name $repo $wt_branch)
|
||||
__dev_create_session $session $wt_path
|
||||
__dev_attach_session $session
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
function dev -d "Create and attach to a tmux dev session for the current directory"
|
||||
set -l session (basename (pwd) | string replace -a '.' '-')
|
||||
__dev_create_session $session
|
||||
__dev_attach_session $session
|
||||
end
|
||||
@@ -1,24 +0,0 @@
|
||||
function fish_prompt
|
||||
set -l __last_command_exit_status $status
|
||||
|
||||
set -l cyan (set_color -o cyan)
|
||||
set -l yellow (set_color -o yellow)
|
||||
set -l red (set_color -o red)
|
||||
set -l green (set_color -o green)
|
||||
set -l blue (set_color -o blue)
|
||||
set -l normal (set_color normal)
|
||||
|
||||
set -l arrow_color "$green"
|
||||
if test $__last_command_exit_status != 0
|
||||
set arrow_color "$red"
|
||||
end
|
||||
|
||||
set -l arrow "$arrow_color➜ "
|
||||
if fish_is_root_user
|
||||
set arrow "$arrow_color# "
|
||||
end
|
||||
|
||||
set -l cwd $cyan(prompt_pwd | path basename)
|
||||
|
||||
echo -n -s $arrow ' '$cwd $repo_info $normal ' '
|
||||
end
|
||||
@@ -1,7 +0,0 @@
|
||||
function pandoc -d "Convert a markdown file to docx using pandoc in podman" -a input
|
||||
set -l output (string replace -r '\.md$' '.docx' $input)
|
||||
|
||||
podman run --rm -v "$(pwd):/data:z" \
|
||||
--userns keep-id:uid=1000,gid=1000 \
|
||||
pandoc/core:3.8-alpine --from markdown --to docx -o "/data/$output" "/data/$input"
|
||||
end
|
||||
@@ -1,4 +0,0 @@
|
||||
function record -d "Capture a screen recording with no audio"
|
||||
wf-recorder -c libopenh264 --no-audio -g "$(slurp)" -f output.mp4
|
||||
end
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
function reencode -d "Re-encode a video to VBR with no audio" -a input
|
||||
set -l name (string replace -r '\.[^.]+$' '' $input)
|
||||
set -l ext (string replace -r '.*\.' '' $input)
|
||||
set -l output "$name-reenc.$ext"
|
||||
|
||||
ffmpeg -i $input -c:v libopenh264 -crf 23 -preset slow -an $output
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
function togif -d "Convert a video to a high-quality gif" -a input
|
||||
set -l name (string replace -r '\.[^.]+$' '' $input)
|
||||
set -l output "$name.gif"
|
||||
set -l palette (mktemp --suffix .png)
|
||||
|
||||
ffmpeg -i $input -vf "fps=15,palettegen" -y $palette
|
||||
ffmpeg -i $input -i $palette -lavfi "fps=15 [x]; [x][1:v] paletteuse" -y $output
|
||||
|
||||
rm -f $palette
|
||||
end
|
||||
@@ -1,6 +0,0 @@
|
||||
function tomov -d "Convert a video to a GitHub-uploadable .mov" -a input
|
||||
set -l name (string replace -r '\.[^.]+$' '' $input)
|
||||
set -l output "$name.mov"
|
||||
|
||||
ffmpeg -i $input -c:v libopenh264 -crf 23 -preset slow -pix_fmt yuv420p -an $output
|
||||
end
|
||||
@@ -1,30 +0,0 @@
|
||||
# name: 'Catppuccin Latte'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
# preferred_background: eff1f5
|
||||
|
||||
fish_color_normal 4c4f69
|
||||
fish_color_command 1e66f5
|
||||
fish_color_param dd7878
|
||||
fish_color_keyword 8839ef
|
||||
fish_color_quote 40a02b
|
||||
fish_color_redirection ea76cb
|
||||
fish_color_end fe640b
|
||||
fish_color_comment 8c8fa1
|
||||
fish_color_error d20f39
|
||||
fish_color_gray 9ca0b0
|
||||
fish_color_selection --background=ccd0da
|
||||
fish_color_search_match --background=ccd0da
|
||||
fish_color_option 40a02b
|
||||
fish_color_operator ea76cb
|
||||
fish_color_escape e64553
|
||||
fish_color_autosuggestion 9ca0b0
|
||||
fish_color_cancel d20f39
|
||||
fish_color_cwd df8e1d
|
||||
fish_color_user 179299
|
||||
fish_color_host 1e66f5
|
||||
fish_color_host_remote 40a02b
|
||||
fish_color_status d20f39
|
||||
fish_pager_color_progress 9ca0b0
|
||||
fish_pager_color_prefix ea76cb
|
||||
fish_pager_color_completion 4c4f69
|
||||
fish_pager_color_description 9ca0b0
|
||||
@@ -1,46 +0,0 @@
|
||||
font=JetBrainsMonoNerdFontMono:size=12
|
||||
# Should automatically use these.
|
||||
#font-bold=JetBrainsMonoNerdFontMono:weight=bold
|
||||
#font-italic=JetBrainsMonoNerdFontMono:slant=italic
|
||||
#font-bold-italic=JetBrainsMonoNerdFontMono:weight=bold:slant=italic
|
||||
|
||||
|
||||
#
|
||||
# Catppuccine Latte
|
||||
# https://github.com/catppuccin/foot
|
||||
#
|
||||
|
||||
[colors]
|
||||
cursor=eff1f5 dc8a78
|
||||
foreground=4c4f69
|
||||
background=eff1f5
|
||||
|
||||
regular0=5c5f77
|
||||
regular1=d20f39
|
||||
regular2=40a02b
|
||||
regular3=df8e1d
|
||||
regular4=1e66f5
|
||||
regular5=ea76cb
|
||||
regular6=179299
|
||||
regular7=acb0be
|
||||
|
||||
bright0=6c6f85
|
||||
bright1=d20f39
|
||||
bright2=40a02b
|
||||
bright3=df8e1d
|
||||
bright4=1e66f5
|
||||
bright5=ea76cb
|
||||
bright6=179299
|
||||
bright7=bcc0cc
|
||||
|
||||
16=fe640b
|
||||
17=dc8a78
|
||||
|
||||
selection-foreground=4c4f69
|
||||
selection-background=ccced7
|
||||
|
||||
search-box-no-match=dce0e8 d20f39
|
||||
search-box-match=4c4f69 ccd0da
|
||||
|
||||
jump-labels=dce0e8 fe640b
|
||||
urls=1e66f5
|
||||
@@ -1,122 +0,0 @@
|
||||
prSections:
|
||||
- title: My Pull Requests
|
||||
filters: is:open author:@me
|
||||
- title: Needs My Review
|
||||
filters: is:open review-requested:@me
|
||||
- title: Involved
|
||||
filters: is:open involves:@me -author:@me
|
||||
issuesSections:
|
||||
- title: My Issues
|
||||
filters: is:open author:@me
|
||||
- title: Assigned
|
||||
filters: is:open assignee:@me
|
||||
- title: Involved
|
||||
filters: is:open involves:@me -author:@me
|
||||
notificationsSections:
|
||||
- title: All
|
||||
filters: ""
|
||||
- title: Created
|
||||
filters: reason:author
|
||||
- title: Participating
|
||||
filters: reason:participating
|
||||
- title: Mentioned
|
||||
filters: reason:mention
|
||||
- title: Review Requested
|
||||
filters: reason:review-requested
|
||||
- title: Assigned
|
||||
filters: reason:assign
|
||||
- title: Subscribed
|
||||
filters: reason:subscribed
|
||||
- title: Team Mentioned
|
||||
filters: reason:team-mention
|
||||
repo:
|
||||
branchesRefetchIntervalSeconds: 30
|
||||
prsRefetchIntervalSeconds: 60
|
||||
defaults:
|
||||
preview:
|
||||
open: true
|
||||
width: 0.45
|
||||
height: 0.6
|
||||
position: auto
|
||||
prsLimit: 20
|
||||
prApproveComment: LGTM
|
||||
issuesLimit: 20
|
||||
notificationsLimit: 20
|
||||
view: prs
|
||||
layout:
|
||||
prs:
|
||||
updatedAt:
|
||||
width: 5
|
||||
createdAt:
|
||||
width: 5
|
||||
repo:
|
||||
width: 20
|
||||
author:
|
||||
width: 15
|
||||
authorIcon:
|
||||
hidden: false
|
||||
labels:
|
||||
width: 22
|
||||
hidden: true
|
||||
assignees:
|
||||
width: 20
|
||||
hidden: true
|
||||
base:
|
||||
width: 15
|
||||
hidden: true
|
||||
lines:
|
||||
width: 15
|
||||
issues:
|
||||
updatedAt:
|
||||
width: 5
|
||||
createdAt:
|
||||
width: 5
|
||||
repo:
|
||||
width: 15
|
||||
creator:
|
||||
width: 10
|
||||
creatorIcon:
|
||||
hidden: false
|
||||
assignees:
|
||||
width: 20
|
||||
hidden: true
|
||||
refetchIntervalMinutes: 30
|
||||
keybindings:
|
||||
prs:
|
||||
- key: C
|
||||
name: review in worktree
|
||||
command: >
|
||||
fish -c "dev-wt-pr {{.PrNumber}} {{.HeadRefName}} {{.RepoPath}}"
|
||||
universal:
|
||||
- key: g
|
||||
name: lazygit
|
||||
command: >
|
||||
cd {{.RepoPath}}; lazygit
|
||||
repoPaths: {}
|
||||
theme:
|
||||
colors:
|
||||
text:
|
||||
primary: "#4c4f69"
|
||||
secondary: "#179299"
|
||||
inverted: "#dce0e8"
|
||||
faint: "#5c5f77"
|
||||
warning: "#df8e1d"
|
||||
success: "#40a02b"
|
||||
error: "#d20f39"
|
||||
background:
|
||||
selected: "#ccd0da"
|
||||
border:
|
||||
primary: "#179299"
|
||||
secondary: "#bcc0cc"
|
||||
faint: "#ccd0da"
|
||||
ui:
|
||||
sectionsShowCount: true
|
||||
table:
|
||||
showSeparator: true
|
||||
compact: false
|
||||
pager:
|
||||
diff: hunk
|
||||
confirmQuit: false
|
||||
showAuthorIcons: true
|
||||
smartFilteringAtLaunch: true
|
||||
includeReadNotifications: true
|
||||
@@ -1,5 +0,0 @@
|
||||
theme = Catppuccin Latte
|
||||
font-family = JetBrainsMono Nerd Font Mono
|
||||
|
||||
# https://pi.dev/docs/latest/terminal-setup
|
||||
keybind = alt+backspace=text:\x1b\x7f
|
||||
@@ -1 +0,0 @@
|
||||
theme = "catppuccin-latte"
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"lastSeenCliVersion": "0.14.1"
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
customCommands:
|
||||
- command: "git push --force-with-lease"
|
||||
context: "commits,localBranches"
|
||||
description: "Force push with lease."
|
||||
key: "x"
|
||||
promptToReturnFromSubprocess: false # removes "press enter to return to lazygit" popup
|
||||
notARepository: 'skip'
|
||||
git:
|
||||
autoForwardBranches: "none"
|
||||
pagers:
|
||||
- pager: delta --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"
|
||||
- pager: delta --paging=never --line-numbers --no-gitconfig --light
|
||||
os:
|
||||
editPreset: "nvim"
|
||||
gui:
|
||||
useHunkModeInStagingView: true
|
||||
timeFormat: "2006-01-02"
|
||||
nerdFontsVersion: "3"
|
||||
mouseEvents: false
|
||||
theme:
|
||||
activeBorderColor:
|
||||
- "#40a02b"
|
||||
- bold
|
||||
inactiveBorderColor:
|
||||
- "#6c6f85"
|
||||
optionsTextColor:
|
||||
- "#1e66f5"
|
||||
selectedLineBgColor:
|
||||
- "#ccd0da"
|
||||
cherryPickedCommitBgColor:
|
||||
- "#bcc0cc"
|
||||
cherryPickedCommitFgColor:
|
||||
- "#40a02b"
|
||||
unstagedChangesColor:
|
||||
- "#d20f39"
|
||||
defaultFgColor:
|
||||
- "#4c4f69"
|
||||
searchingActiveBorderColor:
|
||||
- "#df8e1d"
|
||||
authorColors:
|
||||
"*": "#7287fd"
|
||||
@@ -1,25 +0,0 @@
|
||||
[settings]
|
||||
|
||||
# Pin exact versions, URLs, and checksums in mise.lock so a tampered
|
||||
# re-release of the same version can't slip in silently.
|
||||
lockfile = true
|
||||
|
||||
# Block the asdf plugin backend (arbitrary community shell scripts) in favor
|
||||
# of aqua/ubi/core backends, which verify checksums and signatures. Remove if
|
||||
# a tool you need exists only as an asdf plugin.
|
||||
disable_backends = ["asdf", "ubi"]
|
||||
|
||||
# Never install versions less than 2 weeks old.
|
||||
minimum_release_age = "14d"
|
||||
|
||||
[tools]
|
||||
node = "lts"
|
||||
pnpm = "latest"
|
||||
"npm:@anthropic-ai/sandbox-runtime" = "latest"
|
||||
"npm:typescript-language-server" = "latest"
|
||||
"npm:typescript" = "latest"
|
||||
"github:Satty-org/Satty" = "0.20.1"
|
||||
"github:DarthSim/overmind" = "latest"
|
||||
"github:F1bonacc1/process-compose" = "latest"
|
||||
"github:modem-dev/hunk" = "latest"
|
||||
"npm:@earendil-works/pi-coding-agent" = "latest"
|
||||
@@ -1 +0,0 @@
|
||||
RIGHT seek 10
|
||||
@@ -1,7 +0,0 @@
|
||||
# https://mpv.io/manual/stable
|
||||
|
||||
# https://mpv.io/manual/stable/#resuming-playback
|
||||
# https://mpv.io/manual/stable/#watch-later
|
||||
# https://mpv.io/manual/stable/#files-~/-local/state/mpv/watch-later/
|
||||
--save-position-on-quit
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
// markdownlint-cli2 base config used by nvim-lint (see lua/plugins/markdown.lua).
|
||||
"config": {
|
||||
// Disable line-length errors; long lines are soft-wrapped on purpose.
|
||||
"MD013": false
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"LazyVim": { "branch": "main", "commit": "c10948c50b18fae7f256433afdef09e432410480" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "6ff1f21b2e2b77ec59f7433ce2d9fbc052d908ac" },
|
||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"catppuccin": { "branch": "main", "commit": "e068ab5f8261f23f6f71ffd8791ae40315b77b9c" },
|
||||
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "bcf4b62b4acc36a7c3d19e423713a220c838a668" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "c69859c1d5427ab5fc7ed12380ab521b4e336691" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b" },
|
||||
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
|
||||
"mini.ai": { "branch": "main", "commit": "cb20f298ebf5ae91924cd0c6c310712de2ef4086" },
|
||||
"mini.diff": { "branch": "main", "commit": "0743d26bd858ebe32efcf5c86a91a422a000f273" },
|
||||
"mini.icons": { "branch": "main", "commit": "24dbea2195c477e57d581215839a6ab915f34b14" },
|
||||
"mini.pairs": { "branch": "main", "commit": "fd150ac39b78e6a2286f5138e472b7dc7eba43b9" },
|
||||
"mini.surround": { "branch": "main", "commit": "a2f644f3759edd3d3f8b6a6d55378408bfe6d290" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-ansible": { "branch": "main", "commit": "c7f595d568b588942d4d0c37b5cd6cae3764a148" },
|
||||
"nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "292f44408498103c47996ff5c18fd366293840d8" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
|
||||
"octo.nvim": { "branch": "master", "commit": "b9a73e167f851a98d8f29d62658d3640bb8a7314" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a" },
|
||||
"sidekick.nvim": { "branch": "main", "commit": "208e1c5b8170c01fd1d07df0139322a76479b235" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "a59d6092213447450191122c9346f309161504cb" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.ai.sidekick",
|
||||
"lazyvim.plugins.extras.coding.mini-surround",
|
||||
"lazyvim.plugins.extras.editor.mini-diff",
|
||||
"lazyvim.plugins.extras.formatting.prettier",
|
||||
"lazyvim.plugins.extras.lang.ansible",
|
||||
"lazyvim.plugins.extras.lang.go",
|
||||
"lazyvim.plugins.extras.lang.json",
|
||||
"lazyvim.plugins.extras.lang.markdown",
|
||||
"lazyvim.plugins.extras.lang.svelte",
|
||||
"lazyvim.plugins.extras.lang.tailwind",
|
||||
"lazyvim.plugins.extras.lang.typescript",
|
||||
"lazyvim.plugins.extras.lang.yaml",
|
||||
"lazyvim.plugins.extras.util.octo"
|
||||
],
|
||||
"install_version": 8,
|
||||
"news": {
|
||||
"NEWS.md": "11866"
|
||||
},
|
||||
"version": 8
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
--
|
||||
-- Add any additional autocmds here
|
||||
-- with `vim.api.nvim_create_autocmd`
|
||||
--
|
||||
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
||||
@@ -1,16 +0,0 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
vim.keymap.set("n", "<leader>aP", function()
|
||||
Snacks.picker.files({
|
||||
cwd = vim.fn.expand("~/.claude/plans"),
|
||||
title = "Claude plans",
|
||||
})
|
||||
end, { desc = "Find Claude plan" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fP", function()
|
||||
local path = vim.fn.expand("%:p")
|
||||
vim.fn.setreg("+", path)
|
||||
vim.notify("Copied: " .. path)
|
||||
end, { desc = "Copy file path (absolute)" })
|
||||
@@ -1,53 +0,0 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "catppuccin-latte" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- Only run prettier in directories where there is a config file.
|
||||
vim.g.lazyvim_prettier_needs_config = true
|
||||
|
||||
-- Use eslint for formatting.
|
||||
vim.g.lazyvim_eslint_auto_format = true
|
||||
|
||||
-- Only run prettier in directories where there is a config file.
|
||||
vim.g.lazyvim_prettier_needs_config = false
|
||||
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ "<leader>r", group = "review" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
dir = "/home/tgrosinger/code/claude-review",
|
||||
cmd = "ClaudeReview",
|
||||
dependencies = {
|
||||
"dlyongemallo/diffview.nvim",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
-- Cheatsheet
|
||||
--
|
||||
-- Workflow: open a plan/diff from Claude Code, mark it up, copy, paste back.
|
||||
-- Works inside Diffview buffers as well.
|
||||
--
|
||||
-- Keymaps:
|
||||
-- <leader>rc Add comment at cursor or visual selection
|
||||
-- <leader>rp Preview all comments (editable buffer)
|
||||
-- <leader>ry Copy review to clipboard (paste into Claude Code)
|
||||
-- <leader>rs Show comments at cursor
|
||||
-- <leader>rl List all comments (Telescope/fzf/quickfix)
|
||||
-- <leader>rd Delete comment at cursor
|
||||
-- <leader>rx Clear all comments
|
||||
-- <leader>rw Save review to file
|
||||
--
|
||||
-- Inside the comment input window: <C-s> submits, <Esc> or q cancels.
|
||||
-- (Terminals can't distinguish <C-CR> from <CR>, so we bind <C-s> instead.)
|
||||
|
||||
return {}
|
||||
|
||||
-- return {
|
||||
-- {
|
||||
-- "folke/which-key.nvim",
|
||||
-- opts = {
|
||||
-- spec = {
|
||||
-- { "<leader>r", group = "review" },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "choplin/code-review.nvim",
|
||||
-- cmd = {
|
||||
-- "CodeReviewComment",
|
||||
-- "CodeReviewShowComment",
|
||||
-- "CodeReviewList",
|
||||
-- "CodeReviewPreview",
|
||||
-- "CodeReviewSave",
|
||||
-- "CodeReviewCopy",
|
||||
-- "CodeReviewClear",
|
||||
-- "CodeReviewDeleteComment",
|
||||
-- },
|
||||
-- keys = {
|
||||
-- { "<leader>rc", mode = { "n", "v" }, desc = "Code review: add comment" },
|
||||
-- { "<leader>rp", desc = "Code review: preview" },
|
||||
-- { "<leader>ry", desc = "Code review: copy to clipboard" },
|
||||
-- { "<leader>rs", desc = "Code review: show at cursor" },
|
||||
-- { "<leader>rl", desc = "Code review: list comments" },
|
||||
-- { "<leader>rd", desc = "Code review: delete at cursor" },
|
||||
-- { "<leader>rx", desc = "Code review: clear all" },
|
||||
-- { "<leader>rw", desc = "Code review: save to file" },
|
||||
-- },
|
||||
-- opts = {
|
||||
-- ui = {
|
||||
-- input_window = {
|
||||
-- title = " Add Comment (C-s to submit) ",
|
||||
-- },
|
||||
-- },
|
||||
-- output = {
|
||||
-- -- Flat format optimized for pasting into AI assistants like Claude Code:
|
||||
-- -- path/to/file.lua:L42: comment text
|
||||
-- format = "minimal",
|
||||
-- },
|
||||
-- },
|
||||
-- init = function()
|
||||
-- vim.api.nvim_create_autocmd("User", {
|
||||
-- pattern = "CodeReviewInputEnter",
|
||||
-- callback = function(ev)
|
||||
-- local funcs = require("code-review").get_input_buffer_functions(ev.data.buf)
|
||||
-- vim.keymap.set({ "i", "n" }, "<C-s>", funcs.submit, { buffer = ev.data.buf })
|
||||
-- end,
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
-- }
|
||||
@@ -1,6 +0,0 @@
|
||||
return {
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin-latte",
|
||||
},
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
-- Cheatsheet
|
||||
--
|
||||
-- Keymaps:
|
||||
-- <leader>gv Toggle working-tree diff (uncommitted changes vs HEAD)
|
||||
-- <leader>gV File history for the whole branch
|
||||
-- <leader>gH File history for the current file (archaeology)
|
||||
--
|
||||
-- DiffviewOpen — compare two states, flat list of changed files:
|
||||
-- :DiffviewOpen uncommitted changes
|
||||
-- :DiffviewOpen HEAD~3 last 3 commits + uncommitted
|
||||
-- :DiffviewOpen main...feature PR-style: what feature adds vs main
|
||||
--
|
||||
-- DiffviewFileHistory — browse commits over time, pick one to see its diff:
|
||||
-- :DiffviewFileHistory every commit reachable from HEAD
|
||||
-- :DiffviewFileHistory % only commits touching current file
|
||||
-- :DiffviewFileHistory path/to/dir only commits touching that path
|
||||
-- :DiffviewFileHistory --range=main..HEAD only commits on this branch
|
||||
--
|
||||
-- Inside the view: q closes, <tab>/<s-tab> next/prev file, g? for full help.
|
||||
|
||||
return {
|
||||
{
|
||||
"dlyongemallo/diffview.nvim",
|
||||
cmd = {
|
||||
"DiffviewOpen",
|
||||
"DiffviewClose",
|
||||
"DiffviewToggleFiles",
|
||||
"DiffviewFocusFiles",
|
||||
"DiffviewRefresh",
|
||||
"DiffviewFileHistory",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>gv",
|
||||
function()
|
||||
if next(require("diffview.lib").views) == nil then
|
||||
vim.cmd("DiffviewOpen")
|
||||
else
|
||||
vim.cmd("DiffviewClose")
|
||||
end
|
||||
end,
|
||||
desc = "Diffview toggle (working tree)",
|
||||
},
|
||||
{ "<leader>gV", "<cmd>DiffviewFileHistory<cr>", desc = "Diffview file history (branch)" },
|
||||
{ "<leader>gH", "<cmd>DiffviewFileHistory %<cr>", desc = "Diffview file history (current file)" },
|
||||
},
|
||||
opts = {
|
||||
-- Attach LSP to the working-tree side so gd/references/diagnostics work.
|
||||
default_args = {
|
||||
DiffviewOpen = { "--imply-local" },
|
||||
DiffviewFileHistory = { "--imply-local" },
|
||||
},
|
||||
enhanced_diff_hl = true,
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
disable_diagnostics = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,197 +0,0 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
return {
|
||||
-- Ensure eslint LSP is installed
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = { "eslint-lsp" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Configure eslint
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
eslint = {
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
"eslint.config.mjs",
|
||||
"eslint.config.js",
|
||||
"eslint.config.cjs",
|
||||
".git"
|
||||
),
|
||||
settings = {
|
||||
workingDirectories = { mode = "auto" },
|
||||
},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
eslint = function(_, opts)
|
||||
require("lspconfig").eslint.setup(opts)
|
||||
return true
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Format with eslint on save, or prettier if project has prettier config
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = function()
|
||||
local function has_prettier_config(bufnr)
|
||||
local root = vim.fs.root(bufnr, {
|
||||
".prettierrc",
|
||||
".prettierrc.json",
|
||||
".prettierrc.js",
|
||||
".prettierrc.cjs",
|
||||
".prettierrc.yaml",
|
||||
".prettierrc.yml",
|
||||
"prettier.config.js",
|
||||
"prettier.config.cjs",
|
||||
})
|
||||
return root ~= nil
|
||||
end
|
||||
|
||||
local function js_formatters(bufnr)
|
||||
if has_prettier_config(bufnr) then
|
||||
return { "prettier" }
|
||||
end
|
||||
return { "eslint_d" }
|
||||
end
|
||||
|
||||
return {
|
||||
formatters_by_ft = {
|
||||
javascript = js_formatters,
|
||||
javascriptreact = js_formatters,
|
||||
typescript = js_formatters,
|
||||
typescriptreact = js_formatters,
|
||||
svelte = js_formatters,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = function(_, opts)
|
||||
-- Remove the git branch because it's already shown in tmux.
|
||||
table.remove(opts.sections.lualine_b)
|
||||
|
||||
-- Remove the clock because I don't want it there.
|
||||
table.remove(opts.sections.lualine_z)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
-- Point markdownlint-cli2 at a global config so MD013 (line-length) stays
|
||||
-- disabled everywhere. The linter runs over stdin, so it can't reliably
|
||||
-- auto-discover a per-project config; pass --config explicitly instead.
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = function()
|
||||
local config = vim.fn.stdpath("config") .. "/.markdownlint-cli2.jsonc"
|
||||
require("lint").linters["markdownlint-cli2"].args = { "--config", config, "-" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
return {
|
||||
"folke/persistence.nvim",
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
group = vim.api.nvim_create_augroup("PersistenceAutoload", { clear = true }),
|
||||
nested = true,
|
||||
callback = function()
|
||||
if vim.fn.argc() == 0 then
|
||||
require("persistence").load()
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost", "FocusLost" }, {
|
||||
group = vim.api.nvim_create_augroup("PersistenceCrashSave", { clear = true }),
|
||||
callback = function()
|
||||
require("persistence").save()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
picker = {
|
||||
sources = {
|
||||
explorer = {
|
||||
hidden = true,
|
||||
ignored = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user