From 560e4ccd21d0f549ab6ab4615b451e0e5008318e Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 20 Oct 2015 23:23:01 +0200 Subject: .tmux.conf: Adding new (post 2.1) mouse mode --- .tmux.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index c969a1d..64af9f6 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -33,7 +33,8 @@ set -g set-titles-string "#T" set-option -g allow-rename on set -g history-limit 10000 -setw -g mode-mouse on +# set mouse mode on +set -g mouse on # Logout with Ctrl+D bind-key ^D detach-client -- cgit v1.2.3-70-g09d2 From 9e290b2d3c2f611d7aa9999d02b2003515c0e7b8 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 20 Oct 2015 23:23:36 +0200 Subject: .local/share/applications/pd.desktop: Shifting from pd-extended to pd. --- .local/share/applications/pd.desktop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/share/applications/pd.desktop b/.local/share/applications/pd.desktop index c56dec2..4201621 100644 --- a/.local/share/applications/pd.desktop +++ b/.local/share/applications/pd.desktop @@ -2,7 +2,7 @@ Version=1.0 Type=Application Terminal=false -Exec=pdextended +Exec=pd Name=PureData -Icon=pd-extended +Icon=pd Categories=Audio;AudioVideo;Midi;X-Alsa;X-Jack;GTK; -- cgit v1.2.3-70-g09d2 From 03ebc69eab7d645060911e8b0d8354fe94c2242c Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 20 Oct 2015 23:25:17 +0200 Subject: .mutt/gpg.rc: Updating pgp settings to be compliant with gnupg > 2.1. --- .mutt/gpg.rc | 108 +++++++++++++---------------------------------------------- 1 file changed, 24 insertions(+), 84 deletions(-) diff --git a/.mutt/gpg.rc b/.mutt/gpg.rc index 42e0929..2ee9ae8 100644 --- a/.mutt/gpg.rc +++ b/.mutt/gpg.rc @@ -1,87 +1,27 @@ -# -*-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" +set pgp_decode_command="gpg %?p? --pinentry-mode loopback --passphrase-fd 0? --no-verbose --output - %f" +set pgp_verify_command="gpg --pinentry-mode loopback --no-verbose --output - --verify %s %f" +set pgp_decrypt_command="gpg --pinentry-mode loopback --no-verbose --output - %f" +set pgp_sign_command="gpg --pinentry-mode loopback --no-verbose --output - --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_clearsign_command="gpg --pinentry-mode loopback --no-verbose --output - --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_encrypt_only_command="pgpewrap gpg --pinentry-mode loopback --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xF5A1A949 -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg --pinentry-mode loopback --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xF5A1A949 -- -r %r -- %f" +set pgp_import_command="gpg --pinentry-mode loopback --no-verbose --import -v %f" +set pgp_export_command="gpg --pinentry-mode loopback --no-verbose --export --armor %r" +set pgp_verify_key_command="gpg --pinentry-mode loopback --no-verbose --fingerprint --check-sigs %r" +set pgp_list_pubring_command="gpg --pinentry-mode loopback --no-verbose --with-colons --with-fingerprint --list-keys %r" +set pgp_list_secring_command="gpg --pinentry-mode loopback --no-verbose --with-colons --with-fingerprint --list-secret-keys %r" + + +set pgp_good_sign="^gpg: Good signature from " +set pgp_use_gpg_agent = yes +set pgp_sign_as = 0xF5A1A949 +set pgp_timeout = 60 +set crypt_autosign = yes +set crypt_replyencrypt = yes +set crypt_replysignencrypted = yes # add message-hook for non standard-compliant (old) gnupg style messages message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp" + +send-hook . 'reset crypt_autoencrypt' +source "~/.mutt/gpg-auto.rc" -- cgit v1.2.3-70-g09d2 From 9cd9a37f5a94084ee87e993c38fc825d2187b3d6 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 12:43:42 +0200 Subject: .config/khal/khal.conf, .vdirsyncer/config: Changing name of calendar. --- .config/khal/khal.conf | 2 +- .vdirsyncer/config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/khal/khal.conf b/.config/khal/khal.conf index b4e41b1..2c8d523 100644 --- a/.config/khal/khal.conf +++ b/.config/khal/khal.conf @@ -68,7 +68,7 @@ path = ~/.calendars/studiotermine_shared_by_mvoigt color = dark red [[urlaub]] -path = ~/.calendars/urlaub_shared_by_mvoigt +path = ~/.calendars/akurlaub_shared_by_mvoigt color = yellow diff --git a/.vdirsyncer/config b/.vdirsyncer/config index 2c81022..e2633af 100644 --- a/.vdirsyncer/config +++ b/.vdirsyncer/config @@ -60,7 +60,7 @@ username = dave [pair akt_calendar] a = akt_calendar_local b = akt_calendar_remote -collections = ["ak_shared_by_mvoigt", "studiotermine_shared_by_mvoigt", "rechencluster_shared_by_mvoigt", "labs_shared_by_mvoigt", "urlaub_shared_by_mvoigt", "grossesstudio_shared_by_mvoigt", "kleinesstudio_shared_by_mvoigt", "studioausleihe_shared_by_mvoigt", "studiotermine_shared_by_mvoigt"] +collections = ["ak_shared_by_mvoigt", "studiotermine_shared_by_mvoigt", "rechencluster_shared_by_mvoigt", "labs_shared_by_mvoigt", "akurlaub_shared_by_mvoigt", "grossesstudio_shared_by_mvoigt", "kleinesstudio_shared_by_mvoigt", "studioausleihe_shared_by_mvoigt", "studiotermine_shared_by_mvoigt"] [storage akt_calendar_local] type = filesystem -- cgit v1.2.3-70-g09d2 From 0f16cd2fae6fa6b40cdb15948f2d4fcd5e2b26f3 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 12:54:02 +0200 Subject: .zsh.after/export.zsh: Fixing some typos and adding additional comments. Adding XDG_RUNTIME_DIR for tmux's TMUX_TMPDIR. Moving SSH_AUTH_SOCK to XDG_RUNTIME_DIR. Separating ssh-agent and gpg-agent again. Setting GPG_TTY to current tty. Setting GPG_AGENT_INFO to empty string, so gpg-agent can be found. --- .zsh.after/export.zsh | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.zsh.after/export.zsh b/.zsh.after/export.zsh index 33774c1..865277f 100644 --- a/.zsh.after/export.zsh +++ b/.zsh.after/export.zsh @@ -1,5 +1,3 @@ -# using termite now - # use xterm-color anywhere. Sane default for color and termite if [[ -n $TMUX ]];then export TERM="screen-256color" @@ -9,7 +7,7 @@ fi # use de_DE.UTF-8 to get 24h format export LC_TIME=de_DE.UTF-8 - +# browser export BROWSER=firefox export REPORTTIME=5 @@ -22,31 +20,23 @@ fi export GREP_COLOR="1;33" -## let RVM ignore global ruby +# let RVM ignore global ruby export rvm_ignore_gemrc_issues=1 - -#Java font settings/ renderings +# Java +# font settings/ renderings export _JAVA_OPTIONS='-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' - -# Java non-reparenting windows -_JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING +# non-reparenting windows +export _JAVA_AWT_WM_NONREPARENTING=1 # GnuPG export GPG_TTY=$(tty) +export GPG_AGENT_INFO="" -if [[ "$(uname -v)" != *Debian* ]]; then - # ssh-agent setting for use with gpg-agent - unset SSH_AGENT_PID - if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then - export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh" - fi - # Explicitely starting gpg-agent in the background - gpgconf --launch gpg-agent -else - eval $(keychain --eval --agents gpg,ssh -Q --quiet ~/.ssh/id_rsa) -fi +# ssh-agent +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" +# tmux if [[ $UID -ne 0 ]]; then - export TMUX_TMPDIR="/run/user/$UID/tmux/" + export TMUX_TMPDIR="$XDG_RUNTIME_DIR/tmux/" fi -- cgit v1.2.3-70-g09d2 From e8e448e33f4d2f3713bc31eed38c9b2af9d276d5 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 12:55:06 +0200 Subject: .mutt/gpg.rc: Updating correct settings for gpg. --- .mutt/gpg.rc | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.mutt/gpg.rc b/.mutt/gpg.rc index 2ee9ae8..002730d 100644 --- a/.mutt/gpg.rc +++ b/.mutt/gpg.rc @@ -1,21 +1,8 @@ -set pgp_decode_command="gpg %?p? --pinentry-mode loopback --passphrase-fd 0? --no-verbose --output - %f" -set pgp_verify_command="gpg --pinentry-mode loopback --no-verbose --output - --verify %s %f" -set pgp_decrypt_command="gpg --pinentry-mode loopback --no-verbose --output - %f" -set pgp_sign_command="gpg --pinentry-mode loopback --no-verbose --output - --armor --detach-sign --textmode %?a?-u %a? %f" -set pgp_clearsign_command="gpg --pinentry-mode loopback --no-verbose --output - --armor --textmode --clearsign %?a?-u %a? %f" -set pgp_encrypt_only_command="pgpewrap gpg --pinentry-mode loopback --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xF5A1A949 -- -r %r -- %f" -set pgp_encrypt_sign_command="pgpewrap gpg --pinentry-mode loopback --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xF5A1A949 -- -r %r -- %f" -set pgp_import_command="gpg --pinentry-mode loopback --no-verbose --import -v %f" -set pgp_export_command="gpg --pinentry-mode loopback --no-verbose --export --armor %r" -set pgp_verify_key_command="gpg --pinentry-mode loopback --no-verbose --fingerprint --check-sigs %r" -set pgp_list_pubring_command="gpg --pinentry-mode loopback --no-verbose --with-colons --with-fingerprint --list-keys %r" -set pgp_list_secring_command="gpg --pinentry-mode loopback --no-verbose --with-colons --with-fingerprint --list-secret-keys %r" - - set pgp_good_sign="^gpg: Good signature from " set pgp_use_gpg_agent = yes set pgp_sign_as = 0xF5A1A949 set pgp_timeout = 60 +set crypt_use_gpgme = yes set crypt_autosign = yes set crypt_replyencrypt = yes set crypt_replysignencrypted = yes -- cgit v1.2.3-70-g09d2 From cbf43d8c768bf09773572f46a34c70303bebcbbe Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 13:01:33 +0200 Subject: bin/generate_pgp_auto: Adding script to generate mutt send-hooks for mail addresses with valid gpg keys, to be able to automatically send encrypted mail. --- bin/generate_pgp_auto | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 bin/generate_pgp_auto diff --git a/bin/generate_pgp_auto b/bin/generate_pgp_auto new file mode 100755 index 0000000..d9db27b --- /dev/null +++ b/bin/generate_pgp_auto @@ -0,0 +1,69 @@ +#!/bin/bash +# ~/.mutt/generate_pgp_auto +# Generate mutt pgp_auto* send-hooks from gpg pubring. +# Redirect output to file and source that in muttrc. +# Add the global hook _before_ sourcing the list: +# send-hook . 'reset pgp_autoencrypt' +# -=*# created by erAck #*=- CopyLeft Eike Rathke 2008-01-08T01:36+0100 + +# At least in an UTF-8 environment sed gets confused by 8-bit characters in +# real names and doesn't match the address anymore, an empty LANG variable +# works around. +LANG= + +# Output file +output="$HOME/.mutt/gpg-auto.rc" + +# if the file exists, delete it +if [ -f "${output}" ]; then + rm "${output}" +fi + +# 2nd gpg colon field: +# d := disabled (deprecated - use the 'D' in field 12 instead) +# e := expired +# r := revoked + +# Note that the following lines are part of the sed script passed by the shell +# and may not contain the ' character! Hence the double backslash in mail +# addresses to escape the regex . dot meta character for Mutt. +#gpg --list-keys --with-colons --fixed-list-mode --no-secmem-warning +gpg --list-keys --with-colons --fixed-list-mode --no-secmem-warning | sed -ne ' + +:START + +# ignore d|e|r keys +/^pub:[der]:/ b IGNORE + +# ignore disabled keys, D in last field (12) +/^pub:.*D[^:]*:$/ b IGNORE + +# take keys with encryption capability (E in last field), ignore without and +# other records like ^tru: +#/^pub:.*E[^:]*:$/ ! b IGNORE + +# extract uids and convert address to mutt hook and print +:EXTRACT +# ignore non-uid or no address +/^uid:[^der]:[^<]*<\([^:>]\+@[^:>]\+\)>/ ! b NUSKIP +# extract address +# somehow the colon part after \)> is needed to not produce a trailing : in output +# sed buffer problem? +s/^uid:[^der]:[^<]*<\([^:>]\+@[^:>]\+\)>[^:]*:/\1/ +# escape dot meta characters, with escaped backslash for mutt +s/\./\\\\./g +# print hook +s/\(.*\)/send-hook "!~l ~t \1" "set crypt_autoencrypt"/p +:NUSKIP +n +/^pub:/ b START +b EXTRACT + +# ignore entire key with uid/sub/... until next pub is encountered +:IGNORE +n +/^pub:/ b START +b IGNORE + +' | egrep -v 'WhatYouDontWantInThisList@example\\\\\.org' | sort -u > ${output} +# Note the triple escaped backslash! -- cgit v1.2.3-70-g09d2 From 5ffcd0717b13dc65f3f853e41416e9d856e73dad Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 13:04:26 +0200 Subject: .gitignore: Adding .mutt/gpg-auto.rc, as it will have to be re-generated via script before useage of mutt. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 52023a8..1ccd555 100644 --- a/.gitignore +++ b/.gitignore @@ -270,6 +270,7 @@ svn/ .mpdscribble/ .mplayer/ .muttator/ +.mutt/gpg-auto.rc .mutt/mailboxes.rc .mysql* .ncftp/ -- cgit v1.2.3-70-g09d2 From d76350d84bd6e6726269117ad75de3095d6f6040 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 13:06:56 +0200 Subject: .gitignore: Adding bin/pass2offlineimapc, as it will be re-generated upon usage. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1ccd555..7ceb430 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ Music/ Pictures/ Videos/ backup/ +bin/pass2offlineimapc build/ git/ ownCloud/ -- cgit v1.2.3-70-g09d2 From b289864e3912683ca8d7b57c70cce03d185fbb2d Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 13:08:06 +0200 Subject: .gitignore: Adding make/ folder to the list of ignored folder. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7ceb430..66c9edd 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ backup/ bin/pass2offlineimapc build/ git/ +make/ ownCloud/ svn/ -- cgit v1.2.3-70-g09d2 From 995892dc2105fa5c89b7f7ae32db46104b5c9e56 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 22 Oct 2015 15:43:39 +0200 Subject: .tmux.conf: Adding tmux > 2.1 mouse scrolling options. --- .tmux.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.tmux.conf b/.tmux.conf index 64af9f6..546fda7 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -36,6 +36,15 @@ set -g history-limit 10000 # set mouse mode on set -g mouse on +# Wheel scroll in pane +unbind -T root WheelUpPane +unbind -T root WheelDownPane +bind -T root WheelUpPane if -Ft= '#{mouse_any_flag}' 'send-keys -M' 'if -Ft= "#{pane_in_mode}" "send-keys -M" "copy-mode -u"' + +# Wheel scroll in pane WHILE in copy-mode +bind -tvi-copy WheelUpPane halfpage-up +bind -tvi-copy WheelDownPane halfpage-down + # Logout with Ctrl+D bind-key ^D detach-client -- cgit v1.2.3-70-g09d2