diff --git a/README.md b/README.md index ea4e4f5..4668461 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ are also for my Linux * **Terminal**: [rxvt-unicode-pixbuf](https://www.wikiwand.com/en/Rxvt) * **Shell**: [Zsh](http://zsh.sourceforge.net/) + [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) * **Window Manager**: [i3-gaps](https://github.com/Airblader/i3) -* **Editor**: [Neovim](https://github.com/neovim/neovim) ([plugins](dotfiles/vimrc#L51)) +* **Editor**: [Neovim](https://github.com/neovim/neovim) ([plugins](dotfiles/.vimrc#L51)) * **File Manager**: [ranger](https://ranger.github.io/) diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index 69017bc..05f694c 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -262,7 +262,7 @@ function gcm(){ echo git commit -m \""$1"\" ; } function psgi() { git add . - git commit -m -S '.' + git commit -mS '.' git push } alias gps="git push" diff --git a/configs/neofetch/config.conf b/configs/neofetch/config.conf index 50e7723..9a428b8 100644 --- a/configs/neofetch/config.conf +++ b/configs/neofetch/config.conf @@ -336,7 +336,7 @@ public_ip_host="http://ident.me" # disk_show=('/'): # 'Disk (/): 74G / 118G (66%)' # -disk_show=('/' '/dev/sda3') +disk_show=('/' '/home' ) # Disk subtitle. # What to append to the Disk subtitle. diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 80f29ab..48a21a1 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -193,8 +193,8 @@ nnoremap | " leader mappings {{{ " let mapleader="\" -" replace vim-commentary Markdown comments with HTML -nnoremap cmt :%s/>\(.*\)>//g +" replace until end of line +nnoremap c c$ " delete entire buffer nnoremap dg ggdG " delete line into system clipboard diff --git a/scripts/backup.sh b/scripts/backup.sh index 9968c8f..3d9f0b5 100755 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -1,19 +1,31 @@ #!/bin/bash +mount_dir="/run/media/kevin" # Backup destination case $1 in nzxt ) - backup_dest="/run/media/kevin/backup-hd/nzxt" + backup_dest="$mount_dir/backup-hd/nzxt" + # backup_dest="$mount_dir/backup-usb/nzxt" ;; x1 ) - backup_dest="/run/media/kevin/laptop-backup" + backup_dest="$mount_dir/laptop-backup" ;; esac exclude_dirs_list="/home/kevin/linux-config/txt/exclude-dirs-backup.txt" +exclude_dirs_list_full="/home/kevin/linux-config/txt/exclude-dirs-backup-full.txt" -# Labels for backup name -distro="arch" -datetime=$(date "+%m.%d-%H.%M") -backup_file="$backup_dest/$datetime-$distro.tar.gz" +case $2 in + tar ) + # Labels for backup name + distro="arch" + datetime=$(date "+%m.%d-%H.%M") + backup_file="$backup_dest/tar/$datetime-$distro.tar.gz" -sudo tar -czpvf "$backup_file" --exclude-from="$exclude_dirs_list" / + sudo tar -czpvf "$backup_file" --exclude-from="$exclude_dirs_list" / + ;; + full ) + sudo rsync -PraAX --exclude-from="$exclude_dirs_list_full" / "$backup_dest/full" + sudo rsync -PraAX /home "$backup_dest/full/home" + # echo rsync -PraAX --exclude-from="$exclude_dirs_list_full" / "$backup_dest/full" + # echo rsync -PraAX /home "$backup_dest/full/home" +esac diff --git a/setup.sh b/setup.sh index ab86996..ca68d84 100755 --- a/setup.sh +++ b/setup.sh @@ -19,14 +19,14 @@ link_to_lc () { item_name=$(basename -- "$item") # echo "$item_name" # Remove system item and link config in repository to system. - rm -f "${sys_dir:?}"/"$item_name" + rm -rf "${sys_dir:?}"/"$item_name" ln -s "$config_dir"/"$item_name" "$sys_dir"/"$item_name" && echo "Linked $item_name." done } link_to_lc "files" "$HOME" "$lc_dir/dotfiles" -# link_to_lc "dirs" "$HOME/.config" "$lc_dir/configs" -# link_to_lc "dirs" "$HOME/.themes" "$lc_dir/gtk/themes" +link_to_lc "dirs" "$HOME/.config" "$lc_dir/configs" +link_to_lc "dirs" "$HOME/.themes" "$lc_dir/gtk/themes" # setup nvim config # nvim_file="/home/kevin/lc-test/init.vim" diff --git a/txt/exclude-dirs-backup-full.txt b/txt/exclude-dirs-backup-full.txt new file mode 100644 index 0000000..aee3c59 --- /dev/null +++ b/txt/exclude-dirs-backup-full.txt @@ -0,0 +1,8 @@ +/dev/* +/lost+found +/media/* +/mnt/* +/proc/* +/run/* +/sys/* +/tmp/*