Compare commits

14 Commits

Author SHA1 Message Date
eshanized
4b61d8657c 🚀 feat: add git creds config script
Some checks failed
Check Conventional Commit / check-commit-message (push) Has been cancelled
2025-01-13 14:29:33 +05:30
eshanized
de642d511d 🐛 fix: remove "scope" 2025-01-13 14:28:49 +05:30
eshanized
c3fed085eb 📝 docs: more clear and sections 2025-01-13 14:28:14 +05:30
Eshan Roy
00cb894a2a ️ perf(_imp): Cleaning up temporary files is run in the background to avoid delaying other tasks in the script 2024-12-14 01:53:53 +05:30
Eshan Roy
3022e210c8 📝 docs(_exp): every functions possible 2024-12-14 01:52:01 +05:30
Eshan Roy
598054aee5 ️ perf(_imp): improvements has been made 2024-12-14 01:50:14 +05:30
Eshan Roy
74a01081ac ️ perf(_imp): enhanced & error handling 2024-12-14 01:48:23 +05:30
Eshan Roy
e85ec0432c 🤖 ci(_new): adjusted settings 2024-12-13 13:40:29 +05:30
Eshan Roy
4fcd3fdb88 🛠 refactor(_rem): confirmation 2024-12-13 13:37:39 +05:30
Eshan Roy
7569691c2b 📝 docs(_new): update repo config 2024-12-13 13:36:04 +05:30
Eshan Roy (Eshanized)
f7a4ae9f17 refactor(file): remove cz static file to check validation 2024-05-02 22:02:54 +05:30
Eshan Roy (Eshanized)
f922bc4e3f feat(workflows): add committizen validation on PR 2024-05-02 22:02:09 +05:30
Eshan Roy (Eshanized)
c6a487c344 feat(workflows): add commitizen validation check on push 2024-05-02 22:00:32 +05:30
Eshan Roy (Eshanized)
23ac41129a refactor: reconfig the push script with commitizen validation 2024-05-02 21:59:10 +05:30
9 changed files with 402 additions and 80 deletions

View File

@@ -1,6 +0,0 @@
---
commitizen:
name: cz_conventional_commits
tag_format: $version
version_provider: scm
version_scheme: semver

View File

@@ -1,55 +0,0 @@
name: Check Commitizen
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize]
jobs:
check-commitizen:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/$DEFAULT_BRANCH' || github.event_name == 'pull_request'
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install commitizen
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install --user commitizen
- name: Run commitizen check
run: |
cz check --message "$MESSAGE" >/tmp/cz_check || true
grep "successful" /tmp/cz_check
tag-to-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install commitizen
run: |
sudo apt-get update
sudo apt-get install -y git python3-pip
pip3 install --user commitizen
- name: Clone repository
run: git clone ${{ github.repository }}
- name: Move to project directory
run: cd $(basename ${{ github.repository }})
- name: Determine changelog
run: |
CHANGELOG=$(cz changelog ${{ github.ref }} --dry-run | sed /^Invalid/d)
echo "::set-env name=CHANGELOG::$CHANGELOG"
- name: Create release
run: |
release-cli create --name ${{ github.ref }} --description "${{ env.CHANGELOG }}" --tag-name ${{ github.ref }}

38
.github/workflows/cz.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Check Conventional Commit
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check-commit-message:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check Conventional Commit
run: |
# Define the conventional commit types with emojis
TYPES=("🚀 feat" "🐛 fix" "📝 docs" "✨ style" "🛠 refactor" "⚡️ perf" "🔬 test" "🔧 build" "🤖 ci" "🧹 chore" "⏪ revert")
# Extract the commit type and emoji from the commit message
COMMIT_MSG=$(git log --format=%B -n 1)
for type in "${TYPES[@]}"; do
type_emoji=${type}
type=${type_emoji#* }
emoji=${type_emoji% *}
if [[ $COMMIT_MSG == $emoji* ]]; then
echo "Commit message is a conventional commit"
exit 0
fi
done
# If we reach here, the commit message is not a conventional commit
echo "Commit message is not a conventional commit"
exit 1

View File

@@ -1 +1,79 @@
# snigdhaos-gnome-config
# Snigdha OS GNOME Config 🌟
This repository contains the configuration files for **GNOME**, specifically tailored for **Snigdha OS**. It includes custom GNOME settings, themes, extensions, and other optimizations designed to offer a smooth, modern, and user-friendly experience on Snigdha OS. 🚀 Whether you're a developer, designer, or casual user, this configuration is built to enhance your desktop environment.
## Features ✨
- **Custom GNOME Theme** 🎨: A sleek, modern theme with carefully crafted aesthetics that provide a clean and visually appealing user interface for a productive work environment.
- **Optimized Settings** ⚡: Pre-configured settings to improve performance, efficiency, and usability, specifically designed for Snigdha OS. These settings optimize your desktops responsiveness and ensure a fluid experience.
- **Extensions** 🧩: A collection of carefully selected GNOME Shell extensions to boost functionality, customize your workflow, and make your desktop even more powerful.
- **Customization** 🔧: Fully customizable settings that allow users to tweak every aspect of their desktop experience. You can adjust themes, tweak performance options, and customize shortcuts to your liking.
## Installation 🛠️
To install the custom GNOME configurations from this repository, follow these steps:
### 1. Clone the repository:
```bash
git clone https://github.com/Snigdha-OS/snigdhaos-gnome-config.git
cd snigdhaos-gnome-config
```
### 2. Apply the configurations:
Run the provided installation script to apply the GNOME configurations:
```bash
bash install.sh
```
This will automatically set up the theme, extensions, and system settings designed for Snigdha OS.
### 3. Optional - Install GNOME Extensions:
If you wish to install the GNOME Shell extensions from the repository, use the following command:
```bash
gnome-extensions install extensions/*.gs
```
These extensions will give you more functionality and integration within the GNOME desktop environment.
## Usage 🖥️
Once the configuration is applied, you can further customize your desktop environment using the **GNOME Tweaks** application. You can also manually adjust settings within the following directories:
- `~/.config/gnome` for personal configurations.
- `/usr/share/gnome` for system-wide settings.
For advanced users, you can also tweak configurations using the command line to achieve maximum flexibility.
## Contributing 🤝
We welcome contributions to improve this repository! If you have suggestions, bug reports, or improvements, feel free to open an issue or submit a pull request.
Heres how you can contribute:
1. **Fork the repository** 🍴: Click the "Fork" button on GitHub to create your own copy of the repository.
2. **Create a branch for your changes**: (`git checkout -b feature/your-feature`)
3. **Make your changes** ✍️: Implement your bug fixes or new features.
4. **Commit your changes**: (`git commit -am 'Add new feature'`)
5. **Push to the branch**: (`git push origin feature/your-feature`)
6. **Create a pull request** 💥: Submit your changes for review and merging into the main project.
We encourage all contributors to follow the **code of conduct** and ensure that their contributions align with the goals of Snigdha OS.
## Author & Maintainer ✍️
This repository is maintained by the **Snigdha OS Team**.
- **Author**: [Eshan Roy | eshanized](https://github.com/eshanized) (or "Snigdha OS Team")
- **Email**: [m.eshanized@gmail.com](mailto:your.email@example.com)
- **GitHub Profile**: [@eshanized](https://github.com/eshanized)
If you have any questions, need help, or would like to contribute, feel free to reach out!
## License 📝
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details. This means youre free to use, modify, and distribute the project, but we would appreciate it if you credit the project when using it.

81
config.sh Executable file
View File

@@ -0,0 +1,81 @@
#!/bin/bash
# Author: Eshan Roy <eshan@snigdhaos.org>
# Author URI: https://eshanized.github.io
set -e
# Function to display usage instructions
usage() {
cat <<EOF
Usage: ${0##*/} [--email <email>] [--username <username>] [-h]
Options:
--email <email> Set the GitHub user email.
--username <username> Set the GitHub username.
-h, --help Display this help message.
Description:
This script configures your GitHub user.email and user.name settings globally.
If no arguments are provided, it will prompt for input interactively.
Examples:
${0##*/} --email user@example.com --username "Eshan Roy"
EOF
exit 1
}
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case "$1" in
--email)
EMAIL="$2"
shift 2
;;
--username)
USERNAME="$2"
shift 2
;;
-h|--help)
usage
;;
*)
echo "Unknown argument: $1"
usage
;;
esac
done
# Prompt for email if not provided
if [[ -z "${EMAIL:-}" ]]; then
read -p "Enter your GitHub Email: " EMAIL
fi
# Prompt for username if not provided
if [[ -z "${USERNAME:-}" ]]; then
read -p "Enter your GitHub Username: " USERNAME
fi
# Validate email format
if ! [[ "$EMAIL" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ ]]; then
echo "Error: Invalid email format: $EMAIL"
exit 1
fi
# Validate username (allowing alphanumerics, dashes, underscores, and dots)
if ! [[ "$USERNAME" =~ ^[a-zA-Z0-9._-]+$ ]]; then
echo "Error: Invalid username format: $USERNAME"
exit 1
fi
# Configure GitHub global settings
git config --global user.email "$EMAIL"
git config --global user.name "$USERNAME"
# Display success message
echo -e "\033[1;32mGitHub configuration setup successful!\033[0m"
echo " User Email: $EMAIL"
echo " Username: $USERNAME"
echo -e "\033[1;36mYou can verify this configuration using the following commands:\033[0m"
echo " git config --global user.email"
echo " git config --global user.name"

View File

@@ -1,9 +1,40 @@
#!/bin/bash
# Description: Configures environment variables for Wayland and Qt applications.
# Author : Eshan Roy <m.eshanized@gmail.com>
# Author URL : https://eshanized.github.io/
# Function to log messages
log_message() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1"
}
# Log the start of the script
log_message "Starting environment configuration script..."
# Check if the session type is Wayland
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
export QT_QPA_PLATFORM=wayland
export MOZ_ENABLE_WAYLAND=1
log_message "Wayland session detected."
# Set the Qt platform to Wayland
export QT_QPA_PLATFORM=wayland
log_message "Set QT_QPA_PLATFORM to 'wayland'."
# Enable Wayland support for Mozilla applications
export MOZ_ENABLE_WAYLAND=1
log_message "Enabled Wayland support for Mozilla applications (MOZ_ENABLE_WAYLAND=1)."
else
log_message "Non-Wayland session detected. No Wayland-specific variables set."
fi
# Set some other environment variables
# Set a custom Qt style engine to Kvantum
export QT_STYLE_OVERRIDE=kvantum
log_message "Set QT_STYLE_OVERRIDE to 'kvantum'."
# Verify environment variable settings
log_message "Verifying environment variables..."
log_message "QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-not set}"
log_message "MOZ_ENABLE_WAYLAND=${MOZ_ENABLE_WAYLAND:-not set}"
log_message "QT_STYLE_OVERRIDE=${QT_STYLE_OVERRIDE:-not set}"
# Log the end of the script
log_message "Environment configuration script completed."

View File

@@ -1,6 +1,25 @@
#!/bin/sh
#
# Script to apply GNOME settings using dconf and clean up temporary files
#
# Apply GNOME settings from a custom dconf configuration file
dconf load / < ~/.config/snigdhaos-gnome-config.ini
# Explanation:
# - `dconf load /` applies settings under the root path of dconf.
# - The input is redirected from the file `~/.config/snigdhaos-gnome-config.ini`,
# which contains pre-configured GNOME settings in dconf dump format.
# Remove temporary configuration and autostart script files after applying settings
rm -f ~/.config/snigdhaos-gnome-config.ini ~/.config/autostart-scripts/dconf.sh &
notify-send "Snigdha OS Arctic V settings applied! 🔥"
# Explanation:
# - `rm -f` forcefully removes the specified files without prompting.
# - The `&` at the end runs this command in the background, allowing the script to proceed without waiting.
# Send a desktop notification to indicate the successful application of settings
notify-send "Snigdha OS Arctic V settings applied! 🔥"
# Explanation:
# - `notify-send` displays a system notification with the specified message.
# - This informs the user that the script has finished applying settings.
# End of script

View File

@@ -2,21 +2,80 @@
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# Executed by startx. This script configures resources and starts the GNOME desktop environment.
# Xinitrc.d
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
# Author : Eshan Roy <m.eshanized@gmail.com>
# Author URL : https://eshanized.github.io/
# Path to the user's X resources file
userresources="$HOME/.Xresources"
if [ -f "$userresources" ]; then
# If the user's X resources file exists, load it
xrdb -merge "$userresources"
echo "Loaded user X resources from $userresources."
else
# Log if the file is not found
echo "User X resources file not found: $userresources."
fi
# Start GNOME session
# Path to the user's custom key/mouse mapping configuration
usermodmap="$HOME/.Xmodmap"
if [ -f "$usermodmap" ]; then
# If the user's .Xmodmap file exists, load it
xmodmap "$usermodmap"
echo "Loaded user key/mouse mappings from $usermodmap."
else
# Log if the file is not found
echo "User key/mouse mappings file not found: $usermodmap."
fi
# Path to system-wide X resources file
sysresources="/etc/X11/xinit/.Xresources"
if [ -f "$sysresources" ]; then
# If the system-wide X resources file exists, load it
xrdb -merge "$sysresources"
echo "Loaded system X resources from $sysresources."
else
# Log if the file is not found
echo "System X resources file not found: $sysresources."
fi
# Path to system-wide key/mouse mapping file
sysmodmap="/etc/X11/xinit/.Xmodmap"
if [ -f "$sysmodmap" ]; then
# If the system-wide .Xmodmap file exists, load it
xmodmap "$sysmodmap"
echo "Loaded system key/mouse mappings from $sysmodmap."
else
# Log if the file is not found
echo "System key/mouse mappings file not found: $sysmodmap."
fi
# Check if the directory /etc/X11/xinit/xinitrc.d exists
if [ -d /etc/X11/xinit/xinitrc.d ]; then
echo "Sourcing scripts in /etc/X11/xinit/xinitrc.d..."
# Loop through all shell scripts in the directory
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
if [ -x "$f" ]; then
# Source (execute in the current shell context) the script if it is executable
. "$f"
echo "Executed: $f"
else
# Log if the script is not executable
echo "Skipped: $f (not executable)"
fi
done
unset f
else
# Log if the directory does not exist
echo "Directory /etc/X11/xinit/xinitrc.d not found."
fi
# Set environment variables for X11 session
export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
exec gnome-session
echo "Environment set: XDG_SESSION_TYPE=x11, GDK_BACKEND=x11."
# Start the GNOME desktop session
echo "Starting GNOME session..."
exec gnome-session # Replace the current shell with the GNOME session process

77
push.sh Executable file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
# Author : ESHAN ROY
# Author URI : https://eshanized.github.io
# Define the conventional commit types with new emojis
TYPES=("🚀 feat" "🐛 fix" "📝 docs" "✨ style" "🛠 refactor" "⚡️ perf" "🔬 test" "🔧 build" "🤖 ci" "🧹 chore" "⏪ revert")
# Function to display an error and exit and
error_exit() {
echo -e "\033[1;31m[ERROR]\033[0m $1"
exit 1
}
# Ensure the script is run in a Git repository
git rev-parse --is-inside-work-tree > /dev/null 2>&1 || error_exit "This is not a Git repository."
# Get the current branch name
branch=$(git rev-parse --abbrev-ref HEAD)
# Pull the latest changes from the remote repository
echo "Pulling latest changes from remote branch '$branch'..."
git pull origin "$branch" || error_exit "Failed to pull changes from the remote repository. Please resolve any conflicts manually."
# Prompt the user to select a commit type
echo "Select a commit type:"
select type in "${TYPES[@]}"; do
if [[ -n "$type" ]]; then
break
else
echo "Invalid selection. Please try again."
fi
done
# Extract the commit type and emoji from the selection
type_emoji=${type}
type=${type_emoji#* }
emoji=${type_emoji% *}
# Prompt the user to enter a short description
read -p "Enter a short description: " desc
if [ -z "$desc" ]; then
error_exit "A short description is required!"
fi
# Prompt the user to enter a longer description (optional)
read -p "Enter a longer description (optional): " long_desc
# Create the commit message
commit_msg="$emoji $type: $desc"
# If a longer description was provided, add it to the commit message
if [ -n "$long_desc" ]; then
commit_msg+="\n\n$long_desc"
fi
# Print the commit message to the console
echo -e "\nCommit message:"
echo -e "\033[1;36m$commit_msg\033[0m"
# Stage all changes
git add .
# Commit the changes with the conventional commit message
if git commit -m "$commit_msg"; then
echo -e "\033[1;32mCommit successful!\033[0m"
else
error_exit "Commit failed."
fi
# Push the changes to the remote repository
echo "Pushing changes to remote branch '$branch'..."
if git push origin "$branch"; then
echo -e "\033[1;32mChanges pushed to remote branch '$branch'.\033[0m"
else
error_exit "Push failed. Please check your connection or branch permissions."
fi