commit ab25a390372d993a420bdcf1978caabe4101fa88 Author: shynd Date: Thu Feb 20 20:14:21 2025 +0100 init commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..125b37e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# nixos-themeing diff --git a/auto-extract.sh b/auto-extract.sh new file mode 100644 index 0000000..452b3d6 --- /dev/null +++ b/auto-extract.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# set colors for output messages +OK="$(tput setaf 2)[OK]$(tput sgr0)" +ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" + +# Set the name of the log file to include the current date and time +SLOG="install-$(date +%d-%H%M%S)_themes.log" + +# function to extract files with overwrite option +extract_files() { + local source_dir="$1" # source directory containing files + local destination="$2" # destination directory for extraction + local extraction_type="$3" # type of extraction: "tar" or "unzip" + + if [ -d "$source_dir" ]; then + echo "extracting files from '$source_dir' to '$destination'..." + if [ "$extraction_type" == "tar" ]; then + for file in "$source_dir"/*.tar.gz; do + if [ -f "$file" ]; then + echo "extracting '$file' to '$destination'..." + tar -xzf "$file" -C "$destination" --overwrite && echo "$OK extracted '$file' to '$destination'" || echo "$ERROR failed to extract '$file'" + fi + done + elif [ "$extraction_type" == "unzip" ]; then + for file in "$source_dir"/*.zip; do + if [ -f "$file" ]; then + echo "extracting '$file' to '$destination'..." + unzip -o -q "$file" -d "$destination" && echo "$OK extracted '$file' to '$destination'" || echo "$ERROR failed to extract '$file'" + fi + done + else + echo "${ERROR} invalid extraction type '$extraction_type'" + return 1 + fi + echo "${OK} extraction from '$source_dir' completed" + else + echo "${ERROR} source directory '$source_dir' does not exist" + return 1 + fi +} + +# create directories if they don't exist +mkdir -p ~/.icons +mkdir -p ~/.themes + +# extract files from 'theme' directory to ~/.themes using tar and log output +extract_files "theme" ~/.themes "tar" 2>&1 | tee -a "$SLOG" + +# extract files from 'icon' directory to ~/.icons using unzip and log output +extract_files "icon" ~/.icons "unzip" 2>&1 | tee -a "$SLOG" \ No newline at end of file diff --git a/icon/Bibata-Modern-Ice.zip b/icon/Bibata-Modern-Ice.zip new file mode 100644 index 0000000..ff1d517 Binary files /dev/null and b/icon/Bibata-Modern-Ice.zip differ diff --git a/icon/Flat-Remix-Blue-Dark.zip b/icon/Flat-Remix-Blue-Dark.zip new file mode 100644 index 0000000..4a5a8cb Binary files /dev/null and b/icon/Flat-Remix-Blue-Dark.zip differ diff --git a/icon/Flat-Remix-Blue-Light.zip b/icon/Flat-Remix-Blue-Light.zip new file mode 100644 index 0000000..a27adfb Binary files /dev/null and b/icon/Flat-Remix-Blue-Light.zip differ diff --git a/theme/Flat-Remix-GTK-Blue-Dark.tar.gz b/theme/Flat-Remix-GTK-Blue-Dark.tar.gz new file mode 100644 index 0000000..4f0327f Binary files /dev/null and b/theme/Flat-Remix-GTK-Blue-Dark.tar.gz differ diff --git a/theme/Flat-Remix-GTK-Blue-Light.tar.gz b/theme/Flat-Remix-GTK-Blue-Light.tar.gz new file mode 100644 index 0000000..a9e9e3e Binary files /dev/null and b/theme/Flat-Remix-GTK-Blue-Light.tar.gz differ