Some simple and lightweight themes for the popular Gedit text editor.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

39 lines
1.1 KiB

#!/bin/bash
# Installer version 1.1
clone_repo() {
# Clone the repository
echo "Cloning repository..."
git clone --depth 1 https://codeberg.org/twann/gedit-themes.git gedit-themes
}
install_themes() {
# Create a variable with the path where to copy themes
GEDIT_PATH=~/.local/share/gedit/styles
# Check if the path exists, and create it if it doesn't
if ! [[ -d $GEDIT_PATH ]]; then
mkdir -p $GEDIT_PATH
fi
echo "Copying themes inside gedit style directory..."
# Copy every *.xml file into themes directory
for theme in gedit-themes/*.xml;
do cp -v "$theme" $GEDIT_PATH;
done
echo "Themes successfuly installed."
}
# Check if gedit is installed
if [[ -f "/usr/bin/gedit" ]]; then
clone_repo
# Check if the directory where should the repository have been cloned exists
if [[ -d "gedit-themes" ]]; then
install_themes
else
echo "ERROR: The directory 'gedit-themes' does not exist."
exit 1
fi
else
echo "ERROR: Gedit is not installed on your machine."
exit 1
fi