-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor dotfiles for cross-platform support and add fzf utilities #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
28352c2
8c06ecb
2174625
c484f3f
367426b
05a5279
b7c3169
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # State files | ||
| vifm/vifm/vifminfo | ||
| vifm/vifminfo | ||
|
|
||
| # OS files | ||
| .DS_Store | ||
|
|
||
| # Secrets (never commit these) | ||
| shell/common/secrets | ||
| *.secret | ||
| .env |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/bash | ||
| command -v jq >/dev/null || exit 0 | ||
| command -v notify-send >/dev/null || exit 0 | ||
|
|
||
| INPUT=$(cat) | ||
| TITLE=$(printf '%s' "$INPUT" | jq -r '.title // "Claude Code"') | ||
| MESSAGE=$(printf '%s' "$INPUT" | jq -r '.message // "Needs attention"') | ||
| TYPE=$(printf '%s' "$INPUT" | jq -r '.notification_type // "unknown"') | ||
|
|
||
| case "$TYPE" in | ||
| permission_prompt) | ||
| URGENCY="critical" | ||
| SOUND="/usr/share/sounds/freedesktop/stereo/dialog-warning.oga" | ||
| ;; | ||
| *) | ||
| URGENCY="normal" | ||
| SOUND="/usr/share/sounds/freedesktop/stereo/message.oga" | ||
| ;; | ||
| esac | ||
|
|
||
| notify-send -a "Claude Code" -u "$URGENCY" "$TITLE" "$MESSAGE" | ||
| command -v pw-play >/dev/null && pw-play "$SOUND" & disown | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "hooks": { | ||
| "Notification": [ | ||
| { | ||
| "matcher": "", | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "~/.claude/hooks/notify.sh" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # Setup fzf | ||
| # --------- | ||
| if [[ ! "$PATH" == */Users/jackson/.fzf/bin* ]]; then | ||
| export PATH="${PATH:+${PATH}:}/Users/jackson/.fzf/bin" | ||
| if [[ ! "$PATH" == *"$HOME/.fzf/bin"* ]]; then | ||
| export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin" | ||
| fi | ||
|
|
||
| # Auto-completion | ||
| # --------------- | ||
| [[ $- == *i* ]] && source "/Users/jackson/.fzf/shell/completion.bash" 2> /dev/null | ||
| [[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.bash" 2> /dev/null |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # Setup fzf | ||
| # --------- | ||
| if [[ ! "$PATH" == */Users/jackson/.fzf/bin* ]]; then | ||
| export PATH="${PATH:+${PATH}:}/Users/jackson/.fzf/bin" | ||
| if [[ ! "$PATH" == *"$HOME/.fzf/bin"* ]]; then | ||
| export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin" | ||
| fi | ||
|
|
||
| # Auto-completion | ||
| # --------------- | ||
| [[ $- == *i* ]] && source "/Users/jackson/.fzf/shell/completion.zsh" 2> /dev/null | ||
| [[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2> /dev/null |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,12 +4,14 @@ | |||||||||
|
|
||||||||||
| - clean: ['~'] | ||||||||||
|
|
||||||||||
| - create: | ||||||||||
| - ~/.config | ||||||||||
| - ~/.shell | ||||||||||
| - ~/.claude/hooks | ||||||||||
|
|
||||||||||
| - link: | ||||||||||
| ~/.dotfiles: '' | ||||||||||
|
|
||||||||||
|
||||||||||
| # Homebrew | |
| ~/Brewfile: brew/Brewfile |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| source ~/.bashrc | ||
| # | ||
| # ~/.bash_profile | ||
| # | ||
|
|
||
| export PATH="$HOME/.cargo/bin:$PATH" | ||
| [[ -f ~/.bashrc ]] && . ~/.bashrc | ||
|
|
||
| # Shared login tasks (atuin, Hyprland auto-start, etc.) | ||
| [ -f ~/.shell/login ] && . ~/.shell/login | ||
|
|
||
| command -v atuin &>/dev/null && eval "$(atuin init bash)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notify.shhard-depends onjq,notify-send, andpw-play, but none of these are ensured by the macOS Brewfile (andnotify-send/pw-playare Linux-specific). Add dependency installation docs or make the script degrade gracefully (e.g., checkcommand -vand no-op / choose a macOS notifier when unavailable) to avoid hook failures.