Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

new function and better vimdiff colors

  • Loading branch information...
commit e9bdd9485460ef4ddb1a8e7148f4a33015fb2d32 1 parent d17f6bd
@graysky2 authored
Showing with 49 additions and 34 deletions.
  1. +9 −5 dotfiles/.vimrc
  2. +1 −1  shell/.commonrc
  3. +39 −28 shell/.functions
View
14 dotfiles/.vimrc
@@ -1,8 +1,12 @@
set t_Co=256
-let g:zenburn_high_Contrast=1
-"colorscheme zenburn
colorscheme kolor
-if &diff
- colorscheme evening
-endif
+
+"if &diff
+" colorscheme evening
+"endif
+
+" Fix the difficult-to-read default setting for diff text highlighting. The
+" bang (!) is required since we are overwriting the DiffText setting. The highlighting
+" for "Todo" also looks nice (yellow) if you don't like the "MatchParen" colors.
+highlight! link DiffText MatchParen
View
2  shell/.commonrc
@@ -6,6 +6,6 @@ echo -e "\x1B]2;$(whoami)@$(uname -n)\x07"; # set terminal title
export MPD_HOST=$(ip addr show eno1 | grep -m1 inet | awk -F' ' '{print $2}' | sed 's/\/.*$//')
PATH=$PATH:$HOME/bin:$HOME/bin/browsers:$HOME/bin/makepkg:$HOME/bin/mounts:$HOME/bin/repo:$HOME/bin/benchmarking:$HOME/bin/chroots
-archey --config=$XDG_CONFIG_HOME/archey3.cfg
+archey --config=$HOME/.config/archey3.cfg
TERM=xterm-256color
View
67 shell/.functions
@@ -10,6 +10,17 @@ listd() { ls -l /etc/systemd/system/multi-user.target.wants; }
# fix zsh annoying history behavior
h() { if [ -z "$*" ]; then history 1; else history 1 | egrep "$@"; fi; }
+pkgget() {
+ if [[ -z "$1" ]]; then
+ echo "Supply a package name and try again"
+ else
+ cd /scratch
+ [[ ! -d /scratch/packages ]] && svn checkout --depth=empty svn://svn.archlinux.org/packages
+ cd packages
+ svn update "$1" && cd "$1"
+ fi
+}
+
bi() { cp -a "$1" /scratch ; cd /scratch/"$1"; }
tailc() { tail -n 40 "$1" | column -t; }
@@ -26,34 +37,34 @@ r0() { find . -type f -size 0 -print0 | xargs -0 rm -f; }
x() {
if [[ -f "$1" ]]; then
- case "$1" in
- *.lrz)
- lrztar -d "$1" && cd $(basename "$1" .lrz) ;;
- *.tar.bz2)
- tar xjf "$1" && cd $(basename "$1" .tar.bz2) ;;
- *.tar.gz)
- tar xzf "$1" && cd $(basename "$1" .tar.gz) ;;
- *.tar.xz)
- tar Jxf "$1" && cd $(basename "$1" .tar.xz) ;;
- *.bz2)
- bunzip2 "$1" && cd $(basename "$1" .bz2) ;;
- *.rar)
- rar x "$1" && cd $(basename "$1" .rar) ;;
- *.gz)
- gunzip "$1" && cd $(basename "$1" .gz) ;;
- *.tar)
- tar xf "$1" && cd $(basename "$1" .tar) ;;
- *.tbz2)
- tar xjf "$1" && cd $(basename "$1" .tbz2) ;;
- *.tgz)
- tar xzf "$1" && cd $(basename "$1" .tgz) ;;
- *.zip)
- unzip "$1" && cd $(basename "$1" .zip) ;;
- *.Z)
- uncompress "$1" && cd $(basename "$1" .Z) ;;
- *.7z)
- 7z x "$1" && cd $(basename "$1" .7z) ;;
- *) echo "don't know how to extract '$1'..." ;;
+ case "$1" in
+ *.lrz)
+ lrztar -d "$1" && cd $(basename "$1" .lrz) ;;
+ *.tar.bz2)
+ tar xjf "$1" && cd $(basename "$1" .tar.bz2) ;;
+ *.tar.gz)
+ tar xzf "$1" && cd $(basename "$1" .tar.gz) ;;
+ *.tar.xz)
+ tar Jxf "$1" && cd $(basename "$1" .tar.xz) ;;
+ *.bz2)
+ bunzip2 "$1" && cd $(basename "$1" .bz2) ;;
+ *.rar)
+ rar x "$1" && cd $(basename "$1" .rar) ;;
+ *.gz)
+ gunzip "$1" && cd $(basename "$1" .gz) ;;
+ *.tar)
+ tar xf "$1" && cd $(basename "$1" .tar) ;;
+ *.tbz2)
+ tar xjf "$1" && cd $(basename "$1" .tbz2) ;;
+ *.tgz)
+ tar xzf "$1" && cd $(basename "$1" .tgz) ;;
+ *.zip)
+ unzip "$1" && cd $(basename "$1" .zip) ;;
+ *.Z)
+ uncompress "$1" && cd $(basename "$1" .Z) ;;
+ *.7z)
+ 7z x "$1" && cd $(basename "$1" .7z) ;;
+ *) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
Please sign in to comment.
Something went wrong with that request. Please try again.