mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(config): auto-load GITHUB_TOKEN and add obscura skill source
This commit is contained in:
1 parent
ed0c539418
commit
a6ca8998e4
6 files changed
+44
-5
No files matched your search
@@ -41,6 +41,8 @@ skills:
|
|||||||
skills: [linear-documents]
|
skills: [linear-documents]
|
||||||
- source: Forward-Future/loop-library
|
- source: Forward-Future/loop-library
|
||||||
skills: [loopy]
|
skills: [loopy]
|
||||||
|
- source: h4ckf0r0day/obscura
|
||||||
|
skills: [obscura]
|
||||||
- source: hardikpandya/stop-slop
|
- source: hardikpandya/stop-slop
|
||||||
skills: [stop-slop]
|
skills: [stop-slop]
|
||||||
- source: haydenbleasel/blume
|
- source: haydenbleasel/blume
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ for _adir in "$ANDROID_HOME/platform-tools" "$ANDROID_HOME/cmdline-tools/latest/
|
|||||||
done
|
done
|
||||||
unset _adir
|
unset _adir
|
||||||
|
|
||||||
|
# GITHUB_TOKEN from gh's keyring login — never stored on disk. An inherited
|
||||||
|
# value wins, so nested shells skip the gh call.
|
||||||
|
if [ -z "${GITHUB_TOKEN:-}" ] && command -v gh >/dev/null 2>&1; then
|
||||||
|
_gh_token="$(gh auth token 2>/dev/null)"
|
||||||
|
[ -n "$_gh_token" ] && export GITHUB_TOKEN="$_gh_token"
|
||||||
|
unset _gh_token
|
||||||
|
fi
|
||||||
|
|
||||||
# Shared aliases (same set as fish/zsh; source of truth: .chezmoidata/aliases.yaml)
|
# Shared aliases (same set as fish/zsh; source of truth: .chezmoidata/aliases.yaml)
|
||||||
[ -f "$HOME/.config/shell/aliases.sh" ] && . "$HOME/.config/shell/aliases.sh"
|
[ -f "$HOME/.config/shell/aliases.sh" ] && . "$HOME/.config/shell/aliases.sh"
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ set -gx ANDROID_SDK_ROOT $ANDROID_HOME
|
|||||||
# Git hosts (non-secret; tokens are in secrets.fish)
|
# Git hosts (non-secret; tokens are in secrets.fish)
|
||||||
set -gx GITEA_LOGIN prad.codes
|
set -gx GITEA_LOGIN prad.codes
|
||||||
set -gx GITLAB_HOST git.sonr.org
|
set -gx GITLAB_HOST git.sonr.org
|
||||||
|
|
||||||
|
# GITHUB_TOKEN from gh's keyring login — never stored on disk. An inherited
|
||||||
|
# value wins, so nested shells skip the gh call.
|
||||||
|
if not set -q GITHUB_TOKEN; and command -q gh
|
||||||
|
set -l _gh_token (gh auth token 2>/dev/null)
|
||||||
|
test -n "$_gh_token"; and set -gx GITHUB_TOKEN $_gh_token
|
||||||
|
end
|
||||||
|
|
||||||
set -gx EDITOR nvim
|
set -gx EDITOR nvim
|
||||||
set -gx VISUAL nvim
|
set -gx VISUAL nvim
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
function _agents_bind --description 'ctrl-a: pick an AI agent (tv agents --inline) and start it, then redraw the prompt'
|
||||||
|
# The cable's launch action writes `ran` to $AGENTS_STATE before exec'ing
|
||||||
|
# the agent. Cancelled: tv left the cursor on the line below the prompt, so
|
||||||
|
# step back up; ran: the prompt goes wherever the agent left the cursor.
|
||||||
|
set -lx AGENTS_STATE (mktemp)
|
||||||
|
tv agents --inline
|
||||||
|
if test "$(cat $AGENTS_STATE)" != ran
|
||||||
|
printf '\033[A' >/dev/tty
|
||||||
|
end
|
||||||
|
rm -f $AGENTS_STATE
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
@@ -8,19 +8,20 @@ function fish_user_key_bindings
|
|||||||
# so the keys work regardless of mode.
|
# so the keys work regardless of mode.
|
||||||
for mode in insert default
|
for mode in insert default
|
||||||
# Keys owned by kitty.conf never reach fish and are NOT bound here:
|
# Keys owned by kitty.conf never reach fish and are NOT bound here:
|
||||||
# ctrl-g → lazygit overlay, ctrl-a → omp hsplit, ctrl-y → yazi vsplit,
|
# ctrl-g → lazygit overlay, ctrl-y → yazi vsplit,
|
||||||
# ctrl-h/j/k/l → vim-aware split nav (pass_keys.py).
|
# ctrl-h/j/k/l → vim-aware split nav (pass_keys.py).
|
||||||
# ctrl-e: tv git-files (bat preview, enter opens nvim). ctrl-o, ctrl-p
|
# ctrl-e: tv git-files (bat preview, enter opens nvim). ctrl-o, ctrl-p
|
||||||
# and down also open tv cables — same keys in zsh and bash. tv runs
|
# and down also open tv cables — same keys in zsh and bash; ctrl-a
|
||||||
# --inline below the prompt; _tv_inline/_gho_bind/_pj_bind put the
|
# (tv agents: pick an AI agent and start it) is fish-only. tv runs
|
||||||
# prompt back in place (or below any output) afterwards.
|
# --inline below the prompt; _tv_inline/_gho_bind/_pj_bind/_agents_bind
|
||||||
|
# put the prompt back in place (or below any output) afterwards.
|
||||||
bind -M $mode ctrl-e '_tv_inline git-files; commandline -f repaint'
|
bind -M $mode ctrl-e '_tv_inline git-files; commandline -f repaint'
|
||||||
bind -M $mode ctrl-b purple repaint
|
bind -M $mode ctrl-b purple repaint
|
||||||
bind -M $mode ctrl-y clip-last
|
bind -M $mode ctrl-y clip-last
|
||||||
|
|
||||||
bind -M $mode ctrl-o _gho_bind
|
bind -M $mode ctrl-o _gho_bind
|
||||||
bind -M $mode ctrl-p _pj_bind
|
bind -M $mode ctrl-p _pj_bind
|
||||||
bind -M $mode ctrl-a 'omp; commandline -f repaint'
|
bind -M $mode ctrl-a _agents_bind
|
||||||
bind -M $mode ctrl-w 'atuin ai inline; commandline -f repaint'
|
bind -M $mode ctrl-w 'atuin ai inline; commandline -f repaint'
|
||||||
|
|
||||||
# Arrow keys: atuin owns up (bound from config.fish, survives the
|
# Arrow keys: atuin owns up (bound from config.fish, survives the
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ for _adir in "$ANDROID_HOME/platform-tools" "$ANDROID_HOME/cmdline-tools/latest/
|
|||||||
done
|
done
|
||||||
unset _adir
|
unset _adir
|
||||||
|
|
||||||
|
# GITHUB_TOKEN from gh's keyring login — never stored on disk. An inherited
|
||||||
|
# value wins, so nested shells skip the gh call.
|
||||||
|
if [ -z "${GITHUB_TOKEN:-}" ] && command -v gh >/dev/null 2>&1; then
|
||||||
|
_gh_token="$(gh auth token 2>/dev/null)"
|
||||||
|
[ -n "$_gh_token" ] && export GITHUB_TOKEN="$_gh_token"
|
||||||
|
unset _gh_token
|
||||||
|
fi
|
||||||
|
|
||||||
# Shared aliases (same set as fish/bash; source of truth: .chezmoidata/aliases.yaml)
|
# Shared aliases (same set as fish/bash; source of truth: .chezmoidata/aliases.yaml)
|
||||||
[ -f "$HOME/.config/shell/aliases.sh" ] && . "$HOME/.config/shell/aliases.sh"
|
[ -f "$HOME/.config/shell/aliases.sh" ] && . "$HOME/.config/shell/aliases.sh"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user