X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=emacs.el;h=6dc9356eef710a8234bbf6ff20e136c7a07b4365;hp=d9d2ec5b7014346e289488d7769c4d161edcb6ce;hb=e61bde32719843a643f003ed0e85914495adc3ee;hpb=b01b564e2f6c23ab0b5440c7473c724901c600f5 diff --git a/emacs.el b/emacs.el index d9d2ec5..6dc9356 100644 --- a/emacs.el +++ b/emacs.el @@ -31,11 +31,11 @@ ;; 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") @@ -231,6 +231,10 @@ load-warning buffer in case of failure." 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" @@ -816,12 +820,15 @@ printer." ;; 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) @@ -1215,7 +1222,8 @@ goback argument, go back where we were." (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) ) @@ -1314,12 +1322,14 @@ ff/known-address-face is used." ;; 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))) @@ -1796,19 +1806,14 @@ require 'optim' "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)