small pixel drawing of a pufferfish dotfiles

Moar DO confs
j3s j3s@c3f.net
Fri, 09 Jul 2021 11:39:59 -0500
commit

887f096693fc3ea040bd4382ae4ba9417930a349

parent

b06fc92528f72fe541aaea3a1694042575206b78

5 files changed, 70 insertions(+), 10 deletions(-)

jump to
M .config/nvim/init.vim.config/nvim/init.vim

@@ -8,7 +8,7 @@ lua << EOF

require'lspconfig'.gopls.setup{} EOF -" set keybinds for go LSP +" set keybinds for go LSP - warning: disgusting lua << EOF local nvim_lsp = require('lspconfig')

@@ -53,3 +53,21 @@ nvim_lsp[lsp].setup { on_attach = on_attach }

end EOF + +" tabstops for my langs +autocmd FileType sh setlocal et ts=4 sw=4 +autocmd FileType go setlocal noet ts=4 sw=4 +autocmd FileType python setlocal et ts=4 sw=4 +autocmd FileType ruby setlocal et ts=2 sw=2 +autocmd FileType text setlocal tw=80 +autocmd FileType html setlocal et ts=2 sw=2 +autocmd FileType yaml setlocal et ts=2 sw=2 +autocmd FileType mail setlocal noautoindent +augroup filetypedetect + autocmd BufRead,BufNewFile *mutt-* setfiletype mail +augroup filetypedetect +autocmd FileType markdown setlocal tw=80 et ts=2 sw=2 + +" bindings +let mapleader = "," +nmap <leader>m Go<esc>:put =strftime(\"%Y-%m-%d\")<cr>o----------------<cr><esc>
M .config/sway/config.config/sway/config

@@ -191,6 +191,8 @@ # use swaymsg -t get_tree to find class or app_id

for_window [class="Steam"] floating enable for_window [class="Mumble"] floating enable for_window [class="Dino"] floating enable + for_window [title="Firefox — Sharing Indicator"] floating enable + for_window [title="Firefox — Sharing Indicator"] kill # for_window [class="Dota 2"] floating enable, border none # # Scratchpad:
M .config/sway/zora.config/sway/zora

@@ -11,3 +11,6 @@ before-sleep 'swaylock -f -c 000000'

for_window [class="Firefox"] inhibit_idle fullscreen for_window [class="Chromium"] inhibit_idle fullscreen + +# Laptop outputs are managed automatically using kanshi +exec_always pkill kanshi; exec kanshi
A bin/chtf

@@ -0,0 +1,40 @@

+#!/bin/sh +# +# list installed tf versions + +# switch terraform versions + +# + download tf if not found + +tf_version="$1" +tf_install_dir="${HOME}/.local/share/chtf" +tf_link_name="${HOME}/bin/terraform" + +# make some os assumptions +if [ $(uname) == "Linux" ]; then + os="linux" +else + os="Darwin" +fi + +mkdir -p "$tf_install_dir" + +if [ -z "$tf_version" ]; then + # if no arguments, list versions of tf plus list symlink pointer. + printf "available:\n" + ls "$tf_install_dir" + printf "active:\n" + if [ -e "$tf_link_name" ]; then + readlink "$tf_link_name" | xargs basename + fi +else + if [ ! -f "${tf_install_dir}/${tf_version}" ]; then + # download tf version if not found + printf "terraform version not found. downloading...\n" + dl="https://releases.hashicorp.com/terraform/${tf_version}/terraform_${tf_version}_${os}_amd64.zip" + printf "downloading ${dl}\n" + curl -L --output /tmp/tf.zip "$dl" + unzip /tmp/tf.zip -d /tmp + mv /tmp/terraform "${tf_install_dir}/${tf_version}" + rm /tmp/tf.zip + fi + ln -sf "${tf_install_dir}/${tf_version}" "$tf_link_name" +fi
M bin/xdg-openbin/xdg-open

@@ -1,15 +1,12 @@

#!/bin/sh case "${1%%:*}" in - http|https) - exec chromium "$1" - ;; + http|https) + exec firefox "$1" + ;; *.pdf) exec zathura "$1" ;; - mailto) - exec aerc "$1" - ;; - *) - exec /usr/bin/xdg-open "$@" - ;; + *) + exec /usr/bin/xdg-open "$@" + ;; esac