Compare commits

..

12 Commits

13 changed files with 349 additions and 24 deletions

View File

@ -0,0 +1,30 @@
# The default stow-ignore settings
# -------------------------------------
# Comments and blank lines are allowed.
RCS
.+,v
CVS
\.\#.+ # CVS conflict files / emacs lock files
\.cvsignore
\.svn
_darcs
\.hg
\.git
\.gitignore
\.gitmodules
.+~ # emacs backup files
\#.*\# # emacs autosave files
^/README.*
^/LICENSE.*
^/COPYING
# -------------------------------------
#
# My customizations
Makefile
\.DS_Store

6
dotfiles/Makefile Normal file
View File

@ -0,0 +1,6 @@
test:
@echo Test mode, run \"make all\" to enact changes
stow -v --no --dotfiles --target ~ .
all:
stow -v --dotfiles --target ~ .

View File

@ -8,7 +8,7 @@ unbind l
bind C-a last-window bind C-a last-window
# Reload configs for faster config testing # Reload configs for faster config testing
bind r source-file ~/.tmux.conf bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded…"
# start numbering windows at 1 # start numbering windows at 1
set -g base-index 1 set -g base-index 1
@ -36,6 +36,17 @@ bind -n M-j select-pane -D
bind -n M-k select-pane -U bind -n M-k select-pane -U
bind -n M-l select-pane -R bind -n M-l select-pane -R
# Set the visual style for a window that received a bell
set-window-option -g window-status-bell-style bg=color167,fg=colour235 # bg=redish, fg=black
# Set up the status bar
set-option -g status-left-length 30
set-option -g status-style fg=colour136,bg=colour235 # fg=brown, bg=black
set-option -g status-left "#[fg=green]tdkvxyvkv7 #[fg=white]☰ #[default]"
set-option -ag status-right " #[fg=white,bg=default]%H:%M#[default] #[fg=white]%Y-%m-%d"
set-option -g status-right " #[fg=white,bg=default]%H:%M#[default] #[fg=white]%Y-%m-%d"
set-window-option -g window-status-current-style fg=colour166,bg=colour235
# Install the tmux plugin manager # Install the tmux plugin manager
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# List of plugins # List of plugins

View File

@ -4,9 +4,20 @@
# Pager bindings # Pager bindings
bind pager <down> next-line #bind pager <down> next-line
bind pager <up> previous-line #bind pager <up> previous-line
bind pager j next-line
bind pager k previous-line
bind pager / search bind pager / search
bind pager 0 top bind pager 0 top
bind pager G bottom bind pager G bottom
bind pager g group-reply bind pager g group-reply
#
# Sidebar Navigation ---------------------------------
bind index <down> sidebar-next
bind index <up> sidebar-prev
bind index <right> sidebar-open
# Replicate Gmail in Gmail
macro index,pager A "<save-message>=[Gmail]/All Mail<enter>" "Archive"

View File

@ -0,0 +1,122 @@
# gruvbox dark (contrast dark):
# bg0 = 234
# bg1 = 237
# bg2 = 239
# bg3 = 241
# bg4 = 243
#
# gray = 245
#
# fg0 = 229
# fg1 = 223
# fg2 = 250
# fg3 = 248
# fg4 = 246
#
# red = 167
# green = 142
# yellow = 214
# blue = 109
# purple = 175
# aqua = 108
# orange = 208
# See http://www.mutt.org/doc/manual/#color
color attachment color109 color234
color bold color229 color234
color error color167 color234
color hdrdefault color246 color234
color indicator color223 color237
color markers color243 color234
color normal color223 color234
color quoted color250 color234
color quoted1 color108 color234
color quoted2 color250 color234
color quoted3 color108 color234
color quoted4 color250 color234
color quoted5 color108 color234
color search color234 color208
color signature color108 color234
color status color234 color250
color tilde color243 color234
color tree color142 color234
color underline color223 color239
color sidebar_divider color250 color234
color sidebar_new color142 color234
color index color142 color234 ~N
color index color108 color234 ~O
color index color109 color234 ~P
color index color214 color234 ~F
color index color175 color234 ~Q
color index color167 color234 ~=
color index color234 color223 ~T
color index color234 color167 ~D
color header color214 color234 "^(To:|From:)"
color header color142 color234 "^Subject:"
color header color108 color234 "^X-Spam-Status:"
color header color108 color234 "^Received:"
# Regex magic for URLs and hostnames
#
# Attention: BSD's regex has RE_DUP_MAX set to 255.
#
# Examples:
# http://some-service.example.com
# example.com
# a.example.com
# some-service.example.com
# example.com/
# example.com/datenschutz
# file:///tmp/foo
#
# Non-examples:
# 1.1.1900
# 14.02.2022/24:00
# 23.59
# w.l.o.g
# team.its
color body color142 color234 "[a-z]{3,255}://[[:graph:]]*"
color body color142 color234 "([-[:alnum:]]+\\.)+([0-9]{1,3}|[-[:alpha:]]+)/[[:graph:]]*"
color body color142 color234 "([-[:alnum:]]+\\.){2,255}[-[:alpha:]]{2,10}"
# IPv4 and IPv6 stolen from https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
color body color142 color234 "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
color body color142 color234 "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))"
# Mail addresses and mailto URLs
color body color208 color234 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
color body color208 color234 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
# some simleys and stuff
color body color234 color214 "[;:]-*[)>(<lt;|]"
color body color229 color234 "\\*[- A-Za-z]+\\*"
color body color214 color234 "^-.*PGP.*-*"
color body color142 color234 "^gpg: Good signature from"
color body color167 color234 "^gpg: Can't.*$"
color body color214 color234 "^gpg: WARNING:.*$"
color body color167 color234 "^gpg: BAD signature from"
color body color167 color234 "^gpg: Note: This key has expired!"
color body color214 color234 "^gpg: There is no indication that the signature belongs to the owner."
color body color214 color234 "^gpg: can't handle these multiple signatures"
color body color214 color234 "^gpg: signature verification suppressed"
color body color214 color234 "^gpg: invalid node with packet of type"
color body color142 color234 "^Good signature from:"
color body color167 color234 "^.?BAD.? signature from:"
color body color142 color234 "^Verification successful"
color body color167 color234 "^Verification [^s][^[:space:]]*$"
color compose header color223 color234
color compose security_encrypt color175 color234
color compose security_sign color109 color234
color compose security_both color142 color234
color compose security_none color208 color234

View File

@ -0,0 +1,2 @@
color sidebar_unread color108 color234

View File

@ -7,7 +7,7 @@
color hdrdefault cyan black color hdrdefault cyan black
color quoted red black color quoted red black
color signature blue brightblack color signature blue brightblack
color indicator brightwhite black color indicator default color237
color attachment green black color attachment green black
color error red black color error red black
color message yellow black color message yellow black
@ -32,7 +32,9 @@ mono header bold "^(From|Subject|X-Junked-Because|X-Virus-hagbard
# Colours for items in the index # Colours for items in the index
color index white black ~N color index white black ~N
color index brightblue black "~N (~e guidepointsecurity\.com | ~h \"^In-[Rr]eply-[Tt]o: .*guidepointsecurity\.com\")" #color index brightblue black "~N (~e \"(gpsec|guidepointsecurity)\.com\" | ~h \"^In-[Rr]eply-[Tt]o: .*(gpsec|guidepointsecurity)\.com\")"
#color index brightblue black "~R (~e guidepointsecurity\.com | ~h \"^In-[Rr]eply-[Tt]o: .*guidepointsecurity\.com\")"
color index brightblue black "~f guidepointsecurity\.com"
color index red black ~F color index red black ~F
color index green black ~T color index green black ~T
color index blue black ~D color index blue black ~D

View File

@ -15,7 +15,7 @@ macro index "\ef" "<pipe-message>view-x-face<enter>" # View
macro index "\ev" "<pipe-message>less<enter>" # View the message in less. macro index "\ev" "<pipe-message>less<enter>" # View the message in less.
macro index "\Cs\Co" "<limit>~h \"X-SpamProbe: GOOD\"<enter><last-entry>" # View good emails. macro index "\Cs\Co" "<limit>~h \"X-SpamProbe: GOOD\"<enter><last-entry>" # View good emails.
macro index "\Cs\Cs" "<limit>~h \"X-SpamProbe: SPAM\"<enter><last-entry>" # View bad emails. macro index "\Cs\Cs" "<limit>~h \"X-SpamProbe: SPAM\"<enter><last-entry>" # View bad emails.
macro index \Cr ":source ~/.muttrc<enter>" "Re-source the muttrc" macro index \Cr ":source ~/.config/neomutt/neomuttrc<enter>" "Re-source the neomuttrc"
# Macros for use in the pager. # Macros for use in the pager.
macro pager "w" "<enter-command>set invsmart_wrap invmarkers<enter>" # Toggle wrap stuff macro pager "w" "<enter-command>set invsmart_wrap invmarkers<enter>" # Toggle wrap stuff
@ -30,6 +30,8 @@ macro pager "\e7" "<enter-command>set pager_index_lines=7<enter>" # Chan
macro pager "\e8" "<enter-command>set pager_index_lines=8<enter>" # Change PIL size macro pager "\e8" "<enter-command>set pager_index_lines=8<enter>" # Change PIL size
macro pager "\e9" "<enter-command>set pager_index_lines=9<enter>" # Change PIL size macro pager "\e9" "<enter-command>set pager_index_lines=9<enter>" # Change PIL size
macro pager "\e0" "<enter-command>set pager_index_lines=0<enter>" # Change PIL size macro pager "\e0" "<enter-command>set pager_index_lines=0<enter>" # Change PIL size
macro pager "\ep" "<pipe-message>~/bin/mutt-unproofpoint.py| mdcat -p |less -R<enter>" # attempt view the cleaned message
#macro pager "\ep" "<pipe-message>~/bin/mutt-unproofpoint.py| bat --terminal-width=90 -f<enter>" # attempt view the cleaned message
macro pager "\Cb" "<pipe-message>urlview<enter>" # URL viewer. macro pager "\Cb" "<pipe-message>urlview<enter>" # URL viewer.
macro pager "\Cx\Cb" "<change-folder>?" # Folder list. macro pager "\Cx\Cb" "<change-folder>?" # Folder list.
macro pager "\Cx\Cs" "<pipe-message>cat > ~/" # Save message macro pager "\Cx\Cs" "<pipe-message>cat > ~/" # Save message
@ -48,3 +50,8 @@ set invpipe_decode<enter>" # View
macro generic "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>" macro generic "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
macro index "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>" macro index "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
macro pager "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>" macro pager "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
unbind editor <space>
macro compose \Ca ":source ~/bin/fzfattach.sh|<enter>"
macro pager A |'abook --add-email'\n

View File

@ -14,11 +14,12 @@ set mbox="+[Gmail]/All Mail"
set postponed="+[Gmail]/Drafts" set postponed="+[Gmail]/Drafts"
# ... and it gets saved in =outbox. # ... and it gets saved in =outbox.
set record="+[Gmail]/Sent Mail" # Gmail does this automatically, let's not duplicate...
#set record="+[Gmail]/Sent Mail"
# Look me up # Look me up
set spoolfile="+INBOX" set spoolfile="+INBOX"
mailboxes "+INBOX" mailboxes $spoolfile
set imap_check_subscribed = yes set imap_check_subscribed = yes
#mailboxes "imaps://imap.gmail.com/AdminTickets"

View File

@ -1,9 +1,27 @@
text/vcard; mutt_vcard_filter; copiousoutput
text/html; w3m -dump %s; copiousoutput; nametemplate=%s.html
application/x-html; w3m -dump %s; copiousoutput; nametemplate=%s.html
image/jpeg; gthumb %s;
application/octet-stream; mutt-octet-filter %s; copiousoutput
text/x-diff; view %s; needsterminal
text/x-patch; view %s; needsterminal
application/x-gzip; zcat %s; copiousoutput
application/msword; soffice %s; application/msword; soffice %s;
#application/octet-stream; ~/bin/mutt.octet.filter %s; copiousoutput
application/octet-stream; file -b %s; copiousoutput
application/pdf; open -a "Preview" %s;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; open -a "Microsoft Excel" %s
application/x-gzip; zcat %s; copiousoutput
application/x-html; open -a "Firefox" %s; nametemplate=%s.html
application/x-html; w3m -dump %s; copiousoutput; nametemplate=%s.html
image/*; open -a "Preview" %s;
text/html; open -a "Firefox" %s; nametemplate=%s.html
text/html; w3m -dump %s; copiousoutput; nametemplate=%s.html
# This should work, but doesn't
#text/plain; ~/bin/mutt-unproofpoint.py %s; copiousoutput
text/vcard; mutt_vcard_filter; copiousoutput
text/x-diff; view %s; needsterminal
text/x-patch; view %s; needsterminal

View File

@ -8,8 +8,9 @@ set hostname=felurian.guidepointsecurity.com # Name of the localhost
set hidden_host # Hide host details set hidden_host # Hide host details
set alias_file=~/.config/neomutt/aliases # Personal mail aliases set alias_file=~/.config/neomutt/aliases # Personal mail aliases
#set query_command="~/bin/mutt-ldap '%s'" # How to query the company contacts #set query_command="~/bin/mutt-ldap '%s'" # How to query the company contacts
set query_command="abook --mutt-query '%s'" # How to query the company contacts
set postpone=ask-no # Ask about postponing set postpone=ask-no # Ask about postponing
set move # Keep read mail in inbox unset move # Keep read mail in inbox, also Gmail moves it automatically
set print=ask-no # Ask before printing set print=ask-no # Ask before printing
set delete=yes # Just delete it set delete=yes # Just delete it
set include # Include messages in replies set include # Include messages in replies
@ -23,14 +24,15 @@ set edit_headers # I want to edit the message
#set editor="emacs -geometry 90x73+298+0 --load post-mode" #set editor="emacs -geometry 90x73+298+0 --load post-mode"
set editor="vim -c ':0' -c '/^$/' -c ':nohlsearch'" set editor="vim -c ':0' -c '/^$/' -c ':nohlsearch'"
#set query_command="lbdbq '%s'" # Use the little brother database for doing queries. #set query_command="lbdbq '%s'" # Use the little brother database for doing queries.
#set nomark_old # Don't mark unread new msgs as old. set mark_old # Don't mark unread new msgs as old.
set mail_check=90 set mail_check=90
set mail_check_recent
set timeout=15 set timeout=15
set mbox_type=maildir # mailbox type set mbox_type=mbox # mailbox type
set mbox="!" # Default mailbox. set mbox="!" # Default mailbox.
#set imap_user="orien" # How we gonna log in #set imap_user="orien" # How we gonna log in
#set imap_peek="no" # Mark a message as read, when downloaded #set imap_peek="no" # Mark a message as read, when downloaded
set copy # Keep copies of outgoing mail... #set copy # Keep copies of outgoing mail...
set nobeep # We don't need no beeping software. set nobeep # We don't need no beeping software.
set nosmart_wrap # Don't want smart wrapping. set nosmart_wrap # Don't want smart wrapping.
set nomarkers # Don't want any wrap markers. set nomarkers # Don't want any wrap markers.
@ -40,13 +42,14 @@ set nostrict_threads # Lets have some fuzzy threa
set sendmail_wait=-1 # Don't wait around for sendmail. set sendmail_wait=-1 # Don't wait around for sendmail.
set wait_key=no # Don't wait after subshell exit set wait_key=no # Don't wait after subshell exit
set fcc_clear # Keep fcc's clear of signatues and encryption. set fcc_clear # Keep fcc's clear of signatues and encryption.
set nopipe_decode # Don't decode messages when piping. unset pipe_decode # Don't decode messages when piping.
set thorough_search # Strip headers and eval mimes before searching
# Print via a2ps # Print via a2ps
set print_command="a2ps -1gEmail --borders=no --strip=3" set print_command="a2ps -1gEmail --borders=no --strip=3"
set tilde # Fill out messages with '~'. set tilde # Fill out messages with '~'.
set read_inc=100 # Read counter ticks every 100 msgs. set read_inc=100 # Read counter ticks every 100 msgs.
set write_inc=100 # Write counter ticks every 100 msgs. set write_inc=100 # Write counter ticks every 100 msgs.
set noconfirmappend # Just append, don't hassle me. unset confirmappend # Just append, don't hassle me.
set pager_stop # Don't skip msgs on next page. set pager_stop # Don't skip msgs on next page.
# Where to find the mailcap. # Where to find the mailcap.
set mailcap_path=~/.config/neomutt/mailcap:/usr/local/etc/mailcap:/etc/mailcap set mailcap_path=~/.config/neomutt/mailcap:/usr/local/etc/mailcap:/etc/mailcap
@ -62,7 +65,9 @@ source ~/.config/neomutt/accounts # Account details
source ~/.config/neomutt/aliases # Load in my aliases. source ~/.config/neomutt/aliases # Load in my aliases.
source ~/.config/neomutt/auto_views # Define auto_views. source ~/.config/neomutt/auto_views # Define auto_views.
source ~/.config/neomutt/bindings # Define key bindings. source ~/.config/neomutt/bindings # Define key bindings.
source ~/.config/neomutt/colours # Define colours. #source ~/.config/neomutt/colours # Define colours.
source ~/.config/neomutt/colors-gruvbox-shuber
source ~/.config/neomutt/colors-gruvbox-shuber-extended
source ~/.config/neomutt/fcc-hooks # Define fcc-hooks. source ~/.config/neomutt/fcc-hooks # Define fcc-hooks.
source ~/.config/neomutt/folder-hooks # Define folder-hooks. source ~/.config/neomutt/folder-hooks # Define folder-hooks.
source ~/.config/neomutt/headers # Configure header display. source ~/.config/neomutt/headers # Configure header display.
@ -73,6 +78,12 @@ source ~/.config/neomutt/non-standard # Support for mutt
source ~/.config/neomutt/save-hooks # Define save-hooks. source ~/.config/neomutt/save-hooks # Define save-hooks.
source ~/.config/neomutt/subscriptions # Define the list of subscribed mailing lists. source ~/.config/neomutt/subscriptions # Define the list of subscribed mailing lists.
# Play with the sidebar?
#set sidebar_divider_char = '|'
set sidebar_visible = yes
set sidebar_width = 24
#color sidebar_new color221 color233
# HTML is the last option. # HTML is the last option.
alternative_order text/enriched text/plain text/html alternative_order text/enriched text/plain text/html

View File

@ -4,3 +4,10 @@
# #
#save-hook .* =Archive/`date "+%Y"`/`date "+%m"` #save-hook .* =Archive/`date "+%Y"`/`date "+%m"`
save-hook '=f @analog.com' "=Customers/Analog"
save-hook '~f @nafinc\\.com$' "=Customers/NAF"
save-hook '~f @newyorklife\\.com$' "=Customers/NYLife"
save-hook '=f @rtx.com' "=Customers/RTX"
save-hook '=f @shu.edu' "=Customers/SHU"
save-hook '=f @partner.paloaltonetworks.com' "=Partners/PaloAlto"
save-hook '.*' "=[Gmail]/All Mail"

97
scripts/mutt-mailhops Executable file
View File

@ -0,0 +1,97 @@
#!/usr/bin/perl -w
# Copyright (c) 1999 Marius Gedminas <mged...@takas.lt>
# Shows the route of an Internet mail message
# Version 0.0.1pre-alpha
#
# Patched by Roland Rosenfeld <rol...@spinnaker.de>
# $ Id: mailhops,v 1.3 2000/01/25 20:18:24 roland Exp roland $
use strict;
use POSIX qw(mktime);
use Date::Parse;
my $verbose = 0;
# Setup
my %Months = (
Jan => 1,
Feb => 2,
Mar => 3,
Apr => 4,
May => 5,
Jun => 6,
Jul => 7,
Aug => 8,
Sep => 9,
Oct => 10,
Nov => 11,
Dec => 12,
);
# Read headers
$/ = '';
my $head = <>;
$head =~ s/\n\s+/ /g;
my @headers = split("\n", $head);
# Parse headers
my @hops;
for (@headers) {
next unless /^(>?Received|Date):/;
my $time;
my $host;
my $from;
if (/^Date:\s+(.*)/) {
$host = "Date:";
$time = $1;
$from = "";
} else {
$host = "(unknown)";
$host = $1 if /\sby\s+([a-z0-9\-_+.]+)\s/ && $1 ne "uid";
$from = "(unknown)";
$from = $1 if /\sfrom\s+([a-z0-9\-_+.]+(?:\s+[(].+?[)]))\s/;
$time = "(unknown)";
$time = $1 if /;\s+(.+)$/;
$time =~ s/using.*//;
}
my $epoch = str2time ($time);
unshift @hops, { HOST => $host, FROM => $from, TIME => $epoch};
}
# Print output
print " Host Date received (local) Lag
Total lag\n";
my $nr = 0;
my ($first, $prev);
for (@hops) {
my $host = $_->{HOST};
my $from = $_->{FROM};
my $time = $_->{TIME};
$first = $prev = $time unless defined $first;
printf "%2d. %-31.31s", ++$nr, $host;
do { print "\n"; next } unless defined $time;
my $delta = $time - $prev;
my $neg = $delta < 0; $delta = abs($delta);
my $delta_h = int($delta / 3600);
my $delta_m = int(($delta - $delta_h * 3600) / 60);
my $delta_s = ($delta - $delta_h * 3600 - $delta_m * 60);
my ($sec,$min,$hour,$day,$mon,$year,undef,undef,$dst) = localtime($time);
printf " %4d-%02d-%02d %02d:%02d:%02d %s%02d:%02d:%02d",
1900+$year, $mon+1, $day, $hour, $min, $sec,
$neg ? '-' : ' ', $delta_h, $delta_m, $delta_s;
$delta = $time - $first;
$neg = $delta < 0; $delta = abs($delta);
$delta_h = int($delta / 3600);
$delta_m = int(($delta - $delta_h * 3600) / 60);
$delta_s = ($delta - $delta_h * 3600 - $delta_m * 60);
printf " %s%02d:%02d:%02d\n",
$neg ? '-' : ' ', $delta_h, $delta_m, $delta_s;
print " from $from\n" if $verbose;
$prev = $time;
}