ubuntu オレオレセットアップ
お気に入り
シェル
シェル関連
開発環境
AIツール
いっきにいきましょう
nixのインストールは環境によっては時間かかるので注意
code:.sh
sudo apt update
sudo apt upgrade
# Oh My Zsh
sudo apt install zsh git curl -y
oh-my-zshは完了時に強制的に処理が中断されます
code:.sh
# kitty-terminfo
sudo apt install kitty-terminfo -y
# gemini-cli
nvm install 22
npm install -g @google/gemini-cli
# gh
sudo apt install gh -y
# bat
sudo apt install bat -y
# fzf, fzf-tab
sudo apt install fzf -y
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
# starship
# glow
sudo mkdir -p /etc/apt/keyrings
sudo apt update && sudo apt install glow
# atuin
# nix, devbox
# Rust Cargo
sudo apt install build-essential -y
. "$HOME/.cargo/env"
# eza
cargo install eza
zshrc
これから肥大するようならファイルに分けます
code:.zshrc.sh
# Oh My Zsh
export ZSH="$HOME/.oh-my-zsh"
HIST_STAMPS="yyyy-mm-dd"
plugins=(git gh fzf-tab nvm node npm rust)
source $ZSH/oh-my-zsh.sh
# User configuration
export LANG=ja_JP.UTF-8
# Preferred editor
export EDITOR='cursor'
# Set personal aliases, overriding those provided by Oh My Zsh libs,
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
# users are encouraged to define aliases within a top-level file in
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
# - $ZSH_CUSTOM/aliases.zsh
# - $ZSH_CUSTOM/macos.zsh
# For a full list of active aliases, run alias.
# fzf
# fzf-tab bug fix (backward-delete-char/eof)
zstyle ':fzf-tab:*' fzf-bindings-default 'tab:down,btab:up,change:top,ctrl-space:toggle,bspace:backward-delete-char,ctrl-h:backward-delete-char'
# use eza or bat for fzf-tab preview
zstyle ':fzf-tab:complete:*' fzf-preview '
if -d $realpath ; then
# if a directory, use eza
eza -1 --all --color=always --icons=always $realpath
elif -f $realpath ; then
# check if binary file
if file --mime "$realpath" | grep -q "charset=binary"; then
# if binary, show file metadata
file -b "$realpath"
else
# if text file, use bat, batcat or cat based on availability
if command -v batcat &>/dev/null; then
batcat --style=numbers --color=always --line-range :200 $realpath
elif command -v bat &>/dev/null; then
bat --style=numbers --color=always --line-range :200 $realpath
else
cat -n $realpath
fi
fi
fi
'
# Starship
eval "$(starship init zsh)"
# eza
alias ls='eza --all --long --no-permissions --no-user --icons --header --time-style=long-iso --sort=modified'
export EZA_ICONS_AUTO=1
# devbox
export DEVBOX_NO_PROMPT=true
# venv
export VIRTUAL_ENV_DISABLE_PROMPT=1
# atuin
. "$HOME/.atuin/bin/env"
eval "$(atuin init zsh)"
# bat
if command -v batcat &>/dev/null; then
alias bat="batcat"
fi
# Rust
logins
code:login.sh
gemini
gh auth login