X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=emacs.el;h=03b2bb9da5c2299053eb45807e2e3af02c7ad8da;hp=f8712711a0f5efb9ca437549060795fa4d6f904c;hb=0785fb27e9d9eeb8d19dd8e1bfad8e520b04bb4c;hpb=dc6529fdef55c5332ce01ba80abe421236a23f02 diff --git a/emacs.el b/emacs.el index f871271..03b2bb9 100644 --- a/emacs.el +++ b/emacs.el @@ -130,8 +130,14 @@ load-warning buffer in case of failure." ;; make emacs use the clipboard so that copy/paste works for other ;; x-programs. I have no clue how all that clipboard thing works. + ;; (setq x-select-enable-clipboard t) ;; (setq interprogram-paste-function 'x-cut-buffer-or-selection-value) +;; (setq x-select-enable-primary t) +;; (setq x-select-enable-clipboard t) +;; (global-set-key "\C-y" 'clipboard-yank) + + (setq @@ -830,8 +836,10 @@ printer." (ff/battery-percent "energy")))) ((string= battery-status "Discharging") - (format "B%d%%" (max (ff/battery-percent "charge") - (ff/battery-percent "energy")))) + (let* ((c (max (ff/battery-percent "charge") + (ff/battery-percent "energy"))) + (s (format "B%d%%" c))) + (if (>= c 20) s (propertize s 'face 'font-lock-warning-face)))) (t battery-status)