#!/bin/bash
#  ____ _____
# |  _ \_   _|  Derek Taylor (DistroTube)
# | | | || |    http://www.youtube.com/c/DistroTube
# | |_| || |    http://www.gitlab.com/dwt1/
# |____/ |_|
#
# Dmenu script for editing some of my more frequently edited config files.


declare options=("alacritty
awesome
bash
doom/config.el
doom/init.el
neovim
picom
spectrwm
quit")

choice=$(echo -e "${options[@]}" | rofi -dmenu -p 'Edit config file: ')

case "$choice" in
	quit)
		echo "Program terminated." && exit 1
	;;
	alacritty)
		choice="$HOME/.config/alacritty/alacritty.yml"
	;;
	awesome)
		choice="$HOME/.config/awesome/rc.lua"
	;;
	bash)
		choice="$HOME/.bashrc"
	;;
    doom.d/config.el)
		choice="$HOME/.config/doom/config.el"
	;;
    doom.d/init.el)
		choice="$HOME/.config/doom/init.el"
	;;
	neovim)
		choice="$HOME/.config/nvim/init.vim"
	;;
	picom)
		choice="$HOME/.config/picom/picom.conf"
	;;
	spectrwm)
		choice="$HOME/.config/spectrwm/README.org"
	;;
	*)
		exit 1
	;;
esac
#alacritty -e nvim "$choice" &
emacsclient -c -a emacs "$choice"
