fix: tmux + installer

This commit is contained in:
2024-10-07 01:20:24 +03:00
parent e8cfaa1eed
commit 7565e08d9a
7 changed files with 18 additions and 9 deletions

View File

@@ -34,19 +34,19 @@ set -g mouse on
# Emulate scrolling by sending up and down keys if these commands are running in the pane
# tmux_commands_with_legacy_scroll="nano less more man git"
#
#
# bind-key -T root WheelUpPane \
# if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
# 'send -Mt=' \
# 'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
# "send -t= Up" "copy-mode -et="'
#
#
# bind-key -T root WheelDownPane \
# if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
# 'send -Mt=' \
# 'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
# "send -t= Down" "send -Mt="'
#
#
######################
### DESIGN CHANGES ###
######################

1
.gitignore vendored
View File

@@ -9,3 +9,4 @@ _local.zsh
.tmux_local.yml
.device_uid
plugins/.cache
.config/.tmux_local.conf

View File

@@ -131,7 +131,7 @@ alias tns="tmux new -s"
alias ta="tmux attach"
alias tas="tmux attach -t"
alias tlw="tmux list-windows"
alias trl="tmux source-file ~/.config/.tmux.conf; tmux set-option -g default-command \"arch -arch \$(uname -m) /bin/zsh\""
alias trl="[[ -f ~/.config/.tmux_local.conf ]] && tmux source-file ~/.config/.tmux_local.conf; tmux source-file ~/.config/.tmux.conf"
alias trn="tmux rename-session -t"
alias tk="trm"
alias tks="tmux kill-server"

View File

@@ -134,3 +134,4 @@ if [ -f "$HOME/.gcloud/google-cloud-sdk/completion.zsh.inc" ]; then . "$HOME/.gc
export PATH="$PATH:/Applications/WezTerm.app/Contents/MacOS"
export GITHUB_GPG_KEY_ID="B5690EEEBB952194"
export PATH="/usr/local/sbin:$PATH"

View File

@@ -163,7 +163,7 @@ fi
if [[ ! -d "$HOME/.pyenv" ]]; then
if ask "Install pyenv?"; then
echo_yellow "Installing pyenv..."
platform_install pyenv \
platform_install -b pyenv \
-l cmd \
-c 'curl https://pyenv.run | bash'
fi
@@ -172,7 +172,7 @@ fi
if [[ ! -f $(which pipx) ]]; then
if ask "Install pipx?"; then
echo_yellow "Installing pipx..."
platform_install pipx
platform_install -b pipx
if is_linux; then
sudo pipx ensurepath --global
fi
@@ -194,7 +194,7 @@ if [[ ! -f $(which pandoc) ]]; then
esac
dpkg_url="https://github.com/jgm/pandoc/releases/download/$pandoc_ver/pandoc-$pandoc_ver-1-$arch.deb"
echo_cyan "Installing from $dpkg_url..."
platform_install pandoc \
platform_install -b pandoc \
-l dpkg \
-d "$dpkg_url"
fi
@@ -203,7 +203,7 @@ fi
if [[ ! -f $(which jq) ]]; then
if ask "Install jq?"; then
echo_yellow "Installing jq..."
platform_install jq
platform_install -b jq
fi
fi
@@ -234,6 +234,7 @@ if [[ ! -f $(which dotenvx) ]]; then
fi
fi
launchctl setenv OLLAMA_HOST "0.0.0.0"
if [[ -n "$OLLAMA_ENABLED" && ! -f $(which ollama) && ! -d "/Applications/Ollama.app" ]]; then
if ask_no "Install ollama?"; then

View File

@@ -576,7 +576,12 @@ platform_install() {
case "$strategy" in
apt) sudo apt install "$pkg" ;;
brew) brew install "$pkg" ;;
brew)
if [[ -z "$ARCH" ]]; then
ARCH=$(uname -m)
fi
arch -arch $ARCH brew install "$pkg"
;;
dpkg)
tmp="$(mktemp).deb"
curl -sL "$dpkg" -o "$tmp"

View File

@@ -53,6 +53,7 @@ const backupCommand = new MassargCommand<BrewOpts>({
name: 'push',
aliases: ['p'],
description: 'Push changes to git',
negatable: true,
defaultValue: true,
})
const restoreCommand = new MassargCommand<BrewOpts>({