[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TRAMP and faces

From: Peter Dyballa
Subject: Re: TRAMP and faces
Date: Sat, 5 Dec 2009 12:21:41 +0100

Am 04.12.2009 um 09:55 schrieb Barrie:

What I'm looking for is a way to make the background of the mode- line red
when running a buffer through tramp.

Here is a message cited from last year (2008-11-13):

Nordlöw> I would like to visually hint that I am editing a buffer as
Nordlöw> root (using TRAMP) by setting the background to a slightly more
Nordlöw> red color. What hooks are involved?

Exemple to change the header line :

(defun my-tramp-header-line-function ()
 (when (string-match "^/su\\(do\\)?:" default-directory)
   (setq header-line-format
(format-mode-line "----- THIS BUFFER IS VISITED WITH ROOT PRIVILEGES -----"

(add-hook 'find-file-hooks 'my-tramp-header-line-function)
(add-hook 'dired-mode-hook 'my-tramp-header-line-function)

You can add more...



     _o    o         o   o
   _<<     \\_/\_,   \\_ \\_/\_,
  (*)/(*) (*)   (*) (*) `-    (*)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]