From 1fa2e66f838a2c04309e9378b250bd0445b30e9f Mon Sep 17 00:00:00 2001 From: zstg Date: Mon, 23 Dec 2024 23:05:48 +0530 Subject: [PATCH] Added fish, kitty, starship, waybar config PKGBUILDS --- PKGBUILDS/stratos-fish-config/PKGBUILD | 48 +++++++++++++++++++ PKGBUILDS/stratos-kitty-config/PKGBUILD | 48 +++++++++++++++++++ PKGBUILDS/stratos-starship-config/PKGBUILD | 48 +++++++++++++++++++ PKGBUILDS/stratos-waybar-config/PKGBUILD | 56 ++++++++++++++++++++++ 4 files changed, 200 insertions(+) create mode 100644 PKGBUILDS/stratos-fish-config/PKGBUILD create mode 100644 PKGBUILDS/stratos-kitty-config/PKGBUILD create mode 100644 PKGBUILDS/stratos-starship-config/PKGBUILD create mode 100644 PKGBUILDS/stratos-waybar-config/PKGBUILD diff --git a/PKGBUILDS/stratos-fish-config/PKGBUILD b/PKGBUILDS/stratos-fish-config/PKGBUILD new file mode 100644 index 0000000..0b06101 --- /dev/null +++ b/PKGBUILDS/stratos-fish-config/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: ZeStig +pkgname=stratos-fish-config +pkgver=1.0 +pkgrel=0 +pkgdesc="Fish shell configuration for StratOS" +arch=('x86_64') +url="https://github.com/StratOS-Linux/StratOS-fish-config" +license=('GPL') +depends=('bash' 'fish') + +build() { + git clone $url + echo $srcdir +} + +package() { + mkdir -p "$pkgdir/etc/skel/.config/fish" + + emacs_config_paths=( "$HOME/.config/fish" ) + + config_exists=false + for config in "${emacs_config_paths[@]}"; do + if [ -e "$config" ]; then + config_exists=true + break + fi + done + + if [ "$config_exists" = true ]; then + cp -r "$srcdir/StratOS-fish-config"/* "$pkgdir/etc/skel/.config/fish/" + echo "The configuration files have been installed in /etc/skel/.config/fish." + echo "You may copy the files manually if you wish to overwrite your current fish configuration." + else + read -p "No fish configuration files found. Do you want to install the StratOS fish configuration in .config/fish? (y/n): " user_input + if [[ "$user_input" =~ ^[Yy]$ ]]; then + mkdir -p "$HOME/.config/fish" + cp -r "$srcdir/StratOS-fish-config"/* "$HOME/.config/fish/" + else + cp -r "$srcdir/StratOS-fish-config"/* "$pkgdir/etc/skel/.config/fish/" + echo "The configuration files have been installed in /etc/skel/.config/fish." + echo "You may copy the files manually if you wish to overwrite your current fish configuration." + fi + fi +} + +pkgpostrm() { + rm -rf "/etc/skel/.config/fish" +} diff --git a/PKGBUILDS/stratos-kitty-config/PKGBUILD b/PKGBUILDS/stratos-kitty-config/PKGBUILD new file mode 100644 index 0000000..aba9f60 --- /dev/null +++ b/PKGBUILDS/stratos-kitty-config/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: ZeStig +pkgname=stratos-kitty-config +pkgver=1.0 +pkgrel=0 +pkgdesc="Kitty terminal emulator configuration for StratOS" +arch=('x86_64') +url="https://github.com/StratOS-Linux/StratOS-kitty-config" +license=('GPL') +depends=('bash' 'kitty') + +build() { + git clone $url + echo $srcdir +} + +package() { + mkdir -p "$pkgdir/etc/skel/.config/kitty" + + emacs_config_paths=( "$HOME/.config/kitty" ) + + config_exists=false + for config in "${emacs_config_paths[@]}"; do + if [ -e "$config" ]; then + config_exists=true + break + fi + done + + if [ "$config_exists" = true ]; then + cp -r "$srcdir/StratOS-kitty-config"/* "$pkgdir/etc/skel/.config/kitty/" + echo "The configuration files have been installed in /etc/skel/.config/kitty." + echo "You may copy the files manually if you wish to overwrite your current kitty configuration." + else + read -p "No fish configuration files found. Do you want to install the StratOS kitty configuration in .config/kitty? (y/n): " user_input + if [[ "$user_input" =~ ^[Yy]$ ]]; then + mkdir -p "$HOME/.config/kitty" + cp -r "$srcdir/StratOS-kitty-config"/* "$HOME/.config/kitty/" + else + cp -r "$srcdir/StratOS-kitty-config"/* "$pkgdir/etc/skel/.config/kitty/" + echo "The configuration files have been installed in /etc/skel/.config/kitty." + echo "You may copy the files manually if you wish to overwrite your current kitty configuration." + fi + fi +} + +pkgpostrm() { + rm -rf "/etc/skel/.config/kitty" +} diff --git a/PKGBUILDS/stratos-starship-config/PKGBUILD b/PKGBUILDS/stratos-starship-config/PKGBUILD new file mode 100644 index 0000000..4f42de8 --- /dev/null +++ b/PKGBUILDS/stratos-starship-config/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: ZeStig +pkgname=stratos-starship-config +pkgver=1.0 +pkgrel=0 +pkgdesc="Starship shell prompt configuration for StratOS" +arch=('x86_64') +url="https://github.com/StratOS-Linux/StratOS-starship-config" +license=('GPL') +depends=('bash' 'fish') + +build() { + git clone $url + echo $srcdir +} + +package() { + mkdir -p "$pkgdir/etc/skel/.config/fish" + + emacs_config_paths=( "$HOME/.config/fish" ) + + config_exists=false + for config in "${emacs_config_paths[@]}"; do + if [ -e "$config" ]; then + config_exists=true + break + fi + done + + if [ "$config_exists" = true ]; then + cp -r "$srcdir/StratOS-fish-config"/* "$pkgdir/etc/skel/.config/fish/" + echo "The configuration files have been installed in /etc/skel/.config/fish." + echo "You may copy the files manually if you wish to overwrite your current fish configuration." + else + read -p "No fish configuration files found. Do you want to install the StratOS fish configuration in .config/fish? (y/n): " user_input + if [[ "$user_input" =~ ^[Yy]$ ]]; then + mkdir -p "$HOME/.config/fish" + cp -r "$srcdir/StratOS-fish-config"/* "$HOME/.config/fish/" + else + cp -r "$srcdir/StratOS-fish-config"/* "$pkgdir/etc/skel/.config/fish/" + echo "The configuration files have been installed in /etc/skel/.config/fish." + echo "You may copy the files manually if you wish to overwrite your current fish configuration." + fi + fi +} + +pkgpostrm() { + rm -rf "/etc/skel/.config/fish" +} diff --git a/PKGBUILDS/stratos-waybar-config/PKGBUILD b/PKGBUILDS/stratos-waybar-config/PKGBUILD new file mode 100644 index 0000000..8077eae --- /dev/null +++ b/PKGBUILDS/stratos-waybar-config/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: ZeStig +pkgname=stratos-waybar-config +pkgver=1.0 +pkgrel=0 +pkgdesc="StratOS Waybar config" +arch=('x86_64') +url="https://github.com/StratOS-Linux/StratOS-waybar-config" +license=('GPL') +depends=('bash') + +build() { + # Clone the repo directly into the source directory + git clone "$url" "$srcdir/StratOS-waybar-config" + echo "$srcdir" +} + +package() { + # Define the target installation directory + local config_dir="$pkgdir/etc/skel/.config/waybar" + + # Create the necessary directories + mkdir -p "$config_dir" + + # Define the path of the Waybar config in the user's home + local waybar_config_path="$HOME/.config/waybar" + + # Check if a Waybar configuration already exists in the home directory + if [ -e "$waybar_config_path" ]; then + # If the config exists in the home directory, ask if user wants to overwrite it + read -p "Waybar configuration already exists in your home directory. Do you want to overwrite it? (y/n): " user_input + if [[ "$user_input" =~ ^[Yy]$ ]]; then + cp -r "$srcdir/StratOS-waybar-config"/* "$waybar_config_path/" + echo "Your Waybar configuration has been overwritten in $waybar_config_path." + else + echo "The Waybar configuration was not overwritten." + fi + else + # If no Waybar configuration exists in the home directory, copy to the home directory + read -p "No Waybar configuration found in your home directory. Do you want to install the configuration there? (y/n): " user_input + if [[ "$user_input" =~ ^[Yy]$ ]]; then + mkdir -p "$waybar_config_path" + cp -r "$srcdir/StratOS-waybar-config"/* "$waybar_config_path/" + echo "The Waybar configuration has been installed in your home directory." + fi + fi + + # Also copy the configuration to /etc/skel/.config/waybar for new users + cp -r "$srcdir/StratOS-waybar-config"/* "$config_dir/" + echo "The configuration files have been installed in /etc/skel/.config/waybar." + echo "New users will get the default Waybar configuration in their home directories." +} + +pkgpostrm() { + # Clean up the configuration directory in /etc/skel when the package is removed + rm -rf "/etc/skel/.config/waybar" +}