From 71b6545ec076a5649d875930de01b45efae95ae4 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Wed, 5 Dec 2018 20:29:13 -0500 Subject: [PATCH] Closes #76 --- aliases/zsh_aliases | 12 +++++++++--- configs/i3/config | 1 + dotfiles/.vimrc | 4 +++- scripts/backup.sh | 9 +++++---- txt/exlude-dirs-backup.txt | 6 ++++++ 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 txt/exlude-dirs-backup.txt diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index e9cb15a..260c4a2 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -46,12 +46,18 @@ function lzip() { unzip -l $1 | less; } alias mkpk="makepkg -sri" alias mkex="chmod 777" +alias ctle="systemctl enable" +alias ctls="systemctl start" + + +# mounting {{{ # + alias udm="udisksctl mount -b" +alias udmb="udisksctl mount -b /dev/sdc2" alias udu="udisksctl unmount -b" alias udub="udisksctl unmount -b /dev/sdc2" -alias mkex="chmod 777" -alias ctle="systemctl enable" -alias ctls="systemctl start" + +# }}} mounting # # }}} command line related # diff --git a/configs/i3/config b/configs/i3/config index dac3fd3..ef83364 100644 --- a/configs/i3/config +++ b/configs/i3/config @@ -37,6 +37,7 @@ bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf bindsym Mod4+n exec nemo bindsym Mod4+p workspace $ws4; exec pgadmin3 # bindsym Mod4+p exec pycharm +bindsym Mod4+q exec qdirstat bindsym Mod4+r exec urxvt -e ranger bindsym control+$mod+s exec systemctl suspend bindsym Mod4+t exec st diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 21edb35..4c378a4 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -128,7 +128,7 @@ Plug 'easymotion/vim-easymotion' " status bar displaying various info about the current buffer Plug 'vim-airline/vim-airline' - " let g:airline_section_c = '%F' + let g:airline_section_c = '%F' Plug 'vim-airline/vim-airline-themes' let g:airline_powerline_fonts = 1 @@ -210,6 +210,8 @@ nnoremap ht :set tabstop=2 shiftwidth=2 expandtab nnoremap vhe :vert help " move cursor to middle of line nnoremap m :call cursor(0, len(getline('.'))/2) +" apply normal command to selection +vnoremap n q:anorm " don't wrap lines nnoremap nw :set nowrap " check if in neovim diff --git a/scripts/backup.sh b/scripts/backup.sh index af2bf1d..06162b4 100755 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -1,11 +1,12 @@ #!/bin/bash # Backup destination -backup_dest=/run/media/kevin/pc-backup/backups/nzxt +backup_dest="/run/media/kevin/pc-backup/backups/nzxt" +exclude_dirs_list="/home/kevin/linux-config/txt/exlude-dirs-backup.txt" # Labels for backup name -distro=arch +distro="arch" datetime=$(date "+%m.%d-%H.%M") -backupfile="$backup_dest/$datetime-$distro.tar.gz" +backup_file="$backup_dest/$datetime-$distro.tar.gz" -sudo tar -czpvf "$backupfile" --exclude=/lost+found --exclude=/mnt --exclude=/proc --exclude=/run --exclude=/sys / +sudo tar -czpvf "$backup_file" --exclude-from="$exclude_dirs_list" / diff --git a/txt/exlude-dirs-backup.txt b/txt/exlude-dirs-backup.txt new file mode 100644 index 0000000..a67b918 --- /dev/null +++ b/txt/exlude-dirs-backup.txt @@ -0,0 +1,6 @@ +/home/kevin/.cache/spotify/Storage +/lost+found +/mnt +/proc +/run +/sys