From bae8dea461ddbceb4f345d2f230460e7234af76d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 2 Jun 2017 20:45:22 +1200 Subject: Move existing .m4 to .m4.mi5 Along with accompanying Makefile rules and .gitignorances --- .gitignore | 3 ++ Makefile | 8 +++- git/gitconfig.m4 | 64 ------------------------- git/gitconfig.m4.mi5 | 64 +++++++++++++++++++++++++ gnupg/gpg.conf.m4 | 52 -------------------- gnupg/gpg.conf.m4.mi5 | 52 ++++++++++++++++++++ tmux/tmux.conf.m4 | 130 -------------------------------------------------- tmux/tmux.conf.m4.mi5 | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 256 insertions(+), 247 deletions(-) delete mode 100644 git/gitconfig.m4 create mode 100644 git/gitconfig.m4.mi5 delete mode 100644 gnupg/gpg.conf.m4 create mode 100644 gnupg/gpg.conf.m4.mi5 delete mode 100644 tmux/tmux.conf.m4 create mode 100644 tmux/tmux.conf.m4.mi5 diff --git a/.gitignore b/.gitignore index 68ac0a0a..873b60a1 100644 --- a/.gitignore +++ b/.gitignore @@ -137,7 +137,10 @@ games/strik games/xyzzy games/zs git/gitconfig +git/gitconfig.m4 gnupg/gpg.conf +gnupg/gpg.conf.m4 man/man7/dotfiles.7df tmux/tmux.conf +tmux/tmux.conf.m4 urxvt/ext/select diff --git a/Makefile b/Makefile index a562b0b1..11bcf6f0 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ lint-xinit .SUFFIXES: -.SUFFIXES: .awk .bash .pl .sed .sh +.SUFFIXES: .awk .bash .mi5 .pl .sed .sh NAME = 'Tom Ryder' EMAIL = tom@sanctum.geek.nz @@ -218,9 +218,12 @@ clean distclean: $(BINS) \ $(GAMES) \ git/gitconfig \ + git/gitconfig.m4 \ gnupg/gpg.conf \ + gnupg/gpg.conf.m4 \ man/man8/dotfiles.7df \ tmux/tmux.conf \ + tmux/tmux.conf.m4 \ urxvt/ext/select git/gitconfig: git/gitconfig.m4 @@ -270,6 +273,9 @@ tmux/tmux.conf: tmux/tmux.conf.m4 sh bin/shb.sh sh < $< > $@ chmod +x ./$@ +.mi5: + awk -f bin/mi5.awk < $< > $@ + install: install-bin \ install-curl \ install-ex \ diff --git a/git/gitconfig.m4 b/git/gitconfig.m4 deleted file mode 100644 index f533f02f..00000000 --- a/git/gitconfig.m4 +++ /dev/null @@ -1,64 +0,0 @@ -[advice] - statusHints = false - detachedHead = false - implicitIdentity = false - pushUpdateRejected = false - -[alias] - amend = commit --amend - ls = log --oneline - others = ls-files --others --exclude-standard - fuckit = "!git clean -dfx ; git reset --hard" - -[color] - ui = true - -[commit] - status = false - -[core] - compression = 9 - -[diff] - algorithm = patience - tool = vimdiff - -[difftool] - prompt = false - -[fetch] - output = compact - prune = true - -[grep] - extendRegexp = true - lineNumber = true - -[log] - date = local - decorate = short - -[merge] - ff = false - -[pager] - diff = cat - -[pull] - ff = only - -[push] - default = current - -[sendemail] - confirm = compose - smtpServer = DF_SENDMAIL - -[status] - short = true - showUntrackedFiles = all - -[user] - name = DF_NAME - email = DF_EMAIL - signingKey = DF_KEY diff --git a/git/gitconfig.m4.mi5 b/git/gitconfig.m4.mi5 new file mode 100644 index 00000000..bce64d6c --- /dev/null +++ b/git/gitconfig.m4.mi5 @@ -0,0 +1,64 @@ +[advice] + statusHints = false + detachedHead = false + implicitIdentity = false + pushUpdateRejected = false + +[alias] + amend = commit --amend + ls = log --oneline + others = ls-files --others --exclude-standard + fuckit = "!git clean -dfx ; git reset --hard" + +[color] + ui = true + +[commit] + status = false + +[core] + compression = 9 + +[diff] + algorithm = patience + tool = vimdiff + +[difftool] + prompt = false + +[fetch] + output = compact + prune = true + +[grep] + extendRegexp = true + lineNumber = true + +[log] + date = local + decorate = short + +[merge] + ff = false + +[pager] + diff = cat + +[pull] + ff = only + +[push] + default = current + +[sendemail] + confirm = compose + smtpServer = <% DF_SENDMAIL %> + +[status] + short = true + showUntrackedFiles = all + +[user] + name = <% DF_NAME %> + email = <% DF_EMAIL %> + signingKey = <% DF_KEY %> diff --git a/gnupg/gpg.conf.m4 b/gnupg/gpg.conf.m4 deleted file mode 100644 index 29534991..00000000 --- a/gnupg/gpg.conf.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# Retrieve certs automatically if possible -auto-key-locate cert pka - -# Prevent boilerplate about needing key decryption, which is handled by the -# agent; the gpg function in my Bash scripts overrides this for certain -# commands where it interferes -batch - -# Use SHA512 as the hash when making key signatures -cert-digest-algo SHA512 - -# Specify the hash algorithms to be used for new keys as available -default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed - -# In the absence of any other recipient, encrypt messages for myself -default-recipient-self - -# Show complete dates and use proper column separation for --with-colon listing mode -fixed-list-mode - -# Use 16-character key IDs as the default 8-character key IDs can be forged -keyid-format 0xlong - -# Use a pool of servers which support HKPS (encrypted key retrieval) -keyserver DF_KEYSERVER - -# Retrieve keys automatically; check the keyserver port cert; use whichever -# server is proffered from the pool -keyserver-options auto-key-retrieve check-cert no-honor-keyserver-url ca-certfile=DF_HOME/.gnupg/sks-keyservers.net/sks-keyservers.netCA.pem - -# Include trust/validity for UIDs in listings -list-options show-uid-validity - -# Suppress the copyright message -no-greeting - -# Use SHA512 as my message digest, overriding GnuPG's efforts to use the lowest -# common denominator in hashing algorithms -personal-digest-preferences SHA512 - -# Suppress a lot of output; sometimes I add --verbose to undo this -quiet - -# Use the GPG agent for key management and decryption -use-agent - -# Include trust/validity for UIDs when verifying signatures -verify-options pka-lookups show-uid-validity - -# Assume "yes" is the answer to most questions, that is, don't keep asking me -# to confirm something I've asked to be done -yes diff --git a/gnupg/gpg.conf.m4.mi5 b/gnupg/gpg.conf.m4.mi5 new file mode 100644 index 00000000..d8f14c09 --- /dev/null +++ b/gnupg/gpg.conf.m4.mi5 @@ -0,0 +1,52 @@ +# Retrieve certs automatically if possible +auto-key-locate cert pka + +# Prevent boilerplate about needing key decryption, which is handled by the +# agent; the gpg function in my Bash scripts overrides this for certain +# commands where it interferes +batch + +# Use SHA512 as the hash when making key signatures +cert-digest-algo SHA512 + +# Specify the hash algorithms to be used for new keys as available +default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed + +# In the absence of any other recipient, encrypt messages for myself +default-recipient-self + +# Show complete dates and use proper column separation for --with-colon listing mode +fixed-list-mode + +# Use 16-character key IDs as the default 8-character key IDs can be forged +keyid-format 0xlong + +# Use a pool of servers which support HKPS (encrypted key retrieval) +keyserver DF_KEYSERVER + +# Retrieve keys automatically; check the keyserver port cert; use whichever +# server is proffered from the pool +keyserver-options auto-key-retrieve check-cert no-honor-keyserver-url ca-certfile=<% DF_HOME %>/.gnupg/sks-keyservers.net/sks-keyservers.netCA.pem + +# Include trust/validity for UIDs in listings +list-options show-uid-validity + +# Suppress the copyright message +no-greeting + +# Use SHA512 as my message digest, overriding GnuPG's efforts to use the lowest +# common denominator in hashing algorithms +personal-digest-preferences SHA512 + +# Suppress a lot of output; sometimes I add --verbose to undo this +quiet + +# Use the GPG agent for key management and decryption +use-agent + +# Include trust/validity for UIDs when verifying signatures +verify-options pka-lookups show-uid-validity + +# Assume "yes" is the answer to most questions, that is, don't keep asking me +# to confirm something I've asked to be done +yes diff --git a/tmux/tmux.conf.m4 b/tmux/tmux.conf.m4 deleted file mode 100644 index 3a1d2425..00000000 --- a/tmux/tmux.conf.m4 +++ /dev/null @@ -1,130 +0,0 @@ -# Strip out a lot of machine and X11 dependent crap from the initial -# environment -set-environment -gru COLORFGBG -set-environment -gru COLORTERM -set-environment -gru DISPLAY -set-environment -gru SSH_CLIENT -set-environment -gru SSH_CONNECTION -set-environment -gru SSH_TTY -set-environment -gru WINDOWID - -# Otherwise, use the environment we had when we started; don't touch it during -# a session unless I specifically ask -set-option -g update-environment '' - -# Setting this makes each new pane a non-login shell, which suits me better -set-option -g default-command "$SHELL" - -# Expect a 256-color terminal -set-option -g default-terminal 'screen-256color' - -# Change the prefix to ^A rather than the default of ^B, because I'm a godless -# GNU Screen refugee, and also I like using ^B in my shell and in Vim more -unbind-key C-b -set-option -g prefix C-a -bind-key a send-prefix - -# Repeating the prefix switches to the last window and back, a GNU Screen -# feature that's hardwired into my brain now -bind-key C-a last-window - -# Quick ways to kill single windows and the whole server -bind-key '/' confirm-before 'kill-window' -bind-key '\' confirm-before 'kill-server' - -# Slightly more intuitive way to split windows -bind-key '_' split-window -v -bind-key '|' split-window -h - -# Switch to the last active pane -bind-key Tab last-pane - -# Use the vi mode for tmux interaction behaviour in copy and choice modes -set-window-option -g mode-keys vi -bind-key -T copy-mode-vi v send -X begin-selection -bind-key -T copy-mode-vi y send -X copy-selection-and-cancel - -# Detach with Alt-M, no prefix required -bind-key -n M-m detach - -# Vim-like pane resizing -bind-key -r '+' resize-pane -U 5 -bind-key -r '-' resize-pane -D 5 -bind-key -r '<' resize-pane -L 5 -bind-key -r '>' resize-pane -R 5 - -# Vim-like pane switching -bind-key h select-pane -L -bind-key j select-pane -D -bind-key k select-pane -U -bind-key l select-pane -R - -# Join and break panes -bind-key J choose-window "join-pane -h -s '%%'" -bind-key B break-pane -d - -# Select only sessions in the choose-tree menu, not the whole tree of sessions -# and windows, I prefer to drill down -bind-key s choose-session - -# Session title on the left side of the status bar -set-option -g status-left '[#S] ' - -# Username, hostname, and the current date on the right side of the status bar -set-option -g status-right ' [#(whoami)@#H] #(date +"%F %T")' - -# Update the status bar every second -set-option -g status-interval 1 - -# The first window in a session has index 1, rather than 0 -set-option -g base-index 1 - -# Don't worry about timeouts for key combinations, as I don't use Escape as -# meta and prefer things to be snappier -set-option -g escape-time 0 - -# Keep plenty of history -set-option -g history-limit 100000 - -# Don't interfere with my system clipboard -set-option -g set-clipboard off - -# Only force individual windows to the smallest attached terminal size, not -# whole sessions -set-window-option -g aggressive-resize on - -# If I don't set a title on a window, use the program name for the window title -set-window-option -g automatic-rename on - -# However, don't let terminal escape sequences rename my windows -set-window-option -g allow-rename off - -# Window titles are the window index, a colon, the window or command name, and -# any activity or alert indicators -set-window-option -g window-status-format "#I:#W#F" - -# Message dialogs are white on blue -set-option -g message-style "bg=colour18,fg=colour231" - -# Window choosers are white on blue -set-window-option -g mode-style "bg=colour18,fg=colour231" - -# Pane borders are always in the background color -set-option -g pane-border-style "fg=DF_TMUX_BG" -set-option -g pane-active-border-style "fg=DF_TMUX_BG" - -# Inactive windows have slightly washed-out system colours -set-option -g window-style "bg=colour232,fg=colour248" -set-option -g window-active-style "bg=colour0,fg=colour15" - -# The status bar has the defined background and foreground colours -set-option -g status-style "bg=DF_TMUX_BG,fg=DF_TMUX_FG" - -# Titles of windows default to black text with no embellishment -set-window-option -g window-status-style "fg=colour16" - -# The title of the active window is in white rather than black -set-window-option -g window-status-current-style "fg=colour231" - -# A window with a bell has a title with a red background until cleared -set-window-option -g window-status-bell-style "bg=colour9" diff --git a/tmux/tmux.conf.m4.mi5 b/tmux/tmux.conf.m4.mi5 new file mode 100644 index 00000000..76d493c1 --- /dev/null +++ b/tmux/tmux.conf.m4.mi5 @@ -0,0 +1,130 @@ +# Strip out a lot of machine and X11 dependent crap from the initial +# environment +set-environment -gru COLORFGBG +set-environment -gru COLORTERM +set-environment -gru DISPLAY +set-environment -gru SSH_CLIENT +set-environment -gru SSH_CONNECTION +set-environment -gru SSH_TTY +set-environment -gru WINDOWID + +# Otherwise, use the environment we had when we started; don't touch it during +# a session unless I specifically ask +set-option -g update-environment '' + +# Setting this makes each new pane a non-login shell, which suits me better +set-option -g default-command "$SHELL" + +# Expect a 256-color terminal +set-option -g default-terminal 'screen-256color' + +# Change the prefix to ^A rather than the default of ^B, because I'm a godless +# GNU Screen refugee, and also I like using ^B in my shell and in Vim more +unbind-key C-b +set-option -g prefix C-a +bind-key a send-prefix + +# Repeating the prefix switches to the last window and back, a GNU Screen +# feature that's hardwired into my brain now +bind-key C-a last-window + +# Quick ways to kill single windows and the whole server +bind-key '/' confirm-before 'kill-window' +bind-key '\' confirm-before 'kill-server' + +# Slightly more intuitive way to split windows +bind-key '_' split-window -v +bind-key '|' split-window -h + +# Switch to the last active pane +bind-key Tab last-pane + +# Use the vi mode for tmux interaction behaviour in copy and choice modes +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send -X begin-selection +bind-key -T copy-mode-vi y send -X copy-selection-and-cancel + +# Detach with Alt-M, no prefix required +bind-key -n M-m detach + +# Vim-like pane resizing +bind-key -r '+' resize-pane -U 5 +bind-key -r '-' resize-pane -D 5 +bind-key -r '<' resize-pane -L 5 +bind-key -r '>' resize-pane -R 5 + +# Vim-like pane switching +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +# Join and break panes +bind-key J choose-window "join-pane -h -s '%%'" +bind-key B break-pane -d + +# Select only sessions in the choose-tree menu, not the whole tree of sessions +# and windows, I prefer to drill down +bind-key s choose-session + +# Session title on the left side of the status bar +set-option -g status-left '[#S] ' + +# Username, hostname, and the current date on the right side of the status bar +set-option -g status-right ' [#(whoami)@#H] #(date +"%F %T")' + +# Update the status bar every second +set-option -g status-interval 1 + +# The first window in a session has index 1, rather than 0 +set-option -g base-index 1 + +# Don't worry about timeouts for key combinations, as I don't use Escape as +# meta and prefer things to be snappier +set-option -g escape-time 0 + +# Keep plenty of history +set-option -g history-limit 100000 + +# Don't interfere with my system clipboard +set-option -g set-clipboard off + +# Only force individual windows to the smallest attached terminal size, not +# whole sessions +set-window-option -g aggressive-resize on + +# If I don't set a title on a window, use the program name for the window title +set-window-option -g automatic-rename on + +# However, don't let terminal escape sequences rename my windows +set-window-option -g allow-rename off + +# Window titles are the window index, a colon, the window or command name, and +# any activity or alert indicators +set-window-option -g window-status-format "#I:#W#F" + +# Message dialogs are white on blue +set-option -g message-style "bg=colour18,fg=colour231" + +# Window choosers are white on blue +set-window-option -g mode-style "bg=colour18,fg=colour231" + +# Pane borders are always in the background color +set-option -g pane-border-style "fg=<% DF_TMUX_BG %>" +set-option -g pane-active-border-style "fg=<% DF_TMUX_BG %>" + +# Inactive windows have slightly washed-out system colours +set-option -g window-style "bg=colour232,fg=colour248" +set-option -g window-active-style "bg=colour0,fg=colour15" + +# The status bar has the defined background and foreground colours +set-option -g status-style "bg=<% DF_TMUX_BG %>,fg=<% DF_TMUX_FG %>" + +# Titles of windows default to black text with no embellishment +set-window-option -g window-status-style "fg=colour16" + +# The title of the active window is in white rather than black +set-window-option -g window-status-current-style "fg=colour231" + +# A window with a bell has a title with a red background until cleared +set-window-option -g window-status-bell-style "bg=colour9" -- cgit v1.2.3