Last active
August 6, 2024 07:18
-
-
Save ZaLiTHkA/f99619744c7e3cb3f4f19dbd15b65801 to your computer and use it in GitHub Desktop.
a collection of scripts I use to tweak my Bash initialisation process.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable the subsequent settings only in interactive sessions | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# bashrc segments have been abstracted away into script files in the following folder | |
for file in $HOME/.bashrc-parts/*; do | |
if [ -f "$file" -a "${file: -3}" == ".sh" ]; then | |
source "$file" | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom workaround for https://youtrack.jetbrains.com/issue/TBX-4599#focus=Comments-27-9828123.0-0 | |
# original Toolbox scripts path for reference | |
# export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts" | |
source_path="$HOME/.local/share/JetBrains/Toolbox/scripts" | |
custom_path="$HOME/.local/share/JetBrains/Toolbox/scripts-alt" | |
export PATH="$PATH:$custom_path" | |
refresh_jb_wrappers() { | |
if [[ ! "${PATH//:/ }" =~ "$custom_path" ]]; then | |
echo "NOTE: custom launcher scripts folder is not currently in PATH.." | |
fi | |
if [[ ! -d "$custom_path" ]]; then | |
echo "creating custom launcher scripts folder.." | |
mkdir -p "$custom_path" | |
fi | |
for file in "$source_path/"*; do | |
filename=$(basename "$file") | |
echo "processing $filename.." | |
cp "$file" "$custom_path/$filename" | |
echo " &> /dev/null &" >> "$custom_path/$filename" | |
done | |
echo "custom launcher scripts refreshed" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
at the moment, this Gist only contains a helper for fixing the issue of the JetBrains IDE launcher scripts for Bash locking the terminal process until the IDE has been closed. my personal folder has many more files, but I need to do some "spring cleaning" before I add them here... how good that spring is just around the corner (for me, anyway).