Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ jobs:
- ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ refresh:
@bash ./install-scripts/02-move-files.sh
@exec fish

.PHONY: full-install
.PHONY: full-install refresh
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ Installs essential packages based on your OS:
- **FreeBSD**: Uses pkg

### 2. File Deployment (`02-move-files.sh`)
Copies configuration files to their proper locations:
Symlinks configuration files to their proper locations:
- Creates necessary directories (`~/.config/nvim`, `~/.config/fish`, etc.)
- Copies config files to home directory
- Preserves existing `envvars.fish` if present
- Symlinks tracked config files into the home directory, so edits to the
live config flow straight back to the repo
- Copies (rather than symlinks) `envvars.fish` and `status.conf` so per-machine
customizations are preserved, and only if they don't already exist

### 3. Fisher Installation (`03-fisher-install.fish`)
Installs Fisher, the Fish shell plugin manager
Expand Down
6 changes: 3 additions & 3 deletions config/fish/aliases.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# aliases

# Package manager aliases
if [ uname = "Darwin" ]
if test (uname) = "Darwin"
alias get="brew install"
alias search="brew search"
else if [ -f /etc/arch-release ]
Expand All @@ -13,7 +13,7 @@ else if [ -f /etc/lsb-release ]
else if [ -f /etc/alpine-release ]
alias get="apk add"
alias search="apk search"
else if [ uname = "FreeBSD" ]
else if test (uname) = "FreeBSD"
alias get="sudo pkg install -y"
alias search="pkg search"
else if [ -f /etc/gentoo-release ]
Expand All @@ -40,5 +40,5 @@ end

# Volume control (pipewire)
function vol
wpctl set-volume @DEFAULT_SINK@ $argv% 2>&1 > /dev/null
wpctl set-volume @DEFAULT_SINK@ $argv% > /dev/null 2>&1
end
3 changes: 1 addition & 2 deletions config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export fish_greeting="" # Silence welcome message
export EDITOR=nvim
export TERM=xterm
export EDITOR=nvim
12 changes: 12 additions & 0 deletions config/fish/functions.fish
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ end

# update master and create a branch with value: $1
function gitissue
if test -z "$argv[1]"
echo "usage: gitissue <branch-name>"
return 1
end
# `git reset --hard` discards uncommitted work, so confirm first.
if not git diff --quiet; or not git diff --cached --quiet
read -P "Uncommitted changes will be DISCARDED. Continue? [y/N] " -n 1 reply
if test "$reply" != y -a "$reply" != Y
echo "Aborted."
return 1
end
end
git reset --hard
git checkout master
git pull origin master
Expand Down
Empty file modified config/tmux/scripts/bluetooth-menu.sh
100644 → 100755
Empty file.
Empty file modified config/tmux/scripts/status.sh
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions config/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ bind -n M-\} swap-pane -D

set -g mouse on

# Use a 256-color terminal and enable truecolor passthrough
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"

set-option -g allow-rename off

set -g base-index 1
Expand Down
27 changes: 16 additions & 11 deletions install-scripts/02-move-files.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
#!/bin/bash
set -e # exit on error

# Symlink tracked config files into place so edits to the live config flow
# straight back to the repo (no more "tweaked it and lost it on refresh").
# Resolve the repo root so this works regardless of where it's invoked from.
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

# create directories
mkdir -p ~/.config/nvim
mkdir -p ~/.config/fish
mkdir -p ~/.config/fish/conf.d
mkdir -p ~/.config/kitty

# vim
cp config/vim/init.lua ~/.config/nvim/
ln -sf "$REPO/config/vim/init.lua" ~/.config/nvim/init.lua

# fish
cp config/fish/config.fish ~/.config/fish/
cp config/fish/aliases.fish ~/.config/fish/conf.d/
cp config/fish/functions.fish ~/.config/fish/conf.d/
ln -sf "$REPO/config/fish/config.fish" ~/.config/fish/config.fish
ln -sf "$REPO/config/fish/aliases.fish" ~/.config/fish/conf.d/aliases.fish
ln -sf "$REPO/config/fish/functions.fish" ~/.config/fish/conf.d/functions.fish

# Only copy envvars.fish if it doesn't exist.
# This way we can override it with our own configs.
# This way we can override it with our own per-machine config.
if [ ! -f ~/.config/fish/conf.d/envvars.fish ]; then
cp config/fish/envvars.fish ~/.config/fish/conf.d/
cp "$REPO/config/fish/envvars.fish" ~/.config/fish/conf.d/
fi

# tmux
cp config/tmux/tmux.conf ~/.tmux.conf
ln -sf "$REPO/config/tmux/tmux.conf" ~/.tmux.conf
mkdir -p ~/.tmux/scripts
cp config/tmux/scripts/*.sh ~/.tmux/scripts/
chmod +x ~/.tmux/scripts/*.sh
for script in "$REPO"/config/tmux/scripts/*.sh; do
ln -sf "$script" ~/.tmux/scripts/
done
# only copy status.conf if it doesn't exist, so local customizations are preserved
if [ ! -f ~/.tmux/scripts/status.conf ]; then
cp config/tmux/scripts/status.conf ~/.tmux/scripts/
cp "$REPO/config/tmux/scripts/status.conf" ~/.tmux/scripts/
fi
Loading