diff options
author | ben <benjaminfranzke@googlemail.com> | 2010-08-28 17:08:31 +0200 |
---|---|---|
committer | ben <benjaminfranzke@googlemail.com> | 2010-08-28 17:08:31 +0200 |
commit | bd56e5fc0597c2a71b0810657298e201a5f2c95e (patch) | |
tree | 237d1965aa3f6b776b344f24e7550297b1846aed | |
parent | 0b31c305c18f3dc19b239d7146efb246271ea3db (diff) | |
download | dotfiles-bd56e5fc0597c2a71b0810657298e201a5f2c95e.tar.gz dotfiles-bd56e5fc0597c2a71b0810657298e201a5f2c95e.tar.bz2 dotfiles-bd56e5fc0597c2a71b0810657298e201a5f2c95e.zip |
add script that cleans $HOME from some stupid files
-rw-r--r-- | .scripts/cleanup-homedir.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.scripts/cleanup-homedir.sh b/.scripts/cleanup-homedir.sh new file mode 100644 index 0000000..3764ff9 --- /dev/null +++ b/.scripts/cleanup-homedir.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# remove vim swap files +find $HOME -maxdepth 1 -type f -name '.sv*' -exec rm {} \; + +pids=$(pgrep startx) +ls -1 $HOME/.serverauth.* | grep -v ${pids/ /\\|} | while read file; do + rm "${file}" +done + +rm $HOME/.xsession-errors* + +# xsession manager files (maybe obsolete) +rm $HOME/.xsm* |