From: Mart Lubbers Date: Tue, 2 Dec 2014 06:54:22 +0000 (+0100) Subject: some vim stuff and x, i3 gpg X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;ds=sidebyside;h=3ce5198b704dba3e81a61d67e431f45a0f4e3ff4;p=dotfiles.git some vim stuff and x, i3 gpg --- diff --git a/.Xresources b/.Xresources index 6a4e18d..a244959 100644 --- a/.Xresources +++ b/.Xresources @@ -5,26 +5,43 @@ Xft.lcdfilter: lcddefault Xft.rgba: rgb Xft.dpi: 96 -URxvt*background: Black -URxvt*foreground: Gray75 -URxvt*fading: 25 -URxvt*font: xft:DejaVu Sans Mono:style=Book:pixelsize=12 -URxvt*boldFont: DejaVu Sans Mono:style=Bold:pixelsize=12 -URxvt*italicFont: DejaVu Sans Mono:style=Oblique:pixelsize=12 -URxvt*boldItalicFont: DejaVu Sans Mono:style=Bold Oblique:pixelsize=12 -URxvt*urgentOnBell: 1 -URxvt*visualBell: 1 -URxvt*loginShell: 1 -URxvt*scrollBar: 0 -URxvt*saveLines: 10000 -URxvt*internalBorder: 1 -URxvt*externalBorder: 1 -URxvt*mouseWheelScrollPage: 0 -URxvt*pastableTabs: 1 -URxvt*cursorBlink: 0 -URxvt*perl-lib: /home/mart/.urxvt/ext -URxvt*perl-ext-common: font-size -URxvt*perl-ext: string +URxvt.background: rgb:00/00/00 +URxvt.foreground: rgb:a8/a8/a8 +Urxvt.color0: rgb:00/00/00 +Urxvt.color1: rgb:a8/00/00 +Urxvt.color2: rgb:00/a8/00 +Urxvt.color3: rgb:a8/54/00 +Urxvt.color4: rgb:00/00/a8 +Urxvt.color5: rgb:a8/00/a8 +Urxvt.color6: rgb:00/a8/a8 +Urxvt.color7: rgb:a8/a8/a8 +Urxvt.color8: rgb:54/54/54 +Urxvt.color9: rgb:fc/54/54 +Urxvt.color10: rgb:54/fc/54 +Urxvt.color11: rgb:fc/fc/54 +Urxvt.color12: rgb:54/54/fc +Urxvt.color13: rgb:fc/54/fc +Urxvt.color14: rgb:54/fc/fc +Urxvt.color15: rgb:fc/fc/fc +Urxvt.colorBD: rgb:fc/fc/fc +URxvt.fading: 25 +URxvt.font: xft:DejaVu Sans Mono:style=Book:pixelsize=12 +URxvt.boldFont: DejaVu Sans Mono:style=Bold:pixelsize=12 +URxvt.italicFont: DejaVu Sans Mono:style=Oblique:pixelsize=12 +URxvt.boldItalicFont: DejaVu Sans Mono:style=Bold Oblique:pixelsize=12 +URxvt.urgentOnBell: 1 +URxvt.visualBell: 1 +URxvt.loginShell: 1 +URxvt.scrollBar: 0 +URxvt.saveLines: 10000 +URxvt.internalBorder: 1 +URxvt.externalBorder: 1 +URxvt.mouseWheelScrollPage: 0 +URxvt.pastableTabs: 1 +URxvt.cursorBlink: 0 +URxvt.perl-lib: /home/mart/.urxvt/ext +URxvt.perl-ext-common: font-size +URxvt.perl-ext: string URxvt.keysym.C-Up: perl:font-size:increase URxvt.keysym.C-Down: perl:font-size:decrease URxvt.keysym.C-Left: perl:font-size:reset diff --git a/.bashrc b/.bashrc index d7eb318..c7c30d0 100644 --- a/.bashrc +++ b/.bashrc @@ -6,7 +6,7 @@ shopt -s histappend export TERMINAL=urxvtc export EDITOR=vim export TERM=screen -export BROWSER= +export BROWSER=firefox export HISTFILESIZE=10000 export HISTSIZE=100000 @@ -14,3 +14,5 @@ export HISTCONTROL=ignoreboth alias ls='ls --color=auto' alias grep='grep --color=auto' + +[ ! -s ~/.config/mpd/pid ] && mpd diff --git a/.gitmodules b/.gitmodules index f5f5002..a88024b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "urxvt-font-size"] path = urxvt-font-size url = https://github.com/majutsushi/urxvt-font-size +[submodule ".vim/bundle/vim-gnupg"] + path = .vim/bundle/vim-gnupg + url = https://github.com/jamessan/vim-gnupg diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf new file mode 100644 index 0000000..360079f --- /dev/null +++ b/.gnupg/gpg-agent.conf @@ -0,0 +1 @@ +default-cache-ttl 3600 diff --git a/.gnupg/gpg.conf b/.gnupg/gpg.conf new file mode 100644 index 0000000..0dd69bd --- /dev/null +++ b/.gnupg/gpg.conf @@ -0,0 +1,197 @@ +# 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 man page for a list of options. + +# Uncomment the following option to get rid of the copyright notice + +no-greeting + +# 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 + +# By default GnuPG creates version 4 signatures for data files as +# specified by OpenPGP. Some earlier (PGP 6, PGP 7) versions of PGP +# require the older version 3 signatures. Setting this option forces +# GnuPG to create version 3 signatures. + +#force-v3-sigs + +# 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 + +# When verifying a signature made from a subkey, ensure that the cross +# certification "back signature" on the subkey is present and valid. +# This protects against a subtle attack against subkeys that can sign. +# Defaults to --no-require-cross-certification. However for new +# installations it should be enabled. + +require-cross-certification + + +# If you do not use the Latin-1 (ISO-8859-1) charset, you should tell +# GnuPG which is the native character set. Please check the man page +# for supported character sets. This character set is only used for +# metadata and not for the actual message which does not undergo any +# translation. Note that future version of GnuPG will change to UTF-8 +# as default character set. + +charset utf-8 + +# 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 + +# Some old Windows platforms require 8.3 filenames. If your system +# can handle long filenames, uncomment this. + +#no-mangle-dos-filenames + +# Lock the file only once for the lifetime of a process. If you do +# not define this, the lock will be obtained and released every time +# it is needed - normally this is not needed. + +#lock-once + +# GnuPG can send and receive keys to and from a keyserver. These +# servers can be HKP, email, or LDAP (if GnuPG is built with LDAP +# support). +# +# Example HKP keyservers: +# hkp://keys.gnupg.net +# +# Example LDAP keyservers: +# ldap://pgp.surfnet.nl:11370 +# +# Regular URL syntax applies, and you can set an alternate port +# through the usual method: +# hkp://keyserver.example.net:22742 +# +# If you have problems connecting to a HKP server through a buggy http +# proxy, you can use keyserver option broken-http-proxy (see below), +# but first you should make sure that you have read the man page +# regarding proxies (keyserver option honor-http-proxy) +# +# Most users just set the name and type of their preferred keyserver. +# Note that most servers (with the notable exception of +# ldap://keyserver.pgp.com) synchronize changes with each other. Note +# also that a single server name may actually point to multiple +# servers via DNS round-robin. hkp://keys.gnupg.net is an example of +# such a "server", which spreads the load over a number of physical +# servers. To see the IP address of the server actually used, you may use +# the "--keyserver-options debug". + +keyserver hkp://keys.gnupg.net +#keyserver http://http-keys.gnupg.net +#keyserver mailto:pgp-public-keys@keys.nl.pgp.net + +# Common options for keyserver functions: +# +# 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. +# +# use-temp-files = use temporary files instead of a pipe to talk to the +# keyserver. Some platforms (Win32 for one) always +# have this on. +# +# keep-temp-files = do not delete temporary files after using them +# (really only useful for debugging) +# +# honor-http-proxy = if the keyserver uses HTTP, honor the http_proxy +# environment variable +# +# broken-http-proxy = try to work around a buggy HTTP proxy +# +# 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 + +# 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" +armor +use-agent diff --git a/.mutt/msmtprc b/.mutt/msmtprc new file mode 100644 index 0000000..cd701d0 --- /dev/null +++ b/.mutt/msmtprc @@ -0,0 +1,8 @@ +account net +host mail.martlubbers.net +port 587 +auth on +tls on +tls_certcheck off +passwordeval gpg -qdb --use-agent ~/pw/mail.asc | grep -A4 "^mart@martlubbers.net" | grep -Po "(?<=pass: ).*" +from mart@martlubbers.net diff --git a/.mutt/muttrc b/.mutt/muttrc new file mode 100644 index 0000000..6a2d903 --- /dev/null +++ b/.mutt/muttrc @@ -0,0 +1,87 @@ +set from="mart@martlubbers.net" +set use_from="yes +set envelope_from=yes + +set sendmail="msmtp -C /home/mart/.mutt/msmtp" + +macro index,pager $ "offlineimap -c ~/.mutt/offlineimaprc &" "Force refresh" +macro index,pager \cb "| urlview\n" + +set mbox_type=Maildir +set folder=~/.mutt/mail +set spoolfile=+/INBOX/ +set record=+/Sent/ +# set trash=+/Trash/ +set postponed=+/Drafts/ +set mask="!^\\.[^.]" +set timeout=2 +set mail_check=0 +source ~/.mutt/mailboxes + +unset wait_key +unset markers +set sort_browser=alpha +set sort=threads +set sort_aux=date +set editor=vim +set duplicate_threads=yes +ignore headers * +unignore headers from to subject date cc + +set pager_index_lines=20 +set pager_context=3 +set pager_stop +set menu_scroll +set tilde +set quote_regexp="^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" + +set alias_file=~/.mutt/alias +source ~/.mutt/alias + +set include=yes +set delete=yes +set confirmappend=yes +set fast_reply=yes + +color normal white default +color attachment brightyellow default +color hdrdefault cyan default +color indicator default cyan +color markers brightred default +color quoted green default +color signature cyan default +color status brightgreen blue +color tilde blue default +color tree red default +color body brightred default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ +color body brightblue default (https?|ftp)://[\-\.\,/%~_:?\#a-zA-Z0-9]+ +color quoted1 brightyellow default +color quoted2 red default +color hdrdefault cyan default +color signature cyan default +color index green default ~p +color index brightyellow default ~N +color index blue default ~T +color index red default ~D +color index brightblue default ~F + +set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f" +set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" +set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f" +set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_import_command="gpg --no-verbose --import -v %f" +set pgp_export_command="gpg --no-verbose --export --armor %r" +set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" +set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" +set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" +set pgp_sign_as=0xAD3FEBE7 +set pgp_timeout=60 +set pgp_good_sign="^gpg: Good signature from" +set crypt_autosign +set crypt_replysign +set crypt_replysignencrypted=yes +set crypt_verify_sig=yes + +message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp" diff --git a/.mutt/offlineimap.py b/.mutt/offlineimap.py new file mode 100644 index 0000000..46a4aa8 --- /dev/null +++ b/.mutt/offlineimap.py @@ -0,0 +1,11 @@ +#!/bin/env python +# -*- coding: utf-8 -*- + +import subprocess + +def mailpasswd(): + args = '/home/mart/.config/i3/gpass.sh mart@martlubbers.net' + try: + return subprocess.check_output(args, shell='/bin/bash').strip() + except subprocess.CalledProcessError: + return "" diff --git a/.mutt/offlineimaprc b/.mutt/offlineimaprc new file mode 100644 index 0000000..992f968 --- /dev/null +++ b/.mutt/offlineimaprc @@ -0,0 +1,30 @@ +[general] +pythonfile = ~/.mutt/offlineimap.py +metadata = ~/.mutt/offlineimap_meta +accounts = net +ui = quiet + +[Account net] +localrepository = Local +remoterepository = Remote +postsynchook = notmuch new + +[Repository Local] +type = Maildir +localfolders = ~/.mutt/mail + +[Repository Remote] +type = IMAP +remotepasseval = mailpasswd() +remotehost = mail.martlubbers.net +remoteuser = mart@martlubbers.net +ssl = yes +cert_fingerprint = bb330825807b130ef600f6fcacb67196788b07b5 + +[mbnames] +enabled = yes +filename = ~/.mutt/mailboxes +header = "mailboxes " +peritem = "~/.mutt/mail/%(foldername)s/" +sep = " " +footer = "\n" diff --git a/.vim/autoload/pathogen.vim b/.vim/autoload/pathogen.vim new file mode 100644 index 0000000..a13ae08 --- /dev/null +++ b/.vim/autoload/pathogen.vim @@ -0,0 +1,347 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.3 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke +" pathogen#surround(). Curly braces are expanded with pathogen#expand(): +" "bundle/{}" finds all subdirectories inside "bundle" inside all directories +" in the runtime path. +function! pathogen#infect(...) abort + for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] + if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' + call pathogen#surround(path) + elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#surround(path . '/{}') + elseif path =~# '[{}*]' + call pathogen#interpose(path) + else + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#interpose(path . '/{}') + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort "{{{1 + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" Section: Deprecated + +function! s:warn(msg) abort + echohl WarningMsg + echomsg a:msg + echohl NONE +endfunction + +" Prepend all subdirectories of path to the rtp, and append all 'after' +" directories in those subdirectories. Deprecated. +function! pathogen#runtime_prepend_subdirectories(path) abort + call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') + return pathogen#surround(a:path . pathogen#slash() . '{}') +endfunction + +function! pathogen#incubate(...) abort + let name = a:0 ? a:1 : 'bundle/{}' + call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') + return pathogen#interpose(name) +endfunction + +" Deprecated alias for pathogen#interpose(). +function! pathogen#runtime_append_all_bundles(...) abort + if a:0 + call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') + else + call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') + endif + return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') +endfunction + +if exists(':Vedit') + finish +endif + +let s:vopen_warning = 0 + +function! s:find(count,cmd,file,lcd) + let rtp = pathogen#join(1,pathogen#split(&runtimepath)) + let file = pathogen#runtime_findfile(a:file,a:count) + if file ==# '' + return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" + endif + if !s:vopen_warning + let s:vopen_warning = 1 + let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' + else + let warning = '' + endif + if a:lcd + let path = file[0:-strlen(a:file)-2] + execute 'lcd `=path`' + return a:cmd.' '.pathogen#fnameescape(a:file) . warning + else + return a:cmd.' '.pathogen#fnameescape(file) . warning + endif +endfunction + +function! s:Findcomplete(A,L,P) + let sep = pathogen#slash() + let cheats = { + \'a': 'autoload', + \'d': 'doc', + \'f': 'ftplugin', + \'i': 'indent', + \'p': 'plugin', + \'s': 'syntax'} + if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) + let request = cheats[a:A[0]].a:A[1:-1] + else + let request = a:A + endif + let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' + let found = {} + for path in pathogen#split(&runtimepath) + let path = expand(path, ':p') + let matches = split(glob(path.sep.pattern),"\n") + call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') + call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') + for match in matches + let found[match] = 1 + endfor + endfor + return sort(keys(found)) +endfunction + +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) + +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/.vim/bundle/vim-gnupg b/.vim/bundle/vim-gnupg new file mode 160000 index 0000000..2099978 --- /dev/null +++ b/.vim/bundle/vim-gnupg @@ -0,0 +1 @@ +Subproject commit 20999789f879878aeff6ed73d3c0c187677713ea diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..f37700e --- /dev/null +++ b/.xinitrc @@ -0,0 +1,13 @@ +xrdb -merge ~/.Xresources + +envfile="$HOME/.gnupg/gpg-agent.env" +if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null +then + eval "$(cat "$envfile")" +else + eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")" +fi +export GPG_AGENT_INFO +export SSH_AUTH_SOCK + +exec i3 diff --git a/i3/bar b/i3/bar new file mode 100755 index 0000000..fe1c8d0 --- /dev/null +++ b/i3/bar @@ -0,0 +1,6 @@ +#!/bin/bash +while true; +do + date + sleep 1 +done diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..33e644b --- /dev/null +++ b/i3/config @@ -0,0 +1,156 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +exec setxkbmap dvorak +exec xautolock -locker i3lock -time 5 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +font pango:DejaVu Sans Mono 8 +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+apostrophe kill + +# start dmenu (a program launcher) +bindsym $mod+e exec dmenu_run +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+t focus down +bindsym $mod+n focus up +bindsym $mod+s focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+t move down +bindsym $mod+Shift+n move up +bindsym $mod+Shift+s move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+d split h + +# split in vertical orientation +bindsym $mod+k split v + +# enter fullscreen mode for the focused container +bindsym $mod+u fullscreen + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+o layout stacking +bindsym $mod+comma layout tabbed +bindsym $mod+period layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# reload the configuration file +bindsym $mod+Shift+j reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+p restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+period exec i3-msg exit + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym t resize grow height 10 px or 10 ppt + bindsym n resize shrink height 10 px or 10 ppt + bindsym s resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+p mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command ~/.config/i3/bar +} diff --git a/i3/gpass.sh b/i3/gpass.sh new file mode 100755 index 0000000..6310572 --- /dev/null +++ b/i3/gpass.sh @@ -0,0 +1,2 @@ +#!/bin/bash +gpg --quiet --batch --use-agent -d ~/pw/mail.asc | grep -A999 "$1" | grep -B999 -m1 "}}}" | grep -Po "(?<=pass: ).*"