Compare commits

...

14 Commits

Author SHA1 Message Date
3fb9d2a32e refactor(python): migrate pip to uv and inline packages
Replace pip install --user with uv tool install for CLI tools
(ansible) and uv pip install --system for libraries (libtmux, pynvim).
Drop pipx and pipenv (uv replaces both), delete the external
config/asdf/python-packages file, and rename the script to
install-python-packages to reflect the broader scope.
2026-02-04 03:22:17 +02:00
e1050fc7e1 refactor(npm): inline packages and drop unused dependencies 2026-02-04 03:22:17 +02:00
9d7a1acd30 refactor(go): inline packages and drop unused dependencies
Replace external golang-packages config file with an inline array,
remove 6 unused packages (actionlint, antidot, gopls, templ, html2md,
pup), and update documentation to match cargo script style.
2026-02-04 03:22:17 +02:00
9b7942a9fb refactor(tmux): combine sesh scripts into single bash script
Replace sesh-gum.sh and sesh-tmux.fish with a unified sesh.sh that
cascades through available tools: gum, fzf-tmux, fzf, bash select.
Falls back to native tmux choose-tree if sesh is not installed.
2026-02-04 03:22:17 +02:00
3e6b80b598 chore(tmux): remove unused plugins
Remove tmux-sensible, tmux-mode-indicator, tmux-yank, and
tmux-fzf-url submodules, configurations, and run-shell lines.
2026-02-04 03:22:17 +02:00
f6fb14d651 feat(tmux): configure tmux-suspend with F8 key and visual indicator
Enable suspend key (F8) and add @suspend_suspended_options to show
a ⏸ indicator in the status bar when session is suspended.
2026-02-04 03:22:17 +02:00
bafb8fc2f6 refactor(tmux): update keybindings for pane nav and copy mode
Switch pane navigation from Alt-arrow to Ctrl-arrow (Alt doesn't
work reliably on Linux). Add copy-mode-vi clipboard bindings and
C-p/C-n for window switching.
2026-02-04 03:22:17 +02:00
6b11727540 refactor(tmux): consolidate terminal capabilities into terminal-features
Replace terminal-overrides + terminal-features with a single
terminal-features line declaring RGB, clipboard, usstyle,
strikethrough and overline for xterm-256color (WezTerm).
2026-02-04 03:22:17 +02:00
5f4268d2e0 fix(tmux): correct catppuccin config and remove no-op options
Fix @catppuccin_flavor → @catppuccin_flavour spelling so theme
switching via tmux-dark-notify actually applies mocha/latte.
Remove non-existent variables (@catppuccin_status_background,
@catppuccin_window_flags, @catppuccin_window_text,
@catppuccin_window_current_text) and conflicting status overrides
that catppuccin manages. Add rounded window separators.
2026-02-04 03:22:17 +02:00
ed3f881b93 chore(tmux): remove tmux-window-name submodule
Remove the git submodule, its config in tmux.conf, the zsh hook
in zshrc, and add cleanup entry in add-submodules.sh.
2026-02-04 03:22:17 +02:00
939ee65e7a chore(tmux): remove tmux-window-name plugin 2026-02-04 03:22:17 +02:00
14f0cd00e2 chore(deps): update ivuorinen/phpenv.fish plugin 2026-02-04 03:22:17 +02:00
ddbfed1dd9 chore(fish): update fisher, plugins, and Catppuccin themes
Update fisher to v4.4.8 with uninstall alias and rate limit
handling. Add catppuccin/fish plugin, consolidate Latte theme
into Mocha as light/dark variants, and add Frappe and Macchiato
themes. Set Catppuccin Mocha as the default theme in config.
2026-02-04 03:22:17 +02:00
e19120c45a refactor(scripts): inline cargo packages into install script
Move package list from config/asdf/cargo-packages into
install-cargo-packages.sh as a bash array and remove the
external file. Update documentation accordingly.
2026-02-04 03:22:17 +02:00
39 changed files with 1365 additions and 638 deletions

20
.gitmodules vendored
View File

@@ -24,26 +24,11 @@
url = https://github.com/tmux-plugins/tmux-continuum url = https://github.com/tmux-plugins/tmux-continuum
ignore = dirty 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"] [submodule "tmux/tmux-sessionist"]
path = config/tmux/plugins/tmux-sessionist path = config/tmux/plugins/tmux-sessionist
url = https://github.com/tmux-plugins/tmux-sessionist.git url = https://github.com/tmux-plugins/tmux-sessionist.git
ignore = dirty 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"] [submodule "dotbot-pip"]
path = tools/dotbot-pip path = tools/dotbot-pip
url = https://github.com/sobolevn/dotbot-pip.git url = https://github.com/sobolevn/dotbot-pip.git
@@ -54,11 +39,6 @@
url = https://github.com/MunifTanjim/tmux-suspend.git url = https://github.com/MunifTanjim/tmux-suspend.git
ignore = dirty 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"] [submodule "tmux/tmux-current-pane-hostname"]
path = config/tmux/plugins/tmux-current-pane-hostname path = config/tmux/plugins/tmux-current-pane-hostname
url = https://github.com/soyuka/tmux-current-pane-hostname.git url = https://github.com/soyuka/tmux-current-pane-hostname.git

View File

@@ -24,20 +24,12 @@ git submodule add --name antidote \
# tmux plugin manager and plugins # tmux plugin manager and plugins
git submodule add --name tmux/tmux-continuum \ git submodule add --name tmux/tmux-continuum \
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/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 \ git submodule add --name tmux/tmux-resurrect \
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/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 \ git submodule add --name tmux/tmux-sessionist \
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist -f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
git submodule add --name tmux/tmux-suspend \ git submodule add --name tmux/tmux-suspend \
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/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 \ 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 -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 \ git submodule add --name tmux/tmux-dark-notify \
@@ -61,6 +53,11 @@ folders=(
"config/tmux/plugins/tmux-menus" "config/tmux/plugins/tmux-menus"
"tools/dotbot-crontab" "tools/dotbot-crontab"
"tools/dotbot-snap" "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" "config/nvim-kickstart"
"local/bin/asdf" "local/bin/asdf"
"local/asdf" "local/asdf"

View File

@@ -33,24 +33,7 @@ source_fzf_config()
fi 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 source_fzf_config
setup_tmux_window_name_plugin
x-have antidot && eval "$(antidot init)" x-have antidot && eval "$(antidot init)"
autoload -Uz compinit bashcompinit autoload -Uz compinit bashcompinit

View File

@@ -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

View File

@@ -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

View File

@@ -1,7 +0,0 @@
blade-formatter
corepack
editorconfig-checker
github-release-notes
neovim
npm
stylelint-lsp

View File

@@ -1,4 +0,0 @@
ansible
pipenv
neovim
libtmux

View File

@@ -3,6 +3,13 @@
# Set default configuration using session variables for most settings # Set default configuration using session variables for most settings
# Only PHPENV_GLOBAL_VERSION needs to persist across shells # 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 if not set -q PHPENV_AUTO_INSTALL
set -g PHPENV_AUTO_INSTALL false set -g PHPENV_AUTO_INSTALL false
end end

View File

@@ -2,6 +2,8 @@
# │ fish/config.fish # │ fish/config.fish
# ╰──────────────────────────────────────────────────────────╯ # ╰──────────────────────────────────────────────────────────╯
fish_config theme choose "Catppuccin Mocha"
test -e "$HOME/.config/fish/alias.fish" && test -e "$HOME/.config/fish/alias.fish" &&
source "$HOME/.config/fish/alias.fish" source "$HOME/.config/fish/alias.fish"

View File

@@ -1,4 +1,5 @@
jorgebucaran/fisher jorgebucaran/fisher
ilancosman/tide@v6
jethrokuan/z jethrokuan/z
ivuorinen/phpenv.fish ivuorinen/phpenv.fish
ilancosman/tide@v6
catppuccin/fish

View File

@@ -1,17 +1,18 @@
function fisher --argument-names cmd --description "A plugin manager for Fish" function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir 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 set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd" switch "$cmd"
case -v --version case -v --version
echo "fisher, version $fisher_version" echo "fisher, version $fisher_version"
case "" -h --help case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins" echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins" echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher update <plugins...> Update installed plugins" echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
echo " fisher update Update all installed plugins" echo " fisher update <plugins...> Update installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex" echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
echo "Options:" echo "Options:"
echo " -v, --version Print version" echo " -v, --version Print version"
echo " -h, --help Print this help message" 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 \~ echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
case ls list case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins 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 isatty || read --local --null --array stdin && set --append argv $stdin
test "$cmd" = uninstall && set cmd remove
set --local install_plugins set --local install_plugins
set --local update_plugins set --local update_plugins
set --local remove_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 echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end end
set arg_plugins $file_plugins set arg_plugins $file_plugins
else if test "$cmd" = install && ! set --query old_plugins[1]
set --append arg_plugins $file_plugins
end end
for plugin in $arg_plugins for plugin in $arg_plugins
@@ -86,6 +91,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
if test -e $plugin if test -e $plugin
command cp -Rf $plugin/* $source command cp -Rf $plugin/* $source
else else
set resp (command mktemp)
set temp (command mktemp -d) set temp (command mktemp -d)
set repo (string split -- \@ $plugin) || set repo[2] HEAD 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) 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 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 else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source command rm -rf $source

File diff suppressed because it is too large Load Diff

View 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

View File

@@ -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

View 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

View File

@@ -1,11 +1,41 @@
# name: 'Catppuccin Mocha' # name: 'Catppuccin Mocha'
# url: 'https://github.com/catppuccin/fish' # 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_normal cdd6f4
fish_color_command 89b4fa fish_color_command 89b4fa
fish_color_param f2cdcd fish_color_param f2cdcd
fish_color_keyword f38ba8 fish_color_keyword cba6f7
fish_color_quote a6e3a1 fish_color_quote a6e3a1
fish_color_redirection f5c2e7 fish_color_redirection f5c2e7
fish_color_end fab387 fish_color_end fab387
@@ -28,3 +58,4 @@ fish_pager_color_progress 6c7086
fish_pager_color_prefix f5c2e7 fish_pager_color_prefix f5c2e7
fish_pager_color_completion cdd6f4 fish_pager_color_completion cdd6f4
fish_pager_color_description 6c7086 fish_pager_color_description 6c7086

View File

@@ -1 +0,0 @@
https://wfxr.mit-license.org/2018

View File

@@ -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

View File

@@ -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'"

View File

@@ -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

View File

@@ -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
View 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

View File

@@ -1 +1 @@
set -g @catppuccin_flavor "mocha" set -g @catppuccin_flavour "mocha"

View File

@@ -1 +1 @@
set -g @catppuccin_flavor "latte" set -g @catppuccin_flavour "latte"

View File

@@ -15,19 +15,21 @@
# -o : Set the option only if it is not already set. # -o : Set the option only if it is not already set.
# -u : Unset the specified option. # -u : Unset the specified option.
set -ag terminal-overrides ",xterm-256color:RGB" set -as terminal-features ",xterm-256color:RGB:clipboard:usstyle:strikethrough:overline"
# Enable proper color support
set -as terminal-features ",*:RGB"
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 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 detach-on-destroy off # don't detach tmux when killing a session
set -g display-time 0 # Hide clock set -g display-time 0 # Hide clock
set -g focus-events on # Focus events enabled for terminals that support them 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 mouse on # Mouse support
set -g set-titles on # Allow tmux to set the terminal title set -g set-titles on # Allow tmux to set the terminal title
set -g status on # Setting status on 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 -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 # Keep Tmux alive when the initial command is finished
set -g remain-on-exit off set -g remain-on-exit off
@@ -41,19 +43,10 @@ set -g renumber-windows on
# │ Theme │ # │ 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-position "bottom"
#set -g status-right "#S@#h #{tmux_mode_indicator}" set -g @catppuccin_window_left_separator "█"
set -g status-right-length "50" set -g @catppuccin_window_right_separator ""
#set -g window-status-current-format ' #I:#W#{?window_zoomed_flag, ◈ ,} ' set -g @catppuccin_window_middle_separator " "
#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"
# ╭──────────────────────────────────────────────────────────╮ # ╭──────────────────────────────────────────────────────────╮
# │ Bindings │ # │ Bindings │
@@ -69,11 +62,11 @@ set -g @catppuccin_window_current_text "#T"
set -g prefix C-Space set -g prefix C-Space
bind C-Space send-prefix bind C-Space send-prefix
# Use Alt-arrow keys without prefix key to switch panes # Use Ctrl-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L bind -n C-Left select-pane -L
bind -n M-Right select-pane -R bind -n C-Right select-pane -R
bind -n M-Up select-pane -U bind -n C-Up select-pane -U
bind -n M-Down select-pane -D bind -n C-Down select-pane -D
# Reload tmux config with <prefix> + r # Reload tmux config with <prefix> + r
unbind r unbind r
@@ -87,8 +80,16 @@ bind Escape copy-mode
unbind p unbind p
bind p paste-buffer 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 # 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 "last-session (via sesh) " L run-shell "sesh last"
bind -N "sesh ui" N display-popup -E "sesh ui" 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, # Plugin that lets you suspend local tmux session,
# so that you can work with nested remote tmux session painlessly. # so that you can work with nested remote tmux session painlessly.
# https://github.com/MunifTanjim/tmux-suspend # https://github.com/MunifTanjim/tmux-suspend
# set -g @suspend_key 'F8' # Default is F12 set -g @suspend_key 'F8' # Default is F12
set -g @suspend_suspended_options " \
## A plugin to name your tmux windows smartly. status-left-style::bg=brightblack\\,fg=black, \
## https://github.com/ofirgall/tmux-window-name status-left:: ⏸ , \
### 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"
# https://github.com/erikw/tmux-dark-notify # 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-light "$HOME/.dotfiles/config/tmux/theme-light.conf"
set -g @dark-notify-theme-path-dark "$HOME/.dotfiles/config/tmux/theme-dark.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 # https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on' set -g @continuum-restore 'on'
@@ -143,14 +127,9 @@ run-shell "$HOME/.dotfiles/config/tmux/theme-activate.sh"
# ── Sourcing the plugins ────────────────────────────────────────────── # ── 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-suspend/suspend.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.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-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-resurrect/resurrect.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux" run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/catppuccin/catppuccin.tmux" run-shell "$HOME/.dotfiles/config/tmux/plugins/catppuccin/catppuccin.tmux"

View File

@@ -1,6 +1,6 @@
# install-cargo-packages # install-cargo-packages
Install Rust packages listed in `config/asdf/cargo-packages`. Install Rust packages defined in the script.
## Usage ## Usage
@@ -8,5 +8,14 @@ Install Rust packages listed in `config/asdf/cargo-packages`.
scripts/install-cargo-packages.sh scripts/install-cargo-packages.sh
``` ```
The script installs each package with `cargo install` and runs ## What it does
`cargo-install-update` when available to update existing packages.
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`.

View File

@@ -3,27 +3,37 @@
msgr run "Starting to install rust/cargo packages" 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 we have cargo install-update, use it first
if command -v cargo-install-update &> /dev/null; then if command -v cargo-install-update &> /dev/null; then
msgr run "Updating cargo packages with cargo install-update" 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" 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 fi
[[ -z "$ASDF_CRATE_DEFAULT_PACKAGES_FILE" ]] \ # Cargo packages to install
&& ASDF_CRATE_DEFAULT_PACKAGES_FILE="$DOTFILES/config/asdf/cargo-packages" packages=(
cargo-update # A cargo subcommand for checking and applying updates to installed executables
# Packages are defined in $DOTFILES/config/asdf/cargo-packages, one per line cargo-cache # Cargo cache management utility
# Skip comments and empty lines tree-sitter-cli # An incremental parsing system for programming tools
packages=() bkt # A subprocess caching utility
while IFS= read -r line; do difftastic # A structural diff that understands syntax
# Skip comments fd-find # A simple, fast and user-friendly alternative to 'find'
if [[ ${line:0:1} == "#" ]]; then continue; fi ripgrep # Recursively searches directories for a regex pattern while respecting your gitignore
if [[ ${line:0:1} == "/" ]]; then continue; fi bob-nvim # A version manager for neovim
# Skip empty lines bottom # A cross-platform graphical process/system monitor
if [[ -z "$line" ]]; then continue; fi eza # A modern alternative to ls
packages+=("$line") tmux-sessionizer # A tool for opening git repositories as tmux sessions
done < "$ASDF_CRATE_DEFAULT_PACKAGES_FILE" zoxide # A smarter cd command
)
# Number of jobs to run in parallel, this helps to keep the system responsive # 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) 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() install_packages()
{ {
for pkg in "${packages[@]}"; do for pkg in "${packages[@]}"; do
# Trim spaces # Skip packages already handled by cargo install-update
pkg=${pkg// /} if [[ -n "${installed_packages[$pkg]+x}" ]]; then
# Skip comments msgr ok "Skipping $pkg (already installed)"
if [[ ${pkg:0:1} == "#" ]]; then continue; fi continue
fi
msgr run "Installing cargo package $pkg" msgr run "Installing cargo package $pkg"
cargo install --jobs "$BUILD_JOBS" "$pkg" cargo install --jobs "$BUILD_JOBS" "$pkg"

View File

@@ -1,6 +1,6 @@
# install-go-packages # install-go-packages
Installs Go binaries defined in `config/go/packages`. Install Go packages defined in the script.
## Usage ## Usage
@@ -8,5 +8,11 @@ Installs Go binaries defined in `config/go/packages`.
scripts/install-go-packages.sh scripts/install-go-packages.sh
``` ```
The script uses `go install` for each package path listed in the configuration ## What it does
file.
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`.

View File

@@ -11,31 +11,25 @@ msgr run "Installing go packages"
! x-have "go" && msgr err "go hasn't been installed yet." && exit 0 ! x-have "go" && msgr err "go hasn't been installed yet." && exit 0
[[ -z "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE" ]] \ # Go packages to install
&& ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$DOTFILES/config/asdf/golang-packages" packages=(
github.com/dotzero/git-profile@latest # Switch between git user profiles
# Packages are defined in $DOTFILES/config/asdf/golang-packages, one per line github.com/google/yamlfmt/cmd/yamlfmt@latest # Format yaml files
# Skip comments and empty lines github.com/cheat/cheat/cmd/cheat@latest # Interactive cheatsheets on the CLI
packages=() github.com/charmbracelet/glow@latest # Render markdown on the CLI
if [[ -f "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE" ]]; then github.com/junegunn/fzf@latest # General-purpose fuzzy finder
while IFS= read -r line; do github.com/charmbracelet/gum@latest # Glamorous shell scripts
# Skip comments github.com/joshmedeski/sesh/v2@latest # Terminal session manager
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
# Function to install go packages # Function to install go packages
install_packages() install_packages()
{ {
for pkg in "${packages[@]}"; do for pkg in "${packages[@]}"; do
# Trim spaces # Strip inline comments and trim whitespace
pkg=${pkg// /} pkg="${pkg%%#*}"
# Skip comments pkg="${pkg// /}"
if [[ ${pkg:0:1} == "#" ]]; then continue; fi [[ -z "$pkg" ]] && continue
msgr nested "Installing go package: $pkg" msgr nested "Installing go package: $pkg"
go install "$pkg" go install "$pkg"
@@ -52,11 +46,6 @@ post_install()
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \ git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \
&& msgr run_done "Installed completions for git-profile" && msgr run_done "Installed completions for git-profile"
fi fi
if command -v antidot &> /dev/null; then
antidot update \
&& msgr run_done "Updated antidot database"
fi
} }
# Function to clear go cache # Function to clear go cache

View File

@@ -1,6 +1,6 @@
# install-npm-packages # install-npm-packages
Installs global npm packages listed in `config/npm/packages`. Install npm packages defined in the script.
## Usage ## Usage
@@ -8,4 +8,11 @@ Installs global npm packages listed in `config/npm/packages`.
scripts/install-npm-packages.sh 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`.

View File

@@ -15,23 +15,20 @@ if ! command -v npm &> /dev/null; then
fi fi
packages=( packages=(
# This is a tool to check if your files consider your .editorconfig rules. editorconfig-checker # Check files against .editorconfig rules
"editorconfig-checker" github-release-notes # Create release notes from tags and issues
# Node module to create a release or a changelog from neovim # Neovim node client
# a tag and uses issues or commits to creating the release notes. corepack # Node.js package manager version management
"github-release-notes"
"neovim"
"corepack"
) )
# Function to install npm packages # Function to install npm packages
install_packages() install_packages()
{ {
for pkg in "${packages[@]}"; do for pkg in "${packages[@]}"; do
# Trim spaces # Strip inline comments and trim whitespace
pkg=${pkg// /} pkg="${pkg%%#*}"
# Skip comments pkg="${pkg// /}"
if [[ ${pkg:0:1} == "#" ]]; then continue; fi [[ -z "$pkg" ]] && continue
if npm ls -g -p "$pkg" &> /dev/null; then if npm ls -g -p "$pkg" &> /dev/null; then
msgr run_done "$pkg" "already installed" msgr run_done "$pkg" "already installed"

View File

@@ -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.

View File

@@ -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"

View 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`.

View 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 "$@"