mirror of
https://codeberg.org/tmayoff/.dotfiles.git
synced 2025-12-06 08:48:34 -05:00
Compare commits
3 commits
56052c256d
...
3c20b56265
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c20b56265 | ||
|
|
757ca5cecd | ||
|
|
e8ab4015c0 |
6 changed files with 133 additions and 42 deletions
8
dot_config/flake/flake.lock
generated
8
dot_config/flake/flake.lock
generated
|
|
@ -512,17 +512,17 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759997568,
|
"lastModified": 1764663772,
|
||||||
"narHash": "sha256-xQyzPkgpgjAceJKwZhLU2//Y1jAmvPGOq80svqkWFhQ=",
|
"narHash": "sha256-sHqLmm0wAt3PC4vczJeBozI1/f4rv9yp3IjkClHDXDs=",
|
||||||
"owner": "outfoxxed",
|
"owner": "outfoxxed",
|
||||||
"repo": "quickshell",
|
"repo": "quickshell",
|
||||||
"rev": "3e32ae595f97bd2d2e5ed4512fb4bb25edb4eae6",
|
"rev": "26531fc46ef17e9365b03770edd3fb9206fcb460",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "outfoxxed",
|
"owner": "outfoxxed",
|
||||||
"repo": "quickshell",
|
"repo": "quickshell",
|
||||||
"rev": "3e32ae595f97bd2d2e5ed4512fb4bb25edb4eae6",
|
"rev": "26531fc46ef17e9365b03770edd3fb9206fcb460",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
quickshell = {
|
quickshell = {
|
||||||
url = "github:outfoxxed/quickshell/3e32ae595f97bd2d2e5ed4512fb4bb25edb4eae6";
|
url = "github:outfoxxed/quickshell/26531fc46ef17e9365b03770edd3fb9206fcb460";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
|
# Fix for fish 4.2.0+ embedded completions not loading with home-manager
|
||||||
|
# See: https://github.com/nix-community/home-manager/issues/8178
|
||||||
|
set -p fish_complete_path ${pkgs.fish}/share/fish/completions
|
||||||
|
|
||||||
set -gx EDITOR hx
|
set -gx EDITOR hx
|
||||||
set -gx GIT_EDITOR $EDITOR
|
set -gx GIT_EDITOR $EDITOR
|
||||||
set -gx DEBEMAIL "tyler@tylermayoff.com"
|
set -gx DEBEMAIL "tyler@tylermayoff.com"
|
||||||
|
|
@ -14,6 +18,96 @@
|
||||||
bind \cz 'fg 2>/dev/null; commandline -f repaint'
|
bind \cz 'fg 2>/dev/null; commandline -f repaint'
|
||||||
|
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
|
# Git worktree functions
|
||||||
|
function gwn --description "Create new worktree with new branch"
|
||||||
|
# Show help if requested
|
||||||
|
if test (count $argv) -eq 1; and string match -qr '^(-h|--help|help)$' $argv[1]
|
||||||
|
echo "Usage: gwn <path> <branch-name> [base-branch]"
|
||||||
|
echo ""
|
||||||
|
echo "Create a new git worktree with a new branch"
|
||||||
|
echo ""
|
||||||
|
echo "Arguments:"
|
||||||
|
echo " path Path where the worktree will be created"
|
||||||
|
echo " branch-name Name of the new branch to create"
|
||||||
|
echo " base-branch Optional base branch (will prompt with fzf if not provided)"
|
||||||
|
echo ""
|
||||||
|
echo "Examples:"
|
||||||
|
echo " gwn ../feature my-feature # Interactive base branch selection"
|
||||||
|
echo " gwn ../feature my-feature main # Create from main branch"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) -lt 2
|
||||||
|
echo "Usage: gwn <path> <branch-name> [base-branch]"
|
||||||
|
echo "Run 'gwn --help' for more information"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l path $argv[1]
|
||||||
|
set -l new_branch $argv[2]
|
||||||
|
set -l base_branch ""
|
||||||
|
|
||||||
|
# If base branch is provided, use it
|
||||||
|
if test (count $argv) -ge 3
|
||||||
|
set base_branch $argv[3]
|
||||||
|
else
|
||||||
|
# Otherwise, offer to select one with fzf
|
||||||
|
echo "Select base branch (or press ESC to use current branch):"
|
||||||
|
set base_branch (git branch --all | grep -v HEAD | sed 's/^[ *]*//' | sed 's/remotes\/origin\///' | sort -u | fzf --prompt="Base branch (ESC for current): " --height=40%)
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -n "$base_branch"
|
||||||
|
git worktree add -b $new_branch $path $base_branch
|
||||||
|
else
|
||||||
|
git worktree add -b $new_branch $path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function gwnb --description "Create new worktree with new branch based on another branch"
|
||||||
|
if test (count $argv) -lt 3
|
||||||
|
echo "Usage: gwnb <path> <new-branch> <base-branch>"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
git worktree add -b $argv[2] $argv[1] $argv[3]
|
||||||
|
end
|
||||||
|
|
||||||
|
function gwc --description "Create worktree for existing branch"
|
||||||
|
set -l branch $argv[1]
|
||||||
|
set -l path $argv[1]
|
||||||
|
|
||||||
|
# If no branch is specified, use fzf to select one
|
||||||
|
if test (count $argv) -lt 1
|
||||||
|
set branch (git branch --all | grep -v HEAD | sed 's/^[ *]*//' | sed 's/remotes\/origin\///' | sort -u | fzf --prompt="Select branch: " --height=40%)
|
||||||
|
if test -z "$branch"
|
||||||
|
echo "No branch selected"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
set path $branch
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (count $argv) -ge 2
|
||||||
|
set path $argv[2]
|
||||||
|
end
|
||||||
|
git worktree add $path $branch
|
||||||
|
end
|
||||||
|
|
||||||
|
function gwrm --description "Remove worktree and delete branch"
|
||||||
|
if test (count $argv) -lt 1
|
||||||
|
echo "Usage: gwrm <path>"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
set -l branch (git -C $argv[1] branch --show-current)
|
||||||
|
git worktree remove $argv[1]
|
||||||
|
and git branch -D $branch
|
||||||
|
end
|
||||||
|
|
||||||
|
function gwcd --description "CD to a worktree by selecting from list"
|
||||||
|
set -l worktree (git worktree list | tail -n +2 | awk '{print $1}' | fzf)
|
||||||
|
if test -n "$worktree"
|
||||||
|
cd $worktree
|
||||||
|
end
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,12 @@
|
||||||
gacp = "gac and git push";
|
gacp = "gac and git push";
|
||||||
gs = "git status";
|
gs = "git status";
|
||||||
|
|
||||||
|
# Git worktree
|
||||||
|
gwa = "git worktree add";
|
||||||
|
gwl = "git worktree list";
|
||||||
|
gwr = "git worktree remove";
|
||||||
|
gwp = "git worktree prune";
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
flake = "nix flake";
|
flake = "nix flake";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,8 @@ in {
|
||||||
deno
|
deno
|
||||||
basedpyright
|
basedpyright
|
||||||
taplo
|
taplo
|
||||||
|
|
||||||
|
autoraise
|
||||||
];
|
];
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
|
|
@ -71,31 +73,32 @@ in {
|
||||||
autoUpdate = true; # Fetch the newest stable branch of Homebrew's git repo
|
autoUpdate = true; # Fetch the newest stable branch of Homebrew's git repo
|
||||||
upgrade = true; # Upgrade outdated casks, formulae, and App Store apps
|
upgrade = true; # Upgrade outdated casks, formulae, and App Store apps
|
||||||
# 'zap': uninstalls all formulae(and related files) not listed in the generated Brewfile
|
# 'zap': uninstalls all formulae(and related files) not listed in the generated Brewfile
|
||||||
cleanup = "zap";
|
# cleanup = "zap";
|
||||||
};
|
};
|
||||||
|
|
||||||
brews = [
|
brews = [
|
||||||
"autoconf"
|
# "autoconf"
|
||||||
"automake"
|
# "automake"
|
||||||
"fastlane"
|
# "direnv"
|
||||||
"freetype"
|
# "fastlane"
|
||||||
"git-lfs"
|
# "freetype"
|
||||||
"libtool"
|
# "git-lfs"
|
||||||
"m4"
|
# "libtool"
|
||||||
"nasm"
|
# "m4"
|
||||||
"pkg-config"
|
# "nasm"
|
||||||
"python@${py_ver}"
|
# "pkg-config"
|
||||||
"rsync"
|
# "python@${py_ver}"
|
||||||
"jq"
|
# "rsync"
|
||||||
"pipenv"
|
# "jq"
|
||||||
"ffmpeg"
|
# "pipenv"
|
||||||
"wget"
|
# "ffmpeg"
|
||||||
"ios-deploy"
|
# "wget"
|
||||||
"unzip"
|
# "ios-deploy"
|
||||||
"yarn"
|
# "unzip"
|
||||||
"xz"
|
# "yarn"
|
||||||
|
# "xz"
|
||||||
|
|
||||||
"llvm@20"
|
# "llvm@20"
|
||||||
];
|
];
|
||||||
|
|
||||||
casks = [
|
casks = [
|
||||||
|
|
@ -113,10 +116,10 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.jankyborders = {
|
# services.jankyborders = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
active_color = "0xFF95bcf9";
|
# active_color = "0xFF95bcf9";
|
||||||
};
|
# };
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
programs.zsh.enable = false;
|
programs.zsh.enable = false;
|
||||||
|
|
|
||||||
|
|
@ -141,32 +141,20 @@
|
||||||
# homeDirectory = /Users/tyler.mayoff;
|
# homeDirectory = /Users/tyler.mayoff;
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
bazelisk
|
|
||||||
cmake
|
|
||||||
conan
|
|
||||||
|
|
||||||
pre-commit
|
pre-commit
|
||||||
|
|
||||||
black
|
|
||||||
ruff
|
ruff
|
||||||
|
|
||||||
swiftlint
|
|
||||||
unstable.helix-gpt
|
|
||||||
unstable.lsp-ai
|
unstable.lsp-ai
|
||||||
python312Packages.python-lsp-server
|
python312Packages.python-lsp-server
|
||||||
unstable.openscad-lsp
|
unstable.openscad-lsp
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
cmake-language-server
|
|
||||||
jdt-language-server
|
jdt-language-server
|
||||||
unstable.biome
|
|
||||||
uv
|
uv
|
||||||
|
|
||||||
unstable.jiratui
|
|
||||||
|
|
||||||
ffmpeg
|
ffmpeg
|
||||||
sccache
|
sccache
|
||||||
just
|
just
|
||||||
nodejs_24
|
|
||||||
cocoapods
|
cocoapods
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue