-
Notifications
You must be signed in to change notification settings - Fork 15
Description
This project embeds some environment variables in a shell script. It advises modifying the shell script to update the environment variables, which is not ideal.
Is there a better way?
Is systemd's "environment.d" a possible solution?
https://www.freedesktop.org/software/systemd/man/environment.d.html
As a disclosure, I currently use a shell script to set environment variables when starting sway, which I'll include below.
One thing you'll see in this snippet is that there are a number of other environment variables are useful to get toolkits or apps to prioritize Wayland over X11. These would be common modifications to the script shipped here.
The second thing you'll notice is that I start gnome-keyring here. I tried to run gnome-keyring as a systemd service but could not get it to work, I think because it needs to export an environment variable in time for other apps that are launched to receive it.
So consider that a challenge to test this project and how it handles environment variables-- can it work with gnome-keyring-daemon to export SSH_AUTH_SOCK early enough for terminal apps to access it?
#!/usr/bin/env sh
# From here: https://github.com/nullgemm/ly/issues/228
eval $(/usr/bin/gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
export TERMINAL="alacritty"
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
export MOZ_ACCELERATED=1
export BEMENU_BACKEND=wayland
export GTK_THEME=Adwaita:dark
/sbin/sway
(If it matters, I'm currently using ly as my display manager).