Pkg: list update.

Emacs: fixed automode for Mutt, optimized yasnippet loading time.
GnuPG: set agent to use curses by default.
Mutt: set mailcap for images, tweaked index view, removed color themes belonging to official Mutt package.
Shell: fixed 'steal' function and renamed it to 'blind-append'.
Term: added terminfo file for BackSpace support in Mutt for LXTerminal.
Urlview: set to use Luakit.
Xinit: added GPG-Agent on startup.
master
Ambrevar 2012-07-04 12:21:01 +01:00
parent b0c7f5838f
commit 09c9b105a6
17 changed files with 197 additions and 166 deletions

View File

@ -4,11 +4,10 @@ dropbox
dropbox-cli
emacs-yasnippet
gsharkdown
linux-custom
movgrab
msmtp-pwpatched
notmuch
package-query
pacman-color
trash-cli
urlview
yaourt

View File

@ -1,6 +1,8 @@
abook
acpi
alsa-utils
antiword
aspell-en
aspell-fr
atool
auctex
auto-complete
@ -34,7 +36,6 @@ e2fsprogs
emacs-lua-mode
emacs-nox
emacs-yasnippet
epdfview
fakeroot
feh
file
@ -42,6 +43,7 @@ filesystem
findutils
flashplugin
flex
fortune-mod
gawk
gcc
gcc-libs
@ -62,11 +64,13 @@ heirloom-mailx
highlight
hplip
htop
hunspell-en
inetutils
initscripts
inkscape
iptables
iputils
ispell
jfsutils
laptop-mode-tools
less
@ -75,7 +79,6 @@ libtool
licenses
links
linux
linux-custom
linux-docs
linux-lts
logrotate
@ -91,7 +94,7 @@ mdadm
mediainfo
mercurial
movgrab
mplayer
mplayer2
msmtp-mta
msmtp-pwpatched
mutt
@ -100,7 +103,6 @@ nasm
ncdu
net-tools
nmap
notmuch
ntfs-3g
numlockx
openssh
@ -126,7 +128,6 @@ ranger
reiserfsprogs
rtorrent
rxvt-unicode
scons
scrot
sdparm
sed
@ -150,6 +151,7 @@ trash-cli
tree
unrar
unzip
urlview
usbutils
util-linux
valgrind
@ -157,6 +159,7 @@ vi
vicious
vim
vlock
w3m
waf
wget
which
@ -164,6 +167,7 @@ wireless_tools
wireshark-cli
wireshark-gtk
wpa_supplicant
wv
xf86-input-synaptics
xf86-video-intel
xf86-video-vesa

View File

@ -1,12 +1,14 @@
a52dec
aalib
abook
acl
acpi
alsa-lib
alsa-utils
antiword
archlinux-keyring
aspell
aspell-en
aspell-fr
atk
atkmm
atool
@ -28,7 +30,6 @@ cairo
cairomm
calc
cdparanoia
cifs-utils
cloog
cmus
compositeproto
@ -65,7 +66,6 @@ emacs-lua-mode
emacs-nox
enca
enchant
epdfview
eventlog
expat
faac
@ -73,6 +73,7 @@ faad2
fakeroot
farstream
feh
ffmpeg
fftw
file
filesystem
@ -86,6 +87,7 @@ fontsproto
foomatic-db
foomatic-db-engine
foomatic-filters
fortune-mod
freeglut
freetype2
fribidi
@ -112,7 +114,6 @@ glibc
glibmm
glib-networking
glproto
gmime
gmp
gnupg
gnuplot
@ -141,12 +142,14 @@ gtk-update-icon-cache
gzip
hdparm
heirloom-mailx
help2man
hicolor-icon-theme
highlight
hplip
hspell
htop
hunspell
hunspell-en
hwids
iana-etc
icu
@ -161,6 +164,7 @@ iproute2
iptables
iputils
isl
ispell
jack
jasper
jfsutils
@ -168,6 +172,7 @@ json-c
kbd
kbproto
keyutils
khrplatform-devel
kmod
krb5
ladspa
@ -185,7 +190,6 @@ libatasmart
libbluray
libcaca
libcap
libcap-ng
libcdaudio
libcddb
libcdio
@ -197,9 +201,11 @@ libdc1394
libdca
libdrm
libdv
libdvdcss
libdvdnav
libdvdread
libedit
libegl
libev
libexif
libffi
@ -212,6 +218,7 @@ libglapi
libgme
libgnome-keyring
libgpg-error
libgsf
libgssglue
libice
libid3tag
@ -265,10 +272,10 @@ libtorrent
libunique
libusb-compat
libusbx
libva
libvdpau
libvorbis
libvpx
libwbclient
libwebkit
libx11
libxau
@ -333,7 +340,7 @@ mkinitcpio-busybox
mozilla-common
mpfr
mpg123
mplayer
mplayer2
msmtp-mta
mtdev
musicbrainz
@ -373,6 +380,7 @@ pcmciautils
pcre
perl
perl-error
perl-locale-gettext
pidgin
pinentry
pixman
@ -415,7 +423,6 @@ rtorrent
run-parts
rxvt-unicode
schroedinger
scons
scrnsaverproto
scrot
sdl
@ -425,8 +432,8 @@ sg3_utils
shadow
shared-mime-info
slock
smbclient
soundtouch
speex
splint
sqlite
startup-notification
@ -438,11 +445,9 @@ syslog-ng
systemd-tools
sysvinit
t1lib
talloc
tar
task
tcpdump
tdb
texinfo
texlive-bin
texlive-core
@ -466,6 +471,7 @@ vim-runtime
vlock
vte
vte-common
w3m
waf
wget
which
@ -474,9 +480,9 @@ wireless_tools
wireshark-cli
wireshark-gtk
wpa_supplicant
wv
wxgtk
x264
xapian-core
xbitmaps
xcb-proto
xcb-util

View File

@ -58,10 +58,10 @@ terminal = "lxterminal"
termcmd = "lxterminal -e "
-- webbrowser = os.getenv("BROWSER") or "luakit"
webbrowser = "luakit"
mailclient = termcmd .. os.getenv("HOME") .. "/.ml.sh" -- Mutt Launcher
mailclient = termcmd .. "mutt"
pdfreader = "zathura"
editor = os.getenv("EDITOR") or "nano"
editor_cmd = termcmd .. editor
-- editor = os.getenv("EDITOR") or "nano"
-- editor_cmd = termcmd .. editor
--------------------------------------------------------------------------------
-- Default modkey.

16
.emacs
View File

@ -134,7 +134,7 @@
;; from being seen as a mail file.
(setq auto-mode-alist
(append
'(("[^\\./]mutt.*" . mail-mode)
'(("[^\\.]mutt.*" . mail-mode)
)
auto-mode-alist)
)
@ -359,20 +359,20 @@
;; Generate a bundle instead: yas/compile-bundle
;; Besides you can convert the generated file to bytecode.
(add-to-list 'load-path "~/.emacs.d/plugins")
(require 'yasnippet-bundle)
;; (add-to-list 'load-path "~/.emacs.d/plugins")
;; (require 'yasnippet-bundle)
;; Next follows a traditional, yet not-optimized configuration for Yasnippet.
; (add-to-list 'load-path "/usr/share/emacs/site-lisp/yas")
; (require 'yasnippet) ;; not yasnippet-bundle
; (yas/initialize)
(add-to-list 'load-path "/usr/share/emacs/site-lisp/yas")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
;; Personal snippets
; (setq yas/root-directory "~/.emacs.d/plugins/yas/snippets" )
(setq yas/root-directory "~/.emacs.d/plugins/yas/snippets" )
;; Load the snippets
; (yas/load-directory "~/.emacs.d/plugins/yas/snippets") ; Warning: slow!
; (yas/load-directory yas/root-directory)
(yas/load-directory yas/root-directory)
;;==============================================================================
;; Auto-Complete

View File

@ -61,15 +61,18 @@
("arch" "architecture" nil 1)
("asap" "as soon as possible" nil 1)
("autom" "automatique" nil 2)
("automt" "automatiquement" nil 2)
("atm" "at the moment" nil 1)
("bcp" "beaucoup" nil 2)
("biblio" "bibliothèque" nil 1)
("btw" "by the way" nil 1)
("ca" "ça" nil 1)
("chai" "je ne sais" nil 1)
("chq" "chaque" nil 1)
("chui" "je ne suis" nil 1)
("config" "configuration" nil 1)
("configs" "configurations" nil 1)
("càd" "c'est-à-dire" nil 1)
("cad" "c'est-à-dire" nil 1)
("dc" "donc" nil 1)
("dep" "dépendance" nil 1)
("deps" "dépendances" nil 1)
@ -78,12 +81,14 @@
("dispos" "disponibles" nil 1)
("distro" "distribution" nil 1)
("ds" "dans" nil 1)
("eg" "e.g." nil 3)
("ex" "exemple" nil 3)
("exo" "exercice" nil 1)
("ficheir" "fichier" nil 0)
("ficheirs" "fichiers" nil 0)
("fyi" "for your information" nil 0)
("gd" "grand" nil 3)
("ie" "i.e." nil 1)
("infos" "informations" nil 1)
("latex" "LaTeX" nil 10)
("linux" "GNU/Linux" nil 1)
@ -108,6 +113,7 @@
("pr" "pour" nil 3)
("ptt" "petit" nil 1)
("pê" "peut-être" nil 2)
("pe" "peut-être" nil 2)
("qd" "quand" nil 4)
("qq" "quelque" nil 1)
("qqch" "quelque chose" nil 1)

8
.gnupg/gpg-agent.conf Normal file
View File

@ -0,0 +1,8 @@
################################################################################
## GPG-Agent
## 2012-07-04
################################################################################
pinentry-program /usr/bin/pinentry-curses
# no-grab
# default-cache-ttl 1800

18
.ml.sh
View File

@ -1,18 +0,0 @@
#!/bin/bash
PWDSFILE="${HOME}/.pwds.gpg"
MUTTBIN="/usr/bin/mutt"
if [ ! -f "$PWDSFILE" ];then
echo "Password file ${PWDSFILE} not found!"
exit
fi
if [ ! -f "${MUTTBIN}" ];then
echo "Mutt is not installed."
exit
fi
PWDS=$(gpg --decrypt "${PWDSFILE}")
eval "$PWDS"
exec mutt "$@"

View File

@ -1,22 +0,0 @@
# -*- mode:sh -*-
## Colors for use with xterm and the like, white background.
color hdrdefault blue white
color quoted blue white
color signature red white
color attachment red white
color message brightred white
color error brightred white
color indicator brightyellow red
color status brightgreen blue
color tree black white
color normal black white
color markers red white
color search white black
color tilde brightmagenta white
color index blue white ~F
color index red white "~N|~O"
# color body brightblack white '\*+[^*]+\*+'
# color body brightblack white '_+[^_]+_+'

View File

@ -1,21 +0,0 @@
# -*- mode:sh -*-
## 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 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 '_+[^_]+_+'

View File

@ -1,7 +1,5 @@
# $Id$
text/html; w3m -I %{charset} -T text/html; copiousoutput;
# text/html; netscape -remote openURL\(%s\)
image/gif; xv %s
image/jpg; xv %s
image/*; sxiv %s
# application/pgp-keys; pgp -f < %s ; copiousoutput

46
.muttrc
View File

@ -1,7 +1,7 @@
## -*- mode:sh -*- #
################################################################################
## Mutt Configuration
## Date 2012-07-03
## Date 2012-07-04
################################################################################
## Note on folders:
@ -9,22 +9,19 @@
## -~/.mutt = personal stuff (contacts, account information)
## -~/.mutt.d = public stuff (cache, theme, mailcap)
## Optional:
## -~/.mutt.d/hcache = see hcache below.
## -~/.mutt.d/hcache = see header_cache below.
##-------------------------------------------------------------------------------
## General options
##-------------------------------------------------------------------------------
## TODO: why doesn't the $EDITOR variable work for connecting to emacs daemon?
## TODO: why doesn't the $EDITOR variable work for connection to emacs daemon?
set editor="emacsclient -a \"\" -t"
## Fix the BackSpace bug that happens on some terminals.
#bind index,pager  previous-page
## Mailcap
# set mailcap_path = ~/.mutt.d/mailcap
# auto_view text/html
# alternative_order text/plain text/html
set mailcap_path = ~/.mutt.d/mailcap
auto_view text/html
alternative_order text/plain text/html
##-------------------------------------------------------------------------------
## Multiple accounts
@ -91,6 +88,14 @@ source $alias_file
# Manual fetch.
bind index "^" imap-fetch-mail
## Fix the BackSpace bug that happens on some terminals.
#bind index,pager  previous-page
## Fix Backspace -- Shell alternative.
#$ infocmp > termbs.src
## Changed kbs=^H to kbs=\177, then:
#$ tic -x termbs.src
##------------------------------------------------------------------------------
## Custom headers for outgoing mail
##------------------------------------------------------------------------------
@ -106,7 +111,7 @@ bind index "^" imap-fetch-mail
#my_hdr From: Firstname Lastname <myfirstname@mymailserver>
## Extra info.
# my_hdr X-Info: Simplicity is the ultimate sophistication.
my_hdr X-Info: Simplicity is the ultimate sophistication.
## OS Info.
# my_hdr X-Operating-System: `uname -s`, kernel `uname -r`
@ -116,13 +121,24 @@ bind index "^" imap-fetch-mail
#my_hdr X-Message-Flag: WARNING!! Outlook sucks!
## Custom Mail-User-Agent ID.
# set user_agent = no
#my_hdr User-Agent: Every email client sucks, this one just sucks less.
set user_agent = yes
# my_hdr User-Agent: Every email client sucks, this one just sucks less.
##------------------------------------------------------------------------------
## Theme
## Themes
##------------------------------------------------------------------------------
#source ~/.mutt.d/colors.default
#source ~/.mutt.d/colors.linux
## TODO: Use these variables to get dynamic column size.
# set my_col_from = `echo $((30 * ($COLUMNS-34) / 100))`
# set my_col_subject = `echo $((70 * ($COLUMNS-34) / 100))`
## Index format
## See 'man 3 strftime' and 'man 3 printf'.
# set index_format="%?M?_%M_ ?%Z %2C %.13d (%-68.68F) %-68.68s %?M?_%M_&(%c/%l?"
set date_format="%y-%m-%d %T"
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
#source /usr/share/doc/mutt/samples/colors.default
#source /usr/share/doc/mutt/samples/colors.linux
source ~/.mutt.d/colors.nongeek

71
.save
View File

@ -1,11 +1,11 @@
#!/bin/bash
################################################################################
## Home Config Backup Script
## 2012-06-29
## 2012-07-04
################################################################################
## Note for Zsh: because of the KSH-style arrays (index starting at 0), you
## cannot use array index to append elements to arrays -- or the KSH_ARRAYS
## option for zsh must be used.
## Note for Zsh: because of the Ksh-style arrays (index starting at 0), you
## cannot use array index to append elements to arrays -- otherwise the
## KSH_ARRAYS option for zsh must be used.
##==============================================================================
## Options
@ -129,7 +129,7 @@ fi
##==============================================================================
FILELIST=()
# Arch Linux package list
## Arch Linux package list
if [ -e "/usr/bin/pacman" ]; then
for i in $(find . -maxdepth 1 -name '.arch*' -exec basename {} \;)
do
@ -137,86 +137,99 @@ if [ -e "/usr/bin/pacman" ]; then
done
fi
# Awesome
## Awesome
for i in $(find .config/awesome \( -name "*.lua" -o -name "*.sh" \) -type f)
do
FILELIST=(${FILELIST[*]} "$i")
done
# cmus
## cmus
# FILELIST=(${FILELIST[*]} "$(ls .cmus/{autosave,*.theme}) ")
FILELIST=(${FILELIST[*]} "$(ls .cmus/autosave)")
FILELIST=(${FILELIST[*]} ".cmus/autosave")
# Conky
## Conky
FILELIST=(${FILELIST[*]} ".conkyrc")
# Emacs
## Emacs
FILELIST=(${FILELIST[*]} ".emacs")
FILELIST=(${FILELIST[*]} ".emacs.d/plugins")
FILELIST=(${FILELIST[*]} ".emacs.d/abbrev_defs")
# GTK
## GnuPG
FILELIST=(${FILELIST[*]} ".gnupg/gpg-agent.conf")
## GTK
FILELIST=(${FILELIST[*]} ".gtkrc-2.0")
FILELIST=(${FILELIST[*]} ".config/gtk-3.0/settings.ini")
# Luakit
## Luakit
FILELIST=(${FILELIST[*]} ".config/luakit/")
# LXTerminal
## LXTerminal
FILELIST=(${FILELIST[*]} ".config/lxterminal/lxterminal.conf")
# MPlayer
## MPlayer
# FILELIST=(${FILELIST[*]} ".mplayer")
# Mutt
## Mutt
FILELIST=(${FILELIST[*]} ".muttrc")
FILELIST=(${FILELIST[*]} ".ml.sh")
for i in $(ls -ad --indicator-style=none .mutt.d/* | grep -vi 'cache')
do
FILELIST=(${FILELIST[*]} "$i")
done
# Nano
## Nano
FILELIST=(${FILELIST[*]} ".nanorc")
# Netinit
## Netinit
FILELIST=(${FILELIST[*]} ".netinit")
# Ranger
for i in $(ls -d --indicator-style=none .config/ranger/* | grep -vi 'pycache\|bookmarks\|history\|tagged')
## Ranger
for i in $(ls -ad --indicator-style=none .config/ranger/* | grep -vi 'pycache\|bookmarks\|history\|tagged')
do
FILELIST=(${FILELIST[*]} "$i")
done
# rtorrent
## rtorrent
FILELIST=(${FILELIST[*]} ".rtorrent.rc")
# Shells
## Shells
FILELIST=(${FILELIST[*]} ".bashrc")
FILELIST=(${FILELIST[*]} ".zshrc")
for i in $(ls .shell.d/*|grep -vi 'bhistory')
for i in $(ls -a .shell.d/*|grep -vi 'bhistory')
do
FILELIST=(${FILELIST[*]} "$i")
done
# Taskwarrior
## Taskwarrior
FILELIST=(${FILELIST[*]} ".taskrc")
# TeXlive
## Terminfo
FILELIST=(${FILELIST[*]} ".terminfo/x/xterm")
## TeXlive
# for i in $(find texmf -type f|grep -vi 'moderncv/examples\|moderncv/manual\|.bzr')
# do
# FILELIST=(${FILELIST[*]} "$i")
# done
# Vim
## Urlview
FILELIST=(${FILELIST[*]} ".urlview")
## Vim
FILELIST=(${FILELIST[*]} ".vimrc")
# WMFS
## WMFS
FILELIST=(${FILELIST[*]} ".config/wmfs")
# Xinit
## Xinit
FILELIST=(${FILELIST[*]} ".xinitrc")
# Xresource
## Xresource
FILELIST=(${FILELIST[*]} ".Xresources")
# Xscreensaver
## Xscreensaver
# FILELIST=(${FILELIST[*]} ".xscreensaver")

View File

@ -141,32 +141,49 @@ asciify()
done;
}
## steal
steal()
blind-append()
{
steal_help()
blind_help()
{
echo
echo "Usage:"
echo -e "\t$1 STRING FILE"
echo -e "\t$1 FILE [STRING]"
echo
echo "Synopsis:"
echo -e "\tAppend a silently prompted string to STRING from FILE."
echo -e "\tAppend to all STRING found in FILE a secret phrase being prompted."
echo -e "\tIf STRING is omitted, secret phrase will be appended to the end of the file."
echo -e "\tIf FILE does not exist, it will be created and secret phrase will be inserted. STRING will be ignored."
echo
}
if [ $# -ne 2 ]; then
if [ $# -gt 2 ] || [ $# -lt 1 ]; then
echo "Wrong number of arguments."
steal_help $0
blind_help $0
return
fi
STRING="$1"
FILE="$2"
FILE="$1"
STRING=""
if [ $# -eq 2 ]; then
STRING="$2"
fi
read -s DUMMY
sed -i "s/${STRING}/${STRING}${DUMMY}/g" "${FILE}"
echo File stolen.
if [ ! -e "$FILE" ] || [ "$STRING" = "" ]; then
echo "$DUMMY" >> "$FILE"
echo "Secrect blindly appended to ${FILE} at the end."
return
fi
if [ $# -eq 1 ]; then
echo "$DUMMY" >> "$FILE"
else
sed -i "s/${STRING}/${STRING}${DUMMY}/g" "${FILE}"
fi
echo "Secret blindly appended to ${FILE}."
return
}

BIN
.terminfo/x/xterm Normal file

Binary file not shown.

30
.urlview Normal file
View File

@ -0,0 +1,30 @@
###############################################################################
# Urlview configuration file.
# man urlview <Man page>
#
# Put this file in: $HOME/.urlview
# Put url_handler.sh in: /usr/bin
#
# You can call 'urlview' while in 'mutt' by pressing the Ctrl b keys.
# Put these macros in your $HOME/.muttrc file.
#
# macro index \cb |urlview\n
# macro pager \cb |urlview\n
#
# You can call 'urlview' while in 'tin' by pressing | then a for article,
# put urlview as the pipe command.
#
# Regular expression to use to match URLs.
#REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
# Command to invoke for selected URL. Use lynx, netscape, or url_handler.sh
# shell script. Alternatively, you can leave COMMAND unset and set the BROWSER
# environment variable instead.
#COMMAND lynx %s
#COMMAND netscape -remote 'openURL(%s)'
#COMMAND url_handler.sh
COMMAND luakit -n %s 2>/dev/null

View File

@ -1,32 +1,27 @@
#!/bin/sh
################################################################################
## XINITRC
## Last updated: 2012-04-23
## Last updated: 2012-07-04
################################################################################
## Config (for rxvt)
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
[ -f "~/.Xresources" ] && xrdb -merge "~/.Xresources"
## Useful tools
numlockx on
[ "$(which numlockx)" != "" ] && numlockx on
[ "$(amixer | grep PCM)" != "" ] && amixer set PCM 80%
# xscreensaver -no-splash &
##==============================================================================
## My apps
##==============================================================================
# [ -e /usr/bin/emacs ] && emacs --daemon
# dropboxd &
# parcellite &
# clementine &
# thunderbird &
## GPG-Agent
[ "$(which gpg-agent)" != "" ] && eval $(gpg-agent --daemon)
##==============================================================================
## Launch session
##==============================================================================
# [ -e /usr/bin/awesome ] && exec ck-launch-session dbus-launch awesome
# [ -e /usr/bin/awesome ] && exec ck-launch-session awesome
[ -e /usr/bin/awesome ] && exec ck-launch-session bash -c "udiskie & awesome"
# [ -e /usr/bin/startlxde ] && exec ck-launch-session startlxde
# exec ck-launch-session dbus-launch wmfs2
@ -41,7 +36,7 @@ numlockx on
# true
#done
################################################################################
##==============================================================================
## Wallpaper
################################################################################
##==============================================================================
# feh --bg-fill "$HOME/pictures/arch_linux_wallpaper_by_mokkujin-d3j1se0.png"