diff --git a/package_selections/desktop/additional_files.lst b/package_selections/desktop/additional_files.lst index 14164d6..4a271c5 100644 --- a/package_selections/desktop/additional_files.lst +++ b/package_selections/desktop/additional_files.lst @@ -1 +1,3 @@ resources/common_packages +resources/xinitrc +resources/bashrc diff --git a/skel/bashrc b/package_selections/desktop/resources/bashrc similarity index 88% rename from skel/bashrc rename to package_selections/desktop/resources/bashrc index 66d1c19..faca219 100644 --- a/skel/bashrc +++ b/package_selections/desktop/resources/bashrc @@ -2,12 +2,15 @@ # ========== # things to always set up, even for non-interactive shells -# Fuck vi! EDITOR=nano -# On FreeBSD this is being set for whatever reason in the other shell rc files. I'll leave it here for compatibility. PAGER=less -# add a user-specific bin directory to PATH -PATH=$HOME/.local/bin:$PATH + +if grep -F ".local/bin" <<< "$PATH"; then + true +else + PATH="$HOME/.local/bin:$PATH" +fi + export EDITOR PAGER PATH # CHECK INTERACTIVE @@ -18,6 +21,14 @@ case $- in *) return ;; esac +# START XORG +# ========== +# TODO +# check if login shell +# if yes, check if .xinitrc exists +# if yes, check if xorg is already running +# if no, startx + # ALIASES # ======= alias aliases="nano $HOME/.bashrc_aliases && source $HOME/.bashrc_aliases" diff --git a/package_selections/desktop/resources/xinitrc b/package_selections/desktop/resources/xinitrc new file mode 100644 index 0000000..25e3edb --- /dev/null +++ b/package_selections/desktop/resources/xinitrc @@ -0,0 +1,18 @@ +#!/bin/sh + +if grep -F ".local/bin" <<< "$PATH"; then + true +else + PATH="$HOME/.local/bin:$PATH" +fi + +export PATH + +if [ -d "$HOME/.xinitrc.d" ]; then + for FILE in "$HOME/.xinitrc.d"/*; do + [ -x "$FILE" ] && "$FILE" & + done +fi + + +# The line below is placed by the package selection script. diff --git a/skel/xinitrc b/skel/xinitrc deleted file mode 100644 index ed83006..0000000 --- a/skel/xinitrc +++ /dev/null @@ -1,2 +0,0 @@ -#TODO: open user-readme once and then never again -#TODO: check which software selection of Void-USB has been installed and start the appropriate things