lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master b02f0fc 1/5: Make the X clipboard available t


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b02f0fc 1/5: Make the X clipboard available to root, for vim only
Date: Wed, 2 Oct 2019 17:34:24 -0400 (EDT)

branch: master
commit b02f0fca40453514016e39ae68cdf6a75cb1293b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Make the X clipboard available to root, for vim only
---
 gwc/.zshrc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gwc/.zshrc b/gwc/.zshrc
index 17bf09f..0d6f8fa 100644
--- a/gwc/.zshrc
+++ b/gwc/.zshrc
@@ -15,6 +15,12 @@ export PATH="$MINIMAL_PATH"
 # and replace :0.0 below with the string it returns:
 export DISPLAY=":0.0"
 
+# Make the X clipboard available to root, for vim only. See:
+#   https://lists.nongnu.org/archive/html/lmi/2019-10/msg00000.html
+if [ "$(id -u)" -eq 0 ]; then
+  alias vim='XAUTHORITY=/home/greg/.Xauthority vim'
+fi
+
 # Something like
 #  "--jobs=$(nproc || sysctl -n hw.ncpu || getconf _NPROCESSORS_ONLN)"
 # could be used instead for other *nix systems:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]