[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
- Customising .init.el for root user, Johnny, 2013/06/20
- Re: Customising .init.el for root user, J. David Boyd, 2013/06/21
- Re: Customising .init.el for root user, Christopher Schmidt, 2013/06/21
- Re: Customising .init.el for root user, J. David Boyd, 2013/06/21
- Re: Customising .init.el for root user, Stefan Monnier, 2013/06/21
- Re: Customising .init.el for root user, J. David Boyd, 2013/06/21
- Message not available
- Re: Customising .init.el for root user, Barry Margolin, 2013/06/21
- Re: Customising .init.el for root user, J. David Boyd, 2013/06/21
- Re: Customising .init.el for root user,
Johnny <=
Re: Customising .init.el for root user, Harry Putnam, 2013/06/21