Compare commits
3 Commits
4aa6e57064
...
d933b8a830
| Author | SHA1 | Date | |
|---|---|---|---|
| d933b8a830 | |||
| 34451575a9 | |||
| 2ba88ea838 |
17
.bashrc.kuba
17
.bashrc.kuba
@@ -106,6 +106,23 @@ Calls $cmd [...]"
|
||||
$cmd $@
|
||||
}
|
||||
|
||||
watch_modify() {
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Usage watch_modify FILE CMD ARGS...
|
||||
|
||||
Run CMD ARGS... when file FILE is updated
|
||||
"
|
||||
return
|
||||
fi
|
||||
|
||||
file="$1"
|
||||
base="$(basename "$file")"
|
||||
dir="$(dirname "$file")"
|
||||
inotifywait -r -m -e modify "$dir" | while read file_path file_event file_name; do
|
||||
[ "$base" == "$file_name" ] && echo ${@:2} && ${@:2}
|
||||
done
|
||||
}
|
||||
|
||||
# Source git prompt
|
||||
source_existing ~/scripts/git-prompt.sh
|
||||
source_existing ~/.bash_prompt.kuba
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
whatis([==[
|
||||
Creates $USERAPPL environment variable and adds paths
|
||||
]==])
|
||||
|
||||
local pyver = subprocess([[python --version 2>&1 | sed 's/.*\([23]\.[0-9]\).*/\1/']])
|
||||
if pyver:sub(1, 1) == "2" then
|
||||
LmodError("Must have Python 3 loaded")
|
||||
end
|
||||
|
||||
local home = os.getenv("HOME")
|
||||
local nobackup = pathJoin(home, "nobackup")
|
||||
local userappl = pathJoin(nobackup, "appl")
|
||||
local git = pathJoin(nobackup, "git")
|
||||
local pythonp = pathJoin(userappl, "lib", "python" .. pyver, "site-packages")
|
||||
local binp = pathJoin(userappl, "bin")
|
||||
local libp = pathJoin(userappl, "lib")
|
||||
|
||||
setenv("MYNOBACKUP", nobackup)
|
||||
setenv("USERAPPL", userappl)
|
||||
|
||||
prepend_path("PYTHONPATH", pythonp)
|
||||
prepend_path("PYTHONPATH", ".")
|
||||
prepend_path("PATH", binp)
|
||||
prepend_path("LD_LIBRARY_PATH", libp)
|
||||
execute {cmd='`snakemake --bash-completion`', modeA={"load"}}
|
||||
@@ -1,8 +1,10 @@
|
||||
# Prefix
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
set -g mouse on
|
||||
|
||||
# Mouse and colors
|
||||
set -g mouse on
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# pane movement
|
||||
|
||||
3
.vimrc
3
.vimrc
@@ -33,6 +33,7 @@ if filereadable(expand(vundle_dir) . "/README.md")
|
||||
Plugin 'dense-analysis/ale'
|
||||
Plugin 'tpope/vim-unimpaired'
|
||||
Plugin 'JuliaEditorSupport/julia-vim'
|
||||
Plugin 'tell-k/vim-autopep8'
|
||||
|
||||
call vundle#end() " required
|
||||
else
|
||||
@@ -249,6 +250,7 @@ highlight GitGutterDelete ctermbg=NONE ctermfg=DarkRed
|
||||
highlight Search ctermbg=Brown ctermfg=LightRed
|
||||
highlight ColorColumn ctermbg=DarkBlue
|
||||
highlight Visual ctermbg=LightBlue
|
||||
highlight DiffChange ctermbg=black ctermfg=lightgreen
|
||||
highlight ALEInfo ctermbg=DarkBlue ctermfg=White
|
||||
highlight ALEWarning ctermbg=DarkBlue ctermfg=Black
|
||||
highlight ALEError ctermbg=DarkRed ctermfg=Black
|
||||
@@ -328,6 +330,7 @@ let g:latex_to_unicode_auto = 1
|
||||
|
||||
noremap <expr> <F7> LaTeXtoUnicode#Toggle()
|
||||
noremap! <expr> <F7> LaTeXtoUnicode#Toggle()
|
||||
autocmd FileType python noremap <buffer> <F8> :call Autopep8()<CR>
|
||||
|
||||
nmap <Leader>cf :cd %:p:h <CR> " Change dir to parent of current file
|
||||
nmap <Leader>cg :cd $git_root_location <CR> " Change dir to git root
|
||||
|
||||
33
.xinitrc
33
.xinitrc
@@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ~/.xinitrc
|
||||
#
|
||||
# Executed by startx (run your window manager from here)
|
||||
WM=i3
|
||||
if (( $# == 1 ))
|
||||
then
|
||||
WM=$1
|
||||
fi
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/*; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
export EDITOR="vim"
|
||||
export CUPS_GSSSERVICENAME=HTTP
|
||||
|
||||
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
|
||||
|
||||
rm -f "~/${WM}.log.old"
|
||||
mv -f "~/${WM}.log" "~/${WM}.log.old"
|
||||
rm -f "~/${WM}.log"
|
||||
rm -f "~/${WM}.log"
|
||||
|
||||
if [ "$WM" = "i3" ]; then
|
||||
. ~/.i3initrc
|
||||
else
|
||||
exec $WM >> "~/${WM}.log" 2>&1
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# To generate list of large packages
|
||||
# pacman -Qi | grep 'Name\|Size\|Description' | cut -d: -f2 | paste - - - | awk -F'\t' 'BEGIN{ s["MiB"]=1024; s["KiB"]=1;} {split($3, a, " "); print a[1] * s[a[2]], "KiB", $1}' | sort -n
|
||||
|
||||
LARGE_PKGS='linux jdk10-openjdk jre8-openjdk-headless jre10-openjdk-headless gimp gcc-list webkit2gtk gcc python chromium dropbox spotify mono bazel valgrind texlive-core linux-firmware'
|
||||
|
||||
echo -n "==> Looking for old packages to prune"
|
||||
paccache -rk1
|
||||
echo -n "==> Looking for old large packages to prune"
|
||||
paccache -rk0 $LARGE_PKGS
|
||||
Reference in New Issue
Block a user