From a593e0696ebc72d40d870516a00be443cc75c691 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Wed, 19 Nov 2025 07:46:40 +0000 Subject: [PATCH] claude custom commands --- home/common/programs/claude/commands/merge.md | 19 +++++++++++++++++++ .../programs/claude/commands/worktree.md | 9 +++++++++ home/common/programs/claude/default.nix | 9 +++++++++ home/common/programs/default.nix | 1 + home/common/programs/dev.nix | 4 ++++ home/common/programs/kitty.nix | 6 ++++++ 6 files changed, 48 insertions(+) create mode 100644 home/common/programs/claude/commands/merge.md create mode 100644 home/common/programs/claude/commands/worktree.md create mode 100644 home/common/programs/claude/default.nix diff --git a/home/common/programs/claude/commands/merge.md b/home/common/programs/claude/commands/merge.md new file mode 100644 index 0000000..028c246 --- /dev/null +++ b/home/common/programs/claude/commands/merge.md @@ -0,0 +1,19 @@ +Merge a branch from the worktree. +If you're currently working on a worktree, assume that's the one I'm referring to. + +Start by merging back the new main branch, since I may have made changes to it. + +# Language specific: + +## Rust + +Ensure cargo check is happy. +Ensure clippy is happy. clean up any new warnings. + +## Typescript + +Ensure tsc is happy. + +# Finally + +Squash the commits into a single one, merge into the base branch, and delete the worktree. diff --git a/home/common/programs/claude/commands/worktree.md b/home/common/programs/claude/commands/worktree.md new file mode 100644 index 0000000..11aa1cc --- /dev/null +++ b/home/common/programs/claude/commands/worktree.md @@ -0,0 +1,9 @@ +Create a new worktree for the requested feature. keep the branch name concise, but starting with claude/. + +Do all the work for the feature in the new worktree. + +Once I ask you to merge: +- start by merging back the new main branch, since I may have made changes to it. +- solve any conflicts that arise. +- merge the new worktree into the main branch. +- delete the worktree. diff --git a/home/common/programs/claude/default.nix b/home/common/programs/claude/default.nix new file mode 100644 index 0000000..48869d2 --- /dev/null +++ b/home/common/programs/claude/default.nix @@ -0,0 +1,9 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + home.file.".claude/commands".source = ./commands; +} diff --git a/home/common/programs/default.nix b/home/common/programs/default.nix index 965a8da..e78ac9e 100644 --- a/home/common/programs/default.nix +++ b/home/common/programs/default.nix @@ -16,6 +16,7 @@ ./dev.nix ./aider.nix ./cpp.nix + ./claude ]; programs = { diff --git a/home/common/programs/dev.nix b/home/common/programs/dev.nix index aba6c7b..1c6f043 100644 --- a/home/common/programs/dev.nix +++ b/home/common/programs/dev.nix @@ -28,6 +28,10 @@ lsof ktlint croc + + # typst + typst + typstyle ]; programs.tmux = { diff --git a/home/common/programs/kitty.nix b/home/common/programs/kitty.nix index dc0b065..29861cf 100644 --- a/home/common/programs/kitty.nix +++ b/home/common/programs/kitty.nix @@ -23,9 +23,13 @@ tab_bar_style = "powerline"; tab_powerline_style = "slanted"; tab_title_template = "{tab.active_wd.split('/')[-1]}{' :{}'.format(num_windows) if num_windows > 1 else ''}"; + tab_bar_filter = "session:~ or session:^$"; # keys kitty_mod = "alt"; + + # remove control + allow_remote_control = true; }; keybindings = { @@ -51,6 +55,8 @@ "kitty_mod+j" = "neighboring_window down"; "kitty_mod+k" = "neighboring_window up"; "kitty_mod+l" = "neighboring_window right"; + + "f7>/" = "goto_session"; }; extraConfig = ''