diff options
| -rw-r--r-- | .config/kak/kakrc | 34 | ||||
| -rw-r--r-- | .config/shell/aliasrc | 3 | ||||
| -rw-r--r-- | .config/x11/xprofile | 2 | ||||
| -rw-r--r-- | .gnupg/gpg-agent.conf | 4 | ||||
| -rw-r--r-- | .gnupg/gpg-agent.conf.Darwin | 13 | ||||
| -rw-r--r-- | .gnupg/gpg-agent.conf.Linux | 13 | ||||
| -rwxr-xr-x | .local/bin/putdotfiles | 1 | ||||
| -rwxr-xr-x | .local/bin/terragrunt | 76 | ||||
| -rwxr-xr-x | .local/bin/use-context | 2 |
9 files changed, 67 insertions, 81 deletions
diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 9f5a6cc..eec5ea2 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -1,7 +1,39 @@ colorscheme gruber-darker add-highlighter global/ number-lines -relative -hook -once global KakBegin .* %{ require-module connect } +hook -once global KakBegin .* %{ + require-module connect + require-module dtach-repl + + # Removed a sh -c. + define-command -override -docstring %{ + dtach-repl [<arguments>]: create a new terminal window for repl interaction + All optional parameters are forwarded to the new terminal window + } \ + -params .. \ + dtach-repl %{ terminal sh -c %{ + file="$(mktemp -u -t kak_dtach_repl.XXXXX)" + trap 'rm -f "${file}"' EXIT + printf "evaluate-commands -try-client $1 \ + 'set-option current dtach_repl_id ${file}'" | kak -p "$2" + shift 2 + dtach -c "${file}" -E "${@:-$SHELL}" + } -- %val{client} %val{session} %arg{@} + } + + # Added bracketed paste support. + define-command -override dtach-send-text -params 0..1 -docstring %{ + dtach-send-text [text]: Send text to the REPL. + If no text is passed, then the selection is used + } %{ + nop %sh{ + printf "\033[200~%s\033[201~\n" "${@:-$kak_selection}" | dtach -p "$kak_opt_dtach_repl_id" + } + } + + alias global repl-new dtach-repl + alias global repl-send-text dtach-send-text +} set-option global toolsclient t set-option global jumpclient j diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 5b53059..65382e4 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -47,4 +47,5 @@ alias \ z="zathura" alias \ - ref="shortcuts >/dev/null; . ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; . ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" + ref="shortcuts >/dev/null; . ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; . ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" \ + uc="use-context" diff --git a/.config/x11/xprofile b/.config/x11/xprofile index ec24fe3..ad83ede 100644 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -13,7 +13,7 @@ for program in $autostart; do pidof -sx "$program" || "$program" & done >/dev/null 2>&1 -pidof -sx "redshift" || redshift -x -l 52.30487057853634:4.764923605516801 -b 1.0:0.8 & +pidof -sx "redshift" || redshift -l 52.30487057853634:4.764923605516801 -b 1.0:0.8 & pidof -sx "unclutter" || unclutter -noevents & # Starts a gpg-agents and configures it as ssh-agent. diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf index 18d63b7..f30e893 100644 --- a/.gnupg/gpg-agent.conf +++ b/.gnupg/gpg-agent.conf @@ -5,8 +5,8 @@ #pinentry-program /usr/bin/pinentry-x11 #pinentry-program /usr/local/bin/pinentry-curses #pinentry-program /usr/local/bin/pinentry-mac -pinentry-program /opt/homebrew/bin/pinentry-mac -#pinentry-program /usr/bin/pinentry-dmenu +#pinentry-program /opt/homebrew/bin/pinentry-mac +pinentry-program /usr/bin/pinentry-dmenu enable-ssh-support ttyname $GPG_TTY default-cache-ttl 60 diff --git a/.gnupg/gpg-agent.conf.Darwin b/.gnupg/gpg-agent.conf.Darwin new file mode 100644 index 0000000..18d63b7 --- /dev/null +++ b/.gnupg/gpg-agent.conf.Darwin @@ -0,0 +1,13 @@ +# https://github.com/drduh/config/blob/master/gpg-agent.conf +# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html +#pinentry-program /usr/bin/pinentry-gnome3 +#pinentry-program /usr/bin/pinentry-tty +#pinentry-program /usr/bin/pinentry-x11 +#pinentry-program /usr/local/bin/pinentry-curses +#pinentry-program /usr/local/bin/pinentry-mac +pinentry-program /opt/homebrew/bin/pinentry-mac +#pinentry-program /usr/bin/pinentry-dmenu +enable-ssh-support +ttyname $GPG_TTY +default-cache-ttl 60 +max-cache-ttl 120 diff --git a/.gnupg/gpg-agent.conf.Linux b/.gnupg/gpg-agent.conf.Linux new file mode 100644 index 0000000..f30e893 --- /dev/null +++ b/.gnupg/gpg-agent.conf.Linux @@ -0,0 +1,13 @@ +# https://github.com/drduh/config/blob/master/gpg-agent.conf +# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html +#pinentry-program /usr/bin/pinentry-gnome3 +#pinentry-program /usr/bin/pinentry-tty +#pinentry-program /usr/bin/pinentry-x11 +#pinentry-program /usr/local/bin/pinentry-curses +#pinentry-program /usr/local/bin/pinentry-mac +#pinentry-program /opt/homebrew/bin/pinentry-mac +pinentry-program /usr/bin/pinentry-dmenu +enable-ssh-support +ttyname $GPG_TTY +default-cache-ttl 60 +max-cache-ttl 120 diff --git a/.local/bin/putdotfiles b/.local/bin/putdotfiles index 9b47729..120ee7d 100755 --- a/.local/bin/putdotfiles +++ b/.local/bin/putdotfiles @@ -4,6 +4,7 @@ if [ -d "$HOME/.local/src/dotfiles/.git" ]; then ls -A | xargs -I xxx cp -rvf \ "$HOME/.local/src/dotfiles/xxx" \ "$HOME" + ln -sf "$HOME/.gnupg/gpg-agent.conf.$(uname -s)" "$HOME/.gnupg/gpg-agent.conf" else putgitrepo \ https://github.com/ivi-vink/dotfiles.git \ diff --git a/.local/bin/terragrunt b/.local/bin/terragrunt deleted file mode 100755 index d0b47f7..0000000 --- a/.local/bin/terragrunt +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -TERRAGRUNT_ARGS=() -while [[ $# -gt 0 ]]; do - case $1 in - -full) - FULL=1 - shift - ;; - -p|--path) - path="$2" - shift - shift - ;; - -p=*|--path=*) - path="${1#*=}" - shift - ;; - *|-*) - TERRAGRUNT_ARGS+=("$1") - shift - esac -done - -TTY="" -case ${TERRAGRUNT_ARGS[0]} in - plan) - TERRAGRUNT_ARGS+=(-no-color -compact-warnings) - ;; - apply|destroy) - TTY="-t" - for arg in $TERRAGRUNT_ARGS; do - if [[ $arg -eq "gruntplan" ]]; then - TTY="" - fi - done - TERRAGRUNT_ARGS+=(-no-color -compact-warnings) - ;; - init) - TERRAGRUNT_ARGS+=(-no-color -compact-warnings) - ;; -esac - -VARIABLES="" -REPO="${PWD}" -for var in $(pass show work/env) -do - case $var in - TERRAGRUNT_EXTRA_MOUNTS*) - TERRAGRUNT_EXTRA_MOUNTS="$TERRAGRUNT_EXTRA_MOUNTS ${var#*=}" - ;; - *) - VARIABLES="$VARIABLES$(printf ' -e %s' "$var")" - ;; - esac -done - -for var in $(printenv) -do - case $var in - TF_*) - VARIABLES="$VARIABLES$(printf ' -e %s' $var)" - ;; - esac -done - -WORKDIR="$REPO/$path" - -docker run --rm -i $TTY \ - $VARIABLES \ - -v $HOME/.terragrunt-cache:/tmp \ - -v $HOME/.azure:/root/.azure \ - -v $HOME/.netrc:/root/.netrc \ - $TERRAGRUNT_EXTRA_MOUNTS \ - -v ${REPO}:${REPO} \ - -w ${WORKDIR} \ - $TERRAGRUNT_CONTAINER terragrunt ${TERRAGRUNT_ARGS[@]} | filter-ansi diff --git a/.local/bin/use-context b/.local/bin/use-context new file mode 100755 index 0000000..9e79384 --- /dev/null +++ b/.local/bin/use-context @@ -0,0 +1,2 @@ +#!/bin/sh +echo "${@}" > ~/.local/state/context |
