Compare commits

...

5 Commits

9 changed files with 191 additions and 14 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
# 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
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-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
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# List of plugins

View File

@ -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 "\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 "\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 "\Cx\Cb" "<change-folder>?" # Folder list.
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 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>"
unbind editor <space>
macro compose \Ca ":source ~/bin/fzfattach.sh|<enter>"
macro pager A |'abook --add-email'\n

View File

@ -20,6 +20,6 @@ set postponed="+[Gmail]/Drafts"
# Look me up
set spoolfile="+INBOX"
mailboxes "+INBOX"
mailboxes $spoolfile
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/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,6 +8,7 @@ set hostname=felurian.guidepointsecurity.com # Name of the localhost
set hidden_host # Hide host details
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="abook --mutt-query '%s'" # How to query the company contacts
set postpone=ask-no # Ask about postponing
unset move # Keep read mail in inbox, also Gmail moves it automatically
set print=ask-no # Ask before printing
@ -25,12 +26,13 @@ set editor="vim -c ':0' -c '/^$/' -c ':nohlsearch'"
#set query_command="lbdbq '%s'" # Use the little brother database for doing queries.
set mark_old # Don't mark unread new msgs as old.
set mail_check=90
set mail_check_recent
set timeout=15
set mbox_type=maildir # mailbox type
set mbox_type=mbox # mailbox type
set mbox="!" # Default mailbox.
#set imap_user="orien" # How we gonna log in
#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 nosmart_wrap # Don't want smart wrapping.
set nomarkers # Don't want any wrap markers.

View File

@ -4,4 +4,10 @@
#
#save-hook .* =Archive/`date "+%Y"`/`date "+%m"`
save-hook .* "=[Gmail]/All Mail"
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;
}