Created
March 13, 2016 19:54
-
-
Save vansoest/c437b5c256f49ad660fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WINDOWMANAGER=i3 | |
if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then # Looks like we are outside X | |
eval $(tr '\0' '\n' < /proc/$(pgrep $WINDOWMANAGER | head -1 )/environ | sed -e 's/^/export /') #export all environment variables | |
fi | |
$@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment