mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
reorganize dotfiles
This commit is contained in:
25
.ssh/config
25
.ssh/config
@@ -1,25 +0,0 @@
|
|||||||
Host *
|
|
||||||
ForwardX11 yes
|
|
||||||
PermitLocalCommand yes
|
|
||||||
#LocalCommand tar c -C${HOME} --exclude="dotfiles/.git" --exclude=".zim/.git" dotfiles .zim | ssh -o PermitLocalCommand=no %n "tar mx -C${HOME}; bash ~/dotfiles/dotfiles_setup.sh ; chsh -s /bin/zsh"
|
|
||||||
|
|
||||||
Host summonerapi
|
|
||||||
HostName 46.4.78.43
|
|
||||||
|
|
||||||
Host biodata0
|
|
||||||
User bauer
|
|
||||||
HostName biodata0.compbiol.bio.tu-darmstadt.de
|
|
||||||
|
|
||||||
Host bioclust
|
|
||||||
User bauer
|
|
||||||
HostName bioclust.bio.tu-darmstadt.de
|
|
||||||
|
|
||||||
Host bioinfo4
|
|
||||||
HostName 10.0.0.4
|
|
||||||
User bauer
|
|
||||||
ProxyCommand ssh -q biodata0 nc -q0 %h 22
|
|
||||||
|
|
||||||
Host lcluster?*
|
|
||||||
User yg38ymab
|
|
||||||
ForwardX11 yes
|
|
||||||
HostName %h.hrz.tu-darmstadt.de
|
|
||||||
57
dotfiles.sh
Executable file
57
dotfiles.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
PROFILE_BASE_DIR=$HOME/.dotfiles/profiles
|
||||||
|
|
||||||
|
# Link files of a single profile
|
||||||
|
link_profile() {
|
||||||
|
profile=$1
|
||||||
|
profile_dir=${PROFILE_BASE_DIR}/$profile
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -d $profile_dir ]; then
|
||||||
|
echo "$profile does not exist"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Linking files from profile $profile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $profile_dir
|
||||||
|
# Find all files to link
|
||||||
|
for file in `find . -type f | cut -c 3- | grep -v "^$"`; do
|
||||||
|
dir=$(dirname "${file}")
|
||||||
|
src=`pwd`/$file
|
||||||
|
dst_dir=$HOME/$dir
|
||||||
|
dst=$HOME/$file
|
||||||
|
|
||||||
|
# create folder if not exist
|
||||||
|
if [ ! -d "$dst_dir" ]; then
|
||||||
|
echo "Creating destination direcory $dst_dir"
|
||||||
|
mkdir -p $dst_dir
|
||||||
|
fi
|
||||||
|
|
||||||
|
# link file
|
||||||
|
echo "Linking $src to $dst"
|
||||||
|
if [ -f "${dst}" ] || [ -L "${dst}" ]; then
|
||||||
|
echo "$dst_file esists. Override? [y/N]"
|
||||||
|
read response
|
||||||
|
if [ "$response" == 'y' ] || [ "$response" == 'Y' ] \
|
||||||
|
|| [ "$response" == 'yes' ] || [ "$response" == 'Yes' ]; then
|
||||||
|
ln -sf $src $dst
|
||||||
|
else
|
||||||
|
echo "Skipping $file"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ln -s $src $dst
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# link profiles
|
||||||
|
if [ "$1" == "link" ]; then
|
||||||
|
shift
|
||||||
|
while [ "$1" != "" ]; do
|
||||||
|
link_profile $1
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
fi
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
dir="${HOME}/dotfiles"
|
|
||||||
conffolder="${HOME}/.config"
|
|
||||||
|
|
||||||
dotfiles=(".vimrc" ".vim" ".vimrc" ".zshrc" ".zshrc_functions" ".zim" ".zimrc" ".gitconfig")
|
|
||||||
for dotfile in "${dotfiles[@]}"; do
|
|
||||||
ln -sf $dir/$dotfile ${HOME}/${dotfile}
|
|
||||||
done
|
|
||||||
|
|
||||||
# fonts
|
|
||||||
mkdir -p ~/.config/fontconfig
|
|
||||||
ln -sf $dir/.config/fontconfig/fonts.conf $conffolder/fontconfig/fonts.conf
|
|
||||||
|
|
||||||
# matplotlib
|
|
||||||
ln -sf $dir/.config/matplotlib ~/.config/matplotlib
|
|
||||||
10
install.sh
Executable file
10
install.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Make ZSH the default shell environment
|
||||||
|
if [ `cat /etc/passwd | grep $USER | awk -F ':' '{print $7}'` != "/bin/zsh" ]; then
|
||||||
|
echo "Changing shell to zsh"
|
||||||
|
chsh -s $(which zsh)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# linking base stuff
|
||||||
|
$HOME/.dotfiles/dotfiles.sh link base
|
||||||
1
profiles/pymol/.pymol/.pymol
Symbolic link
1
profiles/pymol/.pymol/.pymol
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/home/bauer/dotfiles/.pymol
|
||||||
Reference in New Issue
Block a user