summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2013-06-01 13:58:10 (GMT)
committer Jaromil <jaromil@dyne.org>2013-06-01 13:58:10 (GMT)
commita4a2f50b5b2f3766ffa1aedeb7f657775530e6e7 (patch)
tree0f52ad452749821cd7ca6ef87b93a3a6b46903b4
parent267561040443d81bf5218eafa2921ca8dd6f34d1 (diff)
EPA crypto mode with usability fixes
-rw-r--r--elisp/autorg.el38
-rw-r--r--elisp/osx.el4
-rw-r--r--elisp/pwgen.el13
-rwxr-xr-xmac/pack.sh4
4 files changed, 43 insertions, 16 deletions
diff --git a/elisp/autorg.el b/elisp/autorg.el
index 93dc2d8..8e951ee 100644
--- a/elisp/autorg.el
+++ b/elisp/autorg.el
@@ -73,11 +73,15 @@ org-crypt org-remember org-agenda)))
(require 'epa)
(require 'epa-file)
(epa-file-enable)
-(add-to-list 'auto-mode-alist '("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file))
+(setq epa-armor t) ; armor in ascii for mobile-org compat
+(add-to-list 'auto-mode-alist '("\\(\\.gpg\\|\\.asc\\)\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file))
;; (require 'pgg)
(require 'org-crypt)
(org-crypt-use-before-save-magic)
+; password generation
+(require 'pwgen)
+
; enables semantic mode
; (semantic-mode t)
;
@@ -152,6 +156,7 @@ org-crypt org-remember org-agenda)))
'(ispell-library-directory (concat AutOrgRes "/dict"))
'(browse-url-firefox-program "open")
'(column-number-mode t)
+ '(epa-file-name-regexp "\\(\\.gpg\\|\\.asc\\)\\(~\\|\\.~[0-9]+~\\)?\\'")
'(keyboard-coding-system (quote mule-utf-8))
'(line-number-mode t)
'(nil nil t)
@@ -164,6 +169,14 @@ org-crypt org-remember org-agenda)))
'(word-count-non-character-regexp "[
]")
'(x-select-enable-clipboard t)
+
+ ; creator tag in exported
+ (custom-set-variables
+ '(org-export-latex-hyperref-options-format "\\hypersetup{
+ pdfkeywords={%s},
+ pdfsubject={%s},
+ pdfcreator={AutOrg (org-mode %s) <http://autorg.dyne.org>}}
+"))
)
;; X selection manipulation
@@ -247,7 +260,16 @@ org-crypt org-remember org-agenda)))
(ido-mode t)
(setq ido-enable-flex-matching t)
-; appearance
+; folding mode
+(require 'folding)
+; (folding-mode-add-find-file-hook)
+(global-set-key [backtab] 'folding-toggle-show-hide)
+;; (put 'narrow-to-defun 'disabled nil)
+;; (put 'narrow-to-page 'disabled nil)
+;; (put 'narrow-to-region 'disabled nil)
+
+
+;;;; appearance
; load color-themes extension
(require 'color-theme)
@@ -261,20 +283,12 @@ org-crypt org-remember org-agenda)))
;; set our favourite: Anonymous!
(set-face-font
'default "-*-Anonymous-normal-normal-normal-*-13-*-*-*-*-*-*")
+; another lovely typeface for coding is Inconsolata
+; 'default "-*-Inconsolata-normal-normal-normal-*-18-*-*-*-*-*-*")
; transparency (thanks dreamer!)
(set-frame-parameter (selected-frame) 'alpha '(95 50))
(add-to-list 'default-frame-alist '(alpha 95 50))
-; creator tag in exported
-(custom-set-variables
- '(org-export-latex-hyperref-options-format "\\hypersetup{
- pdfkeywords={%s},
- pdfsubject={%s},
- pdfcreator={AutOrg (org-mode %s) <http://autorg.dyne.org>}}
-"))
-
-
-
; start listening to commandline invokations
(server-start)
diff --git a/elisp/osx.el b/elisp/osx.el
index 029bdca..465f795 100644
--- a/elisp/osx.el
+++ b/elisp/osx.el
@@ -61,9 +61,7 @@
(lambda () (interactive) (kill-buffer (current-buffer))))
(global-set-key [(hyper .)] 'keyboard-quit)
;; I disabled this since I want to avoid hitting Cmd-q accidentally.
-(global-set-key [(hyper q)] 'save-buffers-kill-emacs)
-;; I disabled this since I want to avoid hitting Cmd-q accidentally.
-(global-set-key [(hyper q)] 'save-buffers-kill-emacs)
+; (global-set-key [(hyper q)] 'save-buffers-kill-emacs)
; (require 'redo)
(global-set-key [(hyper z)] 'undo)
(global-set-key [(hyper shift z)] 'redo)
diff --git a/elisp/pwgen.el b/elisp/pwgen.el
new file mode 100644
index 0000000..df76d03
--- /dev/null
+++ b/elisp/pwgen.el
@@ -0,0 +1,13 @@
+; Very small wrapper to pwgen for rapid password generation
+; by Jaromil @ dyne.org
+
+(provide 'pwgen)
+
+(defun* pwgen ()
+ "Generate a random password using pwgen and saves it into clipboard"
+ (interactive)
+ (kill-new (shell-command-to-string "pwgen 16 -1s"))
+ (message "New random password saved in killring, ready to paste")
+ )
+
+
diff --git a/mac/pack.sh b/mac/pack.sh
index 6c1ae5d..2699c7a 100755
--- a/mac/pack.sh
+++ b/mac/pack.sh
@@ -46,6 +46,8 @@ rsync -ra ../spell/dict AutOrg.app/Contents/Resources/AutOrg/
# GnuPG for EPA encryption (provided by brew)
if [ -r AutOrg.app/Contents/Resources/AutOrg/gpg ]; then
chmod +w AutOrg.app/Contents/Resources/AutOrg/gpg; fi
-cp /usr/local/bin/gpg AutOrg.app/Contents/Resources/AutOrg/
+cp brew/gpg AutOrg.app/Contents/Resources/AutOrg/
+cp brew/pwgen AutOrg.app/Contents/Resources/AutOrg/
+
echo "Done."