@@ -113,30 +113,60 @@ source "${HOME}/.zgen/zgen.zsh"
113113if ! zgen saved; then
114114 # Plugins
115115 zgen oh-my-zsh
116- zgen oh-my-zsh plugins/adb
117- zgen oh-my-zsh plugins/asdf
118- zgen oh-my-zsh plugins/autojump
119- zgen oh-my-zsh plugins/celery
120116 zgen oh-my-zsh plugins/colored-man-pages
121117 zgen oh-my-zsh plugins/cp
122- zgen oh-my-zsh plugins/docker
123- zgen oh-my-zsh plugins/git
124- zgen oh-my-zsh plugins/npm
125- zgen oh-my-zsh plugins/nvm
126- zgen oh-my-zsh plugins/pip
127- zgen oh-my-zsh plugins/pylint
128- zgen oh-my-zsh plugins/rsync
129- zgen oh-my-zsh plugins/screen
130- zgen oh-my-zsh plugins/ubuntu
131- zgen oh-my-zsh plugins/ufw
132- zgen oh-my-zsh plugins/virtualenv
133- zgen oh-my-zsh plugins/vscode
134- zgen oh-my-zsh plugins/web-search
118+ zgen oh-my-zsh plugins/git # Git is already required for downloading oh-my-zsh.
135119 zgen load marlonrichert/zsh-autocomplete
136- zgen load sobolevn/wakatime-zsh-plugin
137120 zgen load zsh-users/zsh-autosuggestions
138121 zgen load zsh-users/zsh-syntax-highlighting
139122
123+ # Optional features in alphabetical order
124+ if command -v adb & > /dev/null; then
125+ zgen oh-my-zsh plugins/adb
126+ fi
127+ if command -v asdf & > /dev/null; then
128+ zgen oh-my-zsh plugins/asdf
129+ fi
130+ if command -v autojump & > /dev/null; then
131+ zgen oh-my-zsh plugins/autojump
132+ fi
133+ if command -v docker & > /dev/null; then
134+ zgen oh-my-zsh plugins/docker
135+ fi
136+ if command -v npm & > /dev/null; then
137+ zgen oh-my-zsh plugins/npm
138+ fi
139+ if command -v nvm & > /dev/null; then
140+ zgen oh-my-zsh plugins/nvm
141+ fi
142+ if command -v python3 & > /dev/null; then
143+ zgen oh-my-zsh plugins/celery
144+ zgen oh-my-zsh plugins/pip
145+ zgen oh-my-zsh plugins/pylint
146+ zgen oh-my-zsh plugins/virtualenv
147+ fi
148+ if command -v rsync & > /dev/null; then
149+ zgen oh-my-zsh plugins/rsync
150+ fi
151+ if command -v screen & > /dev/null; then
152+ zgen oh-my-zsh plugins/screen
153+ fi
154+ if lsb_release -a | grep -q " Ubuntu" ; then
155+ zgen oh-my-zsh plugins/ubuntu
156+ fi
157+ if command -v ufw & > /dev/null; then
158+ zgen oh-my-zsh plugins/ufw
159+ fi
160+ if command -v code & > /dev/null; then
161+ zgen oh-my-zsh plugins/vscode
162+ fi
163+ if [ -f " ${HOME} /.wakatime.cfg" ]; then
164+ zgen load sobolevn/wakatime-zsh-plugin
165+ fi
166+ if command -v firefox & > /dev/null; then
167+ zgen oh-my-zsh plugins/web-search
168+ fi
169+
140170 # Theme
141171 zgen load romkatv/powerlevel10k powerlevel10k
142172
@@ -322,7 +352,7 @@ if [ -f $STDERRED_PATH ]; then
322352 red_colored_text=$( tput setaf 9)
323353 export STDERRED_ESC_CODE=` echo -e " $red_colored_text " `
324354else
325- echo " stderred was not found. Please install it or remove it from .zshrc."
355+ # echo "stderred was not found. Please install it or remove it from .zshrc."
326356fi
327357unset STDERRED_PATH
328358
@@ -339,15 +369,15 @@ if command -v gem &> /dev/null; then
339369 if [ -f " ${COLORLS_FILE_PATH} " ]; then
340370 COLORLS_PATH=" $( dirname " ${COLORLS_FILE_PATH} " ) "
341371 source " ${COLORLS_PATH} /tab_complete.sh"
372+ alias lc=' colorls -lA --sd'
342373 else
343- echo " Colorls was not found. Please install it with \" gem install colorls\" or remove it form .zshrc."
374+ # echo "Colorls was not found. Please install it with \"gem install colorls\" or remove it form .zshrc."
344375 fi
345376 unset COLORLS_FILE_PATH
346377 unset COLORLS_PATH
347378else
348379 echo " Gem was not found. Please install Ruby."
349380fi
350- alias lc=' colorls -lA --sd'
351381
352382# Powerline
353383# https://github.com/powerline/powerline
381411# Fix ROCm OpenCL
382412# By default clinfo and other OpenCL applications might not see the ROCm driver.
383413if [ -d " /opt/rocm" ]; then
384- export LD_LIBRARY_PATH=" ${LD_LIBRARY_PATH} :/opt/rocm/lib:/opt/rocm/opencl/lib"
414+ # Do not change the configuration on clusters, as they have their own driver setup.
415+ if command -v srun & > /dev/null; then : ; else
416+ export LD_LIBRARY_PATH=" ${LD_LIBRARY_PATH} :/opt/rocm/lib:/opt/rocm/opencl/lib"
417+ fi
418+ fi
419+
420+ # This prevents the "disk quota exceeded" error when building Apptainer containers on CSC servers.
421+ if [ -z " ${TMPDIR} " ]; then
422+ APPTAINER_CACHEDIR=$TMPDIR
385423fi
386424
387425# -----
0 commit comments