mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-20 23:06:51 +00:00
Compare commits
16 Commits
26.1.25
...
3907502e75
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3907502e75 | ||
| 3fb9d2a32e | |||
| e1050fc7e1 | |||
| 9d7a1acd30 | |||
| 9b7942a9fb | |||
| 3e6b80b598 | |||
| f6fb14d651 | |||
| bafb8fc2f6 | |||
| 6b11727540 | |||
| 5f4268d2e0 | |||
| ed3f881b93 | |||
| 939ee65e7a | |||
| 14f0cd00e2 | |||
| ddbfed1dd9 | |||
| e19120c45a | |||
|
|
d46631b017 |
4
.github/workflows/linters.yml
vendored
4
.github/workflows/linters.yml
vendored
@@ -30,9 +30,9 @@ jobs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Yarn Lock Changes
|
||||
uses: Simek/yarn-lock-changes@61d1a0595070b79c1abdc8e1e5a5f5d98b18918c # v0.12.2
|
||||
uses: Simek/yarn-lock-changes@c7543145aaafdd8fc925cea5d85b2bd5a73091f8 # v0.14.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run PR Lint
|
||||
uses: ivuorinen/actions/pr-lint@f98ae7cd7d0feb1f9d6b01de0addbb11414cfc73 # v2026.01.21
|
||||
uses: ivuorinen/actions/pr-lint@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
|
||||
|
||||
2
.github/workflows/sync-labels.yml
vendored
2
.github/workflows/sync-labels.yml
vendored
@@ -29,4 +29,4 @@ jobs:
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- uses: ivuorinen/actions/sync-labels@f98ae7cd7d0feb1f9d6b01de0addbb11414cfc73 # v2026.01.21
|
||||
- uses: ivuorinen/actions/sync-labels@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
|
||||
|
||||
20
.gitmodules
vendored
20
.gitmodules
vendored
@@ -24,26 +24,11 @@
|
||||
url = https://github.com/tmux-plugins/tmux-continuum
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-sensible"]
|
||||
path = config/tmux/plugins/tmux-sensible
|
||||
url = https://github.com/tmux-plugins/tmux-sensible.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-sessionist"]
|
||||
path = config/tmux/plugins/tmux-sessionist
|
||||
url = https://github.com/tmux-plugins/tmux-sessionist.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-yank"]
|
||||
path = config/tmux/plugins/tmux-yank
|
||||
url = https://github.com/tmux-plugins/tmux-yank.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-window-name"]
|
||||
path = config/tmux/plugins/tmux-window-name
|
||||
url = https://github.com/ivuorinen/tmux-window-name.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-pip"]
|
||||
path = tools/dotbot-pip
|
||||
url = https://github.com/sobolevn/dotbot-pip.git
|
||||
@@ -54,11 +39,6 @@
|
||||
url = https://github.com/MunifTanjim/tmux-suspend.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-mode-indicator"]
|
||||
path = config/tmux/plugins/tmux-mode-indicator
|
||||
url = https://github.com/MunifTanjim/tmux-mode-indicator.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-current-pane-hostname"]
|
||||
path = config/tmux/plugins/tmux-current-pane-hostname
|
||||
url = https://github.com/soyuka/tmux-current-pane-hostname.git
|
||||
|
||||
@@ -24,20 +24,12 @@ git submodule add --name antidote \
|
||||
# tmux plugin manager and plugins
|
||||
git submodule add --name tmux/tmux-continuum \
|
||||
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
||||
git submodule add --name tmux/tmux-mode-indicator \
|
||||
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
||||
git submodule add --name tmux/tmux-resurrect \
|
||||
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect
|
||||
git submodule add --name tmux/tmux-sensible \
|
||||
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
||||
git submodule add --name tmux/tmux-sessionist \
|
||||
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
|
||||
git submodule add --name tmux/tmux-suspend \
|
||||
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
|
||||
git submodule add --name tmux/tmux-window-name \
|
||||
-f https://github.com/ivuorinen/tmux-window-name.git config/tmux/plugins/tmux-window-name
|
||||
git submodule add --name tmux/tmux-yank \
|
||||
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
|
||||
git submodule add --name tmux/tmux-current-pane-hostname \
|
||||
-f https://github.com/soyuka/tmux-current-pane-hostname.git config/tmux/plugins/tmux-current-pane-hostname
|
||||
git submodule add --name tmux/tmux-dark-notify \
|
||||
@@ -61,6 +53,11 @@ folders=(
|
||||
"config/tmux/plugins/tmux-menus"
|
||||
"tools/dotbot-crontab"
|
||||
"tools/dotbot-snap"
|
||||
"config/tmux/plugins/tmux-window-name"
|
||||
"config/tmux/plugins/tmux-sensible"
|
||||
"config/tmux/plugins/tmux-mode-indicator"
|
||||
"config/tmux/plugins/tmux-yank"
|
||||
"config/tmux/plugins/tmux-fzf-url"
|
||||
"config/nvim-kickstart"
|
||||
"local/bin/asdf"
|
||||
"local/asdf"
|
||||
|
||||
17
base/zshrc
17
base/zshrc
@@ -33,24 +33,7 @@ source_fzf_config()
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to set up tmux window name plugin if tmux is active
|
||||
setup_tmux_window_name_plugin()
|
||||
{
|
||||
if [[ -n "$TMUX" ]]; then
|
||||
local tmux_window_name_plugin="$TMUX_PLUGINS/tmux-window-name/scripts/rename_session_windows.py"
|
||||
if [[ -f "$tmux_window_name_plugin" ]]; then
|
||||
tmux_window_name()
|
||||
{
|
||||
($tmux_window_name_plugin &)
|
||||
}
|
||||
add-zsh-hook chpwd tmux_window_name
|
||||
tmux_window_name
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
source_fzf_config
|
||||
setup_tmux_window_name_plugin
|
||||
x-have antidot && eval "$(antidot init)"
|
||||
|
||||
autoload -Uz compinit bashcompinit
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// A cargo subcommand for checking and applying
|
||||
// updates to installed executables
|
||||
cargo-update
|
||||
// Cargo cache management utility
|
||||
cargo-cache
|
||||
// An incremental parsing system for programming tools
|
||||
tree-sitter-cli
|
||||
// a subprocess caching utility
|
||||
bkt
|
||||
// a structural diff that understands syntax
|
||||
difftastic
|
||||
// A simple, fast and user-friendly alternative to 'find'
|
||||
fd-find
|
||||
// recursively searches directories for a
|
||||
// regex pattern while respecting your gitignore
|
||||
ripgrep
|
||||
// A version manager for neovim
|
||||
bob-nvim
|
||||
// bottom, btm - A cross-platform graphical process/system monitor with
|
||||
// a customizable interface and a multitude of features.
|
||||
bottom
|
||||
// A modern alternative to ls
|
||||
eza
|
||||
// Tmux Sessionizer: A tool for opening git repositories as tmux sessions
|
||||
tmux-sessionizer
|
||||
// zoxide, a smarter cd command
|
||||
zoxide
|
||||
@@ -1,29 +0,0 @@
|
||||
// These are golang packages I use,
|
||||
// so they should be available with all versions
|
||||
|
||||
// Git Profile allows you to switch between user profiles in git repos
|
||||
github.com/dotzero/git-profile@latest
|
||||
// An extensible command line tool or library to format yaml files.
|
||||
github.com/google/yamlfmt/cmd/yamlfmt@latest
|
||||
// Parsing HTML at the command line
|
||||
github.com/ericchiang/pup@latest
|
||||
// HTML to Markdown converter
|
||||
github.com/suntong/html2md@latest
|
||||
// cheat allows you to create and view interactive cheatsheets on the cli.
|
||||
github.com/cheat/cheat/cmd/cheat@latest
|
||||
// Render markdown on the CLI, with pizzazz! 💅
|
||||
github.com/charmbracelet/glow@latest
|
||||
// Static checker for GitHub Actions workflow files
|
||||
github.com/rhysd/actionlint/cmd/actionlint@latest
|
||||
// Cleans up your $HOME from those pesky dotfiles
|
||||
github.com/doron-cohen/antidot@latest
|
||||
// FZF is a general-purpose command-line fuzzy finder.
|
||||
github.com/junegunn/fzf@latest
|
||||
// gopls, the Go language server
|
||||
golang.org/x/tools/gopls@latest
|
||||
// A language for writing HTML user interfaces in Go.
|
||||
github.com/a-h/templ/cmd/templ@latest
|
||||
// A tool for glamorous shell scripts 🎀
|
||||
github.com/charmbracelet/gum@latest
|
||||
// A terminal session manager
|
||||
github.com/joshmedeski/sesh/v2@latest
|
||||
@@ -1,7 +0,0 @@
|
||||
blade-formatter
|
||||
corepack
|
||||
editorconfig-checker
|
||||
github-release-notes
|
||||
neovim
|
||||
npm
|
||||
stylelint-lsp
|
||||
@@ -1,4 +0,0 @@
|
||||
ansible
|
||||
pipenv
|
||||
neovim
|
||||
libtmux
|
||||
@@ -3,6 +3,13 @@
|
||||
|
||||
# Set default configuration using session variables for most settings
|
||||
# Only PHPENV_GLOBAL_VERSION needs to persist across shells
|
||||
|
||||
# Provider override (empty = auto-detect)
|
||||
# Valid values: homebrew, apt
|
||||
if not set -q PHPENV_PROVIDER
|
||||
set -g PHPENV_PROVIDER ""
|
||||
end
|
||||
|
||||
if not set -q PHPENV_AUTO_INSTALL
|
||||
set -g PHPENV_AUTO_INSTALL false
|
||||
end
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# │ fish/config.fish │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
fish_config theme choose "Catppuccin Mocha"
|
||||
|
||||
test -e "$HOME/.config/fish/alias.fish" &&
|
||||
source "$HOME/.config/fish/alias.fish"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
jorgebucaran/fisher
|
||||
ilancosman/tide@v6
|
||||
jethrokuan/z
|
||||
ivuorinen/phpenv.fish
|
||||
ilancosman/tide@v6
|
||||
catppuccin/fish
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
||||
set --local fisher_version 4.4.5
|
||||
set --local fisher_version 4.4.8
|
||||
set --local fish_plugins $__fish_config_dir/fish_plugins
|
||||
|
||||
switch "$cmd"
|
||||
case -v --version
|
||||
echo "fisher, version $fisher_version"
|
||||
case "" -h --help
|
||||
echo "Usage: fisher install <plugins...> Install plugins"
|
||||
echo " fisher remove <plugins...> Remove installed plugins"
|
||||
echo " fisher update <plugins...> Update installed plugins"
|
||||
echo " fisher update Update all installed plugins"
|
||||
echo " fisher list [<regex>] List installed plugins matching regex"
|
||||
echo "Usage: fisher install <plugins...> Install plugins"
|
||||
echo " fisher remove <plugins...> Remove installed plugins"
|
||||
echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
|
||||
echo " fisher update <plugins...> Update installed plugins"
|
||||
echo " fisher update Update all installed plugins"
|
||||
echo " fisher list [<regex>] List installed plugins matching regex"
|
||||
echo "Options:"
|
||||
echo " -v, --version Print version"
|
||||
echo " -h, --help Print this help message"
|
||||
@@ -19,9 +20,11 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
|
||||
case ls list
|
||||
string match --entire --regex -- "$argv[2]" $_fisher_plugins
|
||||
case install update remove
|
||||
case install update remove uninstall
|
||||
isatty || read --local --null --array stdin && set --append argv $stdin
|
||||
|
||||
test "$cmd" = uninstall && set cmd remove
|
||||
|
||||
set --local install_plugins
|
||||
set --local update_plugins
|
||||
set --local remove_plugins
|
||||
@@ -38,6 +41,8 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
|
||||
end
|
||||
set arg_plugins $file_plugins
|
||||
else if test "$cmd" = install && ! set --query old_plugins[1]
|
||||
set --append arg_plugins $file_plugins
|
||||
end
|
||||
|
||||
for plugin in $arg_plugins
|
||||
@@ -86,6 +91,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
if test -e $plugin
|
||||
command cp -Rf $plugin/* $source
|
||||
else
|
||||
set resp (command mktemp)
|
||||
set temp (command mktemp -d)
|
||||
set repo (string split -- \@ $plugin) || set repo[2] HEAD
|
||||
|
||||
@@ -98,8 +104,13 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
|
||||
echo Fetching (set_color --underline)\$url(set_color normal)
|
||||
|
||||
if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
|
||||
set http (command curl -q --silent -L -o \$resp -w %{http_code} \$url)
|
||||
|
||||
if test \"\$http\" = 200 && command tar -xzC \$temp -f \$resp 2>/dev/null
|
||||
command cp -Rf \$temp/*/* $source
|
||||
else if test \"\$http\" = 403
|
||||
echo fisher: GitHub API rate limit exceeded \(HTTP 403\) >&2
|
||||
command rm -rf $source
|
||||
else
|
||||
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
|
||||
command rm -rf $source
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
61
config/fish/themes/Catppuccin Frappe.theme
Normal file
61
config/fish/themes/Catppuccin Frappe.theme
Normal file
@@ -0,0 +1,61 @@
|
||||
# name: 'Catppuccin Frappé'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
|
||||
[light]
|
||||
# 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
|
||||
|
||||
[dark]
|
||||
# preferred_background: 303446
|
||||
fish_color_normal c6d0f5
|
||||
fish_color_command 8caaee
|
||||
fish_color_param eebebe
|
||||
fish_color_keyword ca9ee6
|
||||
fish_color_quote a6d189
|
||||
fish_color_redirection f4b8e4
|
||||
fish_color_end ef9f76
|
||||
fish_color_comment 838ba7
|
||||
fish_color_error e78284
|
||||
fish_color_gray 737994
|
||||
fish_color_selection --background=414559
|
||||
fish_color_search_match --background=414559
|
||||
fish_color_option a6d189
|
||||
fish_color_operator f4b8e4
|
||||
fish_color_escape ea999c
|
||||
fish_color_autosuggestion 737994
|
||||
fish_color_cancel e78284
|
||||
fish_color_cwd e5c890
|
||||
fish_color_user 81c8be
|
||||
fish_color_host 8caaee
|
||||
fish_color_host_remote a6d189
|
||||
fish_color_status e78284
|
||||
fish_pager_color_progress 737994
|
||||
fish_pager_color_prefix f4b8e4
|
||||
fish_pager_color_completion c6d0f5
|
||||
fish_pager_color_description 737994
|
||||
|
||||
@@ -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 d20f39
|
||||
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
|
||||
61
config/fish/themes/Catppuccin Macchiato.theme
Normal file
61
config/fish/themes/Catppuccin Macchiato.theme
Normal file
@@ -0,0 +1,61 @@
|
||||
# name: 'Catppuccin Macchiato'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
|
||||
[light]
|
||||
# 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
|
||||
|
||||
[dark]
|
||||
# preferred_background: 24273a
|
||||
fish_color_normal cad3f5
|
||||
fish_color_command 8aadf4
|
||||
fish_color_param f0c6c6
|
||||
fish_color_keyword c6a0f6
|
||||
fish_color_quote a6da95
|
||||
fish_color_redirection f5bde6
|
||||
fish_color_end f5a97f
|
||||
fish_color_comment 8087a2
|
||||
fish_color_error ed8796
|
||||
fish_color_gray 6e738d
|
||||
fish_color_selection --background=363a4f
|
||||
fish_color_search_match --background=363a4f
|
||||
fish_color_option a6da95
|
||||
fish_color_operator f5bde6
|
||||
fish_color_escape ee99a0
|
||||
fish_color_autosuggestion 6e738d
|
||||
fish_color_cancel ed8796
|
||||
fish_color_cwd eed49f
|
||||
fish_color_user 8bd5ca
|
||||
fish_color_host 8aadf4
|
||||
fish_color_host_remote a6da95
|
||||
fish_color_status ed8796
|
||||
fish_pager_color_progress 6e738d
|
||||
fish_pager_color_prefix f5bde6
|
||||
fish_pager_color_completion cad3f5
|
||||
fish_pager_color_description 6e738d
|
||||
|
||||
@@ -1,11 +1,41 @@
|
||||
# name: 'Catppuccin Mocha'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
# preferred_background: 1e1e2e
|
||||
|
||||
[light]
|
||||
# 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
|
||||
|
||||
[dark]
|
||||
# preferred_background: 1e1e2e
|
||||
fish_color_normal cdd6f4
|
||||
fish_color_command 89b4fa
|
||||
fish_color_param f2cdcd
|
||||
fish_color_keyword f38ba8
|
||||
fish_color_keyword cba6f7
|
||||
fish_color_quote a6e3a1
|
||||
fish_color_redirection f5c2e7
|
||||
fish_color_end fab387
|
||||
@@ -28,3 +58,4 @@ fish_pager_color_progress 6c7086
|
||||
fish_pager_color_prefix f5c2e7
|
||||
fish_pager_color_completion cdd6f4
|
||||
fish_pager_color_description 6c7086
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
https://wfxr.mit-license.org/2018
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#===============================================================================
|
||||
# Author: Wenxuan
|
||||
# Email: wenxuangm@gmail.com
|
||||
# Created: 2018-04-06 12:12
|
||||
#===============================================================================
|
||||
get_fzf_options()
|
||||
{
|
||||
local fzf_options
|
||||
local fzf_default_options='-w 100% -h 50% --multi -0 --no-preview'
|
||||
fzf_options="$(tmux show -gqv '@fzf-url-fzf-options')"
|
||||
[ -n "$fzf_options" ] && echo "$fzf_options" || echo "$fzf_default_options"
|
||||
}
|
||||
|
||||
fzf_filter()
|
||||
{
|
||||
eval "fzf-tmux $(get_fzf_options)"
|
||||
}
|
||||
|
||||
custom_open=$3
|
||||
open_url()
|
||||
{
|
||||
if [[ -n $custom_open ]]; then
|
||||
$custom_open "$@"
|
||||
elif hash xdg-open &> /dev/null; then
|
||||
nohup xdg-open "$@"
|
||||
elif hash open &> /dev/null; then
|
||||
nohup open "$@"
|
||||
elif [[ -n $BROWSER ]]; then
|
||||
nohup "$BROWSER" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
limit='screen'
|
||||
[[ $# -ge 2 ]] && limit=$2
|
||||
|
||||
if [[ $limit == 'screen' ]]; then
|
||||
content="$(tmux capture-pane -J -p -e | sed -r 's/\x1B\[[0-9;]*[mK]//g'))"
|
||||
else
|
||||
content="$(tmux capture-pane -J -p -e -S -"$limit" | sed -r 's/\x1B\[[0-9;]*[mK]//g'))"
|
||||
fi
|
||||
|
||||
urls=$(echo "$content" | grep -oE '(https?|ftp|file):/?//[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]')
|
||||
wwws=$(echo "$content" | grep -oE '(http?s://)?www\.[a-zA-Z](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}(/\S+)*' | grep -vE '^https?://' | sed 's/^\(.*\)$/http:\/\/\1/')
|
||||
ips=$(echo "$content" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?(/\S+)*' | sed 's/^\(.*\)$/http:\/\/\1/')
|
||||
gits=$(echo "$content" | grep -oE '(ssh://)?git@\S*' | sed 's/:/\//g' | sed 's/^\(ssh\/\/\/\)\{0,1\}git@\(.*\)$/https:\/\/\2/')
|
||||
gh=$(echo "$content" | grep -oE "['\"]([_A-Za-z0-9-]*/[_.A-Za-z0-9-]*)['\"]" | sed "s/['\"]//g" | sed 's#.#https://github.com/&#')
|
||||
|
||||
if [[ $# -ge 1 && $1 != '' ]]; then
|
||||
extras=$(echo "$content" | eval "$1")
|
||||
fi
|
||||
|
||||
items=$(
|
||||
printf '%s\n' "${urls[@]}" "${wwws[@]}" "${gh[@]}" "${ips[@]}" "${gits[@]}" "${extras[@]}" \
|
||||
| grep -v '^$' \
|
||||
| sort -u \
|
||||
| nl -w3 -s ' '
|
||||
)
|
||||
[ -z "$items" ] && tmux display 'tmux-fzf-url: no URLs found' && exit
|
||||
|
||||
fzf_filter <<< "$items" | awk '{print $2}' \
|
||||
| while read -r chosen; do
|
||||
open_url "$chosen" &> "/tmp/tmux-$(id -u)-fzf-url.log"
|
||||
done
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#===============================================================================
|
||||
# Author: Wenxuan
|
||||
# Email: wenxuangm@gmail.com
|
||||
# Created: 2018-04-06 09:30
|
||||
#===============================================================================
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
# $1: option
|
||||
# $2: default value
|
||||
tmux_get() {
|
||||
local value
|
||||
value="$(tmux show -gqv "$1")"
|
||||
[ -n "$value" ] && echo "$value" || echo "$2"
|
||||
}
|
||||
|
||||
key="$(tmux_get '@fzf-url-bind' 'u')"
|
||||
history_limit="$(tmux_get '@fzf-url-history-limit' 'screen')"
|
||||
extra_filter="$(tmux_get '@fzf-url-extra-filter' '')"
|
||||
custom_open="$(tmux_get '@fzf-url-open' '')"
|
||||
echo "$extra_filter" >/tmp/filter
|
||||
|
||||
tmux bind-key "$key" run -b "$SCRIPT_DIR/fzf-url.sh '$extra_filter' $history_limit '$custom_open'"
|
||||
Submodule config/tmux/plugins/tmux-mode-indicator deleted from 7027903adc
Submodule config/tmux/plugins/tmux-sensible deleted from 2ce7679f9d
Submodule config/tmux/plugins/tmux-window-name deleted from 9a75967ced
Submodule config/tmux/plugins/tmux-yank deleted from fd8000238b
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get session list and pipe it to gum for selection
|
||||
SESH_LIST=$(
|
||||
sesh list -i \
|
||||
| gum filter \
|
||||
--limit 1 \
|
||||
--no-sort \
|
||||
--fuzzy \
|
||||
--placeholder 'Pick a sesh' \
|
||||
--height 50 \
|
||||
--prompt='⚡'
|
||||
)
|
||||
|
||||
# If a session was selected, connect to it
|
||||
if [ "$SESH_LIST" != "" ]; then
|
||||
sesh connect "$SESH_LIST"
|
||||
fi
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
set selection (sesh list --icons | fzf-tmux -p 80%,70% \
|
||||
--no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \
|
||||
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
|
||||
--bind 'tab:down,btab:up' \
|
||||
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)' \
|
||||
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
|
||||
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
|
||||
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
|
||||
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
|
||||
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \
|
||||
--preview-window 'right:55%' \
|
||||
--preview 'sesh preview {}')
|
||||
|
||||
if test -n "$selection"
|
||||
sesh connect "$selection"
|
||||
end
|
||||
79
config/tmux/sesh.sh
Executable file
79
config/tmux/sesh.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env bash
|
||||
# Unified sesh session picker with cascading tool detection:
|
||||
# 1. gum — simple fuzzy filter
|
||||
# 2. fzf-tmux — rich UI with keybinds, preview, session kill
|
||||
# 3. fzf — same as fzf-tmux but inline
|
||||
# 4. select — bare minimum numbered menu
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Fall back to native tmux session picker if sesh is not installed
|
||||
if ! command -v sesh &>/dev/null; then
|
||||
tmux choose-tree -Zs
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pick_with_gum() {
|
||||
sesh list -i \
|
||||
| gum filter \
|
||||
--limit 1 \
|
||||
--no-sort \
|
||||
--fuzzy \
|
||||
--placeholder 'Pick a sesh' \
|
||||
--height 50 \
|
||||
--prompt='⚡'
|
||||
}
|
||||
|
||||
FZF_COMMON_OPTS=(
|
||||
--no-sort --ansi
|
||||
--border-label ' sesh '
|
||||
--prompt '⚡ '
|
||||
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find'
|
||||
--bind 'tab:down,btab:up'
|
||||
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --icons)'
|
||||
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)'
|
||||
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)'
|
||||
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)'
|
||||
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)'
|
||||
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(⚡ )+reload(sesh list --icons)'
|
||||
--preview-window 'right:55%'
|
||||
--preview 'sesh preview {}'
|
||||
)
|
||||
|
||||
pick_with_fzf_tmux() {
|
||||
sesh list --icons | fzf-tmux -p 80%,70% "${FZF_COMMON_OPTS[@]}"
|
||||
}
|
||||
|
||||
pick_with_fzf() {
|
||||
sesh list --icons | fzf "${FZF_COMMON_OPTS[@]}"
|
||||
}
|
||||
|
||||
pick_with_select() {
|
||||
local sessions
|
||||
mapfile -t sessions < <(sesh list)
|
||||
if [[ ${#sessions[@]} -eq 0 ]]; then
|
||||
return
|
||||
fi
|
||||
PS3="Select session: "
|
||||
select choice in "${sessions[@]}"; do
|
||||
if [[ -n "${choice-}" ]]; then
|
||||
printf '%s' "$choice"
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Cascading tool detection
|
||||
if command -v gum &>/dev/null; then
|
||||
selection=$(pick_with_gum)
|
||||
elif command -v fzf-tmux &>/dev/null; then
|
||||
selection=$(pick_with_fzf_tmux)
|
||||
elif command -v fzf &>/dev/null; then
|
||||
selection=$(pick_with_fzf)
|
||||
else
|
||||
selection=$(pick_with_select)
|
||||
fi
|
||||
|
||||
if [[ -n "${selection-}" ]]; then
|
||||
sesh connect "$selection"
|
||||
fi
|
||||
@@ -1 +1 @@
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
set -g @catppuccin_flavour "mocha"
|
||||
|
||||
@@ -1 +1 @@
|
||||
set -g @catppuccin_flavor "latte"
|
||||
set -g @catppuccin_flavour "latte"
|
||||
|
||||
@@ -15,19 +15,21 @@
|
||||
# -o : Set the option only if it is not already set.
|
||||
# -u : Unset the specified option.
|
||||
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
# Enable proper color support
|
||||
set -as terminal-features ",*:RGB"
|
||||
set -as terminal-features ",xterm-256color:RGB:clipboard:usstyle:strikethrough:overline"
|
||||
|
||||
set -s escape-time 0 # Address vim mode switching delay
|
||||
set -s set-clipboard on # System clipboard via OSC 52
|
||||
set -g default-terminal "tmux-256color" # Set default terminal to 256 colors
|
||||
set -g detach-on-destroy off # don't detach tmux when killing a session
|
||||
set -g display-time 0 # Hide clock
|
||||
set -g focus-events on # Focus events enabled for terminals that support them
|
||||
set -g history-limit 50000 # Increase scrollback buffer size
|
||||
set -g mouse on # Mouse support
|
||||
set -g set-titles on # Allow tmux to set the terminal title
|
||||
set -g status on # Setting status on
|
||||
set -g status-interval 5 # Refresh status more often
|
||||
set -g status-keys vi # vi keys to move between panes
|
||||
set -wg aggressive-resize on # Better for grouped sessions and multi-monitor
|
||||
|
||||
# Keep Tmux alive when the initial command is finished
|
||||
set -g remain-on-exit off
|
||||
@@ -41,19 +43,10 @@ set -g renumber-windows on
|
||||
# │ Theme │
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
|
||||
set -g status-bg default
|
||||
set -g status-justify left
|
||||
set -g status-left ''
|
||||
set -g status-left-length "0"
|
||||
set -g status-position "bottom"
|
||||
#set -g status-right "#S@#h #{tmux_mode_indicator}"
|
||||
set -g status-right-length "50"
|
||||
#set -g window-status-current-format ' #I:#W#{?window_zoomed_flag, ◈ ,} '
|
||||
#set -g window-status-format ' #I:#W '
|
||||
set -g @catppuccin_status_background 'none'
|
||||
set -g @catppuccin_window_flags 'icon'
|
||||
set -g @catppuccin_window_text "#T"
|
||||
set -g @catppuccin_window_current_text "#T"
|
||||
set -g @catppuccin_window_left_separator "█"
|
||||
set -g @catppuccin_window_right_separator ""
|
||||
set -g @catppuccin_window_middle_separator " "
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Bindings │
|
||||
@@ -69,11 +62,11 @@ set -g @catppuccin_window_current_text "#T"
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Use Alt-arrow keys without prefix key to switch panes
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
# Use Ctrl-arrow keys without prefix key to switch panes
|
||||
bind -n C-Left select-pane -L
|
||||
bind -n C-Right select-pane -R
|
||||
bind -n C-Up select-pane -U
|
||||
bind -n C-Down select-pane -D
|
||||
|
||||
# Reload tmux config with <prefix> + r
|
||||
unbind r
|
||||
@@ -87,8 +80,16 @@ bind Escape copy-mode
|
||||
unbind p
|
||||
bind p paste-buffer
|
||||
|
||||
# copy-mode-vi: y copies to system clipboard, Y copies and pastes
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
||||
bind -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
|
||||
|
||||
# easier switching between next/prev window
|
||||
bind C-p previous-window
|
||||
bind C-n next-window
|
||||
|
||||
# global sessions
|
||||
bind -N "sesh selection" t display-popup -E "$HOME/.dotfiles/config/tmux/sesh-gum.sh"
|
||||
bind -N "sesh selection" t display-popup -E "$HOME/.dotfiles/config/tmux/sesh.sh"
|
||||
bind -N "last-session (via sesh) " L run-shell "sesh last"
|
||||
bind -N "sesh ui" N display-popup -E "sesh ui"
|
||||
|
||||
@@ -101,33 +102,16 @@ bind -N "sesh ui" N display-popup -E "sesh ui"
|
||||
# Plugin that lets you suspend local tmux session,
|
||||
# so that you can work with nested remote tmux session painlessly.
|
||||
# https://github.com/MunifTanjim/tmux-suspend
|
||||
# set -g @suspend_key 'F8' # Default is F12
|
||||
|
||||
## A plugin to name your tmux windows smartly.
|
||||
## https://github.com/ofirgall/tmux-window-name
|
||||
### Maximum name length of a window
|
||||
set -g @tmux_window_name_max_name_len "25"
|
||||
### Replace $HOME with ~ in window names
|
||||
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']"
|
||||
set -g @tmux_window_name_ignored_programs "['sqlite3', 'antidote', 'direnv', 'md5']" # Default is []
|
||||
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh']"
|
||||
set -g @tmux_window_name_substitute_sets "[('.+ipython2', 'ipython2'), ('.+ipython3', 'ipython3'), ('.+\.local', '.local'), ('.+asdf', 'asdf')]"
|
||||
set -g @tmux_window_name_use_tilde "True"
|
||||
set -g @suspend_key 'F8' # Default is F12
|
||||
set -g @suspend_suspended_options " \
|
||||
status-left-style::bg=brightblack\\,fg=black, \
|
||||
status-left:: ⏸ , \
|
||||
"
|
||||
|
||||
# https://github.com/erikw/tmux-dark-notify
|
||||
set -g @dark-notify-theme-path-light "$HOME/.dotfiles/config/tmux/theme-light.conf"
|
||||
set -g @dark-notify-theme-path-dark "$HOME/.dotfiles/config/tmux/theme-dark.conf"
|
||||
|
||||
## https://github.com/MunifTanjim/tmux-mode-indicator
|
||||
set -g @mode_indicator_copy_mode_style 'bg=default,fg=yellow'
|
||||
set -g @mode_indicator_empty_mode_style 'bg=default,fg=#7aa2f7'
|
||||
set -g @mode_indicator_prefix_mode_style 'bg=default,fg=#7aa2f7'
|
||||
set -g @mode_indicator_sync_mode_style 'bg=default,fg=red'
|
||||
|
||||
# https://github.com/wfxr/tmux-fzf-url
|
||||
set -g @fzf-url-bind 'u'
|
||||
set -g @fzf-url-history-limit '2000'
|
||||
|
||||
# https://github.com/tmux-plugins/tmux-continuum
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
@@ -143,14 +127,9 @@ run-shell "$HOME/.dotfiles/config/tmux/theme-activate.sh"
|
||||
|
||||
# ── Sourcing the plugins ──────────────────────────────────────────────
|
||||
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sensible/sensible.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-fzf-url/fzf-url.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/catppuccin/catppuccin.tmux"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# install-cargo-packages
|
||||
|
||||
Install Rust packages listed in `config/asdf/cargo-packages`.
|
||||
Install Rust packages defined in the script.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -8,5 +8,14 @@ Install Rust packages listed in `config/asdf/cargo-packages`.
|
||||
scripts/install-cargo-packages.sh
|
||||
```
|
||||
|
||||
The script installs each package with `cargo install` and runs
|
||||
`cargo-install-update` when available to update existing packages.
|
||||
## What it does
|
||||
|
||||
1. If `cargo-install-update` is available, updates all existing packages first
|
||||
and tracks which packages are already installed.
|
||||
2. Installs each package from the inline list using `cargo install`,
|
||||
skipping any already handled by the update step.
|
||||
Builds run in parallel using available CPU cores (minus two).
|
||||
3. Runs package-specific post-install steps.
|
||||
4. Cleans the cargo cache with `cargo cache --autoclean`.
|
||||
|
||||
To add or remove packages, edit the `packages` array in `scripts/install-cargo-packages.sh`.
|
||||
|
||||
@@ -3,27 +3,37 @@
|
||||
|
||||
msgr run "Starting to install rust/cargo packages"
|
||||
|
||||
# Track packages already managed by cargo install-update
|
||||
declare -A installed_packages
|
||||
|
||||
# If we have cargo install-update, use it first
|
||||
if command -v cargo-install-update &> /dev/null; then
|
||||
msgr run "Updating cargo packages with cargo install-update"
|
||||
cargo install-update -a
|
||||
# Show output in real-time (via stderr) while capturing it for parsing
|
||||
update_output=$(cargo install-update -a 2>&1 | tee /dev/stderr)
|
||||
msgr run_done "Done with cargo install-update"
|
||||
|
||||
# Parse installed package names from the update output
|
||||
while IFS= read -r pkg_name; do
|
||||
[[ -n "$pkg_name" ]] && installed_packages["$pkg_name"]=1
|
||||
done < <(echo "$update_output" | awk '/v[0-9]+\.[0-9]+/ { print $1 }')
|
||||
fi
|
||||
|
||||
[[ -z "$ASDF_CRATE_DEFAULT_PACKAGES_FILE" ]] \
|
||||
&& ASDF_CRATE_DEFAULT_PACKAGES_FILE="$DOTFILES/config/asdf/cargo-packages"
|
||||
|
||||
# Packages are defined in $DOTFILES/config/asdf/cargo-packages, one per line
|
||||
# Skip comments and empty lines
|
||||
packages=()
|
||||
while IFS= read -r line; do
|
||||
# Skip comments
|
||||
if [[ ${line:0:1} == "#" ]]; then continue; fi
|
||||
if [[ ${line:0:1} == "/" ]]; then continue; fi
|
||||
# Skip empty lines
|
||||
if [[ -z "$line" ]]; then continue; fi
|
||||
packages+=("$line")
|
||||
done < "$ASDF_CRATE_DEFAULT_PACKAGES_FILE"
|
||||
# Cargo packages to install
|
||||
packages=(
|
||||
cargo-update # A cargo subcommand for checking and applying updates to installed executables
|
||||
cargo-cache # Cargo cache management utility
|
||||
tree-sitter-cli # An incremental parsing system for programming tools
|
||||
bkt # A subprocess caching utility
|
||||
difftastic # A structural diff that understands syntax
|
||||
fd-find # A simple, fast and user-friendly alternative to 'find'
|
||||
ripgrep # Recursively searches directories for a regex pattern while respecting your gitignore
|
||||
bob-nvim # A version manager for neovim
|
||||
bottom # A cross-platform graphical process/system monitor
|
||||
eza # A modern alternative to ls
|
||||
tmux-sessionizer # A tool for opening git repositories as tmux sessions
|
||||
zoxide # A smarter cd command
|
||||
)
|
||||
|
||||
# Number of jobs to run in parallel, this helps to keep the system responsive
|
||||
BUILD_JOBS=$(nproc --ignore=2 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null || echo 1)
|
||||
@@ -32,10 +42,11 @@ BUILD_JOBS=$(nproc --ignore=2 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null ||
|
||||
install_packages()
|
||||
{
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
# Skip packages already handled by cargo install-update
|
||||
if [[ -n "${installed_packages[$pkg]+x}" ]]; then
|
||||
msgr ok "Skipping $pkg (already installed)"
|
||||
continue
|
||||
fi
|
||||
|
||||
msgr run "Installing cargo package $pkg"
|
||||
cargo install --jobs "$BUILD_JOBS" "$pkg"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# install-go-packages
|
||||
|
||||
Installs Go binaries defined in `config/go/packages`.
|
||||
Install Go packages defined in the script.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -8,5 +8,11 @@ Installs Go binaries defined in `config/go/packages`.
|
||||
scripts/install-go-packages.sh
|
||||
```
|
||||
|
||||
The script uses `go install` for each package path listed in the configuration
|
||||
file.
|
||||
## What it does
|
||||
|
||||
1. Checks that `go` is available.
|
||||
2. Installs each package from the inline list using `go install`.
|
||||
3. Runs post-install steps (e.g. generating shell completions).
|
||||
4. Clears the Go module and build caches.
|
||||
|
||||
To add or remove packages, edit the `packages` array in `scripts/install-go-packages.sh`.
|
||||
|
||||
@@ -11,31 +11,25 @@ msgr run "Installing go packages"
|
||||
|
||||
! x-have "go" && msgr err "go hasn't been installed yet." && exit 0
|
||||
|
||||
[[ -z "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE" ]] \
|
||||
&& ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$DOTFILES/config/asdf/golang-packages"
|
||||
|
||||
# Packages are defined in $DOTFILES/config/asdf/golang-packages, one per line
|
||||
# Skip comments and empty lines
|
||||
packages=()
|
||||
if [[ -f "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE" ]]; then
|
||||
while IFS= read -r line; do
|
||||
# Skip comments
|
||||
if [[ ${line:0:1} == "#" ]]; then continue; fi
|
||||
if [[ ${line:0:1} == "/" ]]; then continue; fi
|
||||
# Skip empty lines
|
||||
if [[ -z "$line" ]]; then continue; fi
|
||||
packages+=("$line")
|
||||
done < "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE"
|
||||
fi
|
||||
# Go packages to install
|
||||
packages=(
|
||||
github.com/dotzero/git-profile@latest # Switch between git user profiles
|
||||
github.com/google/yamlfmt/cmd/yamlfmt@latest # Format yaml files
|
||||
github.com/cheat/cheat/cmd/cheat@latest # Interactive cheatsheets on the CLI
|
||||
github.com/charmbracelet/glow@latest # Render markdown on the CLI
|
||||
github.com/junegunn/fzf@latest # General-purpose fuzzy finder
|
||||
github.com/charmbracelet/gum@latest # Glamorous shell scripts
|
||||
github.com/joshmedeski/sesh/v2@latest # Terminal session manager
|
||||
)
|
||||
|
||||
# Function to install go packages
|
||||
install_packages()
|
||||
{
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
# Strip inline comments and trim whitespace
|
||||
pkg="${pkg%%#*}"
|
||||
pkg="${pkg// /}"
|
||||
[[ -z "$pkg" ]] && continue
|
||||
|
||||
msgr nested "Installing go package: $pkg"
|
||||
go install "$pkg"
|
||||
@@ -52,11 +46,6 @@ post_install()
|
||||
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \
|
||||
&& msgr run_done "Installed completions for git-profile"
|
||||
fi
|
||||
|
||||
if command -v antidot &> /dev/null; then
|
||||
antidot update \
|
||||
&& msgr run_done "Updated antidot database"
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to clear go cache
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# install-npm-packages
|
||||
|
||||
Installs global npm packages listed in `config/npm/packages`.
|
||||
Install npm packages defined in the script.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -8,4 +8,11 @@ Installs global npm packages listed in `config/npm/packages`.
|
||||
scripts/install-npm-packages.sh
|
||||
```
|
||||
|
||||
Uses `npm install -g` for each package in the configuration file.
|
||||
## What it does
|
||||
|
||||
1. Checks that `npm` is available.
|
||||
2. Installs each package from the inline list using `npm install -g`.
|
||||
3. Upgrades all global packages.
|
||||
4. Cleans the npm cache.
|
||||
|
||||
To add or remove packages, edit the `packages` array in `scripts/install-npm-packages.sh`.
|
||||
|
||||
@@ -15,23 +15,20 @@ if ! command -v npm &> /dev/null; then
|
||||
fi
|
||||
|
||||
packages=(
|
||||
# This is a tool to check if your files consider your .editorconfig rules.
|
||||
"editorconfig-checker"
|
||||
# Node module to create a release or a changelog from
|
||||
# a tag and uses issues or commits to creating the release notes.
|
||||
"github-release-notes"
|
||||
"neovim"
|
||||
"corepack"
|
||||
editorconfig-checker # Check files against .editorconfig rules
|
||||
github-release-notes # Create release notes from tags and issues
|
||||
neovim # Neovim node client
|
||||
corepack # Node.js package manager version management
|
||||
)
|
||||
|
||||
# Function to install npm packages
|
||||
install_packages()
|
||||
{
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
# Strip inline comments and trim whitespace
|
||||
pkg="${pkg%%#*}"
|
||||
pkg="${pkg// /}"
|
||||
[[ -z "$pkg" ]] && continue
|
||||
|
||||
if npm ls -g -p "$pkg" &> /dev/null; then
|
||||
msgr run_done "$pkg" "already installed"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# install-pip-packages
|
||||
|
||||
Installs Python packages from `config/pip/packages` using `pip`.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
scripts/install-pip-packages.sh
|
||||
```
|
||||
|
||||
The script uses `pip install --user` for each package entry.
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# @description Install python/pip packages.
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "${DOTFILES}/config/shared.sh"
|
||||
|
||||
# Enable verbosity with VERBOSE=1
|
||||
VERBOSE="${VERBOSE:-0}"
|
||||
|
||||
msgr run "Starting to install pip packages"
|
||||
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
msgr err "Could not find python3, something really weird is going on."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msgr nested "Upgrading pip"
|
||||
python3 -m pip install --user --upgrade pip
|
||||
|
||||
packages=(
|
||||
"pipx"
|
||||
"libtmux"
|
||||
)
|
||||
|
||||
# Function to install pip packages
|
||||
install_packages()
|
||||
{
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msgr nested "Installing pip package: $pkg"
|
||||
python3 -m pip install --user --upgrade "$pkg"
|
||||
echo ""
|
||||
done
|
||||
}
|
||||
|
||||
install_packages
|
||||
msgr run_done "Run pip package installations"
|
||||
18
scripts/install-python-packages.md
Normal file
18
scripts/install-python-packages.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# install-python-packages
|
||||
|
||||
Install Python packages defined in the script using `uv`.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
scripts/install-python-packages.sh
|
||||
```
|
||||
|
||||
## What it does
|
||||
|
||||
1. Checks that `uv` is available; if missing, installs it via the official installer.
|
||||
2. Installs each CLI tool from the inline `tools` array using `uv tool install --upgrade`.
|
||||
3. Installs each library from the inline `libraries` array using `uv pip install --system --upgrade`.
|
||||
4. Upgrades all uv-managed tools with `uv tool upgrade --all`.
|
||||
|
||||
To add or remove packages, edit the `tools` or `libraries` arrays in `scripts/install-python-packages.sh`.
|
||||
77
scripts/install-python-packages.sh
Executable file
77
scripts/install-python-packages.sh
Executable file
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env bash
|
||||
# @description Install Python packages using uv.
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "$DOTFILES/config/shared.sh"
|
||||
|
||||
# Enable verbosity with VERBOSE=1
|
||||
VERBOSE="${VERBOSE:-0}"
|
||||
|
||||
msgr run "Starting to install Python packages"
|
||||
|
||||
# Ensure uv is available
|
||||
if ! command -v uv &> /dev/null; then
|
||||
msgr nested "uv not found, installing via official installer"
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
# CLI tools — installed isolated with `uv tool install`
|
||||
tools=(
|
||||
ansible # IT automation and configuration management
|
||||
)
|
||||
|
||||
# Library packages — installed into system Python with `uv pip install --system`
|
||||
libraries=(
|
||||
libtmux # Python API for tmux
|
||||
pynvim # Neovim Python client
|
||||
)
|
||||
|
||||
# Function to install CLI tools via uv tool install
|
||||
install_tools()
|
||||
{
|
||||
msgr run "Installing Python CLI tools"
|
||||
for pkg in "${tools[@]}"; do
|
||||
# Strip inline comments and trim whitespace
|
||||
pkg="${pkg%%#*}"
|
||||
pkg="${pkg// /}"
|
||||
[[ -z "$pkg" ]] && continue
|
||||
|
||||
msgr nested "Installing tool: $pkg"
|
||||
uv tool install --upgrade "$pkg"
|
||||
echo ""
|
||||
done
|
||||
}
|
||||
|
||||
# Function to install library packages via uv pip install
|
||||
install_libraries()
|
||||
{
|
||||
msgr run "Installing Python libraries"
|
||||
for pkg in "${libraries[@]}"; do
|
||||
# Strip inline comments and trim whitespace
|
||||
pkg="${pkg%%#*}"
|
||||
pkg="${pkg// /}"
|
||||
[[ -z "$pkg" ]] && continue
|
||||
|
||||
msgr nested "Installing library: $pkg"
|
||||
uv pip install --system --upgrade "$pkg"
|
||||
echo ""
|
||||
done
|
||||
}
|
||||
|
||||
# Function to upgrade all uv-managed tools
|
||||
upgrade_tools()
|
||||
{
|
||||
msgr run "Upgrading all uv-managed tools"
|
||||
uv tool upgrade --all
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
install_tools
|
||||
install_libraries
|
||||
upgrade_tools
|
||||
msgr yay "Python package installations complete"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user