From 20f2d4323dc3541300d11527752f994e537d87ac Mon Sep 17 00:00:00 2001 From: Faerbit Date: Wed, 8 Dec 2021 13:50:52 +0100 Subject: [PATCH] More cleanup --- Makefile | 25 ++++++++-------- make_symlinks.sh | 12 -------- vim/custom_make.sh | 28 ------------------ zsh_functions | 69 +------------------------------------------ zsh_sensitive.tar.gpg | 1 - zshrc | 17 +---------- 6 files changed, 15 insertions(+), 137 deletions(-) delete mode 100755 make_symlinks.sh delete mode 100644 vim/custom_make.sh delete mode 100644 zsh_sensitive.tar.gpg diff --git a/Makefile b/Makefile index c1a4975..1354818 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/make_symlinks.sh b/make_symlinks.sh deleted file mode 100755 index 8f6d1cd..0000000 --- a/make_symlinks.sh +++ /dev/null @@ -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 diff --git a/vim/custom_make.sh b/vim/custom_make.sh deleted file mode 100644 index 12a7e22..0000000 --- a/vim/custom_make.sh +++ /dev/null @@ -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 diff --git a/zsh_functions b/zsh_functions index 26eb8ea..2bf852d 100644 --- a/zsh_functions +++ b/zsh_functions @@ -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 -} diff --git a/zsh_sensitive.tar.gpg b/zsh_sensitive.tar.gpg deleted file mode 100644 index c990ef2..0000000 --- a/zsh_sensitive.tar.gpg +++ /dev/null @@ -1 +0,0 @@ -  [jBS56o&Hw5-=D0lhU^$kQqM R} g?9ly8QKw J16|_ߣp|( ztEk=TjP.Ae1 %e[[ yMeũ)Imo7}e'#-;N]rMh^Ak\Dfs`,gڞZf݄ :}_ijDʼnuQT:D/)95rړaAhTfƝm7Z4DLYƈ0c2G>Vj |5 \ No newline at end of file diff --git a/zshrc b/zshrc index 36ef30b..4cd83f5 100644 --- a/zshrc +++ b/zshrc @@ -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