More cleanup
This commit is contained in:
parent
75fc57486a
commit
20f2d4323d
25
Makefile
25
Makefile
@ -1,15 +1,16 @@
|
|||||||
all: symlinks
|
all: ~/.zshrc ~/.zsh_functions ~/.vimrc ~/.gitconfig ~/.globalgitignore
|
||||||
|
|
||||||
symlinks:
|
~/.zshrc:
|
||||||
chmod +x make_symlinks.sh
|
ln -sv ~/.dotfiles/zshrc ~/.zshrc
|
||||||
./make_symlinks.sh
|
|
||||||
|
|
||||||
setup-vim:
|
~/.zsh_functions:
|
||||||
mkdir -p ../.vim
|
ln -sv ~/.dotfiles/zsh_functions ~/.zsh_functions
|
||||||
cp -r vim/* ../.vim
|
|
||||||
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
|
||||||
chmod +x ../.vim/custom_make.sh
|
|
||||||
|
|
||||||
sensitive:
|
~/.vimrc:
|
||||||
multigpg extract zsh_sensitive.tar.gpg zsh_sensitive
|
ln -sv ~/.dotfiles/vimrc ~/.vimrc
|
||||||
mv zsh_sensitive ../.zsh_sensitive
|
|
||||||
|
~/.gitconfig:
|
||||||
|
ln -sv ~/.dotfiles/gitconfig ~/.gitconfig
|
||||||
|
|
||||||
|
~/.globalgitignore:
|
||||||
|
ln -sv ~/.dotfiles/globalgitignore ~/.globalgitignore
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -1,7 +1,3 @@
|
|||||||
twitch() {
|
|
||||||
livestreamer "twitch.tv/$1" &
|
|
||||||
}
|
|
||||||
|
|
||||||
copy_img_to_usb(){
|
copy_img_to_usb(){
|
||||||
if [[ $1 = "" ]]
|
if [[ $1 = "" ]]
|
||||||
then
|
then
|
||||||
@ -16,7 +12,7 @@ copy_img_to_usb(){
|
|||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
sudo umount $TARGET?*
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,66 +40,3 @@ change_dir(){
|
|||||||
unalias cd
|
unalias cd
|
||||||
fi
|
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
|
|
||||||
}
|
|
||||||
|
@ -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.AeÜýì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
17
zshrc
@ -8,11 +8,6 @@ if [ -f ~/.zsh_grml ]
|
|||||||
then
|
then
|
||||||
source ~/.zsh_grml
|
source ~/.zsh_grml
|
||||||
fi
|
fi
|
||||||
#for untrusted machines
|
|
||||||
if [ -f ~/.zsh_sensitive ]
|
|
||||||
then
|
|
||||||
source ~/.zsh_sensitive
|
|
||||||
fi
|
|
||||||
source ~/.zsh_functions
|
source ~/.zsh_functions
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export SYSTEMD_EDITOR=vim
|
export SYSTEMD_EDITOR=vim
|
||||||
@ -36,24 +31,14 @@ alias cmake='cmake -G Ninja'
|
|||||||
alias sysupgrade='sudo pacman -Syu; auracle sync'
|
alias sysupgrade='sudo pacman -Syu; auracle sync'
|
||||||
alias v='vim'
|
alias v='vim'
|
||||||
alias ls='ls --color=auto'
|
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 ]
|
if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ]
|
||||||
then
|
then
|
||||||
source /usr/share/doc/pkgfile/command-not-found.zsh
|
source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||||
fi
|
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 ]
|
if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
|
||||||
then
|
then
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
fi
|
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user