From 23e5d5cc1481c1208c4689d0c6bd1db8eff64734 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 14 Apr 2024 17:08:46 -0500 Subject: adding check for X windows system in host environment - updating tasks - add a test for running X Windows --- modules/host-environment.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/host-environment.el') 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))) -- cgit v1.2.3