Browse files

two new scripts & misc changes

  • Loading branch information...
1 parent 4afd724 commit 3f3006f419f09c0a6ad3a2a8b6958bea9fee5c09 Cloud committed Sep 23, 2011
Showing with 139 additions and 415 deletions.
  1. +1 −1 .Xresources
  2. +2 −2 .colors/muted_tree
  3. +4 −3 .config/awesome/rc.lua
  4. +1 −0 .config/zsh/aliases
  5. +4 −0 .config/zsh/functions
  6. +0 −396 .config/zsh/histfile
  7. +1 −1 .ncmpcpp/config
  8. +1 −1 .vimrc
  9. +6 −4 .xinitrc
  10. +8 −2 .zprofile
  11. +4 −3 .zshrc
  12. +9 −2 bin/dpms-toggle.sh
  13. +57 −0 bin/funtoo
  14. +41 −0 bin/localtmp.sh
View
2 .Xresources
@@ -11,7 +11,7 @@
!#define FONT_UNDERLINE xft:Montecarlo:underline:pixelsize=10
! Colors
-#include "/home/cloud/.colors/vector"
+#include "/home/cloud/.colors/muted_tree"
!*background: #1C1C1C
!*foreground: #DDEEDD
View
4 .colors/muted_tree
@@ -1,15 +1,15 @@
! file: .colors/muted_tree
! variation of Hims Xdefaults
-*color0: #131313
+*color0: #1E1E1E
*color1: #E57DA9
*color2: #8ED88E
*color3: #ecebbe
*color4: #a9cdeb
*color5: #8F6795
*color6: #c9caec
*color7: #f2f2f2
-*color8: #141414
+*color8: #3E3E3E
*color9: #f99286
*color10: #c3f786
*color11: #fcfbcc
View
7 .config/awesome/rc.lua
@@ -72,19 +72,19 @@ spacer.text = " "
mpdicon = widget({ type = "imagebox" })
mpdicon.image = image(beautiful.music_icon)
mpdwidget = widget({ type = "textbox", name = "mpdwidget" })
-vicious.register(mpdwidget, vicious.widgets.mpd, "<span color='" .. beautiful.fg_green .. "'>MPD:</span> ${Artist} - <span color='" .. beautiful.fg_blue .. "'>${Title}</span>", 5)
+vicious.register(mpdwidget, vicious.widgets.mpd, "<span color='" .. beautiful.fg_blue .. "'>MPD:</span> <span color='" .. beautiful.fg_green .. "'>${Artist}</span> - ${Title}", 5)
-- Date and time
dateicon = widget({ type = "imagebox" })
dateicon.image = image(beautiful.time_icon)
datewidget = widget({ type = "textbox", name = "datewidget" })
-vicious.register(datewidget, vicious.widgets.date, "<span color='" .. beautiful.fg_blue .. "'>@%R</span>", 59)
+vicious.register(datewidget, vicious.widgets.date, "<span color='" .. beautiful.fg_purple .. "'>@%R</span>", 59)
-- Battery widget
baticon = widget({ type = "imagebox" })
baticon.image = image(beautiful.battery_icon)
batwidget = widget({ type = "textbox", name = "batwidget" })
-vicious.register(batwidget, vicious.widgets.bat, "<span color='" .. beautiful.fg_green .. "'>BAT:</span> <span color='" .. beautiful.fg_dark .. "'>$2</span>%", 183, 'BAT0')
+vicious.register(batwidget, vicious.widgets.bat, "<span color='" .. beautiful.fg_blue .. "'>BAT:</span> $2%", 183, 'BAT0')
-- ToolTip
datewidget.tooltip = awful.tooltip({
@@ -300,6 +300,7 @@ clientkeys = awful.util.table.join(
end),
-- Initiate modal keybindings
awful.key({ modkey, }, "F3", function(c)
+ naughty.notify({ text="Modal Keybindings" })
keygrabber.run(function(mod, key, event)
if event == "release" then return true end
if float_mode[key] then float_mode[key](c)
View
1 .config/zsh/aliases
@@ -55,6 +55,7 @@ alias -g em="sudo emerge -a"
alias -g emr="sudo emerge -C"
alias -g emu="sudo emerge -uDa world"
alias dgraph="equery g"
+alias dograph="equery depends"
alias use="equery u"
alias unstable="qlist -I 9999 --nocolor | xargs sudo emerge"
View
4 .config/zsh/functions
@@ -36,6 +36,10 @@ function acpi_call {
cd $orig
}
+function mathhw {
+ curl -s http://www.math.ufl.edu/~aipew/ | grep $1 | grep -v Test | awk -F'[><]' '{print $2}'
+}
+
#-- Shamelessly stolen from Milomouse --#
function cpf {
if [[ -d $*[-1] ]]; then
View
396 .config/zsh/histfile
@@ -1,396 +0,0 @@
-vi ~/.zshrc
-emerge -av vim
-emerge -av portage
-man portage
-man emerge
-visudo
-s! em -p xorg-server L
-s! em xorg-server
-eselect news 1
-eselect news
-eselect news read 1
-s! em cwm
-s! em rxvt-unicode
-s! em montecarlo-font
-s! em montecarlo
-m
-vim .cwmrc
-s! poweroff
-s! em xmod
-s! em xmodmap xbindkeys tmux xrandr
-xset
-s! em xset
-s! em terminus liberation-fonts
-s! em terminus-font liberation-fonts
-V /etc/fonts/conf.avail/60-liberation.conf
-s! eselect fontconfig
-s! eselect fontconfig list
-s! eselect enable 25
-s! eselect fontconfig enable 25
-s! em luakit
-cd /proc
-cd /dev/shm
-s! em gtk3
-qlist
-acpi
-use luakit
-dgraph dbus
-use dbus
-s! em eix
-use eix
-USE="optimization zsh-completion" emerge eix
-dbus-launch luakit
-eix dbus
-em awesome
-t
-use imagemagick
-s! em awesome
-luakit
-v ~/.Xresources
-eix eminent
-git clone git://git.glacicle.org/awesome/eminent.git
-cd eminent
-cp eminent.lua ../
-eix vicious
-s! em vicious
-git clone git://git.sysphere.org/awesome-config/tree/scratch
-git clone git://git.sysphere.org/awesome-configs anrxc
-git clone http://git.sysphere.org/awesome-configs anrxc
-cd anrxc
-cp scratch ../
-v rc.lua
-s! em ntfs-3g
-eix ntfs
-s! em ntfs3g
-s! mkdir /mnt/usb
-s! mount /dev/sdb2 /mnt/usb
-cd Backup/Files
-cp .xmod ~/.xmod
-v .fontconfig
-v .font.conf
-cd .config
-cd ~/.config/awesome
-s! chown -R cloud:cloud themes
-cd themes
-cd dark
-../../
-ll -a
-exit
-s! em ranger
-s! umount /mnt/usb
-s! chmod 777 /mnt/usb
-man mount
-s! mount -w /dev/sdb2 /mnt/usb
-cat /etc/mtab
-touch test
-cd usb
-cd Files
-s! chown -R cloud:cloud cloud/
-cd cloud
-cd /mnt/usb/Backup/Files/cloud
-mkdir ~/pictures
-mkdir ~/src
-cp pictures/* ~/pictures/
-s! em feh
-setbg -r ~/pictures/subtle
-setbg -r -t ~/pictures/subtle
-setbg -t -r ~/pictures/subtle
-mkdir ~/docs
-cp docs/* ~/docs/*
-cp docs/* ~/docs/
-ls
-mkdir ~/.backup
-v mac
-cp mac ~/docs/
-v todo
-v TODO
-cp TODO ~/
-cp skeleton.sh ~/bin/
-v back
-cp back ~/bin/
-cp barrtodo ~/bin/
-cp class_start.sh ~/bin/
-cp colorscript ~/bin/
-s! em alsamixer
-s! em alsamixer-app
-v notest
-v notes
-cp notes ~/bin/
-l ~/
-l ~/bin
-chmod +x ~/bin/skeleton.sh
-eix alsa-driver
-alsamixer-app
-env-update
-s! env-update
-eix alsamixer
-s! em -C alsamixer-app
-s! em alsa-utils
-s! rc-update add alsasound boot
-s! /etc/init.d/alsasound start
-s! em cplay
-s! modprobe -r snd_hda_codec_hdmi
-alsamixer
-s! /etc/init.d/alsasound restart
-cd src
-cp C ~/src/
-eix omploader
-cp omploader ~/src/
-cp perl ~/src/
-cp acpi_call ~/src/
-cplay
-c
-cd ../
-cd etc
-cd /etc/portage
-cd bin
-v package.backup
-s! cp package.{backup,keywords,license,mask,unmask,use} /etc/portage/
-V package.mask
-V package.unmask
-v package.use
-V package.keywords
-V make.conf
-emu
-V package.use
-use openssl
-eix pambase
-use openssh
-V /etc/portage/package.use
-use pambase
-use gcc
-dgraph luakit
-dgraph luajit
-eix gcc
-gcc-config -l
-sudo emerge -uDp --newuse @world
-sudo emerge -uDav --newuse @world
-eix wmfs
-mkdir overlays
-cd overlays
-eix dzen
-rm local
-git clone git@github.com:/Saint0fCloud/flora.git
-v known_hosts
-ssh-keygen -t rsa -C "jester_colony@live.com"
-xclip
-s! em xclip
-xclip -set clip < ~/.ssh/id_rsa.pub
-xclip -sel clip < ~/.ssh/id_rsa.pub
-v ~/.ssh/id_rsa.pub
-git clone git@github.com:Saint0fCloud/flora.git
-cd flora
-s! em avt gitflow git-flow-completion
-s! em -avt gitflow git-flow-completion
-use git-flow-completion
-. /etc/zsh/git-flow-completion.zsh
-git-flow init
-3
-htop
-cd ~/
-cd ~/overlays
-mkdir local
-cd /mnt/usb
-cd Backup
-cd 09-2011
-use dar
-s! em dar
-dar -l Qliphoth-09-16-11.1.dar
-dar -x Qliphoth-09-16-11.1/usr/portage/local
-dar -x Qliphoth-09-16-11.1.dar/usr/portage/local
-dar Qliphoth-09-16-11.1.dar -x /usr/local/portage/dzen
-dar -l usr/portage/local
-dar -l Qliphoth-09-16-11.1.dar usr/portage/local
-dar -l Qliphoth-09-16-11.1/usr/portage/local
-man dar
-cd dar
-rm test
-mkdir test
-dar -R test -x Qliphoth-09-16-11.1.dar -g usr/local/portage/
-cd test
-cd usr
-cd local
-cd portage
-cd profiles
-cd ~/overlays/local
-mkdir ~/overlays/local/profiles
-cd ~/overlays/local/profiles
-v repo_name
-echo "Cloud" > repo_name
-echo $PORTDIR_OVERLAY
-eix lualock
-s! em lualock
-s! em layman
-V /etc/make.conf
-cp x11-misc ~/overlays/local
-s! chown -R cloud:cloud x11-misc
-cd lualock
-cd dzen
-ll
-../../../
-s! rm test
-s! rm -R test
-s! eselect bashcomp enable --global gentoo
-s! em lsof
-lsof / | egrep -i 'del.*libpam\.so'
-s! dispatch-conf
-install -d backup-keys
-cp * backup-keys/.
-ssh-keygen -t rsa -C "Saint0fCloud@gmail.com"
-lg profile
-V ~/.zprofile
-cd /etc/zsh
-V profile
-V zprofile
-cd /etc/profile.d
-V keychain.sh
-s! rm keychain.sh
-v ~/.zprofile
-.zprofile
-. .zprofile
-source ~/.zprofile
-s! em keychain
-. ~/.zprofile
-git config --global user.name "Cloud"
-git config --global user.email "Saint0fCloud@gmail.com"
-xclip -sel clip < ~/.ssh/saint_rsa
-v saint_rsa
-ssh-keygen -t rsa -C "saint0fcloud@gmail.com"
-cd ~/.ssh
-v id_rsa
-rm id_rsa
-rm id_rsa.pub
-v saint_rsa.pub
-xclip -sel clip < ~/.ssh/saint_rsa.pub
-git config --global github.token 73d65fb57531a5b67e23c7c09dfbd7ca
-s! rm -rf /dev/ptmx
-s! mknod /dev/ptmx c 5 2
-s! chmod 666 /dev/ptmx
-s! umount /dev/pts
-eix gitosis
-s! /etc/init.d/sshd restart
-ssh git@github.com
-s! mkdir /dev/pts
-V /etc/fstab
-s! reboot
-uname -a
-killall setbg
-setbg -r ~/pictures/subtle -r
-setbg -r ~/pictures/subtle -t
-V ~/.gitconfig
-v ~/.gitconfig
-v ~/.gitmessage.txt
-git remote add upstream git://github.com/funtoo/flora.git
-cd ~/bin
-v floraupdate
-chmod +x ~/bin/floraupdate
-cd ~/overlays/flora
-git branch
-eix i3lock
-s! em i3lock
-v ~/.config/zsh/aliases
-zload
-syn
-use xautolock
-eix xautolock
-eix alock
-cd overlays/loca
-cd overlays/local
-cd x11-misc
-cd xautolock
-v xautolock-2.2.ebuild
-s! em xautolock
-v ~/.xinitrc
-s! modprobe asus_laptop
-xbindkeys -k
-eix openrc
-cd /etc/conf.d/
-V keymaps
-V xdm
-eix xdm
-cd /etc
-lsmod
-s! lsmod
-s! modprobe asus-laptop
-cd /sys/platform
-cd /sys/class/ata_device
-cd firmware
-cd dev
-../
-cd devices
-cd platform
-cd asus_laptop
-cd input
-cd input5
-l
-cat name
-cd
-v ~/.xbindkeysrc
-use xorg-server
-V /etc/portage/package.mask
-eix xf86-input L
-s! xf86-input-keyboard
-s! em xf86-input-keyboard
-xinit awesome
-xbindkeys -mk
-eix xf86-input
-eix udev
-s! em -u udev
-s! em xev
-V /etc/portage/package.keywords
-V /etc/portage/package.unmask
-s! em dzen
-s! em -C xf86-input-keyboard
-killall emerge
-su
-s! em conky
-v .xinitrc
-xinit cwm
-tmux attach
-s! em mplayer
-eix xorg-server
-xev
-e
-: 1316291180:0;gpasswd -a cloud audio
-: 1316291182:0;s! gpasswd -a cloud audio
-: 1316291215:0;s! em alsa-plugins
-: 1316291606:0;cd ~/
-: 1316291637:0;use alsa-plugins
-: 1316291646:0;s! em alsa-plugins
-: 1316291658:0;git init
-: 1316291669:0;git status
-: 1316291695:0;cd ~/overlays
-: 1316291695:0;l
-: 1316291697:0;cd flora
-: 1316291697:0;l
-: 1316291705:0;git branch
-: 1316291709:0;git branch master
-: 1316291715:0;git branch switch master
-: 1316291716:0;ls
-: 1316291723:0;git branch switch develop
-: 1316291733:0;../
-: 1316291734:0;l
-: 1316291736:0;../
-: 1316291736:0;l
-: 1316291737:0;cd .git
-: 1316291738:0;l
-: 1316291740:0;v config
-: 1316291749:0;v HEAD
-: 1316291755:0;cd
-: 1316291760:0;v .gitignore
-: 1316291766:0;git status
-: 1316291771:0;git add .xinitrc
-: 1316291774:0;git status
-: 1316291788:0;l
-: 1316291834:0;git add .cwmrc .gtkrc-2.0 .htoprc .tmux.conf .vimrc .xbindkeysrc .xinitrc .xmod .Xresources .zprofile .zshrc
-: 1316291836:0;git stauts
-: 1316291839:0;git status
-: 1316291857:0;cd .git
-: 1316291858:0;l
-: 1316291860:0;v config
-: 1316291865:0;v index
-: 1316291870:0;../
-: 1316291870:0;l
-: 1316291883:0;git add .config/awesome/rc.lua
-: 1316291887:0;git add .ncmpcpp/config
-: 1316291896:0;git add .config/zsh/
View
2 .ncmpcpp/config
@@ -137,7 +137,7 @@ playlist_disable_highlight_delay = "3"
## Note: colors can be nested.
##
#
-song_list_format = "{$2%l$9 }{$3%a$9 - $7%t$9}$R{ $5%b$9}"
+song_list_format = "{$6%l$9 }{$3%a$9 - $7%t$9}$R{ $5%b$9}"
#
song_status_format = "{{%a{ \"%b\"{ (%y)}} - }{%t}}|{%f}"
#
View
2 .vimrc
@@ -22,7 +22,7 @@ set paste
set smartindent
set tabstop=4
set shiftwidth=4
-set expandtab
+set noexpandtab
set smarttab
set backspace=2
View
10 .xinitrc
@@ -15,7 +15,7 @@ xmodmap ~/.xmod
# Screen lock
xautolock -time 2 -locker "dlock -i /home/cloud/pictures/middle-finger.png -t" -detectsleep \
- -nowlocker "dlock -d -i /home/cloud/pictures/middle-finger.png" &
+ -nowlocker "dlock -t -d -i /home/cloud/pictures/middle-finger.png" &
# Start urxvt daemon
urxvtd -q -o -f
@@ -27,20 +27,22 @@ urxvtd -q -o -f
if grep -q class /proc/cmdline; then
class_start.sh
else
- setbg -r /home/cloud/pictures/subtle -t 3 &
+ #setbg -t -r /home/cloud/pictures/subtle -w 3 &
+ setbg -ts ~/pictures/subtle/crossed_stripes.png
fi
# Select WM
case "$1" in
awesome)
exec awesome;;
i3)
+ dzi3 &
exec i3;;
cwm)
dzconky &
urxvtc -name urxvtk -geometry 100X13+375+12 &
exec cwm;;
- twm)
- exec twm;;
+ fluxbox)
+ exec fluxbox;;
*)
echo "Error, wm not found." && exit;;
esac
View
10 .zprofile
@@ -1,13 +1,13 @@
+# System-wide zprofile
if [ -f /etc/zsh/zprofile ]; then
. /etc/zsh/zprofile
fi
+# Git-flow makes life easier
if [ -f /etc/zsh/git-flow-completion.zsh ]; then
. /etc/zsh/git-flow-completion.zsh
fi
-eval `keychain --eval --agents ssh saint_rsa`
-
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
@@ -24,6 +24,12 @@ export PAGER="less"
export BROWSER="luakit"
export PATH="/usr/libexec/cw:/home/cloud/bin:$PATH"
+# Move ~/.{local,macromedia} to tmpfs
+localtmp.sh
+
+# Github ssh key
+eval `keychain --eval --agents ssh saint_rsa`
+
# List tasks todo
todo l
View
7 .zshrc
@@ -43,12 +43,13 @@ bindkey "\e[7~" beginning-of-line # home
bindkey "\e[8~" end-of-line # end
#-- Prompt --#
-PROMPT="%B%{$fg[cyan]%}%n%b:%{$fg[blue]%}%~ %{$fg[red]%}%# "
+PS1="%{$fg[blue]%}%n%{$fg[cyan]%}@%{$fg[green]%}%m%{$reset_color%}:%{$fg[magenta]%}%~
+ %{$fg[red]%}>> "
#-- Right prompt --#
-RPROMPT="%{$fg[green]%}%T%{$reset_color%}"
+RPS1="%{$(echotc UP 1)%}%{$fg[cyan]%}%T%{$reset_color%}%{$(echotc DO 1)%}"
#-- History --#
-HISTFILE=~/.config/zsh/histfile
+HISTFILE=~/.local/zsh/histfile
HISTSIZE=1000
SAVEHIST=1000
View
11 bin/dpms-toggle.sh
@@ -1,5 +1,12 @@
#!/bin/zsh
# Toggle dpms on/off
-xset -q | grep -q "DPMS is Enabled" && xset -dpms && exit
-xset -q | grep -q "DPMS is Disabled" && xset +dpms
+xset -q | grep -q "DPMS is Enabled" && {
+ xset -dpms
+ xset s off
+ exit
+}
+xset -q | grep -q "DPMS is Disabled" && {
+ xset +dpms
+ xset s on
+}
View
57 bin/funtoo
@@ -0,0 +1,57 @@
+#!/bin/zsh
+
+OS="Funtoo $(uname -m)"
+wmnames=(awesome i3 cwm fluxbox dwm subtle)
+
+HOSTNAME=$(hostname)
+
+# Check kernel version
+KERNEL=$(uname -r)
+
+# Uptime
+UPTIME=$(cat /proc/uptime | awk '{print $1}')
+min=$((${UPTIME}/60%60))
+hrs=$((${UPTIME}/3600%24))
+if [[ -n min && -n hrs ]]; then
+ UPTIME="${hrs} hrs ${min} min"
+fi
+
+# wm
+for i in $wmnames; do
+ if pidof $i >/dev/null; then
+ WM="$i"
+ fi
+done
+
+# Font
+FONT=$(grep "#define FONT " ~/.Xresources | cut -d':' -f 2)
+
+
+# This ugly mess prints out 3D ascii art of 'funtoo'
+purple=$(tput setaf 5)
+white=$(tput setaf 3)
+textr=$(tput bold)$(tput setaf 5)
+textm=$(tput sgr0)$(tput setaf 3)
+textl=$(tput setaf 4)
+
+echo
+echo " $white*$white*$white*$white* $white*$white* "
+echo " $purple/$white*$white*$purple/ $purple/$white*$white* "
+echo " $white*$white*$white*$white*$white*$white* $white*$white* $white*$white* $white*$white*$white*$white*$white*$white*$white* $white*$white*$white*$white*$white*$white* $white*$white*$white*$white*$white*$white* $white*$white*$white*$white*$white*$white* "
+echo "$purple/$purple/$purple/$white*$white*$purple/ $purple/$white*$white* $purple/$white*$white*$purple/$purple/$white*$white*$purple/$purple/$purple/$white*$white*$purple/$purple/$purple/$white*$white*$purple/ $white*$white*$purple/$purple/$purple/$purple/$white*$white* $white*$white*$purple/$purple/$purple/$purple/$white*$white*"
+echo " $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white*$purple/$white*$white* $purple/$white*$white*"
+echo " $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white* $purple/$white*$white*$purple/$white*$white* $purple/$white*$white*"
+echo " $purple/$white*$white* $purple/$purple/$white*$white*$white*$white*$white*$white* $white*$white*$white* $purple/$white*$white* $purple/$purple/$white*$white* $purple/$purple/$white*$white*$white*$white*$white*$white* $purple/$purple/$white*$white*$white*$white*$white*$white*"
+echo " $purple/$purple/ $purple/$purple/$purple/$purple/$purple/$purple/ $purple/$purple/$purple/ $purple/$purple/ $purple/$purple/ $purple/$purple/$purple/$purple/$purple/$purple/ $purple/$purple/$purple/$purple/$purple/$purple/ "
+echo
+
+echo -e "\t${textr}OS \t${textm}-> \t$textl$OS"
+echo -e "\t${textr}Kernel \t${textm}-> \t$textl$KERNEL"
+echo -e "\t${textr}Uptime \t${textm}-> \t$textl$UPTIME"
+echo -e "\t${textr}WM \t${textm}-> \t$textl$WM"
+echo -e "\t${textr}Font \t${textm}-> \t$textl$FONT"
+echo
+
+if [[ $1 = "-s" ]]; then
+ scrot -cd 2 "screenshot-%m-%d-%Y.png" -e 'ompload $f && mv $f ~/pictures/screenshots/'
+fi
View
41 bin/localtmp.sh
@@ -0,0 +1,41 @@
+#!/bin/zsh
+# Move directories in ~/ to tmpfs
+# Mainly used to reduce Disk IO for luakit
+##
+
+TMPDIR=/dev/shm
+LOCALDIRS=(.local .macromedia)
+
+unpack_tmp() {
+ [[ ! -d /dev/shm ]] && mkdir /dev/shm/$1
+
+ if [[ ! -e ~/$1.tar.tgz ]]; then
+ [[ ! -d ~/$1 ]] && echo "$1 does not exist" && mkdir ~/$1
+ echo "Creating tar compressed package"
+ cd ~/ && tar -czf ~/$1.tar.tgz $1
+ fi
+
+ if [[ -e ~/$1.tar.tgz ]]; then
+ echo "Unpacking $1.tar.tgz in $TMPDIR"
+ cd $TMPDIR && tar -xzf ~/$1.tar.tgz
+ else
+ [[ ! -d $TMPDIR/$1 ]] && mkdir $TMPDIR/$1
+ fi
+
+ [[ -d ~/$1 ]] && rm -Rf ~/$1
+
+ ln -sf $TMPDIR/$1 ~/$1
+}
+
+pack_tmp() {
+ echo "Packing $TMPDIR/$1"
+ [[ -d $TMPDIR/$1 ]] && cd $TMPDIR && tar -czf ~/$1.tar.tgz $1
+}
+
+for i in $LOCALDIRS; do
+ if [[ -d $TMPDIR/$i && $(readlink ~/$i) = "$TMPDIR/$i" ]]; then
+ pack_tmp $i
+ else
+ unpack_tmp $i
+ fi
+done

0 comments on commit 3f3006f

Please sign in to comment.