More cleanup

This commit is contained in:
Fabian 2021-12-08 13:50:52 +01:00
parent 75fc57486a
commit 20f2d4323d
6 changed files with 15 additions and 137 deletions

View File

@ -1,15 +1,16 @@
all: symlinks
all: ~/.zshrc ~/.zsh_functions ~/.vimrc ~/.gitconfig ~/.globalgitignore
symlinks:
chmod +x make_symlinks.sh
./make_symlinks.sh
~/.zshrc:
ln -sv ~/.dotfiles/zshrc ~/.zshrc
setup-vim:
mkdir -p ../.vim
cp -r vim/* ../.vim
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
chmod +x ../.vim/custom_make.sh
~/.zsh_functions:
ln -sv ~/.dotfiles/zsh_functions ~/.zsh_functions
sensitive:
multigpg extract zsh_sensitive.tar.gpg zsh_sensitive
mv zsh_sensitive ../.zsh_sensitive
~/.vimrc:
ln -sv ~/.dotfiles/vimrc ~/.vimrc
~/.gitconfig:
ln -sv ~/.dotfiles/gitconfig ~/.gitconfig
~/.globalgitignore:
ln -sv ~/.dotfiles/globalgitignore ~/.globalgitignore

View File

@ -1,12 +0,0 @@
#!/bin/bash
test -f ../.zshrc || ln -sv .dotfiles/zshrc ../.zshrc
test -f ../.zsh_functions || ln -sv .dotfiles/zsh_functions ../.zsh_functions
test -f ../.vimrc || ln -sv .dotfiles/vimrc ../.vimrc
test -f ../.gitconfig || ln -sv .dotfiles/gitconfig ../.gitconfig
test -f ../.globalgitignore || ln -sv .dotfiles/globalgitignore ../.globalgitignore
if ! test -f ../.config/nvim/init.vim
then
mkdir -vp ../.config/nvim
ln -sv ~/.vimrc ../.config/nvim/init.vim
fi

View File

@ -1,28 +0,0 @@
#!/bin/bash
done=false
until $done
do
if [ -f Makefile ]
then
echo "Executing $(pwd)/Makefile:"
make
done=true
break
fi
if [ -d .git ]
then
echo "Didn't find a makefile in this repository. Aborting."
done=true
break
fi
if [ $(pwd) = '/' ]
then
echo "Didn't find a makefile. Aborting."
done=true
break
fi
cd ..
echo "Entering super directory: $(pwd)"
done

View File

@ -1,7 +1,3 @@
twitch() {
livestreamer "twitch.tv/$1" &
}
copy_img_to_usb(){
if [[ $1 = "" ]]
then
@ -16,7 +12,7 @@ copy_img_to_usb(){
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo umount $TARGET?*
dd bs=4M if=$FILE | pv -s $FILESIZE | sudo dd of=$TARGET && sync
dd bs=4M if=$FILE | pv -s $FILESIZE | sudo dd of=$TARGET conv=fsync
fi
}
@ -44,66 +40,3 @@ change_dir(){
unalias cd
fi
}
#from arch wiki
pacman_disowned(){
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
db=$tmp/db
fs=$tmp/fs
mkdir "$tmp"
trap 'rm -rf "$tmp"' EXIT
pacman -Qlq | sort -u > "$db"
#I added:
#/etc/ssl/certs
#/usr/lib/python
#/usr/share/mime
find /bin /etc /sbin /usr \
! -name lost+found\
! -path "/etc/ssl/certs/*"\
! -path "/usr/lib/python*"\
! -path "/usr/share/mime/*"\
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
comm -23 "$fs" "$db"
}
virtual_env_prompt() {
REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
}
_delete-old-archives() {
tarsnap --fsck
archives=$(tarsnap --list-archives | sort)
del_archives=$(echo $archives | head -n $(($(echo $archives | wc -l) - 3)))
del_archives=("${(@f)del_archives}")
for archive in $del_archives
do
read -q "reply?Do you want to delete '$archive' ? "
echo ""
if [[ $reply == "y" ]]
then
echo "Deleting '$archive' ..."
tarsnap -d -f "$archive"
fi
done
}
update-mirrors() {
if [[ $(uname -m) != "x86_64" ]]
then
echo "Not supported on this architecture."
else
sudo sh -c "reflector -p http -l 50 --sort rate | tee /etc/pacman.d/mirrorlist_"
sudo sed -i 's/mirrorlist$/mirrorlist_/g' /etc/pacman.conf
fi
}
old-abi() {
for i in $(pacman -Qqm); do
if pacman -Qql $i | xargs readelf -d 2>/dev/null | grep -q libstdc++.so.6; then
echo $i;
fi;
done
}

View File

@ -1 +0,0 @@
Œ  [újBÊñ SÓÒÀˆ56o˜&ŽHÖýw5íŠ-=D0ôlhå<68>U³^$k¯Q£þóq<C3B3>ŽM“ R}ˆ g?9ly8QK‰wê J16|Ë_ߣÎp|°Á( <0C>¥z”tE³õý”k=TjP.Aýì1 ½¦Ë%…eÖ[á[ÆÇýá éyMeÅ©)¬žIË¥mîo7}e<>¿#-<2D>;š·Nß]rMùhÂð¸ºÈ^ìAk\D¬Áœøfù²ês`,¼«Ég„Úžð´¶ZæfÝ„ ­¡òæ´:ú}±_iàj´üD<1D>ŠÝʼnu‰õQ×åóÎTÏ:D‡Ë/)95ÌÙr´òÚ“åaAh•‡ÊÀÆêTÏfÆ<66>ímîŠ7ÞZðå4„DLYƈú0ßÛc¨2G>V‰¦èjù ÂÖå|5

17
zshrc
View File

@ -8,11 +8,6 @@ if [ -f ~/.zsh_grml ]
then
source ~/.zsh_grml
fi
#for untrusted machines
if [ -f ~/.zsh_sensitive ]
then
source ~/.zsh_sensitive
fi
source ~/.zsh_functions
export EDITOR=vim
export SYSTEMD_EDITOR=vim
@ -36,24 +31,14 @@ alias cmake='cmake -G Ninja'
alias sysupgrade='sudo pacman -Syu; auracle sync'
alias v='vim'
alias ls='ls --color=auto'
export PATH=$PATH:~bin:~/.local/bin
export PATH=$PATH:~/bin:~/.local/bin
if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ]
then
source /usr/share/doc/pkgfile/command-not-found.zsh
fi
if [ -f /usr/bin/virtualenvwrapper_lazy.sh ]
then
# Automatically source virtualenv
source /usr/bin/virtualenvwrapper_lazy.sh
fi
if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
then
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
# displaying current virtual env
grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f'
zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent