#!/bin/bash

# omarchy:summary=Reload supported terminal emulators after config changes

if [[ -f ~/.config/alacritty/alacritty.toml ]]; then
  touch ~/.config/alacritty/alacritty.toml
fi

# pkill exits 1 when a terminal is not running: nothing to reload, not a failure.
pkill -SIGUSR1 -x kitty
(( $? <= 1 )) || exit $?

pkill -SIGUSR2 -x ghostty
(( $? <= 1 ))
