#!/usr/bin/env bash

## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x

## Forked by : Nikolai Papin (WeirdCat)
## Git: cloud.weirdcat.su

dir="$HOME/.config/rofi-wayland/launchers/type-6"
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.jpg
ln -s $image /tmp/rofi-img.jpg 

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