diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-12-25 02:38:18 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-12-25 02:39:09 +0100 |
commit | f728f08e7b4cfaa33f92b7249eefcb33067502f9 (patch) | |
tree | fef29e8b45e2f2644acc2a2ed4b77288224944b3 /zshrc | |
parent | 61deb73c5e0a9fa0ce94244f467063bae7793c2e (diff) | |
download | dotfiles-f728f08e7b4cfaa33f92b7249eefcb33067502f9.tar.xz |
zshrc: turn alias x into a function
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -70,7 +70,6 @@ alias du='du -hc' alias dus='du -S | sort -n' alias free='free -m' alias su='su - ' -alias x='startx' alias rehash='hash -r' alias eject='eject -v ' alias retract='eject -t -v ' @@ -157,10 +156,11 @@ 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 define () { - dictionary="english" - [[ "$2" != "" ]] && dictionary=$2 - echo "DEFINE $dictionary $1\nQUIT" | netcat dict.org 2628 +function x () { + if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then + startx + logout + fi } function scrot () { @@ -177,8 +177,7 @@ function scrot () { echo "Taking a screenshot..." import -window root -quality 100 ~/$1-$timestamp.$format echo "Generating a thumbnail..." - cp ~/$1-$timestamp.$format ~/$1-$timestamp.th.$format - mogrify -resize 15% ~/$1-$timestamp.th.$format + convert -resize 15% ~/$1-$timestamp.$format ~/$1-$timestamp.th.$format echo "Saved as ~/$1-$timestamp.$format" fi } |