Bonjour
je voudrai ajouter le niveau de la baterie à la ligne de status
;; display the line-number and column-number in status line
(setq column-number-mode t)
(setq line-number-mode t)
;; display the size of file in status line
(setq size-indication-mode t)
;; display time in status line
(setq display-time t)
;; use setq-default to set it for /all/ modes
(setq-default mode-line-format
(list
;; the buffer name; the file name as a tool tip
'(:eval (propertize "%b " 'face 'font-lock-keyword-face
'help-echo (buffer-file-name)))
;; line and column
"(" ;; '%02' to set to 2 chars at least; prevents flickering
(if line-number-mode
(propertize "lin:%02l" 'face 'font-lock-type-face)
)
(if (and line-number-mode column-number-mode)
" ; "
)
(if column-number-mode
(propertize "col:%02c" 'face 'font-lock-type-face)
)
") "
;; relative position, size of file
(if size-indication-mode
(concat
"["
(propertize "%p" 'face 'font-lock-constant-face) ;; % above top
"/"
(propertize "%I" 'face 'font-lock-constant-face) ;; size
"] "
)
)
;; the current major mode for the buffer.
"["
'(:eval (propertize "%m" 'face 'font-lock-string-face
'help-echo buffer-file-coding-system))
"] "
"[" ;; insert vs overwrite mode, input-method in a tooltip
'(:eval (propertize (if overwrite-mode "Ovr" "Ins")
'face 'font-lock-preprocessor-face
'help-echo (concat "Buffer is in "
(if overwrite-mode "overwrite" "insert") " mode")))
;; was this buffer modified since the last save?
'(:eval (when (buffer-modified-p)
(concat "," (propertize "Mod"
'face 'font-lock-warning-face
'help-echo "Buffer has been modified"))))
;; is this buffer read-only?
'(:eval (when buffer-read-only
(concat "," (propertize "RO"
'face 'font-lock-type-face
'help-echo "Buffer is read-only"))))
"] "
;; add the time, with the date and the emacs uptime in the tooltip
(if display-time
'(:eval (propertize (format-time-string "%H:%M")
'help-echo
(concat (format-time-string "%c; ")
(emacs-uptime "Uptime:%hh"))))
)
" --"
;; i don't want to see minor-modes; but if you want, uncomment this:
minor-mode-alist ;; list of minor modes
"%-" ;; fill with '-'
))
que doit je ajouter à ce code
Merci