diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-14 17:08:46 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-14 17:08:46 -0500 |
| commit | 23e5d5cc1481c1208c4689d0c6bd1db8eff64734 (patch) | |
| tree | 1974fd1ed8500d1211edd04749261d774cd296b5 /modules | |
| parent | c93ded9ab8895d10920c48219339f96f694f21ad (diff) | |
adding check for X windows system in host environment
- updating tasks
- add a test for running X Windows
Diffstat (limited to 'modules')
| -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))) |
