diff --git a/.config/lvim/config.lua b/.config/lvim/config.lua index d6772cd..4bb8019 100644 --- a/.config/lvim/config.lua +++ b/.config/lvim/config.lua @@ -2,7 +2,6 @@ THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT `lvim` is the global options object ]] - -- vim options vim.opt.shiftwidth = 2 vim.opt.tabstop = 2 @@ -12,7 +11,7 @@ vim.opt.relativenumber = false lvim.log.level = "info" lvim.format_on_save = { enabled = true, - -- pattern = "*.lua", + pattern = "*.tf", timeout = 1000, } -- to disable icons and use a minimalist setup, uncomment the following @@ -103,6 +102,13 @@ lvim.builtin.treesitter.auto_install = true -- }, -- } + +local has_words_before = function() + if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match("^%s*$") == nil +end + -- -- Additional Plugins lvim.plugins = { -- { @@ -127,7 +133,7 @@ lvim.plugins = { "Glgrep", "Gedit" }, - ft = {"fugitive"} + ft = { "fugitive" } }, { "tpope/vim-rhubarb" }, { "rodjek/vim-puppet" }, @@ -145,22 +151,44 @@ lvim.plugins = { }) end, }, - { "zbirenbaum/copilot.lua", + { + "zbirenbaum/copilot.lua", event = { "VimEnter" }, config = function() vim.defer_fn(function() require("copilot").setup { plugin_manager_path = get_runtime_dir() .. "/site/pack/packer", + suggestion = { enabled = false }, + panel = { enabled = false }, } end, 100) end, }, - { "zbirenbaum/copilot-cmp", + { + "zbirenbaum/copilot-cmp", after = { "copilot.lua", "nvim-cmp" }, - config = function () - require("copilot_cmp").setup() + config = function() + require("copilot_cmp").setup({ + mapping = { + [""] = vim.schedule_wrap(function(fallback) + if lvim.builtin.cmp.visible() and has_words_before() then + lvim.builtin.cmp.select_next_item({ behavior = lvim.builtin.cmp.SelectBehavior.Select }) + else + fallback() + end + end), + }, + }) end }, + { + "iamcco/markdown-preview.nvim", + build = "cd app && npm install", + ft = "markdown", + config = function() + vim.g.mkdp_auto_start = 1 + end, + }, -- { -- "Pocco81/auto-save.nvim", -- config = function() diff --git a/.doom.d/config.el b/.doom.d/config.el index 02c5dda..b60600e 100644 --- a/.doom.d/config.el +++ b/.doom.d/config.el @@ -109,6 +109,9 @@ ("" . 'my-tab) ("TAB" . 'my-tab))) +(use-package! ox-jira + :after org) + ;; From https://github.com/hlissner/doom-emacs/issues/581 (defun dlukes/ediff-doom-config (file) "ediff the current config with the examples in doom-emacs-dir @@ -117,12 +120,12 @@ There are multiple config files, so FILE specifies which one to diff. " (interactive - (list (read-file-name "Config file to diff: " doom-private-dir))) + (list (read-file-name "Config file to diff: " doom-user-dir))) (let* ((stem (file-name-base file)) (customized-file (format "%s.el" stem)) (template-file-regex (format "^%s.example.el$" stem))) (ediff-files - (concat doom-private-dir customized-file) + (concat doom-user-dir customized-file) (car (directory-files-recursively doom-emacs-dir template-file-regex diff --git a/.doom.d/packages.el b/.doom.d/packages.el index 1c056ef..6e91103 100644 --- a/.doom.d/packages.el +++ b/.doom.d/packages.el @@ -53,3 +53,6 @@ (package! copilot :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) + +(package! ox-jira + :recipe (:host github :repo "stig/ox-jira.el" :files ("*.el"))) diff --git a/.gemrc b/.gemrc index 6153a6e..be43970 100644 --- a/.gemrc +++ b/.gemrc @@ -1 +1 @@ -gem: --no-ri --no-rdoc +gem: --no-ri --no-rdoc --no-document diff --git a/.gitconfig b/.gitconfig index 366f33e..16f850c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -5,7 +5,7 @@ [color] ui = true [alias] - lg = "log --decorate --pretty=format:'%C(yellow)%h%C(reset) %C(green)%G?%C(reset) %C(blue)%an%C(reset) %C(cyan)%cr%C(reset) %s %C(auto)%d%C(reset)' --graph --date-order" + lg = "log --decorate --pretty=format:'%C(yellow)%h%C(reset) %C(green)%G?%C(reset) %C(blue)%an%C(reset) %C(cyan)%ch%C(reset) %s %C(auto)%d%C(reset)' --graph --date-order" [diff] tool = vimdiff compactionHeuristic = true diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf index 0437626..a1c38a3 100644 --- a/.gnupg/gpg-agent.conf +++ b/.gnupg/gpg-agent.conf @@ -3,5 +3,5 @@ max-cache-ttl 3600 enable-ssh-support #disable-scdaemon #pinentry-program /usr/local/bin/pinentry-mac -#pinentry-program /usr/bin/pinentry-curses +#pinentry-program /usr/sbin/pinentry-curses #extra-socket /Users/hunner/.gnupg/S.gpg-agent.extra diff --git a/.tmux.conf b/.tmux.conf index 10cdf35..11a0567 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -103,6 +103,15 @@ setenv -g SSH_AUTH_SOCK "$HOME/.gnupg/$.gpg-agent.ssh" ### Colors +set -a terminal-features '*:RGB' +set -ga terminal-overrides ",alacritty:RGB" +set -ga terminal-overrides ",*256col*:Tc" +# undercurl support +set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' +# Enable colored underlines (e.g. in Vim) +set -a terminal-features '*:usstyle' +# underscore colours - needs tmux-3.0 +set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' #set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M' #set -ga terminal-overrides ",screen-256color-bce:Tc" #set -g default-terminal "screen-256color-bce" diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 2258836..12d7b83 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -165,7 +165,7 @@ gsConfig = def -- Layouts: --mLayout = smartBorders Full ||| tiled ||| hintedTile Wide ||| simplestFloat ||| Circle ||| magnifier Circle -mLayout = Mirror tiled ||| tiled ||| smartBorders Full ||| Circle +mLayout = Mirror tiled ||| tiled ||| smartBorders Full ||| Circle ||| simplestFloat where -- default tiling algorithm partitions the screen into two panes --tiled = Tall nmaster delta ratio diff --git a/.zsh/aliases b/.zsh/aliases index 20eaef3..0208510 100644 --- a/.zsh/aliases +++ b/.zsh/aliases @@ -6,11 +6,12 @@ alias la="l -Fa" alias lla="ll -Fa" alias c="cd" alias pg="ps auxww|grep" +alias pd="pwd" cl() { cd $@ && ls } bellme() { echo "Done! (bellme)" ; while :; do echo -ne '\a' ; sleep 2 ; done } #old linux aliases -#alias s="TERM=xterm;ssh serenity.cat.pdx.edu" -alias s="TERM=xterm ssh hunner@destiny.cat.pdx.edu" +alias s="TERM=xterm;ssh serenity.cat.pdx.edu" +#alias s="TERM=xterm ssh hunner@destiny.cat.pdx.edu" #alias f="TERM=xterm ssh hunner@firefly.cat.pdx.edu" alias f="find . | grep" alias z="TERM=xterm ssh hunner@zabava.cat.pdx.edu" @@ -20,7 +21,6 @@ alias p="ping 8.8.8.8" alias pi="ping google.com" alias ph="ping pi.hole" alias pa="ping ads.google.com" -alias pd="ping 192.168.194.93" alias pipe=pip # typos alias chandra="TERM=xterm ssh hunner@chandra.cs.pdx.edu" export CS=cs.pdx.edu @@ -33,6 +33,7 @@ alias x="exit" alias v="vagrant" alias w="cd ~/Documents/work/git" alias cem="cd ~/Documents/work/git/cem" +alias forge="cd ~/Documents/work/git/forge" alias ssh-gpg="ssh -R ~/.gnupg/S.gpg-agent.extra:~/.gnupg/S-gpg-agent.extra -o 'StreamLocalBindUnlink=yes'" alias gpg-add="/usr/libexec/gpg-preset-passphrase" alias rsync="rsync -azPHe ssh" #-a equals -rlptgoD @@ -65,7 +66,7 @@ alias hide="SetFile -a V" alias show="SetFile -a v" alias whyfail="tmux copy-mode && tmux send-keys -X search-backward '--- FAIL'" alias m4b-tool='docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/mnt m4b-tool' -alias morserunner="docker-wine --sound=default --cache wine '.wine/drive_c/Program Files (x86)/Afreet/MorseRunner/MorseRunner.exe'" +alias morserunner="docker-wine --as-me --force-owner --sound=default --cache --volume=/home/hunner/Downloads/morserunner:/data --workdir=/data wine MorseRunner.exe" alias ry="vim -R +'set ft=yaml'" alias superscript="tr '+−=()0123456789AaÆᴂɐɑɒBbcɕDdðEeƎəɛɜɜfGgɡɣhHɦIiɪɨᵻɩjJʝɟKklLʟᶅɭMmɱNnɴɲɳŋOoɔᴖᴗɵȢPpɸrRɹɻʁsʂʃTtƫUuᴜᴝʉɥɯɰʊvVʋʌwWxyzʐʑʒꝯᴥβγδθφχнნʕⵡ' \ '⁺⁻⁼⁽⁾⁰¹²³⁴⁵⁶⁷⁸⁹ᴬᵃᴭᵆᵄᵅᶛᴮᵇᶜᶝᴰᵈᶞᴱᵉᴲᵊᵋᶟᵌᶠᴳᵍᶢˠʰᴴʱᴵⁱᶦᶤᶧᶥʲᴶᶨᶡᴷᵏˡᴸᶫᶪᶩᴹᵐᶬᴺⁿᶰᶮᶯᵑᴼᵒᵓᵔᵕᶱᴽᴾᵖᶲʳᴿʴʵʶˢᶳᶴᵀᵗᶵᵁᵘᶸᵙᶶᶣᵚᶭᶷᵛⱽᶹᶺʷᵂˣʸᶻᶼᶽᶾꝰᵜᵝᵞᵟᶿᵠᵡᵸჼˤⵯ';" @@ -224,7 +225,7 @@ alias vd=${VIM}diff alias vir=vr alias vis=vs alias gvim="gvim -font 'APL385 Unicode 8' -c 'set keymap=uniapl385'" -alias n=nvim +alias n=lvim export NVIM_TUI_ENABLE_TRUE_COLOR=1 @@ -260,7 +261,7 @@ alias gstp="git stash pop" alias gdw="git diff --color-words" alias gk="gitk --all&" alias gx="gitx --all" -alias grt="git restore --staged " +alias grs="git restore --staged " # Docker @@ -290,6 +291,16 @@ function dr() { } alias d-c="docker-compose" +# Terraform +alias tfh="echo 'tf -- terraform +tfw -- terraform workspace +tfp -- terraform plan +tfs -- terraform state'" +alias tf="terraform" +alias tfw="terraform workspace" +alias tfp="terraform plan" +alias tfs="terraform state" + # K8s alias kubectl="kubectl --context \${KUBE_CONTEXT:-\$(command kubectl config current-context)}" diff --git a/local/bin/battery.sh b/local/bin/battery.sh index a231cd9..59f0aaa 100755 --- a/local/bin/battery.sh +++ b/local/bin/battery.sh @@ -14,7 +14,7 @@ GH=10 # height of the gauge GBG='#333' # color of gauge background #X=1807 # x position #X="$(expr "$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+)x[0-9]+.*$/\1/')" - $W - 2)" # x position -PRIMARY="$(xrandr -q | grep primary)" # x position +PRIMARY="$(xrandr -q | grep primary | grep -v disconnected)" # x position if [ -z "${PRIMARY}" ]; then X="$(expr "$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+)x[0-9]+.*$/\1/')" - $W - 2)" # x position else