I would like to run a dynamic test at startup and adjust the font size downwards when running under KDE (As opposed to GNOME). The motivation is that font size "12" under KDE seems to be much larger than under GNOME. This may be a sign of some other configuration pathology--feel free to point it out as well if you can identify it!

Thanks,

SetJmp (new to KDE)

有帮助吗?

解决方案

(when (string-equal "kde" (getenv "DESKTOP_SESSION"))
    (adjust-font-for-kde))

其他提示

Emacs has a list-processes function which you might be able to use to identify whether some KDE service is running. You can use that to narrow it down. However, this is a workaround and your real problem is somewhere else.

If you are referring to the local windowing system, then you could probably use some relevant environment variables (e.g. KDE_SESSION_UID, KDE_FULL_SESSION, KDE_SESSION_VERSION all show up on my system). however, that obviously won't work if you are running a remote emacs on a local kde session.

Question: are you using the same font in kde in gnome?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top