From f41b947fc5afd6b019da4a1efc5f0e42fd692b91 Mon Sep 17 00:00:00 2001 From: Jakub Fojt Date: Fri, 14 Feb 2020 16:38:40 +0100 Subject: [PATCH] Add lmod and gpaw module vimrc: Colorcolumn in python --- .bashrc.kuba | 17 +++++++++++++---- .etcfiles/package-list-ubuntu | 2 ++ .vimrc | 1 + git/trossi-gpaw/.modules.kuba/gpaw/stable.lua | 11 +++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 git/trossi-gpaw/.modules.kuba/gpaw/stable.lua diff --git a/.bashrc.kuba b/.bashrc.kuba index deaf49c..10b60ee 100755 --- a/.bashrc.kuba +++ b/.bashrc.kuba @@ -4,6 +4,13 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return + +source_existing() { + if [ -f "$1" ]; then + source "$1" + fi +} + alias ls='ls --color=auto' export KRB5_CONFIG=".etcfiles/krb5.conf" export EDITOR="vim" @@ -17,10 +24,12 @@ alias pip=pip3 alias python=python3 # Source git prompt -if [ -f ~/scripts/git-prompt.sh ]; then - source ~/scripts/git-prompt.sh -fi -source ~/.bash_prompt.kuba +source_existing ~/scripts/git-prompt.sh +source_existing ~/.bash_prompt.kuba + +# Source lmod module setup +source_existing /usr/share/lmod/lmod/init/profile +[ -x "$(command -v module)" ] && module use ~/.modules.kuba/ if [ "$(hostname)" == "kubaDesktop" ] || [ "$(hostname)" == "kubaArch-Laptop" ]; then GPAW_SETUP_BASE="/home/kuba/gpaw-setups/0.9.20000/" diff --git a/.etcfiles/package-list-ubuntu b/.etcfiles/package-list-ubuntu index ced72c8..4db4452 100644 --- a/.etcfiles/package-list-ubuntu +++ b/.etcfiles/package-list-ubuntu @@ -4,3 +4,5 @@ graphviz htop terminator tmux +gnome-session +lmod diff --git a/.vimrc b/.vimrc index 277efb0..e0f02c4 100755 --- a/.vimrc +++ b/.vimrc @@ -47,6 +47,7 @@ if !exists("vimrc_autocmds_loaded") au BufRead,BufNewFile * setlocal textwidth=0 | setlocal colorcolumn= au BufRead,BufNewFile *.md setlocal textwidth=80 | setlocal colorcolumn=80 + au BufRead,BufNewFile *.py setlocal colorcolumn=100 if exists(":NERDTree") " Open NERDTree if no file specified diff --git a/git/trossi-gpaw/.modules.kuba/gpaw/stable.lua b/git/trossi-gpaw/.modules.kuba/gpaw/stable.lua new file mode 100644 index 0000000..a422e1a --- /dev/null +++ b/git/trossi-gpaw/.modules.kuba/gpaw/stable.lua @@ -0,0 +1,11 @@ +local name = myModuleName() +local version = myModuleVersion() +local platform = "linux-x86_64-ubuntu-3.6" +local root = "~/git/gpaw-trossi" + +setenv("OMP_NUM_THREADS", 1) +prepend_path("PYTHONPATH", root) +prepend_path("PYTHONPATH", pathJoin(root, "build/lib." .. platform)) +prepend_path("PATH", pathJoin(root, "tools")) +prepend_path("PATH", pathJoin(root, "build/bin." .. platform)) +execute {cmd='complete -o default -C "/usr/bin/python3' .. root .. '/gpaw/cli/complete.py" gpaw', modeA={"load"}}