I am using the same Emacs config on multiple workstations, synchronized via git. However, different workstations (and laptops) have different screen sizes and pixel densities and such, so I need to have a few settings that are specific to each machine. Is there a way to conditionally execute certain sections of my config only on certain machines, while still keeping the config file identical across all of them?
The variables system-name
and system-type
will be helpful to you there; they let you write standard Lisp conditionals based on them. frame.el
also has various bits of code that might be helpful - display-mm-width
, for example, theoretically returns the physical size of the display.
See if
and cond
in the elisp reference if you need the specific Lisp constructs to work out how to express the decision.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With