Permalink
Browse files

Merge branch 'master' of github.com:russell/dotfiles

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
  • Loading branch information...
2 parents 973f74e + 66e5c1c commit 85ec2053deabfda76738eab77801c984080a3fff @russell committed Jul 30, 2012
Showing with 43 additions and 24 deletions.
  1. +5 −1 .gitignore
  2. +2 −2 emacs
  3. +2 −2 emacs.d/init-programming.d/puppet.el
  4. +10 −10 emacs.d/init.d/20-editing.el
  5. +24 −9 stumpwmrc
View
@@ -2,4 +2,8 @@ vim/cache
emacs.d/ac-comphist.dat
emacs.d/el-get/
*.pyc
-emacs.d/url/cache/
+/emacs.d/.ido.last
+/emacs.d/.org-id-locations
+/emacs.d/.project-roots
+/emacs.d/oauth2.plstore
+/emacs.d/url
View
@@ -25,11 +25,11 @@
'(custom-enabled-themes (quote (tango-plus))))
-; recompile hot key
+;; recompile hot key
(global-set-key (kbd "<f9>") 'recompile)
-; Scrolling
+;; Scrolling
;(require 'smooth-scrolling)
;; scroll one line at a time (less "jumpy" than defaults)
;(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
@@ -26,11 +26,11 @@
(flymake-puppet-load)
(flymake-start-syntax-check)))
-;; Indent with tabs
+;; Indent without tabs
(add-hook 'puppet-mode-hook
(lambda ()
(make-local-variable 'indent-tabs-mode)
- (setq indent-tabs-mode t)))
+ (setq indent-tabs-mode nil)))
;; Trim whitespace
(add-hook 'puppet-mode-hook
@@ -65,17 +65,17 @@
; store temporary files in home directory
-;; (defvar user-temporary-file-directory
-;; (concat temporary-file-directory user-login-name "/"))
-;; (make-directory user-temporary-file-directory t)
+(defvar user-temporary-file-directory
+ (concat temporary-file-directory user-login-name "/"))
+(make-directory user-temporary-file-directory t)
(setq backup-by-copying t)
-;; (setq backup-directory-alist
-;; `(("." . ,user-temporary-file-directory)
-;; (,tramp-file-name-regexp ,user-temporary-file-directory)))
-;; (setq auto-save-list-file-prefix
-;; (concat user-temporary-file-directory ".auto-saves-"))
-;; (setq auto-save-file-name-transforms
-;; `((".*" ,user-temporary-file-directory t)))
+(setq backup-directory-alist
+ `(("." . ,user-temporary-file-directory)
+ (,tramp-file-name-regexp ,user-temporary-file-directory)))
+(setq auto-save-list-file-prefix
+ (concat user-temporary-file-directory ".auto-saves-"))
+(setq auto-save-file-name-transforms
+ `((".*" ,user-temporary-file-directory t)))
;; source: http://steve.yegge.googlepages.com/my-dot-emacs-file
View
@@ -193,15 +193,30 @@ focus it."
;; Gnome Settings
(run-shell-command "/usr/bin/gnome-settings-daemon")
;; GNOME Keyring
-(run-shell-command "/usr/bin/gnome-keyring-daemon")
-;; GNOME Keyring: GPG Agent
-(run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=gpg")
-;; GNOME Keyring: Secret Service
-(run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=secrets")
-;; GNOME Keyring: PKCS#11 Component
-(run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=pkcs11")
-;; GNOME Keyring: SSH Agent
-(run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=ssh")
+
+;; ;; GNOME Keyring: GPG Agent
+;; (run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=gpg")
+;; ;; GNOME Keyring: Secret Service
+;; (run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=secrets")
+;; ;; GNOME Keyring: PKCS#11 Component
+;; (run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=pkcs11")
+;; ;; GNOME Keyring: SSH Agent
+;; (run-shell-command "/usr/bin/gnome-keyring-daemon --start --components=ssh")
+
+
+(let* ((output (run-shell-command "/usr/bin/gnome-keyring-daemon --start" t))
+ (lines (loop :for i = 0 :then (1+ j)
+ :as j = (position #\linefeed output :start i)
+ :collect (subseq output i j)
+ :while j)))
+ (dolist (line lines)
+ (when (> (length line) 0)
+ (let ((env-var (loop :for i = 0 :then (1+ j)
+ :as j = (position #\= line :start i)
+ :collect (subseq line i j)
+ :while j)))
+
+ (sb-posix:setenv (car env-var) (cadr env-var) 1)))))
;; Currently i have to run these by hand to get a working gpgagent
;(sb-posix:setenv "GPG_AGENT_INFO" "/tmp/keyring-ssh9yh/gpg:0:1" 0)

0 comments on commit 85ec205

Please sign in to comment.