Skip to content

Commit

Permalink
Adapt to codespaces dotfile location (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
topher200 authored Feb 11, 2024
1 parent a1d79a8 commit 73a4299
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion files/topherrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ alias gg=lazygit
alias lg=lazygit
alias rg='rg --smart-case --no-messages'
alias rgh="rg --smart-case --no-messages --hidden -g '!.git/'"
alias sgp="\$HOME/.dotfiles/start-tmux-and-install-slow-packages.sh"
alias sgp="/home/gitpod/.dotfiles/start-tmux-and-install-slow-packages.sh"
alias scs="/workspaces/.codespaces/.persistedshare/dotfiles/start-tmux-and-install-slow-packages.sh"
alias xsel="xsel --clipboard"
# don't use a pager if less than a screen
export LESS="-F -X $LESS"
Expand Down
9 changes: 6 additions & 3 deletions start-tmux-and-install-slow-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ fi
tmux new-session -d -s work
if [[ -d /workspace/dotfiles ]]; then
echo 'running in /workspace/dotfiles'
tmux new-window -n install-slow 'cd /workspace/dotfiles && make install-slow-packages && pre-commit install --install-hooks'
DOTFILES_REPO=/workspace/dotfiles
elif [[ -d /workspaces/.codespaces/.persistedshare/dotfiles ]]; then
DOTFILES_REPO=/workspaces/.codespaces/.persistedshare/dotfiles
echo 'running in /workspaces/.codespaces/.persistedshare/dotfiles'
else
# if we're not already in a dotfiles repo, find one
echo 'running in ~/.dotfiles'
tmux new-window -n install-slow 'cd ~/.dotfiles && make install-slow-packages && pre-commit install --install-hooks'
DOTFILES_REPO=~/.dotfiles
fi
tmux new-window -n install-slow "cd $DOTFILES_REPO && make install-slow-packages && pre-commit install --install-hooks"
tmux select-window -t 1

# connect to tmux session
Expand Down

0 comments on commit 73a4299

Please sign in to comment.