Skip to content

Replace screen with tmux and simplify zsh configuration#3

Open
MasterOfBinary wants to merge 1 commit intomasterfrom
minimal-pure-shell
Open

Replace screen with tmux and simplify zsh configuration#3
MasterOfBinary wants to merge 1 commit intomasterfrom
minimal-pure-shell

Conversation

@MasterOfBinary
Copy link
Owner

Summary

  • Migrate from GNU screen to tmux with minimal configuration
  • Replace oh-my-zsh/powerlevel10k with minimal zsh using Pure prompt
  • Fix critical bugs in setup scripts

Major Changes

🔄 Migration: Screen → Tmux

  • Removed GNU screen configuration
  • Added minimal tmux setup with mouse support and clean status bar
  • Updated all documentation references

🎨 Simplification: oh-my-zsh/p10k → Pure prompt

  • Removed 1,541 lines of powerlevel10k configuration
  • Implemented minimal zsh with Pure prompt
  • Added lightweight plugins: autosuggestions, syntax-highlighting, fzf
  • No heavy frameworks or dependencies

🐛 Critical Fixes

  • HIGH: Fixed go.sh idempotency - prevents duplicate PATH entries in .zshrc
  • MEDIUM: Fixed shell compatibility in zsh.sh (sh → bash)
  • MEDIUM: Implemented modular config approach (Go vars in ~/.zsh.go.env)

✨ Improvements

  • Enhanced backup system with numbered backups (.old, .old.1, etc)
  • Added private environment template (zsh/zshenv.private.template)
  • Created comprehensive .gitignore for sensitive files
  • Updated documentation to reflect all changes

Test Plan

  • Run make clean && make all on fresh system
  • Verify tmux configuration loads correctly
  • Confirm Pure prompt displays properly
  • Test that running make go multiple times doesn't duplicate PATH
  • Check that private environment variables are loaded
  • Verify backup system creates numbered backups

Breaking Changes

  • Users with existing oh-my-zsh/p10k setups will need to manually clean up old files
  • Screen users will need to transition to tmux

🤖 Generated with Claude Code

- Migrate from GNU screen to tmux with minimal configuration
- Replace oh-my-zsh/powerlevel10k with minimal zsh using Pure prompt
- Add zsh plugins: autosuggestions, syntax-highlighting, fzf integration
- Improve backup system with numbered backups (.old, .old.1, etc)
- Add private environment template (zsh/zshenv.private.template)
- Fix go.sh to be idempotent - prevents duplicate PATH entries
- Use modular configuration approach - Go vars in ~/.zsh.go.env
- Update documentation to reflect all changes
- Add .gitignore for sensitive files and backups

This simplifies the setup while keeping useful features like Pure prompt,
syntax highlighting, and fzf integration without heavy frameworks.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @MasterOfBinary, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the personal development environment setup by transitioning from GNU Screen to Tmux for terminal multiplexing and simplifying the Zsh configuration. It moves away from heavy frameworks to a more lightweight and performant Zsh setup, while also addressing critical issues in the installation scripts and improving overall configuration management with modular environment variables and a robust backup system.

Highlights

  • Shell Migration: Migrated from GNU Screen to Tmux for terminal multiplexing, providing a more modern and feature-rich experience with mouse support, automatic window renumbering, and a clean status bar.
  • Zsh Simplification: Replaced the heavy Oh My Zsh and Powerlevel10k setup with a minimal Zsh configuration using Pure prompt and lightweight plugins (autosuggestions, syntax highlighting, fzf) for improved performance and reduced complexity.
  • Setup Script Reliability: Fixed critical bugs in setup scripts, including an idempotency issue in go.sh that prevented duplicate PATH entries and improved shell compatibility in zsh.sh.
  • Configuration Management: Introduced a modular approach for Go environment variables (~/.zsh.go.env) and a template for private environment variables (~/.zshenv.private), alongside an enhanced numbered backup system for existing dotfiles.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request modernizes the shell environment setup by migrating from GNU Screen to tmux and replacing oh-my-zsh with a minimal zsh configuration using the Pure prompt. The changes also include a modular configuration for Go and a private environment template, enhancing maintainability and security. I have provided feedback to improve the robustness and consistency of the new shell scripts, focusing on making the setup more resilient, especially for users who may not have all the optional tools installed.

Comment on lines +89 to +93
alias ls="eza --no-filesize --long --color=always --icons=always --no-user"
alias l='eza -la --icons=always --color=always'
alias ll='eza -l --icons=always --color=always'
alias la='eza -a --icons=always --color=always'
alias lt='eza --tree --level=2 --icons=always --color=always'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

These aliases depend on eza, which is an optional dependency. If eza is not installed, these aliases will cause errors. Define these aliases only if eza is available on the system.

if command -v eza >/dev/null 2>&1; then
  alias ls="eza --no-filesize --long --color=always --icons=always --no-user"
  alias l='eza -la --icons=always --color=always'
  alias ll='eza -l --icons=always --color=always'
  alias la='eza -a --icons=always --color=always'
  alias lt='eza --tree --level=2 --icons=always --color=always'
fi

echo "# Go environment variables (managed by devtools)"
echo "export PATH=\"$DT_GOPATH/bin:\$PATH\""
echo "export GOPATH=\"$DT_GOPATH\""
if [ ! -z "$DT_GOPRIVATE" ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider using [ -n "$VAR" ] instead of [ ! -z "$VAR" ] for checking if a variable is non-empty. Both are functionally equivalent, but -n is more explicit.

Suggested change
if [ ! -z "$DT_GOPRIVATE" ]; then
if [ -n "$DT_GOPRIVATE" ]; then

# Exit if any command fails
set -e

. base

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other scripts, it's recommended to source scripts with an explicit relative path. shellcheck also recommends this practice (SC1091).

Suggested change
. base
. ./base

Comment on lines +25 to +37
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
fi

# Install zsh-syntax-highlighting
if [ ! -d ~/.zsh/zsh-syntax-highlighting ]; then
echo "Installing zsh-syntax-highlighting..."
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
fi

# Install pure prompt
if [ ! -d ~/.zsh/pure ]; then
echo "Installing pure prompt..."
git clone https://github.com/sindresorhus/pure.git ~/.zsh/pure

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To speed up cloning and save disk space, consider using a shallow clone with --depth=1 for all git clone commands. Since you only need the latest version of these plugins, there's no need to download their entire history.

Suggested change
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
fi
# Install zsh-syntax-highlighting
if [ ! -d ~/.zsh/zsh-syntax-highlighting ]; then
echo "Installing zsh-syntax-highlighting..."
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
fi
# Install pure prompt
if [ ! -d ~/.zsh/pure ]; then
echo "Installing pure prompt..."
git clone https://github.com/sindresorhus/pure.git ~/.zsh/pure
if [ ! -d ~/.zsh/zsh-autosuggestions ]; then
echo "Installing zsh-autosuggestions..."
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
fi
if [ ! -d ~/.zsh/zsh-syntax-highlighting ]; then
echo "Installing zsh-syntax-highlighting..."
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
fi
if [ ! -d ~/.zsh/pure ]; then
echo "Installing pure prompt..."
git clone --depth=1 https://github.com/sindresorhus/pure.git ~/.zsh/pure
fi

export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border --info=inline'

# Use fd for faster file finding (if available)
if command -v fd > /dev/null; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Redirect both stdout and stderr to /dev/null to prevent any potential output from cluttering the terminal if the command is not found.

if command -v fd >/dev/null 2>&1; then

fi

# Preview files with bat (if available)
if command -v bat > /dev/null; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Redirect both stdout and stderr to /dev/null to prevent any potential output from cluttering the terminal if the command is not found.

if command -v bat >/dev/null 2>&1; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant