-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_config.toml
More file actions
107 lines (91 loc) · 4.44 KB
/
example_config.toml
File metadata and controls
107 lines (91 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# hypr Configuration File
#
# This is a comprehensive example of all configuration options for hypr.
# Configuration is loaded from multiple sources in this order:
# 1. Global config: ~/.config/hypr/config.toml (Linux) or ~/Library/Application Support/hypr/config.toml (macOS)
# 2. Project config: hypr.toml or .hypr.toml in project root
# 3. Environment variables: HYPR_* prefix
# 4. Command line flags
#
# Later sources override earlier ones.
# ============================================================================
# Terminal Management
# ============================================================================
[terminal]
# How hypr opens worktrees in your terminal
# Options: "tab" (default), "window", "inplace", "echo"
# - tab: Open in a new tab
# - window: Open in a new window
# - inplace: Switch the current terminal to the worktree directory
# - echo: Output shell commands to stdout
# CLI: --terminal=tab
# ENV: HYPR_TERMINAL_MODE=tab
mode = "tab"
# Always create a new terminal session instead of switching to existing ones
# Useful if you want to keep multiple terminals open for the same worktree
# CLI: --ignore-same-session
# ENV: HYPRWT_TERMINAL_ALWAYS_NEW=true
always_new = false
# Force a specific terminal program instead of auto-detection
# Leave commented to use auto-detection
# ENV: HYPR_TERMINAL_PROGRAM=iterm2
# program = "iterm2" # Options: iterm2, terminal, tmux, gnome-terminal, konsole, etc.
# ============================================================================
# Worktree Management
# ============================================================================
[worktree]
# Pattern for worktree directory location
# Variables: {repo_dir}, {repo_name}, {repo_parent_dir}, {branch}
# Default: "../{repo_name}-worktrees/{branch}"
# Can also use environment variables: "$HOME/worktrees/{repo_name}/{branch}"
# Example with repo_parent_dir: "{repo_parent_dir}/worktrees/{branch}"
# ENV: HYPR_WORKTREE_DIRECTORY_PATTERN="../{repo_name}-worktrees/{branch}"
directory_pattern = "../{repo_name}-worktrees/{branch}"
# Automatically fetch from remote before creating new worktrees
# CLI: --no-fetch (to disable)
# ENV: HYPR_WORKTREE_AUTO_FETCH=false
auto_fetch = true
# Automatically prefix new branch names with a template
# Variables: {repo_name}, {github_username} (if gh CLI is available)
# Examples:
# branch_prefix = "feature/" # Simple prefix
# branch_prefix = "{github_username}/" # Use GitHub username
# When set, "hypr my-feature" creates "feature/my-feature" or "alice/my-feature"
# Also used when switching: "hypr my-feature" switches to "feature/my-feature" if it exists
# ENV: HYPR_WORKTREE_BRANCH_PREFIX="feature/"
# branch_prefix = "feature/"
# ============================================================================
# Cleanup Configuration
# ============================================================================
[cleanup]
# Default mode for cleanup command
# Options: "interactive" (default), "merged", "remoteless", "all"
# CLI: --mode=merged
# ENV: HYPR_CLEANUP_DEFAULT_MODE=merged
default_mode = "interactive"
# ============================================================================
# Init Scripts and Hooks
# ============================================================================
[scripts]
# Command to run after creating or switching to a worktree
# CLI: --init="npm install" (maps to session_init)
# ENV: HYPR_SCRIPTS_SESSION_INIT="npm install && npm run dev"
session_init = "echo 'Always run after creating a new worktree; copy env vars & install dependencies'"
[scripts.custom]
# Custom scripts for specialized worktree initialization
# Runs AFTER the standard init script for specific workflows
# CLI: hypr feature-branch --custom-script="bugfix"
# Note: For one-time custom scripts, use --after-init="command" instead
bugfix = 'claude "Fix the bug described in GitHub issue $1"' # arguments are passed to the script
release = 'claude "/release"' # asks claude to run .claude/commands/release.md
# ============================================================================
# User Interface
# ============================================================================
# Confirmation prompts
[confirmations]
# Which operations require confirmation
# CLI: -y / --yes (to skip all confirmations)
# ENV: HYPRWT_CONFIRMATIONS_CLEANUP_MULTIPLE=false
cleanup_multiple = true # When cleaning up multiple worktrees
# ENV: HYPR_CONFIRMATIONS_FORCE_OPERATIONS=false
force_operations = true # When using --force flag