1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

systemd: replace profile.service with systemd-environment.d generator

This moves loading of the environment variables out of the normal
service startup flow and has systemd load the variables early.
Shim ZSH to load the environment.d configuration when running without
systemd.

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
2020-08-11 11:45:48 +01:00
parent 322adb478a
commit 521f462141
12 changed files with 48 additions and 81 deletions

View File

@ -1 +0,0 @@
/home/frebib/.config/systemd/user/profile.service

View File

@ -2,7 +2,7 @@
Description=i3 - an improved dynamic, tiling window manager
Requires=xorg.target
Before=graphical-session.target
After=profile.service xprofile.service xorg.target
After=xprofile.service xorg.target
[Service]
ExecStart=/usr/bin/i3

View File

@ -1,10 +0,0 @@
[Unit]
Description=Load profile environment into session
Before=graphical-session-pre.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c '. $HOME/.config/dotfiles/profile && systemctl --user import-environment'
[Install]
WantedBy=basic.target

View File

@ -1,7 +1,5 @@
[Unit]
Description=XBindKeys
Requires=profile.service
After=profile.service
[Service]
ExecStart=/usr/bin/xbindkeys -n -f $XDG_CONFIG_HOME/X11/xbindkeysrc

View File

@ -1,13 +1,12 @@
[Unit]
Description=Load Xorg configuration
PartOf=xorg.target
Requires=profile.service
After=xorg.target profile.service
After=xorg.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bash -c '. $XDG_CONFIG_HOME/X11/xprofile; systemctl --user import-environment'
ExecStart=/bin/sh -c '. $XDG_CONFIG_HOME/X11/xprofile; systemctl --user import-environment'
[Install]
WantedBy=xorg.target

View File

@ -1,7 +1,7 @@
[Unit]
Description=xsettingsd - provide settings to X11 applications
Requires=xorg.target
After=xorg.target profile.service
After=xorg.target
[Service]
ExecStart=/bin/sh -c 'xsettingsd -c $XDG_CONFIG_HOME/xsettingsd/xsettingsd.local'