diff --git a/.bashrc b/.bashrc index 45eab26..c307345 100644 --- a/.bashrc +++ b/.bashrc @@ -68,7 +68,11 @@ export LESS_TERMCAP_so="" # blue export LESS_TERMCAP_ue="" # "0m" export LESS_TERMCAP_us="" # underline -export ANSIBLE_INVENTORY="$HOME/.config/ansible/hosts" +export ANSIBLE_CONFIG="$HOME/.config/ansible/config.ini" +export ANSIBLE_INVENTORY="$HOME/.config/ansible/inventory.yaml" +export ANSIBLE_LOAD_CALLBACK_PLUGINS=1 +#export ANSIBLE_STDOUT_CALLBACK=json + #export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock [[ -d /.vim/spell ]] && export VIMSPELL=("$HOME/.vim/spell/*.add") @@ -120,6 +124,7 @@ pathprepend() { # remember last arg will be first in path pathprepend \ "$HOME/.local/bin" \ + "$HOME/.nimble/bin" \ "$GHREPOS/cmd-"* \ /usr/local/go/bin \ /usr/local/opt/openjdk/bin \ @@ -338,6 +343,16 @@ _have podman && _source_if "$HOME/.local/share/podman/completion" # d _have docker && _source_if "$HOME/.local/share/docker/completion" # d _have docker-compose && complete -F _docker_compose dc # dc +_have ansible && . <(register-python-argcomplete3 ansible) +_have ansible-config && . <(register-python-argcomplete3 ansible-config) +_have ansible-console && . <(register-python-argcomplete3 ansible-console) +_have ansible-doc && . <(register-python-argcomplete3 ansible-doc) +_have ansible-galaxy && . <(register-python-argcomplete3 ansible-galaxy) +_have ansible-inventory && . <(register-python-argcomplete3 ansible-inventory) +_have ansible-playbook && . <(register-python-argcomplete3 ansible-playbook) +_have ansible-pull && . <(register-python-argcomplete3 ansible-pull) +_have ansible-vault && . <(register-python-argcomplete3 ansible-vault) + # -------------------- personalized configuration -------------------- _source_if "$HOME/.bash_personal" diff --git a/.inputrc b/.inputrc index a0276f5..d3bbc2e 100644 --- a/.inputrc +++ b/.inputrc @@ -1,4 +1,5 @@ # particularly useful for psql set editing-mode vi +set enable-bracketed-paste on #set bell-style none # MAKE IT STOP!! set keymap vi diff --git a/install/ubuntu/install-ansible b/install/ubuntu/install-ansible index 70eb083..993cd14 100755 --- a/install/ubuntu/install-ansible +++ b/install/ubuntu/install-ansible @@ -1,6 +1,6 @@ #!/bin/sh -sudo add-apt-repository --yes --update ppa:ansible/ansible +🐧🏡 Linux Homelab Init - Install CRI-O with Ansible from debs`sudo add-apt-repository --yes --update ppa:ansible/ansible sudo apt install ansible sudo apt install python3-argcomplete sudo activate-global-python-argcomplete3 diff --git a/install/ubuntu/install-neo b/install/ubuntu/install-neo index 9a52e12..f3ad9a5 100755 --- a/install/ubuntu/install-neo +++ b/install/ubuntu/install-neo @@ -1,6 +1,8 @@ #!/bin/sh +echo <" && exit 1; path="${SCRIPTS}/${1}" -if [ -e "${path}" ]; then +if test -e "${path}"; then read -p "${1} already exists. Edit? " yes case "${yes}" in y|yes|yep|yeppers|yeah|ok|okay) exec vim "${path}" diff --git a/scripts/roll20 b/scripts/roll20 new file mode 100755 index 0000000..c23be07 --- /dev/null +++ b/scripts/roll20 @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +echo "$(( RANDOM%20 + 1 ))" + diff --git a/scripts/ssection b/scripts/ssection index 3f82c37..780556f 100755 --- a/scripts/ssection +++ b/scripts/ssection @@ -22,7 +22,7 @@ ssection () { if [[ "$line" =~ $end ]]; then in=no - printf "$buf" + printf "$buf\n\n" continue fi diff --git a/scripts/uppera b/scripts/uppera new file mode 100755 index 0000000..e8d027f --- /dev/null +++ b/scripts/uppera @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +while IFS= read line; do + echo ${line^^} +done diff --git a/scripts/weather b/scripts/weather index 0d3a957..8701049 100755 --- a/scripts/weather +++ b/scripts/weather @@ -1,2 +1,2 @@ #!/bin/sh -exec curl -L wttr.in +exec curl -L wttr.in?0 diff --git a/tmux/.tmux-live.conf b/tmux/.tmux-live.conf index 464a3db..34fb91d 100644 --- a/tmux/.tmux-live.conf +++ b/tmux/.tmux-live.conf @@ -24,8 +24,8 @@ set -g window-status-current-format "" # pane colors and display #set -g default-terminal "xterm-256color" # very wrong indeed -#set -ga terminal-overrides ",xterm-256color*:Tc" # very wrong indeed -set -g default-terminal "screen-256color" +set -ga terminal-overrides ",xterm-256color*:Tc" # very wrong indeed +#set -g default-terminal "screen-256color" # create more intuitive split key combos (same as modern screen) unbind | @@ -44,7 +44,7 @@ setw -g mode-keys vi set -g status-keys vi # vi keys to resize -bind -r C-k resize-pane -U 1 +bind -r C-k resize-pane -U 2 bind -r C-j resize-pane -D 1 bind -r C-h resize-pane -L 1 bind -r C-l resize-pane -R 1 diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 44d834f..6c3512e 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -55,7 +55,7 @@ bind -r l select-pane -R # customize new window for streaming unbind c -bind c new-window \; split-window -h \; select-pane -t 2 \; resize-pane -x 18 \; send "blankpane" Enter \; select-pane -t 1 +bind c new-window \; split-window -h \; select-pane -t 2 \; resize-pane -x 19 \; send "blankpane" Enter \; select-pane -t 1 # avoid cursor movement messing with resize set -g repeat-time 200 @@ -64,7 +64,7 @@ set -g repeat-time 200 #set -g default-terminal "xterm-256color" # works, but oh so wrong #set -ga terminal-overrides ",xterm-256color*:Tc" set -g default-terminal "screen-256color" -#set -g clock-mode-style 12 +set -g clock-mode-style 12 setw -g clock-mode-colour cyan set -g base-index 1 setw -g pane-base-index 1 @@ -90,16 +90,17 @@ set -g status-bg default set -g status-position top set -g status-interval 1 set -g status-left "" -set -g status-right "" #set -g status-left-length 78 #set -g status-left-style "fg=#928374,bold,reverse" #set -g status-left-style "fg=#928374" #set -g status-left-style "fg=brightwhite" +#set -g status-left "#(now) " #set -g status-left "#(head -1 ~/.status) " -#set -g status-right-length 50 #set -g status-right "%a, %b %-e, %Y, %-l:%M:%S%p %Z%0z" #set -g status-right-style "fg=#928374,bold" +set -g status-right-length 50 +set -g status-right "#(z pomo)" #set -g window-status-format "" #set -g window-status-current-format "" diff --git a/vim/.vimrc b/vim/.vimrc index 88fdc40..5e2be9b 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -105,9 +105,9 @@ set noshowmatch " wrap around when searching set wrapscan -" Just the defaults, these are changed per filetype by plugins. -" Most of the utility of all of this has been superceded by the use of -" modern simplified pandoc for capturing knowledge source instead of +" Just the formatoptions defaults, these are changed per filetype by +" plugins. Most of the utility of all of this has been superceded by the use of +" modern simplified pandoc for capturing knowledge source instead of " arbitrary raw text files. set fo-=t " don't auto-wrap text using text width @@ -199,13 +199,13 @@ au FileType * hi MatchParen ctermbg=236 ctermfg=darkred au FileType markdown,pandoc hi Title ctermfg=yellow ctermbg=NONE au FileType markdown,pandoc hi Operator ctermfg=yellow ctermbg=NONE au FileType yaml hi yamlBlockMappingKey ctermfg=NONE -au FileType yaml set sw=4 +au FileType yaml set sw=2 au FileType bash set sw=2 au FileType c set sw=8 set cinoptions+=:0 -" Edit/Reload vimr configuration file +" Edit/Reload vimrc configuration file nnoremap confe :e $HOME/.vimrc nnoremap confr :source $HOME/.vimrc @@ -217,23 +217,16 @@ if filereadable(expand("~/.vim/autoload/plug.vim")) " github.com/junegunn/vim-plug call plug#begin('~/.local/share/vim/plugins') - Plug 'frazrepo/vim-rainbow' + Plug 'zah/nim.vim' + Plug 'conradirwin/vim-bracketed-paste' + Plug 'morhetz/gruvbox' + Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } Plug 'vim-pandoc/vim-pandoc' - Plug 'pegn/pegn-syntax' Plug 'rwxrob/vim-pandoc-syntax-simple' - Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } + "Plug 'pegn/pegn-syntax' Plug 'tpope/vim-fugitive' - Plug 'hashivim/vim-terraform' - Plug 'morhetz/gruvbox' call plug#end() - " rainbow - " FIXME: only do this for non-pandoc file types - "let g:rainbow_active=1 - - " terraform - let g:terraform_fmt_on_save = 1 - " pandoc let g:pandoc#formatting#mode = 'h' " A' let g:pandoc#formatting#textwidth = 72 @@ -261,12 +254,6 @@ if filereadable(expand("~/.vim/autoload/plug.vim")) "let g:go_metalinter_autosave=1 set updatetime=100 "let g:go_gopls_analyses = { 'composites' : v:false } - au FileType go nmap t :GoTest! - au FileType go nmap v :GoVet! - au FileType go nmap b :GoBuild! - au FileType go nmap c :GoCoverageToggle - au FileType go nmap i :GoInfo - au FileType go nmap l :GoMetaLinter! au FileType go nmap m ilog.Print("made") au FileType go nmap n iif err != nil {return err} else @@ -294,7 +281,7 @@ autocmd BufWritePost *.md silent !toemoji % autocmd BufWritePost *.md silent !toduck % " fill in anything beginning with @ with a link to twitch to it -" autocmd vimleavepre *.md !perl -p -i -e 's, @(\w+), [\\@\1](https://twitch.tv/\1),g' % +"autocmd vimleavepre *.md !perl -p -i -e 's, @(\w+), [\\@\1](https://twitch.tv/\1),g' % " make Y consitent with D and C (yank til end) map Y y$ @@ -374,8 +361,8 @@ nmap 2 :set pastei "noremap :echoerr "Umm, use k instead" "noremap :echoerr "Umm, use j instead" "noremap :echoerr "Umm, use h instead" -" noremap :echoerr "Umm, use l instead" -" inoremap +"noremap :echoerr "Umm, use l instead" +"inoremap " inoremap " inoremap " inoremap