mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-21 21:05:38 +00:00
package and script updates
This commit is contained in:
parent
5d04fad4c9
commit
c81827ef95
@ -593,6 +593,7 @@ key_bindings:
|
||||
- { key: A, mods: Super, chars: "\x02" } # CMD-A sends CTRL-B for tmux
|
||||
- { key: D, mods: Super, chars: "\x14" } # CMD-D sends CTRL-T for fzf
|
||||
- { key: O, mods: Super, chars: "edit\x0D" } # CMD-O opens file in vim
|
||||
- { key: R, mods: Super, chars: "recent\x0D" } # CMD-R opens file in vim
|
||||
|
||||
- { key: Return, mods: Shift, chars: "\x1b[13;2u" }
|
||||
- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
|
6
cargo/Cargofile
Normal file
6
cargo/Cargofile
Normal file
@ -0,0 +1,6 @@
|
||||
# Packages to install with Cargo
|
||||
|
||||
toml-cli # Parse TOML from the command line
|
||||
rates # See exchange rates
|
||||
wrangler # Cloudflare Workers CLI
|
||||
csview # Quick display CSV as tables
|
@ -79,6 +79,7 @@ function abbrs --description 'All abbreviations'
|
||||
abbr -a fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -'
|
||||
abbr -a publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub'
|
||||
abbr -a forloop 'for i in (seq 1 100)'
|
||||
abbr -a gatekeeper 'sudo spctl --master-disable'
|
||||
|
||||
# Docker
|
||||
abbr -a dc '$DOTS/bin/docker_cleanup'
|
||||
|
4
fish.configlink/functions/recent.fish
Normal file
4
fish.configlink/functions/recent.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function recent --description "Open a recent file in Vim"
|
||||
set vimfile (fd --exec stat -f "%m%t%N" | sort -nr | cut -f2 | fzf)
|
||||
and vim $vimfile
|
||||
end
|
@ -4,3 +4,4 @@ tap "nmasur/repo"
|
||||
|
||||
brew "nmasur/repo/bid" # Look up stock tickers
|
||||
brew "nmasur/repo/bee" # Cheat on NYTimes Spelling Bee
|
||||
brew "tickrs" # Interactive stock tickers
|
||||
|
@ -17,3 +17,4 @@ brew "cjbassi/ytop/ytop" # Fancy system performance
|
||||
brew "nmasur/repo/update-ssh-config" # Update .ssh/config
|
||||
brew "kakoune" # Modal editor
|
||||
brew "awslogs" # View AWS log streams
|
||||
brew "uplink" # StorJ encrypted storage CLI
|
||||
|
@ -16,3 +16,4 @@ brew "youtube-dl" # Download YouTube videos
|
||||
brew "googler" # Search Google
|
||||
brew "gh" # GitHub commands
|
||||
brew "pandoc" # Document converter
|
||||
brew "visidata" # Spreadsheet manipulation
|
||||
|
@ -18,3 +18,13 @@ let g:vimwiki_auto_chdir = 1 " Set local dir to Wiki when open
|
||||
let g:vimwiki_create_link = 0 " Don't automatically create new links
|
||||
let g:vimwiki_listsyms = ' x' " Set checkbox symbol progression
|
||||
let g:vimwiki_table_mappings = 0 " VimWiki table keybinds interfere with tab completion
|
||||
|
||||
" Insert from command-mode into buffer
|
||||
function! PInsert(item)
|
||||
let @z=a:item
|
||||
norm "zpx
|
||||
endfunction
|
||||
|
||||
command! AddTag call fzf#run({'source': 'rg "#[\w/]+[ |\$]" -o --no-filename --no-line-number | sort | uniq', 'sink': function('PInsert')})
|
||||
|
||||
autocmd FileType markdown inoremap ;tt <Esc>:AddTag<CR>
|
||||
|
@ -46,24 +46,24 @@ use_fish_shell() {
|
||||
exit 1
|
||||
fi
|
||||
FISH_SHELL=$(which fish)
|
||||
if ! (cat /etc/shells | grep $FISH_SHELL > /dev/null)
|
||||
if ! (grep "$FISH_SHELL" /etc/shells > /dev/null)
|
||||
then
|
||||
echo "Modifying /etc/shells"
|
||||
echo "Requires sudo password"
|
||||
sudo echo $FISH_SHELL >> /etc/shells
|
||||
echo "$FISH_SHELL" | sudo tee -a /etc/shells
|
||||
fi
|
||||
if ! (echo "$SHELL" | grep fish > /dev/null)
|
||||
then
|
||||
echo "Changing default shell to fish"
|
||||
echo "Requires sudo password"
|
||||
sudo chsh -s $FISH_SHELL
|
||||
sudo chsh -s "$FISH_SHELL"
|
||||
fi
|
||||
|
||||
echo "fish ✓"
|
||||
}
|
||||
|
||||
setup_poetry() {
|
||||
poetry completions fish > $(brew --prefix)/share/fish/vendor_completions.d/poetry.fish
|
||||
poetry completions fish > "$(brew --prefix)/share/fish/vendor_completions.d/poetry.fish"
|
||||
}
|
||||
|
||||
printf "\nbootstrapping...\n\n"
|
||||
@ -76,8 +76,9 @@ use_fish_shell
|
||||
|
||||
echo ""
|
||||
echo "consider running other scripts:"
|
||||
echo " - all_brews"
|
||||
echo " - install_casks"
|
||||
echo " - brews"
|
||||
echo " - casks"
|
||||
echo " - configure_macos"
|
||||
echo " - install_rust"
|
||||
echo " - rust"
|
||||
echo " - cargos"
|
||||
echo ""
|
||||
|
@ -5,7 +5,6 @@ cd "$DOTS" || (echo "Directory not found: $DOTS"; exit 1)
|
||||
DOTS="$PWD"
|
||||
|
||||
all_brews() {
|
||||
brewfile=$DOTS/homebrew/Caskfile
|
||||
for brewfile in $(find "$DOTS/homebrew" -iname "*.Brewfile")
|
||||
do
|
||||
/usr/local/bin/brew bundle check --file "$brewfile" \
|
26
scripts/cargos
Executable file
26
scripts/cargos
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
DOTS=$(dirname "$0")/..
|
||||
cd "$DOTS" || (echo "Directory not found: $DOTS"; exit 1)
|
||||
DOTS="$PWD"
|
||||
|
||||
check_rust() {
|
||||
if ! (which ~/.cargo/bin/rustup > /dev/null)
|
||||
then
|
||||
echo "Install rust (cargo) before continuing"
|
||||
echo "Run the rust script before this one"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
all_cargos() {
|
||||
cargofile=$DOTS/cargo/Cargofile
|
||||
sed 's/#.*$//g;/^$/d' "$cargofile" | while read -r line
|
||||
do
|
||||
cargo install "$line"
|
||||
done \
|
||||
&& echo "all cargos installed ✓"
|
||||
}
|
||||
|
||||
check_rust
|
||||
all_cargos
|
@ -29,12 +29,12 @@ download_rust_analyzer() {
|
||||
echo "rust-analyzer ✓"
|
||||
}
|
||||
|
||||
# cargo-edit: quickly add and remove packages
|
||||
# whatfeatures: see optional features for a package
|
||||
install_cargos() {
|
||||
set -- \
|
||||
'cargo-edit'
|
||||
'cargo-whatfeatures' \
|
||||
'jql' \
|
||||
'toml-cli'
|
||||
'cargo-edit' \
|
||||
'cargo-whatfeatures'
|
||||
for program do
|
||||
cargo install "$program"
|
||||
done
|
Loading…
Reference in New Issue
Block a user