diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 01f689f1f..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[Bug]: Short description of the issue" -labels: "bug, needs triage" ---- - -## Bug Report - -### Description - -[Provide a clear and concise description of the bug.] - -### Steps to Reproduce - -1. [First Step] -2. [Second Step] -3. [and so on...] - -### Expected Behavior - -[What did you expect to happen?] - -### Actual Behavior - -[What actually happened?] - -### Screenshots - -[If applicable, add screenshots to help explain your problem.] - -### Environment - -[Please add any other relevant information about the bug and remove the unnecessary lines.] - -e.g., - -- Linux Distro: [e.g., ArchLinux, EndeavourOS] -- Linux Version, output of `uname -a`: -- Hyprland Version, output of `hyprctl version`: -- Installation Environment: [e.g., On The Main Hardware, On A Virtual Machine] -- Other info: [e.g., Display Resolution, Resolution, etc] - -### Additional Information - -[Add any other information about the problem here. For example, you might include the error message, any recent changes that you made to the project, or any other relevant details.] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..5229acebf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,92 @@ +name: Bug report +description: Create a report to help us improve +title: "[Bug]: Short description of the issue" +labels: ["bug", "needs triage"] +body: + - type: markdown + attributes: + value: | + ## Bug Report + + - type: textarea + id: description + attributes: + label: Description + description: Provide a clear and concise description of the bug. + placeholder: Provide a clear and concise description of the bug. + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. First Step + 2. Second Step + 3. and so on... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: What did you expect to happen? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened? + placeholder: What actually happened? + validations: + required: true + + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: If applicable, add screenshots to help explain your problem. + placeholder: If applicable, add screenshots to help explain your problem. + validations: + required: false + + - type: textarea + id: environment + attributes: + label: Environment + description: | + Please run this command to save your system information to a file: + ```bash + hyprctl systeminfo -c > /tmp/hyprland_systeminfo.txt + ``` + Then copy the contents and paste them in the collapsible section below. + + Also include these additional details: + - Installation Environment: [e.g., On The Main Hardware, On A Virtual Machine] + - Display Resolution: [e.g., 1920x1080] + - Graphics Driver: [e.g., nvidia, intel, amd] + - Display Server: [e.g., Wayland, X11] + placeholder: | +
+ System Information (Click to expand) + ``` + [Paste the entire output of hyprctl systeminfo -c here] + ``` +
+ validations: + required: true + + - type: textarea + id: additional + attributes: + label: Additional Information + description: Add any other information about the problem here. + placeholder: Add any other information about the problem here. For example, you might include the error message, any recent changes that you made to the project, or any other relevant details. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index 1542d0a88..000000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Custom template -about: Use this template to submit a custom issue -title: "[Custom]: Short description of the issue" -labels: "custom" ---- - -## Custom Template - -### Description - -[Provide a clear and concise description of the issue or request.] - -### Steps to Reproduce (if applicable) - -1. [First Step] -2. [Second Step] -3. [and so on...] - -### Expected Behavior - -[What did you expect to happen?] - -### Actual Behavior - -[What actually happened?] - -### Screenshots (if applicable) - -[If applicable, add screenshots to help explain your problem.] - -### Proposed Solution (if applicable) - -[If you have a specific solution in mind, describe it here. If not, you can skip this section.] - -### Additional Information - -[Add any other information about the issue or request here. For example, you might include links to similar features in other projects, or screenshots or diagrams to help explain your idea.] diff --git a/.github/ISSUE_TEMPLATE/custom.yml b/.github/ISSUE_TEMPLATE/custom.yml new file mode 100644 index 000000000..f1c907434 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.yml @@ -0,0 +1,75 @@ +name: Custom template +description: Use this template to submit a custom issue +title: "[Custom]: Short description of the issue" +labels: ["custom"] +body: + - type: markdown + attributes: + value: | + ## Custom Template + + - type: textarea + id: description + attributes: + label: Description + description: Provide a clear and concise description of the issue or request. + placeholder: Provide a clear and concise description of the issue or request. + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce (if applicable) + description: Steps to reproduce the behavior if applicable + placeholder: | + 1. First Step + 2. Second Step + 3. and so on... + validations: + required: false + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: What did you expect to happen? + validations: + required: false + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened? + placeholder: What actually happened? + validations: + required: false + + - type: textarea + id: screenshots + attributes: + label: Screenshots (if applicable) + description: If applicable, add screenshots to help explain your problem. + placeholder: If applicable, add screenshots to help explain your problem. + validations: + required: false + + - type: textarea + id: proposed_solution + attributes: + label: Proposed Solution (if applicable) + description: If you have a specific solution in mind, describe it here. + placeholder: If you have a specific solution in mind, describe it here. If not, you can skip this section. + validations: + required: false + + - type: textarea + id: additional_information + attributes: + label: Additional Information + description: Add any other information about the issue or request here. + placeholder: Add any other information about the issue or request here. For example, you might include links to similar features in other projects, or screenshots or diagrams to help explain your idea. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/documentation_update.md b/.github/ISSUE_TEMPLATE/documentation_update.md deleted file mode 100644 index 076038c7d..000000000 --- a/.github/ISSUE_TEMPLATE/documentation_update.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Documentation update -about: Propose a change to the project documentation -title: "[Docs]: Short description of the change" -labels: "documentation, needs review" ---- - - -## Documentation Update - -### Description - -[Provide a clear and concise description of the documentation update you'd like to see made.] - -### Current Documentation - -[Provide a link to the current documentation or describe where it can be found.] - -### Proposed Documentation - -[Provide a clear and concise description of the updated documentation that you'd like to see added.] - -### Additional Information - -[Add any other information about the documentation update here. For example, you might include links to similar documentation in other projects, or screenshots or diagrams to help explain your idea.] diff --git a/.github/ISSUE_TEMPLATE/documentation_update.yml b/.github/ISSUE_TEMPLATE/documentation_update.yml new file mode 100644 index 000000000..7a6d1c20b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_update.yml @@ -0,0 +1,45 @@ +name: Documentation update +description: Propose a change to the project documentation +title: "[Docs]: Short description of the change" +labels: ["documentation", "needs review"] +body: + - type: markdown + attributes: + value: | + ## Documentation Update + + - type: textarea + id: description + attributes: + label: Description + description: Provide a clear and concise description of the documentation update you'd like to see made. + placeholder: Provide a clear and concise description of the documentation update you'd like to see made. + validations: + required: true + + - type: textarea + id: current_documentation + attributes: + label: Current Documentation + description: Provide a link to the current documentation or describe where it can be found. + placeholder: Provide a link to the current documentation or describe where it can be found. + validations: + required: true + + - type: textarea + id: proposed_documentation + attributes: + label: Proposed Documentation + description: Provide a clear and concise description of the updated documentation that you'd like to see added. + placeholder: Provide a clear and concise description of the updated documentation that you'd like to see added. + validations: + required: true + + - type: textarea + id: additional_information + attributes: + label: Additional Information + description: Add any other information about the documentation update here. + placeholder: Add any other information about the documentation update here. For example, you might include links to similar documentation in other projects, or screenshots or diagrams to help explain your idea. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bd64d0a00..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Feature request -about: Suggest a feature for this project -title: "[Feature Request]: Short description of the feature" -labels: "enhancement, needs triage, feature request" ---- - -## Feature Request - -### Description - -[Provide a clear and concise description of the feature you'd like to see added.] - -### Use Case - -[Describe how this feature would be useful to you or to other users of the project.] - -### Proposed Solution - -[If you have a specific solution in mind, describe it here. If not, you can skip this section.] - -### Alternatives - -[Are there any alternative solutions or workarounds that you've considered? If so, describe them here.] - -### Additional Information - -[Add any other information about the feature request here. For example, you might include links to similar features in other projects, or screenshots or diagrams to help explain your idea.] diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..f79ba8920 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,54 @@ +name: Feature request +description: Suggest a feature for this project +title: "[Feature Request]: Short description of the feature" +labels: ["enhancement", "needs triage", "feature request"] +body: + - type: markdown + attributes: + value: | + ## Feature Request + + - type: textarea + id: description + attributes: + label: Description + description: Provide a clear and concise description of the feature you'd like to see added. + placeholder: Provide a clear and concise description of the feature you'd like to see added. + validations: + required: true + + - type: textarea + id: use_case + attributes: + label: Use Case + description: Describe how this feature would be useful to you or to other users of the project. + placeholder: Describe how this feature would be useful to you or to other users of the project. + validations: + required: true + + - type: textarea + id: proposed_solution + attributes: + label: Proposed Solution + description: If you have a specific solution in mind, describe it here. + placeholder: If you have a specific solution in mind, describe it here. If not, you can skip this section. + validations: + required: false + + - type: textarea + id: alternatives + attributes: + label: Alternatives + description: Are there any alternative solutions or workarounds that you've considered? + placeholder: Are there any alternative solutions or workarounds that you've considered? If so, describe them here. + validations: + required: false + + - type: textarea + id: additional_information + attributes: + label: Additional Information + description: Add any other information about the feature request here. + placeholder: Add any other information about the feature request here. For example, you might include links to similar features in other projects, or screenshots or diagrams to help explain your idea. + validations: + required: false diff --git a/.github/scripts/promote_to_master.sh b/.github/scripts/promote_to_master.sh new file mode 100755 index 000000000..f75c7386c --- /dev/null +++ b/.github/scripts/promote_to_master.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +COMMIT_LIST=$(git log --pretty=format:"* %s (%h) by %an" origin/master..dev | + while IFS= read -r line; do + if [[ ! $line =~ ^"* feat"* && ! $line =~ ^"* fix"* && ! $line =~ ^"* docs"* ]]; then + echo "* chore${line:1}" + else + echo "$line" + fi + done) + +if [ -z "$COMMIT_LIST" ]; then + COMMIT_LIST="No new commits - branches may be identical" +fi + +MERGE_DATE="Friday" + +echo "$COMMIT_LIST" >commit_list.txt + +cat <>$GITHUB_ENV +PR_BODY</dev/null 2>&1; then + COMMIT_COUNT=$(git rev-list --count master..dev) + echo "commit_count=$COMMIT_COUNT" >> $GITHUB_OUTPUT + if [ "$COMMIT_COUNT" -gt 0 ]; then + echo "Detected $COMMIT_COUNT commit(s) between master and dev" + echo "has_commits=true" >> $GITHUB_OUTPUT + else + echo "No commits detected between master and dev" + echo "has_commits=false" >> $GITHUB_OUTPUT + fi + else + echo "Master branch doesn't exist yet. Assuming changes need to be propagated." + echo "commit_count=999" >> $GITHUB_OUTPUT # Use a high number to indicate there are changes + echo "has_commits=true" >> $GITHUB_OUTPUT + fi + + # Set up git for potential operations + - name: Setup git + if: steps.check-commits.outputs.has_commits == 'true' + run: | + git config user.name "GitHub Actions Bot" + git config user.email "actions@github.com" + + # Create or update PR using GitHub API with retry logic + - name: Create or Update Pull Request + if: steps.check-commits.outputs.has_commits == 'true' + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { repo, owner } = context.repo; + const prBranch = "dev"; + const prTitle = "chore: release automated changes from dev to master"; + const prBody = process.env.PR_BODY; + + // Retry helper function + async function retryOperation(operation, maxRetries = 3, delay = 5000) { + let lastError; + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + return await operation(); + } catch (error) { + lastError = error; + console.log(`Attempt ${attempt}/${maxRetries} failed: ${error.message}`); + if (attempt < maxRetries) { + console.log(`Waiting ${delay/1000} seconds before retry...`); + await new Promise(resolve => setTimeout(resolve, delay)); + } + } + } + throw lastError; + } + + // Check if PR already exists + const prs = await retryOperation(async () => { + return github.rest.pulls.list({ + owner, + repo, + head: `${owner}:${prBranch}`, + base: 'master', + state: 'open' + }); + }); + + if (prs.data.length > 0) { + // Update existing PR + console.log(`Updating existing PR #${prs.data[0].number}`); + await retryOperation(async () => { + return github.rest.pulls.update({ + owner, + repo, + pull_number: prs.data[0].number, + title: prTitle, + body: prBody + }); + }); + console.log(`PR #${prs.data[0].number} updated successfully.`); + } else { + // Create new PR + try { + const result = await retryOperation(async () => { + return github.rest.pulls.create({ + owner, + repo, + title: prTitle, + body: prBody, + head: prBranch, + base: 'master' + }); + }); + console.log(`PR created: ${result.data.html_url}`); + } catch (error) { + console.log(`All attempts to create PR failed: ${error.message}`); + + // As a fallback, output command for manual PR creation + console.log(`To create the PR manually, visit: https://github.com/${owner}/${repo}/compare/master...${prBranch}`); + throw error; + } + } + + # Output message when no commits are found + - name: No Commits Message + if: steps.check-commits.outputs.has_commits == 'false' + run: | + echo "::notice::No new commits detected between master and dev branches. Skipping PR creation." + echo "The branches master and dev are already in sync." + + release: + name: release + if: ${{ github.ref == 'refs/heads/master' }} + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v3 + id: release + with: + release-type: simple + include-v-in-tag: true + package-name: hyde + command: github-release + token: ${{ secrets.GITHUB_TOKEN }} + default-branch: master + changelog-types: | + [ + {"type":"feat","section":"Features","hidden":false}, + {"type":"fix","section":"Bug Fixes","hidden":false}, + {"type":"docs","section":"Documentation","hidden":false}, + {"type":"style","section":"Styles","hidden":false}, + {"type":"refactor","section":"Code Refactoring","hidden":false}, + {"type":"perf","section":"Performance Improvements","hidden":false}, + {"type":"test","section":"Tests","hidden":false}, + {"type":"build","section":"Build System","hidden":false}, + {"type":"ci","section":"Continuous Integration","hidden":false}, + {"type":"chore","section":"Miscellaneous Chores","hidden":true} + ] + + # Checkout code to work with tags and commits + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Always update the latest release description, even if no new release is created + - name: Update Latest Release Description + if: ${{ !steps.release.outputs.release_created }} + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { repo, owner } = context.repo; + + // Get latest release + const releases = await github.rest.repos.listReleases({ + owner, + repo, + per_page: 1 + }); + + if (releases.data.length === 0) { + console.log('No releases found to update'); + return; + } + + const latestRelease = releases.data[0]; + console.log(`Found latest release: ${latestRelease.tag_name}`); + + // Get previous release to calculate commits in between + const allReleases = await github.rest.repos.listReleases({ + owner, + repo, + per_page: 2 + }); + + const previousTag = allReleases.data.length > 1 ? + allReleases.data[1].tag_name : + 'HEAD~20'; // Fallback to last 20 commits if no previous release + + // Get commits between the two tags + const { execSync } = require('child_process'); + let commitList; + try { + commitList = execSync( + `git log --pretty=format:"* %s (%h)" ${previousTag}..${latestRelease.tag_name} | grep -v "Merge pull request"` + ).toString().trim(); + } catch (e) { + console.log('Error getting commit list:', e); + commitList = 'Could not generate commit list automatically'; + } + + // Format the release notes with sections + const features = commitList.split('\n') + .filter(line => line.includes('feat:') || line.includes('feat(')) + .join('\n'); + + const fixes = commitList.split('\n') + .filter(line => line.includes('fix:') || line.includes('fix(')) + .join('\n'); + + const docs = commitList.split('\n') + .filter(line => line.includes('docs:') || line.includes('docs(')) + .join('\n'); + + const other = commitList.split('\n') + .filter(line => !line.includes('feat:') && !line.includes('fix:') && !line.includes('docs:') && + !line.includes('feat(') && !line.includes('fix(') && !line.includes('docs(')) + .join('\n'); + + // Build release body + let releaseBody = `# What's Changed\n\n`; + + if (features) { + releaseBody += `## Features\n${features}\n\n`; + } + + if (fixes) { + releaseBody += `## Bug Fixes\n${fixes}\n\n`; + } + + if (docs) { + releaseBody += `## Documentation\n${docs}\n\n`; + } + + if (other) { + releaseBody += `## Other Changes\n${other}\n\n`; + } + + releaseBody += `**Full Changelog**: https://github.com/${owner}/${repo}/compare/${previousTag}...${latestRelease.tag_name}`; + + // Update the release + console.log(`Updating release ${latestRelease.id} with new description`); + await github.rest.repos.updateRelease({ + owner, + repo, + release_id: latestRelease.id, + body: releaseBody + }); + + console.log('Release description updated successfully'); + + # Tag stable version (existing logic) + - name: tag stable versions + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name github-actions[bot] + git config user.email github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" + git tag -d stable || true + git push origin :stable || true + git tag -a stable -m "Last Stable Release v${{ steps.release.outputs.version }}" + git push origin stable diff --git a/.github/workflows/refresh-release.yml b/.github/workflows/refresh-release.yml new file mode 100644 index 000000000..b128dedb1 --- /dev/null +++ b/.github/workflows/refresh-release.yml @@ -0,0 +1,52 @@ +name: Refresh Release + +on: + workflow_dispatch: + inputs: + version_bump: + description: "Type of version bump (patch, minor, major)" + required: true + default: "patch" + type: choice + options: + - patch + - minor + - major + +jobs: + refresh-release: + runs-on: ubuntu-latest + # Add permissions for GitHub token + permissions: + contents: write # Needed to push to branches + pull-requests: write # Needed to create/update PRs + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Add token for authentication + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Git + run: | + git config user.name "GitHub Actions Bot" + git config user.email "actions@github.com" + + - name: Create conventional commit to trigger release + run: | + # Create empty commit with appropriate conventional commit message + if [[ "${{ github.event.inputs.version_bump }}" == "minor" ]]; then + git commit --allow-empty -m "feat: trigger new release refresh" + elif [[ "${{ github.event.inputs.version_bump }}" == "major" ]]; then + git commit --allow-empty -m "feat!: trigger major release refresh" + else + git commit --allow-empty -m "fix: trigger patch release refresh" + fi + + # Push to master branch + git push origin HEAD:master + + - name: Provide feedback + run: echo "Release refresh triggered successfully with a ${{ github.event.inputs.version_bump }} version bump!" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5da1e7ee8..e65d5a2db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,11 @@ Thank you for your interest in contributing to Community Standards! We welcome a ## Getting Started 1. Fork this repository to your GitHub account. This will create a copy of this repository in your account. You can make changes to this copy without affecting the original repository. + - For fork this repository, click the **Fork** button in the top right corner of this page or click [here](https://github.com/HyDE-Project/HyDE/fork). + + > **Note for first-time contributors:** All new contributors should start by submitting pull requests. After demonstrating consistent high-quality contributions through PRs, you may be considered for a collaborator role as described in [TEAM_ROLES.md](https://github.com/HyDE-Project/HyDE/blob/master/TEAM_ROLES.md). Direct repository access is granted selectively based on contribution history. + 2. Clone your forked repository to your local machine. - Use the following command to clone your forked repository to your local machine. @@ -39,11 +43,13 @@ Thank you for your interest in contributing to Community Standards! We welcome a ``` 6. Submit a **pull request** to the upstream repository. + - **Important**: Always submit your pull requests to the `dev` branch, **not** directly to `master`. Following the [RELEASE_POLICY.md](https://github.com/HyDE-Project/HyDE/blob/master/RELEASE_POLICY.md), changes go through the dev branch first for testing before being merged into master during the release window. - For example, to create a pull request, use the following steps. 1. Go to your forked repository. 2. Click the **Compare & pull request** button next to your `your-branch-name` branch. - 3. Add a title and description for your pull request. - 4. Click **Create pull request** and remember to add the relevant labels with using the [pull request template](https://github.com/HyDE-Project/HyDE/blob/master/.github/PULL_REQUEST_TEMPLATE.md). + 3. Make sure the base repository branch is set to `dev`. + 4. Add a title and description for your pull request. + 5. Click **Create pull request** and remember to add the relevant labels with using the [pull request template](https://github.com/HyDE-Project/HyDE/blob/master/.github/PULL_REQUEST_TEMPLATE.md). ## Guidelines @@ -60,6 +66,8 @@ Thank you for your interest in contributing to Community Standards! We welcome a - [PULL_REQUEST_TEMPLATE.md](https://github.com/HyDE-Project/HyDE/blob/master/.github/PULL_REQUEST_TEMPLATE.md) - Use this template to submit a pull request. - [COMMIT_MESSAGE_GUIDELINES.md](https://github.com/HyDE-Project/HyDE/blob/master/COMMIT_MESSAGE_GUIDELINES.md) - Read this file to learn about the commit message guidelines. - [CONTRIBUTING.md](https://github.com/HyDE-Project/HyDE/blob/master/CONTRIBUTING.md) - Read this file to learn about the contributing guidelines. + - [RELEASE_POLICY.md](https://github.com/HyDE-Project/HyDE/blob/master/RELEASE_POLICY.md) - Read this file to understand the release cycle, branch management, and deployment schedule. + - [TEAM_ROLES.md](https://github.com/HyDE-Project/HyDE/blob/master/TEAM_ROLES.md) - Learn about the different roles in our project (Collaborators, Triagers, and Testers) and how to join. - [LICENSE](https://github.com/HyDE-Project/HyDE/blob/master/LICENSE) - Read this file to learn about the license. - [README.md](https://github.com/HyDE-Project/HyDE/blob/master/README.md) - Read this file to learn about the project. diff --git a/CONTRIBUTING_HYPRDOTS.md b/CONTRIBUTING_HYPRDOTS.md deleted file mode 100644 index ed66ce13f..000000000 --- a/CONTRIBUTING_HYPRDOTS.md +++ /dev/null @@ -1,68 +0,0 @@ -# Contributing to Community Standards - -Thank you for your interest in contributing to Community Standards! We welcome any contributions, including bug fixes, feature enhancements, documentation improvements, and other general improvements. - -## Getting Started - -1. Fork this repository to your GitHub account. This will create a copy of this repository in your account. You can make changes to this copy without affecting the original repository. - - For fork this repository, click the **Fork** button in the top right corner of this page or click [here](https://github.com/prasanthrangan/hyprdots/fork). -2. Clone your forked repository to your local machine. - - - Use the following command to clone your forked repository to your local machine. - - ```bash - git clone https://github.com/prasanthrangan/hyprdots.git - ``` - -3. Create a new branch for your changes. - - - For example, to create a new branch named `your-branch-name`, use the following command. - - ```bash - git checkout -b your-branch-name - ``` - -4. Make your changes and commit them with a descriptive commit message. - - - For example, to commit your changes, use the following command and make sure to follow the [commit message guidelines](https://github.com/prasanthrangan/hyprdots/blob/main/COMMIT_MESSAGE_GUIDELINES.md). - - ```bash - git commit -m "feat: add a new feature" - ``` - -5. Push your changes to your forked repository. - - - For example, to push your changes to your forked repository, use the following command. - - ```bash - git push origin your-branch-name - ``` - -6. Submit a **pull request** to the upstream repository. - - For example, to create a pull request, use the following steps. - 1. Go to your forked repository. - 2. Click the **Compare & pull request** button next to your `your-branch-name` branch. - 3. Add a title and description for your pull request. - 4. Click **Create pull request** and remember to add the relevant labels with using the [pull request template](https://github.com/prasanthrangan/hyprdots/blob/templates/.github/PULL_REQUEST_TEMPLATE.md). - -## Guidelines - -- Follow the code style of the project. -- Update the **documentation** if necessary. -- Add tests if applicable. -- Make sure all tests pass before submitting your changes. -- Keep your pull request focused and avoid including unrelated changes. -- Remember to follow the given files before submitting your changes. - - [bug_report.md](https://github.com/prasanthrangan/hyprdots/blob/main/.github/ISSUE_TEMPLATE/bug_report.md) - Use this template to create a report to help us improve. - - [feature_request.md](https://github.com/prasanthrangan/hyprdots/blob/main/.github/ISSUE_TEMPLATE/feature_request.md) - Use this template to suggest a feature for this project. - - [documentation_update.md](https://github.com/prasanthrangan/hyprdots/blob/main/.github/ISSUE_TEMPLATE/documentation_update.md) - Use this template to propose a change to the documentation. - - [custom.md](https://github.com/prasanthrangan/hyprdots/blob/main/.github/ISSUE_TEMPLATE/custom.md) - Use this template to submit a custom issue. - - [PULL_REQUEST_TEMPLATE.md](https://github.com/prasanthrangan/hyprdots/blob/main/.github/PULL_REQUEST_TEMPLATE.md) - Use this template to submit a pull request. - - [COMMIT_MESSAGE_GUIDELINES.md](https://github.com/prasanthrangan/hyprdots/blob/main/COMMIT_MESSAGE_GUIDELINES.md) - Read this file to learn about the commit message guidelines. - - [CONTRIBUTING.md](https://github.com/prasanthrangan/hyprdots/blob/main/CONTRIBUTING.md) - Read this file to learn about the contributing guidelines. - - [LICENSE](https://github.com/prasanthrangan/hyprdots/blob/main/LICENSE) - Read this file to learn about the license. - - [README.md](https://github.com/prasanthrangan/hyprdots/blob/main/README.md) - Read this file to learn about the project. - -## Contact - -If you have any questions, feel free to contact via [GitHub Discussions](https://github.com/prasanthrangan/hyprdots/discussions). diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 000000000..1fea10635 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,44 @@ +# Contributors + +This file lists the contributors to the HyDE project and their roles. + +## Project Maintainers + +- [@kRHYME7](https://github.com/kRHYME7) - "[3]uck ๐Ÿฆ†" + +## Collaborators + +_These contributors help with code review, triaging, and development._ + +- [@dieBakterie](https://github.com/dieBakterie) +- [@richen604](https://github.com/richen604) +- [@Senshi111](https://github.com/Senshi111) +- [@T-Crypt](https://github.com/T-Crypt) +- [@Guillaumecoi](https://github.com/Guillaumecoi) +- [@rubiin](https://github.com/rubiin) +- [@Metalhearf](https://github.com/Metalhearf) +- [@prime-run](https://github.com/prime-run) + +## Testers + +_These contributors help with quality assurance and testing._ + + +- [@amit-0i](https://github.com/amit-0i) +- [@Prof-Shiba](https://github.com/Prof-Shiba) +- [@UnaTried](https://github.com/UnaTried) +--- + +## How to add yourself to this list + +1. Fork the repository +2. Create a new branch for your change +3. Add your name to the appropriate section in this format: + ``` + - [@your-github-username](https://github.com/your-github-username) - "Your favorite quote" + ``` +4. Submit a pull request with the title "Add [Your Name] as [Collaborator/Tester]" +5. Include in the PR description your relevant experience and what you hope to contribute +6. Wait for a maintainer to review and merge your PR + +Note: New contributors should only add themselves to the Collaborators or Testers sections. Promotion to write access is determined by project maintainers based on the criteria in [TEAM_ROLES.md](https://github.com/HyDE-Project/HyDE/blob/master/TEAM_ROLES.md). diff --git a/Configs/.config/fastfetch/config.jsonc b/Configs/.config/fastfetch/config.jsonc index cb53e2a7e..414ec80dd 100644 --- a/Configs/.config/fastfetch/config.jsonc +++ b/Configs/.config/fastfetch/config.jsonc @@ -9,7 +9,7 @@ fastfetch --config hyde/*.jsonc { "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "logo": { - "source": "$(fastfetch.sh logo)", + "source": "\"$(fastfetch.sh logo)\"", "height": 18 }, "display": { @@ -103,10 +103,11 @@ fastfetch --config hyde/*.jsonc "keyColor": "magenta" }, { - "type": "command", + "type": "disk", "key": " ๓ฑฆŸ OS Age ", + "folders": "/", "keyColor": "red", - "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" + "format": "{days} days" }, { "type": "uptime", @@ -124,4 +125,4 @@ fastfetch --config hyde/*.jsonc }, "break" ] -} \ No newline at end of file +} diff --git a/Configs/.config/fish/config.fish b/Configs/.config/fish/config.fish index b91657383..fa6707196 100644 --- a/Configs/.config/fish/config.fish +++ b/Configs/.config/fish/config.fish @@ -2,10 +2,31 @@ set -g fish_greeting source ~/.config/fish/hyde_config.fish -if status is-interactive +if type -q starship starship init fish | source + set -gx STARSHIP_CACHE $XDG_CACHE_HOME/starship + set -gx STARSHIP_CONFIG $XDG_CONFIG_HOME/starship/starship.toml end + +# fzf +if type -q fzf + fzf --fish | source +end + + + + + + + +# example integration with bat : +# bind -M insert \ce '$EDITOR $(fzf --preview="bat --color=always --plain {}")' + + +set fish_pager_color_prefix cyan +set fish_color_autosuggestion brblack + # List Directory alias l='eza -lh --icons=auto' # long list alias ls='eza -1 --icons=auto' # short list diff --git a/Configs/.config/fish/functions/ffcd.fish b/Configs/.config/fish/functions/ffcd.fish new file mode 100644 index 000000000..df5fcfbfb --- /dev/null +++ b/Configs/.config/fish/functions/ffcd.fish @@ -0,0 +1,27 @@ +function ffcd + set initial_query + set max_depth 7 + if set -q argv[1] + set initial_query $argv[1] + end + + set fzf_options '--preview=ls -p {} | grep /' \ + '--preview-window=right:60%' \ + '--height' '80%' \ + '--layout=reverse' \ + '--preview-window' 'right:60%' \ + '--cycle' + + if set -q initial_query + set fzf_options $fzf_options "--query=$initial_query" + end + + + set selected_dir (find . -maxdepth $max_depth \( -name .git -o -name node_modules -o -name .venv -o -name target -o -name .cache \) -prune -o -type d -print 2>/dev/null | fzf $fzf_options) + + if test -n "$selected_dir"; and test -d "$selected_dir" + cd "$selected_dir"; or return 1 + else + return 1 + end +end diff --git a/Configs/.config/fish/functions/ffe.fish b/Configs/.config/fish/functions/ffe.fish new file mode 100644 index 000000000..3a5cfd04d --- /dev/null +++ b/Configs/.config/fish/functions/ffe.fish @@ -0,0 +1,25 @@ +function ffe + set initial_query + if set -q argv[1] + set initial_query $argv[1] + end + + set fzf_options '--height' '80%' \ + '--layout' 'reverse' \ + '--preview-window' 'right:60%' \ + '--cycle' + + if set -q initial_query + set fzf_options $fzf_options "--query=$initial_query" + end + + set max_depth 5 + + set selected_file (find . -maxdepth $max_depth -type f 2>/dev/null | fzf $fzf_options) + + if test -n "$selected_file"; and test -f "$selected_file" + nvim "$selected_file" + else + return 1 + end +end diff --git a/Configs/.config/fish/functions/ffec.fish b/Configs/.config/fish/functions/ffec.fish new file mode 100644 index 000000000..13d5b2914 --- /dev/null +++ b/Configs/.config/fish/functions/ffec.fish @@ -0,0 +1,21 @@ +function ffec + set grep_pattern "" + if set -q argv[1] + set grep_pattern $argv[1] + end + + set fzf_options '--height' '80%' \ + '--layout' 'reverse' \ + '--preview-window' 'right:60%' \ + '--cycle' \ + '--preview' 'bat --color always {}' \ + '--preview-window' 'right:60%' + + set selected_file (grep -irl -- "$grep_pattern" ./ 2>/dev/null | fzf $fzf_options) + + if test -n "$selected_file" + nvim "$selected_file" + else + echo "No file selected or search returned no results." + end +end diff --git a/Configs/.config/hyde/wallbash/always/discord.dcol b/Configs/.config/hyde/wallbash/always/discord.dcol index b1ee1dc1a..6fcb1328b 100644 --- a/Configs/.config/hyde/wallbash/always/discord.dcol +++ b/Configs/.config/hyde/wallbash/always/discord.dcol @@ -1,74 +1,25 @@ -${cacheDir}/wallbash/discord.css|${WALLBASH_SCRIPTS}/discord.sh +${XDG_CACHE_HOME}/hyde/wallbash/discord.css|${WALLBASH_SCRIPTS}/discord.sh +@import url('https://mwittrien.github.io/BetterDiscordAddons/Themes/DiscordRecolor/DiscordRecolor.css'); :root { - --accent-color: #; - --border-color: #; - --background-1: #; - --background-2: #; - --background-tertiary: #66; - --background-mentioned: # !important; - --background-mentioned-hover: # !important; - --background-modifier-hover: # !important; - --background-modifier-active: # !important; - --text-normal: # !important; - --text-positive: # !important; - --text-muted: #66 !important; - --text-link: # !important; - --channel-default: #99 !important; - --button-background: # !important; - --button-background-hover: # !important; - --button-background-active: # !important; - --button-accent: # !important; - --button-accent-hover: # !important; - --button-accent-active: # !important; - --button-destructive: # !important; - --button-destructive-hover: # !important; - --button-destructive-active: # !important; - --settings-icon-color: # !important; - --tab-selected: # !important; - --switch: # !important; + --accentcolor: ; + --accentcolor2: ; + --linkcolor: ; + --mentioncolor: ; + --textbrightest: ; + --textbrighter: ; + --textbright: ; + --textdark: ; + --textdarker: ; + --textdarkest: ; - --background-primary: var(--background-1); - --background-primary-alt: var(--background-1); - --background-secondary: var(--background-tertiary); - --background-secondary-alt: var(--background-tertiary); - --background-accent-gradient: var(--background-1); - --background-floating: var(--background-2); - --background-modifier-selected: var(--accent-color); - --background-modifier-accent: var(--border-color); - --background-message-hover: transparent; - --interactive-selected: var(--background-primary); - --interactive-active: var(--text-positive); - --interactive-normal: var(--text-normal); - --interactive-muted: var(--text-muted); - --channels-default: var(--channel-default); - --header-primary: var(--text-normal); - --header-secondary: var(--text-muted); - --control-brand-foreground: var(--accent-color); - --info-warning-foreground: var(--accent-color); - --activity-card-background: var(--background-1); - --brand-experiment: var(--accent-color) !important; - --close-button-color: var(--accent-color); - --maximize-button-color: var(--accent-color); - --minimize-button-color: var(--accent-color); - --scrollbar-color-alt: var(--accent-color); - --scrollbar-thin-track: transparent; - --scrollbar-auto-thumb: transparent; - --scrollbar-auto-thumb-hover: var(--accent-color); - --scrollbar-auto-track: transparent; - --scrollbar-auto-scrollbar-color-thumb: var(--accent-color); - --scrollbar-auto-scrollbar-color-track: transparent; - --channeltextarea-background: var(--accent-color); - --channeltextarea-background-hover: var(--background-tertiary); - --avatar-roundess: 5px; + --backgroundaccent: ; + --backgroundprimary: ; + --backgroundsecondary: ; + --backgroundsecondaryalt: ; + --backgroundtertiary: ; + --backgroundfloating: ;; + --settingsicons: 0; } -.theme-dark { - --background-primary: var(--background-1); - --background-primary-alt: var(--background-1); - --background-secondary: var(--background-tertiary); - --background-secondary-alt: var(--background-tertiary); - --background-floating: var(--background-2); - --background-mentioned: var(--accent-color); - --background-mentioned-hover: var(--scrollbar-auto-thumb); -} +/* Any custom CSS below here */ diff --git a/Configs/.config/hyde/wallbash/always/vim.dcol b/Configs/.config/hyde/wallbash/always/vim.dcol new file mode 100644 index 000000000..2be658cfc --- /dev/null +++ b/Configs/.config/hyde/wallbash/always/vim.dcol @@ -0,0 +1,495 @@ +${XDG_CONFIG_HOME:-$HOME/.config}/vim/colors/wallbash.vim +" Name: wallbash +" Description: wallbash template +" Author: The HyDE Project +" License: Same as Vim +" Last Change: April 2025 + +if exists('g:loaded_wallbash') | finish | endif +let g:loaded_wallbash = 1 + + +" Detect background based on terminal colors +if $BACKGROUND =~# 'light' + set background=light +else + set background=dark +endif + +" hi clear +let g:colors_name = 'wallbash' + +let s:t_Co = &t_Co + +" Terminal color setup +if (has('termguicolors') && &termguicolors) || has('gui_running') + let s:is_dark = &background == 'dark' + + " Define terminal colors based on the background + if s:is_dark + let g:terminal_ansi_colors = ['', '', '', '', + \ '', '', '', '', + \ '', '', '', '', + \ '', '', '', ''] + else + " Lighter colors for light theme + let g:terminal_ansi_colors = ['', '', '', '', + \ '', '', '', '', + \ '', '', '', '', + \ '', '', '', ''] + endif + + " Nvim uses g:terminal_color_{0-15} instead + for i in range(g:terminal_ansi_colors->len()) + let g:terminal_color_{i} = g:terminal_ansi_colors[i] + endfor +endif + + " For Neovim compatibility + if has('nvim') + " Set Neovim specific terminal colors + let g:terminal_color_0 = '#' . g:terminal_ansi_colors[0] + let g:terminal_color_1 = '#' . g:terminal_ansi_colors[1] + let g:terminal_color_2 = '#' . g:terminal_ansi_colors[2] + let g:terminal_color_3 = '#' . g:terminal_ansi_colors[3] + let g:terminal_color_4 = '#' . g:terminal_ansi_colors[4] + let g:terminal_color_5 = '#' . g:terminal_ansi_colors[5] + let g:terminal_color_6 = '#' . g:terminal_ansi_colors[6] + let g:terminal_color_7 = '#' . g:terminal_ansi_colors[7] + let g:terminal_color_8 = '#' . g:terminal_ansi_colors[8] + let g:terminal_color_9 = '#' . g:terminal_ansi_colors[9] + let g:terminal_color_10 = '#' . g:terminal_ansi_colors[10] + let g:terminal_color_11 = '#' . g:terminal_ansi_colors[11] + let g:terminal_color_12 = '#' . g:terminal_ansi_colors[12] + let g:terminal_color_13 = '#' . g:terminal_ansi_colors[13] + let g:terminal_color_14 = '#' . g:terminal_ansi_colors[14] + let g:terminal_color_15 = '#' . g:terminal_ansi_colors[15] + endif + +" Function to dynamically invert colors for UI elements +function! s:inverse_color(color) + " This function takes a hex color (without #) and returns its inverse + " Convert hex to decimal values + let r = str2nr(a:color[0:1], 16) + let g = str2nr(a:color[2:3], 16) + let b = str2nr(a:color[4:5], 16) + + " Calculate inverse (255 - value) + let r_inv = 255 - r + let g_inv = 255 - g + let b_inv = 255 - b + + " Convert back to hex + return printf('%02x%02x%02x', r_inv, g_inv, b_inv) +endfunction + +" Function to be called for selection background +function! InverseSelectionBg() + if &background == 'dark' + return '' + else + return '' + endif +endfunction + +" Add high-contrast dynamic selection highlighting using the inverse color function +augroup WallbashDynamicHighlight + autocmd! + " Update selection highlight when wallbash colors change + autocmd ColorScheme wallbash call s:update_dynamic_highlights() +augroup END + +function! s:update_dynamic_highlights() + let l:bg_color = synIDattr(synIDtrans(hlID('Normal')), 'bg#') + if l:bg_color != '' + let l:bg_color = l:bg_color[1:] " Remove # from hex color + let l:inverse = s:inverse_color(l:bg_color) + + " Apply inverse color to selection highlights + execute 'highlight! CursorSelection guifg=' . l:bg_color . ' guibg=#' . l:inverse + + " Link dynamic highlights to various selection groups + highlight! link NeoTreeCursorLine CursorSelection + highlight! link TelescopeSelection CursorSelection + highlight! link CmpItemSelected CursorSelection + highlight! link PmenuSel CursorSelection + highlight! link WinSeparator VertSplit + endif +endfunction + +" Make selection visible right away for current colorscheme +call s:update_dynamic_highlights() + +" Conditional highlighting based on background +if &background == 'dark' + " Base UI elements with transparent backgrounds + hi Normal guibg=NONE guifg=# gui=NONE cterm=NONE + hi Pmenu guibg=# guifg=# gui=NONE cterm=NONE + hi StatusLine guifg=# guibg=# gui=NONE cterm=NONE + hi StatusLineNC guifg=# guibg=# gui=NONE cterm=NONE + hi VertSplit guifg=# guibg=NONE gui=NONE cterm=NONE + hi LineNr guifg=# guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi FoldColumn guifg=# guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background including unfocused state + hi NeoTreeNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeFloatNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeFloatBorder guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeWinSeparator guifg=# guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background + hi NeoTreeNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeRootName guifg=# guibg=NONE gui=bold cterm=bold + + " TabLine highlighting with complementary accents + hi TabLine guifg=# guibg=# gui=NONE cterm=NONE + hi TabLineFill guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi TabLineSel guifg=# guibg=# gui=bold cterm=bold + hi TabLineSeparator guifg=# guibg=# gui=NONE cterm=NONE + + " Interactive elements with dynamic contrast + hi Search guifg=# guibg=# gui=NONE cterm=NONE + hi Visual guifg=# guibg=# gui=NONE cterm=NONE + hi MatchParen guifg=# guibg=# gui=bold cterm=bold + + " Menu item hover highlight + hi CmpItemAbbrMatch guifg=# guibg=NONE gui=bold cterm=bold + hi CmpItemAbbrMatchFuzzy guifg=# guibg=NONE gui=bold cterm=bold + hi CmpItemMenu guifg=# guibg=NONE gui=italic cterm=italic + hi CmpItemAbbr guifg=# guibg=NONE gui=NONE cterm=NONE + hi CmpItemAbbrDeprecated guifg=# guibg=NONE gui=strikethrough cterm=strikethrough + + " Specific menu highlight groups + hi WhichKey guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeySeperator guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeyGroup guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeyDesc guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeyFloat guibg=# guifg=NONE gui=NONE cterm=NONE + + " Selection and hover highlights with inverted colors + hi CursorColumn guifg=NONE guibg=# gui=NONE cterm=NONE + hi Cursor guibg=# guifg=# gui=NONE cterm=NONE + hi lCursor guibg=# guifg=# gui=NONE cterm=NONE + hi CursorIM guibg=# guifg=# gui=NONE cterm=NONE + hi TermCursor guibg=# guifg=# gui=NONE cterm=NONE + hi TermCursorNC guibg=# guifg=# gui=NONE cterm=NONE + hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + hi CursorLineNr guifg=# guibg=NONE gui=bold cterm=bold + + hi QuickFixLine guifg=# guibg=# gui=NONE cterm=NONE + hi IncSearch guifg=# guibg=# gui=NONE cterm=NONE + hi NormalNC guibg=# guifg=# gui=NONE cterm=NONE + hi Directory guifg=# guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=# guibg=# gui=bold cterm=bold + + " Add highlight groups for focused items with inverted colors + hi CursorLineFold guifg=# guibg=# gui=NONE cterm=NONE + hi FoldColumn guifg=# guibg=NONE gui=NONE cterm=NONE + hi Folded guifg=# guibg=# gui=italic cterm=italic + + " File explorer specific highlights + hi NeoTreeNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeRootName guifg=# guibg=NONE gui=bold cterm=bold + hi NeoTreeFileName guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeFileIcon guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryName guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryIcon guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitModified guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitAdded guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitDeleted guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitUntracked guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeIndentMarker guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeSymbolicLinkTarget guifg=# guibg=NONE gui=NONE cterm=NONE + + " File explorer cursor highlights with strong contrast + " hi NeoTreeCursorLine guibg=# guifg=# gui=bold cterm=bold + " hi! link NeoTreeCursor NeoTreeCursorLine + " hi! link NeoTreeCursorLineSign NeoTreeCursorLine + + " Use wallbash colors for explorer snack in dark mode + hi WinBar guifg=# guibg=# gui=bold cterm=bold + hi WinBarNC guifg=# guibg=# gui=NONE cterm=NONE + hi ExplorerSnack guibg=# guifg=# gui=bold cterm=bold + hi BufferTabpageFill guibg=# guifg=# gui=NONE cterm=NONE + hi BufferCurrent guifg=# guibg=# gui=bold cterm=bold + hi BufferCurrentMod guifg=# guibg=# gui=bold cterm=bold + hi BufferCurrentSign guifg=# guibg=# gui=NONE cterm=NONE + hi BufferVisible guifg=# guibg=# gui=NONE cterm=NONE + hi BufferVisibleMod guifg=# guibg=# gui=NONE cterm=NONE + hi BufferVisibleSign guifg=# guibg=# gui=NONE cterm=NONE + hi BufferInactive guifg=# guibg=# gui=NONE cterm=NONE + hi BufferInactiveMod guifg=# guibg=# gui=NONE cterm=NONE + hi BufferInactiveSign guifg=# guibg=# gui=NONE cterm=NONE + + " Fix link colors to make them more visible + hi link Hyperlink NONE + hi link markdownLinkText NONE + hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline cterm=underline + hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + + " Add more direct highlights for badges in markdown + hi markdownH1 guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkTextDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold cterm=bold +else + " Light theme with transparent backgrounds + hi Normal guibg=NONE guifg=# gui=NONE cterm=NONE + hi Pmenu guibg=# guifg=# gui=NONE cterm=NONE + hi StatusLine guifg=# guibg=# gui=NONE cterm=NONE + hi StatusLineNC guifg=# guibg=# gui=NONE cterm=NONE + hi VertSplit guifg=# guibg=NONE gui=NONE cterm=NONE + hi LineNr guifg=# guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi FoldColumn guifg=# guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background including unfocused state + hi NeoTreeNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeFloatNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeFloatBorder guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeWinSeparator guifg=# guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background + hi NeoTreeNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeRootName guifg=# guibg=NONE gui=bold cterm=bold + + " TabLine highlighting with complementary accents + hi TabLine guifg=# guibg=# gui=NONE cterm=NONE + hi TabLineFill guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi TabLineSel guifg=# guibg=# gui=bold cterm=bold + hi TabLineSeparator guifg=# guibg=# gui=NONE cterm=NONE + + " Interactive elements with complementary contrast + hi Search guifg=# guibg=# gui=NONE cterm=NONE + hi Visual guifg=# guibg=# gui=NONE cterm=NONE + hi MatchParen guifg=# guibg=# gui=bold cterm=bold + + " Menu item hover highlight + hi CmpItemAbbrMatch guifg=# guibg=NONE gui=bold cterm=bold + hi CmpItemAbbrMatchFuzzy guifg=# guibg=NONE gui=bold cterm=bold + hi CmpItemMenu guifg=# guibg=NONE gui=italic cterm=italic + hi CmpItemAbbr guifg=# guibg=NONE gui=NONE cterm=NONE + hi CmpItemAbbrDeprecated guifg=# guibg=NONE gui=strikethrough cterm=strikethrough + + " Specific menu highlight groups + hi WhichKey guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeySeperator guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeyGroup guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeyDesc guifg=# guibg=NONE gui=NONE cterm=NONE + hi WhichKeyFloat guibg=# guifg=NONE gui=NONE cterm=NONE + + " Selection and hover highlights with inverted colors + hi CursorColumn guifg=NONE guibg=# gui=NONE cterm=NONE + hi Cursor guibg=# guifg=# gui=NONE cterm=NONE + hi lCursor guibg=# guifg=# gui=NONE cterm=NONE + hi CursorIM guibg=# guifg=# gui=NONE cterm=NONE + hi TermCursor guibg=# guifg=# gui=NONE cterm=NONE + hi TermCursorNC guibg=# guifg=# gui=NONE cterm=NONE + hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + hi CursorLineNr guifg=# guibg=NONE gui=bold cterm=bold + + hi QuickFixLine guifg=# guibg=# gui=NONE cterm=NONE + hi IncSearch guifg=# guibg=# gui=NONE cterm=NONE + hi NormalNC guibg=# guifg=# gui=NONE cterm=NONE + hi Directory guifg=# guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=# guibg=# gui=bold cterm=bold + + " Add highlight groups for focused items with inverted colors + hi CursorLineFold guifg=# guibg=# gui=NONE cterm=NONE + hi FoldColumn guifg=# guibg=NONE gui=NONE cterm=NONE + hi Folded guifg=# guibg=# gui=italic cterm=italic + + " File explorer specific highlights + hi NeoTreeNormal guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=# gui=NONE cterm=NONE + hi NeoTreeRootName guifg=# guibg=NONE gui=bold cterm=bold + hi NeoTreeFileName guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeFileIcon guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryName guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryIcon guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitModified guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitAdded guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitDeleted guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitUntracked guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeIndentMarker guifg=# guibg=NONE gui=NONE cterm=NONE + hi NeoTreeSymbolicLinkTarget guifg=# guibg=NONE gui=NONE cterm=NONE + + " File explorer cursor highlights with strong contrast + " hi NeoTreeCursorLine guibg=# guifg=# gui=bold cterm=bold + " hi! link NeoTreeCursor NeoTreeCursorLine + " hi! link NeoTreeCursorLineSign NeoTreeCursorLine + + " Use wallbash colors for explorer snack in light mode + hi WinBar guifg=# guibg=# gui=bold cterm=bold + hi WinBarNC guifg=# guibg=# gui=NONE cterm=NONE + hi ExplorerSnack guibg=# guifg=# gui=bold cterm=bold + hi BufferTabpageFill guibg=# guifg=# gui=NONE cterm=NONE + hi BufferCurrent guifg=# guibg=# gui=bold cterm=bold + hi BufferCurrentMod guifg=# guibg=# gui=bold cterm=bold + hi BufferCurrentSign guifg=# guibg=# gui=NONE cterm=NONE + hi BufferVisible guifg=# guibg=# gui=NONE cterm=NONE + hi BufferVisibleMod guifg=# guibg=# gui=NONE cterm=NONE + hi BufferVisibleSign guifg=# guibg=# gui=NONE cterm=NONE + hi BufferInactive guifg=# guibg=# gui=NONE cterm=NONE + hi BufferInactiveMod guifg=# guibg=# gui=NONE cterm=NONE + hi BufferInactiveSign guifg=# guibg=# gui=NONE cterm=NONE + + " Fix link colors to make them more visible + hi link Hyperlink NONE + hi link markdownLinkText NONE + hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline cterm=underline + hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + + " Add more direct highlights for badges in markdown + hi markdownH1 guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkTextDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold cterm=bold +endif + +" UI elements that are the same in both themes with transparent backgrounds +hi NormalFloat guibg=NONE guifg=NONE gui=NONE cterm=NONE +hi FloatBorder guifg=# guibg=NONE gui=NONE cterm=NONE +hi SignColumn guifg=NONE guibg=NONE gui=NONE cterm=NONE +hi DiffAdd guifg=# guibg=# gui=NONE cterm=NONE +hi DiffChange guifg=# guibg=# gui=NONE cterm=NONE +hi DiffDelete guifg=# guibg=# gui=NONE cterm=NONE +hi TabLineFill guifg=NONE guibg=NONE gui=NONE cterm=NONE + +" Fix selection highlighting with proper color derivatives +hi TelescopeSelection guibg=# guifg=# gui=bold cterm=bold +hi TelescopeSelectionCaret guifg=# guibg=# gui=bold cterm=bold +hi TelescopeMultiSelection guibg=# guifg=# gui=bold cterm=bold +hi TelescopeMatching guifg=# guibg=NONE gui=bold cterm=bold + +" Minimal fix for explorer selection highlighting +hi NeoTreeCursorLine guibg=# guifg=# gui=bold + +" Fix for LazyVim menu selection highlighting +hi Visual guibg=# guifg=# gui=bold +hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline +hi PmenuSel guibg=# guifg=# gui=bold +hi WildMenu guibg=# guifg=# gui=bold + +" Create improved autocommands to ensure highlighting persists with NeoTree focus fixes +augroup WallbashSelectionFix + autocmd! + " Force these persistent highlights with transparent backgrounds where possible + autocmd ColorScheme * if &background == 'dark' | + \ hi Normal guibg=NONE | + \ hi NeoTreeNormal guibg=NONE | + \ hi SignColumn guibg=NONE | + \ hi NormalFloat guibg=NONE | + \ hi FloatBorder guibg=NONE | + \ hi TabLineFill guibg=NONE | + \ else | + \ hi Normal guibg=NONE | + \ hi NeoTreeNormal guibg=NONE | + \ hi SignColumn guibg=NONE | + \ hi NormalFloat guibg=NONE | + \ hi FloatBorder guibg=NONE | + \ hi TabLineFill guibg=NONE | + \ endif + + " Force NeoTree background to be transparent even when unfocused + autocmd WinEnter,WinLeave,BufEnter,BufLeave * if &ft == 'neo-tree' || &ft == 'NvimTree' | + \ hi NeoTreeNormal guibg=NONE | + \ hi NeoTreeEndOfBuffer guibg=NONE | + \ endif + + " Fix NeoTree unfocus issue specifically in LazyVim + autocmd VimEnter,ColorScheme * hi link NeoTreeNormalNC NeoTreeNormal + + " Make CursorLine less obtrusive by using underline instead of background + autocmd ColorScheme * hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + + " Make links visible across modes + autocmd ColorScheme * if &background == 'dark' | + \ hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline | + \ hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold | + \ else | + \ hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline | + \ hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold | + \ endif + + " Fix markdown links specifically + autocmd FileType markdown hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline,bold + autocmd FileType markdown hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline +augroup END + +" Create a more aggressive fix for NeoTree background in LazyVim +augroup FixNeoTreeBackground + autocmd! + " Force NONE background for NeoTree at various points to override tokyonight fallback + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NeoTreeNormal guibg=NONE guifg=# ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NeoTreeNormalNC guibg=NONE guifg=# ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NeoTreeEndOfBuffer guibg=NONE guifg=# ctermbg=NONE + + " Also fix NvimTree for NvChad + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NvimTreeNormal guibg=NONE guifg=# ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NvimTreeNormalNC guibg=NONE guifg=# ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NvimTreeEndOfBuffer guibg=NONE guifg=# ctermbg=NONE + + " Apply highlight based on current theme + autocmd ColorScheme,VimEnter * if &background == 'dark' | + \ hi NeoTreeCursorLine guibg=# guifg=# gui=bold cterm=bold | + \ hi NvimTreeCursorLine guibg=# guifg=# gui=bold cterm=bold | + \ else | + \ hi NeoTreeCursorLine guibg=# guifg=# gui=bold cterm=bold | + \ hi NvimTreeCursorLine guibg=# guifg=# gui=bold cterm=bold | + \ endif + + " Force execution after other plugins have loaded + autocmd VimEnter * doautocmd ColorScheme +augroup END + +" Add custom autocommand specifically for LazyVim markdown links +augroup LazyVimMarkdownFix + autocmd! + " Force link visibility in LazyVim with stronger override + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownUrl MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownLinkText MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownLink MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownLinkDelimiter MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! MagentaLink guifg=#FF00FF gui=bold,underline + + " Apply when LazyVim is detected + autocmd User LazyVimStarted doautocmd FileType markdown + autocmd VimEnter * if exists('g:loaded_lazy') | doautocmd FileType markdown | endif +augroup END + +" Add custom autocommand specifically for markdown files with links +augroup MarkdownLinkFix + autocmd! + " Use bright hardcoded magenta that will definitely be visible + autocmd FileType markdown hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline,bold + autocmd FileType markdown hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline + + " Force these highlights right after vim loads + autocmd VimEnter * if &ft == 'markdown' | doautocmd FileType markdown | endif +augroup END + +" Remove possibly conflicting previous autocommands +augroup LazyVimFix + autocmd! +augroup END + +augroup MinimalExplorerFix + autocmd! +augroup END diff --git a/Configs/.config/hypr/animations.conf b/Configs/.config/hypr/animations.conf index 16aab86e6..6d9721c8b 100644 --- a/Configs/.config/hypr/animations.conf +++ b/Configs/.config/hypr/animations.conf @@ -5,8 +5,8 @@ # See https://wiki.hyprland.org/Configuring/Animations/ # HyDE Controlled content // DO NOT EDIT # Edit or add animations in the ./hypr/animations/ directory -# and run the 'animations.sh select' command to update this file +# and run the 'animations.sh --select' command to update this file $ANIMATION=theme -$ANIMATION_PATH=~/.config/hypr/animations/theme.conf - +$ANIMATION_PATH=./animations/theme.conf +source = $ANIMATION_PATH diff --git a/Configs/.config/hypr/animations/theme.conf b/Configs/.config/hypr/animations/theme.conf index 546c45abb..42e5eeb20 100644 --- a/Configs/.config/hypr/animations/theme.conf +++ b/Configs/.config/hypr/animations/theme.conf @@ -1,3 +1,4 @@ +# This file is generated by wallbash:animations.dcol # // โ–„โ–€โ–ˆโ€ƒโ–ˆโ–„โ–‘โ–ˆโ€ƒโ–ˆโ€ƒโ–ˆโ–€โ–„โ–€โ–ˆโ€ƒโ–„โ–€โ–ˆโ€ƒโ–€โ–ˆโ–€โ€ƒโ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–‘โ–ˆ # // โ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–ˆโ€ƒโ–ˆโ€ƒโ–ˆโ–‘โ–€โ–‘โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–‘โ–ˆโ–‘โ€ƒโ–ˆโ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–ˆ diff --git a/Configs/.config/hypr/hyde.conf b/Configs/.config/hypr/hyde.conf index 833db3e78..6ade2a78c 100644 --- a/Configs/.config/hypr/hyde.conf +++ b/Configs/.config/hypr/hyde.conf @@ -99,7 +99,7 @@ $start.BAR=hyprpanel # These variable will override the default and the theme configuration -# Do not uncomment the variables if you want want HyDE do the theme configuration for you +# Do not uncomment the variables if you want HyDE to do the theme configuration for you # // โ–ˆโ–€โ–€โ€ƒโ–€โ–ˆโ–€โ€ƒโ–ˆโ–„โ–€ # // โ–ˆโ–„โ–ˆโ€ƒโ–‘โ–ˆโ–‘โ€ƒโ–ˆโ–‘โ–ˆ diff --git a/Configs/.config/hypr/hyprland.conf b/Configs/.config/hypr/hyprland.conf index 634692151..831fd0ce5 100644 --- a/Configs/.config/hypr/hyprland.conf +++ b/Configs/.config/hypr/hyprland.conf @@ -8,15 +8,17 @@ #? Read https://hydeproject.pages.dev/en/configuring/hyprland/ for the full documentation. -source = ~/.local/share/hyde/hyprland.conf # HyDE's core configuration // DO NOT TOUCH!!! ( ๏ฝก โ€ขฬ€ แด– โ€ขฬ ๏ฝก) +source = $HOME/.local/share/hyde/hyprland.conf # HyDE's core configuration // DO NOT TOUCH!!! ( ๏ฝก โ€ขฬ€ แด– โ€ขฬ ๏ฝก) source = ./keybindings.conf # Keyboard shortcuts source = ./windowrules.conf # Window rules source = ./monitors.conf # Monitor configuration source = ./userprefs.conf # Your hyprland configuration // Edit this file to change your Hyprland configuration +source = ./workflows.conf # workflows configuration overrides everything # // โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ€ƒโ€ƒโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ€ƒโ€ƒโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— # // โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ€ƒโ€ƒโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ€ƒโ€ƒโ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ• # // โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ€ƒโ€ƒโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ€ƒโ€ƒโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘ # // โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ€ƒโ€ƒโ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ€ƒโ€ƒโ–ˆโ–ˆโ•”โ•โ•โ•โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘ # // โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ€ƒโ€ƒโ–ˆโ–ˆโ•‘โ–‘โ•šโ–ˆโ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ€ƒโ€ƒโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–‘ -# // โ•šโ•โ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ€ƒโ€ƒโ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ€ƒโ€ƒโ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘ \ No newline at end of file +# // โ•šโ•โ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ€ƒโ€ƒโ•šโ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ€ƒโ€ƒโ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘โ•šโ•โ•โ–‘โ–‘โ–‘ + diff --git a/Configs/.config/hypr/hyprlock.conf b/Configs/.config/hypr/hyprlock.conf index d6d170e89..828421158 100644 --- a/Configs/.config/hypr/hyprlock.conf +++ b/Configs/.config/hypr/hyprlock.conf @@ -10,7 +10,7 @@ # Set the layout path to be used by Hyprlock. # Check the available layouts in the './hyprlock/' directory. # Example: /=/path/to/anurati -$LAYOUT_PATH=~/.config/hypr/hyprlock/theme.conf +$LAYOUT_PATH=$HOME/.config/hypr/hyprlock/theme.conf #* ๏‘„ Persistent layout declaration ๏‘„ # If a persistent layout path is declared in $XDG_CONFIG_HOME/hypr/hyde.conf, @@ -18,7 +18,7 @@ $LAYOUT_PATH=~/.config/hypr/hyprlock/theme.conf # this should be the full path to the layout file. #* ๏‘„ All boilerplate configurations are handled by HyDE ๏‘„ -source = ~/.local/share/hyde/hyprlock.conf +source = $HOME/.local/share/hyde/hyprlock.conf #* ๏‘„ Making a custom layout ๏‘„ # To create a custom layout, make a file in the './hyprlock/' directory. diff --git a/Configs/.config/hypr/hyprlock/Anurati.conf b/Configs/.config/hypr/hyprlock/Anurati.conf index 035d325a6..a75ef9cf9 100644 --- a/Configs/.config/hypr/hyprlock/Anurati.conf +++ b/Configs/.config/hypr/hyprlock/Anurati.conf @@ -122,7 +122,7 @@ label { # Current Keyboard Layout label { monitor = - text = cmd[update:1000] $KEYBOARD_LAYOUT + text = $LAYOUT color = $wallbash_4xa9_rgba font_size = 20 font_family = Inter Display Medium diff --git a/Configs/.config/hypr/hyprlock/Arfan on Clouds.conf b/Configs/.config/hypr/hyprlock/Arfan on Clouds.conf index c19bc2892..d811e9fa9 100644 --- a/Configs/.config/hypr/hyprlock/Arfan on Clouds.conf +++ b/Configs/.config/hypr/hyprlock/Arfan on Clouds.conf @@ -132,7 +132,7 @@ label { # Current Keyboard Layout label { monitor = - text = cmd[update:1000] $KEYBOARD_LAYOUT + text = $LAYOUT color = $wallbash_4xa9_rgba font_size = 20 font_family = JetBrains Mono Nerd, SF Pro Display Bold diff --git a/Configs/.config/hypr/hyprlock/IBM Plex.conf b/Configs/.config/hypr/hyprlock/IBM Plex.conf index 7e49d8e78..5ea6527ad 100644 --- a/Configs/.config/hypr/hyprlock/IBM Plex.conf +++ b/Configs/.config/hypr/hyprlock/IBM Plex.conf @@ -102,7 +102,7 @@ label { # Current Keyboard Layout label { monitor = - text = cmd[update:1000] $KEYBOARD_LAYOUT + text = $LAYOUT color = $wallbash_4xa9_rgba font_size = 20 font_family = $fontFamily diff --git a/Configs/.config/hypr/hyprlock/SF Pro.conf b/Configs/.config/hypr/hyprlock/SF Pro.conf index ca13d5cf4..795e162d5 100644 --- a/Configs/.config/hypr/hyprlock/SF Pro.conf +++ b/Configs/.config/hypr/hyprlock/SF Pro.conf @@ -151,7 +151,7 @@ label { # Current Keyboard Layout label { monitor = - text = cmd[update:1000] $KEYBOARD_LAYOUT + text = $LAYOUT color = $wallbash_4xa9_rgba font_size = 20 font_family = SF Pro Display Bold diff --git a/Configs/.config/hypr/keybindings.conf b/Configs/.config/hypr/keybindings.conf index 28646b0cb..ee4ec851c 100644 --- a/Configs/.config/hypr/keybindings.conf +++ b/Configs/.config/hypr/keybindings.conf @@ -29,7 +29,7 @@ $d=[$wm] bindd = $mainMod, Q, $d close focused window, exec, $scrPath/dontkillsteam.sh bindd = Alt, F4, $d close focused window, exec, $scrPath/dontkillsteam.sh bindd = $mainMod, Delete, $d kill hyprland session, exit -bindd = $mainMod, W, $d toggle float, togglefloating, # +bindd = $mainMod, W, $d Toggle floating, exec, hyprctl --batch "dispatch togglefloating; dispatch resizeactive exact 95% 95%; dispatch centerwindow" bindd = $mainMod, G, $d toggle group, togglegroup bindd = Shift, F11, $d toggle fullscreen, fullscreen bindd = $mainMod, L, $d lock screen, exec, lockscreen.sh @@ -47,7 +47,7 @@ bindd = $mainMod, Left, $d focus left, movefocus, l bindd = $mainMod, Right, $d focus right , movefocus, r bindd = $mainMod, Up, $d focus up , movefocus, u bindd = $mainMod, Down , $d focus down, movefocus, d -# bindd = Alt, TAB, $d focus , movefocus, d, +bindd = ALT, Tab,$d Cycle focus, cyclenext $d=[$wm|Resize Active Window] # Resize windows @@ -59,10 +59,10 @@ bindde = $mainMod Shift, Down, $d resize window down, resizeactive, 0 30 # Move active window around current workspace with mainMod + Shift + Control [โ†โ†’โ†‘โ†“] $d=[$wm|Move active window across workspace] $moveactivewindow=grep -q "true" <<< $(hyprctl activewindow -j | jq -r .floating) && hyprctl dispatch moveactive -bindde = $mainMod Shift Control, left, Move activewindow to the left, exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l -bindde = $mainMod Shift Control, right, Move activewindow to the right, exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r -bindde = $mainMod Shift Control, up, Move activewindow up, exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u -bindde = $mainMod Shift Control, down, Move activewindow down, exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d +bindde = $mainMod Shift Control, left, Move active window to the left, exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l +bindde = $mainMod Shift Control, right, Move active window to the right, exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r +bindde = $mainMod Shift Control, up, Move active window up, exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u +bindde = $mainMod Shift Control, down, Move active window down, exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d # Move/Resize focused window $d=[$wm|Move & Resize with mouse] @@ -121,6 +121,7 @@ $ut=Utilities $d=[$ut] binddl = $mainMod, K, $d toggle keyboard layout , exec, $scrPath/keyboardswitch.sh # switch keyboard layout bindd = $mainMod Alt, G, $d game mode , exec, $scrPath/gamemode.sh # disable hypr effects for gamemode +bindd = $mainMod Shift, G, $d open game launcher , exec, $scrPath/gamelauncher.sh # run game launcher for steam and lutris $d=[$ut|Screen Capture] bindd = $mainMod Shift, P, $d color picker, exec, hyprpicker -an # Pick color (Hex) >> clipboard# diff --git a/Configs/.config/hypr/nvidia.conf b/Configs/.config/hypr/nvidia.conf index f7e6ed07e..1f851a457 100644 --- a/Configs/.config/hypr/nvidia.conf +++ b/Configs/.config/hypr/nvidia.conf @@ -19,7 +19,7 @@ cursor:no_hardware_cursors = true # Set to true to avoid hitches # Hardware video acceleration on Nvidia and Wayland is # possible with the nvidia-vaapi-driver. # This may solve specific issues in Electron apps. -env = NVD_BACKEND,direct # Requires 'libva-nvidia-driver' package +# env = NVD_BACKEND,direct # Requires 'libva-nvidia-driver' package # https://wiki.hyprland.org/Nvidia/#regarding-environment-variables # If you encounter crashes in Firefox, remove this line diff --git a/Configs/.config/hypr/userprefs.conf b/Configs/.config/hypr/userprefs.conf index fe104db9d..587369334 100644 --- a/Configs/.config/hypr/userprefs.conf +++ b/Configs/.config/hypr/userprefs.conf @@ -26,19 +26,6 @@ bind = $mainMod, B, exec, blueman-manager bindd = Alt, Return, $d toggle fullscreen, fullscreen bindl = , switch:Lid Switch, exec, systemctl suspend -input { - kb_layout = us,ru - kb_options = grp:alt_shift_toggle - follow_mouse = false - touchpad { - natural_scroll = yes - disable_while_typing = false - } - - sensitivity = 0 - #force_no_accel = 0 -} - # โ–ˆโ–‘โ–‘โ€ƒโ–„โ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–„โ–‘โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–‘โ–ˆ # โ–ˆโ–„โ–„โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–ˆโ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–€โ–ˆ @@ -86,3 +73,25 @@ bindd = $mainMod Shift+Ctrl, 5, $d move to workspace 15 , movetoworkspace, 15 windowrulev2 = float,class:^(zen)$,title:^(Picture-in-Picture)$ windowrulev2 = float,class:^(hiddify)$ + +# โ–ˆโ€ƒโ–ˆโ–„โ–‘โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–€โ–ˆโ–€ +# โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–‘โ–ˆโ–‘ + +input { + kb_layout = us,ru + kb_options = grp:alt_shift_toggle + follow_mouse = false + touchpad { + natural_scroll = yes + disable_while_typing = false + } + + sensitivity = 0 + #force_no_accel = 0 +} + +# ๐Ÿ”— See https://wiki .hyprland.org/Configuring/Variables/#gestures +gestures { +# workspace_swipe = true +# workspace_swipe_fingers = 3 +} \ No newline at end of file diff --git a/Configs/.config/hypr/workflows.conf b/Configs/.config/hypr/workflows.conf new file mode 100644 index 000000000..8391993af --- /dev/null +++ b/Configs/.config/hypr/workflows.conf @@ -0,0 +1,19 @@ +#! โ–ˆโ–‘โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–€โ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–‘โ–‘โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€ +#! โ–€โ–„โ–€โ–„โ–€โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–€โ–„โ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–‘โ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–€โ–„โ–€โ–„โ–€โ€ƒโ–„โ–ˆ + +# This file sets the current workflow for Hyprland +# HyDE Controlled content // DO NOT EDIT +# Edit or add workflows in the ./workflows/ directory +# and run the 'workflows.sh select' command to update this file + +# Workflows are a set of configurations that can be applied to Hyprland +# that suits the actual workflow you are doing. +# It can be gaming mode, work mode, or anything else you can think of. +# you can also exec a command within the workflow + +$WORKFLOW = default +$WORKFLOW_ICON = ๏˜ฎ +$WORKFLOW_DESCRIPTION = Default HyDE configuration // Disables workflow overrides +$WORKFLOWS_PATH = ./workflows/default.conf +source = $WORKFLOWS_PATH + diff --git a/Configs/.config/hypr/workflows/default.conf b/Configs/.config/hypr/workflows/default.conf new file mode 100644 index 000000000..5d1107069 --- /dev/null +++ b/Configs/.config/hypr/workflows/default.conf @@ -0,0 +1,5 @@ +# // โ–ˆโ–€โ–„โ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–€โ€ƒโ–„โ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–‘โ–‘โ€ƒโ–€โ–ˆโ–€ +# // โ–ˆโ–„โ–€โ€ƒโ–ˆโ–ˆโ–„โ€ƒโ–ˆโ–€โ–‘โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–„โ–„โ€ƒโ–‘โ–ˆโ–‘ + +$WORKFLOW_ICON=๏˜ฎ +$WORKFLOW_DESCRIPTION = Unset workflow configuration diff --git a/Configs/.config/hypr/workflows/editing.conf b/Configs/.config/hypr/workflows/editing.conf new file mode 100644 index 000000000..752a6ea40 --- /dev/null +++ b/Configs/.config/hypr/workflows/editing.conf @@ -0,0 +1,21 @@ +# // โ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–„โ€ƒโ–ˆโ€ƒโ–€โ–ˆโ–€โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆ +# // โ–ˆโ–ˆโ–„โ€ƒโ–ˆโ–„โ–€โ€ƒโ–ˆโ€ƒโ–‘โ–ˆโ–‘โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–€โ–„ + +$WORKFLOW_ICON=๎ฏˆ +$WORKFLOW_DESCRIPTION = Best for writing and editing // Disables xray and blur that might affect color picking/contrast + + +decoration { + blur:enabled = 1 + active_opacity = 1 + inactive_opacity = 1 + fullscreen_opacity = 1 + fullscreen_opacity = 1 +} + +windowrule = opaque,class:(.*) # ensure all windows are opaque + +layerrule = blur,waybar +layerrule = blur,dunst +layerrule = blur,swaync-notification-window +layerrule = blur,rofi \ No newline at end of file diff --git a/Configs/.config/hypr/workflows/gaming.conf b/Configs/.config/hypr/workflows/gaming.conf new file mode 100644 index 000000000..6f3da91a0 --- /dev/null +++ b/Configs/.config/hypr/workflows/gaming.conf @@ -0,0 +1,23 @@ +# // โ–ˆโ–€โ–€โ€ƒโ–„โ–€โ–ˆโ€ƒโ–ˆโ–€โ–„โ–€โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–„โ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–„โ€ƒโ–ˆโ–€โ–€ +# // โ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–‘โ–ˆโ€ƒโ–ˆโ–ˆโ–„โ€ƒโ–ˆโ–‘โ–€โ–‘โ–ˆโ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–„โ–€โ€ƒโ–ˆโ–ˆโ–„ + +# Script from https://wiki.hyprland.org/Configuring/Uncommon-tips--tricks/#toggle-animationsbluretc-hotkey + +$WORKFLOW_ICON=๎ฐ— # this is an indicator that can be parsed by waybar or other status guis +$WORKFLOW_DESCRIPTION = Emphasis on performance and disabling compositors expensive features + +decoration { + shadow { + enabled = 0 + } + blur:enabled = 0 + rounding = 0 +} + +general { +gaps_in = 0 +gaps_out = 0 +border_size = 1 +} + +animations:enabled = 0 diff --git a/Configs/.config/hypr/workflows/powersaver.conf b/Configs/.config/hypr/workflows/powersaver.conf new file mode 100644 index 000000000..d71326dee --- /dev/null +++ b/Configs/.config/hypr/workflows/powersaver.conf @@ -0,0 +1,33 @@ +# // โ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ€ƒโ–„โ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–ˆ +# // โ–ˆโ–€โ–€โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–€โ–„โ–€โ–„โ–€โ€ƒโ–ˆโ–ˆโ–„โ€ƒโ–ˆโ–€โ–„โ€ƒโ–„โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–€โ–„โ–€โ€ƒโ–ˆโ–ˆโ–„โ€ƒโ–ˆโ–€โ–„ + + +$WORKFLOW_ICON=๎ผน +$WORKFLOW_DESCRIPTION = Saves as much power as possible by disabling all animations and effects, but preserving readability + +decoration { + shadow { + enabled = 0 + } + blur:enabled = 0 + rounding = 0 + active_opacity = 1 + inactive_opacity = 1 + fullscreen_opacity = 1 + fullscreen_opacity = 1 +} + +general { +gaps_in = 0 +gaps_out = 0 +border_size = 1 +} + +animations:enabled = 0 + +layerrule = noanim,waybar +layerrule = noanim,swaync-notification-window +layerrule = noanim,swww-daemon +layerrule = noanim,rofi + +windowrule = opaque,class:(.*) # ensure all windows are opaque diff --git a/Configs/.config/hypr/workflows/snappy.conf b/Configs/.config/hypr/workflows/snappy.conf new file mode 100644 index 000000000..6f1e9f15d --- /dev/null +++ b/Configs/.config/hypr/workflows/snappy.conf @@ -0,0 +1,17 @@ +# // โ–ˆโ–€โ€ƒโ–ˆโ–„โ–‘โ–ˆโ€ƒโ–„โ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–ˆ +# // โ–„โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–€โ€ƒโ–‘โ–ˆโ–‘ + +$WORKFLOW_ICON=๓ฐ“… # this is an indicator that can be parsed by waybar or other status guis +$WORKFLOW_DESCRIPTION = Snappy desktop + +decoration { +rounding = 0 +} + +general { +gaps_in = 0 +gaps_out = 0 +border_size = 1 +} + +animations:enabled = 0 \ No newline at end of file diff --git a/Configs/.config/kitty/kitty.conf b/Configs/.config/kitty/kitty.conf index 022ba6d1f..c25086f37 100644 --- a/Configs/.config/kitty/kitty.conf +++ b/Configs/.config/kitty/kitty.conf @@ -1,11 +1,22 @@ include hyde.conf -# Add your custom configurations here -font_family JetBrainsMono Nerd Font -font_size 12.0 -window_padding_width 0 +# Minimal Tab bar styling +tab_bar_edge bottom +tab_bar_style powerline +tab_powerline_style slanted +tab_title_template {title}{' :{}:'.format(num_windows) if num_windows > 1 else ''} + +# remap to open new kitty tab in the same directory (default is home dir) +# map ctrl+shift+t new_tab_with_cwd + +# Uncomment the following 4 lines to minimize kitty latency (higher energy usage) input_delay 0 repaint_delay 2 sync_to_monitor no +wayland_enable_ime no + +font_family JetBrainsMono Nerd Font +font_size 12.0 +window_padding_width 0 cursorail visual_bell_duration 1.0 diff --git a/Configs/.config/starship/powerline.toml b/Configs/.config/starship/powerline.toml new file mode 100644 index 000000000..2a5fd3102 --- /dev/null +++ b/Configs/.config/starship/powerline.toml @@ -0,0 +1,409 @@ +format = """ +[๎‚ถ](#9A348E)\ +$os\ +$username\ +[๎‚ฐ](bg:#DA627D fg:#9A348E)\ +$directory\ +[๎‚ฐ](fg:#DA627D bg:#FCA17D)\ +$git_branch\ +$git_status\ +[๎‚ฐ](fg:#FCA17D bg:#86BBD8)\ +$c\ +$elixir\ +$elm\ +$golang\ +$gradle\ +$haskell\ +$java\ +$julia\ +$nodejs\ +$nim\ +$rust\ +$scala\ +$deno\ +$lua\ +$python\ +$ruby\ +$swift\ +$aws\ +$buf\ +$cpp\ +$kotlin\ +$ocaml\ +$perl\ +$php\ +$pixi\ +$rlang\ +$meson\ +$conda\ +$dart\ +$memory_usage\ +$nix_shell\ +$spack\ +$zig\ +$singularity\ +$kubernetes\ +$vcsh\ +$cobol\ +$daml\ +$dotnet\ +$erlang\ +$fennel\ +$haxe\ +$helm\ +$opa\ +$pulumi\ +$purescript\ +$raku\ +$red\ +$solidity\ +$terraform\ +$vlang\ +$vagrant\ +$gcloud\ +$openstack\ +$azure\ +$crystal\ +[๎‚ฐ](fg:#86BBD8 bg:#06969A)\ +$docker_context\ +[๎‚ฐ](fg:#06969A bg:#33658A)\ +$time\ +[๎‚ฐ ](fg:#33658A)\ +""" + +# Disable the blank line at the start of the prompt +# add_newline = false + +# You can also replace your username with a neat symbol like ๏„  or disable this +# and use the os module below +[username] +disabled = false +format = '[$user ]($style)' +show_always = true +style_root = "bg:#9A348E" +style_user = "bg:#9A348E" + +# An alternative to the username module which displays a symbol that +# represents the current operating system +[os] +disabled = true # Disabled by default +style = "bg:#9A348E" + +[directory] +format = "[ $path ]($style)" +style = "bg:#DA627D" +# truncation_length = 3 +# truncation_symbol = "โ€ฆ/" + +# Here is how you can shorten some long paths by text replacement +# similar to mapped_locations in Oh My Posh: +[directory.substitutions] +"Documents" = "๓ฐˆ™ " +"Downloads" = "๏€™ " +"Music" = "๏€ " +"Pictures" = "๏€พ " +# Keep in mind that the order matters. For example: +# "Important Documents" = " ๓ฐˆ™๏„ช " +# will not be replaced, because "Documents" was already substituted before. +# So either put "Important Documents" before "Documents" or use the substituted version: +# "Important ๓ฐˆ™ " = " ๓ฐˆ™๏„ช " + +[docker_context] +format = '[ $symbol $context ]($style)' +style = "bg:#06969A" +symbol = " " + +[elixir] +format = '[ $symbol ]($style)' +style = "bg:#86BBD8" +symbol = " " + +[elm] +format = '[ $symbol ]($style)' +style = "bg:#86BBD8" +symbol = " " + +[git_branch] +format = '[ $symbol $branch ]($style)' +style = "bg:#FCA17D" +symbol = "" + +[git_status] +format = '[$all_status$ahead_behind ]($style)' +style = "bg:#FCA17D" + +[deno] +format = " [deno](italic) [๎ด ](green bold)" +version_format = "${raw}" + +[lua] +format = " [lua](italic) [${symbol}]($style)" +style = "bold bright-yellow" +symbol = "โจ€ " +version_format = "${raw}" + +[nodejs] +detect_extensions = [] +detect_files = ["package-lock.json", "yarn.lock"] +detect_folders = ["node_modules"] +format = "[๏ข˜ ](bold bright-green)" +version_format = "${raw}" + +[python] +format = "[${symbol}(${virtualenv}) ${version}]($style)" +style = "bold bright-yellow" +symbol = "[๎ด› ](bold bright-blue)" +version_format = "${raw}" + +[ruby] +format = " [rb](italic) [${symbol}]($style)" +style = "bold red" +symbol = "๎˜… " +version_format = "${raw}" + +[rust] +style = "bold bright-red" +format = " rs(italic) $symbol($style)" +symbol = "๎š‹ " + +[swift] +format = " [sw](italic) [${symbol}]($style)" +style = "bold bright-red" +symbol = "๎š™ " +version_format = "${raw}" + +[aws] +disabled = true +format = " [aws](italic) [$symbol $profile $region]($style)" +style = "bold blue" +symbol = "๏ƒฏ " + +[buf] +style = "bold bright-red" +format = " [buf](italic) [$symbol $buf_version]($style)" +symbol = "โ–  " + +[c] +style = "bold bright-cyan" +format = " [$symbol(-$name)]($style)" +symbol = "โ„‚ " + +[cpp] +style = "bold bright-cyan" +format = " [cpp](italic) [$symbol]($style)" +symbol = " " + +[kotlin] +format = " [kotlin](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = " " + +[ocaml] +format = " [ocaml](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = " " + +[perl] +format = " [perl](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = " " + +[php] +format = " [php](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = " " + +[pixi] +format = " [pixi](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = "pixi " + +[rlang] +format = " [rlang](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = " " + +[meson] +format = " [meson](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "meson " + +[conda] +style = "bold bright-red" +format = " conda [$symbol$environment]($style)" +symbol = "โ—ฏ " + +[dart] +style = "bold bright-cyan" +format = " dart [$symbol]($style)" +symbol = "๎™Œ " + + +[golang] +style = "bold bright-blue" +format = " go [$symbol]($style)" +symbol = "โˆฉ " + +[haskell] +style = "bold bright-yellow" +format = " hs [$symbol]($style)" +symbol = "โฏฮป " + +[java] +style = "bold bright-red" +format = " java [${symbol}]($style)" +symbol = "๎™ญ " + +[julia] +style = "bold bright-cyan" +format = " jl [$symbol]($style)" +symbol = "โ—Ž " + +[memory_usage] +style = "bold bright-cyan" +format = " mem [${ram}( ${swap})]($style)" +symbol = "โ–ชโ–ซโ–ช " + +[nim] +style = "bold bright-yellow" +format = " nim [$symbol]($style)" +symbol = "โ–ดโ–ฒโ–ด " + +[nix_shell] +format = '[$symbol nixโŽช$stateโŽช]($style) [$name](italic dimmed white)' +impure_msg = '[โŒฝ](bold dimmed red)' +pure_msg = '[โŒพ](bold dimmed green)' +style = 'bold italic dimmed blue' +symbol = '๏Œ“ ' +unknown_msg = '[โ—Œ](bold dimmed ellow)' + +[spack] +style = "bold bright-yellow" +format = " spack [$symbol$environment]($style)" +symbol = "โ—‡ " + + +[zig] +style = "bold bright-yellow" +format = " zig [$symbol]($style)" +symbol = "๎šฉ " + + +[scala] +format = " scala [$symbol]($style)" +symbol = "๎šŽ " + +[singularity] +style = "bold bright-yellow" +format = " [singularity](italic) [$symbol]($style)" +symbol = "singularity " + +[kubernetes] +style = "bold bright-cyan" +format = " [kubernetes](italic) [$symbol]($style)" +symbol = "๏„ " + +[vcsh] +style = "bold bright-red" +format = " [vcsh](italic) [$symbol]($style)" +symbol = "vcsh " + +[cobol] +style = "bold bright-yellow" +format = " [cobol](italic) [$symbol]($style)" +symbol = "cobol " + +[daml] +style = "bold bright-cyan" +format = " [daml](italic) [$symbol]($style)" +symbol = "daml " + +[dotnet] +style = "bold bright-red" +format = " [dotnet](italic) [$symbol]($style)" +symbol = ".NET " + +[erlang] +style = "bold bright-yellow" +format = " [erlang](italic) [$symbol]($style)" +symbol = "๏ˆฟ " + +[fennel] +style = "bold bright-cyan" +format = " [fennel](italic) [$symbol]($style)" +symbol = "๎šฏ " + +[haxe] +style = "bold bright-red" +format = " [haxe](italic) [$symbol]($style)" +symbol = "๎™ฆ " + +[helm] +style = "bold bright-yellow" +format = " [helm](italic) [$symbol]($style)" +symbol = "helm " + +[opa] +style = "bold bright-cyan" +format = " [opa](italic) [$symbol]($style)" +symbol = "opa " + +[pulumi] +format = " [pulumi](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "pulumi " + +[purescript] +style = "bold bright-yellow" +format = " [purescript](italic) [$symbol]($style)" +symbol = "๎˜ฐ " + +[raku] +style = "bold bright-cyan" +format = " [raku](italic) [$symbol]($style)" +symbol = "raku " + +[red] +style = "bold bright-red" +format = " [red](italic) [$symbol]($style)" +symbol = "red " + +[solidity] +style = "bold bright-yellow" +format = " [solidity](italic) [$symbol]($style)" +symbol = "๎ต˜ " + +[terraform] +style = "bold bright-cyan" +format = " [terraform](italic) [$symbol]($style)" +symbol = "terraform " + +[vlang] +format = " [vlang](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "vlang " + +[vagrant] +format = " [vagrant](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = "vagrant " + +[gcloud] +format = " [gcloud](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = "gcloud " + +[openstack] +format = " [openstack](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "openstack " + +[azure] +format = " [azure](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = "๎ฏ˜ " + +[crystal] +format = " [crystal](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = "๎™‡ " diff --git a/Configs/.config/starship/starship.toml b/Configs/.config/starship/starship.toml new file mode 100644 index 000000000..57a94ef3a --- /dev/null +++ b/Configs/.config/starship/starship.toml @@ -0,0 +1,405 @@ +# "$schema" = 'https://starship.rs/config-schema.json' +add_newline = false +format = """\ + ๓ฐฃ‡ \ + $directory\ + $git_branch$git_commit$git_state $git_status\ + $character\n +""" +right_format = """ +$singularity\ +$kubernetes\ +$vcsh\ +$hg_branch\ +$pijul_channel\ +$c\ +$cmake\ +$cobol\ +$daml\ +$dart\ +$deno\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$fennel\ +$golang\ +$guix_shell\ +$haskell\ +$haxe\ +$helm\ +$java\ +$julia\ +$kotlin\ +$gradle\ +$lua\ +$nim\ +$nodejs\ +$ocaml\ +$opa\ +$perl\ +$pulumi\ +$purescript\ +$python\ +$raku\ +$rlang\ +$red\ +$ruby\ +$rust\ +$scala\ +$solidity\ +$swift\ +$terraform\ +$vlang\ +$vagrant\ +$zig\ +$buf\ +$conda\ +$meson\ +$spack\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$azure\ +$cpp\ +$kotlin\ +$ocaml\ +$pixi\ +$rlang\ +$php\ +$crystal\ +$custom\ +$status\ +$os\ +$time""" + +continuation_prompt = 'โ–ถโ–ถ ' + + +# style_choices: +# bold +# italic +# underline +# dimmed +# inverted +# blink +# hidden +# strikethrough +# bg: +# fg: +# +# none + +#NTOE: you can customize the symbol(s, e.g: +# [character] +# success_symbol = "[ ๎˜‚ ]($bold fg:#f8f8f2)" +# error_symbol = "[ โžค ]($bold fg:#fb4934)" + +[directory] +disabled = false +format = "[$path](bold fg:#8be9fd)" +truncate_to_repo = false +# home_symbol = "๎˜—" + +[git_branch] +format = " [ ๎‚  $branch](fg:#9198a1)" + +[git_status] +ahead = 'โ‡ก${count}' +behind = 'โ‡ฃ${count}' +diverged = 'โ‡•โ‡ก${ahead_count}โ‡ฃ${behind_count}' +format = '[[(๎ช„ $all_status$ahead_behind )](fg:#769ff0)]($style)' +style = "bg:#394260" + + +[time] +disabled = false +format = '[[ ๏บ $time ](fg:#a0a9cb )]($style)' +time_format = "%R" # Hour:Minute Format + +[deno] +format = " [deno](italic) [๎ด ](green bold)" +version_format = "${raw}" + +[lua] +format = " [lua](italic) [${symbol}]($style)" +style = "bold bright-yellow" +symbol = "โจ€ " +version_format = "${raw}" + +[nodejs] +detect_extensions = [] +detect_files = ["package-lock.json", "yarn.lock"] +detect_folders = ["node_modules"] +format = "[๏ข˜ ](bold bright-green)" +version_format = "${raw}" + +[python] +format = "[${symbol}(${virtualenv}) ${version}]($style)" +style = "bold bright-yellow" +symbol = "[๎ด› ](bold bright-blue)" +version_format = "${raw}" + +[ruby] +format = " [rb](italic) [${symbol}]($style)" +style = "bold red" +symbol = "๎˜… " +version_format = "${raw}" + +[rust] +style = "bold bright-red" +format = " rs(italic) $symbol($style)" +symbol = "๎š‹ " + +[swift] +format = " [sw](italic) [${symbol}]($style)" +style = "bold bright-red" +symbol = "๎š™ " +version_format = "${raw}" + +[aws] +disabled = true +format = " [aws](italic) [$symbol $profile $region]($style)" +style = "bold blue" +symbol = "๏ƒฏ " + +[buf] +style = "bold bright-red" +format = " [buf](italic) [$symbol $buf_version]($style)" +symbol = "โ–  " + +[c] +style = "bold bright-cyan" +format = " [$symbol(-$name)]($style)" +symbol = "โ„‚ " + +[cpp] +style = "bold bright-cyan" +format = " [cpp](italic) [$symbol]($style)" +symbol = " " + +[kotlin] +format = " [kotlin](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = " " + +[ocaml] +format = " [ocaml](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = " " + +[perl] +format = " [perl](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = " " + +[php] +format = " [php](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = " " + +[pixi] +format = " [pixi](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = "pixi " + +[rlang] +format = " [rlang](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = " " + +[meson] +format = " [meson](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "meson " + +[conda] +style = "bold bright-red" +format = " conda [$symbol$environment]($style)" +symbol = "โ—ฏ " + +[dart] +style = "bold bright-cyan" +format = " dart [$symbol]($style)" +symbol = "๎™Œ " + + +[elixir] +style = "bold bright-yellow" +format = " exs [$symbol OTP $otp_version ]($style)" +symbol = "๎™“ " + +[elm] +style = "bold bright-red" +format = " elm [$symbol]($style)" +symbol = "โ—ฉ " + +[golang] +style = "bold bright-blue" +format = " go [$symbol]($style)" +symbol = "โˆฉ " + +[haskell] +style = "bold bright-yellow" +format = " hs [$symbol]($style)" +symbol = "โฏฮป " + +[java] +style = "bold bright-red" +format = " java [${symbol}]($style)" +symbol = "๎™ญ " + +[julia] +style = "bold bright-cyan" +format = " jl [$symbol]($style)" +symbol = "โ—Ž " + +[memory_usage] +style = "bold bright-cyan" +format = " mem [${ram}( ${swap})]($style)" +symbol = "โ–ชโ–ซโ–ช " + +[nim] +style = "bold bright-yellow" +format = " nim [$symbol]($style)" +symbol = "โ–ดโ–ฒโ–ด " + +[nix_shell] +format = '[$symbol nixโŽช$stateโŽช]($style) [$name](italic dimmed white)' +impure_msg = '[โŒฝ](bold dimmed red)' +pure_msg = '[โŒพ](bold dimmed green)' +style = 'bold italic dimmed blue' +symbol = '๏Œ“ ' +unknown_msg = '[โ—Œ](bold dimmed ellow)' + +[spack] +style = "bold bright-yellow" +format = " spack [$symbol$environment]($style)" +symbol = "โ—‡ " + + +[zig] +style = "bold bright-yellow" +format = " zig [$symbol]($style)" +symbol = "๎šฉ " + + +[scala] +format = " scala [$symbol]($style)" +symbol = "๎šŽ " + +[singularity] +style = "bold bright-yellow" +format = " [singularity](italic) [$symbol]($style)" +symbol = "singularity " + +[kubernetes] +style = "bold bright-cyan" +format = " [kubernetes](italic) [$symbol]($style)" +symbol = "๏„ " + +[vcsh] +style = "bold bright-red" +format = " [vcsh](italic) [$symbol]($style)" +symbol = "vcsh " + +[cobol] +style = "bold bright-yellow" +format = " [cobol](italic) [$symbol]($style)" +symbol = "cobol " + +[daml] +style = "bold bright-cyan" +format = " [daml](italic) [$symbol]($style)" +symbol = "daml " + +[dotnet] +style = "bold bright-red" +format = " [dotnet](italic) [$symbol]($style)" +symbol = ".NET " + +[erlang] +style = "bold bright-yellow" +format = " [erlang](italic) [$symbol]($style)" +symbol = "๏ˆฟ " + +[fennel] +style = "bold bright-cyan" +format = " [fennel](italic) [$symbol]($style)" +symbol = "๎šฏ " + +[haxe] +style = "bold bright-red" +format = " [haxe](italic) [$symbol]($style)" +symbol = "๎™ฆ " + +[helm] +style = "bold bright-yellow" +format = " [helm](italic) [$symbol]($style)" +symbol = "helm " + +[opa] +style = "bold bright-cyan" +format = " [opa](italic) [$symbol]($style)" +symbol = "opa " + +[pulumi] +format = " [pulumi](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "pulumi " + +[purescript] +style = "bold bright-yellow" +format = " [purescript](italic) [$symbol]($style)" +symbol = "๎˜ฐ " + +[raku] +style = "bold bright-cyan" +format = " [raku](italic) [$symbol]($style)" +symbol = "raku " + +[red] +style = "bold bright-red" +format = " [red](italic) [$symbol]($style)" +symbol = "red " + +[solidity] +style = "bold bright-yellow" +format = " [solidity](italic) [$symbol]($style)" +symbol = "๎ต˜ " + +[terraform] +style = "bold bright-cyan" +format = " [terraform](italic) [$symbol]($style)" +symbol = "terraform " + +[vlang] +format = " [vlang](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "vlang " + +[vagrant] +format = " [vagrant](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = "vagrant " + +[gcloud] +format = " [gcloud](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = "gcloud " + +[openstack] +format = " [openstack](italic) [$symbol]($style)" +style = "bold bright-red" +symbol = "openstack " + +[azure] +format = " [azure](italic) [$symbol]($style)" +style = "bold bright-yellow" +symbol = "๎ฏ˜ " + +[crystal] +format = " [crystal](italic) [$symbol]($style)" +style = "bold bright-cyan" +symbol = "๎™‡ " diff --git a/Configs/.config/systemd/user/hyde-config.service b/Configs/.config/systemd/user/hyde-config.service new file mode 100644 index 000000000..1eda3d739 --- /dev/null +++ b/Configs/.config/systemd/user/hyde-config.service @@ -0,0 +1,19 @@ +[Unit] +Description=HyDE Configuration Parser Service +Documentation=https://github.com/HyDE-Project/hyde-config +After=graphical-session.target +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=%h/.local/lib/hyde/hyde-config +Restart=on-failure +RestartSec=5s +Environment="DISPLAY=:0" + +# Make sure the required directories exist +ExecStartPre=/bin/mkdir -p %h/.config/hyde +ExecStartPre=/bin/mkdir -p %h/.local/state/hyde + +[Install] +WantedBy=graphical-session.target \ No newline at end of file diff --git a/Configs/.config/systemd/user/hyde-ipc.service b/Configs/.config/systemd/user/hyde-ipc.service new file mode 100644 index 000000000..a6a354c88 --- /dev/null +++ b/Configs/.config/systemd/user/hyde-ipc.service @@ -0,0 +1,12 @@ +[Unit] +Description=Hyde IPC service for Hyprland +PartOf=graphical-session.target +After=graphical-session.target + +[Service] +ExecStart=%h/.local/bin/hyde-ipc +Restart=on-failure +RestartSec=5s + +[Install] +WantedBy=graphical-session.target \ No newline at end of file diff --git a/Configs/.config/vim/colors/wallbash.vim b/Configs/.config/vim/colors/wallbash.vim new file mode 100644 index 000000000..e532a7c17 --- /dev/null +++ b/Configs/.config/vim/colors/wallbash.vim @@ -0,0 +1,495 @@ +" Name: wallbash +" Description: wallbash template +" Author: The HyDE Project +" License: Same as Vim +" Last Change: April 2025 + +if exists('g:loaded_wallbash') | finish | endif + let g:loaded_wallbash = 1 + + + " Detect background based on terminal colors + if $BACKGROUND =~# 'light' + set background=light + else + set background=dark + endif + + " hi clear + let g:colors_name = 'wallbash' + + let s:t_Co = &t_Co + + " Terminal color setup + if (has('termguicolors') && &termguicolors) || has('gui_running') + let s:is_dark = &background == 'dark' + + " Define terminal colors based on the background + if s:is_dark + let g:terminal_ansi_colors = ['1B1A29', 'A36567', '7F7AC2', '7AAEC2', + \ '657AA3', '9AD0E6', '9F9AE6', 'FFFFFF', + \ '272E3C', 'C27A7C', '9F9AE6', 'AADCF0', + \ '7A92C2', 'AADCF0', 'AFAAF0', 'FFFFFF'] + else + " Lighter colors for light theme + let g:terminal_ansi_colors = ['FFFFFF', 'E69A9C', 'AFAAF0', 'AADCF0', + \ '9AB3E6', 'CCF1FF', 'CFCCFF', '2D4E5B', + \ 'FFFFFF', 'F0AAAC', 'CFCCFF', 'CCF1FF', + \ 'AAC1F0', 'CCF1FF', 'CFCCFF', '1B1A29'] + endif + + " Nvim uses g:terminal_color_{0-15} instead + for i in range(g:terminal_ansi_colors->len()) + let g:terminal_color_{i} = g:terminal_ansi_colors[i] + endfor + endif + + " For Neovim compatibility + if has('nvim') + " Set Neovim specific terminal colors + let g:terminal_color_0 = '#' . g:terminal_ansi_colors[0] + let g:terminal_color_1 = '#' . g:terminal_ansi_colors[1] + let g:terminal_color_2 = '#' . g:terminal_ansi_colors[2] + let g:terminal_color_3 = '#' . g:terminal_ansi_colors[3] + let g:terminal_color_4 = '#' . g:terminal_ansi_colors[4] + let g:terminal_color_5 = '#' . g:terminal_ansi_colors[5] + let g:terminal_color_6 = '#' . g:terminal_ansi_colors[6] + let g:terminal_color_7 = '#' . g:terminal_ansi_colors[7] + let g:terminal_color_8 = '#' . g:terminal_ansi_colors[8] + let g:terminal_color_9 = '#' . g:terminal_ansi_colors[9] + let g:terminal_color_10 = '#' . g:terminal_ansi_colors[10] + let g:terminal_color_11 = '#' . g:terminal_ansi_colors[11] + let g:terminal_color_12 = '#' . g:terminal_ansi_colors[12] + let g:terminal_color_13 = '#' . g:terminal_ansi_colors[13] + let g:terminal_color_14 = '#' . g:terminal_ansi_colors[14] + let g:terminal_color_15 = '#' . g:terminal_ansi_colors[15] + endif + + " Function to dynamically invert colors for UI elements + function! s:inverse_color(color) + " This function takes a hex color (without #) and returns its inverse + " Convert hex to decimal values + let r = str2nr(a:color[0:1], 16) + let g = str2nr(a:color[2:3], 16) + let b = str2nr(a:color[4:5], 16) + + " Calculate inverse (255 - value) + let r_inv = 255 - r + let g_inv = 255 - g + let b_inv = 255 - b + + " Convert back to hex + return printf('%02x%02x%02x', r_inv, g_inv, b_inv) + endfunction + + " Function to be called for selection background + function! InverseSelectionBg() + if &background == 'dark' + return 'CFCCFF' + else + return '293652' + endif + endfunction + + " Add high-contrast dynamic selection highlighting using the inverse color function + augroup WallbashDynamicHighlight + autocmd! + " Update selection highlight when wallbash colors change + autocmd ColorScheme wallbash call s:update_dynamic_highlights() + augroup END + + function! s:update_dynamic_highlights() + let l:bg_color = synIDattr(synIDtrans(hlID('Normal')), 'bg#') + if l:bg_color != '' + let l:bg_color = l:bg_color[1:] " Remove # from hex color + let l:inverse = s:inverse_color(l:bg_color) + + " Apply inverse color to selection highlights + execute 'highlight! CursorSelection guifg=' . l:bg_color . ' guibg=#' . l:inverse + + " Link dynamic highlights to various selection groups + highlight! link NeoTreeCursorLine CursorSelection + highlight! link TelescopeSelection CursorSelection + highlight! link CmpItemSelected CursorSelection + highlight! link PmenuSel CursorSelection + highlight! link WinSeparator VertSplit + endif + endfunction + + " Make selection visible right away for current colorscheme + call s:update_dynamic_highlights() + + " Conditional highlighting based on background + if &background == 'dark' + " Base UI elements with transparent backgrounds + hi Normal guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi Pmenu guibg=#2D4E5B guifg=#FFFFFF gui=NONE cterm=NONE + hi StatusLine guifg=#FFFFFF guibg=#2D4E5B gui=NONE cterm=NONE + hi StatusLineNC guifg=#FFFFFF guibg=#272E3C gui=NONE cterm=NONE + hi VertSplit guifg=#6965A3 guibg=NONE gui=NONE cterm=NONE + hi LineNr guifg=#6965A3 guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi FoldColumn guifg=#FFFFFF guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background including unfocused state + hi NeoTreeNormal guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeFloatNormal guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeFloatBorder guifg=#6965A3 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeWinSeparator guifg=#272E3C guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background + hi NeoTreeNormal guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeRootName guifg=#CFCCFF guibg=NONE gui=bold cterm=bold + + " TabLine highlighting with complementary accents + hi TabLine guifg=#FFFFFF guibg=#2D4E5B gui=NONE cterm=NONE + hi TabLineFill guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi TabLineSel guifg=#1B1A29 guibg=#CFCCFF gui=bold cterm=bold + hi TabLineSeparator guifg=#6965A3 guibg=#2D4E5B gui=NONE cterm=NONE + + " Interactive elements with dynamic contrast + hi Search guifg=#272E3C guibg=#AFAAF0 gui=NONE cterm=NONE + hi Visual guifg=#272E3C guibg=#9F9AE6 gui=NONE cterm=NONE + hi MatchParen guifg=#272E3C guibg=#CFCCFF gui=bold cterm=bold + + " Menu item hover highlight + hi CmpItemAbbrMatch guifg=#CFCCFF guibg=NONE gui=bold cterm=bold + hi CmpItemAbbrMatchFuzzy guifg=#AFAAF0 guibg=NONE gui=bold cterm=bold + hi CmpItemMenu guifg=#FFFFFF guibg=NONE gui=italic cterm=italic + hi CmpItemAbbr guifg=#FFFFFF guibg=NONE gui=NONE cterm=NONE + hi CmpItemAbbrDeprecated guifg=#FFFFFF guibg=NONE gui=strikethrough cterm=strikethrough + + " Specific menu highlight groups + hi WhichKey guifg=#CFCCFF guibg=NONE gui=NONE cterm=NONE + hi WhichKeySeperator guifg=#FFFFFF guibg=NONE gui=NONE cterm=NONE + hi WhichKeyGroup guifg=#9F9AE6 guibg=NONE gui=NONE cterm=NONE + hi WhichKeyDesc guifg=#AFAAF0 guibg=NONE gui=NONE cterm=NONE + hi WhichKeyFloat guibg=#272E3C guifg=NONE gui=NONE cterm=NONE + + " Selection and hover highlights with inverted colors + hi CursorColumn guifg=NONE guibg=#2D4E5B gui=NONE cterm=NONE + hi Cursor guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi lCursor guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi CursorIM guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi TermCursor guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi TermCursorNC guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + hi CursorLineNr guifg=#CFCCFF guibg=NONE gui=bold cterm=bold + + hi QuickFixLine guifg=#272E3C guibg=#9F9AE6 gui=NONE cterm=NONE + hi IncSearch guifg=#272E3C guibg=#CFCCFF gui=NONE cterm=NONE + hi NormalNC guibg=#272E3C guifg=#FFFFFF gui=NONE cterm=NONE + hi Directory guifg=#AFAAF0 guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=#272E3C guibg=#CFCCFF gui=bold cterm=bold + + " Add highlight groups for focused items with inverted colors + hi CursorLineFold guifg=#CFCCFF guibg=#272E3C gui=NONE cterm=NONE + hi FoldColumn guifg=#FFFFFF guibg=NONE gui=NONE cterm=NONE + hi Folded guifg=#FFFFFF guibg=#2D4E5B gui=italic cterm=italic + + " File explorer specific highlights + hi NeoTreeNormal guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=#FFFFFF gui=NONE cterm=NONE + hi NeoTreeRootName guifg=#CFCCFF guibg=NONE gui=bold cterm=bold + hi NeoTreeFileName guifg=#FFFFFF guibg=NONE gui=NONE cterm=NONE + hi NeoTreeFileIcon guifg=#AFAAF0 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryName guifg=#AFAAF0 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryIcon guifg=#AFAAF0 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitModified guifg=#9F9AE6 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitAdded guifg=#7F7AC2 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitDeleted guifg=#A36567 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitUntracked guifg=#7AAEC2 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeIndentMarker guifg=#5B578F guibg=NONE gui=NONE cterm=NONE + hi NeoTreeSymbolicLinkTarget guifg=#9F9AE6 guibg=NONE gui=NONE cterm=NONE + + " File explorer cursor highlights with strong contrast + " hi NeoTreeCursorLine guibg=#9F9AE6 guifg=#1B1A29 gui=bold cterm=bold + " hi! link NeoTreeCursor NeoTreeCursorLine + " hi! link NeoTreeCursorLineSign NeoTreeCursorLine + + " Use wallbash colors for explorer snack in dark mode + hi WinBar guifg=#FFFFFF guibg=#2D4E5B gui=bold cterm=bold + hi WinBarNC guifg=#FFFFFF guibg=#272E3C gui=NONE cterm=NONE + hi ExplorerSnack guibg=#CFCCFF guifg=#1B1A29 gui=bold cterm=bold + hi BufferTabpageFill guibg=#1B1A29 guifg=#FFFFFF gui=NONE cterm=NONE + hi BufferCurrent guifg=#FFFFFF guibg=#CFCCFF gui=bold cterm=bold + hi BufferCurrentMod guifg=#FFFFFF guibg=#9F9AE6 gui=bold cterm=bold + hi BufferCurrentSign guifg=#CFCCFF guibg=#272E3C gui=NONE cterm=NONE + hi BufferVisible guifg=#FFFFFF guibg=#2D4E5B gui=NONE cterm=NONE + hi BufferVisibleMod guifg=#FFFFFF guibg=#2D4E5B gui=NONE cterm=NONE + hi BufferVisibleSign guifg=#9F9AE6 guibg=#272E3C gui=NONE cterm=NONE + hi BufferInactive guifg=#FFFFFF guibg=#272E3C gui=NONE cterm=NONE + hi BufferInactiveMod guifg=#6965A3 guibg=#272E3C gui=NONE cterm=NONE + hi BufferInactiveSign guifg=#6965A3 guibg=#272E3C gui=NONE cterm=NONE + + " Fix link colors to make them more visible + hi link Hyperlink NONE + hi link markdownLinkText NONE + hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline cterm=underline + hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + + " Add more direct highlights for badges in markdown + hi markdownH1 guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkTextDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold cterm=bold + else + " Light theme with transparent backgrounds + hi Normal guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi Pmenu guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi StatusLine guifg=#FFFFFF guibg=#4B6F7D gui=NONE cterm=NONE + hi StatusLineNC guifg=#1B1A29 guibg=#FFFFFF gui=NONE cterm=NONE + hi VertSplit guifg=#4B6F7D guibg=NONE gui=NONE cterm=NONE + hi LineNr guifg=#4B6F7D guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi FoldColumn guifg=#272E3C guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background including unfocused state + hi NeoTreeNormal guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeFloatNormal guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeFloatBorder guifg=#4B5C7D guibg=NONE gui=NONE cterm=NONE + hi NeoTreeWinSeparator guifg=#FFFFFF guibg=NONE gui=NONE cterm=NONE + + " NeoTree with transparent background + hi NeoTreeNormal guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeRootName guifg=#293652 guibg=NONE gui=bold cterm=bold + + " TabLine highlighting with complementary accents + hi TabLine guifg=#1B1A29 guibg=#FFFFFF gui=NONE cterm=NONE + hi TabLineFill guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi TabLineSel guifg=#FFFFFF guibg=#293652 gui=bold cterm=bold + hi TabLineSeparator guifg=#4B6F7D guibg=#FFFFFF gui=NONE cterm=NONE + + " Interactive elements with complementary contrast + hi Search guifg=#FFFFFF guibg=#3A4A6B gui=NONE cterm=NONE + hi Visual guifg=#FFFFFF guibg=#4B6F7D gui=NONE cterm=NONE + hi MatchParen guifg=#FFFFFF guibg=#293652 gui=bold cterm=bold + + " Menu item hover highlight + hi CmpItemAbbrMatch guifg=#293652 guibg=NONE gui=bold cterm=bold + hi CmpItemAbbrMatchFuzzy guifg=#3A4A6B guibg=NONE gui=bold cterm=bold + hi CmpItemMenu guifg=#272E3C guibg=NONE gui=italic cterm=italic + hi CmpItemAbbr guifg=#1B1A29 guibg=NONE gui=NONE cterm=NONE + hi CmpItemAbbrDeprecated guifg=#2D4E5B guibg=NONE gui=strikethrough cterm=strikethrough + + " Specific menu highlight groups + hi WhichKey guifg=#293652 guibg=NONE gui=NONE cterm=NONE + hi WhichKeySeperator guifg=#2D4E5B guibg=NONE gui=NONE cterm=NONE + hi WhichKeyGroup guifg=#4B5C7D guibg=NONE gui=NONE cterm=NONE + hi WhichKeyDesc guifg=#3A4A6B guibg=NONE gui=NONE cterm=NONE + hi WhichKeyFloat guibg=#FFFFFF guifg=NONE gui=NONE cterm=NONE + + " Selection and hover highlights with inverted colors + hi CursorColumn guifg=NONE guibg=#FFFFFF gui=NONE cterm=NONE + hi Cursor guibg=#1B1A29 guifg=#FFFFFF gui=NONE cterm=NONE + hi lCursor guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi CursorIM guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi TermCursor guibg=#1B1A29 guifg=#FFFFFF gui=NONE cterm=NONE + hi TermCursorNC guibg=#FFFFFF guifg=#1B1A29 gui=NONE cterm=NONE + hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + hi CursorLineNr guifg=#293652 guibg=NONE gui=bold cterm=bold + + hi QuickFixLine guifg=#FFFFFF guibg=#3A4A6B gui=NONE cterm=NONE + hi IncSearch guifg=#FFFFFF guibg=#293652 gui=NONE cterm=NONE + hi NormalNC guibg=#FFFFFF guifg=#272E3C gui=NONE cterm=NONE + hi Directory guifg=#293652 guibg=NONE gui=NONE cterm=NONE + hi WildMenu guifg=#FFFFFF guibg=#293652 gui=bold cterm=bold + + " Add highlight groups for focused items with inverted colors + hi CursorLineFold guifg=#293652 guibg=#FFFFFF gui=NONE cterm=NONE + hi FoldColumn guifg=#272E3C guibg=NONE gui=NONE cterm=NONE + hi Folded guifg=#1B1A29 guibg=#FFFFFF gui=italic cterm=italic + + " File explorer specific highlights + hi NeoTreeNormal guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeEndOfBuffer guibg=NONE guifg=#1B1A29 gui=NONE cterm=NONE + hi NeoTreeRootName guifg=#293652 guibg=NONE gui=bold cterm=bold + hi NeoTreeFileName guifg=#1B1A29 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeFileIcon guifg=#3A4A6B guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryName guifg=#3A4A6B guibg=NONE gui=NONE cterm=NONE + hi NeoTreeDirectoryIcon guifg=#3A4A6B guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitModified guifg=#4B5C7D guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitAdded guifg=#577F8F guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitDeleted guifg=#A36567 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeGitUntracked guifg=#7AAEC2 guibg=NONE gui=NONE cterm=NONE + hi NeoTreeIndentMarker guifg=#576A8F guibg=NONE gui=NONE cterm=NONE + hi NeoTreeSymbolicLinkTarget guifg=#4B5C7D guibg=NONE gui=NONE cterm=NONE + + " File explorer cursor highlights with strong contrast + " hi NeoTreeCursorLine guibg=#3A4A6B guifg=#FFFFFF gui=bold cterm=bold + " hi! link NeoTreeCursor NeoTreeCursorLine + " hi! link NeoTreeCursorLineSign NeoTreeCursorLine + + " Use wallbash colors for explorer snack in light mode + hi WinBar guifg=#1B1A29 guibg=#FFFFFF gui=bold cterm=bold + hi WinBarNC guifg=#272E3C guibg=#FFFFFF gui=NONE cterm=NONE + hi ExplorerSnack guibg=#293652 guifg=#FFFFFF gui=bold cterm=bold + hi BufferTabpageFill guibg=#FFFFFF guifg=#2D4E5B gui=NONE cterm=NONE + hi BufferCurrent guifg=#FFFFFF guibg=#293652 gui=bold cterm=bold + hi BufferCurrentMod guifg=#FFFFFF guibg=#4B5C7D gui=bold cterm=bold + hi BufferCurrentSign guifg=#293652 guibg=#FFFFFF gui=NONE cterm=NONE + hi BufferVisible guifg=#1B1A29 guibg=#FFFFFF gui=NONE cterm=NONE + hi BufferVisibleMod guifg=#272E3C guibg=#FFFFFF gui=NONE cterm=NONE + hi BufferVisibleSign guifg=#4B5C7D guibg=#FFFFFF gui=NONE cterm=NONE + hi BufferInactive guifg=#2D4E5B guibg=#FFFFFF gui=NONE cterm=NONE + hi BufferInactiveMod guifg=#657AA3 guibg=#FFFFFF gui=NONE cterm=NONE + hi BufferInactiveSign guifg=#657AA3 guibg=#FFFFFF gui=NONE cterm=NONE + + " Fix link colors to make them more visible + hi link Hyperlink NONE + hi link markdownLinkText NONE + hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline cterm=underline + hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline + + " Add more direct highlights for badges in markdown + hi markdownH1 guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownLinkTextDelimiter guifg=#FF00FF guibg=NONE gui=bold cterm=bold + hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold cterm=bold + endif + + " UI elements that are the same in both themes with transparent backgrounds + hi NormalFloat guibg=NONE guifg=NONE gui=NONE cterm=NONE + hi FloatBorder guifg=#4B6F7D guibg=NONE gui=NONE cterm=NONE + hi SignColumn guifg=NONE guibg=NONE gui=NONE cterm=NONE + hi DiffAdd guifg=#FFFFFF guibg=#7F7AC2 gui=NONE cterm=NONE + hi DiffChange guifg=#FFFFFF guibg=#6592A3 gui=NONE cterm=NONE + hi DiffDelete guifg=#FFFFFF guibg=#A36567 gui=NONE cterm=NONE + hi TabLineFill guifg=NONE guibg=NONE gui=NONE cterm=NONE + + " Fix selection highlighting with proper color derivatives + hi TelescopeSelection guibg=#CCF1FF guifg=#1B1A29 gui=bold cterm=bold + hi TelescopeSelectionCaret guifg=#FFFFFF guibg=#CCF1FF gui=bold cterm=bold + hi TelescopeMultiSelection guibg=#9AD0E6 guifg=#1B1A29 gui=bold cterm=bold + hi TelescopeMatching guifg=#C27A7C guibg=NONE gui=bold cterm=bold + + " Minimal fix for explorer selection highlighting + hi NeoTreeCursorLine guibg=#CCF1FF guifg=#1B1A29 gui=bold + + " Fix for LazyVim menu selection highlighting + hi Visual guibg=#FFCCCD guifg=#1B1A29 gui=bold + hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + hi PmenuSel guibg=#FFCCCD guifg=#1B1A29 gui=bold + hi WildMenu guibg=#FFCCCD guifg=#1B1A29 gui=bold + + " Create improved autocommands to ensure highlighting persists with NeoTree focus fixes + augroup WallbashSelectionFix + autocmd! + " Force these persistent highlights with transparent backgrounds where possible + autocmd ColorScheme * if &background == 'dark' | + \ hi Normal guibg=NONE | + \ hi NeoTreeNormal guibg=NONE | + \ hi SignColumn guibg=NONE | + \ hi NormalFloat guibg=NONE | + \ hi FloatBorder guibg=NONE | + \ hi TabLineFill guibg=NONE | + \ else | + \ hi Normal guibg=NONE | + \ hi NeoTreeNormal guibg=NONE | + \ hi SignColumn guibg=NONE | + \ hi NormalFloat guibg=NONE | + \ hi FloatBorder guibg=NONE | + \ hi TabLineFill guibg=NONE | + \ endif + + " Force NeoTree background to be transparent even when unfocused + autocmd WinEnter,WinLeave,BufEnter,BufLeave * if &ft == 'neo-tree' || &ft == 'NvimTree' | + \ hi NeoTreeNormal guibg=NONE | + \ hi NeoTreeEndOfBuffer guibg=NONE | + \ endif + + " Fix NeoTree unfocus issue specifically in LazyVim + autocmd VimEnter,ColorScheme * hi link NeoTreeNormalNC NeoTreeNormal + + " Make CursorLine less obtrusive by using underline instead of background + autocmd ColorScheme * hi CursorLine guibg=NONE ctermbg=NONE gui=underline cterm=underline + + " Make links visible across modes + autocmd ColorScheme * if &background == 'dark' | + \ hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline | + \ hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold | + \ else | + \ hi Underlined guifg=#FF00FF guibg=NONE gui=bold,underline cterm=bold,underline | + \ hi Special guifg=#FF00FF guibg=NONE gui=bold cterm=bold | + \ endif + + " Fix markdown links specifically + autocmd FileType markdown hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline,bold + autocmd FileType markdown hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline + augroup END + + " Create a more aggressive fix for NeoTree background in LazyVim + augroup FixNeoTreeBackground + autocmd! + " Force NONE background for NeoTree at various points to override tokyonight fallback + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NeoTreeNormal guibg=NONE guifg=#FFFFFF ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NeoTreeNormalNC guibg=NONE guifg=#FFFFFF ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NeoTreeEndOfBuffer guibg=NONE guifg=#FFFFFF ctermbg=NONE + + " Also fix NvimTree for NvChad + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NvimTreeNormal guibg=NONE guifg=#FFFFFF ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NvimTreeNormalNC guibg=NONE guifg=#FFFFFF ctermbg=NONE + autocmd ColorScheme,VimEnter,WinEnter,BufEnter * hi NvimTreeEndOfBuffer guibg=NONE guifg=#FFFFFF ctermbg=NONE + + " Apply highlight based on current theme + autocmd ColorScheme,VimEnter * if &background == 'dark' | + \ hi NeoTreeCursorLine guibg=#CCF1FF guifg=#1B1A29 gui=bold cterm=bold | + \ hi NvimTreeCursorLine guibg=#CCF1FF guifg=#1B1A29 gui=bold cterm=bold | + \ else | + \ hi NeoTreeCursorLine guibg=#293652 guifg=#FFFFFF gui=bold cterm=bold | + \ hi NvimTreeCursorLine guibg=#293652 guifg=#FFFFFF gui=bold cterm=bold | + \ endif + + " Force execution after other plugins have loaded + autocmd VimEnter * doautocmd ColorScheme + augroup END + + " Add custom autocommand specifically for LazyVim markdown links + augroup LazyVimMarkdownFix + autocmd! + " Force link visibility in LazyVim with stronger override + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownUrl MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownLinkText MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownLink MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! def link markdownLinkDelimiter MagentaLink + autocmd FileType markdown,markdown.mdx,markdown.gfm hi! MagentaLink guifg=#FF00FF gui=bold,underline + + " Apply when LazyVim is detected + autocmd User LazyVimStarted doautocmd FileType markdown + autocmd VimEnter * if exists('g:loaded_lazy') | doautocmd FileType markdown | endif + augroup END + + " Add custom autocommand specifically for markdown files with links + augroup MarkdownLinkFix + autocmd! + " Use bright hardcoded magenta that will definitely be visible + autocmd FileType markdown hi markdownUrl guifg=#FF00FF guibg=NONE gui=underline,bold + autocmd FileType markdown hi markdownLinkText guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi markdownIdDeclaration guifg=#FF00FF guibg=NONE gui=bold + autocmd FileType markdown hi htmlLink guifg=#FF00FF guibg=NONE gui=bold,underline + + " Force these highlights right after vim loads + autocmd VimEnter * if &ft == 'markdown' | doautocmd FileType markdown | endif + augroup END + + " Remove possibly conflicting previous autocommands + augroup LazyVimFix + autocmd! + augroup END + + augroup MinimalExplorerFix + autocmd! + augroup END + \ No newline at end of file diff --git a/Configs/.config/vim/hyde.vim b/Configs/.config/vim/hyde.vim new file mode 100644 index 000000000..1bf904ffe --- /dev/null +++ b/Configs/.config/vim/hyde.vim @@ -0,0 +1,29 @@ +" ! This is HyDE Vim configuration file. Do not edit this file directly. +" ! Instead, edit the user configuration file at ' ~/.config/vim/vimrc '. +" ! This file might be overwritten on updates. + +let mapleader = " " + +syntax on "parser + +filetype plugin indent on + +set number +set relativenumber + +" nvim defaults +set tabstop=4 +set shiftwidth=4 +set expandtab + +set hlsearch "hilight search, :nohl to remove + +set t_Co=256 "terminal colors + +set wildmenu " auto completion, trigger with + + +let s:VIM_DIR = fnamemodify($MYVIMRC, ':h') +if filereadable(s:VIM_DIR . '/colors/wallbash.vim') + colorscheme wallbash +endif \ No newline at end of file diff --git a/Configs/.config/vim/vimrc b/Configs/.config/vim/vimrc new file mode 100644 index 000000000..26533328d --- /dev/null +++ b/Configs/.config/vim/vimrc @@ -0,0 +1,12 @@ +" Load the hyde config +let s:VIM_DIR = fnamemodify($MYVIMRC, ':h') +execute 'source ' . s:VIM_DIR . '/hyde.vim' + +" Adding your custom colorschem +"colorscheme zaibatsu "the only nice built-in colorscheme + +" remaps +"inoremap +"nnoremap ff :w +"nnoremap ; : +"vnoremap ; : diff --git a/Configs/.local/bin/hyde-ipc b/Configs/.local/bin/hyde-ipc new file mode 100755 index 000000000..135cf5891 Binary files /dev/null and b/Configs/.local/bin/hyde-ipc differ diff --git a/Configs/.local/bin/hyde-shell b/Configs/.local/bin/hyde-shell index bbb104224..bdce5ef9d 100755 --- a/Configs/.local/bin/hyde-shell +++ b/Configs/.local/bin/hyde-shell @@ -9,8 +9,8 @@ else fi BIN_DIR=$(dirname "$(which "${EXECUTABLE:-hyde-shell}")") -LIB_DIR="${BIN_DIR}/../lib" -SHARE_DIR="${BIN_DIR}/../share" +LIB_DIR=$(realpath "${BIN_DIR}/../lib") +SHARE_DIR=$(realpath "${BIN_DIR}/../share") PATH="$BIN_DIR:$LIB_DIR/hyde:$PATH" #! I added this to the PATH to make sure that the hyde commands are available in the shell export BIN_DIR LIB_DIR SHARE_DIR diff --git a/Configs/.local/bin/hydectl b/Configs/.local/bin/hydectl new file mode 100755 index 000000000..f6afc979c Binary files /dev/null and b/Configs/.local/bin/hydectl differ diff --git a/Configs/.local/lib/hyde/animations.sh b/Configs/.local/lib/hyde/animations.sh index cf9271b3b..d71f4c87e 100755 --- a/Configs/.local/lib/hyde/animations.sh +++ b/Configs/.local/lib/hyde/animations.sh @@ -9,7 +9,7 @@ if ! source "$(which hyde-shell)"; then fi # Set variables -confDir="${confDir:-$XDG_CONFIG_HOME}" +confDir="${XDG_CONFIG_HOME:-$HOME/.config}" animations_dir="$confDir/hypr/animations" # Ensure the animations directory exists @@ -18,15 +18,47 @@ if [ ! -d "$animations_dir" ]; then exit 1 fi -# List available .conf files in animations directory -animation_items=$(find "$animations_dir" -name "*.conf" ! -name "disable.conf" ! -name "theme.conf" 2>/dev/null | sed 's/\.conf$//') +# Show help function +show_help() { + cat </dev/null | sed 's/\.conf$//') + + if [ -z "$animation_items" ]; then + notify-send -i "preferences-desktop-display" "Error" "No .conf files found in $animations_dir" + exit 1 + fi # Set rofi scaling font_scale="${ROFI_ANIMATION_SCALE}" @@ -96,22 +128,34 @@ fn_update() { # See https://wiki.hyprland.org/Configuring/Animations/ # HyDE Controlled content // DO NOT EDIT # Edit or add animations in the ./hypr/animations/ directory -# and run the 'animations.sh select' command to update this file +# and run the 'animations.sh --select' command to update this file \$ANIMATION=${current_animation} -\$ANIMATION_PATH=${animDir}/${current_animation}.conf - +\$ANIMATION_PATH=./animations/${current_animation}.conf +source = \$ANIMATION_PATH EOF # cat "${animDir}/${current_animation}.conf" >>"${confDir}/hypr/animations.conf" } -if declare -f "fn_${1}" >/dev/null; then - "fn_${1}" -else - cat </dev/null 2>&1; then + source "$(command -v hyde-shell)" || true + fi + + setup_rofi_config + + if [[ -v customRoFile ]]; then + rofi -show calc -modi calc -no-show-match -no-sort -config "${customRoFile}" + else + rofi -show calc -modi calc -no-show-match -no-sort -theme-str "${fnt_override}" -theme-str "${r_override}" -config "${roFile:-clipboard}" + fi +} + +usage() { + cat < Set custom .rasi file. Note that this removes all overrides + +EOF + exit 1 +} + +while (($# > 0)); do + case $1 in + --rasi) + [[ -z ${2} ]] && echo "[error] --rasi requires a file.rasi config file" && exit 1 + customRoFile=${2} + shift + ;; + *) + echo "Unknown option: $1" + usage + ;; + esac + shift +done + +main "$@" diff --git a/Configs/.local/lib/hyde/color.set.sh b/Configs/.local/lib/hyde/color.set.sh new file mode 100755 index 000000000..340660780 --- /dev/null +++ b/Configs/.local/lib/hyde/color.set.sh @@ -0,0 +1,303 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2154 + +# Function to create wallbash substitutions +create_wallbash_substitutions() { + local use_inverted=$1 + local sed_script + sed_script="s||$(${use_inverted} && printf "%s" "${dcol_invt:-light}" || printf "%s" "${dcol_mode:-dark}")|g;" + + # Add substitutions for all color variables + for i in {1..4}; do + # Determine if colors should be reversed + if ${use_inverted}; then + rev_i=$((5 - i)) + src_i=$rev_i + else + src_i=$i + fi + + # Get values directly using indirect reference + local pry_var="dcol_pry${src_i}" + local txt_var="dcol_txt${src_i}" + + # Add RGBA variables + local pry_rgba_var="dcol_pry${src_i}_rgba" + local txt_rgba_var="dcol_txt${src_i}_rgba" + + # Add RGB variables by converting from RGBA if they exist + local pry_rgb_var="dcol_pry${src_i}_rgb" + local txt_rgb_var="dcol_txt${src_i}_rgb" + + # If RGB vars don't exist but RGBA does, create RGB from RGBA + if [[ -n "${!pry_rgba_var:-}" && -z "${!pry_rgb_var:-}" ]]; then + # Convert RGBA to RGB and export as new variable + declare -g "${pry_rgb_var}=$(sed -E 's/rgba\(([0-9]+,[0-9]+,[0-9]+),.*/\1/' <<<"${!pry_rgba_var}")" + export "${pry_rgb_var?}" + fi + + if [[ -n "${!txt_rgba_var:-}" && -z "${!txt_rgb_var:-}" ]]; then + # Convert RGBA to RGB and export as new variable + declare -g "${txt_rgb_var}=$(sed -E 's/rgba\(([0-9]+,[0-9]+,[0-9]+),.*/\1/' <<<"${!txt_rgba_var}")" + export "${txt_rgb_var?}" + fi + + # Add to sed script if variables exist + [ -n "${!pry_var:-}" ] && sed_script+="s||${!pry_var}|g;" + [ -n "${!txt_var:-}" ] && sed_script+="s||${!txt_var}|g;" + [ -n "${!pry_rgba_var:-}" ] && sed_script+="s||${!pry_rgba_var}|g;" + [ -n "${!txt_rgba_var:-}" ] && sed_script+="s||${!txt_rgba_var}|g;" + [ -n "${!pry_rgb_var:-}" ] && sed_script+="s||${!pry_rgb_var}|g;" + [ -n "${!txt_rgb_var:-}" ] && sed_script+="s||${!txt_rgb_var}|g;" + + # Add xa colors with direct variable expansion + for j in {1..9}; do + local xa_var="dcol_${src_i}xa${j}" + local xa_rgba_var="dcol_${src_i}xa${j}_rgba" + local xa_rgb_var="dcol_${src_i}xa${j}_rgb" + + # Create RGB from RGBA if needed + if [[ -n "${!xa_rgba_var:-}" && -z "${!xa_rgb_var:-}" ]]; then + declare -g "${xa_rgb_var}=$(sed -E 's/rgba\(([0-9]+,[0-9]+,[0-9]+),.*/\1/' <<<"${!xa_rgba_var}")" + export "${xa_rgb_var?}" + fi + + [ -n "${!xa_var:-}" ] && sed_script+="s||${!xa_var}|g;" + [ -n "${!xa_rgba_var:-}" ] && sed_script+="s||${!xa_rgba_var}|g;" + [ -n "${!xa_rgb_var:-}" ] && sed_script+="s||${!xa_rgb_var}|g;" + done + done + + # Add home directory substitution + sed_script+="s|<>|${HOME}|g" + + printf "%s" "$sed_script" +} + +# Preprocess sed scripts for both normal and inverted modes +preprocess_substitutions() { + NORMAL_SED_SCRIPT=$(create_wallbash_substitutions false) + INVERTED_SED_SCRIPT=$(create_wallbash_substitutions true) + export NORMAL_SED_SCRIPT INVERTED_SED_SCRIPT +} + +fn_wallbash() { + local template="${1}" + local temp_target_file exec_command + WALLBASH_SCRIPTS="${template%%hyde/wallbash*}hyde/wallbash/scripts" + if [[ "${template}" == *.theme ]]; then + # This is approach is to handle the theme files + # We don't want themes to launch the exec_command or any arbitrary codes + # To enable this we should have a *.dcol file as a companion to the theme file + IFS=':' read -r -a wallbashDirs <<<"$WALLBASH_DIRS" + template_name="${template##*/}" + template_name="${template_name%.*}" + # echo "${wallbashDirs[@]}" + dcolTemplate=$(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "${template_name}.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') + if [[ -n "${dcolTemplate}" ]]; then + eval target_file="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $1}')" + exec_command="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $2}')" + WALLBASH_SCRIPTS="${dcolTemplate%%hyde/wallbash*}hyde/wallbash/scripts" + + fi + fi + + # shellcheck disable=SC1091 + # shellcheck disable=SC2154 + [ -f "$HYDE_STATE_HOME/state" ] && source "$HYDE_STATE_HOME/state" + # shellcheck disable=SC1091 + [ -f "$HYDE_STATE_HOME/config" ] && source "$HYDE_STATE_HOME/config" + if [[ -n "${WALLBASH_SKIP_TEMPLATE[*]}" ]]; then + for skip in "${WALLBASH_SKIP_TEMPLATE[@]}"; do + if [[ "${template}" =~ ${skip} ]]; then + print_log -sec "wallbash" -warn "skip '$skip' template " "Template: ${template}" + return 0 + fi + done + fi + + [ -z "${target_file}" ] && eval target_file="$(head -1 "${template}" | awk -F '|' '{print $1}')" + [ ! -d "$(dirname "${target_file}")" ] && print_log -sec "wallbash" -warn "skip 'missing directory'" "${target_file} // Do you have the dependency installed?" && return 0 + export wallbashScripts="${WALLBASH_SCRIPTS}" + export WALLBASH_SCRIPTS confDir hydeConfDir cacheDir thmbDir dcolDir iconsDir themesDir fontsDir wallbashDirs enableWallDcol HYDE_THEME_DIR HYDE_THEME GTK_ICON GTK_THEME CURSOR_THEME + export -f pkg_installed print_log + exec_command="${exec_command:-"$(head -1 "${template}" | awk -F '|' '{print $2}')"}" + temp_target_file="$(mktemp)" + sed '1d' "${template}" >"${temp_target_file}" + + # Check if we need inverted colors + if [[ "${revert_colors:-0}" -eq 1 ]] || + [[ "${enableWallDcol:-0}" -eq 2 && "${dcol_mode:-}" == "light" ]] || + [[ "${enableWallDcol:-0}" -eq 3 && "${dcol_mode:-}" == "dark" ]]; then + # Use the preprocessed inverted sed script + sed -i "${INVERTED_SED_SCRIPT}" "${temp_target_file}" + else + # Use the preprocessed normal sed script + sed -i "${NORMAL_SED_SCRIPT}" "${temp_target_file}" + fi + + if [ -s "${temp_target_file}" ]; then + mv "${temp_target_file}" "${target_file}" + fi + [ -z "${exec_command}" ] || { + bash -c "${exec_command}" & + disown + } +} + +scrDir="$(dirname "$(realpath "$0")")" +export scrDir +# shellcheck disable=SC1091 +source "${scrDir}/globalcontrol.sh" +confDir="${XDG_CONFIG_HOME:-$(xdg-user-dir CONFIG)}" +wallbash_image="${1}" + +# Parse arguments +dcol_colors="" +while [[ $# -gt 0 ]]; do + case "$1" in + --dcol) + dcol_colors="$2" + if [ -f "${dcol_colors}" ]; then + printf "[Source] %s\n" "${dcol_colors}" + # shellcheck disable=SC1090 + source "${dcol_colors}" + shift 2 + else + dcol_colors="$(find "${dcolDir}" -type f -name "*.dcol" | shuf -n 1)" + printf "[Dcol Colors] %s\n" "${dcol_colors}" + shift + fi + ;; + --wall) + wallbash_image="$2" + shift 2 + ;; + --single) + [ -f "${wallbash_image}" ] || wallbash_image="${cacheDir}/wall.set" + single_template="$2" + printf "[wallbash] Single template: %s\n" "${single_template}" + printf "[wallbash] Wallpaper: %s\n" "${wallbash_image}" + shift 2 + # ;; + # --mode) + # enableWallDcol="$2" + # shift 2 + ;; + -*) + printf "Usage: %s [--dcol ] [--wall ] [--single] [--mode ] [--help]\n" "$0" + exit 0 + ;; + *) break ;; + esac +done + +#// validate input + +if [ -z "${wallbash_image}" ] || [ ! -f "${wallbash_image}" ]; then + printf "Error: Input wallpaper not found!\n" + exit 1 +fi +# shellcheck disable=SC2154 +dcol_file="${dcolDir}/$(set_hash "${wallbash_image}").dcol" + +if [ ! -f "${dcol_file}" ]; then + "${scrDir}/swwwallcache.sh" -w "${wallbash_image}" &>/dev/null +fi + +set -a +# shellcheck disable=SC1090 +source "${dcol_file}" +# shellcheck disable=SC2154 +if [ -f "${HYDE_THEME_DIR}/theme.dcol" ] && [ "${enableWallDcol}" -eq 0 ]; then + # shellcheck disable=SC1091 + source "${HYDE_THEME_DIR}/theme.dcol" + print_log -sec "wallbash" -stat "override" "dominant colors from ${HYDE_THEME} theme" + print_log -sec "wallbash" -stat " NOTE" "Remove \"${HYDE_THEME_DIR}/theme.dcol\" to use wallpaper dominant colors" +fi + +# shellcheck disable=SC2154 +[ "${dcol_mode}" == "dark" ] && dcol_invt="light" || dcol_invt="dark" +set +a + +if [ -z "$GTK_THEME" ]; then + if [ "${enableWallDcol}" -eq 0 ]; then + GTK_THEME="$(get_hyprConf "GTK_THEME")" + else + GTK_THEME="Wallbash-Gtk" + fi +fi +[ -z "$GTK_ICON" ] && GTK_ICON="$(get_hyprConf "ICON_THEME")" +[ -z "$CURSOR_THEME" ] && CURSOR_THEME="$(get_hyprConf "CURSOR_THEME")" +export GTK_THEME GTK_ICON CURSOR_THEME + +# Preprocess substitutions once before processing any templates +preprocess_substitutions +print_log -sec "wallbash" -stat "preprocessed" "color substitutions" + +#// deploy wallbash colors + +WALLBASH_DIRS="" +for dir in "${wallbashDirs[@]}"; do + [ -d "${dir}" ] || wallbashDirs=("${wallbashDirs[@]//$dir/}") + [ -d "$dir" ] && WALLBASH_DIRS+="$dir:" +done +WALLBASH_DIRS="${WALLBASH_DIRS%:}" + +if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then PATH="$HOME/.local/bin:${PATH}"; fi +export WALLBASH_DIRS PATH +export -f fn_wallbash print_log pkg_installed create_wallbash_substitutions preprocess_substitutions + +if [ -n "${dcol_colors}" ]; then + set -a + # shellcheck disable=SC1090 + source "${dcol_colors}" + print_log -sec "wallbash" -stat "single instance" "Wallbash Colors: ${dcol_colors}" + set +a +fi + +# Single template mode +if [ -n "${single_template}" ]; then + fn_wallbash "${single_template}" + exit 0 +fi + +# Print to terminal the colors +[ -t 1 ] && "${scrDir}/wallbash.print.colors.sh" + +# Add some hooks here +toml_write "${confDir}/kdeglobals" "Colors:View" "BackgroundNormal" "#${dcol_pry1:-000000}" + +#// switch theme wall based colors + +[[ -n $HYPRLAND_INSTANCE_SIGNATURE ]] && { + hyprctl keyword misc:disable_autoreload 1 -q + trap "hyprctl reload config-only -q" EXIT +} +# shellcheck disable=SC2154 +if [ "${enableWallDcol}" -eq 0 ] && [[ "${reload_flag}" -eq 1 ]]; then + + print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "${HYDE_THEME} theme" + mapfile -d '' -t deployList < <(find "${HYDE_THEME_DIR}" -type f -name "*.theme" -print0) + + while read -r pKey; do + fKey="$(find "${HYDE_THEME_DIR}" -type f -name "$(basename "${pKey%.dcol}.theme")")" + [ -z "${fKey}" ] && deployList+=("${pKey}") + done < <(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') + + # Process templates in parallel + parallel fn_wallbash ::: "${deployList[@]}" || true + +elif [ "${enableWallDcol}" -gt 0 ]; then + print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "Wallbash theme" + # This is the reason we avoid SPACES for the wallbash template names + find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true +fi + +# Theme mode: detects the color-scheme set in hypr.theme and falls back if nothing is parsed. +revert_colors=0 +[ "${enableWallDcol}" -eq 0 ] && { grep -q "${dcol_mode}" <<<"$(get_hyprConf "COLOR_SCHEME")" || revert_colors=1; } +export revert_colors + +# Process "always" templates in parallel +find "${wallbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | sort | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} || true diff --git a/Configs/.local/lib/hyde/fastfetch.sh b/Configs/.local/lib/hyde/fastfetch.sh index 0efb7a481..e38f54f6f 100755 --- a/Configs/.local/lib/hyde/fastfetch.sh +++ b/Configs/.local/lib/hyde/fastfetch.sh @@ -32,7 +32,7 @@ iconDir="${XDG_DATA_HOME:-$HOME/.local/share}/icons" image_dirs=() hyde_distro_logo=${iconDir}/Wallbash-Icon/distro/$LOGO -# Parse the main command +# Parse the main command case $1 in logo) # eats around 13 ms random() { @@ -42,10 +42,17 @@ logo) # eats around 13 ms if [ -n "${HYDE_THEME}" ] && [ -d "${confDir}/hyde/themes/${HYDE_THEME}/logo" ]; then image_dirs+=("${confDir}/hyde/themes/${HYDE_THEME}/logo") fi - [ -d "$HYDE_CACHE_HOME" ] && image_dirs+=("$HYDE_CACHE_HOME") + # [ -d "$HYDE_CACHE_HOME" ] && image_dirs+=("$HYDE_CACHE_HOME") [ -f "$hyde_distro_logo" ] && echo "${hyde_distro_logo}" - [ -f "$HOME/.face.icon" ] && echo "$HOME/.face.icon" - + image_dirs+=("$HYDE_CACHE_HOME/wall.quad") + image_dirs+=("$HYDE_CACHE_HOME/wall.sqre") + [ -f "$HOME/.face.icon" ] && image_dirs+=("$HOME/.face.icon") + [ -f "$hyde_distro_logo" ] && image_dirs+=("$hyde_distro_logo") + image_dirs+=("${confDir}/fastfetch/logo") + image_dirs+=("${iconDir}/Wallbash-Icon/fastfetch/") + if [ -n "${HYDE_THEME}" ] && [ -d "${confDir}/hyde/themes/${HYDE_THEME}/logo" ]; then + image_dirs+=("${confDir}/hyde/themes/${HYDE_THEME}/logo") + fi find -L "${image_dirs[@]}" -maxdepth 1 -type f \( -name "wall.quad" -o -name "wall.sqre" -o -name "*.icon" -o -name "*logo*" -o -name "*.png" \) ! -path "*/wall.set*" ! -path "*/wallpapers/*.png" 2>/dev/null ) | shuf -n 1 } @@ -76,19 +83,20 @@ HELP [[ "$1" = "--rand" ]] && random && exit [[ "$1" = *"help"* ]] && help && exit ( + image_dirs=() for arg in "$@"; do case $arg in --quad) - echo "$HYDE_CACHE_HOME/wall.quad" + image_dirs+=("$HYDE_CACHE_HOME/wall.quad") ;; --sqre) - echo "$HYDE_CACHE_HOME/wall.sqre" + image_dirs+=("$HYDE_CACHE_HOME/wall.sqre") ;; --prof) - [ -f "$HOME/.face.icon" ] && echo "$HOME/.face.icon" + [ -f "$HOME/.face.icon" ] && image_dirs+=("$HOME/.face.icon") ;; --os) - echo "$hyde_distro_logo" + [ -f "$hyde_distro_logo" ] && image_dirs+=("$hyde_distro_logo") ;; --local) image_dirs+=("${confDir}/fastfetch/logo") @@ -103,8 +111,8 @@ HELP ;; esac done - find -L "${image_dirs[@]}" -maxdepth 1 -type f \( -name "wall.quad" -o -name "wall.sqre" -o -name "*.icon" -o -name "*logo*" -o -name "*.png" \) ! -path "*/wall.set*" ! -path "*/wallpapers/*.png" 2>/dev/null - ) | shuf -n 1 + find -L "${image_dirs[@]}" -maxdepth 1 -type f \( -name "wall.quad" -o -name "wall.sqre" -o -name "*.icon" -o -name "*logo*" -o -name "*.png" \) ! -path "*/wall.set*" ! -path "*/wallpapers/*.png" 2>/dev/null + ) | shuf -n 1 ;; --select | -S) diff --git a/Configs/.local/lib/hyde/font.sh b/Configs/.local/lib/hyde/font.sh index ab18115a0..f2db59718 100755 --- a/Configs/.local/lib/hyde/font.sh +++ b/Configs/.local/lib/hyde/font.sh @@ -55,7 +55,7 @@ download_and_extract() { mkdir -p "${font_dir}/hyde" mv "$file" "${font_dir}/hyde/$name.ttf" echo "[font] $name installed successfully. Please restart hyprlock to apply changes." - notify-send -i "preferences-desktop-font" "HyDE font" "${name} Intalled successfully" + notify-send -i "preferences-desktop-font" "HyDE font" "${name} Installed successfully" return 0 ;; *) @@ -70,7 +70,7 @@ download_and_extract() { notify-send -i "preferences-desktop-font" "HyDE font" "Failed to extract $file" return 1 fi - notify-send -i "preferences-desktop-font" "HyDE font" "${name} Intalled successfully" + notify-send -i "preferences-desktop-font" "HyDE font" "${name} Installed successfully" done rm -rf "$temp_dir" @@ -79,9 +79,15 @@ download_and_extract() { } resolve() { - local layout="${1}" + local layout_path="${1}" + layout_path="$(printf "%s" "${layout_path}")" + layout_path="$(realpath "${layout_path}")" + if [[ ! -f "${layout_path}" ]]; then + echo "[font] Layout file not found: ${layout_path}" + return 1 + fi # shellcheck disable=SC2016 - grep -Eo '^\s*\$resolve\.font\s*=\s*[^|]+\s*\|\s*[^ ]+' "${layout}" | while IFS='=' read -r _ font; do + grep -Eo '^\s*\$resolve\.font\s*=\s*[^|]+\s*\|\s*[^ ]+' "${layout_path}" | while IFS='=' read -r _ font; do name=$(echo "$font" | awk -F'|' '{print $1}' | xargs) url=$(echo "$font" | awk -F'|' '{print $2}' | xargs) if ! fc-list | grep -q "${name}"; then diff --git a/Configs/.local/lib/hyde/gamelauncher.sh b/Configs/.local/lib/hyde/gamelauncher.sh index f72158788..c67a4b3d2 100755 --- a/Configs/.local/lib/hyde/gamelauncher.sh +++ b/Configs/.local/lib/hyde/gamelauncher.sh @@ -4,12 +4,12 @@ MODE=${1} scrDir=$(dirname "$(realpath "$0")") source $scrDir/globalcontrol.sh -ThemeSet="${confDir}/hypr/themes/theme.conf" +# ThemeSet="${confDir}/hypr/themes/theme.conf" if [[ "$MODE" =~ ^[0-9]+$ ]]; then - RofiConf="gamelauncher_${MODE}" + RofiConf="gamelauncher_${MODE}" else - RofiConf="${MODE:-$ROFI_GAMELAUNCHER_STYLE}" + RofiConf="${MODE:-$ROFI_GAMELAUNCHER_STYLE}" fi RofiConf=${RofiConf:-"gamelauncher_5"} @@ -19,69 +19,71 @@ icon_border=$((elem_border - 3)) r_override="element{border-radius:${elem_border}px;} element-icon{border-radius:${icon_border}px;}" fn_steam() { - # check steam mount paths - SteamPaths=$(grep '"path"' $SteamLib | awk -F '"' '{print $4}') - ManifestList=$(find $SteamPaths/steamapps/ -type f -name "appmanifest_*.acf" 2>/dev/null) - - # read installed games - GameList=$(echo "$ManifestList" | while read acf; do - appid=$(grep '"appid"' $acf | cut -d '"' -f 4) - if [ -f ${SteamThumb}/${appid}_library_600x900.jpg ]; then - game=$(grep '"name"' $acf | cut -d '"' -f 4) - echo "$game|$appid" - else - continue - fi - done | sort) - - # launch rofi menu - RofiSel=$(echo "$GameList" | while read acf; do - appid=$(echo $acf | cut -d '|' -f 2) - game=$(echo $acf | cut -d '|' -f 1) - echo -en "$game\x00icon\x1f${SteamThumb}/${appid}_library_600x900.jpg\n" - done | rofi -dmenu \ - -theme-str "${r_override}" \ - -config $RofiConf) - - # launch game - if [ ! -z "$RofiSel" ]; then - launchid=$(echo "$GameList" | grep "$RofiSel" | cut -d '|' -f 2) - ${steamlaunch} -applaunch "${launchid} [gamemoderun %command%]" & - # dunstify "HyDE Alert" -a "Launching ${RofiSel}..." -i ${SteamThumb}/${launchid}_header.jpg -r 91190 -t 2200 - notify-send -a "HyDE Alert" -i "${SteamThumb}/${launchid}_header.jpg" "Launching ${RofiSel}..." - + # check steam mount paths + SteamPaths=$(grep '"path"' $SteamLib | awk -F '"' '{print $4}') + ManifestList=$(find "${SteamPaths}/steamapps/" -type f -name "appmanifest_*.acf" 2>/dev/null) + # read installed games + GameList=$(echo "$ManifestList" | while read acf; do + appid=$(grep '"appid"' $acf | cut -d '"' -f 4) + if [ -f ${SteamThumb}/${appid}/library_600x900.jpg ]; then + game=$(grep '"name"' $acf | cut -d '"' -f 4) + echo "$game|$appid" + else + continue fi + done | sort) + + # launch rofi menu + RofiSel=$( + echo "$GameList" | while read acf; do + appid=$(echo "${acf}" | cut -d '|' -f 2) + game=$(echo "${acf}" | cut -d '|' -f 1) + printf "%s\x00icon\x1f${SteamThumb}/${appid}/library_600x900.jpg\n" "${game}" >&2 + printf "%s\x00icon\x1f${SteamThumb}/${appid}/library_600x900.jpg\n" "${game}" + done | rofi -dmenu \ + -theme-str "${r_override}" \ + -config $RofiConf + ) + + # launch game + if [ -n "$RofiSel" ]; then + launchid=$(echo "$GameList" | grep "$RofiSel" | cut -d '|' -f 2) + ${steamlaunch} -applaunch "${launchid} [gamemoderun %command%]" & + # dunstify "HyDE Alert" -a "Launching ${RofiSel}..." -i ${SteamThumb}/${launchid}_header.jpg -r 91190 -t 2200 + notify-send -a "HyDE Alert" -i "${SteamThumb}/${launchid}_header.jpg" "Launching ${RofiSel}..." + + fi } fn_lutris() { - [ ! -e "${icon_path}" ] && icon_path="${HOME}/.local/share/lutris/coverart" - [ ! -e "${icon_path}" ] && icon_path="${HOME}/.cache/lutris/coverart" - meta_data="/tmp/hyprdots-$(id -u)-lutrisgames.json" + [ ! -e "${icon_path}" ] && icon_path="${HOME}/.local/share/lutris/coverart" + [ ! -e "${icon_path}" ] && icon_path="${HOME}/.cache/lutris/coverart" + meta_data="/tmp/hyprdots-$(id -u)-lutrisgames.json" - # Retrieve the list of games from Lutris in JSON format - #TODO Only call this if new apps are installed... - # [ ! -s "${meta_data}" ] && - notify-send -a "HyDE Alert" "Please wait... " -t 4000 + # Retrieve the list of games from Lutris in JSON format + #TODO Only call this if new apps are installed... + # [ ! -s "${meta_data}" ] && + notify-send -a "HyDE Alert" "Please wait... " -t 4000 - cat </dev/null | jq --arg icons "$icon_path/" --arg prefix ".jpg" '.[] |= . + {"select": (.name + "\u0000icon\u001f" + $icons + .slug + $prefix)}' >"${meta_data}" - - [ ! -s "${meta_data}" ] && notify-send -a "HyDE Alert" "Cannot Fetch Lutris Games!" && exit 1 - CHOICE=$( - jq -r '.[].select' "${meta_data}" | rofi -dmenu -p Lutris \ - -theme-str "${r_override}" \ - -config "${RofiConf}" - ) - [ -z "$CHOICE" ] && exit 0 - SLUG=$(jq -r --arg choice "$CHOICE" '.[] | select(.name == $choice).slug' "${meta_data}") - notify-send -a "HyDE Alert" -i "${icon_path}/${SLUG}.jpg" "Launching ${CHOICE}..." - exec xdg-open "lutris:rungame/${SLUG}" + eval "${run_lutris}" -j -l 2>/dev/null | jq --arg icons "$icon_path/" --arg prefix ".jpg" '.[] |= . + {"select": (.name + "\u0000icon\u001f" + $icons + .slug + $prefix)}' >"${meta_data}" + + [ ! -s "${meta_data}" ] && notify-send -a "HyDE Alert" "Cannot Fetch Lutris Games!" && exit 1 + CHOICE=$( + jq -r '.[].select' "${meta_data}" | rofi -dmenu -p Lutris \ + -theme-str "${r_override}" \ + -config "${RofiConf}" + ) + [ -z "$CHOICE" ] && exit 0 + SLUG=$(jq -r --arg choice "$CHOICE" '.[] | select(.name == $choice).slug' "${meta_data}") + notify-send -a "HyDE Alert" -i "${icon_path}/${SLUG}.jpg" "Launching ${CHOICE}..." + exec xdg-open "lutris:rungame/${SLUG}" } # Handle if flatpak or pkgmgr @@ -92,22 +94,22 @@ icon_path="${HOME}/.var/app/net.lutris.Lutris/data/lutris/coverart/" [ -z "${run_lutris}" ] && (pkg_installed 'lutris') && run_lutris="lutris" if [ -z "${run_lutris}" ] || echo "$*" | grep -q "steam"; then - # set steam library - if pkg_installed steam; then - SteamLib="${XDG_DATA_HOME:-$HOME/.local/share}/Steam/config/libraryfolders.vdf" - SteamThumb="${XDG_DATA_HOME:-$HOME/.local/share}/Steam/appcache/librarycache" - steamlaunch="steam" - else - SteamLib="$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/config/libraryfolders.vdf" - SteamThumb="$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/appcache/librarycache" - steamlaunch="flatpak run com.valvesoftware.Steam" - fi - - if [ ! -f $SteamLib ] || [ ! -d $SteamThumb ]; then - notify-send -a "HyDE Alert" "Steam library not found!" - exit 1 - fi - fn_steam + # set steam library + if pkg_installed steam; then + SteamLib="${XDG_DATA_HOME:-$HOME/.local/share}/Steam/config/libraryfolders.vdf" + SteamThumb="${XDG_DATA_HOME:-$HOME/.local/share}/Steam/appcache/librarycache" + steamlaunch="steam" + else + SteamLib="$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/config/libraryfolders.vdf" + SteamThumb="$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/appcache/librarycache" + steamlaunch="flatpak run com.valvesoftware.Steam" + fi + + if [ ! -f $SteamLib ] || [ ! -d $SteamThumb ]; then + notify-send -a "HyDE Alert" "Steam library not found!" + exit 1 + fi + fn_steam else - fn_lutris + fn_lutris fi diff --git a/Configs/.local/lib/hyde/globalcontrol.sh b/Configs/.local/lib/hyde/globalcontrol.sh index 3d0b6e59b..be0b99e42 100755 --- a/Configs/.local/lib/hyde/globalcontrol.sh +++ b/Configs/.local/lib/hyde/globalcontrol.sh @@ -31,11 +31,118 @@ export themesDir="$THEMES_DIR" export fontsDir="$FONTS_DIR" export hashMech="sha1sum" +print_log() { + # [ -t 1 ] && return 0 # Skip if not in the terminal + while (("$#")); do + # [ "${colored}" == "true" ] + case "$1" in + -r | +r) + echo -ne "\e[31m$2\e[0m" >&2 + shift 2 + ;; # Red + -g | +g) + echo -ne "\e[32m$2\e[0m" >&2 + shift 2 + ;; # Green + -y | +y) + echo -ne "\e[33m$2\e[0m" >&2 + shift 2 + ;; # Yellow + -b | +b) + echo -ne "\e[34m$2\e[0m" >&2 + shift 2 + ;; # Blue + -m | +m) + echo -ne "\e[35m$2\e[0m" >&2 + shift 2 + ;; # Magentass + -c | +c) + echo -ne "\e[36m$2\e[0m" >&2 + shift 2 + ;; # Cyan + -wt | +w) + echo -ne "\e[37m$2\e[0m" >&2 + shift 2 + ;; # White + -n | +n) + echo -ne "\e[96m$2\e[0m" >&2 + shift 2 + ;; # Neon + -stat) + echo -ne "\e[4;30;46m $2 \e[0m :: " >&2 + shift 2 + ;; # status + -crit) + echo -ne "\e[30;41m $2 \e[0m :: " >&2 + shift 2 + ;; # critical + -warn) + echo -ne "WARNING :: \e[30;43m $2 \e[0m :: " >&2 + shift 2 + ;; # warning + +) + echo -ne "\e[38;5;$2m$3\e[0m" >&2 + shift 3 + ;; # Set color manually + -sec) + echo -ne "\e[32m[$2] \e[0m" >&2 + shift 2 + ;; # section use for logs + -err) + echo -ne "ERROR :: \e[4;31m$2 \e[0m" >&2 + shift 2 + ;; #error + *) + echo -ne "$1" >&2 + shift + ;; + esac + done + echo "" >&2 +} + get_hashmap() { unset wallHash unset wallList unset skipStrays - unset verboseMap + unset filetypes + + list_extensions() { + # Define supported file extensions + supported_files=( + "gif" + "jpg" + "jpeg" + "png" + "${WALLPAPER_FILETYPES[@]}" + ) + if [ -n "${WALLPAPER_OVERRIDE_FILETYPES}" ]; then + supported_files=("${WALLPAPER_OVERRIDE_FILETYPES[@]}") + fi + + printf -- "-iname \"*.%s\" -o " "${supported_files[@]}" | sed 's/ -o $//' + + } + + find_wallpapers() { + local wallSource="$1" + + if [ -z "${wallSource}" ]; then + print_log -err "ERROR: wallSource is empty" + return 1 + fi + + local find_command + find_command="find \"${wallSource}\" -type f \\( $(list_extensions) \\) ! -path \"*/logo/*\" -exec \"${hashMech}\" {} +" + + [ "${LOG_LEVEL}" == "debug" ] && print_log -g "DEBUG:" -b "Running command:" "${find_command}" + + tmpfile=$(mktemp) + eval "${find_command}" 2>"$tmpfile" | sort -k2 + error_output=$(<"$tmpfile") && rm -f "$tmpfile" + [ -n "${error_output}" ] && print_log -err "ERROR:" -b "found an error: " -r "${error_output}" -y " skipping..." + + } for wallSource in "$@"; do @@ -55,38 +162,6 @@ get_hashmap() { [ "${LOG_LEVEL}" == "debug" ] && print_log -g "DEBUG:" -b "wallSource path:" "${wallSource}" - list_extensions() { - # Define supported file extensions - supported_files=( - "gif" - "jpg" - "jpeg" - "png" - "${WALLPAPER_FILETYPES[@]}" - ) - printf -- "-iname *.%s -o " "${supported_files[@]}" | sed 's/ -o $//' - } - - find_wallpapers() { - local wallSource="$1" - - if [ -z "${wallSource}" ]; then - print_log -err "ERROR: wallSource is empty" - return 1 - fi - - local find_command - find_command="find \"${wallSource}\" -type f \\( $(list_extensions) \\) ! -path \"*/logo/*\" -exec \"${hashMech}\" {} +" - - [ "${LOG_LEVEL}" == "debug" ] && print_log -g "DEBUG:" -b "Running command:" "${find_command}" - - tmpfile=$(mktemp) - eval "${find_command}" 2>"$tmpfile" | sort -k2 - error_output=$(<"$tmpfile") && rm -f "$tmpfile" - [ -n "${error_output}" ] && print_log -err "ERROR:" -b "found an error: " -r "${error_output}" -y " skipping..." - - } - hashMap=$(find_wallpapers "${wallSource}") # Enable debug mode for testing # hashMap=$( @@ -149,7 +224,7 @@ get_themes() { [ -f "${thmDir}/.sort" ] && thmSortS+=("$(head -1 "${thmDir}/.sort")") || thmSortS+=("0") thmWallS+=("${realWallPath}") thmListS+=("${thmDir##*/}") # Use this instead of basename - done < <(find "${hydeConfDir}/themes" -mindepth 1 -maxdepth 1 -type d) + done < <(find "${HYDE_CONFIG_HOME}/themes" -mindepth 1 -maxdepth 1 -type d) while IFS='|' read -r sort theme wall; do thmSort+=("${sort}") @@ -174,14 +249,14 @@ case "${enableWallDcol}" in *) enableWallDcol=0 ;; esac -if [ -z "${HYDE_THEME}" ] || [ ! -d "${hydeConfDir}/themes/${HYDE_THEME}" ]; then +if [ -z "${HYDE_THEME}" ] || [ ! -d "${HYDE_CONFIG_HOME}/themes/${HYDE_THEME}" ]; then get_themes HYDE_THEME="${thmList[0]}" fi -HYDE_THEME_DIR="${hydeConfDir}/themes/${HYDE_THEME}" +HYDE_THEME_DIR="${HYDE_CONFIG_HOME}/themes/${HYDE_THEME}" wallbashDirs=( - "${hydeConfDir}/wallbash" + "${HYDE_CONFIG_HOME}/wallbash" "${XDG_DATA_HOME}/hyde/wallbash" "/usr/local/share/hyde/wallbash" "/usr/share/hyde/wallbash" @@ -243,76 +318,6 @@ set_hash() { "${hashMech}" "${hashImage}" | awk '{print $1}' } -print_log() { - # [ -t 1 ] && return 0 # Skip if not in the terminal - while (("$#")); do - # [ "${colored}" == "true" ] - case "$1" in - -r | +r) - echo -ne "\e[31m$2\e[0m" >&2 - shift 2 - ;; # Red - -g | +g) - echo -ne "\e[32m$2\e[0m" >&2 - shift 2 - ;; # Green - -y | +y) - echo -ne "\e[33m$2\e[0m" >&2 - shift 2 - ;; # Yellow - -b | +b) - echo -ne "\e[34m$2\e[0m" >&2 - shift 2 - ;; # Blue - -m | +m) - echo -ne "\e[35m$2\e[0m" >&2 - shift 2 - ;; # Magentass - -c | +c) - echo -ne "\e[36m$2\e[0m" >&2 - shift 2 - ;; # Cyan - -wt | +w) - echo -ne "\e[37m$2\e[0m" >&2 - shift 2 - ;; # White - -n | +n) - echo -ne "\e[96m$2\e[0m" >&2 - shift 2 - ;; # Neon - -stat) - echo -ne "\e[4;30;46m $2 \e[0m :: " >&2 - shift 2 - ;; # status - -crit) - echo -ne "\e[30;41m $2 \e[0m :: " >&2 - shift 2 - ;; # critical - -warn) - echo -ne "WARNING :: \e[30;43m $2 \e[0m :: " >&2 - shift 2 - ;; # warning - +) - echo -ne "\e[38;5;$2m$3\e[0m" >&2 - shift 3 - ;; # Set color manually - -sec) - echo -ne "\e[32m[$2] \e[0m" >&2 - shift 2 - ;; # section use for logs - -err) - echo -ne "ERROR :: \e[4;31m$2 \e[0m" >&2 - shift 2 - ;; #error - *) - echo -ne "$1" >&2 - shift - ;; - esac - done - echo "" >&2 -} - check_package() { local lock_file="${XDG_RUNTIME_DIR:-/tmp}/hyde/__package.lock" @@ -337,6 +342,22 @@ check_package() { get_hyprConf() { local hyVar="${1}" local file="${2:-"$HYDE_THEME_DIR/hypr.theme"}" + + # First try using hyq for fast config parsing if available + if command -v hyq &>/dev/null; then + local hyq_result + # Try with source option for accurate results + hyq_result=$(hyq -s --query "\$${hyVar}" "${file}" 2>/dev/null) + # If empty, try without source option + if [ -z "${hyq_result}" ]; then + hyq_result=$(hyq --query "\$${hyVar}" "${file}" 2>/dev/null) + fi + # Return result if not empty + [ -n "${hyq_result}" ] && echo "${hyq_result}" && return 0 + + fi + + # Fall back to traditional parsing if hyq fails or isn't available local gsVal gsVal="$(grep "^[[:space:]]*\$${hyVar}\s*=" "${file}" | cut -d '=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" [ -n "${gsVal}" ] && [[ "${gsVal}" != \$* ]] && echo "${gsVal}" && return 0 @@ -418,6 +439,7 @@ get_rofi_pos() { #? handle pasting paste_string() { if ! command -v wtype >/dev/null; then exit 0; fi + if [ -t 0 ] || [ -t 1 ]; then return 0; fi ignore_paste_file="$HYDE_STATE_HOME/ignore.paste" if [[ ! -e "${ignore_paste_file}" ]]; then @@ -432,7 +454,7 @@ EOF fi ignore_class=$(echo "$@" | awk -F'--ignore=' '{print $2}') - [ -n "${ignore_class}" ] && echo "${ignore_class}" >>"${ignore_paste_file}" && print_prompt -y "[ignore]" "'$ignore_class'" && exit 0 + [ -n "${ignore_class}" ] && echo "${ignore_class}" >>"${ignore_paste_file}" && print_log -y "[ignore]" "'$ignore_class'" && exit 0 class=$(hyprctl -j activewindow | jq -r '.initialClass') if ! grep -q "${class}" "${ignore_paste_file}"; then hyprctl -q dispatch exec 'wtype -M ctrl V -m ctrl' @@ -493,7 +515,7 @@ accepted_mime_types() { if file --mime-type -b "${file}" | grep -q "^${mime_type}"; then return 0 else - print_log err "File type not supported for this wallpaper backend." + print_log -err "File type not supported for this wallpaper backend." notify-send -u critical -a "HyDE-Alert" "File type not supported for this wallpaper backend." fi diff --git a/Configs/.local/lib/hyde/glyph-picker.sh b/Configs/.local/lib/hyde/glyph-picker.sh index 633d703e7..8900a939a 100755 --- a/Configs/.local/lib/hyde/glyph-picker.sh +++ b/Configs/.local/lib/hyde/glyph-picker.sh @@ -77,7 +77,7 @@ main() { # create recent data file if it doesn't exist if [[ ! -f "${recent_data}" ]]; then mkdir -p "$(dirname "${recent_data}")" - echo "๏… Arch linux - I use Arch, BTW" >"${recent_data}" + echo -e "๏… \tArch linux - I use Arch, BTW" >"${recent_data}" fi # read recent and main entries diff --git a/Configs/.local/lib/hyde/gpuinfo.sh b/Configs/.local/lib/hyde/gpuinfo.sh index b276a37b0..6bb7c14f1 100755 --- a/Configs/.local/lib/hyde/gpuinfo.sh +++ b/Configs/.local/lib/hyde/gpuinfo.sh @@ -374,6 +374,34 @@ case "$1" in echo -e "Initialized Variable:\n$(cat "${gpuinfo_file}" || true)\n\nReboot or '$0 --reset' to RESET Variables" exit ;; +"--stat") + case "$2" in + "amd") + if [[ "${GPUINFO_AMD_ENABLE}" -eq 1 ]]; then + echo "GPUINFO_AMD_ENABLE: ${GPUINFO_AMD_ENABLE}" + exit 0 + fi + ;; + "intel") + if [[ "${GPUINFO_INTEL_ENABLE}" -eq 1 ]]; then + echo "GPUINFO_INTEL_ENABLE: ${GPUINFO_INTEL_ENABLE}" + exit 0 + fi + ;; + "nvidia") + if [[ "${GPUINFO_NVIDIA_ENABLE}" -eq 1 ]]; then + echo "GPUINFO_NVIDIA_ENABLE: ${GPUINFO_NVIDIA_ENABLE}" + exit 0 + fi + ;; + *) + echo "Error: Invalid argument for --stat. Use amd, intel, or nvidia." + exit 1 + ;; + esac + echo "GPU not enabled." + exit 1 + ;; *"-"*) GPUINFO_AVAILABLE=${GPUINFO_AVAILABLE//GPUINFO_/} cat < /dev/null; then + hyprsunset > /dev/null & +fi if [ "$action" = "read" ]; then - if [ "$toggle_mode" -eq 1 ] && [ "$current_running_temp" != "$currentTemp" ]; then - pkill -x hyprsunset - hyprsunset --temperature "$currentTemp" >/dev/null & + if [ "$toggle_mode" -eq 1 ]; then + # Fetch current running temperature + current_running_temp=$(hyprctl hyprsunset temperature) + if [ "$current_running_temp" != "$currentTemp" ]; then + hyprctl --quiet hyprsunset temperature "$currentTemp" + fi fi else - pkill -x hyprsunset if [ "$toggle_mode" -eq 0 ]; then - hyprsunset -i >/dev/null & + hyprctl --quiet hyprsunset identity else - hyprsunset --temperature "$newTemp" >/dev/null & + hyprctl --quiet hyprsunset temperature "$newTemp" fi fi diff --git a/Configs/.local/lib/hyde/hyq b/Configs/.local/lib/hyde/hyq index 97d235ab5..2b62018eb 100755 Binary files a/Configs/.local/lib/hyde/hyq and b/Configs/.local/lib/hyde/hyq differ diff --git a/Configs/.local/lib/hyde/lockscreen.sh b/Configs/.local/lib/hyde/lockscreen.sh index 6a50f6006..867ad8740 100755 --- a/Configs/.local/lib/hyde/lockscreen.sh +++ b/Configs/.local/lib/hyde/lockscreen.sh @@ -8,4 +8,4 @@ HYDE_RUNTIME_DIR="${HYDE_RUNTIME_DIR:-$XDG_RUNTIME_DIR/hyde}" # shellcheck disable=SC1091 source "${HYDE_RUNTIME_DIR}/environment" -"${LOCKSCREEN}" "${@}" +"${LOCKSCREEN:-hyprlock}" "${@}" diff --git a/Configs/.local/lib/hyde/parse.config.py b/Configs/.local/lib/hyde/parse.config.py index c58d2c340..7efd4cc0c 100755 --- a/Configs/.local/lib/hyde/parse.config.py +++ b/Configs/.local/lib/hyde/parse.config.py @@ -37,7 +37,7 @@ def load_toml_file(toml_file): def parse_toml_to_env(toml_file, env_file=None, export=False): - ignored_keys = ["$schema", "$SCHEMA", "hyprland", "hyprland-start", "hyprland-env"] + ignored_keys = ["$schema", "$SCHEMA", "hyprland","hyprland-ipc","hyprland-start", "hyprland-env"] toml_content = load_toml_file(toml_file) if toml_content is None: diff --git a/Configs/.local/lib/hyde/screenrecord.sh b/Configs/.local/lib/hyde/screenrecord.sh new file mode 100644 index 000000000..91fd8b1ca --- /dev/null +++ b/Configs/.local/lib/hyde/screenrecord.sh @@ -0,0 +1,151 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# shellcheck source=$HOME/.local/bin/hyde-shell +# shellcheck disable=SC1091 +if ! source "$(command -v hyde-shell)"; then + echo "[wf-recorder] code :: Error: hyde-shell not found." + echo "[wf-recorder] code :: Is HyDE installed?" + exit 1 +fi + +RECORDER="wl-screenrec" +command -v "$RECORDER" &>/dev/null || RECORDER="wf-recorder" +if ! command -v "$RECORDER" &>/dev/null; then + notify-send -a "HyDE Alert" "No screen recorder found. Try installing wl-screenrec or wf-recorder." + echo "No screen recorder found. Try installing wl-screenrec or wf-recorder." + exit 1 +fi + +USAGE() { + cat <= 16 && height >= 16) { + print x","y" "width"x"height; # Output in the same format + } + }' + + )" + + if [[ -n "$GEOM" ]]; then + parameters+=("--geometry" "$GEOM") + else + echo "Using whole screen for recording" + [[ -n "$OUTPUT" ]] && parameters+=(--output "$OUTPUT") + fi + + tmp_thumbnail=$(mktemp -t thumbnail_XXXXXX.png) + if [[ -z "$GEOM" ]]; then + "$LIB_DIR/hyde/grimblast" save active "$tmp_thumbnail" + else + grim -g "$GEOM" "$tmp_thumbnail" + fi + + "${RECORDER}" "${parameters[@]}" -f "${save_file_path}" + notify-send -a "HyDE Alert" "${RECORDER}: Recording saved at ${save_file_path}" -i "${tmp_thumbnail}" +} + +# Process arguments with while loop +while [[ $# -gt 0 ]]; do + case "$1" in + --file) + shift + FILE_PATH="$1" + ;; + --backend) + shift + RECORDER="$1" + ;; + --start) + handle_recording "$@" + exit 0 + ;; + --quit) + killall "${RECORDER}" + notify-send -a "HyDE Alert" "Recording stopped" + exit 0 + ;; + --help) + USAGE + exit 0 + ;; + *) + # Unknown option + USAGE + exit 1 + ;; + esac + shift +done + +# If no arguments provided, show usage +if [[ $# -eq 0 ]]; then + USAGE +fi diff --git a/Configs/.local/lib/hyde/swwwallbash.sh b/Configs/.local/lib/hyde/swwwallbash.sh index 389c54dd4..78639a85f 100755 --- a/Configs/.local/lib/hyde/swwwallbash.sh +++ b/Configs/.local/lib/hyde/swwwallbash.sh @@ -1,385 +1,15 @@ #!/usr/bin/env bash # shellcheck disable=SC2154 -#// set variables +cat < +------------------------------------------------- +EOF scrDir="$(dirname "$(realpath "$0")")" -export scrDir # shellcheck disable=SC1091 -source "${scrDir}/globalcontrol.sh" -wallbashImg="${1}" - -# Parse arguments -dcol_colors="" -while [[ $# -gt 0 ]]; do - case "$1" in - --dcol) - dcol_colors="$2" - if [ -f "${dcol_colors}" ]; then - echo "[Source] ${dcol_colors}" - # shellcheck disable=SC1090 - source "${dcol_colors}" - shift 2 - else - dcol_colors="$(find "${dcolDir}" -type f -name "*.dcol" | shuf -n 1)" - echo "[Dcol Colors] ${dcol_colors}" - shift - fi - ;; - --wall) - wallbashImg="$2" - shift 2 - ;; - --single) - [ -f "${wallbashImg}" ] || wallbashImg="${cacheDir}/wall.set" - single_template="$2" - echo "[wallbash] Single template: ${single_template}" - echo "[wallbash] Wallpaper: ${wallbashImg}" - shift 2 - # ;; - # --mode) - # enableWallDcol="$2" - # shift 2 - ;; - -*) - echo "Usage: $0 [--dcol ] [--wall ] [--single] [--mode ] [--help]" - exit 0 - ;; - *) break ;; - esac -done - -#// validate input - -if [ -z "${wallbashImg}" ] || [ ! -f "${wallbashImg}" ]; then - echo "Error: Input wallpaper not found!" - exit 1 -fi -# shellcheck disable=SC2154 -wallbashOut="${dcolDir}/$(set_hash "${wallbashImg}").dcol" - -if [ ! -f "${wallbashOut}" ]; then - "${scrDir}/swwwallcache.sh" -w "${wallbashImg}" &>/dev/null -fi - -set -a -# shellcheck disable=SC1090 -source "${wallbashOut}" -# shellcheck disable=SC2154 -if [ -f "${HYDE_THEME_DIR}/theme.dcol" ] && [ "${enableWallDcol}" -eq 0 ]; then - # shellcheck disable=SC1091 - source "${HYDE_THEME_DIR}/theme.dcol" - print_log -sec "wallbash" -stat "override" "dominant colors from ${HYDE_THEME} theme" - print_log -sec "wallbash" -stat " NOTE" "Remove \"${HYDE_THEME_DIR}/theme.dcol\" to use wallpaper dominant colors" -fi -# shellcheck disable=SC2154 -[ "${dcol_mode}" == "dark" ] && dcol_invt="light" || dcol_invt="dark" -set +a - -if [ -z "$gtkTheme" ]; then - if [ "${enableWallDcol}" -eq 0 ]; then - gtkTheme="$(get_hyprConf "GTK_THEME")" - else - gtkTheme="Wallbash-Gtk" - fi -fi -[ -z "$gtkIcon" ] && gtkIcon="$(get_hyprConf "ICON_THEME")" -[ -z "$cursorTheme" ] && cursorTheme="$(get_hyprConf "CURSOR_THEME")" -export gtkTheme gtkIcon cursorTheme - -#// deploy wallbash colors - -fn_wallbash() { - local template="${1}" - local temp_target_file exec_command - WALLBASH_SCRIPTS="${template%%hyde/wallbash*}hyde/wallbash/scripts" - if [[ "${template}" == *.theme ]]; then - # This is approach is to handle the theme files - # We don't want themes to launch the exec_command or any arbitrary codes - # To enable this we should have a *.dcol file as a companion to the theme file - IFS=':' read -r -a wallbashDirs <<<"$WALLBASH_DIRS" - template_name="${template##*/}" - template_name="${template_name%.*}" - # echo "${wallbashDirs[@]}" - dcolTemplate=$(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "${template_name}.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') - if [[ -n "${dcolTemplate}" ]]; then - eval target_file="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $1}')" - exec_command="$(head -1 "${dcolTemplate}" | awk -F '|' '{print $2}')" - WALLBASH_SCRIPTS="${dcolTemplate%%hyde/wallbash*}hyde/wallbash/scripts" - - fi - fi - - # shellcheck disable=SC1091 - # shellcheck disable=SC2154 - [ -f "$HYDE_STATE_HOME/state" ] && source "$HYDE_STATE_HOME/state" - # shellcheck disable=SC1091 - [ -f "$HYDE_STATE_HOME/config" ] && source "$HYDE_STATE_HOME/config" - if [[ -n "${WALLBASH_SKIP_TEMPLATE[*]}" ]]; then - for skip in "${WALLBASH_SKIP_TEMPLATE[@]}"; do - if [[ "${template}" =~ ${skip} ]]; then - print_log -sec "wallbash" -warn "skip '$skip' template " "Template: ${template}" - return 0 - fi - done - fi - - [ -z "${target_file}" ] && eval target_file="$(head -1 "${template}" | awk -F '|' '{print $1}')" - [ ! -d "$(dirname "${target_file}")" ] && print_log -sec "wallbash" -warn "skip 'missing directory'" "${target_file} // Do you have the dependency installed?" && return 0 - export wallbashScripts="${WALLBASH_SCRIPTS}" - export WALLBASH_SCRIPTS confDir hydeConfDir cacheDir thmbDir dcolDir iconsDir themesDir fontsDir wallbashDirs enableWallDcol HYDE_THEME_DIR HYDE_THEME gtkIcon gtkTheme cursorTheme - export -f pkg_installed print_log - # exec_command="$(head -1 "${template}" | awk -F '|' '{print $2}')" - exec_command="${exec_command:-"$(head -1 "${template}" | awk -F '|' '{print $2}')"}" - temp_target_file="$(mktemp)" - sed '1d' "${template}" >"${temp_target_file}" - if [[ ${revert_colors} -eq 1 ]] || [[ "${enableWallDcol}" -eq 2 && "${dcol_mode}" == "light" ]] || [[ "${enableWallDcol}" -eq 3 && "${dcol_mode}" == "dark" ]]; then - sed -i 's//'"${dcol_invt}"'/g - s//'"${dcol_pry4}"'/g - s//'"${dcol_txt4}"'/g - s//'"${dcol_4xa9}"'/g - s//'"${dcol_4xa8}"'/g - s//'"${dcol_4xa7}"'/g - s//'"${dcol_4xa6}"'/g - s//'"${dcol_4xa5}"'/g - s//'"${dcol_4xa4}"'/g - s//'"${dcol_4xa3}"'/g - s//'"${dcol_4xa2}"'/g - s//'"${dcol_4xa1}"'/g - s//'"${dcol_pry3}"'/g - s//'"${dcol_txt3}"'/g - s//'"${dcol_3xa9}"'/g - s//'"${dcol_3xa8}"'/g - s//'"${dcol_3xa7}"'/g - s//'"${dcol_3xa6}"'/g - s//'"${dcol_3xa5}"'/g - s//'"${dcol_3xa4}"'/g - s//'"${dcol_3xa3}"'/g - s//'"${dcol_3xa2}"'/g - s//'"${dcol_3xa1}"'/g - s//'"${dcol_pry2}"'/g - s//'"${dcol_txt2}"'/g - s//'"${dcol_2xa9}"'/g - s//'"${dcol_2xa8}"'/g - s//'"${dcol_2xa7}"'/g - s//'"${dcol_2xa6}"'/g - s//'"${dcol_2xa5}"'/g - s//'"${dcol_2xa4}"'/g - s//'"${dcol_2xa3}"'/g - s//'"${dcol_2xa2}"'/g - s//'"${dcol_2xa1}"'/g - s//'"${dcol_pry1}"'/g - s//'"${dcol_txt1}"'/g - s//'"${dcol_1xa9}"'/g - s//'"${dcol_1xa8}"'/g - s//'"${dcol_1xa7}"'/g - s//'"${dcol_1xa6}"'/g - s//'"${dcol_1xa5}"'/g - s//'"${dcol_1xa4}"'/g - s//'"${dcol_1xa3}"'/g - s//'"${dcol_1xa2}"'/g - s//'"${dcol_1xa1}"'/g - s//'"${dcol_pry4_rgba}"'/g - s//'"${dcol_txt4_rgba}"'/g - s//'"${dcol_4xa9_rgba}"'/g - s//'"${dcol_4xa8_rgba}"'/g - s//'"${dcol_4xa7_rgba}"'/g - s//'"${dcol_4xa6_rgba}"'/g - s//'"${dcol_4xa5_rgba}"'/g - s//'"${dcol_4xa4_rgba}"'/g - s//'"${dcol_4xa3_rgba}"'/g - s//'"${dcol_4xa2_rgba}"'/g - s//'"${dcol_4xa1_rgba}"'/g - s//'"${dcol_pry3_rgba}"'/g - s//'"${dcol_txt3_rgba}"'/g - s//'"${dcol_3xa9_rgba}"'/g - s//'"${dcol_3xa8_rgba}"'/g - s//'"${dcol_3xa7_rgba}"'/g - s//'"${dcol_3xa6_rgba}"'/g - s//'"${dcol_3xa5_rgba}"'/g - s//'"${dcol_3xa4_rgba}"'/g - s//'"${dcol_3xa3_rgba}"'/g - s//'"${dcol_3xa2_rgba}"'/g - s//'"${dcol_3xa1_rgba}"'/g - s//'"${dcol_pry2_rgba}"'/g - s//'"${dcol_txt2_rgba}"'/g - s//'"${dcol_2xa9_rgba}"'/g - s//'"${dcol_2xa8_rgba}"'/g - s//'"${dcol_2xa7_rgba}"'/g - s//'"${dcol_2xa6_rgba}"'/g - s//'"${dcol_2xa5_rgba}"'/g - s//'"${dcol_2xa4_rgba}"'/g - s//'"${dcol_2xa3_rgba}"'/g - s//'"${dcol_2xa2_rgba}"'/g - s//'"${dcol_2xa1_rgba}"'/g - s//'"${dcol_pry1_rgba}"'/g - s//'"${dcol_txt1_rgba}"'/g - s//'"${dcol_1xa9_rgba}"'/g - s//'"${dcol_1xa8_rgba}"'/g - s//'"${dcol_1xa7_rgba}"'/g - s//'"${dcol_1xa6_rgba}"'/g - s//'"${dcol_1xa5_rgba}"'/g - s//'"${dcol_1xa4_rgba}"'/g - s//'"${dcol_1xa3_rgba}"'/g - s//'"${dcol_1xa2_rgba}"'/g - s//'"${dcol_1xa1_rgba}"'/g' "${temp_target_file}" - else - sed -i 's//'"${dcol_mode}"'/g - s//'"${dcol_pry1}"'/g - s//'"${dcol_txt1}"'/g - s//'"${dcol_1xa1}"'/g - s//'"${dcol_1xa2}"'/g - s//'"${dcol_1xa3}"'/g - s//'"${dcol_1xa4}"'/g - s//'"${dcol_1xa5}"'/g - s//'"${dcol_1xa6}"'/g - s//'"${dcol_1xa7}"'/g - s//'"${dcol_1xa8}"'/g - s//'"${dcol_1xa9}"'/g - s//'"${dcol_pry2}"'/g - s//'"${dcol_txt2}"'/g - s//'"${dcol_2xa1}"'/g - s//'"${dcol_2xa2}"'/g - s//'"${dcol_2xa3}"'/g - s//'"${dcol_2xa4}"'/g - s//'"${dcol_2xa5}"'/g - s//'"${dcol_2xa6}"'/g - s//'"${dcol_2xa7}"'/g - s//'"${dcol_2xa8}"'/g - s//'"${dcol_2xa9}"'/g - s//'"${dcol_pry3}"'/g - s//'"${dcol_txt3}"'/g - s//'"${dcol_3xa1}"'/g - s//'"${dcol_3xa2}"'/g - s//'"${dcol_3xa3}"'/g - s//'"${dcol_3xa4}"'/g - s//'"${dcol_3xa5}"'/g - s//'"${dcol_3xa6}"'/g - s//'"${dcol_3xa7}"'/g - s//'"${dcol_3xa8}"'/g - s//'"${dcol_3xa9}"'/g - s//'"${dcol_pry4}"'/g - s//'"${dcol_txt4}"'/g - s//'"${dcol_4xa1}"'/g - s//'"${dcol_4xa2}"'/g - s//'"${dcol_4xa3}"'/g - s//'"${dcol_4xa4}"'/g - s//'"${dcol_4xa5}"'/g - s//'"${dcol_4xa6}"'/g - s//'"${dcol_4xa7}"'/g - s//'"${dcol_4xa8}"'/g - s//'"${dcol_4xa9}"'/g - s//'"${dcol_pry1_rgba}"'/g - s//'"${dcol_txt1_rgba}"'/g - s//'"${dcol_1xa1_rgba}"'/g - s//'"${dcol_1xa2_rgba}"'/g - s//'"${dcol_1xa3_rgba}"'/g - s//'"${dcol_1xa4_rgba}"'/g - s//'"${dcol_1xa5_rgba}"'/g - s//'"${dcol_1xa6_rgba}"'/g - s//'"${dcol_1xa7_rgba}"'/g - s//'"${dcol_1xa8_rgba}"'/g - s//'"${dcol_1xa9_rgba}"'/g - s//'"${dcol_pry2_rgba}"'/g - s//'"${dcol_txt2_rgba}"'/g - s//'"${dcol_2xa1_rgba}"'/g - s//'"${dcol_2xa2_rgba}"'/g - s//'"${dcol_2xa3_rgba}"'/g - s//'"${dcol_2xa4_rgba}"'/g - s//'"${dcol_2xa5_rgba}"'/g - s//'"${dcol_2xa6_rgba}"'/g - s//'"${dcol_2xa7_rgba}"'/g - s//'"${dcol_2xa8_rgba}"'/g - s//'"${dcol_2xa9_rgba}"'/g - s//'"${dcol_pry3_rgba}"'/g - s//'"${dcol_txt3_rgba}"'/g - s//'"${dcol_3xa1_rgba}"'/g - s//'"${dcol_3xa2_rgba}"'/g - s//'"${dcol_3xa3_rgba}"'/g - s//'"${dcol_3xa4_rgba}"'/g - s//'"${dcol_3xa5_rgba}"'/g - s//'"${dcol_3xa6_rgba}"'/g - s//'"${dcol_3xa7_rgba}"'/g - s//'"${dcol_3xa8_rgba}"'/g - s//'"${dcol_3xa9_rgba}"'/g - s//'"${dcol_pry4_rgba}"'/g - s//'"${dcol_txt4_rgba}"'/g - s//'"${dcol_4xa1_rgba}"'/g - s//'"${dcol_4xa2_rgba}"'/g - s//'"${dcol_4xa3_rgba}"'/g - s//'"${dcol_4xa4_rgba}"'/g - s//'"${dcol_4xa5_rgba}"'/g - s//'"${dcol_4xa6_rgba}"'/g - s//'"${dcol_4xa7_rgba}"'/g - s//'"${dcol_4xa8_rgba}"'/g - s//'"${dcol_4xa9_rgba}"'/g' "${temp_target_file}" - fi - - # Option to make dcol templates handle basic environment variables - sed -i 's|<>|'"${HOME}"'|g' "${temp_target_file}" - - if [ -s "${temp_target_file}" ]; then - mv "${temp_target_file}" "${target_file}" - fi - [ -z "${exec_command}" ] || bash -c "${exec_command}" -} - -WALLBASH_DIRS="" -for dir in "${wallbashDirs[@]}"; do - [ -d "${dir}" ] || wallbashDirs=("${wallbashDirs[@]//$dir/}") - [ -d "$dir" ] && WALLBASH_DIRS+="$dir:" -done -WALLBASH_DIRS="${WALLBASH_DIRS%:}" - -if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then PATH="$HOME/.local/bin:${PATH}"; fi -export WALLBASH_DIRS PATH -export -f fn_wallbash print_log pkg_installed - -if [ -n "${dcol_colors}" ]; then - set -a - # shellcheck disable=SC1090 - source "${dcol_colors}" - print_log -sec "wallbash" -stat "single instance" "Wallbash Colors: ${dcol_colors}" - set +a -fi - -# Single template mode -if [ -n "${single_template}" ]; then - fn_wallbash "${single_template}" - exit 0 -fi - -# Print to terminal the colors -[ -t 1 ] && "${scrDir}/wallbash.print.colors.sh" - -#// switch theme wall based colors - -# shellcheck disable=SC2154 -if [ "${enableWallDcol}" -eq 0 ] && [[ "${reload_flag}" -eq 1 ]]; then - - print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "${HYDE_THEME} theme" - mapfile -d '' -t deployList < <(find "${HYDE_THEME_DIR}" -type f -name "*.theme" -print0) - - while read -r pKey; do - fKey="$(find "${HYDE_THEME_DIR}" -type f -name "$(basename "${pKey%.dcol}.theme")")" - [ -z "${fKey}" ] && deployList+=("${pKey}") - done < <(find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++') - - parallel fn_wallbash ::: "${deployList[@]}" - -elif [ "${enableWallDcol}" -gt 0 ]; then - print_log -sec "wallbash" -stat "apply ${dcol_mode} colors" "Wallbash theme" - # This is the reason we avoid SPACES for the wallbash template names - find "${wallbashDirs[@]}" -type f -path "*/theme*" -name "*.dcol" 2>/dev/null | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} -fi - -# Theme mode: detects the color-scheme set in hypr.theme and falls back if nothing is parsed. -revert_colors=0 -[ "${enableWallDcol}" -eq 0 ] && { grep -q "${dcol_mode}" <<<"$(get_hyprConf "COLOR_SCHEME")" || revert_colors=1; } -export revert_colors - -find "${wallbashDirs[@]}" -type f -path "*/always*" -name "*.dcol" 2>/dev/null | sort | awk '!seen[substr($0, match($0, /[^/]+$/))]++' | parallel fn_wallbash {} - -# Add post processing here - -toml_write "${confDir}/kdeglobals" "Colors:View" "BackgroundNormal" "#${dcol_pry1:-000000}" +"${scrDir}/color.set.sh" "${@}" diff --git a/Configs/.local/lib/hyde/swwwallpaper.sh b/Configs/.local/lib/hyde/swwwallpaper.sh index 5315bbf63..e47e28758 100755 --- a/Configs/.local/lib/hyde/swwwallpaper.sh +++ b/Configs/.local/lib/hyde/swwwallpaper.sh @@ -6,8 +6,10 @@ DEPRECATION: This script is deprecated, please use 'wallpaper.sh' instead." ------------------------------------------------- example: -wallpaper.sh ${@} --backend swww --global +wallpaper.sh --select --backend swww --global ------------------------------------------------- EOF -"wallpaper.sh" "${@}" --backend swww --global +script_dir="$(dirname "$(realpath "$0")")" +# shellcheck disable=SC1091 +"${script_dir}/wallpaper.sh" "${@}" --backend swww --global diff --git a/Configs/.local/lib/hyde/sysmonlaunch.sh b/Configs/.local/lib/hyde/sysmonlaunch.sh index 0a271ebb7..5e196d2b7 100755 --- a/Configs/.local/lib/hyde/sysmonlaunch.sh +++ b/Configs/.local/lib/hyde/sysmonlaunch.sh @@ -48,12 +48,15 @@ pidFile="$HYDE_RUNTIME_DIR/sysmonlaunch.pid" if [ -f "$pidFile" ]; then while IFS= read -r line; do pid=$(awk -F ':::' '{print $1}' <<<"$line") - cmd=$(awk -F ':::' '{print $2}' <<<"$line") - pkill -P "$pid" - pkg_installed flatpak && flatpak kill "$cmd" 2>/dev/null + if [ -d "/proc/${pid}" ]; then + cmd=$(awk -F ':::' '{print $2}' <<<"$line") + pkill -P "$pid" + pkg_installed flatpak && flatpak kill "$cmd" 2>/dev/null + rm "$pidFile" + exit 0 + fi done <"$pidFile" rm "$pidFile" - exit 0 fi pkgChk=("io.missioncenter.MissionCenter" "htop" "btop" "top") # Array of commands to check diff --git a/Configs/.local/lib/hyde/theme.import.py b/Configs/.local/lib/hyde/theme.import.py index f1950ad7b..c352d7cb3 100755 --- a/Configs/.local/lib/hyde/theme.import.py +++ b/Configs/.local/lib/hyde/theme.import.py @@ -279,8 +279,7 @@ def fzf_menu(): print("\nโŒ Operation cancelled.\n") return print("\n๐Ÿš€ Proceeding with theme installation...\n") - for theme in SELECTED_THEMES: - patch_themes(SELECTED_THEMES) + patch_themes(SELECTED_THEMES) subprocess.run(["hyde-shell", "reload"], check=True) except KeyboardInterrupt: diff --git a/Configs/.local/lib/hyde/theme.switch.sh b/Configs/.local/lib/hyde/theme.switch.sh index f3741cf7b..278bac1a2 100755 --- a/Configs/.local/lib/hyde/theme.switch.sh +++ b/Configs/.local/lib/hyde/theme.switch.sh @@ -8,87 +8,87 @@ scrDir="$(dirname "$(realpath "$0")")" source "${scrDir}/globalcontrol.sh" [ -z "${HYDE_THEME}" ] && echo "ERROR: unable to detect theme" && exit 1 get_themes - +confDir="${XDG_CONFIG_HOME:-$(xdg-user-dir CONFIG)}" #// define functions Theme_Change() { - local x_switch=$1 - - # shellcheck disable=SC2154 - for i in "${!thmList[@]}"; do - if [ "${thmList[i]}" == "${HYDE_THEME}" ]; then - if [ "${x_switch}" == 'n' ]; then - setIndex=$(((i + 1) % ${#thmList[@]})) - elif [ "${x_switch}" == 'p' ]; then - setIndex=$((i - 1)) - fi - themeSet="${thmList[setIndex]}" - break - fi - done + local x_switch=$1 + + # shellcheck disable=SC2154 + for i in "${!thmList[@]}"; do + if [ "${thmList[i]}" == "${HYDE_THEME}" ]; then + if [ "${x_switch}" == 'n' ]; then + setIndex=$(((i + 1) % ${#thmList[@]})) + elif [ "${x_switch}" == 'p' ]; then + setIndex=$((i - 1)) + fi + themeSet="${thmList[setIndex]}" + break + fi + done } sanitize_hypr_theme() { - input_file="${1}" - output_file="${2}" - buffer_file="$(mktemp)" - - sed '1d' "${input_file}" >"${buffer_file}" - # Define an array of patterns to remove - # Supports regex patterns - dirty_regex=( - "^ *exec" - "^ *decoration[^:]*: *drop_shadow" - "^ *drop_shadow" - "^ *decoration[^:]*: *shadow *=" - "^ *decoration[^:]*: *col.shadow* *=" - "^ *shadow_" - "^ *col.shadow*" - ) - - dirty_regex+=("${HYPR_CONFIG_SANITIZE[@]}") - - # Loop through each pattern and remove matching lines - for pattern in "${dirty_regex[@]}"; do - grep -E "${pattern}" "${buffer_file}" | while read -r line; do - sed -i "\|${line}|d" "${buffer_file}" - print_log -sec "theme" -warn "sanitize" "${line}" - done + input_file="${1}" + output_file="${2}" + buffer_file="$(mktemp)" + + sed '1d' "${input_file}" >"${buffer_file}" + # Define an array of patterns to remove + # Supports regex patterns + dirty_regex=( + "^ *exec" + "^ *decoration[^:]*: *drop_shadow" + "^ *drop_shadow" + "^ *decoration[^:]*: *shadow *=" + "^ *decoration[^:]*: *col.shadow* *=" + "^ *shadow_" + "^ *col.shadow*" + ) + + dirty_regex+=("${HYPR_CONFIG_SANITIZE[@]}") + + # Loop through each pattern and remove matching lines + for pattern in "${dirty_regex[@]}"; do + grep -E "${pattern}" "${buffer_file}" | while read -r line; do + sed -i "\|${line}|d" "${buffer_file}" + print_log -sec "theme" -warn "sanitize" "${line}" done - cat "${buffer_file}" >"${output_file}" - rm -f "${buffer_file}" + done + cat "${buffer_file}" >"${output_file}" + rm -f "${buffer_file}" } #// evaluate options quiet=false while getopts "qnps:" option; do - case $option in - - n) # set next theme - Theme_Change n - export xtrans="grow" - ;; - - p) # set previous theme - Theme_Change p - export xtrans="outer" - ;; - - s) # set selected theme - themeSet="$OPTARG" ;; - q) - quiet=true - ;; - *) # invalid option - echo "... invalid option ..." - echo "$(basename "${0}") -[option]" - echo "n : set next theme" - echo "p : set previous theme" - echo "s : set input theme" - exit 1 - ;; - esac + case $option in + + n) # set next theme + Theme_Change n + export xtrans="grow" + ;; + + p) # set previous theme + Theme_Change p + export xtrans="outer" + ;; + + s) # set selected theme + themeSet="$OPTARG" ;; + q) + quiet=true + ;; + *) # invalid option + echo "... invalid option ..." + echo "$(basename "${0}") -[option]" + echo "n : set next theme" + echo "p : set previous theme" + echo "s : set input theme" + exit 1 + ;; + esac done #// update control file @@ -106,32 +106,38 @@ source "${scrDir}/globalcontrol.sh" #// hypr # shellcheck disable=SC2154 # Updates the compositor theme data in advance +[[ -n $HYPRLAND_INSTANCE_SIGNATURE ]] && hyprctl keyword misc:disable_autoreload 1 -q sanitize_hypr_theme "${HYDE_THEME_DIR}/hypr.theme" "${XDG_CONFIG_HOME}/hypr/themes/theme.conf" # shellcheck disable=SC2154 if [ "${enableWallDcol}" -eq 0 ]; then - gtkTheme="$(get_hyprConf "GTK_THEME")" + GTK_THEME="$(get_hyprConf "GTK_THEME")" else - gtkTheme="Wallbash-Gtk" + GTK_THEME="Wallbash-Gtk" fi -gtkIcon="$(get_hyprConf "ICON_THEME")" -cursorTheme="$(get_hyprConf "CURSOR_THEME")" +GTK_ICON="$(get_hyprConf "ICON_THEME")" +CURSOR_THEME="$(get_hyprConf "CURSOR_THEME")" font_name="$(get_hyprConf "FONT")" font_size="$(get_hyprConf "FONT_SIZE")" monospace_font_name="$(get_hyprConf "MONOSPACE_FONT")" +# Early load the icon theme so that it is available for the rest of the script +if ! dconf write /org/gnome/desktop/interface/icon-theme "'${GTK_ICON}'"; then + print_log -sec "theme" -warn "dconf" "failed to set icon theme" +fi + # legacy and directory resolution if [ -d /run/current-system/sw/share/themes ]; then - export themesDir=/run/current-system/sw/share/themes + export themesDir=/run/current-system/sw/share/themes fi -if [ ! -d "${themesDir}/${gtkTheme}" ] && [ -d "$HOME/.themes/${gtkTheme}" ]; then - cp -rns "$HOME/.themes/${gtkTheme}" "${themesDir}/${gtkTheme}" +if [ ! -d "${themesDir}/${GTK_THEME}" ] && [ -d "$HOME/.themes/${GTK_THEME}" ]; then + cp -rns "$HOME/.themes/${GTK_THEME}" "${themesDir}/${GTK_THEME}" fi #// qt5ct -toml_write "${confDir}/qt5ct/qt5ct.conf" "Appearance" "icon_theme" "${gtkIcon}" +toml_write "${confDir}/qt5ct/qt5ct.conf" "Appearance" "icon_theme" "${GTK_ICON}" toml_write "${confDir}/qt5ct/qt5ct.conf" "Fonts" "general" "\"${font_name},10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,\"" toml_write "${confDir}/qt5ct/qt5ct.conf" "Fonts" "fixed" "\"${monospace_font_name},9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,\"" # toml_write "${confDir}/qt5ct/qt5ct.conf" "Appearance" "color_scheme_path" "${confDir}/qt5ct/colors/colors.conf" @@ -139,7 +145,7 @@ toml_write "${confDir}/qt5ct/qt5ct.conf" "Fonts" "fixed" "\"${monospace_font_nam # // qt6ct -toml_write "${confDir}/qt6ct/qt6ct.conf" "Appearance" "icon_theme" "${gtkIcon}" +toml_write "${confDir}/qt6ct/qt6ct.conf" "Appearance" "icon_theme" "${GTK_ICON}" toml_write "${confDir}/qt6ct/qt6ct.conf" "Fonts" "general" "\"${font_name},10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,\"" toml_write "${confDir}/qt6ct/qt6ct.conf" "Fonts" "fixed" "\"${monospace_font_name},9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,\"" # toml_write "${confDir}/qt6ct/qt6ct.conf" "Appearance" "color_scheme_path" "${confDir}/qt6ct/colors/colors.conf" @@ -147,7 +153,7 @@ toml_write "${confDir}/qt6ct/qt6ct.conf" "Fonts" "fixed" "\"${monospace_font_nam # // kde plasma -toml_write "${confDir}/kdeglobals" "Icons" "Theme" "${gtkIcon}" +toml_write "${confDir}/kdeglobals" "Icons" "Theme" "${GTK_ICON}" toml_write "${confDir}/kdeglobals" "General" "TerminalApplication" "${TERMINAL}" toml_write "${confDir}/kdeglobals" "UiSettings" "ColorScheme" "colors" @@ -158,29 +164,29 @@ toml_write "${confDir}/kdeglobals" "KDE" "widgetStyle" "kvantum" # // The default cursor theme // fallback -toml_write "${XDG_DATA_HOME}/icons/default/index.theme" "Icon Theme" "Inherits" "${cursorTheme}" -toml_write "${HOME}/.icons/default/index.theme" "Icon Theme" "Inherits" "${cursorTheme}" +toml_write "${XDG_DATA_HOME}/icons/default/index.theme" "Icon Theme" "Inherits" "${CURSOR_THEME}" +toml_write "${HOME}/.icons/default/index.theme" "Icon Theme" "Inherits" "${CURSOR_THEME}" # // gtk2 -sed -i -e "/^gtk-theme-name=/c\gtk-theme-name=\"${gtkTheme}\"" \ - -e "/^include /c\include \"$HOME/.gtkrc-2.0.mime\"" \ - -e "/^gtk-cursor-theme-name=/c\gtk-cursor-theme-name=\"${cursorTheme}\"" \ - -e "/^gtk-icon-theme-name=/c\gtk-icon-theme-name=\"${gtkIcon}\"" "$HOME/.gtkrc-2.0" +sed -i -e "/^gtk-theme-name=/c\gtk-theme-name=\"${GTK_THEME}\"" \ + -e "/^include /c\include \"$HOME/.gtkrc-2.0.mime\"" \ + -e "/^gtk-cursor-theme-name=/c\gtk-cursor-theme-name=\"${CURSOR_THEME}\"" \ + -e "/^gtk-icon-theme-name=/c\gtk-icon-theme-name=\"${GTK_ICON}\"" "$HOME/.gtkrc-2.0" #// gtk3 -toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-theme-name" "${gtkTheme}" -toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-icon-theme-name" "${gtkIcon}" -toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-cursor-theme-name" "${cursorTheme}" +toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-theme-name" "${GTK_THEME}" +toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-icon-theme-name" "${GTK_ICON}" +toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-cursor-theme-name" "${CURSOR_THEME}" toml_write "${confDir}/gtk-3.0/settings.ini" "Settings" "gtk-font-name" "${font_name} ${font_size}" #// gtk4 -if [ -d "${themesDir}/${gtkTheme}/gtk-4.0" ]; then - gtk4Theme="${gtkTheme}" +if [ -d "${themesDir}/${GTK_THEME}/gtk-4.0" ]; then + gtk4Theme="${GTK_THEME}" else - gtk4Theme="Wallbash-Gtk" - print_log -sec "theme" -stat "use" "'Wallbash-Gtk' as gtk4 theme" + gtk4Theme="Wallbash-Gtk" + print_log -sec "theme" -stat "use" "'Wallbash-Gtk' as gtk4 theme" fi rm -rf "${confDir}/gtk-4.0" ln -s "${themesDir}/${gtk4Theme}/gtk-4.0" "${confDir}/gtk-4.0" @@ -188,48 +194,49 @@ ln -s "${themesDir}/${gtk4Theme}/gtk-4.0" "${confDir}/gtk-4.0" #// flatpak GTK if pkg_installed flatpak; then - flatpak \ - --user override \ - --filesystem="${themesDir}":ro \ - --filesystem="$HOME/.themes":ro \ - --filesystem="$HOME/.icons":ro \ - --filesystem="$HOME/.local/share/icons":ro \ - --env=GTK_THEME="${gtk4Theme}" \ - --env=ICON_THEME="${gtkIcon}" + flatpak \ + --user override \ + --filesystem="${themesDir}":ro \ + --filesystem="$HOME/.themes":ro \ + --filesystem="$HOME/.icons":ro \ + --filesystem="$HOME/.local/share/icons":ro \ + --env=GTK_THEME="${gtk4Theme}" \ + --env=ICON_THEME="${GTK_ICON}" - flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo & + flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo & fi # // xsettingsd -sed -i -e "/^Net\/ThemeName /c\Net\/ThemeName \"${gtkTheme}\"" \ - -e "/^Net\/IconThemeName /c\Net\/IconThemeName \"${gtkIcon}\"" \ - -e "/^Gtk\/CursorThemeName /c\Gtk\/CursorThemeName \"${cursorTheme}\"" \ - "$confDir/xsettingsd/xsettingsd.conf" +sed -i -e "/^Net\/ThemeName /c\Net\/ThemeName \"${GTK_THEME}\"" \ + -e "/^Net\/IconThemeName /c\Net\/IconThemeName \"${GTK_ICON}\"" \ + -e "/^Gtk\/CURSOR_THEMEName /c\Gtk\/CURSOR_THEMEName \"${CURSOR_THEME}\"" \ + "$confDir/xsettingsd/xsettingsd.conf" # // Legacy themes using ~/.themes also fixed GTK4 not following xdg -if [ ! -L "$HOME/.themes/${gtkTheme}" ] && [ -d "${themesDir}/${gtkTheme}" ]; then - print_log -sec "theme" -warn "linking" "${gtkTheme} to ~/.themes to fix GTK4 not following xdg" - mkdir -p "$HOME/.themes" - rm -rf "$HOME/.themes/${gtkTheme}" - ln -snf "${themesDir}/${gtkTheme}" "$HOME/.themes/" +if [ ! -L "$HOME/.themes/${GTK_THEME}" ] && [ -d "${themesDir}/${GTK_THEME}" ]; then + print_log -sec "theme" -warn "linking" "${GTK_THEME} to ~/.themes to fix GTK4 not following xdg" + mkdir -p "$HOME/.themes" + rm -rf "$HOME/.themes/${GTK_THEME}" + ln -snf "${themesDir}/${GTK_THEME}" "$HOME/.themes/" fi #// wallpaper export -f pkg_installed export scrDir -find "$HYDE_CACHE_HOME/wallpapers" -name "*.png" -exec sh -c ' + +[[ -d "$HYDE_CACHE_HOME/wallpapers/" ]] && find "$HYDE_CACHE_HOME/wallpapers" -name "*.png" -exec sh -c ' for file; do base=$(basename "$file" .png) if pkg_installed ${base}; then "${scrDir}/wallpaper.sh" --link --backend "${base}" fi done -' sh {} + +' sh {} + & if [ "$quiet" = true ]; then - "${scrDir}/wallpaper.sh" -s "$(readlink "${HYDE_THEME_DIR}/wall.set")" --global >/dev/null 2>&1 + "${scrDir}/wallpaper.sh" -s "$(readlink "${HYDE_THEME_DIR}/wall.set")" --global >/dev/null 2>&1 else - "${scrDir}/wallpaper.sh" -s "$(readlink "${HYDE_THEME_DIR}/wall.set")" --global + "${scrDir}/wallpaper.sh" -s "$(readlink "${HYDE_THEME_DIR}/wall.set")" --global fi diff --git a/Configs/.local/lib/hyde/wallpaper.sh b/Configs/.local/lib/hyde/wallpaper.sh index 2aad0c388..06175d6fd 100755 --- a/Configs/.local/lib/hyde/wallpaper.sh +++ b/Configs/.local/lib/hyde/wallpaper.sh @@ -19,6 +19,7 @@ options: -g, --get Get current wallpaper of specified backend -o, --output Copy current wallpaper to specified file --link Resolved the linked wallpaper according to the theme + -t --filetypes Specify file types to override (colon-separated ':') -h, --help Display this help message flags: @@ -48,7 +49,7 @@ Wall_Cache() { if [ "${set_as_global}" == "true" ]; then print_log -sec "wallpaper" "Setting Wallpaper as global" "${scrDir}/swwwallcache.sh" -w "${wallList[setIndex]}" &>/dev/null - "${scrDir}/swwwallbash.sh" "${wallList[setIndex]}" & + "${scrDir}/color.set.sh" "${wallList[setIndex]}" & ln -fs "${thmbDir}/${wallHash[setIndex]}.sqre" "${wallSqr}" ln -fs "${thmbDir}/${wallHash[setIndex]}.thmb" "${wallTmb}" ln -fs "${thmbDir}/${wallHash[setIndex]}.blur" "${wallBlr}" @@ -290,15 +291,18 @@ if [ -z "${*}" ]; then fi # Define long options -LONGOPTS="link,global,select,json,next,previous,random,set:,backend:,get,output:,help" +LONGOPTS="link,global,select,json,next,previous,random,set:,backend:,get,output:,help,filetypes:" # Parse options PARSED=$( - if getopt --options GSjnprb:s:go:h --longoptions $LONGOPTS --name "$0" -- "$@"; then + if getopt --options GSjnprb:s:t:go:h --longoptions $LONGOPTS --name "$0" -- "$@"; then exit 2 fi ) +# Initialize the array for filetypes +WALLPAPER_OVERRIDE_FILETYPES=() + wallpaper_backend="${WALLPAPER_BACKEND:-swww}" wallpaper_setter_flag="" # Apply parsed options @@ -354,6 +358,16 @@ while true; do wallpaper_output="${2}" shift 2 ;; + -t | --filetypes) + IFS=':' read -r -a WALLPAPER_OVERRIDE_FILETYPES <<<"$2" + if [ "${LOG_LEVEL}" == "debug" ]; then + for i in "${WALLPAPER_OVERRIDE_FILETYPES[@]}"; do + print_log -g "DEBUG:" -b "filetype overrides : " "'${i}'" + done + fi + export WALLPAPER_OVERRIDE_FILETYPES + shift 2 + ;; -h | --help) show_help ;; diff --git a/Configs/.local/lib/hyde/workflows.sh b/Configs/.local/lib/hyde/workflows.sh new file mode 100755 index 000000000..44fb34451 --- /dev/null +++ b/Configs/.local/lib/hyde/workflows.sh @@ -0,0 +1,196 @@ +#!/usr/bin/env bash + +# shellcheck source=$HOME/.local/bin/hyde-shell +# shellcheck disable=SC1091 +if ! source "$(which hyde-shell)"; then + echo "[wallbash] code :: Error: hyde-shell not found." + echo "[wallbash] code :: Is HyDE installed?" + exit 1 +fi +# Set variables +confDir="${XDG_CONFIG_HOME:-$HOME/.config}" +workflows_dir="$confDir/hypr/workflows" + +# Ensure the workflows directory exists +if [ ! -d "$workflows_dir" ]; then + notify-send -i "preferences-desktop-display" "Error" "Workflows directory does not exist at $workflows_dir" + exit 1 +fi + +# Show help function +show_help() { + cat </dev/null) + + # Set rofi scaling + font_scale="${ROFI_WORKFLOW_SCALE}" + [[ "${font_scale}" =~ ^[0-9]+$ ]] || font_scale=${ROFI_SCALE:-10} + + # Set font name + font_name=${ROFI_WORKFLOW_FONT:-$ROFI_FONT} + font_name=${font_name:-$(get_hyprConf "MENU_FONT")} + font_name=${font_name:-$(get_hyprConf "FONT")} + + # Set rofi font override + font_override="* {font: \"${font_name:-\"JetBrainsMono Nerd Font\"} ${font_scale}\";}" + + # Window and element styling + hypr_border=${hypr_border:-"$(hyprctl -j getoption decoration:rounding | jq '.int')"} + wind_border=$((hypr_border * 3 / 2)) + elem_border=$((hypr_border == 0 ? 5 : hypr_border)) + hypr_width=${hypr_width:-"$(hyprctl -j getoption general:border_size | jq '.int')"} + r_override="window{border:${hypr_width}px;border-radius:${wind_border}px;} wallbox{border-radius:${elem_border}px;} element{border-radius:${elem_border}px;}" + + rofi_select="${HYPR_WORKFLOW/default/default}" + + # Display options using Rofi with custom scaling, positioning, and placeholder + selected_workflow=$(echo -e "${workflow_list}" | + rofi -dmenu -i -select "$rofi_select" \ + -p "Select workflow" \ + -theme-str "entry { placeholder: \"๐Ÿ’ผ Select workflow...\"; }" \ + -theme-str "${font_override}" \ + -theme-str "${r_override}" \ + -theme-str "$(get_rofi_pos)" \ + -theme "clipboard") + + # Exit if no selection was made + if [ -z "$selected_workflow" ]; then + exit 0 + fi + + # Extract the workflow name (remove the icon and tab) + selected_workflow=$(awk -F'\t' '{print $2}' <<<"${selected_workflow}" | xargs) + set_conf "HYPR_WORKFLOW" "$selected_workflow" + fn_update +} + +get_info() { + + [ -f "$HYDE_STATE_HOME/config" ] && source "$HYDE_STATE_HOME/config" + [ -f "$HYDE_STATE_HOME/staterc" ] && source "$HYDE_STATE_HOME/staterc" + current_workflow=${HYPR_WORKFLOW:-"default"} + + current_icon=$(get_hyprConf "WORKFLOW_ICON" "${workflows_dir}/${current_workflow}.conf") + current_icon=${current_icon:0:1} + current_description=$(get_hyprConf "WORKFLOW_DESCRIPTION" "${workflows_dir}/${current_workflow}.conf") + current_description=${current_description:-"No description available"} + export current_icon current_workflow current_description +} + +fn_update() { + get_info + cat <"${confDir}/hypr/workflows.conf" +#! โ–ˆโ–‘โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–€โ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–‘โ–‘โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€ +#! โ–€โ–„โ–€โ–„โ–€โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–€โ–„โ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–€โ–‘โ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–€โ–„โ–€โ–„โ–€โ€ƒโ–„โ–ˆ + +# This file sets the current workflow for Hyprland +# HyDE Controlled content // DO NOT EDIT +# Edit or add workflows in the ./workflows/ directory +# and run the 'workflows.sh select' command to update this file + +# Workflows are a set of configurations that can be applied to Hyprland +# that suits the actual workflow you are doing. +# It can be gaming mode, work mode, or anything else you can think of. +# you can also exec a command within the workflow + +\$WORKFLOW = ${current_workflow} +\$WORKFLOW_ICON = ${current_icon} +\$WORKFLOW_DESCRIPTION = ${current_description} +\$WORKFLOWS_PATH = ./workflows/${current_workflow}.conf +source = \$WORKFLOWS_PATH + +EOF + + printf "%s %s: %s\n" "$current_icon" "$current_workflow" "$current_description" + notify-send -r 9 -i "preferences-desktop-display" "Workflow: ${current_icon} $current_workflow" "${current_description}" + +} + +handle_waybar() { + get_info + text="$current_icon" + tooltip="Mode: ${current_icon} ${current_workflow} \n${current_description}" + class="custom-workflows" + + echo "{\"text\": \"${text}\", \"tooltip\": \"${tooltip}\", \"class\": \"${class}\"}" + +} + +# Process options +while true; do + case "$1" in + -S | --select) + fn_select + # refresh waybar module only if waybar is running + if pgrep -x waybar >/dev/null; then + pkill -RTMIN+7 waybar + fi + + exit 0 + ;; + --help | -h) + show_help + exit 0 + ;; + --waybar) + handle_waybar + exit 0 + ;; + --) + shift + break + ;; + *) + echo "Invalid option: $1" + show_help + exit 1 + ;; + esac +done diff --git a/Configs/.local/share/fastfetch/presets/hyde/config.jsonc b/Configs/.local/share/fastfetch/presets/hyde/config.jsonc index 872188f7e..c4a30ce93 100644 --- a/Configs/.local/share/fastfetch/presets/hyde/config.jsonc +++ b/Configs/.local/share/fastfetch/presets/hyde/config.jsonc @@ -1,125 +1,120 @@ { - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "source": "$(fastfetch.sh logo)", - "type": "kitty", - "height": 13, - "width": 26, - "padding": { - "top": 5, - "left": 3 - } - }, - "display": { - "separator": " : " - }, - "modules": [ - { - "type": "command", - "key": " ๏•—", - "keyColor": "blue", - "text": "splash=$(hyprctl splash);echo $splash" - }, - { - "type": "custom", - "format": "โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”" - }, - { - "type": "chassis", - "key": " ๓ฐ‡บ Chassis", - "format": "{1} {2} {3}" - }, - { - "type": "os", - "key": " ๓ฐฃ‡ OS", - "format": "{2}", - "keyColor": "red" - }, - { - "type": "kernel", - "key": " ๎‰ฒ Kernel", - "format": "{2}", - "keyColor": "red" - }, - { - "type": "packages", - "key": " ๓ฐ— Packages", - "keyColor": "green" - }, - { - "type": "display", - "key": " ๓ฐน Display", - "format": "{1}x{2} @ {3}Hz [{7}]", - "keyColor": "green" - }, - { - "type": "terminal", - "key": " ๏„  Terminal", - "keyColor": "yellow" - }, - { - "type": "wm", - "key": " ๓ฑ—ƒ WM", - "format": "{2}", - "keyColor": "yellow" - }, - { - "type": "custom", - "format": "โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜" - }, - "break", - { - "type": "title", - "key": " ๎ท…", - "format": "{6} {7} {8}" - }, - { - "type": "custom", - "format": "โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”" - }, - { - "type": "cpu", - "format": "{1} @ {7}", - "key": " ๏’ผ CPU", - "keyColor": "blue" - }, - { - "type": "gpu", - "format": "{1} {2}", - "key": " ๓ฐŠด GPU", - "keyColor": "blue" - }, - { - "type": "gpu", - "format": "{3}", - "key": " ๏€ฉ GPU Driver", - "keyColor": "magenta" - }, - { - "type": "memory", - "key": " ๏กš Memory ", - "keyColor": "magenta" - }, - { - "type": "command", - "key": " ๓ฑฆŸ OS Age ", - "keyColor": "red", - "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" - }, - { - "type": "uptime", - "key": " ๓ฑซ Uptime ", - "keyColor": "red" - }, - { - "type": "custom", - "format": "โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜" - }, - { - "type": "colors", - "paddingLeft": 2, - "symbol": "circle" - }, - "break" - ] -} \ No newline at end of file + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "\"$(fastfetch.sh logo)\"", + "height": 18 + }, + "display": { + "separator": " : " + }, + "modules": [ + { + "type": "command", + "key": " ๏•—", + "keyColor": "blue", + "text": "splash=$(hyprctl splash);echo $splash" + }, + { + "type": "custom", + "format": "โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”" + }, + { + "type": "chassis", + "key": " ๓ฐ‡บ Chassis", + "format": "{1} {2} {3}" + }, + { + "type": "os", + "key": " ๓ฐฃ‡ OS", + "format": "{2}", + "keyColor": "red" + }, + { + "type": "kernel", + "key": " ๎‰ฒ Kernel", + "format": "{2}", + "keyColor": "red" + }, + { + "type": "packages", + "key": " ๓ฐ— Packages", + "keyColor": "green" + }, + { + "type": "display", + "key": " ๓ฐน Display", + "format": "{1}x{2} @ {3}Hz [{7}]", + "keyColor": "green" + }, + { + "type": "terminal", + "key": " ๏„  Terminal", + "keyColor": "yellow" + }, + { + "type": "wm", + "key": " ๓ฑ—ƒ WM", + "format": "{2}", + "keyColor": "yellow" + }, + { + "type": "custom", + "format": "โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜" + }, + "break", + { + "type": "title", + "key": " ๎ท…", + "format": "{6} {7} {8}" + }, + { + "type": "custom", + "format": "โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”" + }, + { + "type": "cpu", + "format": "{1} @ {7}", + "key": " ๏’ผ CPU", + "keyColor": "blue" + }, + { + "type": "gpu", + "format": "{1} {2}", + "key": " ๓ฐŠด GPU", + "keyColor": "blue" + }, + { + "type": "gpu", + "format": "{3}", + "key": " ๏€ฉ GPU Driver", + "keyColor": "magenta" + }, + { + "type": "memory", + "key": " ๏กš Memory ", + "keyColor": "magenta" + }, + { + "type": "disk", + "key": " ๓ฑฆŸ OS Age ", + "folders": "/", + "keyColor": "red", + "format": "{days} days" + }, + { + "type": "uptime", + "key": " ๓ฑซ Uptime ", + "keyColor": "red" + }, + { + "type": "custom", + "format": "โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜" + }, + { + "type": "colors", + "paddingLeft": 2, + "symbol": "circle" + }, + "break" + ] +} diff --git a/Configs/.local/share/fastfetch/presets/hyde/lierb.jsonc b/Configs/.local/share/fastfetch/presets/hyde/lierb.jsonc index 558dc80bd..66e275e9f 100644 --- a/Configs/.local/share/fastfetch/presets/hyde/lierb.jsonc +++ b/Configs/.local/share/fastfetch/presets/hyde/lierb.jsonc @@ -6,116 +6,116 @@ // by Bina // Credits to https://github.com/LierB/fastfetch { - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "source": "$(fastfetch.sh logo)", - "type": "kitty", - "height": 13, - "width": 26, - "padding": { - "top": 5, - "left": 3 - } - }, - "display": { - "separator": " โžœ " - }, - "modules": [ - "break", - "break", - "break", - { - "type": "os", - "key": "OS ", - "keyColor": "31" // = color1 - }, - { - "type": "kernel", - "key": " โ”œ ๏€“ ", - "keyColor": "31" - }, - { - "type": "packages", - "format": "{} (pacman)", - "key": " โ”œ ๓ฐ– ", - "keyColor": "31" - }, - { - "type": "shell", - "key": " โ”” ๏’‰ ", - "keyColor": "31" - }, - "break", - { - "type": "wm", - "key": "WM ", - "keyColor": "32" - }, - { - "type": "wmtheme", - "key": " โ”œ ๓ฐ‰ผ ", - "keyColor": "32" - }, - { - "type": "icons", - "key": " โ”œ ๓ฐ€ป ", - "keyColor": "32" - }, - { - "type": "cursor", - "key": " โ”œ ๎˜ฃ ", - "keyColor": "32" - }, - { - "type": "terminal", - "key": " โ”œ ๎ž• ", - "keyColor": "32" - }, - { - "type": "terminalfont", - "key": " โ”” ๏€ฑ ", - "keyColor": "32" - }, - "break", - { - "type": "host", - "format": "{5} {1} Type {2}", - "key": "PC ", - "keyColor": "33" - }, - { - "type": "cpu", - "format": "{1} ({3}) @ {7} GHz", - "key": " โ”œ ๏’ผ ", - "keyColor": "33" - }, - { - "type": "gpu", - "format": "{1} {2} @ {12} GHz", - "key": " โ”œ ๓ฐขฎ ", - "keyColor": "33" - }, - { - "type": "memory", - "key": " โ”œ ๏‹› ", - "keyColor": "33" - }, - { - "type": "swap", - "key": " โ”œ ๓ฐ“ก ", - "keyColor": "33" - }, - { - "type": "disk", - "key": " โ”œ ๓ฐ‹Š ", - "keyColor": "33" - }, - { - "type": "monitor", - "key": " โ”” ๏„ˆ ", - "keyColor": "33" - }, - "break", - "break" - ] -} \ No newline at end of file + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "\"$(fastfetch.sh logo)\"", + "type": "kitty", + "height": 13, + "width": 26, + "padding": { + "top": 5, + "left": 3 + } + }, + "display": { + "separator": " โžœ " + }, + "modules": [ + "break", + "break", + "break", + { + "type": "os", + "key": "OS ", + "keyColor": "31" // = color1 + }, + { + "type": "kernel", + "key": " โ”œ ๏€“ ", + "keyColor": "31" + }, + { + "type": "packages", + "format": "{} (pacman)", + "key": " โ”œ ๓ฐ– ", + "keyColor": "31" + }, + { + "type": "shell", + "key": " โ”” ๏’‰ ", + "keyColor": "31" + }, + "break", + { + "type": "wm", + "key": "WM ", + "keyColor": "32" + }, + { + "type": "wmtheme", + "key": " โ”œ ๓ฐ‰ผ ", + "keyColor": "32" + }, + { + "type": "icons", + "key": " โ”œ ๓ฐ€ป ", + "keyColor": "32" + }, + { + "type": "cursor", + "key": " โ”œ ๎˜ฃ ", + "keyColor": "32" + }, + { + "type": "terminal", + "key": " โ”œ ๎ž• ", + "keyColor": "32" + }, + { + "type": "terminalfont", + "key": " โ”” ๏€ฑ ", + "keyColor": "32" + }, + "break", + { + "type": "host", + "format": "{5} {1} Type {2}", + "key": "PC ", + "keyColor": "33" + }, + { + "type": "cpu", + "format": "{1} ({3}) @ {7} GHz", + "key": " โ”œ ๏’ผ ", + "keyColor": "33" + }, + { + "type": "gpu", + "format": "{1} {2} @ {12} GHz", + "key": " โ”œ ๓ฐขฎ ", + "keyColor": "33" + }, + { + "type": "memory", + "key": " โ”œ ๏‹› ", + "keyColor": "33" + }, + { + "type": "swap", + "key": " โ”œ ๓ฐ“ก ", + "keyColor": "33" + }, + { + "type": "disk", + "key": " โ”œ ๓ฐ‹Š ", + "keyColor": "33" + }, + { + "type": "monitor", + "key": " โ”” ๏„ˆ ", + "keyColor": "33" + }, + "break", + "break" + ] +} diff --git a/Configs/.local/share/fastfetch/presets/hyde/xero.jsonc b/Configs/.local/share/fastfetch/presets/hyde/xero.jsonc index 3382f8c3d..92ffe3c5a 100644 --- a/Configs/.local/share/fastfetch/presets/hyde/xero.jsonc +++ b/Configs/.local/share/fastfetch/presets/hyde/xero.jsonc @@ -1,126 +1,127 @@ // Modified from: https://github.com/fastfetch-cli/fastfetch/pull/1025#issuecomment-2177566138 // Modified by: The HyDE Project { - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "source": "$(fastfetch.sh logo)", - "type": "kitty", - "height": 13, - "width": 26, - "padding": { - "top": 5, - "left": 3 - } - }, - "display": { - "color": { - "separator": "blue" - }, - "separator": " | " - }, - "modules": [ - "break", - "break", - { - "type": "kernel", - "key": " HyDE ", - "keyColor": "magenta" - }, - { - "type": "custom", - "format": ">-----------<+>------------------------------------------<", - "outputColor": "separator" - }, - { - "type": "host", - "key": "๏„‰ MRB ", - "keyColor": "cyan" - }, - { - "type": "memory", - "key": "๎ฟ… RAM ", - "keyColor": "cyan" - }, - { - "type": "cpu", - "key": "๓ฐ› CPU ", - "showPeCoreCount": true, - "keyColor": "cyan" - }, - { - "type": "gpu", - "key": "๓ฐ› GPU ", - "keyColor": "cyan" - // "text": "lspci | grep -i vga | awk -F': | \\\\[|\\\\]' '{print $2 \" [\" $3 \"]\"}'" - }, - // { - // "type": "disk", - // "key": "๓ฐ‰‰ Disk ", - // "keyColor": "cyan", - // }, - { - "type": "custom", - "format": ">-----------<+>------------------------------------------<", - "outputColor": "separator" - }, - { - "type": "wmtheme", - "key": "๓ฐ‰ผ Theme ", - "keyColor": "green" - }, - { - "type": "shell", - "key": "๏’‰ Shell ", - "keyColor": "green" - }, - { - "type": "wm", - "key": "๏€“ Session ", - "keyColor": "green" - }, - { - "type": "terminal", - "key": "๎ž• Terminal ", - "keyColor": "green" - }, - { - "type": "de", - "key": "๏’ˆ Desktop ", - "keyColor": "green" - }, - { - "type": "packages", - "key": "๓ฐ– Packages ", - "keyColor": "green" - }, - { - "type": "gpu", - "key": "๓ฐ› G-Driver ", - "format": "{3}", - "keyColor": "green" - }, - { - "type": "custom", - "format": ">-----------<+>------------------------------------------<", - "outputColor": "separator" - }, - { - "type": "command", - "key": "๓ฐ… OS Age ", - "keyColor": "blue", - "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" - }, - { - "type": "uptime", - "key": "๓ฐ… Uptime ", - "keyColor": "blue" - }, - { - "type": "custom", - "format": ">-----------<+>------------------------------------------<", - "outputColor": "separator" - }, - "break", - "break" - ] -} \ No newline at end of file + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "source": "\"$(fastfetch.sh logo)\"", + "type": "kitty", + "height": 13, + "width": 26, + "padding": { + "top": 5, + "left": 3 + } + }, + "display": { + "color": { + "separator": "blue" + }, + "separator": " | " + }, + "modules": [ + "break", + "break", + { + "type": "kernel", + "key": " HyDE ", + "keyColor": "magenta" + }, + { + "type": "custom", + "format": ">-----------<+>------------------------------------------<", + "outputColor": "separator" + }, + { + "type": "host", + "key": "๏„‰ MRB ", + "keyColor": "cyan" + }, + { + "type": "memory", + "key": "๎ฟ… RAM ", + "keyColor": "cyan" + }, + { + "type": "cpu", + "key": "๓ฐ› CPU ", + "showPeCoreCount": true, + "keyColor": "cyan" + }, + { + "type": "gpu", + "key": "๓ฐ› GPU ", + "keyColor": "cyan" + // "text": "lspci | grep -i vga | awk -F': | \\\\[|\\\\]' '{print $2 \" [\" $3 \"]\"}'" + }, + // { + // "type": "disk", + // "key": "๓ฐ‰‰ Disk ", + // "keyColor": "cyan", + // }, + { + "type": "custom", + "format": ">-----------<+>------------------------------------------<", + "outputColor": "separator" + }, + { + "type": "wmtheme", + "key": "๓ฐ‰ผ Theme ", + "keyColor": "green" + }, + { + "type": "shell", + "key": "๏’‰ Shell ", + "keyColor": "green" + }, + { + "type": "wm", + "key": "๏€“ Session ", + "keyColor": "green" + }, + { + "type": "terminal", + "key": "๎ž• Terminal ", + "keyColor": "green" + }, + { + "type": "de", + "key": "๏’ˆ Desktop ", + "keyColor": "green" + }, + { + "type": "packages", + "key": "๓ฐ– Packages ", + "keyColor": "green" + }, + { + "type": "gpu", + "key": "๓ฐ› G-Driver ", + "format": "{3}", + "keyColor": "green" + }, + { + "type": "custom", + "format": ">-----------<+>------------------------------------------<", + "outputColor": "separator" + }, + { + "type": "disk", + "key": "๓ฐ… OS Age ", + "keyColor": "blue", + "folders": "/", + "format": "{days} days" + }, + { + "type": "uptime", + "key": "๓ฐ… Uptime ", + "keyColor": "blue" + }, + { + "type": "custom", + "format": ">-----------<+>------------------------------------------<", + "outputColor": "separator" + }, + "break", + "break" + ] +} diff --git a/Configs/.local/share/hyde/config.toml b/Configs/.local/share/hyde/config.toml index 028eac3d9..a5e17f195 100644 --- a/Configs/.local/share/hyde/config.toml +++ b/Configs/.local/share/hyde/config.toml @@ -43,7 +43,7 @@ scale = 8 # glyph-picker.sh configuration scale = 8 -[rofi.launcher] +[rofi.launch] # rofilaunch.sh configuration # style = "10" scale = 5 diff --git a/Configs/.local/share/hyde/hyde.conf b/Configs/.local/share/hyde/hyde.conf index 6a8c698ef..8fac8f119 100644 --- a/Configs/.local/share/hyde/hyde.conf +++ b/Configs/.local/share/hyde/hyde.conf @@ -98,7 +98,7 @@ $env.XDG_CACHE_HOME=$HOME/.cache $env.XDG_DATA_HOME=$HOME/.local/share # These variable will override the default and the theme configuration -# Do not uncomment the variables if you want want HyDE do the theme configuration for you +# Do not uncomment the variables if you want HyDE to do the theme configuration for you # // โ–ˆโ–€โ–€โ€ƒโ–€โ–ˆโ–€โ€ƒโ–ˆโ–„โ–€ # // โ–ˆโ–„โ–ˆโ€ƒโ–‘โ–ˆโ–‘โ€ƒโ–ˆโ–‘โ–ˆ diff --git a/Configs/.local/share/hyde/hyprland.conf b/Configs/.local/share/hyde/hyprland.conf index b34a168b6..49ffb6316 100644 --- a/Configs/.local/share/hyde/hyprland.conf +++ b/Configs/.local/share/hyde/hyprland.conf @@ -196,7 +196,7 @@ animations { input { # See https://wiki.hyprland.org/Configuring/Variables/#input - force_no_accel = 1 + accel_profile = flat numlock_by_default = true } @@ -270,7 +270,6 @@ source = $env.XDG_CONFIG_HOME/hypr/animations.conf # source animations variables source = $env.XDG_CONFIG_HOME/hypr/hyde.conf # hyprlang noerror true source = $env.XDG_STATE_HOME/hyde/hyprland.conf # translated from config.toml -source = $ANIMATION_PATH # source animations configuration # hyprlang noerror false #! Below this is an immutable part of the configuration file, and should not be modified by the user. @@ -371,22 +370,25 @@ $dConf = $dConf monospace-font-name='$MONOSPACE_FONT $MONOSPACE_FONT_SIZE'\n $dConf = $dConf font-antialiasing='$FONT_ANTIALIASING'\n $dConf = $dConf font-hinting='$FONT_HINTING'\n $dConf = $dConf [org/gnome/desktop/default-applications/terminal]\nexec='$(which $TERMINAL)' -$dconf.preserve = dconf dump / > $dconFile +# $dconf.preserve = dconf dump / > $dconFile $dconf.populate = printf "$dConf" >> $dconFile -$dconf.reset = dconf reset -f / < $dconFile +# $dconf.reset = dconf reset -f / < $dconFile #! use dconf update instead $dconf.load = dconf load -f / < $dconFile +$dconf.update = dconf update $set.hyprCursor = hyprctl setcursor $CURSOR_THEME $CURSOR_SIZE -$exec.dConf = ( $dconf.preserve && $dconf.populate && $dconf.reset && $dconf.load && $set.hyprCursor ) +$exec.dConf = ( $dconf.populate && $dconf.load && $dconf.update && $set.hyprCursor ) $exec.keybinds_hint = $scrPath/keybinds.hint.py --format rofi > $env.XDG_RUNTIME_DIR/hyde/keybinds_hint.rofi # Execute -exec = $exec.mkdir & $set.env & $exec.dConf & $exec.animation & $exec.keybinds_hint +exec = $exec.dConf +exec = $exec.mkdir & $set.env & $exec.animation & $exec.keybinds_hint # // โ–ˆโ–‘โ–‘โ€ƒโ–„โ–€โ–ˆโ€ƒโ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ–„โ–‘โ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–‘โ–ˆ # // โ–ˆโ–„โ–„โ€ƒโ–ˆโ–€โ–ˆโ€ƒโ–ˆโ–„โ–ˆโ€ƒโ–ˆโ–‘โ–€โ–ˆโ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–€โ–ˆ - +exec-once = $exec.dConf +exec-once = $exec.mkdir & $set.env & $exec.animation & $exec.keybinds_hint exec-once = $start.XDG_PORTAL_RESET # reset XDPH for screenshare exec-once = $start.DBUS_SHARE_PICKER # for XDPHgl exec-once = $start.SYSTEMD_SHARE_PICKER # for XDPH @@ -403,7 +405,9 @@ exec-once = $start.BATTERY_NOTIFY # battery notification exec-once = $start.IDLE_DAEMON # idle daemon # hyde/config.toml is parsed and exported to the environment -exec-once = $scrPath/parse.config.py --daemon --input $env.XDG_CONFIG_HOME/hyde/config.toml --env $env.XDG_STATE_HOME/hyde/config --hypr $env.XDG_STATE_HOME/hyde/hyprland.conf +# exec-once = $scrPath/parse.config.py --daemon --input $env.XDG_CONFIG_HOME/hyde/config.toml --env $env.XDG_STATE_HOME/hyde/config --hypr $env.XDG_STATE_HOME/hyde/hyprland.conf +exec-once = systemctl --user start hyde-config.service #! If this is not working try the command above! + #? Rules can be added here as most of the configuration are dynamic diff --git a/Configs/.local/share/hyde/hyprlock.conf b/Configs/.local/share/hyde/hyprlock.conf index e240fa97c..d8f5fbc59 100644 --- a/Configs/.local/share/hyde/hyprlock.conf +++ b/Configs/.local/share/hyde/hyprlock.conf @@ -10,7 +10,6 @@ $PROFILE_IMAGE = $XDG_CACHE_HOME/hyde/landing/profile.png $GREET_TEXT =echo "Good $(date +%H | awk '{if ($1 < 12) print "Morning ๎Œโ€"; else if ($1 < 18) print "Afternoon ๎Œโ€"; else print "Evening ๏††โ€"}')" $CAVA_CMD= { [ -f /tmp/hyprlock-cava ] && tail -n 1 /tmp/hyprlock-cava 2>/dev/null ;} || { hyprctl dispatch exec "hyprlock.sh cava && rm /tmp/hyprlock-cava" ;} $WEATHER_CMD = echo "Feels like $(curl -s 'wttr.in?format=%t' | tr -d '+') " -$KEYBOARD_LAYOUT = grep -m 1 "$(hyprctl -j devices | jq -r '.keyboards[] | select(.main == true) | .active_keymap')" /usr/share/X11/xkb/rules/base.lst | awk '{print $1}' $BATTERY_ICON = battery.sh icon # hyprlang noerror true @@ -34,9 +33,10 @@ background { label { text = cmd[update:86400000] font.sh resolve "$LAYOUT_PATH" & disown - position = 50%, -20% + position = 0%, 0% font_size = 20 - valign = top + valign = bottom + halign = left } diff --git a/Configs/.local/share/hyde/keybindings.conf b/Configs/.local/share/hyde/keybindings.conf index bf65101d4..64fcc6b4d 100644 --- a/Configs/.local/share/hyde/keybindings.conf +++ b/Configs/.local/share/hyde/keybindings.conf @@ -138,10 +138,10 @@ bind = $mainMod+Ctrl+Alt, Left, movetoworkspace, r-1 # Move active window around current workspace with mainMod + SHIFT + CTRL [โ†โ†’โ†‘โ†“] $moveactivewindow=grep -q "true" <<< $(hyprctl activewindow -j | jq -r .floating) && hyprctl dispatch moveactive -binded = $mainMod SHIFT $CONTROL, left,Move activewindow to the right,exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l -binded = $mainMod SHIFT $CONTROL, right,Move activewindow to the right,exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r -binded = $mainMod SHIFT $CONTROL, up,Move activewindow to the right,exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u -binded = $mainMod SHIFT $CONTROL, down,Move activewindow to the right,exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d +binded = $mainMod SHIFT $CONTROL, left,Move active window to the left,exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l +binded = $mainMod SHIFT $CONTROL, right,Move active window to the right,exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r +binded = $mainMod SHIFT $CONTROL, up,Move active window up,exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u +binded = $mainMod SHIFT $CONTROL, down,Move active window down,exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d # Scroll through existing workspaces bind = $mainMod, mouse_down, workspace, e+1 diff --git a/Configs/.local/share/hyde/wallbash/theme/hyprlock.dcol b/Configs/.local/share/hyde/wallbash/theme/hyprlock.dcol index 71553899d..235605cc9 100644 --- a/Configs/.local/share/hyde/wallbash/theme/hyprlock.dcol +++ b/Configs/.local/share/hyde/wallbash/theme/hyprlock.dcol @@ -129,7 +129,7 @@ label { # Current Keyboard Layout label { monitor = - text = cmd[update:1000] $KEYBOARD_LAYOUT + text = $LAYOUT color = $wallbash_4xa9_rgba font_size = 20 font_family = $fontFamily diff --git a/Configs/.hyde.zshrc b/Configs/.user.zsh similarity index 89% rename from Configs/.hyde.zshrc rename to Configs/.user.zsh index 37194ddfd..18d5e85af 100644 --- a/Configs/.hyde.zshrc +++ b/Configs/.user.zsh @@ -2,8 +2,14 @@ # Commands to execute on startup (before the prompt is shown) # This is a good place to load graphic/ascii art, display system information, etc. -pokego --no-title -r 1,3,6 -# fastfetch --logo-type kitty +if command -v pokego >/dev/null; then + pokego --no-title -r 1,3,6 +elif command -v pokemon-colorscripts >/dev/null; then + pokemon-colorscripts --no-title -r 1,3,6 +elif command -v fastfetch >/dev/null; then + fastfetch --logo-type kitty +fi + # fastfetch.sh # ๏‘„ Aliases ๏‘„ diff --git a/Configs/.zshenv b/Configs/.zshenv index c0d387a4d..90ed997f6 100644 --- a/Configs/.zshenv +++ b/Configs/.zshenv @@ -4,7 +4,7 @@ #! ย  โ–‘โ–’โ–’โ–’โ–‘โ–‘โ–‘โ–“โ–“ ย  ย  ย  ย  ย ___________ #! โ–‘โ–‘โ–’โ–’โ–’โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“ ย  ย  ย  ย //___________/ #! โ–‘โ–‘โ–’โ–’โ–’โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“ ย  ย  _ ย  _ _ ย  ย _ _____ -#! โ–‘โ–‘โ–’โ–’โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“โ–“โ–“โ–“โ–“ | | | | | ย | | ย __/ +#! โ–‘โ–‘โ–’โ–’โ–‘โ–‘โ–‘โ–‘โ–‘โ–“โ–“โ–“โ–“โ–“ | | | | | ย | | ย __/ #! โ–‘โ–’โ–’โ–‘โ–‘โ–‘โ–‘โ–“โ–“ ย  โ–“โ–“ | |_| | |_/ /| |___ #! ย โ–‘โ–’โ–’โ–‘โ–‘โ–“โ–“ ย  โ–“โ–“ ย  \__ ย |____/ |____/ โ–€โ–ˆโ€ƒโ–ˆโ–€โ€ƒโ–ˆโ–‘โ–ˆ #! ย  ย โ–‘โ–’โ–“โ–“ ย  โ–“โ–“ ย //____/ โ–ˆโ–„โ€ƒโ–„โ–ˆโ€ƒโ–ˆโ–€โ–ˆ @@ -18,25 +18,13 @@ function command_not_found_handler { local purple='\e[1;35m' bright='\e[0;1m' green='\e[1;32m' reset='\e[0m' printf "${green}zsh${reset}: command ${purple}NOT${reset} found: ${bright}'%s'${reset}\n" "$1" - PM="pm.sh" - # Try to find pm.sh in common locations - if [ ! command -v "${PM}" ] &>/dev/null; then - for path in "/usr/lib/hyde" "/usr/local/lib/hyde" "$HOME/.local/lib/hyde" "$HOME/.local/bin"; do - if [[ -x "$path/pm.sh" ]]; then - PM="$path/pm.sh" - break - else - unset PM - fi - done - fi - - if ! command -v "${PM}" &>/dev/null; then - printf "${bright}${red}We cannot find package manager script (${purple}pm.sh${red}) from ${green}HyDE${reset}\n" + if ! ${PM_COMMAND[@]} -h &>/dev/null; then return 127 fi - if ! "${PM}" fq "/usr/bin/$1"; then + printf "${bright}Searching for packages that provide '${bright}%s${green}'...\n${reset}" "${1}" + + if ! "${PM_COMMAND[@]}" fq "/usr/bin/$1"; then printf "${bright}${green}[ ${1} ]${reset} ${purple}NOT${reset} found in the system and no package provides it.\n" return 127 else @@ -50,7 +38,8 @@ function command_not_found_handler { return 127 } -function load_zsh_plugins { +function _load_zsh_plugins { + unset -f _load_zsh_plugins # Oh-my-zsh installation path zsh_paths=( "$HOME/.oh-my-zsh" @@ -60,17 +49,17 @@ function load_zsh_plugins { for zsh_path in "${zsh_paths[@]}"; do [[ -d $zsh_path ]] && export ZSH=$zsh_path && break; done # Load Plugins hyde_plugins=(git zsh-256color zsh-autosuggestions zsh-syntax-highlighting) - plugins+=("${plugins[@]}" "${hyde_plugins[@]}" git zsh-256color zsh-autosuggestions zsh-syntax-highlighting) + plugins+=("${plugins[@]}" "${hyde_plugins[@]}") # Deduplicate plugins plugins=("${plugins[@]}") plugins=($(printf "%s\n" "${plugins[@]}" | sort -u)) - - # Loads om-my-zsh - [[ -r $ZSH/oh-my-zsh.sh ]] && source $ZSH/oh-my-zsh.sh + # Defer oh-my-zsh loading until after prompt appears + typeset -g DEFER_OMZ_LOAD=1 } # Function to display a slow load warning -function slow_load_warning { +# the intention is for hyprdots users who might have multiple zsh initialization +function _slow_load_warning { local lock_file="/tmp/.hyde_slow_load_warning.lock" local load_time=$SECONDS @@ -94,7 +83,6 @@ function slow_load_warning { - Check the '.zshrc' file from the repo for a clean configuration. https://github.com/HyDE-Project/HyDE/blob/master/Configs/.zshrc 3. Check the '~/.hyde.zshrc' file for any slow initialization scripts. - 4. Check the '~/.p10k.zsh' file for any slow initialization scripts. For more information, on the possible causes of slow shell startup, see: ๐ŸŒ https://github.com/HyDE-Project/HyDE/wiki @@ -111,97 +99,254 @@ function handle_init_error { fi } -# Function to remove the lock file on exit -function cleanup { - rm -f /tmp/.hyde_slow_load_warning.lock -} - function no_such_file_or_directory_handler { local red='\e[1;31m' reset='\e[0m' printf "${red}zsh: no such file or directory: %s${reset}\n" "$1" return 127 } +function _load_persistent_aliases { + # Persistent aliases are loaded after the plugin is loaded + # This way omz will not override them + unset -f _load_persistent_aliases + + if [[ -x "$(command -v eza)" ]]; then + alias l='eza -lh --icons=auto' \ + ll='eza -lha --icons=auto --sort=name --group-directories-first' \ + ld='eza -lhD --icons=auto' \ + lt='eza --icons=auto --tree' + fi + +} + +function _load_omz_on_init() { + # Load oh-my-zsh when line editor initializes // before user input + if [[ -n $DEFER_OMZ_LOAD ]]; then + unset DEFER_OMZ_LOAD + [[ -r $ZSH/oh-my-zsh.sh ]] && source $ZSH/oh-my-zsh.sh + ZDOTDIR="${__ZDOTDIR:-$HOME}" + _load_post_init + fi +} + +# best fzf aliases ever +_fuzzy_change_directory() { + local initial_query="$1" + local selected_dir + local fzf_options=('--preview=ls -p {}' '--preview-window=right:60%') + fzf_options+=(--height "80%" --layout=reverse --preview-window right:60% --cycle) + local max_depth=7 + + if [[ -n "$initial_query" ]]; then + fzf_options+=("--query=$initial_query") + fi + + #type -d + selected_dir=$(find . -maxdepth $max_depth \( -name .git -o -name node_modules -o -name .venv -o -name target -o -name .cache \) -prune -o -type d -print 2>/dev/null | fzf "${fzf_options[@]}") + + if [[ -n "$selected_dir" && -d "$selected_dir" ]]; then + cd "$selected_dir" || return 1 + else + return 1 + fi +} + +_fuzzy_edit_search_file_content() { + # [f]uzzy [e]dit [s]earch [f]ile [c]ontent + local selected_file + selected_file=$(grep -irl "${1:-}" ./ | fzf --height "80%" --layout=reverse --preview-window right:60% --cycle --preview 'cat {}' --preview-window right:60%) + + if [[ -n "$selected_file" ]]; then + if command -v "$EDITOR" &>/dev/null; then + "$EDITOR" "$selected_file" + else + echo "EDITOR is not specified. using vim. (you can export EDITOR in ~/.zshrc)" + vim "$selected_file" + fi + + else + echo "No file selected or search returned no results." + fi +} + +_fuzzy_edit_search_file() { + local initial_query="$1" + local selected_file + local fzf_options=() + fzf_options+=(--height "80%" --layout=reverse --preview-window right:60% --cycle) + local max_depth=5 + + if [[ -n "$initial_query" ]]; then + fzf_options+=("--query=$initial_query") + fi + + # -type f: only find files + selected_file=$(find . -maxdepth $max_depth -type f 2>/dev/null | fzf "${fzf_options[@]}") + + if [[ -n "$selected_file" && -f "$selected_file" ]]; then + if command -v "$EDITOR" &>/dev/null; then + "$EDITOR" "$selected_file" + else + echo "EDITOR is not specified. using vim. (you can export EDITOR in ~/.zshrc)" + vim "$selected_file" + fi + else + return 1 + fi +} + +function _load_post_init() { + #! Never load time consuming functions here + _load_persistent_aliases + autoload -U compinit && compinit + + # Load hydectl completion + if command -v hydectl &>/dev/null; then + compdef _hydectl hydectl + eval "$(hydectl completion zsh)" + fi + + # Initiate fzf + if command -v fzf &>/dev/null; then + eval "$(fzf --zsh)" + fi + + # zsh-autosuggestions won't work on first prompt when deferred + if typeset -f _zsh_autosuggest_start > /dev/null; then + _zsh_autosuggest_start + fi + + # User rc file always overrides + [[ -f $HOME/.zshrc ]] && source $HOME/.zshrc + +} + +function _load_if_terminal { + if [ -t 1 ]; then + + unset -f _load_if_terminal + + # Currently We are loading Starship and p10k prompts on start so users can see the prompt immediately + + if command -v starship &>/dev/null; then + # ===== START Initialize Starship prompt ===== + eval "$(starship init zsh)" + export STARSHIP_CACHE=$XDG_CACHE_HOME/starship + export STARSHIP_CONFIG=$XDG_CONFIG_HOME/starship/starship.toml + # ===== END Initialize Starship prompt ===== + elif [ -r $HOME/.p10k.zsh ]; then + # ===== START Initialize Powerlevel10k theme ===== + POWERLEVEL10K_TRANSIENT_PROMPT=same-dir + P10k_THEME=${P10k_THEME:-/usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme} + [[ -r $P10k_THEME ]] && source $P10k_THEME + # To customize prompt, run `p10k configure` or edit $HOME/.p10k.zsh + [[ ! -f $HOME/.p10k.zsh ]] || source $HOME/.p10k.zsh + # ===== END Initialize Powerlevel10k theme ===== + fi + + # Optionally load user configuration // useful for customizing the shell without modifying the main file + if [[ -f $HOME/.hyde.zshrc ]]; then + source $HOME/.hyde.zshrc # for backward compatibility + elif [[ -f $HOME/.user.zsh ]]; then + source $HOME/.user.zsh # renamed to .user.zsh for intuitiveness that it is a user config + fi + + # Load plugins + _load_zsh_plugins + + # Load zsh hooks module once + + #? Methods to load oh-my-zsh lazily + __ZDOTDIR="${ZDOTDIR:-$HOME}" + ZDOTDIR=/tmp + zle -N zle-line-init _load_omz_on_init # Loads when the line editor initializes // The best option + + # Below this line are the commands that are executed after the prompt appears + + autoload -Uz add-zsh-hook + # add-zsh-hook zshaddhistory load_omz_deferred # loads after the first command is added to history + # add-zsh-hook precmd load_omz_deferred # Loads when shell is ready to accept commands + # add-zsh-hook preexec load_omz_deferred # Loads before the first command executes + + # TODO: add handlers in pm.sh + # for these aliases please manually add the following lines to your .zshrc file.(Using yay as the aur helper) + # pc='yay -Sc' # remove all cached packages + # po='yay -Qtdq | ${PM_COMMAND[@]} -Rns -' # remove orphaned packages + + # Warn if the shell is slow to load + add-zsh-hook -Uz precmd _slow_load_warning + + alias c='clear' \ + in='${PM_COMMAND[@]} install' \ + un='${PM_COMMAND[@]} remove' \ + up='${PM_COMMAND[@]} upgrade' \ + pl='${PM_COMMAND[@]} search installed' \ + pa='${PM_COMMAND[@]} search all' \ + vc='code' \ + fastfetch='fastfetch --logo-type kitty' \ + ..='cd ..' \ + ...='cd ../..' \ + .3='cd ../../..' \ + .4='cd ../../../..' \ + .5='cd ../../../../..' \ + mkdir='mkdir -p' \ + ffec='_fuzzy_edit_search_file_content' \ + ffcd='_fuzzy_change_directory' \ + ffe='_fuzzy_edit_search_file' + + # Some binds won't work on first prompt when deferred + bindkey '\e[H' beginning-of-line + bindkey '\e[F' end-of-line + + fi + +} + +#? Override this environment variable in ~/.zshrc + # cleaning up home folder -XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -XDG_CONFIG_DIR="${XDG_CONFIG_DIR:-$HOME/.config}" +PATH="$HOME/.local/bin:$PATH" +XDG_CONFIG_DIR="${XDG_CONFIG_DIR:-"$(xdg-user-dir CONFIG)"}" XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" XDG_DATA_DIRS="${XDG_DATA_DIRS:-$XDG_DATA_HOME:/usr/local/share:/usr/share}" XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" -XDG_DESKTOP_DIR="${XDG_DESKTOP_DIR:-$HOME/Desktop}" -XDG_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}" -XDG_TEMPLATES_DIR="${XDG_TEMPLATES_DIR:-$HOME/Templates}" -XDG_PUBLICSHARE_DIR="${XDG_PUBLICSHARE_DIR:-$HOME/Public}" -XDG_DOCUMENTS_DIR="${XDG_DOCUMENTS_DIR:-$HOME/Documents}" -XDG_MUSIC_DIR="${XDG_MUSIC_DIR:-$HOME/Music}" -XDG_PICTURES_DIR="${XDG_PICTURES_DIR:-$HOME/Pictures}" -XDG_VIDEOS_DIR="${XDG_VIDEOS_DIR:-$HOME/Videos}" + +# XDG User Directories +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$(xdg-user-dir CONFIG)"}" +XDG_DESKTOP_DIR="${XDG_DESKTOP_DIR:-"$(xdg-user-dir DESKTOP)"}" +XDG_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-"$(xdg-user-dir DOWNLOAD)"}" +XDG_TEMPLATES_DIR="${XDG_TEMPLATES_DIR:-"$(xdg-user-dir TEMPLATES)"}" +XDG_PUBLICSHARE_DIR="${XDG_PUBLICSHARE_DIR:-"$(xdg-user-dir PUBLICSHARE)"}" +XDG_DOCUMENTS_DIR="${XDG_DOCUMENTS_DIR:-"$(xdg-user-dir DOCUMENTS)"}" +XDG_MUSIC_DIR="${XDG_MUSIC_DIR:-"$(xdg-user-dir MUSIC)"}" +XDG_PICTURES_DIR="${XDG_PICTURES_DIR:-"$(xdg-user-dir PICTURES)"}" +XDG_VIDEOS_DIR="${XDG_VIDEOS_DIR:-"$(xdg-user-dir VIDEOS)"}" + LESSHISTFILE=${LESSHISTFILE:-/tmp/less-hist} PARALLEL_HOME="$XDG_CONFIG_HOME/parallel" - -# wget -WGETRC="${XDG_CONFIG_HOME}/wgetrc" SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc -export XDG_CONFIG_HOME XDG_CONFIG_DIR XDG_DATA_HOME XDG_STATE_HOME XDG_CACHE_HOME XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR \ - XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR WGETRC SCREENRC - -if [ -t 1 ]; then - # We are loading the prompt on start so users can see the prompt immediately - # Powerlevel10k theme path - P10k_THEME=${P10k_THEME:-/usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme} - [[ -r $P10k_THEME ]] && source $P10k_THEME - - # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh - [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - - PM="pm.sh" - # Try to find pm.sh in common locations - if [ ! which "${PM}" ] &>/dev/null; then - for path in "/usr/lib/hyde" "/usr/local/lib/hyde" "$HOME/.local/lib/hyde" "$HOME/.local/bin"; do - if [[ -x "$path/pm.sh" ]]; then - PM="$path/pm.sh" - break - fi - done - fi - # Optionally load user configuration // useful for customizing the shell without modifying the main file - [[ -f ~/.hyde.zshrc ]] && source ~/.hyde.zshrc +ZSH_AUTOSUGGEST_STRATEGY=(history completion) - # Load plugins - load_zsh_plugins +# History configuration // explicit to not nuke history +HISTFILE=${HISTFILE:-$HOME/.zsh_history} +HISTSIZE=10000 +SAVEHIST=10000 +setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format +setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits +setopt SHARE_HISTORY # Share history between all sessions +setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history +setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again +setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate - # Helpful aliases - if [[ -x "$(which eza)" ]]; then - alias l='eza -lh --icons=auto' \ - ll='eza -lha --icons=auto --sort=name --group-directories-first' \ - ld='eza -lhD --icons=auto' \ - lt='eza --icons=auto --tree' - fi +# HyDE Package Manager +PM_COMMAND=(hyde-shell pm) + +export XDG_CONFIG_HOME XDG_CONFIG_DIR XDG_DATA_HOME XDG_STATE_HOME \ + XDG_CACHE_HOME XDG_DESKTOP_DIR XDG_DOWNLOAD_DIR \ + XDG_TEMPLATES_DIR XDG_PUBLICSHARE_DIR XDG_DOCUMENTS_DIR \ + XDG_MUSIC_DIR XDG_PICTURES_DIR XDG_VIDEOS_DIR \ + SCREENRC ZSH_AUTOSUGGEST_STRATEGY HISTFILE - alias c='clear' \ - in='$PM install' \ - un='$PM remove' \ - up='$PM upgrade' \ - pl='$PM search installed' \ - pa='$PM search all' \ - vc='code' \ - fastfetch='fastfetch --logo-type kitty' \ - ..='cd ..' \ - ...='cd ../..' \ - .3='cd ../../..' \ - .4='cd ../../../..' \ - .5='cd ../../../../..' \ - mkdir='mkdir -p' # Always mkdir a path (this doesn't inhibit functionality to make a single dir) - - # TODO: add handlers in pm.sh - # for these aliases please manually add the following lines to your .zshrc file.(Using yay as the aur helper) - # pc='yay -Sc' # remove all cached packages - # po='yay -Qtdq | $PM -Rns -' # remove orphaned packages - - # Warn if the shell is slow to load - autoload -Uz add-zsh-hook - add-zsh-hook -Uz precmd slow_load_warning - # add-zsh-hook zshexit cleanup -fi +_load_if_terminal diff --git a/Configs/.zshrc b/Configs/.zshrc index 0d3950da4..fc8f85080 100644 --- a/Configs/.zshrc +++ b/Configs/.zshrc @@ -71,3 +71,5 @@ fe() { [[ -n "$files" ]] && nvim "${files[@]}" } +# export EDITOR=nvim +export EDITOR=code diff --git a/Hyprdots-to-HyDE.md b/Hyprdots-to-HyDE.md index c01495af8..83d96a246 100644 --- a/Hyprdots-to-HyDE.md +++ b/Hyprdots-to-HyDE.md @@ -74,11 +74,15 @@ Here's how we can update HyDE-specific Hyprland settings without changing user p As the last man standing collaborator, I don't know what the original creator intended. But I think it's a good name. I just don't know what it stands for. ๐Ÿคทโ€โ™‚๏ธ -Here are some of my speculations: +Here are the speculations from some of the contributors: -- **Hy**prdots **D**otfiles **E**nhanced - Enhanced version of hyprdots when @prasanthrangan introduced wallbash as our main theme management engine. -- **Hy**prland **D**otfiles **E**xtended - Extensible Dotfiles for Hyprland. -- But the one that make most sense is - **Hy**prland **D**esktop **E**nvironment - as Hyprland is usually considered a WM for Wayland, not a full fledged D.E and this - dotfile kind of turns it into a full-blown D.E. +Here are the speculations from some of the contributors: -Feel free to suggest your own meaning of HyDE. ๐Ÿค” +> - "**Hy**pr**D**otfiles **E**nhanced" - Enhanced version of hyprdots when @prasanthrangan introduced wallbash as our main theme management engine. + +> - But the one that makes the most sense is - "**Hy**prland **D**esktop **E**nvironment" - as Hyprland is usually considered a WM for Wayland, not a full-fledged D.E. and this dotfile kind of turns it into a full-blown D.E. +> -chrollorifat + +> - "HyDE, your Development Environment" - khing + +**Feel free to suggest your own meaning of HyDE. ๐Ÿค”** diff --git a/KEYBINDINGS.md b/KEYBINDINGS.md index e6a0c671f..c0bcb738d 100644 --- a/KEYBINDINGS.md +++ b/KEYBINDINGS.md @@ -13,6 +13,7 @@ Multi-language KEYBINDINGS support --> + [![es](https://img.shields.io/badge/lang-es-yellow.svg)](Source/assets/keybinds/KEYBINDINGS.es.md) [![de](https://img.shields.io/badge/lang-de-black.svg)](Source/assets/keybinds/KEYBINDINGS.de.md) [![nl](https://img.shields.io/badge/lang-nl-green.svg)](Source/assets/keybinds/KEYBINDINGS.nl.md) @@ -25,6 +26,7 @@ Multi-language KEYBINDINGS support
+ โ€ƒ
โ€ƒWindow Managementโ€ƒ
โ€ƒ
   โ€ƒ
Miscโ€ƒ
โ€ƒ
   โ€ƒ
Launcherโ€ƒ
โ€ƒ
   @@ -47,12 +49,14 @@ Multi-language KEYBINDINGS support + Here are all HyDE specific keybindings listed. ->[!TIP] +> [!TIP] > Super + / shows the keybindings. + ## | Keys | Action | @@ -84,6 +88,7 @@ Here are all HyDE specific keybindings listed. | SUPER + Right | focus right | | SUPER + Up | focus up | | SUPER + Down | focus down | +| ALT + Tab | cycle focus | ### Resize Active Window @@ -104,6 +109,7 @@ Here are all HyDE specific keybindings listed. | SUPER + X | hold to resize window | + ## | Keys | Action | @@ -114,6 +120,7 @@ Here are all HyDE specific keybindings listed. | SUPER + CTRL + SHIFT + down | move activewindow down | + ## ### Apps @@ -130,7 +137,7 @@ Here are all HyDE specific keybindings listed. | Keys | Action | | :------------------------------------------------- | :------------------- | -| ALT + space | application finder | +| SUPER + A | application finder | | SUPER + TAB | window switcher | | SUPER + SHIFT + E | file finder | | SUPER + slash | keybindings hint | @@ -141,6 +148,7 @@ Here are all HyDE specific keybindings listed. | SUPER + SHIFT + A | select rofi launcher | + ## ### Audio @@ -172,6 +180,7 @@ Here are all HyDE specific keybindings listed. | None + XF86MonBrightnessDown | decrease brightness | + ## | Keys | Action | @@ -190,6 +199,7 @@ Here are all HyDE specific keybindings listed. | None + Print | print all monitors | + ## | Keys | Action | @@ -203,6 +213,7 @@ Here are all HyDE specific keybindings listed. | SUPER + SHIFT + T | select a theme | + ## ### Navigation @@ -232,8 +243,8 @@ Here are all HyDE specific keybindings listed. #### Special workspace -| Keys | Action | -| :----------------------------------------------------- | :-------------------------- | +| Keys | Action | +| :------------------------------------------------- | :-------------------------- | | SUPER + SHIFT + S | move to scratchpad | | SUPER + ALT + S | move to scratchpad (silent) | | SUPER + S | toggle scratchpad | diff --git a/README.md b/README.md index 4cee7fdb2..4b5b7b9ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -
Dynamic JSON Badge @@ -28,6 +27,7 @@ Multi-language README support โ€ƒ
Updating
โ€ƒ
   โ€ƒ
โ€ƒThemesโ€ƒ
โ€ƒ
   โ€ƒ
โ€ƒStylesโ€ƒ
โ€ƒ
   +โ€ƒ
โ€ƒContributingโ€ƒ
โ€ƒ
   โ€ƒ
โ€ƒKeybindingsโ€ƒ
โ€ƒ
   โ€ƒ
โ€ƒYoutubeโ€ƒ
โ€ƒ
   โ€ƒ
โ€ƒWikiโ€ƒ
โ€ƒ
   @@ -93,7 +93,7 @@ cd ~/HyDE/Scripts > [!IMPORTANT] > Refer your list from `Scripts/pkg_extra.lst` -> or you can `cp Scripts/pkg_extra.lst Scripts/pkg_user.lst` if you wish to install all extra packages. +> or you can `cp Scripts/pkg_extra.lst Scripts/pkg_user.lst` if you wish to install all extra packages.