summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
authorben <benjaminfranzke@googlemail.com>2010-08-28 17:08:31 +0200
committerben <benjaminfranzke@googlemail.com>2010-08-28 17:08:31 +0200
commitbd56e5fc0597c2a71b0810657298e201a5f2c95e (patch)
tree237d1965aa3f6b776b344f24e7550297b1846aed /.scripts
parent0b31c305c18f3dc19b239d7146efb246271ea3db (diff)
downloaddotfiles-bd56e5fc0597c2a71b0810657298e201a5f2c95e.tar.gz
dotfiles-bd56e5fc0597c2a71b0810657298e201a5f2c95e.tar.bz2
dotfiles-bd56e5fc0597c2a71b0810657298e201a5f2c95e.zip
add script that cleans $HOME from some stupid files
Diffstat (limited to '.scripts')
-rw-r--r--.scripts/cleanup-homedir.sh14
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*