diff options
Diffstat (limited to 'modules/host-environment.el')
| -rw-r--r-- | modules/host-environment.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/host-environment.el b/modules/host-environment.el index 649cabe5..20986b1a 100644 --- a/modules/host-environment.el +++ b/modules/host-environment.el @@ -8,7 +8,7 @@ (require 'battery) (defun env-laptop-p () - "Return t if host is a laptop (has a battery), nil if not." + "Return t if host is a laptop (i.e., has a battery), nil if not." (when (and battery-status-function (not (string-match-p "N/A" (battery-format "%B" @@ -36,6 +36,10 @@ "Return t if host system is Windows." (memq system-type '(cygwin windows-nt ms-dos))) +(defun env-x-p () + "Return t if host system is running the X Window System" + (string= (window-system) "x")) + (defun env-terminal-p () "Return t if running in a terminal." (not (display-graphic-p))) |
