Trying to fix /home/user XS

This commit is contained in:
maride 2017-08-10 21:24:32 +02:00
parent 09e0574dba
commit 5d8275c9cf
2 changed files with 13 additions and 4 deletions

View File

@ -3,7 +3,14 @@
echo "~> Installing i3" echo "~> Installing i3"
pacstrap /mnt i3 feh xcompmgr dmenu acpi pacstrap /mnt i3 feh xcompmgr dmenu acpi
user=$(ls /mnt/home)
if [ "$user" == "" ]; then
path="/mnt/etc/skel/"
else
path="/mnt/home/$user/"
fi
echo "~> Creating .xinitrc" echo "~> Creating .xinitrc"
echo "xcompmgr -c &" > /mnt/home/*/.xinitrc echo "xcompmgr -c &" > $path/.xinitrc
echo "feh --bg-fill ~/background.jpg" >> /mnt/home/*/.xinitrc echo "feh --bg-fill ~/background.jpg" >> $path/.xinitrc
echo "exec i3" >> /mnt/home/*/.xinitrc echo "exec i3" >> $path/.xinitrc

View File

@ -2,4 +2,6 @@
echo "~> Grabbing a random image from unsplash.com..." echo "~> Grabbing a random image from unsplash.com..."
wget https://unsplash.com/photos/$(curl https://unsplash.com/search/photos/forest | grep -oE "photo=([a-zA-Z0-9_\\-]*)" | shuf -n 1 | sed -e "s/photo=//g")/download -o /mnt/home/*/background.jpg mkdir -p /mnt/etc/wallpapers/
wget https://unsplash.com/photos/$(curl https://unsplash.com/search/photos/forest | grep -oE "photo=([a-zA-Z0-9_\\-]*)" | shuf -n 1 | sed -e "s/photo=//g")/download -o /mnt/etc/wallpapers/forest.jpg