about summary refs log tree commit diff stats
path: root/core/conf/skel
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-09-20 23:37:06 +0100
committerSilvino Silva <silvino@bk.ru>2016-09-20 23:37:06 +0100
commit4c61c00bff9bb3270ac5da1995d64c5ef415ed86 (patch)
treeb7265dc7efdaa9e84cb8aafcd3800ee6ad9ce2f9 /core/conf/skel
parente4b9fd6157b8b5eedf67006719a0ef5f1ac0027e (diff)
downloaddoc-4c61c00bff9bb3270ac5da1995d64c5ef415ed86.tar.gz
moved tool config from core
Diffstat (limited to 'core/conf/skel')
-rw-r--r--core/conf/skel/.gnupg/gpg.conf141
-rw-r--r--core/conf/skel/.mutt/external27
-rw-r--r--core/conf/skel/.mutt/gpg.rc88
-rw-r--r--core/conf/skel/.mutt/mail_alias0
-rw-r--r--core/conf/skel/.mutt/muttrc65
-rw-r--r--core/conf/skel/.mutt/system25
-rw-r--r--core/conf/skel/.vim/backup/.gitignore0
-rw-r--r--core/conf/skel/.vim/colors/wombat256mod.vim96
-rw-r--r--core/conf/skel/.vim/swap/.gitignore0
-rw-r--r--core/conf/skel/.vim/undodir/.gitignore0
-rw-r--r--core/conf/skel/.vim/views/.gitignore0
-rw-r--r--core/conf/skel/.vimrc150
12 files changed, 0 insertions, 592 deletions
diff --git a/core/conf/skel/.gnupg/gpg.conf b/core/conf/skel/.gnupg/gpg.conf
deleted file mode 100644
index 20eed65..0000000
--- a/core/conf/skel/.gnupg/gpg.conf
+++ /dev/null
@@ -1,141 +0,0 @@
-# These first three lines are not copied to the gpg.conf file in
-# the users home directory.
-# $Id$
-# Options for GnuPG
-# Copyright 1998-2003, 2010 Free Software Foundation, Inc.
-# Copyright 1998-2003, 2010 Werner Koch
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-#
-# Unless you specify which option file to use (with the command line
-# option "--options filename"), GnuPG uses the file ~/.gnupg/gpg.conf
-# by default.
-#
-# An options file can contain any long options which are available in
-# GnuPG. If the first non white space character of a line is a '#',
-# this line is ignored.  Empty lines are also ignored.
-#
-# See the gpg man page for a list of options.
-
-
-# If you have more than 1 secret key in your keyring, you may want to
-# uncomment the following option and set your preferred keyid.
-
-#default-key 621CC013
-
-
-# If you do not pass a recipient to gpg, it will ask for one.  Using
-# this option you can encrypt to a default key.  Key validation will
-# not be done in this case.  The second form uses the default key as
-# default recipient.
-
-#default-recipient some-user-id
-#default-recipient-self
-
-
-# Group names may be defined like this:
-#   group mynames = paige 0x12345678 joe patti
-#
-# Any time "mynames" is a recipient (-r or --recipient), it will be
-# expanded to the names "paige", "joe", and "patti", and the key ID
-# "0x12345678".  Note there is only one level of expansion - you
-# cannot make an group that points to another group.  Note also that
-# if there are spaces in the recipient name, this will appear as two
-# recipients.  In these cases it is better to use the key ID.
-
-#group mynames = paige 0x12345678 joe patti
-
-
-# GnuPG can automatically locate and retrieve keys as needed using
-# this option.  This happens when encrypting to an email address (in
-# the "user@@example.com" form) and there are no keys matching
-# "user@example.com" in the local keyring.  This option takes any
-# number mechanisms which are tried in the given order.  The default
-# is "--auto-key-locate local" to search for keys only in the local
-# key database.  Uncomment the next line to locate a missing key using
-# two DNS based mechanisms.
-
-#auto-key-locate local,pka,dane
-
-
-# Common options for keyserver functions:
-# (Note that the --keyserver option has been moved to dirmngr.conf)
-#
-# include-disabled = when searching, include keys marked as "disabled"
-#                    on the keyserver (not all keyservers support this).
-#
-# no-include-revoked = when searching, do not include keys marked as
-#                      "revoked" on the keyserver.
-#
-# verbose = show more information as the keys are fetched.
-#           Can be used more than once to increase the amount
-#           of information shown.
-#
-# auto-key-retrieve = automatically fetch keys as needed from the keyserver
-#                     when verifying signatures or when importing keys that
-#                     have been revoked by a revocation key that is not
-#                     present on the keyring.
-#
-# no-include-attributes = do not include attribute IDs (aka "photo IDs")
-#                         when sending keys to the keyserver.
-
-keyserver-options auto-key-retrieve
-#keyserver wwwkeys.pgp.net
-#keyserver search.keyserver.net
-keyserver pgp.mit.edu
-
-# Uncomment this line to display photo user IDs in key listings and
-# when a signature from a key with a photo is verified.
-
-#show-photos
-
-
-# Use this program to display photo user IDs
-#
-# %i is expanded to a temporary file that contains the photo.
-# %I is the same as %i, but the file isn't deleted afterwards by GnuPG.
-# %k is expanded to the key ID of the key.
-# %K is expanded to the long OpenPGP key ID of the key.
-# %t is expanded to the extension of the image (e.g. "jpg").
-# %T is expanded to the MIME type of the image (e.g. "image/jpeg").
-# %f is expanded to the fingerprint of the key.
-# %% is %, of course.
-#
-# If %i or %I are not present, then the photo is supplied to the
-# viewer on standard input.  If your platform supports it, standard
-# input is the best way to do this as it avoids the time and effort in
-# generating and then cleaning up a secure temp file.
-#
-# The default program is "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin"
-# On Mac OS X and Windows, the default is to use your regular JPEG image
-# viewer.
-#
-# Some other viewers:
-# photo-viewer "qiv %i"
-# photo-viewer "ee %i"
-# photo-viewer "display -title 'KeyID 0x%k'"
-#
-# This one saves a copy of the photo ID in your home directory:
-# photo-viewer "cat > ~/photoid-for-key-%k.%t"
-#
-# Use your MIME handler to view photos:
-# photo-viewer "metamail -q -d -b -c %T -s 'KeyID 0x%k' -f GnuPG"
-
-
-# Because some mailers change lines starting with "From " to ">From "
-# it is good to handle such lines in a special way when creating
-# cleartext signatures; all other PGP versions do it this way too.
-# To enable full OpenPGP compliance you may want to use this option.
-
-#no-escape-from-lines
-
-
-# Uncomment the following option to get rid of the copyright notice
-
-#no-greeting
diff --git a/core/conf/skel/.mutt/external b/core/conf/skel/.mutt/external
deleted file mode 100644
index 8ade1b1..0000000
--- a/core/conf/skel/.mutt/external
+++ /dev/null
@@ -1,27 +0,0 @@
-color status blue default
-
-unset sendmail
-
-set folder="~/.mailext"
-set mbox_type=Maildir
-set spoolfile="~/.mailext"
-set keep_flagged=yes            # esc-f to mark messages in spool, and
-
-set mbox="~/.mailext"
-set postponed="+.Drafts"
-set record="+.Sent"
-
-set use_from=yes
-set ssl_starttls=yes
-set ssl_force_tls = yes
-
-set realname='User Name'
-set from=mail@external.org
-
-set pop_user="mail@external.org"
-set pop_pass="password"
-set pop_delete=yes
-set pop_host="pops://$pop_user:$pop_pass@pop.external.org:995"
-
-set smtp_url="smtps://$pop_user:$pop_pass@smtp.external.org/"
-
diff --git a/core/conf/skel/.mutt/gpg.rc b/core/conf/skel/.mutt/gpg.rc
deleted file mode 100644
index 2ef0ae2..0000000
--- a/core/conf/skel/.mutt/gpg.rc
+++ /dev/null
@@ -1,88 +0,0 @@
-# -*-muttrc-*-
-#
-# Command formats for gpg.
-# 
-# This version uses gpg-2comp from 
-#   http://70t.de/download/gpg-2comp.tar.gz
-#
-# $Id$
-#
-# %p    The empty string when no passphrase is needed,
-#       the string "PGPPASSFD=0" if one is needed.
-#
-#       This is mostly used in conditional % sequences.
-#
-# %f    Most PGP commands operate on a single file or a file
-#       containing a message.  %f expands to this file's name.
-#
-# %s    When verifying signatures, there is another temporary file
-#       containing the detached signature.  %s expands to this
-#       file's name.
-#
-# %a    In "signing" contexts, this expands to the value of the
-#       configuration variable $pgp_sign_as.  You probably need to
-#       use this within a conditional % sequence.
-#
-# %r    In many contexts, mutt passes key IDs to pgp.  %r expands to
-#       a list of key IDs.
-
-# Note that we explicitly set the comment armor header since GnuPG, when used
-# in some localiaztion environments, generates 8bit data in that header, thereby
-# breaking PGP/MIME.
-
-# decode application/pgp
-set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
-
-# verify a pgp/mime signature
-set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
-
-# decrypt a pgp/mime attachment
-set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
-
-# create a pgp/mime signed attachment
-# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
-set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
-
-# create a application/pgp signed (old-style) message
-# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
-set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
-
-# create a pgp/mime encrypted attachment
-# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
-set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
-
-# create a pgp/mime encrypted and signed attachment
-# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
-set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
-
-# import a key into the public key ring
-set pgp_import_command="gpg --no-verbose --import %f"
-
-# export a key from the public key ring
-set pgp_export_command="gpg --no-verbose --export --armor %r"
-
-# verify a key
-set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
-
-# read in the public key ring
-set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r"
-
-# read in the secret key ring
-set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r"
-
-# fetch keys
-# set pgp_getkeys_command="pkspxycwrap %r"
-
-# pattern for good signature - may need to be adapted to locale!
-
-# set pgp_good_sign="^gpgv?: Good signature from "
-
-# OK, here's a version which uses gnupg's message catalog:
-# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
-
-# This version uses --status-fd messages
-set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
-
-# pattern to verify a decryption occurred
-set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY"
-
diff --git a/core/conf/skel/.mutt/mail_alias b/core/conf/skel/.mutt/mail_alias
deleted file mode 100644
index e69de29..0000000
--- a/core/conf/skel/.mutt/mail_alias
+++ /dev/null
diff --git a/core/conf/skel/.mutt/muttrc b/core/conf/skel/.mutt/muttrc
deleted file mode 100644
index a56757e..0000000
--- a/core/conf/skel/.mutt/muttrc
+++ /dev/null
@@ -1,65 +0,0 @@
-set config_charset="utf-8"
-# set locale="de_CH"
-set charset="utf-8"
-set send_charset="utf-8"
-set editor="vim"
-set visual=vim
-set auto_tag
-set sort=threads
-
-set sort_browser=reverse-date
-set sort_aux=reverse-last-date-received
-set duplicate_threads=yes
-
-source ~/.mutt/gpg.rc
-
-set pgp_autosign=yes
-set pgp_sign_as=0x1D327CA1
-set pgp_replyencrypt=yes
-set pgp_timeout=1800
-
-# automatically sign all outgoing messages
-set crypt_autosign
-
-# sign only replies to signed messages
-set crypt_replysign
-
-# automatically encrypt outgoing messages
-#set crypt_autoencrypt=yes
-
-# encrypt only replies to signed messages
-set crypt_replyencrypt=yes
-
-# encrypt and sign replies to encrypted messages
-set crypt_replysignencrypted=yes
-
-# automatically verify the sign of a message when opened
-set crypt_verify_sig=yes
-
-source "~/.mutt/mail_alias"
-set alias_file=~/.mutt/mail_alias
-
-# Header
-set header_cache =~/.mutt/cache/headers
-set message_cachedir =~/.mutt/cache/bodies
-set certificate_file =~/.mutt/certificates
-
-set timeout=10    # mutt 'presses' (like) a key for you 
-                  #(while you're idle) each x sec to trigger 
-                  #the thing below
-set mail_check=5  # mutt checks for new mails on every keystroke
-                  # but not more often then once in 5 seconds
-set beep_new      # beep on new messages in the mailboxes
-
-## Local system account
-folder-hook 'Mail' 'source ~/.mutt/system'
-
-## Remote account
-folder-hook 'MailExt' 'source ~/.mutt/external'
-
-## Default account
-source "~/.mutt/system"
-
-## Shortcuts
-macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/system<enter><change-folder>!<enter>'
-macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.mutt/external<enter><change-folder>!<enter>'
diff --git a/core/conf/skel/.mutt/system b/core/conf/skel/.mutt/system
deleted file mode 100644
index ae23778..0000000
--- a/core/conf/skel/.mutt/system
+++ /dev/null
@@ -1,25 +0,0 @@
-color status green default
-
-set folder="~/.mail"
-set mbox_type=Maildir
-set spoolfile=/var/spool/mail/username
-set keep_flagged=yes
-
-set mbox="~/.mail"           # ~/.mailext/read_inbox
-set postponed="+.Drafts"
-set record="+.Sent"
-
-set use_from=yes
-
-set sendmail=/usr/sbin/exim
-set ssl_starttls=no
-set ssl_force_tls=no
-
-unset pop_user
-unset pop_pass
-unset pop_delete
-unset pop_host
-unset smtp_url
-
-set realname='username'
-set from=username@localhost
diff --git a/core/conf/skel/.vim/backup/.gitignore b/core/conf/skel/.vim/backup/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/core/conf/skel/.vim/backup/.gitignore
+++ /dev/null
diff --git a/core/conf/skel/.vim/colors/wombat256mod.vim b/core/conf/skel/.vim/colors/wombat256mod.vim
deleted file mode 100644
index 1137eb8..0000000
--- a/core/conf/skel/.vim/colors/wombat256mod.vim
+++ /dev/null
@@ -1,96 +0,0 @@
-" Vim color file
-" Original Maintainer:  Lars H. Nielsen (dengmao@gmail.com)
-" Last Change:  2010-07-23
-"
-" Modified version of wombat for 256-color terminals by
-"   David Liang (bmdavll@gmail.com)
-" based on version by
-"   Danila Bespalov (danila.bespalov@gmail.com)
-
-set background=dark
-
-if version > 580
-	hi clear
-	if exists("syntax_on")
-		syntax reset
-	endif
-endif
-
-let colors_name = "wombat256mod"
-
-
-" General colors
-hi Normal		ctermfg=252		ctermbg=234		cterm=none		guifg=#e3e0d7	guibg=#242424	gui=none
-hi Cursor		ctermfg=234		ctermbg=228		cterm=none		guifg=#242424	guibg=#eae788	gui=none
-hi Visual		ctermfg=251		ctermbg=239		cterm=none		guifg=#c3c6ca	guibg=#554d4b	gui=none
-hi VisualNOS	ctermfg=251		ctermbg=236		cterm=none		guifg=#c3c6ca	guibg=#303030	gui=none
-hi Search		ctermfg=177		ctermbg=241		cterm=none		guifg=#d787ff	guibg=#636066	gui=none
-hi Folded		ctermfg=103		ctermbg=237		cterm=none		guifg=#a0a8b0	guibg=#3a4046	gui=none
-hi Title		ctermfg=230						cterm=bold		guifg=#ffffd7					gui=bold
-hi StatusLine	ctermfg=230		ctermbg=238		cterm=none		guifg=#ffffd7	guibg=#444444	gui=italic
-hi VertSplit	ctermfg=238		ctermbg=238		cterm=none		guifg=#444444	guibg=#444444	gui=none
-hi StatusLineNC	ctermfg=241		ctermbg=238		cterm=none		guifg=#857b6f	guibg=#444444	gui=none
-hi LineNr		ctermfg=241		ctermbg=232		cterm=none		guifg=#857b6f	guibg=#080808	gui=none
-hi SpecialKey	ctermfg=241		ctermbg=235		cterm=none		guifg=#626262	guibg=#2b2b2b	gui=none
-hi WarningMsg	ctermfg=203										guifg=#ff5f55
-hi ErrorMsg		ctermfg=196		ctermbg=236		cterm=bold		guifg=#ff2026	guibg=#3a3a3a	gui=bold
-
-" Vim >= 7.0 specific colors
-if version >= 700
-hi CursorLine					ctermbg=236		cterm=none						guibg=#32322f
-hi MatchParen	ctermfg=228		ctermbg=101		cterm=bold		guifg=#eae788	guibg=#857b6f	gui=bold
-hi Pmenu		ctermfg=230		ctermbg=238						guifg=#ffffd7	guibg=#444444
-hi PmenuSel		ctermfg=232		ctermbg=192						guifg=#080808	guibg=#cae982
-endif
-
-" Diff highlighting
-hi DiffAdd						ctermbg=17										guibg=#2a0d6a
-hi DiffDelete	ctermfg=234		ctermbg=60		cterm=none		guifg=#242424	guibg=#3e3969	gui=none
-hi DiffText						ctermbg=53		cterm=none						guibg=#73186e	gui=none
-hi DiffChange					ctermbg=237										guibg=#382a37
-
-"hi CursorIM
-"hi Directory
-"hi IncSearch
-"hi Menu
-"hi ModeMsg
-"hi MoreMsg
-"hi PmenuSbar
-"hi PmenuThumb
-"hi Question
-"hi Scrollbar
-"hi SignColumn
-"hi SpellBad
-"hi SpellCap
-"hi SpellLocal
-"hi SpellRare
-"hi TabLine
-"hi TabLineFill
-"hi TabLineSel
-"hi Tooltip
-"hi User1
-"hi User9
-"hi WildMenu
-
-
-" Syntax highlighting
-hi Keyword		ctermfg=111		cterm=none		guifg=#88b8f6	gui=none
-hi Statement	ctermfg=111		cterm=none		guifg=#88b8f6	gui=none
-hi Constant		ctermfg=173		cterm=none		guifg=#e5786d	gui=none
-hi Number		ctermfg=173		cterm=none		guifg=#e5786d	gui=none
-hi PreProc		ctermfg=173		cterm=none		guifg=#e5786d	gui=none
-hi Function		ctermfg=192		cterm=none		guifg=#cae982	gui=none
-hi Identifier	ctermfg=192		cterm=none		guifg=#cae982	gui=none
-hi Type			ctermfg=186		cterm=none		guifg=#d4d987	gui=none
-hi Special		ctermfg=229		cterm=none		guifg=#eadead	gui=none
-hi String		ctermfg=113		cterm=none		guifg=#95e454	gui=italic
-hi Comment		ctermfg=246		cterm=none		guifg=#9c998e	gui=italic
-hi Todo			ctermfg=101		cterm=none		guifg=#857b6f	gui=italic
-
-
-" Links
-hi! link FoldColumn		Folded
-hi! link CursorColumn	CursorLine
-hi! link NonText		LineNr
-
-" vim:set ts=4 sw=4 noet:
diff --git a/core/conf/skel/.vim/swap/.gitignore b/core/conf/skel/.vim/swap/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/core/conf/skel/.vim/swap/.gitignore
+++ /dev/null
diff --git a/core/conf/skel/.vim/undodir/.gitignore b/core/conf/skel/.vim/undodir/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/core/conf/skel/.vim/undodir/.gitignore
+++ /dev/null
diff --git a/core/conf/skel/.vim/views/.gitignore b/core/conf/skel/.vim/views/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/core/conf/skel/.vim/views/.gitignore
+++ /dev/null
diff --git a/core/conf/skel/.vimrc b/core/conf/skel/.vimrc
deleted file mode 100644
index cf143fd..0000000
--- a/core/conf/skel/.vimrc
+++ /dev/null
@@ -1,150 +0,0 @@
-" An example for a vimrc file.
-"
-" Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last change:	2015 Mar 24
-"
-" To use it, copy it to
-"     for Unix and OS/2:  ~/.vimrc
-"	      for Amiga:  s:.vimrc
-"  for MS-DOS and Win32:  $VIM\_vimrc
-"	    for OpenVMS:  sys$login:.vimrc
-
-" When started as "evim", evim.vim will already have done these settings.
-if v:progname =~? "evim"
-  finish
-endif
-
-" Use Vim settings, rather than Vi settings (much better!).
-" This must be first, because it changes other options as a side effect.
-set nocompatible
-
-" allow backspacing over everything in insert mode
-set backspace=indent,eol,start
-
-if has("vms")
-  set nobackup		" do not keep a backup file, use versions instead
-else
-  set backup		" keep a backup file (restore to previous version)
-  set undofile		" keep an undo file (undo changes after closing)
-endif
-
-set history=50		" keep 50 lines of command line history
-set ruler		" show the cursor position all the time
-set showcmd		" display incomplete commands
-set incsearch		" do incremental searching
-
-" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
-" let &guioptions = substitute(&guioptions, "t", "", "g")
-
-" Don't use Ex mode, use Q for formatting
-map Q gq
-
-" CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo,
-" so that you can undo CTRL-U after inserting a line break.
-inoremap <C-U> <C-G>u<C-U>
-
-" In many terminal emulators the mouse works just fine, thus enable it.
-if has('mouse')
-  set mouse=a
-endif
-
-" Switch syntax highlighting on, when the terminal has colors
-" Also switch on highlighting the last used search pattern.
-if &t_Co > 2 || has("gui_running")
-  syntax on
-  set hlsearch
-  colorscheme wombat256mod
-endif
-
-" Only do this part when compiled with support for autocommands.
-if has("autocmd")
-
-  " Enable file type detection.
-  " Use the default filetype settings, so that mail gets 'tw' set to 72,
-  " 'cindent' is on in C files, etc.
-  " Also load indent files, to automatically do language-dependent indenting.
-  filetype plugin indent on
-
-  " Put these in an autocmd group, so that we can delete them easily.
-  augroup vimrcEx
-  au!
-
-  " For all text files set 'textwidth' to 78 characters.
-  autocmd FileType text setlocal textwidth=78
-
-  " When editing a file, always jump to the last known cursor position.
-  " Don't do it when the position is invalid or when inside an event handler
-  " (happens when dropping a file on gvim).
-  autocmd BufReadPost *
-    \ if line("'\"") >= 1 && line("'\"") <= line("$") |
-    \   exe "normal! g`\"" |
-    \ endif
-
-  augroup END
-
-else
-
-  set autoindent		" always set autoindenting on
-
-endif " has("autocmd")
-
-" Convenient command to see the difference between the current buffer and the
-" file it was loaded from, thus the changes you made.
-" Only define it when not defined already.
-if !exists(":DiffOrig")
-  command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
-		  \ | wincmd p | diffthis
-endif
-
-if has('langmap') && exists('+langnoremap')
-  " Prevent that the langmap option applies to characters that result from a
-  " mapping.  If unset (default), this may break plugins (but it's backward
-  " compatible).
-  set langnoremap
-endif
-
-map <F2> :tabnew
-map <F3> :tabprevious<CR>
-map <F4> :tabnext<CR>
-
-" Show Line Numbers
-set nu
-set complete=.,b,u,]
-set wildmode=longest,list:longest
-set completeopt=menu,preview
-
-" Directories
-set backupdir=~/.vim/backup
-set undodir=~/.vim/undodir
-set viewdir=~/.vim/views
-set directory=~/.vim/swap
-
-" Spell Check
-set spell spelllang=en_us
-
-" Strips whitespace
-nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
-
-" Whitespace fixes
-highlight ExtraWhitespace ctermbg=red guibg=red
-match ExtraWhitespace /\s\+$/
-autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
-autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
-autocmd InsertLeave * match ExtraWhitespace /\s\+$/
-autocmd BufWinLeave * call clearmatches()
-
-
-" For tab characters that appear 4-spaces-wide
-set tabstop=4
-" If you're using actual tab character in your source code you probably also 
-" want these settings (these are actually the defaults,set them defensively):
-set softtabstop=0 noexpandtab
-" Finally, if you want an indent to correspond to a single tab, you should also use:
-set shiftwidth=4
-" For indents that consist of 4 space characters but are entered with the tab key:
-set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
-set list
-" set past gives problems with tabs
-" set paste
-
-
=2de59d0f0927cec656fc4b9f6fc9ea178fb01c1e'>^
e6cbe9c ^
439e15d ^




439e15d ^


26e134b ^

439e15d ^




439e15d ^
dc5d967 ^
439e15d ^
7b5638f ^
439e15d ^

3399650 ^

dfd84f9 ^
da2bbd3 ^
439e15d ^


439e15d ^

83d2390 ^
dc5d967 ^
439e15d ^

59b4a5e ^
c0705ee ^
dba2306 ^
c0705ee ^
439e15d ^



adaa28a ^

0464e42 ^
adaa28a ^

dc5d967 ^
57416be ^
adaa28a ^


57416be ^
adaa28a ^















439e15d ^

439e15d ^
dc5d967 ^
439e15d ^









0053620 ^

439e15d ^




439e15d ^
dc5d967 ^

439e15d ^



3399650 ^
c09bf8d ^
dba2306 ^
b1701ad ^

3399650 ^


66da153 ^
901b3ed ^
66da153 ^
3399650 ^

c0705ee ^
3399650 ^

c09bf8d ^
c0705ee ^

3399650 ^

439e15d ^




439e15d ^


0053620 ^

439e15d ^
adaa28a ^
bf35794 ^
adaa28a ^
















0464e42 ^
adaa28a ^





a73a882 ^

adaa28a ^

a73a882 ^



adaa28a ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348



                                                              
                
 
                   
                       
                      
 
            







                               
    
 
                                                                   
 


                    


                                 
                  
 

                   
                                                                                  
                                                                           


                                                                           
                                                               





                                             
                                          

                                                         
                                                  










                                                         
                     
                      
                  
 

                   
                                                                                  

                                                                                     
                                                                
                 
                                                               





                                             
                                          



                                                                        



                                                                                     
                                                






                                                         

           

                      

              
                  
                                              
 
                                  








                                                          
                         

                              
                                     

                              
                                     
                              

                 
                                              
                         



                                    
                                                                             


                                             

                              
                                 

                              
                                                                             


                                               





                              

                           
                  

                                                           
 
                                     
                                         
                                   
                                        
                                     
                                        
                                     
                                            
                                         
                                             
                                          
                                                  
                                      
                                    
                                         





                               
                            




                                                               
                          




                        


                                                     

                                       




                      
                  
                                           
 
                                        

                       

                                       
                                   
                             


           

                 
                  
                                       

                            
                                        
                                     
                                                    
                                     



           

                   
                                                               

                       
                                 
                                


                                                                
                                                                                           















                                                         

                     
                                    
                                               









                                                                            

                                        




                         
                  

                                           



                                       
                                         
                                                     
                                                    

                               


                                                 
                                                                          
                                                                              
                                                      

                                                
                                           

                                      
                                                                              

                                     

                 




                      


                                     

                                       
 
 
            
















                                              
                                                               





                                                            

                                                                                 

                                                              



                                                                                    

         
/*
 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
 * See LICENSE file for license details.
 */
#include "dwm.h"

#include <stdlib.h>
#include <X11/keysym.h>
#include <X11/Xatom.h>

/* static */

typedef struct {
	unsigned long mod;
	KeySym keysym;
	void (*func)(Arg *arg);
	Arg arg;
} Key;

KEYS

static unsigned int valid_mask =  255 &  ~(NUMLOCKMASK | LockMask);

static void
movemouse(Client *c)
{
	int x1, y1, ocx, ocy, di;
	unsigned int dui;
	Window dummy;
	XEvent ev;

	ocx = c->x;
	ocy = c->y;
	if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
			None, cursor[CurMove], CurrentTime) != GrabSuccess)
		return;
	XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
	for(;;) {
		XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
		switch (ev.type) {
		default: break;
		case Expose:
			handler[Expose](&ev);
			break;
		case MotionNotify:
			XSync(dpy, False);
			c->x = ocx + (ev.xmotion.x - x1);
			c->y = ocy + (ev.xmotion.y - y1);
			resize(c, False, TopLeft);
			break;
		case ButtonRelease:
			XUngrabPointer(dpy, CurrentTime);
			return;
		}
	}
}

static void
resizemouse(Client *c)
{
	int ocx, ocy;
	Corner sticky;
	XEvent ev;

	ocx = c->x;
	ocy = c->y;
	if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
				None, cursor[CurResize], CurrentTime) != GrabSuccess)
		return;
	XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
	for(;;) {
		XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
		switch(ev.type) {
		default: break;
		case Expose:
			handler[Expose](&ev);
			break;
		case MotionNotify:
			XSync(dpy, False);
			c->w = abs(ocx - ev.xmotion.x);
			c->h = abs(ocy - ev.xmotion.y);
			c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
			c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
			if(ocx <= ev.xmotion.x)
				sticky = (ocy <= ev.xmotion.y) ? TopLeft : BotLeft;
			else
				sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight;
			resize(c, True, sticky);
			break;
		case ButtonRelease:
			XUngrabPointer(dpy, CurrentTime);
			return;
		}
	}
}

static void
buttonpress(XEvent *e)
{
	int x;
	Arg a;
	Client *c;
	XButtonPressedEvent *ev = &e->xbutton;

	if(barwin == ev->window) {
		switch(ev->button) {
		default:
			x = 0;
			for(a.i = 0; a.i < TLast; a.i++) {
				x += textw(tags[a.i]);
				if(ev->x < x) {
					view(&a);
					break;
				}
			}
			break;
		case Button4:
			viewnext(&a);
			break;
		case Button5:
			viewprev(&a);
			break;
		}
	}
	else if((c = getclient(ev->window))) {
		focus(c);
		switch(ev->button) {
		default:
			break;
		case Button1:
			if(!c->ismax && (arrange == dofloat || c->isfloat)) {
				higher(c);
				movemouse(c);
			}
			break;
		case Button2:
			lower(c);
			break;
		case Button3:
			if(!c->ismax && (arrange == dofloat || c->isfloat)) {
				higher(c);
				resizemouse(c);
			}
			break;
		}
	}
}

static void
configurerequest(XEvent *e)
{
	Client *c;
	XConfigureRequestEvent *ev = &e->xconfigurerequest;
	XWindowChanges wc;

	ev->value_mask &= ~CWSibling;
	if((c = getclient(ev->window))) {
		gravitate(c, True);
		if(ev->value_mask & CWX)
			c->x = ev->x;
		if(ev->value_mask & CWY)
			c->y = ev->y;
		if(ev->value_mask & CWWidth)
			c->w = ev->width;
		if(ev->value_mask & CWHeight)
			c->h = ev->height;
		if(ev->value_mask & CWBorderWidth)
			c->border = 1;
		gravitate(c, False);
		resize(c, True, TopLeft);
	}

	wc.x = ev->x;
	wc.y = ev->y;
	wc.width = ev->width;
	wc.height = ev->height;
	wc.border_width = 1;
	wc.sibling = None;
	wc.stack_mode = Above;
	ev->value_mask &= ~CWStackMode;
	ev->value_mask |= CWBorderWidth;
	XConfigureWindow(dpy, ev->window, ev->value_mask, &wc);
	XSync(dpy, False);
}

static void
destroynotify(XEvent *e)
{
	Client *c;
	XDestroyWindowEvent *ev = &e->xdestroywindow;

	if((c = getclient(ev->window)))
		unmanage(c);
}

static void
enternotify(XEvent *e)
{
	Client *c;
	XCrossingEvent *ev = &e->xcrossing;

	if(ev->detail == NotifyInferior)
		return;

	if((c = getclient(ev->window)))
		focus(c);
	else if(ev->window == root)
		issel = True;
}

static void
expose(XEvent *e)
{
	Client *c;
	XExposeEvent *ev = &e->xexpose;

	if(ev->count == 0) {
		if(barwin == ev->window)
			drawstatus();
		else if((c = getctitle(ev->window)))
			drawtitle(c);
	}
}

static void
keypress(XEvent *e)
{
	static unsigned int len = sizeof(key) / sizeof(key[0]);
	unsigned int i;
	KeySym keysym;
	XKeyEvent *ev = &e->xkey;
	ev->state &= valid_mask;

	keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
	for(i = 0; i < len; i++)
		if((keysym == key[i].keysym) && ((key[i].mod & valid_mask) == ev->state)) {
			if(key[i].func)
				key[i].func(&key[i].arg);
			return;
		}
}

static void
leavenotify(XEvent *e)
{
	XCrossingEvent *ev = &e->xcrossing;

	if((ev->window == root) && !ev->same_screen)
		issel = True;
}

static void
maprequest(XEvent *e)
{
	static XWindowAttributes wa;
	XMapRequestEvent *ev = &e->xmaprequest;

	if(!XGetWindowAttributes(dpy, ev->window, &wa))
		return;

	if(wa.override_redirect) {
		XSelectInput(dpy, ev->window,
				(StructureNotifyMask | PropertyChangeMask));
		return;
	}

	if(!getclient(ev->window))
		manage(ev->window, &wa);
}

static void
propertynotify(XEvent *e)
{
	Client *c;
	Window trans;
	XPropertyEvent *ev = &e->xproperty;

	if(ev->state == PropertyDelete)
		return; /* ignore */

	if((c = getclient(ev->window))) {
		if(ev->atom == wmatom[WMProtocols]) {
			c->proto = getproto(c->win);
			return;
		}
		switch (ev->atom) {
			default: break;
			case XA_WM_TRANSIENT_FOR:
				XGetTransientForHint(dpy, c->win, &trans);
				if(!c->isfloat && (c->isfloat = (trans != 0)))
					arrange(NULL);
				break;
			case XA_WM_NORMAL_HINTS:
				setsize(c);
				break;
		}
		if(ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
			settitle(c);
			drawtitle(c);
		}
	}
}

static void
unmapnotify(XEvent *e)
{
	Client *c;
	XUnmapEvent *ev = &e->xunmap;

	if((c = getclient(ev->window)))
		unmanage(c);
}

/* extern */

void (*handler[LASTEvent]) (XEvent *) = {
	[ButtonPress] = buttonpress,
	[ConfigureRequest] = configurerequest,
	[DestroyNotify] = destroynotify,
	[EnterNotify] = enternotify,
	[LeaveNotify] = leavenotify,
	[Expose] = expose,
	[KeyPress] = keypress,
	[MapRequest] = maprequest,
	[PropertyNotify] = propertynotify,
	[UnmapNotify] = unmapnotify
};

void
grabkeys()
{
	static unsigned int len = sizeof(key) / sizeof(key[0]);
	unsigned int i;
	KeyCode code;

	for(i = 0; i < len; i++) {
		code = XKeysymToKeycode(dpy, key[i].keysym);
		XUngrabKey(dpy, code, key[i].mod, root);
		XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root);
		XUngrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root);
		XGrabKey(dpy, code, key[i].mod, root, True,
				GrabModeAsync, GrabModeAsync);
		XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK, root, True,
				GrabModeAsync, GrabModeAsync);
		XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root, True,
				GrabModeAsync, GrabModeAsync);
	}
}