summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xresources/.Xresources/solarized.mine.dark.xresources (renamed from Xresources/.Xresources/solarized.dark.xresources)0
-rw-r--r--Xresources/.Xresources/solarized.mine.light.xresources (renamed from Xresources/.Xresources/solarized.light.xresources)0
-rw-r--r--mutt/.mutt/colors23
-rw-r--r--mutt/.mutt/colors.dark.muttrc97
-rw-r--r--mutt/.mutt/colors.light.muttrc96
-rw-r--r--mutt/.mutt/muttrc4
-rw-r--r--vim/.vimrc2
-rw-r--r--zsh/.zsh/functions32
8 files changed, 213 insertions, 41 deletions
diff --git a/Xresources/.Xresources/solarized.dark.xresources b/Xresources/.Xresources/solarized.mine.dark.xresources
index c820c23..c820c23 100644
--- a/Xresources/.Xresources/solarized.dark.xresources
+++ b/Xresources/.Xresources/solarized.mine.dark.xresources
diff --git a/Xresources/.Xresources/solarized.light.xresources b/Xresources/.Xresources/solarized.mine.light.xresources
index 5d076f4..5d076f4 100644
--- a/Xresources/.Xresources/solarized.light.xresources
+++ b/Xresources/.Xresources/solarized.mine.light.xresources
diff --git a/mutt/.mutt/colors b/mutt/.mutt/colors
deleted file mode 100644
index 39b16b2..0000000
--- a/mutt/.mutt/colors
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*-muttrc-*-
-
-# Palette for use with the Linux console. Black background.
-
-color hdrdefault blue black
-color quoted blue black
-color signature blue black
-color attachment red black
-color prompt brightmagenta black
-color message brightred black
-color error brightred black
-color indicator black red
-color status brightgreen blue
-color tree white black
-color normal white black
-color markers red black
-color search white black
-color tilde brightmagenta black
-color index blue black ~F
-color index red black "~N|~O"
-
-# color body brightwhite black '\*+[^*]+\*+'
-# color body brightwhite black '_+[^_]+_+'
diff --git a/mutt/.mutt/colors.dark.muttrc b/mutt/.mutt/colors.dark.muttrc
new file mode 100644
index 0000000..1acf19c
--- /dev/null
+++ b/mutt/.mutt/colors.dark.muttrc
@@ -0,0 +1,97 @@
+# Mutt template by Robert Timm (https://github.com/rti)
+# Base16 scheme and Base16 Builder by Chris Kempson (https://github.com/chriskempson)
+#
+# -----------------------------------------------------------------------------
+# MESSAGE MATCH PATTERNS
+# -----------------------------------------------------------------------------
+# ~A all messages
+# ~b EXPR messages which contain EXPR in the message body
+# ~B EXPR messages which contain EXPR in the whole message
+# ~c USER messages carbon-copied to USER
+# ~C EXPR message is either to: or cc: EXPR
+# ~D deleted messages
+# ~d [MIN]-[MAX] messages with ``date-sent'' in a Date range
+# ~E expired messages
+# ~e EXPR message which contains EXPR in the ``Sender'' field
+# ~F flagged messages
+# ~f USER messages originating from USER
+# ~g PGP signed messages
+# ~G PGP encrypted messages
+# ~h EXPR messages which contain EXPR in the message header
+# ~k message contains PGP key material
+# ~i ID message which match ID in the ``Message-ID'' field
+# ~L EXPR message is either originated or received by EXPR
+# ~l message is addressed to a known mailing list
+# ~m [MIN]-[MAX] message in the range MIN to MAX *)
+# ~n [MIN]-[MAX] messages with a score in the range MIN to MAX *)
+# ~N new messages
+# ~O old messages
+# ~p message is addressed to you (consults $alternates)
+# ~P message is from you (consults $alternates)
+# ~Q messages which have been replied to
+# ~R read messages
+# ~r [MIN]-[MAX] messages with ``date-received'' in a Date range
+# ~S superseded messages
+# ~s SUBJECT messages having SUBJECT in the ``Subject'' field.
+# ~T tagged messages
+# ~t USER messages addressed to USER
+# ~U unread messages
+# ~v message is part of a collapsed thread.
+# ~x EXPR messages which contain EXPR in the `References' field
+# ~y EXPR messages which contain EXPR in the `X-Label' field
+# ~z [MIN]-[MAX] messages with a size in the range MIN to MAX *)
+# ~= duplicated messages (see $duplicate_threads)
+
+# basic colors ---------------------------------------------------------
+# name foreground background pattern
+color normal color20 color0
+color error color1 color0
+color tilde color20 color0
+color message color20 color0
+color markers color1 color0
+color attachment color8 color0
+color search color2 color0
+color status color8 color18
+color indicator color7 color19
+color tree color19 color0 # arrow in threads
+
+color index color20 color0 "~A" # all messages
+color index color1 color0 "~F" # flagged messages
+color index color20 color0 "~v~(!~N)" # collapsed thread with no unread
+color index color4 color0 "~U" # unread messages
+color index color4 color0 "~v~(~N)" # collapsed thread with some unread
+color index color1 color0 "~v~(~F)" # collapsed thread with some flagged
+color index color0 color1 "~D" # deleted messages
+
+# header
+color hdrdefault color20 color18
+color header color20 color18 "^"
+color header color7 color18 "^(From)"
+color header color7 color18 "^(Subject)"
+
+# body
+color normal color7 color0
+color underline color7 color0
+color bold color7 color0
+color signature color20 color0
+
+color quoted color3 color0
+color quoted1 color2 color0
+color quoted2 color5 color0
+color quoted3 color6 color0
+color quoted4 color4 color0
+
+# pgp
+color body color2 color0 "(Good signature)"
+color body color2 color0 "^gpg: Good signature .*"
+color body color20 color0 "^gpg: "
+color body color1 color0 "(BAD signature)"
+color body color1 color1 "^gpg: BAD signature from.*"
+
+# body url
+color body color4 color0 "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
+# body email
+color body color4 color0 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
+
+
+# vim: filetype=muttrc
diff --git a/mutt/.mutt/colors.light.muttrc b/mutt/.mutt/colors.light.muttrc
new file mode 100644
index 0000000..9d94506
--- /dev/null
+++ b/mutt/.mutt/colors.light.muttrc
@@ -0,0 +1,96 @@
+# Mutt template by Robert Timm (https://github.com/rti)
+# Base16 scheme and Base16 Builder by Chris Kempson (https://github.com/chriskempson)
+#
+# -----------------------------------------------------------------------------
+# MESSAGE MATCH PATTERNS
+# -----------------------------------------------------------------------------
+# ~A all messages
+# ~b EXPR messages which contain EXPR in the message body
+# ~B EXPR messages which contain EXPR in the whole message
+# ~c USER messages carbon-copied to USER
+# ~C EXPR message is either to: or cc: EXPR
+# ~D deleted messages
+# ~d [MIN]-[MAX] messages with ``date-sent'' in a Date range
+# ~E expired messages
+# ~e EXPR message which contains EXPR in the ``Sender'' field
+# ~F flagged messages
+# ~f USER messages originating from USER
+# ~g PGP signed messages
+# ~G PGP encrypted messages
+# ~h EXPR messages which contain EXPR in the message header
+# ~k message contains PGP key material
+# ~i ID message which match ID in the ``Message-ID'' field
+# ~L EXPR message is either originated or received by EXPR
+# ~l message is addressed to a known mailing list
+# ~m [MIN]-[MAX] message in the range MIN to MAX *)
+# ~n [MIN]-[MAX] messages with a score in the range MIN to MAX *)
+# ~N new messages
+# ~O old messages
+# ~p message is addressed to you (consults $alternates)
+# ~P message is from you (consults $alternates)
+# ~Q messages which have been replied to
+# ~R read messages
+# ~r [MIN]-[MAX] messages with ``date-received'' in a Date range
+# ~S superseded messages
+# ~s SUBJECT messages having SUBJECT in the ``Subject'' field.
+# ~T tagged messages
+# ~t USER messages addressed to USER
+# ~U unread messages
+# ~v message is part of a collapsed thread.
+# ~x EXPR messages which contain EXPR in the `References' field
+# ~y EXPR messages which contain EXPR in the `X-Label' field
+# ~z [MIN]-[MAX] messages with a size in the range MIN to MAX *)
+# ~= duplicated messages (see $duplicate_threads)
+
+# basic colors ---------------------------------------------------------
+# name foreground background pattern
+color normal color0 color15
+color error color1 color15
+color tilde color0 color15
+color message color0 color15
+color markers color1 color15
+color attachment color20 color15
+color search color2 color15
+color status color20 color21
+color indicator color19 color7
+color tree color7 color15 # arrow in threads
+
+color index color0 color15 "~A" # all messages
+color index color1 color15 "~F" # flagged messages
+color index color0 color15 "~v~(!~N)" # collapsed thread with no unread
+color index color4 color15 "~U" # unread messages
+color index color4 color15 "~v~(~N)" # collapsed thread with some unread
+color index color1 color15 "~v~(~F)" # collapsed thread with some flagged
+color index color15 color1 "~D" # deleted messages
+
+# header
+color hdrdefault color20 color21
+color header color20 color21 "^"
+color header color19 color21 "^(From)"
+color header color19 color21 "^(Subject)"
+
+# body
+color normal color0 color15
+color underline color0 color15
+color bold color0 color15
+color signature color20 color15
+
+color quoted color3 color15
+color quoted1 color2 color15
+color quoted2 color5 color15
+color quoted3 color6 color15
+color quoted4 color4 color15
+
+# pgp
+color body color2 color15 "(Good signature)"
+color body color2 color15 "^gpg: Good signature .*"
+color body color20 color15 "^gpg: "
+color body color1 color15 "(BAD signature)"
+color body color1 color1 "^gpg: BAD signature from.*"
+
+# body url
+color body color4 color15 "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
+# body email
+color body color4 color15 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
+
+# vim: filetype=muttrc
diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc
index cef8107..0403d18 100644
--- a/mutt/.mutt/muttrc
+++ b/mutt/.mutt/muttrc
@@ -9,7 +9,7 @@ set mailcap_path = ~/.mutt/mailcap
set tmpdir = ~/.mutt/temp
# Source crypto, aliases, mailboxes
-source ~/.mutt/colors
+# source ~/.mutt/colors
source ~/.mutt/crypto
source ~/.mutt/alias
source ~/.mutt/mailboxes
@@ -86,6 +86,8 @@ folder-hook 'Work*' 'source ~/.mutt/id_work'
folder-hook 'Personal*' 'source ~/.mutt/id_personal'
# Source mutt solarized
+`[[ "$COLORSCHEME" != "solarized" && "$BACKGROUND" = "dark" ]] && echo source $HOME/.mutt/colors.dark.muttrc || echo set`
+`[[ "$COLORSCHEME" != "solarized" && "$BACKGROUND" = "light" ]] && echo source $HOME/.mutt/colors.light.muttrc || echo set`
`[[ "$COLORSCHEME" = "solarized" && "$BACKGROUND" = "light" ]] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-light-16.muttrc || echo set`
`[[ "$COLORSCHEME" = "solarized" && "$BACKGROUND" = "dark" ]] && echo source $HOME/.mutt/solarized/mutt-colors-solarized-dark-16.muttrc || echo set`
diff --git a/vim/.vimrc b/vim/.vimrc
index 9b17ea2..1d46270 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -232,7 +232,7 @@ au BufNewFile,BufRead *.edp comp freefem
au BufNewFile,BufRead *.geo setf gmsh
" Colorscheme
-let base16colorspace=256
+let base16colorspace=256
silent! colo $COLORSCHEME
if $BACKGROUND=="dark"
set background=dark
diff --git a/zsh/.zsh/functions b/zsh/.zsh/functions
index aad8b01..86c1894 100644
--- a/zsh/.zsh/functions
+++ b/zsh/.zsh/functions
@@ -4,47 +4,47 @@ if [[ -z ${ZSH_COLORS} ]]; then
ZSH_COLORS=${HOME}/.local/share/zsh/colors.zsh
fi
-colorschemes=$(echo ${HOME}/.Xresources/**/* | sed "s#${HOME}/.Xresources/##g" | sed 's#base16/base16-##g')
+colorschemes=$(echo ${HOME}/.Xresources/**/*.xresources | sed "s#${HOME}/.Xresources/##g" | sed 's#base16/base16-##g' | \
+ sed 's/[^ ]\+\.256\.[^ ]\+//g' | sed 's/.xresources//g' | sed 's/[ ]\+/ /g' )
function colo {
# Xresource file
- if [[ -z $1 ]]; then
- XRESOURCE=$(echo ${colorschemes} | sed 's/ /\n/g' | fzf)
- else
+ if [[ ! -z $1 ]]; then
XRESOURCE=$1
+ else
+ XRESOURCE=$(echo ${colorschemes} | sed 's/ /\n/g' | sed '/^[ ]*$/d' | fzf)
+ [[ -z ${XRESOURCE} ]] && return
fi
- if [[ -z ${XRESOURCE} ]]; then
- return
- fi
- if [[ ! -f ${HOME}/.Xresources/${XRESOURCE} ]]; then
- XRESOURCE=base16/base16-${XRESOURCE}
- fi
- if [[ ! -f ${HOME}/.Xresources/${XRESOURCE} ]]; then
+ if [[ -f ${HOME}/.Xresources/${XRESOURCE}.xresources ]]; then
+ XRESOURCE_FILE=${HOME}/.Xresources/${XRESOURCE}.xresources
+ elif [[ -f ${HOME}/.Xresources/base16/base16-${XRESOURCE}.256.xresources ]]; then
+ XRESOURCE_FILE=${HOME}/.Xresources/base16/base16-${XRESOURCE}.256.xresources
+ else
echo "Invalid colorscheme!"
return
fi
# Change colors for current session
- /usr/bin/cpp ~/.Xresources/${XRESOURCE} | tr -d ' \t' | sed -n \
+ /usr/bin/cpp ${XRESOURCE_FILE} | tr -d ' \t' | sed -n \
-e 's/.*background:/\x1b]11;/p' \
-e 's/.*foreground:/\x1b]10;/p' \
-e 's/.*color\([0-9][^:]*\):/\x1b]4;\1;/p' | tr \\n \\a
# Ensure border color is the same as background
- bg=$(/usr/bin/cpp ~/.Xresources/${XRESOURCE} | grep "background" | sed 's/[^ ]\+[ ]\+\([^ ]\+\)$/\1/')
+ bg=$(/usr/bin/cpp ${XRESOURCE_FILE} | grep "background" | sed 's/[^ ]\+[ ]\+\([^ ]\+\)$/\1/')
echo "\x1b]708;${bg}" | tr \\n \\a
# Load Xresources file for future sessions
xrdb ~/.Xresources/base.xresources
- xrdb -merge ~/.Xresources/${XRESOURCE}
+ xrdb -merge ${XRESOURCE_FILE}
xrdb -merge <<< "URxvt.borderColor: ${bg}"
# Change default environment variable for future sessions
mkdir -p $(dirname ${ZSH_COLORS})
- COLORSCHEME=$(echo $(basename ${XRESOURCE}) | sed 's/\([^.]\+\)\..\+$/\1/g')
- BACKGROUND=$(echo ${XRESOURCE} | sed 's/^.\+\(dark\|light\).\+$/\1/')
+ COLORSCHEME=$(echo $(basename ${XRESOURCE_FILE}) | sed 's/\([^.]\+\)\..\+$/\1/g')
+ BACKGROUND=$(echo ${XRESOURCE_FILE} | sed 's/^.\+\(dark\|light\).\+$/\1/')
echo "export COLORSCHEME=${COLORSCHEME}" > ${ZSH_COLORS}
echo "export BACKGROUND=${BACKGROUND}" >> ${ZSH_COLORS}