;; Xft.antialias: true
;; Xft.rgba: rgb
-;; (set-default-font "Inconsolata 15")
+(set-default-font "Inconsolata 14")
;; (package-initialize)
-(set-default-font "Bitstream vera sans mono-12")
+;; (set-default-font "Bitstream vera sans mono 12")
;; (set-default-font "Liberation Mono-13")
;; (set-default-font "DejaVu sans mono 15")
;; (set-default-font "Droid sans mono 13")
epa-file-cache-passphrase-for-symmetric-encryption t
;; And I like ascii files
epa-armor t
+ ;; This goes with in your ~/.gnupg/gpg-agent.conf:
+ ;; allow-emacs-pinentry
+ ;; allow-loopback-pinentry
+ epa-pinentry-mode 'loopback
;; tramp-default-method "ssh"
tramp-default-method "scp"
;; Dealing with the laptop battery
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defcustom ff/battery-dirs '("/sys/class/power_supply/BAT0"
- "/sys/class/power_supply/BAT1")
+(defcustom ff/battery-dirs '("/sys/class/power_supply/BAT0")
"*Where to gather the battery information")
(defcustom ff/temperature-files '("/sys/class/thermal/thermal_zone0/temp"
- "/sys/class/thermal/thermal_zone1/temp")
+ "/sys/class/thermal/thermal_zone1/temp"
+ "/sys/class/thermal/thermal_zone2/temp"
+ "/sys/class/thermal/thermal_zone3/temp"
+ "/sys/class/thermal/thermal_zone4/temp"
+ "/sys/class/thermal/thermal_zone5/temp")
"*Where to gather the thermal information")
(defun ff/file-first-line (file)
(load "vc-git")
-(defun ff/git-pull-push () (interactive)
+(defun ff/git-pull-push (universal) (interactive "P")
+ (when universal (async-shell-command "git commit -a -m \"Update\""))
(message "git pull / push ...")
(async-shell-command "git pull && git push" nil)
)
;; An encrypted file to put secure stuff (passwords, ...)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(when (ff/load-or-alert "mailcrypt")
- (mc-setversion "gpg")
- ;; Keep the passphrase for 10min
- (setq mc-passwd-timeout 600
- ff/secure-note-file "~/private/secure-notes.gpg")
- )
+(setq ff/secure-note-file "~/private/secure-notes.gpg")
+
+;; (when (ff/load-or-alert "mailcrypt")
+ ;; (mc-setversion "gpg")
+ ;; ;; Keep the passphrase for 10min
+ ;; (setq mc-passwd-timeout 600
+ ;; ff/secure-note-file "~/private/secure-notes.gpg")
+ ;; )
(defface ff/secure-date
'((t (:background "white" :weight bold)))
"Adds all the stuff to start a new python file"
(interactive)
(goto-char (point-min))
- (insert "#!/usr/bin/env python-for-pytorch
+ (insert "#!/usr/bin/env python
import math
import torch, torchvision
-from torch import Tensor
-from torch import Tensor as T
-
from torch import nn
from torch.nn import functional as F
-from torch.nn.parameter import Parameter
-from torch.nn import Module
")
(python-mode)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; If we can, encrypt!
-(autoload 'mc-install-write-mode "mailcrypt" nil t)
-(autoload 'mc-install-read-mode "mailcrypt" nil t)
+;; (autoload 'mc-install-write-mode "mailcrypt" nil t)
+;; (autoload 'mc-install-read-mode "mailcrypt" nil t)
-(add-hook 'vm-mode-hook 'mc-install-read-mode)
-(add-hook 'vm-summary-mode-hook 'mc-install-read-mode)
-(add-hook 'vm-virtual-mode-hook 'mc-install-read-mode)
-(add-hook 'vm-mail-mode-hook 'mc-install-write-mode)
-(add-hook 'vm-presentation-mode-hook 'mc-install-read-mode)
+;; (add-hook 'vm-mode-hook 'mc-install-read-mode)
+;; (add-hook 'vm-summary-mode-hook 'mc-install-read-mode)
+;; (add-hook 'vm-virtual-mode-hook 'mc-install-read-mode)
+;; (add-hook 'vm-mail-mode-hook 'mc-install-write-mode)
+;; (add-hook 'vm-presentation-mode-hook 'mc-install-read-mode)
;; (defun ff/encrypt-mail-if-possible () (interactive)
;; (condition-case nil (mc-encrypt-message)
(ff/first-buffer-in-mode (cdr l) m))))
(defun ff/compose-mail (&optional force-new)
- "Cycles through an existing buffers with major mode `mail-mode',
+ "Cycles through existing buffers with major mode `mail-mode',
or invoke `vm-compose-mail' if none can be found or if FORCE-NEW
is t."
(interactive "P")
(when (eq major-mode 'mail-mode) (bury-buffer))
(let ((buf (and (not force-new)
+ ;; (not (eq major-mode 'mail-mode))
(ff/first-buffer-in-mode (buffer-list) 'mail-mode))))
(if buf (switch-to-buffer buf)
(vm-compose-mail))))
(vm-pipe-message-to-command (concat "munpack -t -C " dir))
(message "Wrote files to %s" dir)
)
-
)
)