[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Sharing .stumpwmrc between computers
From: |
Stefan Reichör |
Subject: |
Re: [STUMP] Sharing .stumpwmrc between computers |
Date: |
Wed, 30 Nov 2011 21:57:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Hello Johnny!
> Hi,
>
> I want to share my .stumpwmrc between my desktop and the netbook as the
> setup is nearly identical. However, there are a couple of lines that are
> machine specific. In emacs, I solve this by checking the 'system-name'
> variable in a 'when' clause (see below). Is there something similar I
> could put in .stumpwmrc?
>
> ,---- In my emacs
> | (when (string= (system-name) "my_desktop")
> | ... load desktop only stuff
> | )
> `----
The following seems to work for me (assuming /etc/hostname holds the host name)
(defun system-name ()
(with-open-file (hostname-file "/etc/hostname" :direction :input) (read
hostname-file)))
Stefan.