help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Customising .init.el for root user


From: Johnny
Subject: Re: Customising .init.el for root user
Date: Sat, 22 Jun 2013 14:52:16 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux)

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> david@adboyd.com (J. David Boyd) writes:
>> (setq whoami-string
>>       (substring
>>        (shell-command-to-string "whoami")
>>       0 -1))
>>
>>
>>
>> Then you could do
>>
>> (when (string= (whoami-string) "root")
>>       ..run some customisations...
>> )
>
>     (eq (user-uid) 0)
>
>         Christopher
>

Nice, thanks for both suggestions! I haven't used
shell-command-to-string, but can see it's flexibility. To just change
the colourisation when running as root I ended up doing simply

,----
| (when (eq (user-uid) 0)
|   (load-theme 'light-blue)
|   )
`----

Many thanks

-- 
Johnny



reply via email to

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