diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-01-14 21:39:13 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-01-14 21:41:47 +0100 |
commit | 70ff4eac1f59c8c037c825959e5ef210705b7ecf (patch) | |
tree | 357df3e574e8b24d9a700ee88d8887b4db51a9d8 | |
parent | b5bafb7e72e837b0d7117f9e046ddc765fea89fe (diff) | |
download | dotfiles-70ff4eac1f59c8c037c825959e5ef210705b7ecf.tar.xz |
zshrc: converted function x to alias
-rw-r--r-- | zshrc | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -61,7 +61,7 @@ alias cp='cp -ia' alias mv='mv -i' alias rm='rm -i' alias cls='clear' -alias upmem='ps -aux | sort -k 6' +alias upmem='ps aux | sort -k 6' alias top='htop' alias psg='ps auxw | grep -i ' alias psptree='ps auxwwwf' @@ -70,6 +70,7 @@ alias du='du -hc' alias dus='du -S | sort -n' alias free='free -m' alias su='su - ' +alias x='startx &! logout' alias rehash='hash -r' alias eject='eject -v ' alias retract='eject -t -v ' @@ -156,24 +157,17 @@ function web () { $BROWSER "http://yubnub.org/parser/parse?command=$*" } function pmem () { ps -o rss,comm -p $(pgrep $1) } function dsync () { rsync -lprt --progress --stats --delete "$1/" "$2/" } -function x () { - if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then - startx - logout - fi -} - function snap () { [ $2 ] && tmout=$2 || tmout=5 [ $3 ] && format=$3 || format=png - timestamp=`date +%d%m%y-%H%M` + stamp=`date +%d%m%y-%H%M` echo -n "Snapshot in " for (( i = $tmout; i >= 1; i-- )) do echo -n "$i.. "; sleep 1 done - import -window root -quality 100 ~/$1-$timestamp.$format - convert -resize "15%" ~/$1-$timestamp.$format ~/$1-$timestamp.th.$format - echo "saved as: ~/$1-$timestamp.$format" + import -window root -quality 100 ~/$1-$stamp.$format + convert -resize "15%" ~/$1-$stamp.$format ~/$1-$stamp.th.$format + echo "saved as: ~/$1-$stamp.$format" } function extract () { |