#!/bin/sh #!/usr/bin/env bash # __author__='Lilian Besson' # __email__='lilian DOT besson AT normale DOT fr' # __date__='mar. 12/03/2013 at 14h:56m:39s ' # __webaddress__='https://sites.google.com/site/naereencorp/conky' # __license__='GPL v3' # # A simple script to give the GPG id of your account to Conky # *WARNING* you have to define your GPGKEY in your ~/.bashrc # # (c) Naereen Corp. 2013 if [ "0$GPGKEY" = "0" ] then echo $(grep 'export GPGKEY=' ~/.bashrc) | sed s{'export GPGKEY='{''{ else ret=` gpg --list-secret-keys | grep "sec " | tail -n1 | sed s{'sec [0-9]*[RD]/'{''{ | sed s{' 20[01][0-9]-[0-9]*-[0-9]* \[expire'{''{ | sed s{'[[:space:]]*: 20[01][0-9]-[0-9]*-[0-9]*\]'{''{ ` if [ "0$?" = "00" ] then echo "$ret" else echo "$GPGKEY" fi fi