Merge branch 'master' of git.jpatrick.io:james/dotfiles

This commit is contained in:
James Patrick 2022-05-24 18:42:47 +00:00
commit 5b8611d5d3
35 changed files with 209 additions and 226 deletions

View File

@ -1,8 +0,0 @@
;;; +company.el -*- lexical-binding: t; -*-
;; Make company a little faster to respond.
(after! company
(setq company-idle-delay 0.5
company-minimum-prefix-length 2)
(setq company-show-numbers t)
(add-hook 'evil-normal-state-entry-hook #'company-abort)) ;; make aborting less annoying.

View File

@ -2,13 +2,25 @@
(require 'org) (require 'org)
(custom-set-variables '(org-directory "~/org/")) (custom-set-variables '(org-directory "~/org/"))
(defvar +org-capture-work-todo-file "work/todo.org"
"location for my work todo list.
This is defined relative to the `org-directory' unless absolute.")
(defun +org-capture-work-todo-file ()
"Expand `+org-capture-work-todo-file' from `org-directory'.
If it is an absolute path return `+org-capture-work-todo-file' verbatim."
(expand-file-name +org-capture-work-todo-file org-directory))
(setq (setq
deft-directory org-directory deft-directory org-directory
org-download-image-dir (concat org-directory "resources") org-download-image-dir (concat org-directory "resources")
org-roam-directory org-directory) org-roam-directory org-directory)
(setq org-agenda-files (list (setq org-agenda-files (list
(concat org-directory "work/todo.org") (concat org-directory +org-capture-work-todo-file )
(concat org-directory "todo.org") (concat org-directory "todo.org")
) )
) )
@ -65,36 +77,28 @@
(0.5 . org-upcoming-deadline) (0.5 . org-upcoming-deadline)
(0.0 . org-upcoming-distant-deadline))) (0.0 . org-upcoming-distant-deadline)))
;; Use appear to make org syntax easier to not fuck up.
;(use-package! org-appear
; :hook (org-mode . org-appear-mode)
; :config
; (setq org-appear-autoemphasis t
; org-appear-autosubmarkers t
; org-appear-autolinks nil)
; ;; for proper first-time setup, `org-appear--set-elements'
; ;; needs to be run after other hooks have acted.
; (run-at-time nil nil #'org-appear--set-elements))
;; Added Org-mode ;; Added Org-mode
(add-hook 'org-mode-hook (lambda () (add-hook 'org-mode-hook (lambda ()
"Beautify Org Checkbox Symbol" "Beautify Org Checkbox Symbol"`
(push '("[ ]" . "") prettify-symbols-alist) (push '("[ ]" . "") prettify-symbols-alist)
(push '("[_]" . "") prettify-symbols-alist)
(push '("[X]" . "" ) prettify-symbols-alist) (push '("[X]" . "" ) prettify-symbols-alist)
(push '("[-]" . "" ) prettify-symbols-alist) (push '("[-]" . "" ) prettify-symbols-alist)
(prettify-symbols-mode))) (prettify-symbols-mode)))
;;; Org-Agenda Options
(use-package! org-super-agenda
:commands (org-super-agenda-mode))
(after! org-agenda
(org-super-agenda-mode))
(setq org-agenda-skip-scheduled-if-done t (setq org-agenda-skip-scheduled-if-done t
org-agenda-skip-deadline-if-done t org-agenda-skip-deadline-if-done t
org-agenda-include-deadlines t org-agenda-include-deadlines t
org-agenda-block-separator nil org-agenda-block-separator nil
org-agenda-tags-column 100 ;; from testing this seems to be a good value org-agenda-tags-column 100 ;; from testing this seems to be a good value
org-agenda-compact-blocks t) org-agenda-compact-blocks t)
(add-to-list 'org-capture-templates
'("w" "Work Todo" entry
(file+headline +org-capture-work-todo-file "Inbox")
"* [_] %?%i\n%a" :prepend t))
(setq org-roam-directory "~/org/roam")
(load! "org/+babel-diff")

View File

@ -3,6 +3,9 @@
;; Use "," as leader. ;; Use "," as leader.
(setq doom-localleader-key ",") (setq doom-localleader-key ",")
;; Speed up which key response
(setq which-key-idle-delay 0.1)
;; Firacode is broken with Emacs-plus on osx. Fallback to Hasklig ;; Firacode is broken with Emacs-plus on osx. Fallback to Hasklig
(setq doom-font (font-spec :family "Hasklig" :size 12) (setq doom-font (font-spec :family "Hasklig" :size 12)
doom-variable-pitch-font (font-spec :family "ETbembo" :size 16) doom-variable-pitch-font (font-spec :family "ETbembo" :size 16)
@ -19,8 +22,12 @@
;; Use an image splash ;; Use an image splash
(setq fancy-splash-image (concat doom-private-dir "doom.png")) (setq fancy-splash-image (concat doom-private-dir "doom.png"))
(setq ispell-dictionary "en")
(add-to-list 'auto-mode-alist '("/\\(tmp\\|private/var\\)/.*/tmp_redmine.greenfiling.com.*\\.txt" . markdown-mode))
(load! "+mail") (load! "+mail")
(load! "+org") (load! "+org")
(load! "+company")
(load! "+modeline") (load! "+modeline")
(load! "+window") (load! "+window")

View File

@ -87,8 +87,9 @@
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
(spell ; tasing you for misspelling mispelling (spell ; tasing you for misspelling mispelling
+hunspell +aspell
+everywhere) +everywhere
)
grammar ; tasing grammar mistake every you make grammar ; tasing grammar mistake every you make
:tools :tools
@ -139,14 +140,15 @@
;;fsharp ; ML stands for Microsoft's Language ;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3 ;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for ;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect (go +lsp) ; the hipster dialect
;;(haskell +dante) ; a language that's lazier than I am ;;(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on ;;idris ; a language you can depend on
(json ; At least it ain't XML (json ; At least it ain't XML
+lsp) +lsp)
;;(java +meghanada) ; the poster child for carpal tunnel syndrome (java +meghanada) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here)))))) (javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
(json +lsp)
;;julia ; a better, faster MATLAB ;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun ;;latex ; writing papers in Emacs has never been so fun
@ -156,7 +158,7 @@
;;lua ; one-based indices? one-based indices ;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c ;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!" nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel ;;ocaml ; an objective camel
(org ; organize your plain life in plain text (org ; organize your plain life in plain text
+dragndrop +dragndrop
@ -164,6 +166,7 @@
+pandoc +pandoc
+pomodoro +pomodoro
+pretty ;weirdly expensive +pretty ;weirdly expensive
+roam2
) )
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more

View File

@ -6,12 +6,25 @@ EMACSD := ~/.emacs.d
DOOMD := ~/.doom.d DOOMD := ~/.doom.d
DOOM_URL := https://github.com/hlissner/doom-emacs DOOM_URL := https://github.com/hlissner/doom-emacs
include ../lib/shared.mk include ../lib/shared.mk
install: | init update up: setup
if [ -e $(EMACSD)/bin/doom ] ; then
~/.emacs.d/bin/doom --yes sync \
; $(report) "doom sync"
~/.emacs.d/bin/doom --yes purge \
; $(report) "doom purge"
else
$(report) debug "doom not setup, so not updating."
fi
init: down:
$(report) header "Removing Emacs configuration"
rm -rf $(EMACSD) ; $(report) "deleted $(EMACSD)"
$(rm_link) $(DOOMD)
setup:
if (( ! $$+commands[emacs] )) ; then if (( ! $$+commands[emacs] )) ; then
$(report) debug "Emacs not installed. Skipping install." $(report) debug "Emacs not installed. Skipping install."
elif [[ -v $$SSH_TTY ]] ; then elif [[ -v $$SSH_TTY ]] ; then
@ -33,17 +46,3 @@ doom_init:
$(report) debug "emacsd already exists. Skipping" $(report) debug "emacsd already exists. Skipping"
fi fi
update:
if [ -e $(EMACSD)/bin/doom ] ; then
~/.emacs.d/bin/doom --yes sync \
; $(report) "doom sync"
~/.emacs.d/bin/doom --yes purge \
; $(report) "doom purge"
else
$(report) debug "doom not setup, so not updating."
fi
remove:
$(report) header "Removing Emacs configuration"
rm -rf $(EMACSD) ; $(report) "deleted $(EMACSD)"
$(rm_link) $(DOOMD)

9
emacs/org/+babel-diff.el Normal file
View File

@ -0,0 +1,9 @@
(defun org-babel-execute:diff (body params)
"Applies diff patches. Use with care.
See https://emacs.stackexchange.com/questions/63517/org-mode-evaluate-diff-code-block"
(with-temp-buffer
(insert body "\n")
(shell-command-on-region (point-min) (point-max) "patch --strip=1" "*patch*")
(prog1
(with-current-buffer "*patch*" (buffer-string))
(kill-buffer "*patch*"))))

View File

@ -4,7 +4,6 @@
(package! vimrc-mode) (package! vimrc-mode)
(package! graphviz-dot-mode :pin "3642a0a5f4...") (package! graphviz-dot-mode :pin "3642a0a5f4...")
(package! systemd :pin "b6ae63a236...") (package! systemd :pin "b6ae63a236...")
(package! org-super-agenda :pin "f5e80e4d0d...")
(package! postcss-sorting) (package! postcss-sorting)
;;; Examples: ;;; Examples:
;; (package! pretty-mode) ;; (package! pretty-mode)

View File

@ -1,9 +1,8 @@
[user] [user]
email = james@jpatrick.io email = subscriptions@jpatrick.io
name = James Patrick name = James Patrick
[core] [core]
pager = delta
editor = vim editor = vim
[interactive] [interactive]
@ -23,3 +22,8 @@
user = jamesepatrick user = jamesepatrick
[alias] [alias]
root = rev-parse --show-toplevel root = rev-parse --show-toplevel
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true

View File

@ -5,14 +5,12 @@ TARGET := ~/.gitconfig
include ../lib/shared.mk include ../lib/shared.mk
install: | init update
init: init:
$(report) header "Setting up gitconfig" $(report) header "Setting up gitconfig"
$(mk_link) $(SOURCE) $(TARGET) $(mk_link) $(SOURCE) $(TARGET)
update: up: init
remove: down:
$(report) header "Removing gitconfig" $(report) header "Removing gitconfig"
$(rm_link) $(TARGET) $(rm_link) $(TARGET)

View File

@ -5,9 +5,7 @@ include ../lib/shared.mk
CONFIG_DIR := $(XDG_DIR)/jrnl CONFIG_DIR := $(XDG_DIR)/jrnl
install: | init update up:
init:
if (( $$+commands[jrnl] )) ; then if (( $$+commands[jrnl] )) ; then
$(report) header "Setting up jrnl" $(report) header "Setting up jrnl"
mkdir $(CONFIG_DIR) mkdir $(CONFIG_DIR)
@ -16,5 +14,5 @@ init:
$(report) debug "jrnl not installed. Skipping." $(report) debug "jrnl not installed. Skipping."
fi fi
remove: down:
rm -rf $(CONFIG_DIR) rm -rf $(CONFIG_DIR)

View File

@ -1,13 +1,14 @@
# -*- mode: makefile-gmake; -*- # -*- mode: makefile-gmake; -*-
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
requires := kitty
include ../lib/shared.mk include ../lib/shared.mk
CONFIG_DIR := $(XDG_DIR)/kitty CONFIG_DIR := $(XDG_DIR)/kitty
install: | init update install: | init update
init: up:
if (( $$+commands[kitty] )) ; then if (( $$+commands[kitty] )) ; then
$(report) header "Setting up kitty" $(report) header "Setting up kitty"
$(mk_link) $(SRC) $(CONFIG_DIR) $(mk_link) $(SRC) $(CONFIG_DIR)
@ -15,6 +16,6 @@ init:
$(report) debug "kitty not installed. Skipping." $(report) debug "kitty not installed. Skipping."
fi fi
remove: down:
$(report) header "removing up kitty" $(report) header "removing up kitty"
rm -r $(CONFIG_DIR) ; $(report) "removed dir" rm -r $(CONFIG_DIR) ; $(report) "removed dir"

View File

@ -5,8 +5,6 @@ GIT_HOOK_TARGET = $(abspath $(SRC_DIR)/..)/.git/hooks/post-merge
include ../lib/shared.mk include ../lib/shared.mk
install: | init update
init: init:
$(report) header "Setting up this stuff" $(report) header "Setting up this stuff"
$(report) pass "githook symlinked `ln -svf $(GIT_HOOK_SRC) $(GIT_HOOK_TARGET)`" $(report) pass "githook symlinked `ln -svf $(GIT_HOOK_SRC) $(GIT_HOOK_TARGET)`"
@ -21,8 +19,8 @@ fix_http_repo:
$(report) debug "git repo deosn't start with http. So no need to reset remote." $(report) debug "git repo deosn't start with http. So no need to reset remote."
fi fi
update: up: init
remove: down:
$(report) header "Removing githook" $(report) header "Removing githook"
$(rm_link) $(GIT_HOOK_TARGET) $(rm_link) $(GIT_HOOK_TARGET)

View File

@ -1,9 +1,3 @@
#!/bin/zsh #!/bin/zsh
# -*- zsh -*- # -*- zsh -*-
( ($+commands[gmake])) && gmake up || make update
local_hook="$HOME"/.git_template.local/hooks/post-merge
[ -f "$local_hook" ] && . "$local_hook"
.git/hooks/ctags >/dev/null 2>&1 &
(($+commands[gmake])) && gmake update || make update

View File

@ -19,7 +19,7 @@ mk_link := $(LIB_DIR)/helper/mk_link
rm_link := $(LIB_DIR)/helper/rm_link rm_link := $(LIB_DIR)/helper/rm_link
report := LAST_RETURN=$$? $(LIB_DIR)/helper/report report := LAST_RETURN=$$? $(LIB_DIR)/helper/report
# Shortcut for the XDG dir if it exist. default to ~/.confg # Shortcut for the XDG dir if it exist. default to ~/.config
XDG_DIR := $${XDG_CONFIG_HOME:-~/.config} XDG_DIR := $${XDG_CONFIG_HOME:-~/.config}

View File

@ -6,23 +6,13 @@ include lib/shared.mk
define recursive_make define recursive_make
for i in */makefile; do for i in */makefile; do
echo "`dirname $$i` " echo "`dirname $$i` "
$(MAKE) -C $(SRC_DIR)/`dirname $$i` $1 $(MAKE) --keep-going -C $(SRC_DIR)/`dirname $$i` $1
echo "" echo ""
done done
endef endef
install: up:
$(info Initalizing) $(call recursive_make,up)
$(call recursive_make,install)
init: down:
$(info Initalizing) $(call recursive_make,down)
$(call recursive_make,init)
update:
$(info Updating)
$(call recursive_make,update)
remove:
$(info Removing)
$(call recursive_make,remove)

View File

@ -4,8 +4,6 @@ SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk include ../lib/shared.mk
TARGET := $(XDG_DIR)/mako TARGET := $(XDG_DIR)/mako
install: | init update
init: init:
if (( $$+commands[mako] )) ; then if (( $$+commands[mako] )) ; then
$(report) header "Setting up mako" $(report) header "Setting up mako"
@ -14,7 +12,7 @@ init:
$(report) warn "mako not installed. Skipping." $(report) warn "mako not installed. Skipping."
fi fi
update: up: init
if (( $$+commands[makoctl] )) ; then if (( $$+commands[makoctl] )) ; then
$(report) header "Updating mako" $(report) header "Updating mako"
if [[ -n `pgrep mako` ]] ; then if [[ -n `pgrep mako` ]] ; then
@ -25,6 +23,6 @@ update:
fi fi
remove: down:
$(report) header "Removing mako" $(report) header "Removing mako"
$(rm_link) $(TARGET) $(rm_link) $(TARGET)

View File

@ -6,10 +6,7 @@ TARGET := $(XDG_DIR)/mbsync
RC_TARGET := ~/.mbsyncrc RC_TARGET := ~/.mbsyncrc
TRANSIENT_DIR := $(SRC)/transient TRANSIENT_DIR := $(SRC)/transient
up:
install: | init update
init:
if (( $$+commands[mbsync] )) ; then if (( $$+commands[mbsync] )) ; then
$(report) header "Setting up mbsync" $(report) header "Setting up mbsync"
$(mk_link) $(SRC) $(TARGET) $(mk_link) $(SRC) $(TARGET)
@ -34,11 +31,7 @@ update_cert:
&& $(report) pass "Cert from proton bridge downloaded." \ && $(report) pass "Cert from proton bridge downloaded." \
|| $(report) error "Error while fetching cert. Is bridge running?" || $(report) error "Error while fetching cert. Is bridge running?"
down:
update:
remove:
$(report) header "Removing mbsync" $(report) header "Removing mbsync"
$(rm_link) $(TARGET) $(rm_link) $(TARGET)
rm -rf $(TRANSIENT_DIR) ; $(report) "Deleting $(TRANSIENT_DIR)" rm -rf $(TRANSIENT_DIR) ; $(report) "Deleting $(TRANSIENT_DIR)"

View File

@ -4,9 +4,7 @@ SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk include ../lib/shared.mk
TARGET := ~/.password-store TARGET := ~/.password-store
install: | init update up:
init:
if (( $$+commands[pass] )) ; then if (( $$+commands[pass] )) ; then
$(report) header "Setting up pass" $(report) header "Setting up pass"
[ -e $(TARGET) ] \ [ -e $(TARGET) ] \
@ -16,9 +14,6 @@ init:
$(report) debug " pass not installed. Skipping." $(report) debug " pass not installed. Skipping."
fi fi
update: down:
remove:
$(report) header "Removing pass" $(report) header "Removing pass"
$(rm_link) $(TARGET) $(rm_link) $(TARGET)

View File

@ -7,9 +7,7 @@ TARGET := $(XDG_DIR)/rofi
DESKTOP_SRC := $(SRC)/desktop DESKTOP_SRC := $(SRC)/desktop
DESKTOP_TARGET := ~/.local/share/applications DESKTOP_TARGET := ~/.local/share/applications
install: | init update up:
init:
if (( $$+commands[rofi] )) ; then if (( $$+commands[rofi] )) ; then
$(report) header "Setting up rofi" $(report) header "Setting up rofi"
$(mk_link) $(SRC) $(TARGET) $(mk_link) $(SRC) $(TARGET)
@ -18,9 +16,7 @@ init:
$(report) debug "rofi not installed. Skipping." $(report) debug "rofi not installed. Skipping."
fi fi
update: down:
remove:
$(report) header "Removing rofi" $(report) header "Removing rofi"
$(rm_link) $(TARGET) $(rm_link) $(TARGET)
$(MAKE) -C $(SRC) desktop_remove $(MAKE) -C $(SRC) desktop_remove

View File

@ -12,3 +12,5 @@ Host *.greenfiling.com
ForwardAgent yes ForwardAgent yes
Host * Host *
UseRoaming no UseRoaming no
Include config.d/*

11
ssh/config.d/work.config Normal file
View File

@ -0,0 +1,11 @@
Host journal_tunnel
HostName dev.greenfiling.com
LocalForward 127.0.0.1:1443 efm-lasc-stage-pub.journaltech.com:443
Host placer_tunnel
HostName dev.greenfiling.com
LocalForward 127.0.0.1:1444 efm-placer-court-aux.ecourt.com:443
Host riverside_tunnel
HostName dev.greenfiling.com
LocalForward 127.0.0.1:1445 riv-impl-efm-public.ecourt.com:443

View File

@ -7,15 +7,7 @@ GIT_KEY := ~/.ssh/git.jpatrick.io
include ../lib/shared.mk include ../lib/shared.mk
install: | init update up: init
init:
$(report) header "Setting up ssh"
$(mk_link) $(CONFIG_SRC) $(CONFIG_TRGT)
$(mk_link) $(SRC_DIR)/public_keys ~/.ssh/public_keys
$(MAKE) -C $(SRC_DIR) init_git_key
update:
mkdir -p public_keys/`hostname` mkdir -p public_keys/`hostname`
cd ~/.ssh cd ~/.ssh
$(report) header "Copying public keys" $(report) header "Copying public keys"
@ -24,11 +16,18 @@ update:
$(report) pass "Copied $$i" $(report) pass "Copied $$i"
done done
remove: down:
$(report) header "Removing ssh sym-links" $(report) header "Removing ssh sym-links"
$(rm_link) $(CONFIG_TRGT) $(rm_link) $(CONFIG_TRGT)
$(report) warn "NOTE: All keys still remain." $(report) warn "NOTE: All keys still remain."
init:
$(report) header "Setting up ssh"
$(mk_link) $(CONFIG_SRC) $(CONFIG_TRGT)
$(mk_link) $(SRC_DIR)/public_keys ~/.ssh/public_keys
$(mk_link) $(SRC_DIR)/config.d ~/.ssh/config.d
$(MAKE) -C $(SRC_DIR) init_git_key
init_git_key: init_git_key:
if [[ -e $(GIT_KEY) ]] ; then if [[ -e $(GIT_KEY) ]] ; then
$(report) debug "$(GIT_KEY) already installed." $(report) debug "$(GIT_KEY) already installed."

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHbxQtU3f3ASNOSz9uSygKqm8P9DNJ5ITlBKrLE9ilnf wok: Fri Aug 21 14:06:42 EDT 2020

View File

@ -7,7 +7,27 @@ TARGET := $(XDG_DIR)/sway
PATH_ICON_BOSTON := "$$HOME/.icons/Boston" PATH_ICON_BOSTON := "$$HOME/.icons/Boston"
PATH_GTK_ANT_NEBULA := "$$HOME/.theme/Ant-Nebula" PATH_GTK_ANT_NEBULA := "$$HOME/.theme/Ant-Nebula"
install: | init update up: init
if (( ! $$+commands[swaymsg] )) ; then
$(report) debug "swaymsg not installed. Skipping."
else
$(report) header "Reloading sway"
swaymsg reload ; $(report) "sway reload"
$(MAKE) -C $(SRC) update_icons
$(MAKE) -C $(SRC) update_theme
fi
down:
$(report) header "Removing sway"
$(rm_link) $(TARGET)
if [ -e $(PATH_ICON_BOSTON) ] ; then
rm -rf $(PATH_ICON_BOSTON) \
; $(report) "Removed $(PATH_ICON_BOSTON)"
fi
if [ -e $(PATH_GTK_ANT_NEBULA) ] ; then
rm -rf $(PATH_GTK_ANT_NEBULA) \
; $(report) "Removed $(PATH_GTK_ANT_NEBULA)"
fi
init: init:
if (( ! $$+commands[sway] )) ; then if (( ! $$+commands[sway] )) ; then
@ -42,16 +62,6 @@ init_theme:
$(report) debug "gsettings not installed. Skipping" $(report) debug "gsettings not installed. Skipping"
fi fi
update:
if (( ! $$+commands[swaymsg] )) ; then
$(report) debug "swaymsg not installed. Skipping."
else
$(report) header "Reloading sway"
swaymsg reload ; $(report) "sway reload"
$(MAKE) -C $(SRC) update_icons
$(MAKE) -C $(SRC) update_theme
fi
update_icons: update_icons:
if [ ! -e $(PATH_ICON_BOSTON) ] ; then if [ ! -e $(PATH_ICON_BOSTON) ] ; then
cd $(PATH_ICON_BOSTON) cd $(PATH_ICON_BOSTON)
@ -64,14 +74,3 @@ update_theme:
git pull ; $(report) "Updated Ant Nebula GTK." git pull ; $(report) "Updated Ant Nebula GTK."
fi fi
remove:
$(report) header "Removing sway"
$(rm_link) $(TARGET)
if [ -e $(PATH_ICON_BOSTON) ] ; then
rm -rf $(PATH_ICON_BOSTON) \
; $(report) "Removed $(PATH_ICON_BOSTON)"
fi
if [ -e $(PATH_GTK_ANT_NEBULA) ] ; then
rm -rf $(PATH_GTK_ANT_NEBULA) \
; $(report) "Removed $(PATH_GTK_ANT_NEBULA)"
fi

View File

@ -6,9 +6,7 @@ TARGET := ~/.tmux.conf
include ../lib/shared.mk include ../lib/shared.mk
install: | init update up:
init:
if (( ! $$+commands[tmux] )) ; then if (( ! $$+commands[tmux] )) ; then
$(report) header "tmux not installed" $(report) header "tmux not installed"
else else
@ -16,8 +14,6 @@ init:
$(mk_link) $(SOURCE) $(TARGET) $(mk_link) $(SOURCE) $(TARGET)
fi fi
update: down:
remove:
$(report) header "Removing tmux config" $(report) header "Removing tmux config"
$(rm_link) $(TARGET) $(rm_link) $(TARGET)

View File

@ -5,10 +5,8 @@ include ../lib/shared.mk
RC_TARGET := $(XDG_DIR)/tridactyl RC_TARGET := $(XDG_DIR)/tridactyl
SCRIPTS_TARGET := ~/.local/share/tridactyl/scripts SCRIPTS_TARGET := ~/.local/share/tridactyl/scripts
install: | init update up:
if [[ $$OSTYPE = darwin* ]] ; then
init:
if [[ $OSTYPE = darwin* ]] ; then
$(MAKE) -C $(SRC_DIR) setup $(MAKE) -C $(SRC_DIR) setup
elif (( $$+commands[firefox] )) ; then elif (( $$+commands[firefox] )) ; then
$(MAKE) -C $(SRC_DIR) setup $(MAKE) -C $(SRC_DIR) setup
@ -16,14 +14,13 @@ init:
$(report) debug "This doesn't seem to be an env for Tridactyl. Skipping." $(report) debug "This doesn't seem to be an env for Tridactyl. Skipping."
fi fi
down:
$(report) header "Removing Tridaycl"
$(rm_link) $(RC_TARGET)
$(rm_link) $(SCRIPTS_TARGET)
setup: setup:
$(report) header "Setting up Tridaycl" $(report) header "Setting up Tridaycl"
$(mk_link) $(SRC_DIR) $(RC_TARGET) $(mk_link) $(SRC_DIR) $(RC_TARGET)
$(mk_link) $(SRC_DIR)/scripts $(SCRIPTS_TARGET) $(mk_link) $(SRC_DIR)/scripts $(SCRIPTS_TARGET)
update:
remove:
$(report) header "Removing Tridaycl"
$(rm_link) $(RC_TARGET)
$(rm_link) $(SCRIPTS_TARGET)

View File

@ -52,6 +52,7 @@ colorscheme onedark
" Quick marks " Quick marks
quickmark r https://redmine.greenfiling.com/projects/general/issues?query_id=67 quickmark r https://redmine.greenfiling.com/projects/general/issues?query_id=67
quickmark c https://greenfiling.atlassian.net/wiki/home
quickmark G https://github.com/ quickmark G https://github.com/
quickmark g https://git.jpatrick.io/ quickmark g https://git.jpatrick.io/
quickmark l https://lobste.rs/ quickmark l https://lobste.rs/

2
vim/ftplugin/sh.vim Normal file
View File

@ -0,0 +1,2 @@
let b:ale_fixers = ['shfmt']
let b:ale_fix_on_save = 0

2
vim/ftplugin/sql.vim Normal file
View File

@ -0,0 +1,2 @@
let b:ale_fixers = ['pgformatter']
let b:ale_fix_on_save = 0

View File

@ -5,23 +5,7 @@ PLUG_PATH := $(SRC_DIR)/autoload/plug.vim
include ../lib/shared.mk include ../lib/shared.mk
install: | init update up: init
init:
if (( $$+commands[vim] )) ; then
$(report) header "Setting up vim"
mkdir -p $(TARGET_DIR)
$(mk_link) $(SRC_DIR)/vimrc ~/.vimrc
$(mk_link) $(SRC_DIR)/vimrc.d $(TARGET_DIR)/vimrc.d
$(mk_link) $(SRC_DIR)/spell $(TARGET_DIR)/spell
( mkdir -p $(TARGET_DIR)/backup \
&& chmod 700 $(TARGET_DIR)/backup ) \
; $(report) "setting up backup dir"
else
$(report) warn "cannot find vim?"
fi
update:
if (( $$+commands[vim] )) ; then if (( $$+commands[vim] )) ; then
$(report) header "Upgrading vim" $(report) header "Upgrading vim"
curl -fsLo $(PLUG_PATH) $(PLUG_URL) \ curl -fsLo $(PLUG_PATH) $(PLUG_URL) \
@ -33,8 +17,23 @@ update:
$(report) warn "cannot find vim?" $(report) warn "cannot find vim?"
fi fi
down:
remove:
$(report) header "Removing vim config" $(report) header "Removing vim config"
$(rm_link) ~/.vimrc $(rm_link) ~/.vimrc
$(rm_link) $(TARGET_DIR) $(rm_link) $(TARGET_DIR)
init:
if (( $$+commands[vim] )) ; then
$(report) header "Setting up vim"
mkdir -p $(TARGET_DIR)
$(mk_link) $(SRC_DIR)/vimrc ~/.vimrc
$(mk_link) $(SRC_DIR)/vimrc.d $(TARGET_DIR)/vimrc.d
$(mk_link) $(SRC_DIR)/spell $(TARGET_DIR)/spell
$(mk_link) $(SRC_DIR)/ftplugin $(TARGET_DIR)/ftplugin
( mkdir -p $(TARGET_DIR)/backup \
&& chmod 700 $(TARGET_DIR)/backup ) \
; $(report) "setting up backup dir"
else
$(report) warn "cannot find vim?"
fi

View File

@ -4,7 +4,17 @@ SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk include ../lib/shared.mk
TARGET := $(XDG_DIR)/waybar TARGET := $(XDG_DIR)/waybar
install: | init update up: init
if (( $$+commands[swaymsg] )) ; then
$(report) header "Reloading waybar"
swaymsg reload ; $(report) "sway reload"
else
$(report) debug "swaymsg not installed. Skipping."
fi
down:
$(report) header "Removing waybar"
$(rm_link) $(TARGET)
init: init:
if (( $$+commands[waybar] )) ; then if (( $$+commands[waybar] )) ; then
@ -13,15 +23,3 @@ init:
else else
$(report) debug "waybar not installed. Skipping." $(report) debug "waybar not installed. Skipping."
fi fi
update:
if (( $$+commands[swaymsg] )) ; then
$(report) header "Reloading waybar"
swaymsg reload ; $(report) "sway reload"
else
$(report) debug "swaymsg not installed. Skipping."
fi
remove:
$(report) header "Removing waybar"
$(rm_link) $(TARGET)

View File

@ -1,9 +1,9 @@
export GOPATH="${HOME}/.go" export GOPATH="${HOME}/.go"
export PSQLAPP="/Applications/Postgres.app/Contents/Versions/latest/bin" export PSQLAPP="/Applications/Postgres.app/Contents/Versions/latest/bin"
export JAVA_HOME=$(/usr/libexec/java_home -v 14) export JAVA_HOME=$(/usr/libexec/java_home -v 11)
path=( path=(
$GOPATH $GOPATH/bin
$PSQLAPP $PSQLAPP
$JAVA_HOME/bin $JAVA_HOME/bin
$path) $path)

View File

@ -3,7 +3,7 @@ export GOPATH="$HOME/src/go"
path=( path=(
$GOPATH $GOPATH/bin
$GOLANG_PATH $GOLANG_PATH
$path) $path)
# vim: syn=zsh # vim: syn=zsh

View File

@ -5,7 +5,27 @@ include ../lib/shared.mk
ZSH_DIR := ~/.zsh ZSH_DIR := ~/.zsh
ZPLUG_DIR := ~/.zplug ZPLUG_DIR := ~/.zplug
install: | init update up: init
if [ ! -d $(ZPLUG_DIR) ] ; then
$(report) error "$(ZPLUG_DIR) doesn't exist - run init first."
return
fi
$(report) header "Updating zplug"
source $(ZPLUG_DIR)/init.zsh
source $(ZSH_DIR)/zplug
export zplugs
zplug install
zplug update ; $(report) "zplug upate"
zplug clean ; $(report) "zplug cleaned"
down:
rm -rf $(ZPLUG_DIR) ; $(report) "deleting zplug dir"
$(rm_link) ~/.zprofile
$(rm_link) ~/.zlogin
$(rm_link) ~/.zshrc
$(rm_link) ~/.zsh
$(rm_link) ~/.zshenv
$(rm_link) ~/.zlogout
init: init:
$(info => Setting up zsh) $(info => Setting up zsh)
@ -28,25 +48,3 @@ init_zplug:
git clone https://github.com/zplug/zplug $(ZPLUG_DIR) \ git clone https://github.com/zplug/zplug $(ZPLUG_DIR) \
; $(report) "zplug installed" ; $(report) "zplug installed"
update:
if [ ! -d $(ZPLUG_DIR) ] ; then
$(report) error "$(ZPLUG_DIR) doesn't exist - run init first."
return
fi
$(report) header "Updating zplug"
source $(ZPLUG_DIR)/init.zsh
source $(ZSH_DIR)/zplug
export zplugs
zplug install
zplug update ; $(report) "zplug upate"
zplug clean ; $(report) "zplug cleaned"
remove:
rm -rf $(ZPLUG_DIR) ; $(report) "deleting zplug dir"
$(rm_link) ~/.zprofile
$(rm_link) ~/.zlogin
$(rm_link) ~/.zshrc
$(rm_link) ~/.zsh
$(rm_link) ~/.zshenv
$(rm_link) ~/.zlogout

View File

@ -15,7 +15,7 @@ alias docker="sudo docker"
alias dc="sudo docker-compose" alias dc="sudo docker-compose"
# Goes to a temp folder. This will be deleted on restart. # Goes to a temp folder. This will be deleted on restart.
alias tmp="cd $(mktemp -d)" alias _="cd `mktemp -d` ; "
alias :q="exit" alias :q="exit"