Skip to content

Commit

Permalink
fix: x2 x2initrc verbose-text; add (unfinished) updates to README (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanillaSprinkles authored Mar 19, 2024
1 parent ac58745 commit bb8921f
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 17 deletions.
11 changes: 9 additions & 2 deletions HOME/.bscripts/x2-beta
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ killer() {


if [[ ! -e "${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc" ]]; then
echo "running x2initrc from file: ${X2_WM_EXEC[@]:-"${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc"}"
pritnf "first time running %s; creating file: %s\n" "${THIS_BIN}" "${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc"

mkdir -p "${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/"
cat <<'EOF' > "${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc"
#!/usr/bin/bash
Expand All @@ -151,7 +152,7 @@ if [[ ! -e "${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc" ]]; then
# eval "$(cat ~/.fehbg)" &
# alacritty -e /bin/tmux news >/dev/null 2>&1 &
# while :; do alacritty -e /usr/bin/tmux new-session; done >/dev/null 2>&1 &
# x11vnc_simple -passwd '1234' &
Expand Down Expand Up @@ -498,6 +499,7 @@ pids=( "${xvfbrunpid}" "${wmpid}" )
# trap - HUP INT QUIT ABRT TERM
#trap 'trap - HUP INT QUIT ABRT TERM; kill -TERM -- 0' HUP INT QUIT ABRT TERM

<<<<<<< Updated upstream



Expand Down Expand Up @@ -554,6 +556,11 @@ while IFS= read -rd '' var; do [[ ! "${var}" =~ ^(BASH_FUNC_[^=]+)= ]] && decla

## start x2initrc
## todo test: eval "$(cat x2initrc)"
||||||| Stash base

=======
echo "running x2initrc from file: ${X2_WM_EXEC[@]:-"${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc"}"
>>>>>>> Stashed changes
"${X2_WM_EXEC[@]:-"${XDG_DATA_HOME:-"${HOME}/.local/share"}/bscripts/x2initrc"}" & apid=$!


Expand Down
76 changes: 61 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,72 @@ HOME: all my HOME rc's for an X environment setup (and then some)
```


##### for new users (append to /etc/skel/.bashrc and auto create symlink when user logs-in)
``` bash
cat << 'EOF' >> /etc/skel/.bashrc
if [[ -f /home/bashDotFiles/HOME/.bashrc ]]; then
# create symlink: .bash_stuff
if [ ! -e ~/.bash_stuff ]; then
ln -s /home/bashDotFiles/HOME/.bash_stuff ~/.bash_stuff
fi
# create symlink: .bscripts
if [ ! -e ~/.bscripts ]; then
ln -s /home/bashDotFiles/HOME/.bscripts ~/.bscripts
fi
# set PATH so it includes user's private bin if it exists
[[ -d ~/bin ]] && PATH=~/bin:"${PATH}"
[[ -d ~/.bscripts ]] && PATH=~/.bscripts:"${PATH}"
export PATH
. /home/bashDotFiles/HOME/.bashrc
fi
EOF
```


##### symlink (current user cutover; create symlinks ect)
``` bash
cat << 'EOF' >> ~/.bashrc
if [[ -f /home/bashDotFiles/HOME/.bashrc ]]; then
# create symlink: .bash_stuff
if [ ! -e ~/.bash_stuff ]; then
ln -s /home/bashDotFiles/HOME/.bash_stuff ~/.bash_stuff
fi
# create symlink: .bscripts
if [ ! -e ~/.bscripts ]; then
ln -s /home/bashDotFiles/HOME/.bscripts ~/.bscripts
fi
# set PATH so it includes user's private bin if it exists
[[ -d ~/bin ]] && PATH=~/bin:"${PATH}"
[[ -d ~/.bscripts ]] && PATH=~/.bscripts:"${PATH}"
export PATH
. /home/bashDotFiles/HOME/.bashrc
fi
EOF
```

``` bash
. ~/.bashrc
```


##### symlink
- for .bash_profile and .bashrc
``` bash
mv -i ~/.bash_profile ~/.bash_profile.BAK_pre_vs_$( date --iso-8601=seconds )
ln -s /home/bashDotFiles/HOME/.bash_profile ~/.bash_profile
```


``` bash
mv -i ~/.bashrc ~/.bashrc.BAK_pre_vs_$( date --iso-8601=seconds )
ln -s /home/bashDotFiles/HOME/.bashrc ~/.bashrc
```


- for alias' and bin/scripts
``` bash
ln -s /home/bashDotFiles/HOME/.bash_stuff ~/.bash_stuff
ln -s /home/bashDotFiles/HOME/.bscripts ~/.bscripts
```



Expand Down

0 comments on commit bb8921f

Please sign in to comment.