From e1c7d5b4281aac3fdcc9f3a1799f0d6d501977c2 Mon Sep 17 00:00:00 2001 From: Brad Clawsie Date: Wed, 6 Jul 2022 19:52:19 -0500 Subject: refactor --- dotcsirc | 24 ------- dotcustomel | 14 ----- dotemacs | 134 ---------------------------------------- dotgitconfig | 27 -------- dotprofile | 29 --------- dotsshauthorized_keys | 3 - dotsshconfig | 59 ------------------ dottmuxconf | 5 -- dotzshrc-arch | 47 -------------- dotzshrc-debian | 48 -------------- emacs/dotcustomel | 14 +++++ emacs/dotemacs | 134 ++++++++++++++++++++++++++++++++++++++++ fish/config.fish | 36 +++++++++++ fish/functions/fish_prompt.fish | 34 ++++++++++ git/dotgitconfig | 27 ++++++++ gnupg/gpg-agent.conf | 1 + gpg-agent.conf | 1 - ssh/dotsshauthorized_keys | 3 + ssh/dotsshconfig | 59 ++++++++++++++++++ tmux/dottmuxconf | 5 ++ zsh/dotzshrc-arch | 47 ++++++++++++++ zsh/dotzshrc-debian | 48 ++++++++++++++ 22 files changed, 408 insertions(+), 391 deletions(-) delete mode 100644 dotcsirc delete mode 100644 dotcustomel delete mode 100644 dotemacs delete mode 100644 dotgitconfig delete mode 100644 dotprofile delete mode 100644 dotsshauthorized_keys delete mode 100644 dotsshconfig delete mode 100644 dottmuxconf delete mode 100644 dotzshrc-arch delete mode 100644 dotzshrc-debian create mode 100644 emacs/dotcustomel create mode 100644 emacs/dotemacs create mode 100644 fish/config.fish create mode 100644 fish/functions/fish_prompt.fish create mode 100644 git/dotgitconfig create mode 100644 gnupg/gpg-agent.conf delete mode 100644 gpg-agent.conf create mode 100644 ssh/dotsshauthorized_keys create mode 100644 ssh/dotsshconfig create mode 100644 tmux/dottmuxconf create mode 100644 zsh/dotzshrc-arch create mode 100644 zsh/dotzshrc-debian diff --git a/dotcsirc b/dotcsirc deleted file mode 100644 index 22bb71b..0000000 --- a/dotcsirc +++ /dev/null @@ -1,24 +0,0 @@ -(import (chicken load)) -(load-verbose #f) -(let () - (import (chicken format)) - (import (chicken process-context)) - (import (chicken process signal)) - (unless (get-environment-variable "INSIDE_EMACS") - (import breadline) - (import breadline-scheme-completion) - (history-file (format "~a/.csi_history" (get-environment-variable "HOME"))) - (stifle-history! 10000) - (completer-word-break-characters-set! "\"\'`;|(") - (completer-set! scheme-completer) - (basic-quote-characters-set! "\"|") - (variable-bind! "blink-matching-paren" "on") - (paren-blink-timeout-set! 200000) - (let ((handler (signal-handler signal/int))) - (set-signal-handler! signal/int - (lambda (s) - (cleanup-after-signal!) - (reset-after-signal!) - (handler s)))) - (on-exit reset-terminal!) - (current-input-port (make-readline-port)))) \ No newline at end of file diff --git a/dotcustomel b/dotcustomel deleted file mode 100644 index 7d27931..0000000 --- a/dotcustomel +++ /dev/null @@ -1,14 +0,0 @@ -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(package-selected-packages - (quote - (yaml-mode markdown-mode magit go-mode dockerfile-mode)))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) diff --git a/dotemacs b/dotemacs deleted file mode 100644 index bb8bc8d..0000000 --- a/dotemacs +++ /dev/null @@ -1,134 +0,0 @@ -(package-initialize) - -;; ------------------------------------------------------------- -;; basic editor look and feel -(setq-default indent-tabs-mode nil) -(setq-default make-backup-files nil) -(setq-default column-number-mode t) -(setq-default tramp-default-user "brad") -(setq-default tramp-default-host "localhost") -(setq-default pgg-default-user-id "Brad Clawsie ") -(setq-default pgg-query-keyserver nil) -(setq confirm-nonexistent-file-or-buffer nil) -(setq inhibit-splash-screen t) -(setq display-time-24hr-format t) -(setq debug-on-error t) -(setq next-line-add-newlines nil) -(setq scroll-step 1) -(set-input-mode nil nil t) -(display-time) -(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) -(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) -(if (fboundp 'blink-cursor-mode) (blink-cursor-mode 0)) -(setq-default transient-mark-mode t) - -;; ------------------------------------------------------------- -;; shortcuts -(global-set-key "\C-l" 'goto-line) -(global-set-key "\C-h" 'delete-backward-char) -(global-set-key (kbd "\C-x w") 'kill-region) -(global-set-key (kbd "") 'magit-status) -(global-set-key (kbd "") 'eshell) -(global-set-key (kbd "") 'rename-buffer) -(fset 'switchbuffers - [?\C-x ?b]) -(global-set-key (kbd "C-c b") 'switchbuffers) - -;; ------------------------------------------------------------- -;; common input -(global-set-key [mouse-2] 'yank) -(global-font-lock-mode 1) -(fset 'yes-or-no-p 'y-or-n-p) - -;; ------------------------------------------------------------- -;; show whitespace -(setq-default show-trailing-whitespace t) -(setq-default indicate-empty-lines t) -(setq-default indicate-buffer-boundaries 'left) - -;; ------------------------------------------------------------- -;; highlight matching pairs of parentheses -(setq show-paren-delay 0) -(show-paren-mode) - -;; ------------------------------------------------------------- -;; ido -(setq ido-enable-flex-matching t) -(setq ido-everywhere t) -(ido-mode 1) -(setq ido-use-filename-at-point 'guess) -(setq ido-create-new-buffer 'always) - -;; ------------------------------------------------------------- -;; don't get clever and try to ping things that look like domains -(setq ffap-machine-p-known 'reject) - -;; ------------------------------------------------------------- -;; eshell -(setq eshell-prompt-function - (lambda nil (concat "" " $ "))) - -;; ------------------------------------------------------------- -;; melpa -(require 'package) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) - -;; ------------------------------------------------------------- -;; language modes - -;; go save hook -(setq gofmt-command "goimports") -(add-hook 'go-mode-hook (lambda () - (add-hook 'before-save-hook 'gofmt-before-save nil 'local))) - -;; .t files perl-mode -(add-to-list 'auto-mode-alist '("\\.t\\'" . perl-mode)) - -;; run auto-fill whenever editing markdown -(add-hook 'markdown-mode-hook 'auto-fill-mode) - -;;; rust-related -(setq rustic-format-on-save t) -(global-set-key (kbd "") 'rustic-cargo-current-test) - -(add-hook 'lsp-mode-hook 'company-mode) - -;; ------------------------------------------------------------- -;; time-related funcs -(defun insert-time () - (interactive) - (insert (format-time-string "%Y-%m-%d-%R"))) - -(defun insert-unixtime () - (interactive) - (insert (format-time-string "%s"))) - -(defun insert-date () - (interactive) - (insert (format-time-string "%Y-%m-%d"))) - -;; ------------------------------------------------------------- -;; revert all buffers with no confirm, and alias to f6 -(defun revert-all-buffers () - "Refreshes all open buffers from their respective files." - (interactive) - (dolist (buf (buffer-list)) - (with-current-buffer buf - (when (and (buffer-file-name) (file-exists-p (buffer-file-name)) (not (buffer-modified-p))) - (revert-buffer t t t) ))) - (message "Refreshed open files.")) -(global-set-key (kbd "") 'revert-all-buffers) - -;; ------------------------------------------------------------- -;; custom -(setq custom-file "~/.custom.el") -(load custom-file :noerror) - -;; ------------------------------------------------------------- -;; fix weird tls issue with packages -(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") - -;; ------------------------------------------------------------- -;; server -(server-start) diff --git a/dotgitconfig b/dotgitconfig deleted file mode 100644 index 1dc055d..0000000 --- a/dotgitconfig +++ /dev/null @@ -1,27 +0,0 @@ -[core] - pager = delta - -[interactive] - diffFilter = delta --color-only - -[delta] - navigate = true # use n and N to move between diff sections - -[merge] - conflictstyle = diff3 - -[diff] - colorMoved = default - -[user] - name = Brad Clawsie - email = brad@b7j0c.org - signingkey = B1C1F1462CE76E5F2D994FB3D817E42DCCB5AB08 - -[pull] - ff = only - -[init] - defaultBranch = master -[commit] - gpgSign = true diff --git a/dotprofile b/dotprofile deleted file mode 100644 index 8e26e32..0000000 --- a/dotprofile +++ /dev/null @@ -1,29 +0,0 @@ -# ~/.profile: executed by the command interpreter for login shells. -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login -# exists. -# see /usr/share/doc/bash/examples/startup-files for examples. -# the files are located in the bash-doc package. - -# the default umask is set in /etc/profile; for setting the umask -# for ssh logins, install and configure the libpam-umask package. -#umask 022 - -# if running bash -if [ -n "$BASH_VERSION" ]; then - # include .bashrc if it exists - if [ -f "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi -fi - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ] ; then - PATH="$HOME/bin:$PATH" -fi - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" -fi - -source "$HOME/perl5/perlbrew/etc/bashrc" diff --git a/dotsshauthorized_keys b/dotsshauthorized_keys deleted file mode 100644 index be0d45a..0000000 --- a/dotsshauthorized_keys +++ /dev/null @@ -1,3 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6RHJGPkmIO2krQsOoPO0DxONObXU6claQf+sBK09AuWzxKbGnYKOaHEmA/WOFY7N859Hp5BNDLhzXESKrRNXKl+l8rKpiZ/XYK1oc78pYl4+Vyu7Y6HzEGAmvKHeYtDWKBNT9DAaoFNSHv6TOq4iQY/r/THDbNOKKr/EBlBGhtQrET7RlfngOsqdHDPooY2IEWQmzGPqbj3FPqIOzY0HJN1l2l3AIZ3ApBuvHrUkkXbl2kf4RaWHAfI4dQLFYtcv/Xf1A2MkTAUOVYBRjRH2l6KpWCC9h6XxZzvgkiD7r9qkSfIpblY89h8tsyWJbZkcAXVzwOcOmJEqz8XgWmBxHaVihG9YJ3bYNCq+OgVydxrlWdZd8ZJR0o2xjVLx7Aa64leaExiNMfJyDMzXK0/2WHmsibTyIU7x7duu34KNvwx57mqAI4pJxiRXOh/9QlApzSdmFBxqQDc4S3WKBNKOCg0KrzSfqdQPa67ZyzPll2qQoQWDx9Im/AA+50T997jZVe6F9X4TYJxZLcvsMFFu5kuGIIcPVVRdPymzJMkmwnSDSc404FcsQq5vPUEHKbBadv2ymuAmH5lUzQ8KUuhsyPXfkTyFAu0dZUBr8jYJbf2hbr5oAC1dBs1KIMMthgt3JKeWV7TxzSqVfE+N3575LGPWvAefGRqCf1jEvwlFuaQ== brad@b7j0c.org -ssh-rsa AAAAB3NzaC1yc2EAAAADA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rtxVnLT9MliX0Jme3tgTSS0W1IGfdktoLVLusCT7WVT1qdYFFuSxpz70k9CC7fXrpIOj2Q+7D9YP/MwRI27Sjy478Z0yll9z+yO677nmfdHPQtmVe0JCyMKOUIR2Am8JiuuPuxi1A46UgN7scRM+o7VZ+ZNKi/2g9wL/Pn6lUHM6hDb9hCELAkf/ZJ0Li0C/tgVYqVbF6M8dwQHO/4k8RPRlCyFnHIgFMyHoaImlEh7yQAiMqfc/3uNM5AL221biRFBNE5R9hPAVGwKw4FSyP17a5fPQxVDLUo423St3cNsxURFsj+uJkxlt2ekp32U8JNrWQ== brad@termux diff --git a/dotsshconfig b/dotsshconfig deleted file mode 100644 index 12a6d7b..0000000 --- a/dotsshconfig +++ /dev/null @@ -1,59 +0,0 @@ -ConnectionAttempts 1 -FallBackToRsh no -ForwardAgent yes -ForwardX11 no -StrictHostKeyChecking no -KeepAlive yes - -Host b7j0c - HostName b7j0c.org - User brad - Port 512 - -Host grokloc - Hostname grokloc.com - User brad - Port 512 - -Host arch0 - Hostname arch0 - User brad - Port 22 - -Host grokloc-grokloc - HostName grokloc.com - User brad - Port 512 - IdentityFile ~/.ssh/id_grokloc - IdentitiesOnly yes - -Host gitea-grokloc - HostName grokloc.com - User git - Port 512 - IdentityFile ~/.ssh/id_grokloc - IdentitiesOnly yes - -Host sr.ht-grokloc - HostName git.sr.ht - User git - IdentityFile ~/.ssh/id_grokloc - IdentitiesOnly yes - -Host github-grokloc - HostName github.com - User git - IdentityFile ~/.ssh/id_grokloc - IdentitiesOnly yes - -Host gitlab-grokloc - HostName gitlab.com - User git - IdentityFile ~/.ssh/id_grokloc - IdentitiesOnly yes - -Host codeberg-grokloc - HostName codeberg.org - User git - IdentityFile ~/.ssh/id_grokloc - IdentitiesOnly yes diff --git a/dottmuxconf b/dottmuxconf deleted file mode 100644 index adec489..0000000 --- a/dottmuxconf +++ /dev/null @@ -1,5 +0,0 @@ -set -g status-bg black -set -g status-fg white -set -g status-interval 10 -set -g status-left "" -set -g status-right "%H:%M" diff --git a/dotzshrc-arch b/dotzshrc-arch deleted file mode 100644 index b9920c5..0000000 --- a/dotzshrc-arch +++ /dev/null @@ -1,47 +0,0 @@ -export HISTFILE=$HOME/.histfile -export HISTSIZE=1000 -export SAVEHIST=1000 -bindkey -e -zstyle :compinstall filename "$HOME/.zshrc" -autoload -Uz compinit -compinit - -PS1="$ " - -export PERL_UNICODE="AS" -export PERL_READLINE_NOWARN="yes" -export LOCAL_INC_PATHS="$HOME/repos/grokloc-perl5/lib:$HOME/repos/grokloc-perl5/service/app/lib" -PERL5LIB="$LOCAL_INC_PATHS:$HOME/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; -export PERL5LIB; - -export HOMEBINPATHS="$HOME/bin:$HOME/perl5/bin:$HOME/go/bin:$HOME/.cargo/bin" -export PATH="$HOMEBINPATHS:$PATH" - -export ALTERNATE_EDITOR="emacs" EDITOR="emacsclient" VISUAL="emacsclient" -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 - -export GPG_TTY=$(tty) -gpg-connect-agent updatestartuptty /bye >/dev/null - -alias c=clear -alias h=history - -setopt autopushd pushdminus pushdsilent pushdtohome -setopt autocd -setopt cdablevars -setopt interactivecomments -setopt noclobber -setopt HIST_REDUCE_BLANKS -setopt HIST_IGNORE_SPACE -setopt SH_WORD_SPLIT - -zstyle ':completion:*' completer _complete _match _approximate -zstyle ':completion:*:match:*' original only -zstyle ':completion:*:approximate:*' max-errors 1 numeric -zstyle ':completion:*:*:kill:*' menu yes select -zstyle ':completion:*:kill:*' force-list always -zstyle ':completion:*:cd:*' ignore-parents parent pwd - -clear; - diff --git a/dotzshrc-debian b/dotzshrc-debian deleted file mode 100644 index bcc1cc8..0000000 --- a/dotzshrc-debian +++ /dev/null @@ -1,48 +0,0 @@ -export HISTFILE=$HOME/.histfile -export HISTSIZE=1000 -export SAVEHIST=1000 -bindkey -e -zstyle :compinstall filename "$HOME/.zshrc" -autoload -Uz compinit -compinit - -PS1="$ " - -# perl -export PERL_UNICODE="AS" -export PERL_READLINE_NOWARN="yes" - -# paths -export HOMEBINPATHS="$HOME/bin" -export PATH="$HOMEBINPATHS:$PATH" - -# text -export ALTERNATE_EDITOR="emacs" EDITOR="emacsclient" VISUAL="emacsclient" -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 - -export GPG_TTY=$(tty) -gpg-connect-agent updatestartuptty /bye >/dev/null - -# zsh -alias c=clear -alias h=history - -setopt autopushd pushdminus pushdsilent pushdtohome -setopt autocd -setopt cdablevars -setopt interactivecomments -setopt noclobber -setopt HIST_REDUCE_BLANKS -setopt HIST_IGNORE_SPACE -setopt SH_WORD_SPLIT - -zstyle ':completion:*' completer _complete _match _approximate -zstyle ':completion:*:match:*' original only -zstyle ':completion:*:approximate:*' max-errors 1 numeric -zstyle ':completion:*:*:kill:*' menu yes select -zstyle ':completion:*:kill:*' force-list always -zstyle ':completion:*:cd:*' ignore-parents parent pwd - -clear; - diff --git a/emacs/dotcustomel b/emacs/dotcustomel new file mode 100644 index 0000000..7d27931 --- /dev/null +++ b/emacs/dotcustomel @@ -0,0 +1,14 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + (quote + (yaml-mode markdown-mode magit go-mode dockerfile-mode)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/emacs/dotemacs b/emacs/dotemacs new file mode 100644 index 0000000..bb8bc8d --- /dev/null +++ b/emacs/dotemacs @@ -0,0 +1,134 @@ +(package-initialize) + +;; ------------------------------------------------------------- +;; basic editor look and feel +(setq-default indent-tabs-mode nil) +(setq-default make-backup-files nil) +(setq-default column-number-mode t) +(setq-default tramp-default-user "brad") +(setq-default tramp-default-host "localhost") +(setq-default pgg-default-user-id "Brad Clawsie ") +(setq-default pgg-query-keyserver nil) +(setq confirm-nonexistent-file-or-buffer nil) +(setq inhibit-splash-screen t) +(setq display-time-24hr-format t) +(setq debug-on-error t) +(setq next-line-add-newlines nil) +(setq scroll-step 1) +(set-input-mode nil nil t) +(display-time) +(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) +(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) +(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) +(if (fboundp 'blink-cursor-mode) (blink-cursor-mode 0)) +(setq-default transient-mark-mode t) + +;; ------------------------------------------------------------- +;; shortcuts +(global-set-key "\C-l" 'goto-line) +(global-set-key "\C-h" 'delete-backward-char) +(global-set-key (kbd "\C-x w") 'kill-region) +(global-set-key (kbd "") 'magit-status) +(global-set-key (kbd "") 'eshell) +(global-set-key (kbd "") 'rename-buffer) +(fset 'switchbuffers + [?\C-x ?b]) +(global-set-key (kbd "C-c b") 'switchbuffers) + +;; ------------------------------------------------------------- +;; common input +(global-set-key [mouse-2] 'yank) +(global-font-lock-mode 1) +(fset 'yes-or-no-p 'y-or-n-p) + +;; ------------------------------------------------------------- +;; show whitespace +(setq-default show-trailing-whitespace t) +(setq-default indicate-empty-lines t) +(setq-default indicate-buffer-boundaries 'left) + +;; ------------------------------------------------------------- +;; highlight matching pairs of parentheses +(setq show-paren-delay 0) +(show-paren-mode) + +;; ------------------------------------------------------------- +;; ido +(setq ido-enable-flex-matching t) +(setq ido-everywhere t) +(ido-mode 1) +(setq ido-use-filename-at-point 'guess) +(setq ido-create-new-buffer 'always) + +;; ------------------------------------------------------------- +;; don't get clever and try to ping things that look like domains +(setq ffap-machine-p-known 'reject) + +;; ------------------------------------------------------------- +;; eshell +(setq eshell-prompt-function + (lambda nil (concat "" " $ "))) + +;; ------------------------------------------------------------- +;; melpa +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) + +;; ------------------------------------------------------------- +;; language modes + +;; go save hook +(setq gofmt-command "goimports") +(add-hook 'go-mode-hook (lambda () + (add-hook 'before-save-hook 'gofmt-before-save nil 'local))) + +;; .t files perl-mode +(add-to-list 'auto-mode-alist '("\\.t\\'" . perl-mode)) + +;; run auto-fill whenever editing markdown +(add-hook 'markdown-mode-hook 'auto-fill-mode) + +;;; rust-related +(setq rustic-format-on-save t) +(global-set-key (kbd "") 'rustic-cargo-current-test) + +(add-hook 'lsp-mode-hook 'company-mode) + +;; ------------------------------------------------------------- +;; time-related funcs +(defun insert-time () + (interactive) + (insert (format-time-string "%Y-%m-%d-%R"))) + +(defun insert-unixtime () + (interactive) + (insert (format-time-string "%s"))) + +(defun insert-date () + (interactive) + (insert (format-time-string "%Y-%m-%d"))) + +;; ------------------------------------------------------------- +;; revert all buffers with no confirm, and alias to f6 +(defun revert-all-buffers () + "Refreshes all open buffers from their respective files." + (interactive) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (when (and (buffer-file-name) (file-exists-p (buffer-file-name)) (not (buffer-modified-p))) + (revert-buffer t t t) ))) + (message "Refreshed open files.")) +(global-set-key (kbd "") 'revert-all-buffers) + +;; ------------------------------------------------------------- +;; custom +(setq custom-file "~/.custom.el") +(load custom-file :noerror) + +;; ------------------------------------------------------------- +;; fix weird tls issue with packages +(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") + +;; ------------------------------------------------------------- +;; server +(server-start) diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..2f61a01 --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,36 @@ +# perl +set -gx PERL_UNICODE AS +set -gx PERL_READLINE_NOWARN yes +set -gx GROKLOC_REPO $HOME/repos/grokloc-perl5 +set -gx GROKLOC_LIB_INC $GROKLOC_REPO/lib +set -gx GROKLOC_SERVICE_INC $GROKLOC_REPO/service/app/lib +set -gx GROKLOC_INCS $GROKLOC_LIB_INC:$GROKLOC_SERVICE_INC +set -gx PERL5LIB $GROKLOC_INCS:$HOME/perl5/lib/perl5 + +# paths +set -gx PATH $HOME/bin:$HOME/perl5/bin:$HOME/go/bin:$HOME/.cargo/bin:$PATH + +alias c clear +alias h history + +if status is-interactive + # locale + set -gx LANG en_US.UTF-8 + set -gx LC_ALL en_US.UTF-8 + + # history + set -gx HISTFILE $HOME/.histfile + set -gx HISTSIZE 10000 + set -gx SAVEHIST 10000 + + # default editor + set -gx EDITOR emacsclient + set -gx ALTERNATE_EDITOR emacs + set -gx VISUAL emacsclient + + # gnupg + set -gx GPG_TTY $(tty) + gpg-connect-agent updatestartuptty /bye >/dev/null + + clear; +end diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..506e245 --- /dev/null +++ b/fish/functions/fish_prompt.fish @@ -0,0 +1,34 @@ +# name: Astronaut +# author: Radu Potop +# description: A prompt theme similar to Starship.rs but without the emojis. + +function fish_prompt --description 'Write out the prompt' + set -l last_status $status + set -l normal (set_color normal) + set -l status_color (set_color brgreen) + set -l cwd_color (set_color $fish_color_cwd) + set -l vcs_color (set_color brpurple) + set -l prompt_status "" + + # Since we display the prompt on a new line allow the directory names to be longer. + set -q fish_prompt_pwd_dir_length + or set -lx fish_prompt_pwd_dir_length 0 + + # Color the prompt differently when we're root + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set cwd_color (set_color $fish_color_cwd_root) + end + set suffix '#' + end + + # Color the prompt in red on error + if test $last_status -ne 0 + set status_color (set_color $fish_color_error) + set prompt_status $status_color "[" $last_status "]" $normal + end + + echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status + echo -n -s $status_color $suffix ' ' $normal +end diff --git a/git/dotgitconfig b/git/dotgitconfig new file mode 100644 index 0000000..1dc055d --- /dev/null +++ b/git/dotgitconfig @@ -0,0 +1,27 @@ +[core] + pager = delta + +[interactive] + diffFilter = delta --color-only + +[delta] + navigate = true # use n and N to move between diff sections + +[merge] + conflictstyle = diff3 + +[diff] + colorMoved = default + +[user] + name = Brad Clawsie + email = brad@b7j0c.org + signingkey = B1C1F1462CE76E5F2D994FB3D817E42DCCB5AB08 + +[pull] + ff = only + +[init] + defaultBranch = master +[commit] + gpgSign = true diff --git a/gnupg/gpg-agent.conf b/gnupg/gpg-agent.conf new file mode 100644 index 0000000..d25051c --- /dev/null +++ b/gnupg/gpg-agent.conf @@ -0,0 +1 @@ +default-cache-ttl 86400 diff --git a/gpg-agent.conf b/gpg-agent.conf deleted file mode 100644 index d25051c..0000000 --- a/gpg-agent.conf +++ /dev/null @@ -1 +0,0 @@ -default-cache-ttl 86400 diff --git a/ssh/dotsshauthorized_keys b/ssh/dotsshauthorized_keys new file mode 100644 index 0000000..be0d45a --- /dev/null +++ b/ssh/dotsshauthorized_keys @@ -0,0 +1,3 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6RHJGPkmIO2krQsOoPO0DxONObXU6claQf+sBK09AuWzxKbGnYKOaHEmA/WOFY7N859Hp5BNDLhzXESKrRNXKl+l8rKpiZ/XYK1oc78pYl4+Vyu7Y6HzEGAmvKHeYtDWKBNT9DAaoFNSHv6TOq4iQY/r/THDbNOKKr/EBlBGhtQrET7RlfngOsqdHDPooY2IEWQmzGPqbj3FPqIOzY0HJN1l2l3AIZ3ApBuvHrUkkXbl2kf4RaWHAfI4dQLFYtcv/Xf1A2MkTAUOVYBRjRH2l6KpWCC9h6XxZzvgkiD7r9qkSfIpblY89h8tsyWJbZkcAXVzwOcOmJEqz8XgWmBxHaVihG9YJ3bYNCq+OgVydxrlWdZd8ZJR0o2xjVLx7Aa64leaExiNMfJyDMzXK0/2WHmsibTyIU7x7duu34KNvwx57mqAI4pJxiRXOh/9QlApzSdmFBxqQDc4S3WKBNKOCg0KrzSfqdQPa67ZyzPll2qQoQWDx9Im/AA+50T997jZVe6F9X4TYJxZLcvsMFFu5kuGIIcPVVRdPymzJMkmwnSDSc404FcsQq5vPUEHKbBadv2ymuAmH5lUzQ8KUuhsyPXfkTyFAu0dZUB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qB+kodCK7BV/n3urwXxuRkK7AqcdK8dSDoEOfksAzmlGGXbs72X0aUPN5UxyO/XMa/Zh6EoGBPymOGAwtdnecKkeBjh8hv12Chc0BMbl90iQIsXkwgtrtxVnLT9MliX0Jme3tgTSS0W1IGfdktoLVLusCT7WVT1qdYFFuSxpz70k9CC7fXrpIOj2Q+7D9YP/MwRI27Sjy478Z0yll9z+yO677nmfdHPQtmVe0JCyMKOUIR2Am8JiuuPuxi1A46UgN7scRM+o7VZ+ZNKi/2g9wL/Pn6lUHM6hDb9hCELAkf/ZJ0Li0C/tgVYqVbF6M8dwQHO/4k8RPRlCyFnHIgFMyHoaImlEh7yQAiMqfc/3uNM5AL221biRFBNE5R9hPAVGwKw4FSyP17a5fPQxVDLUo423St3cNsxURFsj+uJkxlt2ekp32U8JNrWQ== brad@termux diff --git a/ssh/dotsshconfig b/ssh/dotsshconfig new file mode 100644 index 0000000..12a6d7b --- /dev/null +++ b/ssh/dotsshconfig @@ -0,0 +1,59 @@ +ConnectionAttempts 1 +FallBackToRsh no +ForwardAgent yes +ForwardX11 no +StrictHostKeyChecking no +KeepAlive yes + +Host b7j0c + HostName b7j0c.org + User brad + Port 512 + +Host grokloc + Hostname grokloc.com + User brad + Port 512 + +Host arch0 + Hostname arch0 + User brad + Port 22 + +Host grokloc-grokloc + HostName grokloc.com + User brad + Port 512 + IdentityFile ~/.ssh/id_grokloc + IdentitiesOnly yes + +Host gitea-grokloc + HostName grokloc.com + User git + Port 512 + IdentityFile ~/.ssh/id_grokloc + IdentitiesOnly yes + +Host sr.ht-grokloc + HostName git.sr.ht + User git + IdentityFile ~/.ssh/id_grokloc + IdentitiesOnly yes + +Host github-grokloc + HostName github.com + User git + IdentityFile ~/.ssh/id_grokloc + IdentitiesOnly yes + +Host gitlab-grokloc + HostName gitlab.com + User git + IdentityFile ~/.ssh/id_grokloc + IdentitiesOnly yes + +Host codeberg-grokloc + HostName codeberg.org + User git + IdentityFile ~/.ssh/id_grokloc + IdentitiesOnly yes diff --git a/tmux/dottmuxconf b/tmux/dottmuxconf new file mode 100644 index 0000000..adec489 --- /dev/null +++ b/tmux/dottmuxconf @@ -0,0 +1,5 @@ +set -g status-bg black +set -g status-fg white +set -g status-interval 10 +set -g status-left "" +set -g status-right "%H:%M" diff --git a/zsh/dotzshrc-arch b/zsh/dotzshrc-arch new file mode 100644 index 0000000..b9920c5 --- /dev/null +++ b/zsh/dotzshrc-arch @@ -0,0 +1,47 @@ +export HISTFILE=$HOME/.histfile +export HISTSIZE=1000 +export SAVEHIST=1000 +bindkey -e +zstyle :compinstall filename "$HOME/.zshrc" +autoload -Uz compinit +compinit + +PS1="$ " + +export PERL_UNICODE="AS" +export PERL_READLINE_NOWARN="yes" +export LOCAL_INC_PATHS="$HOME/repos/grokloc-perl5/lib:$HOME/repos/grokloc-perl5/service/app/lib" +PERL5LIB="$LOCAL_INC_PATHS:$HOME/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; +export PERL5LIB; + +export HOMEBINPATHS="$HOME/bin:$HOME/perl5/bin:$HOME/go/bin:$HOME/.cargo/bin" +export PATH="$HOMEBINPATHS:$PATH" + +export ALTERNATE_EDITOR="emacs" EDITOR="emacsclient" VISUAL="emacsclient" +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +export GPG_TTY=$(tty) +gpg-connect-agent updatestartuptty /bye >/dev/null + +alias c=clear +alias h=history + +setopt autopushd pushdminus pushdsilent pushdtohome +setopt autocd +setopt cdablevars +setopt interactivecomments +setopt noclobber +setopt HIST_REDUCE_BLANKS +setopt HIST_IGNORE_SPACE +setopt SH_WORD_SPLIT + +zstyle ':completion:*' completer _complete _match _approximate +zstyle ':completion:*:match:*' original only +zstyle ':completion:*:approximate:*' max-errors 1 numeric +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:kill:*' force-list always +zstyle ':completion:*:cd:*' ignore-parents parent pwd + +clear; + diff --git a/zsh/dotzshrc-debian b/zsh/dotzshrc-debian new file mode 100644 index 0000000..bcc1cc8 --- /dev/null +++ b/zsh/dotzshrc-debian @@ -0,0 +1,48 @@ +export HISTFILE=$HOME/.histfile +export HISTSIZE=1000 +export SAVEHIST=1000 +bindkey -e +zstyle :compinstall filename "$HOME/.zshrc" +autoload -Uz compinit +compinit + +PS1="$ " + +# perl +export PERL_UNICODE="AS" +export PERL_READLINE_NOWARN="yes" + +# paths +export HOMEBINPATHS="$HOME/bin" +export PATH="$HOMEBINPATHS:$PATH" + +# text +export ALTERNATE_EDITOR="emacs" EDITOR="emacsclient" VISUAL="emacsclient" +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +export GPG_TTY=$(tty) +gpg-connect-agent updatestartuptty /bye >/dev/null + +# zsh +alias c=clear +alias h=history + +setopt autopushd pushdminus pushdsilent pushdtohome +setopt autocd +setopt cdablevars +setopt interactivecomments +setopt noclobber +setopt HIST_REDUCE_BLANKS +setopt HIST_IGNORE_SPACE +setopt SH_WORD_SPLIT + +zstyle ':completion:*' completer _complete _match _approximate +zstyle ':completion:*:match:*' original only +zstyle ':completion:*:approximate:*' max-errors 1 numeric +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:kill:*' force-list always +zstyle ':completion:*:cd:*' ignore-parents parent pwd + +clear; + -- cgit v1.2.3