commit 8353d5986e992adc80b171423635cd0a8b8aaa61 Author: David Heinemeier Hansson Date: Sat May 25 13:52:00 2024 -0700 First diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc new file mode 100644 index 0000000..ca4b5f0 --- /dev/null +++ b/dotfiles/.bashrc @@ -0,0 +1,52 @@ +# Setup history +shopt -s histappend +HISTCONTROL=ignoreboth +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +force_color_prompt=yes +color_prompt=yes + +PS1=$'\uf0a9 ' +PS1="\[\e]0;\w\a\]$PS1" + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +export PATH="./bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin" +export EDITOR="nvim" +set +h + +alias ls='eza -lh --group-directories-first --icons' +alias lt='eza --tree --level=2 --long --icons --git' +alias ff="fzf --preview 'batcat --style=numbers --color=always {}'" +alias spfy='spotify --force-device-scale-factor=1.5' +alias r='./bin/rails' +alias n='nvim' +alias g='git' +alias d='docker' +alias gcm='git commit -m' +alias gcam='git commit -a -m' +alias gcad='git commit -a --amend' +alias load-dconf='cat ~/.config/gnome-settings.ini | dconf load /' + +export KAMAL_REGISTRY_PASSWORD="dckr_pat_1-VLgNpkPxENCjLuZSS6AM-zfD4" +export HAYSTACK_GLOBAL_DATABASE_VERSION=8 + +eval "$(/usr/bin/rbenv init - bash)" +eval "$(nodenv init -)" +eval "$(zoxide init bash)" + +export PATH=$PATH:/home/dhh/.spicetify diff --git a/dotfiles/alacritty/alacritty.toml b/dotfiles/alacritty/alacritty.toml new file mode 100644 index 0000000..4146ab3 --- /dev/null +++ b/dotfiles/alacritty/alacritty.toml @@ -0,0 +1,47 @@ +[env] +TERM = "xterm-256color" + +[window] +padding.x = 16 +padding.y = 14 +decorations = "none" + +[font] +normal = { family = "CaskaydiaMono Nerd Font", style = "Regular" } +size = 9 + +[keyboard] +bindings = [ +{ key = "F11", action = "ToggleFullscreen" } +] + +[colors] +[colors.primary] +background = '#1a1b26' +foreground = '#a9b1d6' + +# Normal colors +[colors.normal] +black = '#32344a' +red = '#f7768e' +green = '#9ece6a' +yellow = '#e0af68' +blue = '#7aa2f7' +magenta = '#ad8ee6' +cyan = '#449dab' +white = '#787c99' + +# Bright colors +[colors.bright] +black = '#444b6a' +red = '#ff7a93' +green = '#b9f27c' +yellow = '#ff9e64' +blue = '#7da6ff' +magenta = '#bb9af7' +cyan = '#0db9d7' +white = '#acb0d0' + +[colors.selection] +background = '#7aa2f7' + diff --git a/dotfiles/aliases b/dotfiles/aliases new file mode 100644 index 0000000..74d340b --- /dev/null +++ b/dotfiles/aliases @@ -0,0 +1,16 @@ +# File system +alias ls='eza -lh --group-directories-first --icons' +alias lt='eza --tree --level=2 --long --icons --git' +alias ff="fzf --preview 'batcat --style=numbers --color=always {}'" + +# Tools +alias n='nvim' +alias g='git' +alias d='docker' +alias bat='batcat' + +# Git +alias gcm='git commit -m' +alias gcam='git commit -a -m' +alias gcad='git commit -a --amend' + diff --git a/dotfiles/bashrc b/dotfiles/bashrc new file mode 100644 index 0000000..ba36498 --- /dev/null +++ b/dotfiles/bashrc @@ -0,0 +1,30 @@ +# History control +shopt -s histappend +HISTCONTROL=ignoreboth +HISTSIZE=1000 +HISTFILESIZE=2000 + +# Autocompletion +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +# Prefer current-directory bins +export PATH="./bin:$PATH" +set +h + +# Load configuration first from omabox, then local overwrites +for file in ~/.{prompt,exports,aliases}; do + [ -r "$file" ] && [ -f "$file" ] && source "$file" + [ -r "$file.local" ] && [ -f "$file.local" ] && source "$file.local" +done +unset file + +# Run iniitializers +eval "$(rbenv init - bash)" +eval "$(nodenv init -)" +eval "$(zoxide init bash)" diff --git a/dotfiles/inputrc b/dotfiles/inputrc new file mode 100644 index 0000000..fd98447 --- /dev/null +++ b/dotfiles/inputrc @@ -0,0 +1,44 @@ +set meta-flag on +set input-meta on +set output-meta on +set convert-meta off +set completion-ignore-case on +set completion-prefix-display-length 2 +set show-all-if-ambiguous on +set show-all-if-unmodified on + +# Arrow keys match what you've typed so far against your command history +"\e[A": history-search-backward +"\e[B": history-search-forward +"\e[C": forward-char +"\e[D": backward-char + +# Immediately add a trailing slash when autocompleting symlinks to directories +set mark-symlinked-directories on + +# Do not autocomplete hidden files unless the pattern explicitly begins with a dot +set match-hidden-files off + +# Show all autocomplete results at once +set page-completions off + +# If there are more than 200 possible completions for a word, ask to show them all +set completion-query-items 200 + +# Show extra file information when completing, like `ls -F` does +set visible-stats on + +$if Bash + # Be more intelligent when autocompleting by also looking at the text after + # the cursor. For example, when the current line is "cd ~/src/mozil", and + # the cursor is on the "z", pressing Tab will not autocomplete it to "cd + # ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the + # Readline used by Bash 4.) + set skip-completed-text on + + # Coloring for Bash 4 tab completions. + set colored-stats on +$endif + +# End with local overrides +$include ~/.inputrc.local diff --git a/dotfiles/prompt b/dotfiles/prompt new file mode 100644 index 0000000..2546dfb --- /dev/null +++ b/dotfiles/prompt @@ -0,0 +1,5 @@ +force_color_prompt=yes +color_prompt=yes + +PS1=$'\uf0a9 ' +PS1="\[\e]0;\w\a\]$PS1" diff --git a/dotfiles/zellij/config.kdl b/dotfiles/zellij/config.kdl new file mode 100644 index 0000000..0675b25 --- /dev/null +++ b/dotfiles/zellij/config.kdl @@ -0,0 +1,35 @@ +themes { + tokyo-night { + fg 169 177 214 + bg 26 27 38 + black 56 62 90 + red 249 51 87 + green 158 206 106 + yellow 224 175 104 + blue 122 162 247 + magenta 187 154 247 + cyan 42 195 222 + white 192 202 245 + orange 255 158 100 + } +} + +theme "tokyo-night" +themes { + tokyo-night { + fg 169 177 214 + bg 26 27 38 + black 56 62 90 + red 249 51 87 + green 158 206 106 + yellow 224 175 104 + blue 122 162 247 + magenta 187 154 247 + cyan 42 195 222 + white 192 202 245 + orange 255 158 100 + } +} + +theme "tokyo-night" +default_layout "compact" diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..9cfbbed --- /dev/null +++ b/install.sh @@ -0,0 +1,37 @@ +# Libraries and infrastructure +sudo apt update -y +sudo apt install -y \ + docker.io docker-buildx \ + build-essential pkg-config autoconf bison rustc cargo clang \ + libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ + libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ + redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ + rbenv apache2-utils + +# CLI apps +sudo apt install -y git curl fzf ripgrep bat eza zoxide btop +sudo snap install code zellij --classic + +# GUI apps +sudo apt install xournalpp nautilus-dropbox alacritty +sudo snap install 1password spotify vlc zoom-client signal-desktop pinta + +# Installers +source install/gnome-tailoring.sh +source install/chrome.sh +source install/fonts.sh +source install/ulauncher.sh +source install/neovim.sh +source install/lazygit.sh +source install/lazydocker.sh +source install/ruby.sh +source install/nodenv.sh +source install/gh.sh +source install/docker.sh + +# Configuration + +# Start +gh auth login +docker run -d --restart unless-stopped -p 3306:3306 --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8 +docker run -d --restart unless-stopped -p 6379:6379 --name=redis redis diff --git a/install/chrome.sh b/install/chrome.sh new file mode 100644 index 0000000..5ceda64 --- /dev/null +++ b/install/chrome.sh @@ -0,0 +1,5 @@ +cd ~/Downloads +wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +sudo dpkg -i google-chrome-stable_current_amd64.deb +rm google-chrome-stable_current_amd64.deb +cd - diff --git a/install/docker.sh b/install/docker.sh new file mode 100644 index 0000000..b1c905e --- /dev/null +++ b/install/docker.sh @@ -0,0 +1,7 @@ +DOCKER_COMPOSE_VERSION="2.27.0" + +sudo usermod -aG docker ${USER} +DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} +mkdir -p $DOCKER_CONFIG/cli-plugins +curl -SL https://github.com/docker/compose/releases/download/v$DOCKER_COMPOSE_VERSION/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose +chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose diff --git a/install/fonts.sh b/install/fonts.sh new file mode 100644 index 0000000..3c826da --- /dev/null +++ b/install/fonts.sh @@ -0,0 +1,8 @@ +cd ~/Downloads +wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/CascadiaMono.zip +unzip CascadiaMono.zip -d CascadiaFont +mkdir -p ~/.local/share/fonts +cp CascadiaFont/*.ttf ~/.local/share/fonts +rm -rf CascadiaMono.zip CascadiaFont +fc-cache +cd - diff --git a/install/gh.sh b/install/gh.sh new file mode 100644 index 0000000..c73d7de --- /dev/null +++ b/install/gh.sh @@ -0,0 +1,5 @@ +curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && + sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null && + sudo apt update && + sudo apt install gh -y diff --git a/install/gnome-tailoring.sh b/install/gnome-tailoring.sh new file mode 100644 index 0000000..b3d9d99 --- /dev/null +++ b/install/gnome-tailoring.sh @@ -0,0 +1,3 @@ +sudo apt install -y gnome-tweak-tool gnome-shell-extension-manager +echo "Use Tweak Tool to set Fonts > Size > Scaling Factor: 0.80" +echo "Use Extension Manager to install: Tactile, Blur my Shell, Just Perfection" diff --git a/install/lazydocker.sh b/install/lazydocker.sh new file mode 100644 index 0000000..d20742c --- /dev/null +++ b/install/lazydocker.sh @@ -0,0 +1,7 @@ +cd ~/Downloads +LAZYDOCKER_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazydocker/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') +curl -Lo lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_${LAZYDOCKER_VERSION}_Linux_x86_64.tar.gz" +tar xf lazydocker.tar.gz lazydocker +sudo install lazydocker /usr/local/bin +rm lazydocker.tar.gz +cd - diff --git a/install/lazygit.sh b/install/lazygit.sh new file mode 100644 index 0000000..05a7e0a --- /dev/null +++ b/install/lazygit.sh @@ -0,0 +1,7 @@ +cd ~/Downloads +LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') +curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" +tar xf lazygit.tar.gz lazygit +sudo install lazygit /usr/local/bin +rm lazygit.tar.gz +cd - diff --git a/install/neovim.sh b/install/neovim.sh new file mode 100644 index 0000000..59f1f2e --- /dev/null +++ b/install/neovim.sh @@ -0,0 +1,4 @@ +sudo add-apt-repository ppa:neovim-ppa/stable +sudo apt update -y +sudo apt install -y neovim +git clone https://github.com/LazyVim/starter ~/.config/nvim diff --git a/install/nodenv.sh b/install/nodenv.sh new file mode 100644 index 0000000..0e31237 --- /dev/null +++ b/install/nodenv.sh @@ -0,0 +1,12 @@ +git clone https://github.com/nodenv/nodenv.git ~/.nodenv +sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv +cd ~/.nodenv +src/configure && make -C src || true +cd ~/ +mkdir -p "$(nodenv root)"/plugins +git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build +git clone https://github.com/nodenv/nodenv-aliases.git $(nodenv root)/plugins/nodenv-aliases +nodenv install 20.11.1 +nodenv global 20.11.1 +sudo ln -vs $(nodenv root)/shims/* /usr/local/bin/ + diff --git a/install/ruby.sh b/install/ruby.sh new file mode 100644 index 0000000..3bdb2b3 --- /dev/null +++ b/install/ruby.sh @@ -0,0 +1,5 @@ +DEFAULT_RUBY_VERSION="3.3.1" + +git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build +rbenv install $DEFAULT_RUBY_VERSION +rbenv global $DEFAULT_RUBY_VERSION diff --git a/install/typora.sh b/install/typora.sh new file mode 100644 index 0000000..7b6f55f --- /dev/null +++ b/install/typora.sh @@ -0,0 +1,9 @@ +sudo snap install typora +cd ~/Downloads +git clone https://github.com/dhh/ia_typora +mkdir -p ~/.local/share/fonts +cp ia_typora/fonts/iAWriterMonoS-* ~/.local/share/fonts/ +fc-cache +mkdir -p ~/snap/typora/88/.config/Typora/themes/ +cp ia_typora/ia_typora*.css ~/snap/typora/88/.config/Typora/themes/ +cd - diff --git a/install/ulauncher.sh b/install/ulauncher.sh new file mode 100644 index 0000000..ba2f09d --- /dev/null +++ b/install/ulauncher.sh @@ -0,0 +1,4 @@ +sudo add-apt-repository universe -y +sudo add-apt-repository ppa:agornostal/ulauncher -y +sudo apt update -y +sudo apt install -y ulauncher