add function to determine windows wsl and a function to open links in Windows web browser if wsl is used
This commit is contained in:
@@ -41,6 +41,14 @@
|
||||
(memq system-type '(windows-nt cygwin32 cygwin))
|
||||
"Non-nil if and only if we're running on Windows.
|
||||
Both Win32 and Cygwin count.")
|
||||
;; https://stackoverflow.com/questions/60922620/shell-script-to-check-if-running-in-windows-when-using-wsl
|
||||
(defvar running-on-windows-wsl
|
||||
(string-equal
|
||||
(replace-regexp-in-string
|
||||
"[ \n]+$" ""
|
||||
(shell-command-to-string
|
||||
"uname -a | sed -n 's/.*\\( *Microsoft *\\).*/\\1/ip'"))
|
||||
"Microsoft"))
|
||||
(setq user-emacs-directory "~/.config/emacs/")
|
||||
(defconst user-cache-directory
|
||||
(file-name-as-directory (concat user-emacs-directory ".cache"))
|
||||
|
||||
Reference in New Issue
Block a user