#!/bin/bash

sed -i 's/UsePager.*/UsePager=false/g' /usr/share/fly-wm/theme/default.themerc
sed -i 's/PagingSize.*/PagingSize=1x1/g' /usr/share/fly-wm/theme/default.themerc
for HOME_DIR in `find /home -maxdepth 2 -type d `; do
	if [ -d $HOME_DIR/.fly/theme ] ; then
		echo "processing  $HOME_DIR/.fly/theme ..."
		for THEME_FILE in current.themerc default.themerc default.themerc.fly-mini default.themerc.fly-tablet; do 
			sed -i 's/UsePager.*/UsePager=false/g' ${HOME_DIR}/.fly/theme/${THEME_FILE}
			sed -i 's/PagingSize.*/PagingSize=1x1/g' ${HOME_DIR}/.fly/theme/${THEME_FILE}
			
		done
		echo "done"
		ps ax | grep fly-wm | awk '{print $1}' | xargs kill -9
	fi
done
