Skip to content

Commit

Permalink
Add other necessary scripts when sourcing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tracey Clark committed Aug 5, 2024
1 parent 59f8843 commit c6ef48e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
48 changes: 47 additions & 1 deletion packages/z/zsh/files/zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,50 @@ if [ -f /etc/zprofile ]; then
source /etc/zprofile
elif [ -f /etc/zsh/zprofile ]; then
source /etc/zsh/zprofile
fi
fi

# Source paths that may not be included by systemctl
if [ -f /usr/share/defaults/etc/profile.d/10-path.sh ]; then
emulate sh -c 'source /usr/share/defaults/etc/profile.d/10-path.sh'
fi

# Source paths not included by systemctl necessary for XDG_DATA_DIRS

if [ -f 10-xdg.sh ]; then
emulate sh -c 'source 10-xdg.sh'
fi

# Source paths not included by systemctl necessary for flatpaks to be found in the app menu and run

if [ -f /usr/share/defaults/etc/profile.d/70-flatpak.sh ]; then
emulate sh -c 'source /usr/share/defaults/etc/profile.d/70-flatpak.sh'
fi

# Source paths not included by systemctl necessary for snaps to be found in the app menu and run

if [ -f /usr/share/defaults/etc/profile.d/70-snapd.sh ]; then
emulate sh -c 'source /usr/share/defaults/etc/profile.d/70-snapd.sh'
fi

# Source gtk modules variable for menus

if [ -f /usr/share/defaults/etc/profile.d/appmenu-gtk2-module.sh ]; then
emulate sh -c 'source /usr/share/defaults/etc/profile.d/appmenu-gtk2-module.sh'
fi

# Paths for gawk

if [ -f /usr/share/defaults/etc/profile.d/gawk.sh ]; then
emulate sh -c 'source /usr/share/defaults/etc/profile.d/gawk.sh'
fi

# Environment for vte, zsh compatible

if [ -f /usr/share/defaults/etc/profile.d/vte.sh ]; then
source /usr/share/defaults/etc/profile.d/vte.sh
fi

# Do not source /etc/profile as Arch does
# This will source all other bash scripts in /etc/profile.d, some of which may not load properly.
# Some may also conflict with zsh frameworks or have other unintended consequences
# Additionally, Solus sources ~/.bashrc.d from /etc/profile which is not obvious to the user or expected in zsh
2 changes: 1 addition & 1 deletion packages/z/zsh/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@
</Package>
<History>
<Update release="33">
<Date>2024-07-28</Date>
<Date>2024-08-05</Date>
<Version>5.9</Version>
<Comment>Packaging update</Comment>
<Name>Tracey Clark</Name>
Expand Down

0 comments on commit c6ef48e

Please sign in to comment.