summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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*