#!/usr/bin/env bash

dir="$HOME/.config/rofi/launchers/type-1"
images_dir="$dir/images/"
theme='style-7'

image=$(find "$images_dir" -type f | shuf -n 1)

if [[ ! -e /tmp/rofi-theme.rasi ]]; then
  cp ${dir}/${theme}.rasi /tmp/rofi-theme.rasi
fi

rm /tmp/rofi-img.png
ln -s $image /tmp/rofi-img.png 

rofi \
    -modes drun,run,calc \
    -show drun \
    -theme /tmp/rofi-theme.rasi
