update
This commit is contained in:
parent
f49e8b9997
commit
cd3efbf4b7
2 changed files with 16 additions and 8 deletions
|
|
@ -1,12 +1,20 @@
|
|||
unlockbw ()
|
||||
set-cred ()
|
||||
{
|
||||
export BW_SESSION="$(bw unlock $(secret-tool lookup drive bitwarden) --raw)"
|
||||
export GITLAB_TOKEN="$(bw get password cli-gitlab)"
|
||||
export OLLAMA_TOKEN="$(bw get password cli-ollama-token)"
|
||||
}
|
||||
lockbw ()
|
||||
{
|
||||
printf "$(bw get password cli-gitlab)" | secret-tool store --label='Gitlab Token for CLI' 'token' 'GITLAB_TOKEN'
|
||||
printf "$(bw get password cli-ollama-token)" | secret-tool store --label='Ollama Token for CLI' 'token' 'OLLAMA_TOKEN'
|
||||
|
||||
unset BW_SESSION
|
||||
}
|
||||
|
||||
set-env ()
|
||||
{
|
||||
export GITLAB_TOKEN="$(secret-tool lookup token GITLAB_TOKEN)"
|
||||
export OLLAMA_TOKEN="$(secret-tool lookup token OLLAMA_TOKEN)"
|
||||
}
|
||||
|
||||
clear-env ()
|
||||
{
|
||||
unset GITLAB_TOKEN
|
||||
unset OLLAMA_TOKEN
|
||||
}
|
||||
|
|
@ -39,7 +47,7 @@ tmux-new () {
|
|||
tmux send-keys -t "$name:1.1" 'nvim -c "Neotree filesystem reveal left"' C-m
|
||||
|
||||
sleep 0.1
|
||||
tmux send-keys -t "$name:1.3" 'unlockbw; nvim +CodeCompanionChat -c only' C-m
|
||||
tmux send-keys -t "$name:1.3" 'set-env; nvim +CodeCompanionChat -c only' C-m
|
||||
|
||||
sleep 1
|
||||
tmux send-keys -t "$name:2" 'lg' C-m
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ bind '"' split-window -v -c "#{pane_current_path}"
|
|||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
bind C-j display-popup -E "\
|
||||
bind s display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
sed '/^$/d' |\
|
||||
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue