tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.9k stars 417 forks source link

Getting `~/.tmux/plugins/tpm/tpm` returned 1 #236

Closed shubham399 closed 1 year ago

shubham399 commented 1 year ago

.tmux.conf

# change the prefix from 'C-b' to 'C-a'

# start with window 1 (instead of 0)
set -g base-index 1
set -g history-limit 10000
set -g allow-rename off
# start with pane 1
set -g pane-base-index 1

# open new windows in the current path
bind c new-window -c "#{pane_current_path}"

# open pane in the current path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

unbind p
bind p previous-window

# shorten command delay
set -sg escape-time 1

# don't rename windows automatically
set-option -g allow-rename off

# mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set-option -s set-clipboard on
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
#Use Vi-binding for copy
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle

#Copy to SystemClipboard
#bind  -T vi-copy y copy-pipe "xclip -sel clip -i"
# 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

# set default terminal mode to 256 colors
set -g default-terminal "screen-256color"

# fix pbcopy/pbpaste
#if 'command -v reattach-to-user-namespace >/dev/null' \
 #   'set -gq @osx-pasteboard true'

#if 'tmux show -gv @osx-clipboard' \
 #   'set -g default-command "reattach-to-user-namespace -l $SHELL"'

# present a menu of URLs to open from the visible pane. sweet.
bind-key u capture-pane \;\
    save-buffer /tmp/tmux-buffer \;\
    split-window -l 10 "urlview /tmp/tmux-buffer"

# reload config file
bind r source-file ~/.tmux.conf

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'kristijanhusak/tmux-simple-git-status'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'

set -g @themepack 'powerline/double/red'
set -g status-left "#{simple_git_status}"
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'

run '~/.tmux/plugins/tpm/tpm'
image
shubham399 commented 1 year ago

Tried Reinstalling tmux, tpm. deleted everything in ~/.tmux folder

shubham399 commented 1 year ago
 brew install tmux
==> Fetching tmux
==> Downloading https://ghcr.io/v2/homebrew/core/tmux/manifests/3.3a-1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/tmux/blobs/sha256:6c72c3fbce35b39cb8e4df69cb18c288c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:6c72c3fbce35b39
######################################################################## 100.0%
==> Pouring tmux--3.3a.arm64_ventura.bottle.1.tar.gz
==> Caveats
Example configuration has been installed to:
  /opt/homebrew/opt/tmux/share/tmux
==> Summary
🍺  /opt/homebrew/Cellar/tmux/3.3a: 9 files, 1.1MB
==> Running `brew cleanup tmux`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
shubham399 commented 1 year ago

Running prefix + I is returning 127

image
shubham399 commented 1 year ago

Got it working by adding

set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin"
CraigglesO commented 1 year ago

Going to add another note since I use MacPorts:

set-environment -g PATH "/opt/local/bin:/bin:/usr/bin"

This is what worked for me.