From 65cb251ba9d9203056c3c71e49576d7bd7e36069 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 27 Feb 2016 20:02:10 -0500 Subject: more systemd/x11 stuff --- .local/bin/systemd-import-profile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .local/bin/systemd-import-profile (limited to '.local/bin/systemd-import-profile') diff --git a/.local/bin/systemd-import-profile b/.local/bin/systemd-import-profile new file mode 100755 index 0000000..c896e31 --- /dev/null +++ b/.local/bin/systemd-import-profile @@ -0,0 +1,9 @@ +#!/bin/sh +. ~/.profile +vars=$(declare -x -p | sed -rn 's/^declare -x ([^=]+)(=.*)?$/\1/p' | grep -xFv -e PWD -e OLDPWD -e SHLVL) +if test "$1" = '-p'; then + declare -p $vars + echo systemctl --user import-environment $vars +else + systemctl --user import-environment $vars +fi -- cgit v1.2.3-2-g168b