├── .editorconfig
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug.yml
│ ├── config.yml
│ ├── documentation-update.yml
│ └── feature.yml
└── PULL_REQUEST_TEMPLATE.md
├── CHANGELOGS.md
├── CODE_OF_CONDUCT.md
├── COMMIT_MESSAGE_GUIDELINES.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── assets
├── .zprofile
├── .zshrc
├── Thunar
│ ├── accels.scm
│ └── uca.xml
├── add_zsh_theme
│ ├── agnosterzak.zsh-theme
│ ├── antares.zsh-theme
│ ├── bullet-train.zsh-theme
│ ├── color-input.zsh-theme
│ ├── comfyline.zsh-theme
│ ├── emoji.zsh-theme
│ └── fishbone++.zsh-theme
├── fastfetch
│ ├── config-compact.jsonc
│ ├── config-pokemon.jsonc
│ ├── config-v2.jsonc
│ ├── config.jsonc
│ └── fedora.png
├── gtk-3.0
│ └── settings.ini
├── hyprland.desktop
├── sddm.png
└── xfce4
│ └── helpers.rc
├── auto-install.sh
├── image.png
├── install-scripts
├── 00-hypr-pkgs.sh
├── 02-Final-Check.sh
├── Global_functions.sh
├── InputGroup.sh
├── ags.sh
├── bluetooth.sh
├── copr.sh
├── dotfiles-main.sh
├── fonts.sh
├── gtk_themes.sh
├── hyprland.sh
├── nvidia.sh
├── rog.sh
├── sddm.sh
├── sddm_theme.sh
├── thunar.sh
├── thunar_default.sh
├── xdph.sh
├── zsh.sh
└── zsh_pokemon.sh
├── install.sh
├── preset.sh
├── uninstall-old.sh
└── uninstall.sh
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 | [*]
3 | indent_style = space
4 | indent_size = 4
5 |
6 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: JaKooLit
4 | ko_fi: jakoolit
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: Something is not working right
3 | title: "[Bug]: "
4 | labels: ["bug"]
5 | assignees:
6 | - JaKooLit
7 |
8 | body:
9 | - type: checkboxes
10 | attributes:
11 | label: Already reported ? *
12 | description: Before opening a new bug report, please take a moment to search through the current open and closed issues to check if it already exists.
13 | options:
14 | - label: I have searched the existing open and closed issues.
15 | required: true
16 |
17 | - type: dropdown
18 | id: type
19 | attributes:
20 | label: Regression?
21 | description: |
22 | Regression means that something used to work but no longer does.
23 | options:
24 | - "Yes"
25 | - "No"
26 | - "Not sure"
27 | validations:
28 | required: true
29 |
30 | - type: textarea
31 | id: ver
32 | attributes:
33 | label: System Info and Version
34 | description: |
35 | Paste the output of `inxi --full` here.
36 | install inxi if command not found.
37 | value: "
38 | System/Version info
39 |
40 |
41 | ```
42 |
43 |
44 |
45 | ```
46 |
47 |
48 | "
49 | validations:
50 | required: true
51 |
52 | - type: textarea
53 | id: dots
54 | attributes:
55 | label: KooL's Dots version
56 | description: |
57 | Paste the output of `find ~/.config/hypr/ -type f -name 'v*' -exec basename {} \;`
58 | This is just KooL's Hyprland Dots version.
59 | validations:
60 | required: true
61 |
62 | - type: textarea
63 | id: desc
64 | attributes:
65 | label: Description
66 | description: "What went wrong? What exactly happened?"
67 | validations:
68 | required: true
69 |
70 | - type: textarea
71 | id: repro
72 | attributes:
73 | label: How to reproduce
74 | description: "How can someone else reproduce the issue?"
75 | validations:
76 | required: true
77 |
78 | - type: textarea
79 | id: logs
80 | attributes:
81 | label: install logs, images or videos
82 | description: |
83 | Anything that can help. Please always ATTACH and not paste them.
84 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation-update.yml:
--------------------------------------------------------------------------------
1 | name: Documentation update
2 | description: Propose a change to the project documentation wiki
3 | title: "[Documentation update]: "
4 | labels: ["documentation_update"]
5 | assignees:
6 | - JaKooLit
7 |
8 | body:
9 | - type: textarea
10 | id: desc
11 | attributes:
12 | label: Description
13 | description: "Provide a clear and concise description of the documentation update"
14 | validations:
15 | required: true
16 |
17 | - type: textarea
18 | id: repro
19 | attributes:
20 | label: Proposed Solution
21 | description: "Provide a clear and concise description of the updated documentation that you'd like to see added"
22 | validations:
23 | required: true
24 |
25 | - type: textarea
26 | id: logs
27 | attributes:
28 | label: install links, images or videos
29 | description: |
30 | 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
31 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: I'd like to propose some changes and enhancements
3 | title: "[Enhancement]: "
4 | labels: ["enhancement"]
5 | assignees:
6 | - JaKooLit
7 |
8 | body:
9 | - type: checkboxes
10 | attributes:
11 | label: Already reported ? *
12 | description: Before opening a new feature request, please take a moment to search through the current open and closed issues / request to check if it already exists.
13 | options:
14 | - label: I have searched the existing open and closed request.
15 | required: true
16 |
17 | - type: textarea
18 | id: desc
19 | attributes:
20 | label: Description
21 | description: "Describe your idea?"
22 | validations:
23 | required: true
24 |
25 | - type: textarea
26 | id: repro
27 | attributes:
28 | label: Proposed Solution
29 | description: "describe if you have a specific solution in mind"
30 | validations:
31 | required: true
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | # Pull Request
2 |
3 | ## Description
4 |
5 | Please read these instructions and remove unnecessary text.
6 |
7 | - Try to include a summary of the changes and which issue is fixed.
8 | - Also include relevant motivation and context (if applicable).
9 | - List any dependencies that are required for this change. (e.g., packages or other PRs)
10 | - Provide a link if there is an issue related to this pull request. e.g., Fixes # (issue)
11 | - Please add Reviewers, Assignees, Labels, Projects, and Milestones to the PR. (if applicable)
12 |
13 | ## Type of change
14 |
15 | Please put an `x` in the boxes that apply:
16 |
17 | - [ ] **Bug fix** (non-breaking change which fixes an issue)
18 | - [ ] **New feature** (non-breaking change which adds functionality)
19 | - [ ] **Breaking change** (fix or feature that would cause existing functionality to not work as expected)
20 | - [ ] **Documentation update** (non-breaking change; modified files are limited to the documentations)
21 | - [ ] **Technical debt** (a code change that does not fix a bug or add a feature but makes something clearer for devs)
22 | - [ ] **Other** (provide details below)
23 |
24 | ## Checklist
25 |
26 | Please put an `x` in the boxes that apply:
27 |
28 | - [ ] I have read the [CONTRIBUTING](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/CONTRIBUTING.md) document.
29 | - [ ] My code follows the code style of this project.
30 | - [ ] My commit message follows the [commit guidelines](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/CONTRIBUTING.md#git-commit-messages).
31 | - [ ] My change requires a change to the documentation.
32 | - [ ] I want to add something in Fedora-Hyprland wiki.
33 | - [ ] I have added tests to cover my changes.
34 | - [ ] I have tested my code locally and it works as expected.
35 | - [ ] All new and existing tests passed.
36 |
37 | ## Screenshots
38 |
39 | (if appropriate)
40 |
41 | ## Additional context
42 |
43 | Add any other context about the problem here.
44 |
--------------------------------------------------------------------------------
/CHANGELOGS.md:
--------------------------------------------------------------------------------
1 | ## CHANGELOGS
2 |
3 | ## 20 March 2025
4 | - added findutils as dependencies
5 |
6 | ## 11 March 2025
7 | - Added uninstall script
8 | - forked AGS v1 into JakooLit repo. This is just incase Aylur decide to take down v1
9 |
10 | ## 10 March 2025
11 | - Dropped pyprland in favor of hyprland built in tool for a drop down like terminal and Desktop magnifier
12 |
13 | ## 06 March 2025
14 | - Switched to whiptail version for Y & N questions
15 | - switched eza to lsd
16 |
17 | ## 23 Feb 2025
18 | - added Victor Mono Font for proper hyprlock font rendering for Dots v2.3.12
19 | - added Fantasque Sans Mono Nerd for Kitty
20 |
21 | ## 22 Feb 2025
22 | - replaced eog with loupe
23 | - changed url for installing oh-my-zsh to get wider coverage. Some countries are blocking github raw url's
24 |
25 | ## 20 Feb 2025
26 | - Added nwg-displays for the upcoming Kools dots v2.3.12
27 |
28 | ## 18 Feb 2025
29 | - Change default zsh theme to adnosterzak
30 | - pokemon coloscript integrated with fastfetch when opted with pokemon to add some bling
31 | - additional external oh-my-zsh theme
32 |
33 | ## 06 Feb 2025
34 | - added semi-unattended function.
35 | - move all the initial questions at the beginning
36 |
37 | ## 04 Feb 2025
38 | - Re-coded for better visibility
39 | - Offered a new SDDM theme.
40 | - script will automatically detect if you have nvidia but script still offer if you want to set up for user
41 |
42 | ## 30 Jan 2025
43 | - AGS (aylur's GTK shell) v1 for desktop overview is now optional
44 |
45 | ## 13 Jan 2025
46 | - replaced mate polkit with hyprpolkitagent
47 |
48 | ## 12 Jan 2025
49 | - switch to final version of aylurs-gtk-shell-v1
50 |
51 | ## 06 Jan 2025
52 | - added fastfetch compact-config for fedora
53 | - remove copr tofik/nwg-shell since solopasha has nwg-look plus tofik-nwg-shell copr is installing all kinds of shits
54 | - default theme for oh my zsh theme is now "funky"
55 |
56 | ## 26 Dec 2024
57 | - Removal of Bibata Ice cursor on assets since its integrated in the GTK Themes and Icons extract from a separate repo
58 | - integrated hyprcursor in Bibata Ice Cursor
59 |
60 | ## 16 Nov 2024
61 | - adjusted ags v1.8.2 install script
62 |
63 | ## 15 Nov 2024
64 | - revert Aylurs GTK Shell (AGS) to install older version
65 |
66 | ## 20 Sep 2024
67 | - User will be ask if they want to set Thunar as default file manager if they decided to install it
68 |
69 | ## 19 Sep 2024
70 | - Added fastfetch on tty. However, will be disabled if user decided to install pokemon colorscripts
71 |
72 | ## 18 Sep 2024
73 | - refactored to work with Fedora 41. Tested on Fedora 41 server install
74 | - dotfiles will now be downloaded from main or master branch instead of from the releases version.
75 |
76 | ## 14 Sep 2024
77 | - remove the final error checks instead, introduced a final check of essential packages to ran Hyprland
78 | - switched from manual build to copr repo - nwg-look
79 |
80 | ## 08 Sep 2024
81 | - Added final error checks on install-logs
82 |
83 | ## 03 Sep 2024
84 | - Some re-arranging of hyprland packages and added hyprland-eco.sh script for -eco packages
85 |
86 | ## 28 Aug 2024
87 | - Added final check if hyprland is installed and will give an error to user
88 |
89 | ## 26 Aug 2024
90 | - added nvidia_drm.fbdev=1 for grub
91 |
92 | ## 22 Aug 2024
93 | - Added pre-clean up script
94 |
95 | ## 13 Aug 2024
96 | - updated to download from Hyprland-Dots releases as usual
97 |
98 | ## 09 Aug 2024
99 | - updated dotfiles.sh to download from Hyprland-Dots main branch for Hyprland 0.42.0 update
100 |
101 | ## 08 Aug 2024
102 | - added aquamarine for Hyprland v0.42.0
103 |
104 | ## 07 Jul 2024
105 | - added eza (ls replacement for tty). Note only on .zshrc
106 | -
107 | ## 04 Jul 2024
108 | - Added uninstall.sh. USE THIS WITH CAUTION!
109 |
110 | ## 26 May 2024
111 | - Added fzf for zsh (CTRL R to invoke FZF history)
112 |
113 | ## 23 May 2024
114 | - added qalculate-gtk to work with rofi-calc. Default keybinds (SUPER ALT C)
115 | - added power-profiles-daemon for ROG laptops. Note, I cant add to all since it conflicts with TLP, CPU-Auto-frequency etc.
116 | - added fastfetch
117 |
118 | ## 22 May 2024
119 | - change the sddm theme destination to /etc/sddm.conf.d/10-theme.conf to theme.conf.user
120 |
121 | ## 19 May 2024
122 | - Disabled the auto-login in .zprofile as it causes auto-login to Hyprland if any wayland was chosen. Can enabled if only using hyprland
123 |
124 | ## 10 May 2024
125 | - added wallust-git and remove python-pywal for migration to wallust on Hyprland-Dots v2.2.11
126 |
127 | ## 03 May 2024
128 | - added python3-pyquery for new weather-waybar python based on Hyprland-Dots
129 |
130 | ## 02 May 2024
131 | - Added pyprland (hyprland plugin)
132 |
133 | ## 28 Apr 2024
134 | - Fixed nvidia.sh
135 |
136 | ## 26 Apr 2024
137 | - Updated sddm.sh for Qt6 variant
138 |
139 | ## 23 Apr 2024
140 | - Dropping swayidle and swaylock in favor of hypridle and hyprlock
141 |
142 | ## 20 Apr 2024
143 | - Change default Oh-my-zsh theme to xiong-chiamiov-plus
144 | - updated nvidia.sh (added hyprcursor and changed to hyprland only from git for nvidia)
145 |
146 | ## 11 Jan 2024
147 | - dropped wlsunset
148 |
149 | ## 29 December 2023
150 | - Remove dunst in favor of swaync. NOTE: Part of the script is to also uninstall mako and dunst (if installed) as on my experience, dunst is sometimes taking over the notification even if it is not set to start
151 |
152 | ## 16 Dec 2023
153 | - zsh theme switched to `agnoster` theme by default
154 | - pywal tty color change disabled by default
155 |
156 | ## 11 Dec 2023
157 | - Changing over to zsh automatically if user opted
158 | - If chose to install zsh and have no login manager, zsh auto login will auto start Hyprland
159 | - added as optional, with zsh, pokemon colorscripts
160 | - improved zsh install scripts, so even the existing zsh users of can still opt for zsh and oh-my-zsh installation :)
161 |
162 | ## 03 Dec 2023
163 | - Added kvantum for qt apps theming
164 | - return of wlogout due to theming issues of rofi-power
165 |
166 | ## 26 Nov 2023
167 | - nvidia - Move to hyprland-git. see [`commit`](https://github.com/hyprwm/Hyprland/commit/cd96ceecc551c25631783499bd92c6662c5d3616)
168 |
169 | ## 25 Nov 2023
170 | - drop wlogout since Hyprland-Dots v2.1.9 uses rofi-power
171 |
172 | ## 23-Nov-2023
173 | - Added Bibata cursor to install if opted for GTK Themes. However, it is not pre-applied. Use nwg-look utility to apply
174 |
175 | ## 19-Nov-2023
176 | - Adjust dotfiles script to download from releases instead of from upstream
177 |
178 | ## 27 Oct 2023
179 | - Moving to a centralized Hyprland-dots
180 |
181 | ## 30-Sep-2023
182 | - added gnome-system-monitor (right click cpu module in waybar)
183 |
184 | ## 27-Sep-2023
185 | - remove auto start of portal-hyprland-hyprland
186 | - removal of Virtual-1 monitor in Monitors.conf
187 |
188 | ## 22-Sep-2023
189 | - initial release
190 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | mail[at]ml4w.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/COMMIT_MESSAGE_GUIDELINES.md:
--------------------------------------------------------------------------------
1 | # Commit Message Guidelines
2 |
3 | A good commit message should be descriptive and provide context about the changes made. This makes it easier to understand and review the changes in the future.
4 |
5 | Here are some guidelines for writing descriptive commit messages:
6 |
7 | - Start with a short summary of the changes made in the commit.
8 |
9 | - Use imperative mood for the summary, as if you're giving a command. For example, "Add feature" instead of "Added feature".
10 |
11 | - Provide additional details in the commit message body, if necessary. This could include the reason for the change, the impact of the change, or any dependencies that were introduced or removed.
12 |
13 | - Keep the message within 72 characters per line to ensure that it's easy to read in Git log output.
14 |
15 | Examples of good commit messages:
16 |
17 | - "Add authentication feature for user login"
18 | - "Fix bug causing application to crash on startup"
19 | - "Update documentation for API endpoints"
20 |
21 | Remember, writing descriptive commit messages can save time and frustration in the future, and help others understand the changes made to the codebase.
22 |
23 | ## Commit Message Types
24 |
25 | Here's a more comprehensive list of commit types that you can use:
26 |
27 | `feat`: Adding a new feature to the project
28 |
29 | ```markdown
30 | feat: Add multi-image upload support
31 | ```
32 |
33 | `fix`: Fixing a bug or issue in the project
34 |
35 | ```markdown
36 | fix: Fix bug causing application to crash on startup
37 | ```
38 |
39 | `docs`: Updating documentation in the project
40 |
41 | ```markdown
42 | docs: Update documentation for API endpoints
43 | ```
44 |
45 | `style`: Making cosmetic or style changes to the project (such as changing colors or formatting code)
46 |
47 | ```markdown
48 | style: Update colors and formatting
49 | ```
50 |
51 | `refactor`: Making code changes that don't affect the behavior of the project, but improve its quality or maintainability
52 |
53 | ```markdown
54 | refactor: Remove unused code
55 | ```
56 |
57 | `test`: Adding or modifying tests for the project
58 |
59 | ```markdown
60 | test: Add tests for new feature
61 | ```
62 |
63 | `chore`: Making changes to the project that don't fit into any other category, such as updating dependencies or configuring the build system
64 |
65 | ```markdown
66 | chore: Update dependencies
67 | ```
68 |
69 | `perf`: Improving performance of the project
70 |
71 | ```markdown
72 | perf: Improve performance of image processing
73 | ```
74 |
75 | `security`: Addressing security issues in the project
76 |
77 | ```markdown
78 | security: Update dependencies to address security issues
79 | ```
80 |
81 | `merge`: Merging branches in the project
82 |
83 | ```markdown
84 | merge: Merge branch 'feature/branch-name' into develop
85 | ```
86 |
87 | `revert`: Reverting a previous commit
88 |
89 | ```markdown
90 | revert: Revert "Add feature"
91 | ```
92 |
93 | `build`: Making changes to the build system or dependencies of the project
94 |
95 | ```markdown
96 | build: Update dependencies
97 | ```
98 |
99 | `ci`: Making changes to the continuous integration (CI) system for the project
100 |
101 | ```markdown
102 | ci: Update CI configuration
103 | ```
104 |
105 | `config`: Making changes to configuration files for the project
106 |
107 | ```markdown
108 | config: Update configuration files
109 | ```
110 |
111 | `deploy`: Making changes to the deployment process for the project
112 |
113 | ```markdown
114 | deploy: Update deployment scripts
115 | ```
116 |
117 | `init`: Creating or initializing a new repository or project
118 |
119 | ```markdown
120 | init: Initialize project
121 | ```
122 |
123 | `move`: Moving files or directories within the project
124 |
125 | ```markdown
126 | move: Move files to new directory
127 | ```
128 |
129 | `rename`: Renaming files or directories within the project
130 |
131 | ```markdown
132 | rename: Rename files
133 | ```
134 |
135 | `remove`: Removing files or directories from the project
136 |
137 | ```markdown
138 | remove: Remove files
139 | ```
140 |
141 | `update`: Updating code, dependencies, or other components of the project
142 |
143 | ```markdown
144 | update: Update code
145 | ```
146 |
147 | These are just some examples, and you can create your own custom commit types as well. However, it's important to use them consistently and write clear, descriptive commit messages to make it easy for others to understand the changes you've made.
148 |
149 | **Important:** If you are planning to use a custom commit message type other than the ones listed above, make sure to add it to this list so that others can understand it as well. Create a pull request to add it to this file.
150 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to KooL Hyprland Projects
2 |
3 | Thank you for your interest in contributing to KooL Hyprland Projects! We welcome any contributions, including bug fixes, feature enhancements, documentation improvements, and other general improvements.
4 |
5 | ## Getting Started
6 |
7 | 1. Fork the branch development 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.
8 | - For fork this repository, click the **Fork** button in the top right corner of this page or click [here](https://github.com/JaKooLit/Fedora-Hyprland/fork).
9 | - Make sure to uncheck the Copy the `main` branch only. This will copy the development branch and other branches (if any)
10 |
11 | 2. Clone your forked repository to your local machine.
12 |
13 | - Use the following command to clone your forked repository to your local machine.
14 |
15 | ```bash
16 | git clone --depth=1 -b development https://github.com/JaKooLit/Fedora-Hyprland.git
17 | ```
18 |
19 | 3. Create a new branch for your changes.
20 |
21 | - For example, to create a new branch named `your-branch-name`, use the following command.
22 |
23 | ```bash
24 | git checkout -b your-branch-name
25 | ```
26 |
27 | 4. Make your changes and commit them with a descriptive commit message.
28 |
29 | - For example, to commit your changes, use the following command and make sure to follow the [commit message guidelines](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/COMMIT_MESSAGE_GUIDELINES.md).
30 |
31 | ```bash
32 | git commit -m "feat: add a new feature"
33 | ```
34 |
35 | 5. Push your changes to your forked repository.
36 |
37 | - For example, to push your changes to your forked repository, use the following command.
38 |
39 | ```bash
40 | git push origin your-branch-name
41 | ```
42 |
43 | 6. Submit a **pull request** to the development branch repository.
44 | - For example, to create a pull request, use the following steps.
45 | 1. Go to your forked repository.
46 | 2. Click the **Compare & pull request** button next to your `your-branch-name` branch.
47 | 3. Add a title and description for your pull request.
48 | 4. Click **Create pull request** and remember to add the relevant labels with using the [pull request template](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/.github/PULL_REQUEST_TEMPLATE.md).
49 |
50 | ## Guidelines
51 |
52 | - Follow the code style of the project.
53 | - Update the **documentation** if necessary.
54 | - Add tests if applicable.
55 | - Make sure all tests pass or fully tested before submitting your changes.
56 | - Keep your pull request focused and avoid including unrelated changes.
57 | - Remember to follow the following files before submitting your changes.
58 | - [bug.yml](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/.github/ISSUE_TEMPLATE/bug.yml) - Use this template to create a report to help us improve.
59 | - [feature.yml](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/.github/ISSUE_TEMPLATE/feature.yml) - Use this template to suggest a feature for this project.
60 | - [documentation-update.yml](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/.github/ISSUE_TEMPLATE/documentation-update.yml) - Use this template to propose a change to the documentation.
61 | - [PULL_REQUEST_TEMPLATE.md](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/.github/PULL_REQUEST_TEMPLATE.md) - Use this template to submit a pull request.
62 | - [COMMIT_MESSAGE_GUIDELINES.md](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/COMMIT_MESSAGE_GUIDELINES.md) - Read this file to learn about the commit message guidelines.
63 | - [CONTRIBUTING.md](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/CONTRIBUTING.md) - Read this file to learn about the contributing guidelines.
64 | - [LICENSE](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/LICENSE.md) - Read this file to learn about the license.
65 | - [README.md](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/README.md) - Read this file to learn about the project.
66 |
67 | ## Contact
68 |
69 | If you have any questions, feel free to contact via [GitHub Discussions](https://github.com/JaKooLit/Fedora-Hyprland/discussions) or [Through Discord Server](https://discord.gg/kool-tech-world)
70 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # 💌 ** KooL's Fedora - Hyprland Install Script ** 💌
4 |
5 |
6 |
7 |
8 |
9 |   
10 |
11 |
12 |
13 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 👇 KOOL's Hyprland-Dots related Links 👇
28 |
29 |
30 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | KooL Hyprland-Dotfiles Showcase
47 |
48 |
49 |
50 |
51 |
52 | https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
53 |
54 |
55 |
56 | ### Gallery and Videos
57 | #### 🎥 Feb 2025 Video explanation of installation with preset
58 | - [YOUTUBE-LINK](https://youtu.be/wQ70lo7P6vA?si=_QcbrNKh_Bg0L3wC)
59 | - [YOUTUBE-Hyprland-Playlist](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t)
60 |
61 |
62 | ### 🪧🪧🪧 ANNOUNCEMENT 🪧🪧🪧
63 | - This Repo does not contain Hyprland Dots or configs! Dotfiles can be checked here [`Hyprland-Dots`](https://github.com/JaKooLit/Hyprland-Dots) . During installation, if you opt to copy pre-configured dots, it will be downloaded from that centralized repo.
64 | - Hyprland-Dots use are constantly evolving / improving. you can check CHANGELOGS here [`Hyprland-Dots-Changelogs`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Changelogs)
65 | - Since the Hyprland-Dots are evolving, some of the screenshots maybe old
66 | - the wallpaper offered to be downloaded towards the end is from this [`REPO`](https://github.com/JaKooLit/Wallpaper-Bank)
67 |
68 | > [!IMPORTANT]
69 | > install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script (HIGHLY RECOMMENDED).
70 |
71 | > [!CAUTION]
72 | > Download this script on a directory where you have write permissions. ie. HOME. Or any directory within your home directory. Else script will fail
73 |
74 | #### ✨ Some notes on installation / Pre-requisites
75 | - This install script was tested on Minimal Fedora using Fedora Everything [`Link`](https://youtu.be/_U_WR33XNYY)
76 | - This script is meant to install in any Fedora Work stations and its Spins.
77 | - If starting from scratch, recommended spin to install is the Sway Spin. However, I have tested this script in Fedora Workstation (gnome), Plasma Spin and Sway
78 | - I have not tested in any other spin. However, if you decided to try, recommend to install SDDM. Apart from GDM and SDDM, any other Login Manager may not work nor launch Hyprland. However, hyprland can be launched through tty by type Hyprland
79 | - If you have nvidia, and wanted to use proprietary drivers, uninstall nouveau first (if installed). This script will be installing proprietary nvidia drivers and will not deal with removal of nouveau.
80 |
81 | #### 🚩 Switching to SDDM assuming you have GDM installed and running
82 | - if you really want switch to SDDM from GDM, you need to disable the gdm first.
83 | - `sudo systemctl disable gdm.service` then reboot
84 | - after reboot, need to ran the install script via tty. So suggest download the install script first. Then disable gdm. reboot and once logged in, cd into Distro-Hyprland then `./install.sh` and then choose SDDM and SDDM theme in the options.
85 | - NOTE: Distro-Hyprland is Arch-Hyprland, or Fedora-Hyprland .. depends on which install scripts you downloaded.
86 |
87 | #### ✨ Costumize the packages and COPR Repos
88 | - inside the install-scripts directory, you can edit 00-hypr-pkgs.sh, copr.sh, etc. Care though as the Hyprland Dots might not work properly
89 |
90 | #### 💫 SDDM and GTK Themes offered
91 | - If you opted to install SDDM theme, here's the [`LINK`](https://codeberg.org/JaKooLit/sddm-sequoia) which is a fork of [`LINK`](https://codeberg.org/minMelody/sddm-sequoia)
92 | - If you opted to install GTK Themes, Icons, here's the [`LINK`](https://github.com/JaKooLit/GTK-themes-icons). This also includes Bibata Modern Ice cursor.
93 |
94 | #### 🔔 NOTICE TO NVIDIA OWNERS ###
95 | - by default it is installing the latest and newest nvidia drivers. If you have an older nvidia-gpu (GTX 800 series and older), check out nvidia-fedora website [`LINK`](https://rpmfusion.org/Howto/NVIDIA#Installing_the_drivers) and edit nvidia.sh in install-scripts directory to install proper gpu driver
96 | > [!IMPORTANT]
97 | > If you want to use nouveau driver, dont choose nvidia in the option. This is because the nvidia installer part, it will blacklist nouveau. Hyprland will still be installed but it will skip blacklisting nouveau.
98 |
99 | ## ✨ Auto clone and install
100 | > [!CAUTION]
101 | > If you are using FISH SHELL, DO NOT use this function. Clone and ran install.sh instead
102 |
103 | - you can use this command to automatically clone the installer and ran the script for you
104 | - NOTE: `curl` package is required before running this command
105 | ```bash
106 | sh <(curl -L https://raw.githubusercontent.com/JaKooLit/Fedora-Hyprland/main/auto-install.sh)
107 | ```
108 |
109 | ## ✨ to use this script
110 | > clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
111 | ```bash
112 | git clone --depth=1 https://github.com/JaKooLit/Fedora-Hyprland.git ~/Fedora-Hyprland
113 | cd ~/Fedora-Hyprland
114 | chmod +x install.sh
115 | ./install.sh
116 | ```
117 |
118 | ### 💥 💥 UNINSTALL SCRIPT / Removal of Config Files
119 | - 11 March 2025, due to popular request, created a guided `uninstall.sh` script. USE this with caution as it may render your system unstable.
120 | - I will not be responsible if your system breaks
121 | - The best still to revert to previous state of your system is via timeshift of snapper
122 |
123 | - The old uninstall.sh is renamed to uninstall-old.sh . This is made by other party. I DO NOT GUARANTEE that it will not mess up your system. USE with caution.
124 |
125 | #### ✨ for ZSH and OH-MY-ZSH installation
126 | > installer should auto change your default shell to zsh. However, if it does not, do this
127 | ```bash
128 | chsh -s $(which zsh)
129 | zsh
130 | source ~/.zshrc
131 | ```
132 | - reboot or logout
133 | - by default `agnosterzak` theme is installed. Which is from external oh-my-zsh theme. You can find more themes from this [`OH-MY-ZSH-THEMES`](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes)
134 | - to change the theme, `SUPER SHIFT O` , choose desired theme, and close and open terminal.
135 | - or manually edit `~/.zshrc` . Look for ZSH_THEME="desired theme"
136 |
137 | #### 🎞️ AGS Overview DEMO
138 | - in case you wonder, here is a short demo of AGS overview [Youtube LINK](https://youtu.be/zY5SLNPBJTs)
139 |
140 | #### ✨ TO DO once installation done and dotfiles copied
141 | - SUPER H for HINT or click on the waybar HINT! Button
142 | - Head over to [KooL Hyprland WIKI](https://github.com/JaKooLit/Hyprland-Dots/wiki)
143 |
144 | #### 🙋 Got a questions regarding the Hyprland Dots or configurations? 🙋
145 | - Head over to wiki Link [`WIKI`](https://github.com/JaKooLit/Hyprland-Dots/wiki)
146 |
147 | #### ⌨ Keybinds
148 | - Keybinds [`CLICK`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Keybinds)
149 |
150 | > [!TIP]
151 | > KooL Hyprland has a searchable keybind function via rofi. (SUPER SHIFT K) or right click the `HINTS` waybar button
152 |
153 | #### 🙋 👋 Having issues or questions?
154 | - for the install part, kindly open issue on this repo
155 | - for the Pre-configured Hyprland dots / configuration, submit issue [`here`](https://github.com/JaKooLit/Hyprland-Dots/issues)
156 |
157 | #### 🔧 Proper way to re-installing a particular script from install-scripts directory
158 | - CD into Fedora-Hyprland directory and then ran the below command.
159 | - i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or
160 | - `./install-scripts/sddm.sh` - For reinstall sddm
161 | > [!IMPORTANT]
162 | > DO NOT cd into install-scripts directory as script will most likely to fail
163 |
164 | #### 🛣️ Roadmap:
165 | - [ ] possibly adding gruvbox themes, cursors, icons
166 |
167 | #### ❗ some known issues for nvidia
168 | - reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was
169 | ```
170 | while in sddm press ctrl+alt+F2 or F3
171 | log into your account
172 | `lspci -nn`, find the id of your nvidia card
173 | `ls /dev/dri/by-path` find the matching id
174 | `ls -l /dev/dri/by-path` to check where the symlink points to
175 | )
176 | ```
177 | - add "env = WLR_DRM_DEVICES,/dev/dri/cardX" to the ENVvariables config `~/.config/hypr/UserConfigs/ENVariables.conf` ; X being where the symlink of the gpu points to
178 |
179 | - more info from the hyprland wiki [`Hyprland Wiki Link`](https://wiki.hyprland.org/FAQ/#my-external-monitor-is-blank--doesnt-render--receives-no-signal-laptop)
180 |
181 |
182 | - reports from a member of discord for Nvidia for additional env's
183 | - remove # from the following env's on
184 | ```
185 | env = GBM_BACKEND,nvidia-drm
186 | env = WLR_RENDERER_ALLOW_SOFTWARE,1
187 | ```
188 |
189 | - [ ] If you having issues with installation and you have nvidia, [`THIS STEP`](https://github.com/JaKooLit/Fedora-Hyprland/issues/172#issuecomment-2659775375) might help
190 |
191 | #### ❗ other known issues
192 | > [!NOTE]
193 | > Auto start of Hyprland after login (no SDDM or GDM or any login managers)
194 | - [ ] This was disabled a few days ago. (19 May 2024). This was because some users, after they used the Distro-Hyprland scripts with other DE (gnome-wayland or plasma-wayland), if they choose to login into gnome-wayland for example, Hyprland is starting.
195 | - [ ] to avoid this, I disabled it. You can re-enable again by editing `~/.zprofile` . Remove all the # on the first lines
196 |
197 | - [ ] Note that Fedora 39 and older, waybar was not updated. Hyprland and older waybar build than 0.10.3, you will have no workspace
198 |
199 | - [ ] ROFI issues (scaling, unexplained scaling etc). This is most likely to experience if you are installing on a system where rofi is currently installed. To fix it uninstall rofi and install rofi-wayland . `sudo dnf autoremove rofi` . Install rofi-wayland with `sudo dnf install rofi-wayland`. Rofi-wayland is compatible with x11 so no need to worry.
200 |
201 | - [ ] If you use Brave or any Chrome based browsers, you may want to add```exec-once = gnome-keyring-daemon --start``` to `~/.config/hypr/UserConfigs/Startup_Apps.conf` if you don't want to get asked for your password each time you reboot your machine and want to access Brave. Obviously, you need to install gnome-keyring
202 |
203 | - [ ] If you want to have a Fedora minimal installation, suggest to install using Fedora Everything. See [`THIS`](https://github.com/JaKooLit/Fedora-Hyprland/discussions/171)
204 |
205 |
206 | #### 🫥 Improving performance for Older Nvidia Cards using driver 470
207 | - [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
208 |
209 | #### 📒 Final Notes
210 | - join my discord channel [`Discord`](https://discord.com/invite/kool-tech-world)
211 | - Feel free to copy, re-distribute, and use this script however you want. Would appreciate if you give me some loves by crediting my work :)
212 |
213 |
214 | #### ✍️ Contributing
215 | - As stated above, these script does not contain actual config files. These are only the installer of packages
216 | - If you want to contribute and/or test the Hyprland-Dotfiles (development branch), [`Hyprland-Dots-Development`](https://github.com/JaKooLit/Hyprland-Dots/tree/development)
217 | - Want to contribute on KooL-Hyprland-Dots Click [`HERE`](https://github.com/JaKooLit/Hyprland-Dots/blob/main/CONTRIBUTING.md) for a guide how to contribute
218 | - Want to contribute on This Installer? Click [`HERE`](https://github.com/JaKooLit/Fedora-Hyprland/blob/main/CONTRIBUTING.md) for a guide how to contribute
219 |
220 |
221 | #### 👍👍👍 Thanks and Credits!
222 | - [`Hyprland`](https://hyprland.org/) Of course to Hyprland and @vaxerski for this awesome Dynamic Tiling Manager.
223 | - [`HYPRLAND COPR REPO`](https://copr.fedorainfracloud.org/coprs/solopasha/hyprland/) - a shout out to the one who created and maintaining Hyprland COPR Repo
224 |
225 | ### 💖 Support
226 | - a Star on my Github repos would be nice 🌟
227 |
228 | - Subscribe to my Youtube Channel [YouTube](https://www.youtube.com/@Ja.KooLit)
229 |
230 | - you can also give support through coffee's or btc 😊
231 |
232 | [](https://ko-fi.com/jakoolit)
233 |
234 | or
235 |
236 | [](https://www.buymeacoffee.com/JaKooLit)
237 |
238 | Or you can donate cryto on my btc wallet :)
239 | > 1N3MeV2dsX6gQB42HXU6MF2hAix1mqjo8i
240 |
241 | 
242 |
243 |
244 |
245 | #### 📹 📹 Youtube videos (Click to view and watch the playlist)
246 | [](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t)
247 |
248 | ## 🥰🥰 💖💖 👍👍👍
249 | [](https://starchart.cc/JaKooLit/Fedora-Hyprland)
250 |
251 |
252 |
--------------------------------------------------------------------------------
/assets/.zprofile:
--------------------------------------------------------------------------------
1 | #if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
2 | # Hyprland
3 | #fi
4 |
--------------------------------------------------------------------------------
/assets/.zshrc:
--------------------------------------------------------------------------------
1 | # If you come from bash you might have to change your $PATH.
2 | # export PATH=$HOME/bin:/usr/local/bin:$PATH
3 |
4 | export ZSH="$HOME/.oh-my-zsh"
5 |
6 | ZSH_THEME="agnosterzak"
7 |
8 | plugins=(
9 | git
10 | dnf
11 | zsh-autosuggestions
12 | zsh-syntax-highlighting
13 | )
14 |
15 | source $ZSH/oh-my-zsh.sh
16 |
17 | # check the dnf plugins commands here
18 | # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/dnf
19 |
20 |
21 | # Display Pokemon-colorscripts
22 | # Project page: https://gitlab.com/phoneybadger/pokemon-colorscripts#on-other-distros-and-macos
23 | #pokemon-colorscripts --no-title -s -r #without fastfetch
24 | #pokemon-colorscripts --no-title -s -r | fastfetch -c $HOME/.config/fastfetch/config-pokemon.jsonc --logo-type file-raw --logo-height 10 --logo-width 5 --logo -
25 |
26 | # fastfetch. Will be disabled if above colorscript was chosen to install
27 | fastfetch -c $HOME/.config/fastfetch/config-compact.jsonc
28 |
29 | # Set-up FZF key bindings (CTRL R for fuzzy history finder)
30 | source <(fzf --zsh)
31 |
32 | HISTFILE=~/.zsh_history
33 | HISTSIZE=10000
34 | SAVEHIST=10000
35 | setopt appendhistory
36 |
37 | # Set-up icons for files/directories in terminal using lsd
38 | alias ls='lsd'
39 | alias l='ls -l'
40 | alias la='ls -a'
41 | alias lla='ls -la'
42 | alias lt='ls --tree'
43 |
--------------------------------------------------------------------------------
/assets/Thunar/accels.scm:
--------------------------------------------------------------------------------
1 | ; Thunar GtkAccelMap rc-file -*- scheme -*-
2 | ; this file is an automated accelerator map dump
3 | ;
4 | ; (gtk_accel_path "/ThunarStandardView/sort-by-type" "")
5 | ; (gtk_accel_path "/ThunarStatusBar/toggle-last-modified" "")
6 | ; (gtk_accel_path "/ThunarActionManager/cut" "x")
7 | ; (gtk_accel_path "/ThunarStandardView/sort-by-size" "")
8 | ; (gtk_accel_path "/ThunarWindow/file-menu" "")
9 | ; (gtk_accel_path "/ThunarWindow/close-tab" "w")
10 | ; (gtk_accel_path "/ThunarStatusBar/toggle-size" "")
11 | ; (gtk_accel_path "/ThunarWindow/new-window" "n")
12 | ; (gtk_accel_path "/ThunarWindow/clear-directory-specific-settings" "")
13 | ; (gtk_accel_path "/ThunarWindow/close-window" "q")
14 | ; (gtk_accel_path "/ThunarWindow/open-parent" "Up")
15 | ; (gtk_accel_path "/ThunarWindow/view-side-pane-menu" "")
16 | ; (gtk_accel_path "/ThunarStatusBar/toggle-size-in-bytes" "")
17 | ; (gtk_accel_path "/ThunarWindow/switch-previous-tab" "Page_Up")
18 | ; (gtk_accel_path "/ThunarBookmarks/3925ac2f7e4055558c447a20c2e047ad" "")
19 | ; (gtk_accel_path "/ThunarActionManager/open" "o")
20 | ; (gtk_accel_path "/ThunarStandardView/sort-ascending" "")
21 | ; (gtk_accel_path "/ThunarWindow/toggle-split-view" "F3")
22 | ; (gtk_accel_path "/ThunarActionManager/copy-2" "Insert")
23 | ; (gtk_accel_path "/ThunarActionManager/trash-delete" "Delete")
24 | ; (gtk_accel_path "/ThunarWindow/open-recent" "")
25 | ; (gtk_accel_path "/ThunarWindow/view-configure-toolbar" "")
26 | ; (gtk_accel_path "/ThunarStandardView/forward" "Right")
27 | ; (gtk_accel_path "/ThunarActionManager/restore" "")
28 | ; (gtk_accel_path "/ThunarBookmarks/9f0d843e4074095bf657b996746ec75c" "")
29 | ; (gtk_accel_path "/ThunarWindow/open-location-alt" "d")
30 | ; (gtk_accel_path "/ThunarBookmarks/a16339451d60726d0755a887bd755af2" "")
31 | ; (gtk_accel_path "/ThunarWindow/zoom-out-alt" "KP_Subtract")
32 | ; (gtk_accel_path "/ThunarStandardView/select-by-pattern" "s")
33 | ; (gtk_accel_path "/ThunarWindow/open-file-menu" "F10")
34 | ; (gtk_accel_path "/ThunarWindow/contents" "F1")
35 | ; (gtk_accel_path "/ThunarWindow/show-highlight" "")
36 | ; (gtk_accel_path "/ThunarBookmarks/44e0e66b3d753576f90ed75c87917822" "")
37 | ; (gtk_accel_path "/ThunarStandardView/sort-descending" "")
38 | ; (gtk_accel_path "/ThunarStandardView/sort-by-name" "")
39 | ; (gtk_accel_path "/ThunarStandardView/select-all-files" "a")
40 | ; (gtk_accel_path "/ThunarActionManager/execute" "")
41 | ; (gtk_accel_path "/ThunarStandardView/properties" "Return")
42 | ; (gtk_accel_path "/ThunarActionManager/cut-2" "")
43 | ; (gtk_accel_path "/ThunarStandardView/sort-by-dtime" "")
44 | ; (gtk_accel_path "/ThunarWindow/switch-next-tab" "Page_Down")
45 | ; (gtk_accel_path "/ThunarActionManager/paste-2" "Insert")
46 | ; (gtk_accel_path "/ThunarWindow/open-templates" "")
47 | ; (gtk_accel_path "/ThunarStatusBar/toggle-filetype" "")
48 | ; (gtk_accel_path "/ThunarWindow/close-all-windows" "w")
49 | ; (gtk_accel_path "/ThunarStandardView/create-document" "")
50 | ; (gtk_accel_path "/ThunarWindow/detach-tab" "")
51 | ; (gtk_accel_path "/ThunarBookmarks/978d3e7a7225e42c977fe94183792d87" "")
52 | ; (gtk_accel_path "/ThunarWindow/cancel-search" "Escape")
53 | ; (gtk_accel_path "/ThunarWindow/zoom-in-alt2" "equal")
54 | ; (gtk_accel_path "/ThunarShortcutsPane/sendto-shortcuts" "d")
55 | ; (gtk_accel_path "/ThunarActionManager/undo" "z")
56 | ; (gtk_accel_path "/ThunarStandardView/toggle-sort-order" "")
57 | ; (gtk_accel_path "/ThunarWindow/reload-alt" "F5")
58 | ; (gtk_accel_path "/ThunarWindow/view-location-selector-entry" "")
59 | ; (gtk_accel_path "/ThunarActionManager/paste" "v")
60 | ; (gtk_accel_path "/ThunarWindow/zoom-in-alt1" "KP_Add")
61 | ; (gtk_accel_path "/ThunarWindow/view-menubar" "m")
62 | ; (gtk_accel_path "/ThunarStandardView/back" "Left")
63 | ; (gtk_accel_path "/ThunarWindow/open-desktop" "")
64 | ; (gtk_accel_path "/ThunarWindow/view-as-detailed-list" "2")
65 | ; (gtk_accel_path "/ThunarActionManager/restore-show" "")
66 | ; (gtk_accel_path "/ThunarWindow/zoom-out" "minus")
67 | ; (gtk_accel_path "/ThunarStatusBar/toggle-display-name" "")
68 | ; (gtk_accel_path "/ThunarWindow/sendto-menu" "")
69 | ; (gtk_accel_path "/ThunarWindow/go-menu" "")
70 | ; (gtk_accel_path "/ThunarWindow/remove-from-recent" "")
71 | ; (gtk_accel_path "/ThunarActionManager/open-with-other" "")
72 | ; (gtk_accel_path "/ThunarStandardView/invert-selection" "")
73 | ; (gtk_accel_path "/ThunarWindow/view-side-pane-shortcuts" "b")
74 | ; (gtk_accel_path "/ThunarWindow/view-location-selector-menu" "")
75 | ; (gtk_accel_path "/ThunarWindow/edit-menu" "")
76 | ; (gtk_accel_path "/ThunarWindow/reload" "r")
77 | ; (gtk_accel_path "/ThunarActionManager/move-to-trash" "")
78 | ; (gtk_accel_path "/ThunarActionManager/copy" "c")
79 | ; (gtk_accel_path "/ThunarActionManager/delete-3" "KP_Delete")
80 | ; (gtk_accel_path "/ThunarWindow/toggle-side-pane" "F9")
81 | ; (gtk_accel_path "/ThunarStandardView/sort-by-mtime" "")
82 | ; (gtk_accel_path "/ThunarBookmarks/a50db0a56a1e6c31df6bf18c55eb78cd" "")
83 | ; (gtk_accel_path "/ThunarStandardView/arrange-items-menu" "")
84 | ; (gtk_accel_path "/ThunarStandardView/unselect-all-files" "Escape")
85 | ; (gtk_accel_path "/ThunarWindow/open-computer" "")
86 | ; (gtk_accel_path "/ThunarWindow/bookmarks-menu" "")
87 | ; (gtk_accel_path "/ThunarWindow/toggle-image-preview" "")
88 | ; (gtk_accel_path "/ThunarWindow/view-as-icons" "1")
89 | ; (gtk_accel_path "/ThunarActionManager/delete-2" "Delete")
90 | ; (gtk_accel_path "/ThunarWindow/zoom-in" "plus")
91 | ; (gtk_accel_path "/ThunarStandardView/rename" "F2")
92 | ; (gtk_accel_path "/ThunarWindow/open-location" "l")
93 | ; (gtk_accel_path "/ThunarWindow/view-as-compact-list" "3")
94 | ; (gtk_accel_path "/ThunarWindow/view-menu" "")
95 | ; (gtk_accel_path "/ThunarWindow/search" "f")
96 | ; (gtk_accel_path "/ThunarWindow/new-tab" "t")
97 | ; (gtk_accel_path "/ThunarWindow/zoom-reset" "0")
98 | ; (gtk_accel_path "/ThunarWindow/contents/help-menu" "")
99 | ; (gtk_accel_path "/ThunarActionManager/open-in-new-tab" "p")
100 | ; (gtk_accel_path "/ThunarWindow/view-location-selector-buttons" "")
101 | ; (gtk_accel_path "/ThunarActionManager/redo" "z")
102 | ; (gtk_accel_path "/ThunarWindow/open-trash" "")
103 | ; (gtk_accel_path "/ThunarActionManager/open-in-new-window" "o")
104 | ; (gtk_accel_path "/ThunarWindow/view-statusbar" "")
105 | ; (gtk_accel_path "/ThunarActionManager/open-location" "")
106 | ; (gtk_accel_path "/ThunarStandardView/duplicate" "")
107 | ; (gtk_accel_path "/ThunarBookmarks/c76f07a72d3c8ef5d4bf8e84c8981221" "")
108 | ; (gtk_accel_path "/ThunarActionManager/trash-delete-2" "KP_Delete")
109 | ; (gtk_accel_path "/ThunarStandardView/create-folder" "n")
110 | ; (gtk_accel_path "/ThunarWindow/open-home" "Home")
111 | ; (gtk_accel_path "/ThunarWindow/show-hidden" "h")
112 | ; (gtk_accel_path "/ThunarStandardView/set-default-app" "")
113 | ; (gtk_accel_path "/ThunarWindow/empty-trash" "")
114 | ; (gtk_accel_path "/ThunarStandardView/back-alt" "BackSpace")
115 | ; (gtk_accel_path "/ThunarWindow/preferences" "")
116 | ; (gtk_accel_path "/ThunarBookmarks/8ea92a0b35875a5a65ffafcf02698ce8" "")
117 | ; (gtk_accel_path "/ThunarActionManager/delete" "")
118 | ; (gtk_accel_path "/ThunarWindow/view-side-pane-tree" "e")
119 | ; (gtk_accel_path "/ThunarWindow/open-file-system" "")
120 | ; (gtk_accel_path "/ThunarWindow/open-network" "")
121 | ; (gtk_accel_path "/ThunarActionManager/sendto-desktop" "")
122 | ; (gtk_accel_path "/ThunarStandardView/make-link" "")
123 | ; (gtk_accel_path "/ThunarWindow/zoom-reset-alt" "KP_0")
124 | ; (gtk_accel_path "/ThunarWindow/about" "")
125 |
--------------------------------------------------------------------------------
/assets/Thunar/uca.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | audacious
5 | Add to audacious playlist
6 |
7 | 1681893052016505-1
8 | audacious -e %U
9 |
10 | *
11 | *
12 |
13 |
14 |
15 | utilities-terminal
16 | Open Terminal Here
17 |
18 | 1703572977408169-1
19 | exo-open --working-directory %f --launch TerminalEmulator
20 | Launch TerminalEmulator
21 |
22 | *
23 |
24 |
25 |
26 |
27 | checkbox
28 | Check sha1sum
29 |
30 | 1526633271260079-26
31 | yad --info --title="Check sha1 for %n" --text="$(sha1sum %f)"
32 | Check sha1sum
33 |
34 | *.iso;*.ISO
35 |
36 |
37 |
38 | checkbox
39 | Check sha256sum
40 |
41 | 1577688162350307-1
42 | yad --info --title="Check sha256 for %n" --text="$(sha256sum %f)"
43 | Check sha256sum
44 |
45 | *.iso;*.ISO
46 |
47 |
48 |
49 | checkbox
50 | Check md5sum
51 |
52 | 1526736788575383-2
53 | yad --info --title="Check md5 for %n" --text="$(md5sum %f)"
54 | Check md5sum
55 |
56 | *.iso;*.ISO;*.tar.gz;*.TAR.GZ;*.zip;*.ZIP
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/agnosterzak.zsh-theme:
--------------------------------------------------------------------------------
1 | # vim:ft=zsh ts=2 sw=2 sts=2
2 | #
3 | # agnoster's Theme - https://gist.github.com/3712874
4 | # A Powerline-inspired theme for ZSH
5 | #
6 | # # README
7 | #
8 | # In order for this theme to render correctly, you will need a
9 | # [Powerline-patched font](https://gist.github.com/1595572).
10 | #
11 | # In addition, I recommend the
12 | # [Solarized theme](https://github.com/altercation/solarized/) and, if you're
13 | # using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
14 | # it has significantly better color fidelity.
15 | #
16 | # # Goals
17 | #
18 | # The aim of this theme is to only show you *relevant* information. Like most
19 | # prompts, it will only show git information when in a git working directory.
20 | # However, it goes a step further: everything from the current user and
21 | # hostname to whether the last call exited with an error to whether background
22 | # jobs are running in this shell will all be displayed automatically when
23 | # appropriate.
24 |
25 | ### Segment drawing
26 | # A few utility functions to make it easy and re-usable to draw segmented prompts
27 |
28 | CURRENT_BG='NONE'
29 |
30 | # Characters
31 | SEGMENT_SEPARATOR="\ue0b0"
32 | PLUSMINUS="\u00b1"
33 | BRANCH="\ue0a0"
34 | DETACHED="\u27a6"
35 | CROSS="\u2718"
36 | LIGHTNING="\u26a1"
37 | GEAR="\u2699"
38 |
39 | # Begin a segment
40 | # Takes two arguments, background and foreground. Both can be omitted,
41 | # rendering default background/foreground.
42 | prompt_segment() {
43 | local bg fg
44 | [[ -n $1 ]] && bg="%K{$1}" || bg="%k"
45 | [[ -n $2 ]] && fg="%F{$2}" || fg="%f"
46 | if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
47 | print -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
48 | else
49 | print -n "%{$bg%}%{$fg%} "
50 | fi
51 | CURRENT_BG=$1
52 | [[ -n $3 ]] && print -n $3
53 | }
54 |
55 | # End the prompt, closing any open segments
56 | prompt_end() {
57 | if [[ -n $CURRENT_BG ]]; then
58 | print -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
59 | else
60 | print -n "%{%k%}"
61 | fi
62 | print -n "%{%f%}"
63 | CURRENT_BG=''
64 | }
65 |
66 | ### Prompt components
67 | # Each component will draw itself, and hide itself if no information needs to be shown
68 |
69 | # Context: user@hostname (who am I and where am I)
70 | prompt_context() {
71 | if [[ -n "$SSH_CLIENT" ]]; then
72 | prompt_segment magenta white "%{$fg_bold[white]%(!.%{%F{white}%}.)%}$USER@%m%{$fg_no_bold[white]%}"
73 | else
74 | prompt_segment yellow magenta "%{$fg_bold[magenta]%(!.%{%F{magenta}%}.)%}@$USER%{$fg_no_bold[magenta]%}"
75 | fi
76 | }
77 |
78 | # Battery Level
79 | prompt_battery() {
80 | HEART='♥ '
81 |
82 | if [[ $(uname) == "Darwin" ]] ; then
83 |
84 | function battery_is_charging() {
85 | [ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]
86 | }
87 |
88 | function battery_pct() {
89 | local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"
90 | typeset -F maxcapacity=$(echo $smart_battery_status | grep '^.*"MaxCapacity"\ =\ ' | sed -e 's/^.*"MaxCapacity"\ =\ //')
91 | typeset -F currentcapacity=$(echo $smart_battery_status | grep '^.*"CurrentCapacity"\ =\ ' | sed -e 's/^.*CurrentCapacity"\ =\ //')
92 | integer i=$(((currentcapacity/maxcapacity) * 100))
93 | echo $i
94 | }
95 |
96 | function battery_pct_remaining() {
97 | if battery_is_charging ; then
98 | battery_pct
99 | else
100 | echo "External Power"
101 | fi
102 | }
103 |
104 | function battery_time_remaining() {
105 | local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"
106 | if [[ $(echo $smart_battery_status | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
107 | timeremaining=$(echo $smart_battery_status | grep '^.*"AvgTimeToEmpty"\ =\ ' | sed -e 's/^.*"AvgTimeToEmpty"\ =\ //')
108 | if [ $timeremaining -gt 720 ] ; then
109 | echo "::"
110 | else
111 | echo "~$((timeremaining / 60)):$((timeremaining % 60))"
112 | fi
113 | fi
114 | }
115 |
116 | b=$(battery_pct_remaining)
117 | if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
118 | if [ $b -gt 50 ] ; then
119 | prompt_segment green white
120 | elif [ $b -gt 20 ] ; then
121 | prompt_segment yellow white
122 | else
123 | prompt_segment red white
124 | fi
125 | echo -n "%{$fg_bold[white]%}$HEART$(battery_pct_remaining)%%%{$fg_no_bold[white]%}"
126 | fi
127 | fi
128 |
129 | if [[ $(uname) == "Linux" && -d /sys/module/battery ]] ; then
130 |
131 | function battery_is_charging() {
132 | ! [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]]
133 | }
134 |
135 | function battery_pct() {
136 | if (( $+commands[acpi] )) ; then
137 | echo "$(acpi | cut -f2 -d ',' | tr -cd '[:digit:]')"
138 | fi
139 | }
140 |
141 | function battery_pct_remaining() {
142 | if [ ! $(battery_is_charging) ] ; then
143 | battery_pct
144 | else
145 | echo "External Power"
146 | fi
147 | }
148 |
149 | function battery_time_remaining() {
150 | if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
151 | echo $(acpi | cut -f3 -d ',')
152 | fi
153 | }
154 |
155 | b=$(battery_pct_remaining)
156 | if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
157 | if [ $b -gt 40 ] ; then
158 | prompt_segment green white
159 | elif [ $b -gt 20 ] ; then
160 | prompt_segment yellow white
161 | else
162 | prompt_segment red white
163 | fi
164 | echo -n "%{$fg_bold[white]%}$HEART$(battery_pct_remaining)%%%{$fg_no_bold[white]%}"
165 | fi
166 |
167 | fi
168 | }
169 |
170 | # Git: branch/detached head, dirty status
171 | prompt_git() {
172 | #«»±˖˗‑‐‒ ━ ✚‐↔←↑↓→↭⇎⇔⋆━◂▸◄►◆☀★☗☊✔✖❮❯⚑⚙
173 | local PL_BRANCH_CHAR
174 | () {
175 | local LC_ALL="" LC_CTYPE="en_US.UTF-8"
176 | PL_BRANCH_CHAR="$BRANCH"
177 | }
178 | local ref dirty mode repo_path clean has_upstream
179 | local modified untracked added deleted tagged stashed
180 | local ready_commit git_status bgclr fgclr
181 | local commits_diff commits_ahead commits_behind has_diverged to_push to_pull
182 |
183 | repo_path=$(git rev-parse --git-dir 2>/dev/null)
184 |
185 | if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
186 | dirty=$(parse_git_dirty)
187 | git_status=$(git status --porcelain 2> /dev/null)
188 | ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
189 | if [[ -n $dirty ]]; then
190 | clean=''
191 | bgclr='yellow'
192 | fgclr='magenta'
193 | else
194 | clean=' ✔'
195 | bgclr='green'
196 | fgclr='white'
197 | fi
198 |
199 | local upstream=$(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} 2> /dev/null)
200 | if [[ -n "${upstream}" && "${upstream}" != "@{upstream}" ]]; then has_upstream=true; fi
201 |
202 | local current_commit_hash=$(git rev-parse HEAD 2> /dev/null)
203 |
204 | local number_of_untracked_files=$(\grep -c "^??" <<< "${git_status}")
205 | # if [[ $number_of_untracked_files -gt 0 ]]; then untracked=" $number_of_untracked_files◆"; fi
206 | if [[ $number_of_untracked_files -gt 0 ]]; then untracked=" $number_of_untracked_files☀"; fi
207 |
208 | local number_added=$(\grep -c "^A" <<< "${git_status}")
209 | if [[ $number_added -gt 0 ]]; then added=" $number_added✚"; fi
210 |
211 | local number_modified=$(\grep -c "^.M" <<< "${git_status}")
212 | if [[ $number_modified -gt 0 ]]; then
213 | modified=" $number_modified●"
214 | bgclr='red'
215 | fgclr='white'
216 | fi
217 |
218 | local number_added_modified=$(\grep -c "^M" <<< "${git_status}")
219 | local number_added_renamed=$(\grep -c "^R" <<< "${git_status}")
220 | if [[ $number_modified -gt 0 && $number_added_modified -gt 0 ]]; then
221 | modified="$modified$((number_added_modified+number_added_renamed))±"
222 | elif [[ $number_added_modified -gt 0 ]]; then
223 | modified=" ●$((number_added_modified+number_added_renamed))±"
224 | fi
225 |
226 | local number_deleted=$(\grep -c "^.D" <<< "${git_status}")
227 | if [[ $number_deleted -gt 0 ]]; then
228 | deleted=" $number_deleted‒"
229 | bgclr='red'
230 | fgclr='white'
231 | fi
232 |
233 | local number_added_deleted=$(\grep -c "^D" <<< "${git_status}")
234 | if [[ $number_deleted -gt 0 && $number_added_deleted -gt 0 ]]; then
235 | deleted="$deleted$number_added_deleted±"
236 | elif [[ $number_added_deleted -gt 0 ]]; then
237 | deleted=" ‒$number_added_deleted±"
238 | fi
239 |
240 | local tag_at_current_commit=$(git describe --exact-match --tags $current_commit_hash 2> /dev/null)
241 | if [[ -n $tag_at_current_commit ]]; then tagged=" ☗$tag_at_current_commit "; fi
242 |
243 | local number_of_stashes="$(git stash list -n1 2> /dev/null | wc -l)"
244 | if [[ $number_of_stashes -gt 0 ]]; then
245 | stashed=" ${number_of_stashes##*( )}⚙"
246 | bgclr='magenta'
247 | fgclr='white'
248 | fi
249 |
250 | if [[ $number_added -gt 0 || $number_added_modified -gt 0 || $number_added_deleted -gt 0 ]]; then ready_commit=' ⚑'; fi
251 |
252 | local upstream_prompt=''
253 | if [[ $has_upstream == true ]]; then
254 | commits_diff="$(git log --pretty=oneline --topo-order --left-right ${current_commit_hash}...${upstream} 2> /dev/null)"
255 | commits_ahead=$(\grep -c "^<" <<< "$commits_diff")
256 | commits_behind=$(\grep -c "^>" <<< "$commits_diff")
257 | upstream_prompt="$(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} 2> /dev/null)"
258 | upstream_prompt=$(sed -e 's/\/.*$/ ☊ /g' <<< "$upstream_prompt")
259 | fi
260 |
261 | has_diverged=false
262 | if [[ $commits_ahead -gt 0 && $commits_behind -gt 0 ]]; then has_diverged=true; fi
263 | if [[ $has_diverged == false && $commits_ahead -gt 0 ]]; then
264 | if [[ $bgclr == 'red' || $bgclr == 'magenta' ]] then
265 | to_push=" $fg_bold[white]↑$commits_ahead$fg_bold[$fgclr]"
266 | else
267 | to_push=" $fg_bold[black]↑$commits_ahead$fg_bold[$fgclr]"
268 | fi
269 | fi
270 | if [[ $has_diverged == false && $commits_behind -gt 0 ]]; then to_pull=" $fg_bold[magenta]↓$commits_behind$fg_bold[$fgclr]"; fi
271 |
272 | if [[ -e "${repo_path}/BISECT_LOG" ]]; then
273 | mode=" "
274 | elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
275 | mode=" >M<"
276 | elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
277 | mode=" >R>"
278 | fi
279 |
280 | prompt_segment $bgclr $fgclr
281 |
282 | print -n "%{$fg_bold[$fgclr]%}${ref/refs\/heads\//$PL_BRANCH_CHAR $upstream_prompt}${mode}$to_push$to_pull$clean$tagged$stashed$untracked$modified$deleted$added$ready_commit%{$fg_no_bold[$fgclr]%}"
283 | fi
284 | }
285 |
286 | prompt_hg() {
287 | local rev status
288 | if $(hg id >/dev/null 2>&1); then
289 | if $(hg prompt >/dev/null 2>&1); then
290 | if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
291 | # if files are not added
292 | prompt_segment red white
293 | st='±'
294 | elif [[ -n $(hg prompt "{status|modified}") ]]; then
295 | # if any modification
296 | prompt_segment yellow black
297 | st='±'
298 | else
299 | # if working copy is clean
300 | prompt_segment green black
301 | fi
302 | print -n $(hg prompt "☿ {rev}@{branch}") $st
303 | else
304 | st=""
305 | rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
306 | branch=$(hg id -b 2>/dev/null)
307 | if `hg st | grep -q "^\?"`; then
308 | prompt_segment red black
309 | st='±'
310 | elif `hg st | grep -q "^[MA]"`; then
311 | prompt_segment yellow black
312 | st='±'
313 | else
314 | prompt_segment green black
315 | fi
316 | print -n "☿ $rev@$branch" $st
317 | fi
318 | fi
319 | }
320 |
321 | # Dir: current working directory
322 | prompt_dir() {
323 | prompt_segment cyan white "%{$fg_bold[white]%}%~%{$fg_no_bold[white]%}"
324 | }
325 |
326 | # Virtualenv: current working virtualenv
327 | prompt_virtualenv() {
328 | local virtualenv_path="$VIRTUAL_ENV"
329 | if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
330 | prompt_segment blue black "(`basename $virtualenv_path`)"
331 | fi
332 | }
333 |
334 | prompt_time() {
335 | prompt_segment blue white "%{$fg_bold[white]%}%D{%a %e %b - %H:%M}%{$fg_no_bold[white]%}"
336 | }
337 |
338 | # Status:
339 | # - was there an error
340 | # - am I root
341 | # - are there background jobs?
342 | prompt_status() {
343 | local symbols
344 | symbols=()
345 | [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}$CROSS"
346 | [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}$LIGHTNING"
347 | [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}$GEAR"
348 |
349 | [[ -n "$symbols" ]] && prompt_segment black default "$symbols"
350 | }
351 |
352 | ## Main prompt
353 | build_prompt() {
354 | RETVAL=$?
355 | print -n "\n"
356 | prompt_status
357 | #prompt_battery
358 | prompt_time
359 | prompt_virtualenv
360 | prompt_dir
361 | prompt_git
362 | prompt_hg
363 | prompt_end
364 | CURRENT_BG='NONE'
365 | print -n "\n"
366 | prompt_context
367 | prompt_end
368 | }
369 |
370 | PROMPT='%{%f%b%k%}$(build_prompt) '
371 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/antares.zsh-theme:
--------------------------------------------------------------------------------
1 |
2 | ###
3 | ### You can re-define the following variables in your .zshrc file
4 | ### in order to customize the appearance of the prompt
5 | ###
6 |
7 | # The indentation of the rprompt
8 | ZLE_RPROMPT_INDENT=${ZLE_RPROMPT_INDENT:-0}
9 |
10 | # Whether to use oh-my-zsh's git-prompt plugin
11 | # or the builtin logic written in this file
12 | ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT=""
13 |
14 | # Whether to gather additional details about the git status
15 | # This option only applies when using the builtin logic
16 | # Usefull when dealing with huge repositories to speed things up
17 | ZSH_ANTARES_USE_LIGHT_GIT_MODE=""
18 |
19 | # The colors to use for the various elements of the prompt
20 | ZSH_ANTARES_FG_EXECTIME="#dd00ff"
21 | ZSH_ANTARES_FG_ERRVAL="#c31a1a"
22 | ZSH_ANTARES_FG_DECO="#ffffff"
23 | ZSH_ANTARES_FG_PWD_OK="#ffffff"
24 | ZSH_ANTARES_BG_PWD_OK="#0055ff"
25 | ZSH_ANTARES_FG_PWD_ERR="#ffffff"
26 | ZSH_ANTARES_BG_PWD_ERR="#c31a1a"
27 | ZSH_ANTARES_FG_GIT_INIT="#000000"
28 | ZSH_ANTARES_BG_GIT_INIT="#b5f3a1"
29 | ZSH_ANTARES_FG_GIT_BARE="#000000"
30 | ZSH_ANTARES_BG_GIT_BARE="#b07a4e"
31 | ZSH_ANTARES_FG_GIT_BRANCH="#000000"
32 | ZSH_ANTARES_BG_GIT_BRANCH="#47cc2b"
33 | ZSH_ANTARES_FG_GIT_DETACH="#000000"
34 | ZSH_ANTARES_BG_GIT_DETACH="#eeaa22"
35 | ZSH_ANTARES_FG_GIT_CONFLICT="#000000"
36 | ZSH_ANTARES_BG_GIT_CONFLICT="#c31a1a"
37 | ZSH_ANTARES_FG_GIT_AHEAD="#cfcfcf"
38 | ZSH_ANTARES_FG_GIT_BEHIND="#9f9f9f"
39 | ZSH_ANTARES_FG_GIT_STAGED="#6cc6ee"
40 | ZSH_ANTARES_FG_GIT_ADDED="#04c304"
41 | ZSH_ANTARES_FG_GIT_DELETED="#e7165a"
42 | ZSH_ANTARES_FG_GIT_CHANGED="#ee9931"
43 | ZSH_ANTARES_FG_GIT_CONFLICTS="#ff0000"
44 | ZSH_ANTARES_FG_GIT_UNTRACKED="#bbffff"
45 | ZSH_ANTARES_FG_GIT_STASHED="#eaa0ff"
46 | ZSH_ANTARES_FG_GIT_TAG="#ffffff"
47 | ZSH_ANTARES_FG_JOBS="#9f9f9f"
48 | ZSH_ANTARES_FG_PRIVILEDGES="#ffdd44"
49 |
50 | # The characters (or strings, by will) to use for some of the elements
51 | ZSH_ANTARES_STR_GIT_BARE="⛁"
52 | ZSH_ANTARES_STR_GIT_AHEAD="↑"
53 | ZSH_ANTARES_STR_GIT_BEHIND="↓"
54 | ZSH_ANTARES_STR_GIT_STAGED="●"
55 | ZSH_ANTARES_STR_GIT_ADDED="✚"
56 | ZSH_ANTARES_STR_GIT_DELETED="━"
57 | ZSH_ANTARES_STR_GIT_CHANGED="✱"
58 | ZSH_ANTARES_STR_GIT_CONFLICTS="✖"
59 | ZSH_ANTARES_STR_GIT_UNTRACKED="❍"
60 | ZSH_ANTARES_STR_GIT_STASHED="⚑"
61 | ZSH_ANTARES_STR_GIT_TAG="🏲"
62 | ZSH_ANTARES_STR_JOBS="⚙"
63 | ZSH_ANTARES_STR_ROOT="#"
64 | ZSH_ANTARES_STR_USER="$"
65 |
66 | # The path expansion to use to display the pwd
67 | ZSH_ANTARES_PATHVAR='%~'
68 |
69 | # The minimum amount of time (in seconds) a command shall take to complete
70 | # in order to display the execution time in the prompt
71 | ZSH_ANTARES_MIN_EXEC_TIME=0
72 |
73 | # The control character used to insert a new line
74 | # You shouldn't edit this variable, but if you really want to...
75 | ZSH_ANTARES_LINEFEED=$'\n'
76 |
77 | ###
78 | ### End of the re-definable section
79 | ###
80 |
81 |
82 | antares_update_git_status()
83 | {
84 | ZSH_ANTARES_GIT_STATUS=""
85 | ZSH_ANTARES_GIT_IN_WORKING_TREE=0
86 | ZSH_ANTARES_GIT_IS_INIT_REPO=0
87 | ZSH_ANTARES_GIT_IS_BARE_REPO=0
88 | ZSH_ANTARES_GIT_IS_DETACHED_HEAD=0
89 | ZSH_ANTARES_GIT_HAS_CONFLICTS=0
90 | ZSH_ANTARES_GIT_HAS_TAGS=0
91 | ZSH_ANTARES_GIT_TAG=""
92 |
93 | if ( $(git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null) )
94 | then
95 | ZSH_ANTARES_GIT_IN_WORKING_TREE=1
96 | private branch_name="$(git branch --show-current)"
97 | if [ -n "$branch_name" ]
98 | then
99 | if [ -z "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
100 | then
101 | GIT_BRANCH="$branch_name"
102 | fi
103 | if ( ! $(git rev-parse --verify HEAD 1>/dev/null 2>/dev/null) )
104 | then
105 | ZSH_ANTARES_GIT_IS_INIT_REPO=1
106 | fi
107 | if [ $(git rev-parse --is-bare-repository) = "true" ]
108 | then
109 | ZSH_ANTARES_GIT_IS_BARE_REPO=1
110 | GIT_BRANCH="$ZSH_ANTARES_STR_GIT_BARE"
111 | fi
112 | else
113 | ZSH_ANTARES_GIT_IS_DETACHED_HEAD=1
114 | if [ -z "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
115 | then
116 | GIT_BRANCH="$(git rev-parse --short HEAD)"
117 | if [ -z "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ]
118 | then
119 | private git_tag="$(git tag --points-at=HEAD)"
120 | if [ -n "$git_tag" ]
121 | then
122 | ZSH_ANTARES_GIT_HAS_TAGS=1
123 | private n_tags="$(echo "$git_tag" | wc -l)"
124 | if (( n_tags == 1 ))
125 | then
126 | ZSH_ANTARES_GIT_TAG=" $ZSH_ANTARES_STR_GIT_TAG $git_tag"
127 | elif (( n_tags > 1 ))
128 | then
129 | ZSH_ANTARES_GIT_TAG=" $ZSH_ANTARES_STR_GIT_TAG $n_tags"
130 | else
131 | fi
132 | fi
133 | fi
134 | fi
135 | fi
136 | else
137 | antares_reset_git_info
138 | return
139 | fi
140 |
141 | if (( ZSH_ANTARES_GIT_IS_BARE_REPO ))
142 | then
143 | antares_reset_git_counts
144 | GIT_AHEAD=$(git rev-list --left-only HEAD..FETCH_HEAD --count)
145 | GIT_BEHIND=$(git rev-list --right-only HEAD..FETCH_HEAD --count)
146 | return
147 | fi
148 |
149 | if [ -n "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
150 | then
151 | GIT_ADDED=0
152 | elif [ -n "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ]
153 | then
154 | antares_reset_git_counts
155 | return
156 | else
157 | private git_status="$(git status -sb)"
158 | if [ -n "$git_status" ]
159 | then
160 | GIT_STAGED=$(echo $git_status | grep '^[AMD]. ' | wc -l)
161 | GIT_ADDED=$(echo $git_status | grep '^A ' | wc -l)
162 | GIT_DELETED=$(echo $git_status | grep -E '^(D |.D) ' | wc -l)
163 | GIT_CHANGED=$(echo $git_status | grep -E '^(M |.M) ' | wc -l)
164 | GIT_CONFLICTS=$(echo $git_status | grep '^U. ' | wc -l)
165 | GIT_UNTRACKED=$(echo $git_status | grep '^?? ' | wc -l)
166 | GIT_STASHED=$(git stash list | wc -l)
167 | if (( ZSH_ANTARES_GIT_IS_DETACHED_HEAD ))
168 | then
169 | GIT_AHEAD=0
170 | GIT_BEHIND=0
171 | elif (( ! ZSH_ANTARES_GIT_IS_INIT_REPO ))
172 | then
173 | private left_right=$(echo $git_status | grep '^## ' | cut -d" " -f2)
174 | GIT_AHEAD=$(git rev-list --left-only $left_right --count)
175 | GIT_BEHIND=$(git rev-list --right-only $left_right --count)
176 | fi
177 | fi
178 | fi
179 |
180 | ZSH_ANTARES_GIT_HAS_CONFLICTS=$(( GIT_CONFLICTS > 0 ))
181 | }
182 |
183 | antares_reset_git_info()
184 | {
185 | if [ -z "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
186 | then
187 | GIT_BRANCH=""
188 | fi
189 | antares_reset_git_counts
190 | }
191 | antares_reset_git_counts()
192 | {
193 | if [ -n "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
194 | then
195 | GIT_ADDED=0
196 | else
197 | GIT_AHEAD=0
198 | GIT_BEHIND=0
199 | GIT_STAGED=0
200 | GIT_ADDED=0
201 | GIT_DELETED=0
202 | GIT_CHANGED=0
203 | GIT_CONFLICTS=0
204 | GIT_UNTRACKED=0
205 | GIT_STASHED=0
206 | fi
207 | }
208 |
209 | antares_update_prompt()
210 | {
211 | ZSH_ANTARES_RETURN=""
212 | if [ -n "$ZSH_ANTARES_EXEC_FLAG" ]
213 | then
214 | if (( ZSH_ANTARES_MIN_EXEC_TIME >= 0 ))
215 | then
216 | private exec_time=$(( SECONDS - ZSH_ANTARES_EXEC_START ))
217 | if (( exec_time >= ZSH_ANTARES_MIN_EXEC_TIME ))
218 | then
219 | ZSH_ANTARES_RETURN+="%F{$ZSH_ANTARES_FG_EXECTIME}%B⤷%b $exec_time%f"
220 | fi
221 | fi
222 | if [[ "$ZSH_ANTARES_ERR_CODE" != "0" ]]
223 | then
224 | if [ -z "$ZSH_ANTARES_RETURN" ]
225 | then
226 | ZSH_ANTARES_RETURN+="%F{$ZSH_ANTARES_FG_ERRVAL}%B⤷%b%f"
227 | fi
228 | ZSH_ANTARES_RETURN+=" %F{$ZSH_ANTARES_FG_ERRVAL}✘%B${ZSH_ANTARES_ERR_CODE}%b%f"
229 | fi
230 | [ -n "$ZSH_ANTARES_RETURN" ] && ZSH_ANTARES_RETURN+="$ZSH_ANTARES_LINEFEED"
231 | fi
232 |
233 | ZSH_ANTARES_FILLER=""
234 | private fillchar=" "
235 |
236 | private width=$(( COLUMNS - ${ZLE_RPROMPT_INDENT:-1} ))
237 |
238 | private decosize=7
239 | private pwdsize=${#${(%):-$ZSH_ANTARES_PATHVAR}}
240 | private pwdcut=""
241 | private gitsize=${#${(%):-$GIT_BRANCH$ZSH_ANTARES_GIT_TAG}}
242 | private gitcut=""
243 |
244 | if (( pwdsize + gitsize + (decosize * 2) > width )); then
245 | private half_width=$(( width / 2 ))
246 | private pwd_over_half=$(( (pwdsize + decosize) > half_width ))
247 | private git_over_half=$(( (gitsize + decosize) > half_width ))
248 | if (( pwd_over_half > 0 )) && (( git_over_half > 0 ))
249 | then
250 | (( pwdcut = half_width - decosize ))
251 | (( gitcut = half_width - decosize ))
252 | elif (( pwd_over_half > 0 ))
253 | then
254 | (( pwdcut = width - gitsize - (decosize * 2) ))
255 | ZSH_ANTARES_FILLER="\${(l:$(( width - pwdcut - gitsize - (decosize * 2) ))::$fillchar:)}"
256 | elif (( git_over_half > 0 ))
257 | then
258 | (( gitcut = width - pwdsize - (decosize * 2) ))
259 | ZSH_ANTARES_FILLER="\${(l:$(( width - pwdsize - gitcut - (decosize * 2) ))::$fillchar:)}"
260 | else
261 | ZSH_ANTARES_FILLER="\${(l:$(( width - pwdsize - gitsize - (decosize * 2) ))::$fillchar:)}"
262 | fi
263 | else
264 | ZSH_ANTARES_FILLER="\${(l:$(( width - pwdsize - gitsize - (decosize * 2) ))::$fillchar:)}"
265 | fi
266 |
267 | if [ -n "$ZSH_ANTARES_EXEC_FLAG" ]
268 | then
269 | private pwd_fg_color="%(?.${ZSH_ANTARES_FG_PWD_OK}.${ZSH_ANTARES_FG_PWD_ERR})"
270 | private pwd_bg_color="%(?.${ZSH_ANTARES_BG_PWD_OK}.${ZSH_ANTARES_BG_PWD_ERR})"
271 | else
272 | private pwd_fg_color="$ZSH_ANTARES_FG_PWD_OK"
273 | private pwd_bg_color="$ZSH_ANTARES_BG_PWD_OK"
274 | fi
275 | ZSH_ANTARES_PWD="%K{$pwd_bg_color}%F{$pwd_fg_color} %${pwdcut}<...<${ZSH_ANTARES_PATHVAR}%<< %f%k%F{$pwd_bg_color}▓▒░%f"
276 |
277 | ZSH_ANTARES_GIT_BRANCH=""
278 | if (( ZSH_ANTARES_GIT_IN_WORKING_TREE ))
279 | then
280 | if (( ZSH_ANTARES_GIT_HAS_CONFLICTS ))
281 | then
282 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_CONFLICT}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_CONFLICT}%F{$ZSH_ANTARES_FG_GIT_CONFLICT}"
283 | elif (( ZSH_ANTARES_GIT_IS_DETACHED_HEAD ))
284 | then
285 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_DETACH}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_DETACH}%F{$ZSH_ANTARES_FG_GIT_DETACH}"
286 | if (( ZSH_ANTARES_GIT_HAS_TAGS ))
287 | then
288 | GIT_BRANCH+="%F{$ZSH_ANTARES_FG_GIT_TAG}${ZSH_ANTARES_GIT_TAG}%f"
289 | fi
290 | elif (( ZSH_ANTARES_GIT_IS_BARE_REPO ))
291 | then
292 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_BARE}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_BARE}%F{$ZSH_ANTARES_FG_GIT_BARE}"
293 | elif (( ZSH_ANTARES_GIT_IS_INIT_REPO ))
294 | then
295 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_INIT}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_INIT}%F{$ZSH_ANTARES_FG_GIT_INIT}"
296 | else
297 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_BRANCH}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_BRANCH}%F{$ZSH_ANTARES_FG_GIT_BRANCH}"
298 | fi
299 | ZSH_ANTARES_GIT_BRANCH+=" %${gitcut}>...>$GIT_BRANCH%>> %f%k"
300 | if [ -n "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ]
301 | then
302 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_FG_DECO}├╼%f"
303 | else
304 | ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_FG_DECO}├╮%f"
305 | fi
306 | fi
307 |
308 | ZSH_ANTARES_JOBS="%(1j.%F{$ZSH_ANTARES_FG_JOBS}${ZSH_ANTARES_STR_JOBS}%j%f .)"
309 |
310 | ZSH_ANTARES_PRIVILEDGES="%F{$ZSH_ANTARES_FG_PRIVILEDGES}%B%(!.${ZSH_ANTARES_STR_ROOT}.${ZSH_ANTARES_STR_USER})%b%f"
311 | }
312 |
313 | antares_update_rprompt()
314 | {
315 | ZSH_ANTARES_GIT_STATUS=""
316 |
317 | [ -n "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ] && return
318 |
319 | (( ZSH_ANTARES_GIT_IN_WORKING_TREE )) || return
320 |
321 | if (( GIT_CONFLICTS > 0 ))
322 | then
323 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_CONFLICTS}${ZSH_ANTARES_STR_GIT_CONFLICTS}${GIT_CONFLICTS}%f"
324 | fi
325 | if (( GIT_STAGED > 0 ))
326 | then
327 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_STAGED}${ZSH_ANTARES_STR_GIT_STAGED}${GIT_STAGED}%f"
328 | fi
329 | if (( GIT_DELETED > 0 ))
330 | then
331 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_DELETED}${ZSH_ANTARES_STR_GIT_DELETED}${GIT_DELETED}%f"
332 | fi
333 | if (( GIT_CHANGED > 0 ))
334 | then
335 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_CHANGED}${ZSH_ANTARES_STR_GIT_CHANGED}${GIT_CHANGED}%f"
336 | fi
337 | if (( GIT_ADDED > 0 ))
338 | then
339 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_ADDED}${ZSH_ANTARES_STR_GIT_ADDED}${GIT_ADDED}%f"
340 | fi
341 | if (( GIT_UNTRACKED > 0 ))
342 | then
343 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_UNTRACKED}${ZSH_ANTARES_STR_GIT_UNTRACKED}${GIT_UNTRACKED}%f"
344 | fi
345 | if (( GIT_STASHED > 0 ))
346 | then
347 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_STASHED}${ZSH_ANTARES_STR_GIT_STASHED}${GIT_STASHED}%f"
348 | fi
349 | if (( ! ZSH_ANTARES_GIT_IS_DETACHED_HEAD ))
350 | then
351 | private ahead_behind=""
352 | if (( GIT_AHEAD > 0 ))
353 | then
354 | ahead_behind+="%F{$ZSH_ANTARES_FG_GIT_AHEAD}${ZSH_ANTARES_STR_GIT_AHEAD}${GIT_AHEAD}%f"
355 | fi
356 | if (( GIT_BEHIND > 0 ))
357 | then
358 | ahead_behind+="%F{$ZSH_ANTARES_FG_GIT_BEHIND}${ZSH_ANTARES_STR_GIT_BEHIND}${GIT_BEHIND}%f"
359 | fi
360 | if [ -n "$ahead_behind" ]
361 | then
362 | ZSH_ANTARES_GIT_STATUS+=" $ahead_behind"
363 | fi
364 | fi
365 | ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_DECO}╾─╯%f"
366 | }
367 |
368 | antares_precmd()
369 | {
370 | ZSH_ANTARES_ERR_CODE="$?"
371 | antares_update_git_status
372 | antares_update_prompt
373 | antares_update_rprompt
374 | ZSH_ANTARES_EXEC_FLAG=""
375 | }
376 |
377 | antares_preexec()
378 | {
379 | ZSH_ANTARES_EXEC_FLAG="+"
380 | ZSH_ANTARES_EXEC_START=$SECONDS
381 | }
382 |
383 | autoload -U add-zsh-hook
384 | add-zsh-hook precmd antares_precmd
385 | add-zsh-hook preexec antares_preexec
386 |
387 | PROMPT='${ZSH_ANTARES_RETURN}\
388 | %F{$ZSH_ANTARES_FG_DECO}╭┤%f${ZSH_ANTARES_PWD}${(e)ZSH_ANTARES_FILLER}${ZSH_ANTARES_GIT_BRANCH}
389 | %F{$ZSH_ANTARES_FG_DECO}╰─╼%f ${ZSH_ANTARES_JOBS}${ZSH_ANTARES_PRIVILEDGES} '
390 |
391 | RPROMPT='${ZSH_ANTARES_GIT_STATUS}'
392 |
393 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/bullet-train.zsh-theme:
--------------------------------------------------------------------------------
1 | # README
2 | #
3 | # In order for this theme to render correctly, you will need a
4 | # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
5 | #
6 | # In addition, I recommend the
7 | # [Tomorrow Night theme](https://github.com/chriskempson/tomorrow-theme) and, if
8 | # you're using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over
9 | # Terminal.app - it has significantly better color fidelity.
10 |
11 | # ------------------------------------------------------------------------------
12 | # CONFIGURATION
13 | # The default configuration, that can be overwrite in your .zshrc file
14 | # ------------------------------------------------------------------------------
15 |
16 | VIRTUAL_ENV_DISABLE_PROMPT=true
17 |
18 | # Define order and content of prompt
19 | if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then
20 | BULLETTRAIN_PROMPT_ORDER=(
21 | time
22 | status
23 | custom
24 | context
25 | dir
26 | screen
27 | perl
28 | ruby
29 | virtualenv
30 | nvm
31 | aws
32 | go
33 | rust
34 | elixir
35 | git
36 | hg
37 | cmd_exec_time
38 | )
39 | fi
40 |
41 | # PROMPT
42 | if [ ! -n "${BULLETTRAIN_PROMPT_CHAR+1}" ]; then
43 | BULLETTRAIN_PROMPT_CHAR="\$"
44 | fi
45 | if [ ! -n "${BULLETTRAIN_PROMPT_ROOT+1}" ]; then
46 | BULLETTRAIN_PROMPT_ROOT=true
47 | fi
48 | if [ ! -n "${BULLETTRAIN_PROMPT_SEPARATE_LINE+1}" ]; then
49 | BULLETTRAIN_PROMPT_SEPARATE_LINE=true
50 | fi
51 | if [ ! -n "${BULLETTRAIN_PROMPT_ADD_NEWLINE+1}" ]; then
52 | BULLETTRAIN_PROMPT_ADD_NEWLINE=true
53 | fi
54 |
55 | # STATUS
56 | if [ ! -n "${BULLETTRAIN_STATUS_EXIT_SHOW+1}" ]; then
57 | BULLETTRAIN_STATUS_EXIT_SHOW=false
58 | fi
59 | if [ ! -n "${BULLETTRAIN_STATUS_BG+1}" ]; then
60 | BULLETTRAIN_STATUS_BG=green
61 | fi
62 | if [ ! -n "${BULLETTRAIN_STATUS_ERROR_BG+1}" ]; then
63 | BULLETTRAIN_STATUS_ERROR_BG=red
64 | fi
65 | if [ ! -n "${BULLETTRAIN_STATUS_FG+1}" ]; then
66 | BULLETTRAIN_STATUS_FG=white
67 | fi
68 |
69 | # TIME
70 | if [ ! -n "${BULLETTRAIN_TIME_BG+1}" ]; then
71 | BULLETTRAIN_TIME_BG=white
72 | fi
73 | if [ ! -n "${BULLETTRAIN_TIME_FG+1}" ]; then
74 | BULLETTRAIN_TIME_FG=black
75 | fi
76 |
77 | # CUSTOM
78 | if [ ! -n "${BULLETTRAIN_CUSTOM_MSG+1}" ]; then
79 | BULLETTRAIN_CUSTOM_MSG=false
80 | fi
81 | if [ ! -n "${BULLETTRAIN_CUSTOM_BG+1}" ]; then
82 | BULLETTRAIN_CUSTOM_BG=black
83 | fi
84 | if [ ! -n "${BULLETTRAIN_CUSTOM_FG+1}" ]; then
85 | BULLETTRAIN_CUSTOM_FG=default
86 | fi
87 |
88 | # VIRTUALENV
89 | if [ ! -n "${BULLETTRAIN_VIRTUALENV_BG+1}" ]; then
90 | BULLETTRAIN_VIRTUALENV_BG=yellow
91 | fi
92 | if [ ! -n "${BULLETTRAIN_VIRTUALENV_FG+1}" ]; then
93 | BULLETTRAIN_VIRTUALENV_FG=white
94 | fi
95 | if [ ! -n "${BULLETTRAIN_VIRTUALENV_PREFIX+1}" ]; then
96 | BULLETTRAIN_VIRTUALENV_PREFIX=🐍
97 | fi
98 |
99 | # NVM
100 | if [ ! -n "${BULLETTRAIN_NVM_BG+1}" ]; then
101 | BULLETTRAIN_NVM_BG=green
102 | fi
103 | if [ ! -n "${BULLETTRAIN_NVM_FG+1}" ]; then
104 | BULLETTRAIN_NVM_FG=white
105 | fi
106 | if [ ! -n "${BULLETTRAIN_NVM_PREFIX+1}" ]; then
107 | BULLETTRAIN_NVM_PREFIX="⬡ "
108 | fi
109 |
110 | # AWS
111 | if [ ! -n "${BULLETTRAIN_AWS_BG+1}" ]; then
112 | BULLETTRAIN_AWS_BG=yellow
113 | fi
114 | if [ ! -n "${BULLETTRAIN_AWS_FG+1}" ]; then
115 | BULLETTRAIN_AWS_FG=black
116 | fi
117 | if [ ! -n "${BULLETTRAIN_AWS_PREFIX+1}" ]; then
118 | BULLETTRAIN_AWS_PREFIX="☁️"
119 | fi
120 |
121 | # RUBY
122 | if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
123 | BULLETTRAIN_RUBY_BG=red
124 | fi
125 | if [ ! -n "${BULLETTRAIN_RUBY_FG+1}" ]; then
126 | BULLETTRAIN_RUBY_FG=white
127 | fi
128 | if [ ! -n "${BULLETTRAIN_RUBY_PREFIX+1}" ]; then
129 | BULLETTRAIN_RUBY_PREFIX=♦️
130 | fi
131 |
132 | # Go
133 | if [ ! -n "${BULLETTRAIN_GO_BG+1}" ]; then
134 | BULLETTRAIN_GO_BG=cyan
135 | fi
136 | if [ ! -n "${BULLETTRAIN_GO_FG+1}" ]; then
137 | BULLETTRAIN_GO_FG=white
138 | fi
139 | if [ ! -n "${BULLETTRAIN_GO_PREFIX+1}" ]; then
140 | BULLETTRAIN_GO_PREFIX="go"
141 | fi
142 |
143 | # Rust
144 | if [ ! -n "${BULLETTRAIN_RUST_BG+1}" ]; then
145 | BULLETTRAIN_RUST_BG=black
146 | fi
147 | if [ ! -n "${BULLETTRAIN_RUST_FG+1}" ]; then
148 | BULLETTRAIN_RUST_FG=white
149 | fi
150 | if [ ! -n "${BULLETTRAIN_RUST_PREFIX+1}" ]; then
151 | BULLETTRAIN_RUST_PREFIX="🦀"
152 | fi
153 |
154 | # Kubernetes Context
155 | if [ ! -n "${BULLETTRAIN_KCTX_BG+1}" ]; then
156 | BULLETTRAIN_KCTX_BG=yellow
157 | fi
158 | if [ ! -n "${BULLETTRAIN_KCTX_FG+1}" ]; then
159 | BULLETTRAIN_KCTX_FG=white
160 | fi
161 | if [ ! -n "${BULLETTRAIN_KCTX_PREFIX+1}" ]; then
162 | BULLETTRAIN_KCTX_PREFIX="⎈"
163 | fi
164 | if [ ! -n "${BULLETTRAIN_KCTX_KCONFIG+1}" ]; then
165 | BULLETTRAIN_KCTX_KCONFIG="${HOME}/.kube/config"
166 | fi
167 | if [ ! -n "${BULLETTRAIN_KCTX_KUBECTL+1}" ]; then
168 | BULLETTRAIN_KCTX_KUBECTL="true"
169 | fi
170 | if [ ! -n "${BULLETTRAIN_KCTX_NAMESPACE+1}" ]; then
171 | BULLETTRAIN_KCTX_NAMESPACE="true"
172 | fi
173 |
174 | # ELIXIR
175 | if [ ! -n "${BULLETTRAIN_ELIXIR_BG+1}" ]; then
176 | BULLETTRAIN_ELIXIR_BG=magenta
177 | fi
178 | if [ ! -n "${BULLETTRAIN_ELIXIR_FG+1}" ]; then
179 | BULLETTRAIN_ELIXIR_FG=white
180 | fi
181 | if [ ! -n "${BULLETTRAIN_ELIXIR_PREFIX+1}" ]; then
182 | BULLETTRAIN_ELIXIR_PREFIX="💧"
183 | fi
184 |
185 | # DIR
186 | if [ ! -n "${BULLETTRAIN_DIR_BG+1}" ]; then
187 | BULLETTRAIN_DIR_BG=blue
188 | fi
189 | if [ ! -n "${BULLETTRAIN_DIR_FG+1}" ]; then
190 | BULLETTRAIN_DIR_FG=white
191 | fi
192 | if [ ! -n "${BULLETTRAIN_DIR_CONTEXT_SHOW+1}" ]; then
193 | BULLETTRAIN_DIR_CONTEXT_SHOW=false
194 | fi
195 | if [ ! -n "${BULLETTRAIN_DIR_EXTENDED+1}" ]; then
196 | BULLETTRAIN_DIR_EXTENDED=1
197 | fi
198 |
199 | # GIT
200 | if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY+1}" ]; then
201 | BULLETTRAIN_GIT_COLORIZE_DIRTY=false
202 | fi
203 | if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR+1}" ]; then
204 | BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR=black
205 | fi
206 | if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR+1}" ]; then
207 | BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR=yellow
208 | fi
209 | if [ ! -n "${BULLETTRAIN_GIT_BG+1}" ]; then
210 | BULLETTRAIN_GIT_BG=white
211 | fi
212 | if [ ! -n "${BULLETTRAIN_GIT_FG+1}" ]; then
213 | BULLETTRAIN_GIT_FG=black
214 | fi
215 | if [ ! -n "${BULLETTRAIN_GIT_EXTENDED+1}" ]; then
216 | BULLETTRAIN_GIT_EXTENDED=true
217 | fi
218 | if [ ! -n "${BULLETTRAIN_GIT_PROMPT_CMD+1}" ]; then
219 | BULLETTRAIN_GIT_PROMPT_CMD="\$(git_prompt_info)"
220 | fi
221 |
222 | # PERL
223 | if [ ! -n "${BULLETTRAIN_PERL_BG+1}" ]; then
224 | BULLETTRAIN_PERL_BG=yellow
225 | fi
226 | if [ ! -n "${BULLETTRAIN_PERL_FG+1}" ]; then
227 | BULLETTRAIN_PERL_FG=black
228 | fi
229 | if [ ! -n "${BULLETTRAIN_PERL_PREFIX+1}" ]; then
230 | BULLETTRAIN_PERL_PREFIX=🐪
231 | fi
232 |
233 | # CONTEXT
234 | if [ ! -n "${BULLETTRAIN_CONTEXT_BG+1}" ]; then
235 | BULLETTRAIN_CONTEXT_BG=black
236 | fi
237 | if [ ! -n "${BULLETTRAIN_CONTEXT_FG+1}" ]; then
238 | BULLETTRAIN_CONTEXT_FG=default
239 | fi
240 | if [ ! -n "${BULLETTRAIN_CONTEXT_HOSTNAME+1}" ]; then
241 | BULLETTRAIN_CONTEXT_HOSTNAME=%m
242 | fi
243 |
244 | # GIT PROMPT
245 | if [ ! -n "${BULLETTRAIN_GIT_PREFIX+1}" ]; then
246 | ZSH_THEME_GIT_PROMPT_PREFIX="\ue0a0 "
247 | else
248 | ZSH_THEME_GIT_PROMPT_PREFIX=$BULLETTRAIN_GIT_PREFIX
249 | fi
250 | if [ ! -n "${BULLETTRAIN_GIT_SUFFIX+1}" ]; then
251 | ZSH_THEME_GIT_PROMPT_SUFFIX=""
252 | else
253 | ZSH_THEME_GIT_PROMPT_SUFFIX=$BULLETTRAIN_GIT_SUFFIX
254 | fi
255 | if [ ! -n "${BULLETTRAIN_GIT_DIRTY+1}" ]; then
256 | ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}✘%F{black}"
257 | else
258 | ZSH_THEME_GIT_PROMPT_DIRTY=$BULLETTRAIN_GIT_DIRTY
259 | fi
260 | if [ ! -n "${BULLETTRAIN_GIT_CLEAN+1}" ]; then
261 | ZSH_THEME_GIT_PROMPT_CLEAN=" %F{green}✔%F{black}"
262 | else
263 | ZSH_THEME_GIT_PROMPT_CLEAN=$BULLETTRAIN_GIT_CLEAN
264 | fi
265 | if [ ! -n "${BULLETTRAIN_GIT_ADDED+1}" ]; then
266 | ZSH_THEME_GIT_PROMPT_ADDED=" %F{green}✚%F{black}"
267 | else
268 | ZSH_THEME_GIT_PROMPT_ADDED=$BULLETTRAIN_GIT_ADDED
269 | fi
270 | if [ ! -n "${BULLETTRAIN_GIT_MODIFIED+1}" ]; then
271 | ZSH_THEME_GIT_PROMPT_MODIFIED=" %F{blue}✹%F{black}"
272 | else
273 | ZSH_THEME_GIT_PROMPT_MODIFIED=$BULLETTRAIN_GIT_MODIFIED
274 | fi
275 | if [ ! -n "${BULLETTRAIN_GIT_DELETED+1}" ]; then
276 | ZSH_THEME_GIT_PROMPT_DELETED=" %F{red}✖%F{black}"
277 | else
278 | ZSH_THEME_GIT_PROMPT_DELETED=$BULLETTRAIN_GIT_DELETED
279 | fi
280 | if [ ! -n "${BULLETTRAIN_GIT_UNTRACKED+1}" ]; then
281 | ZSH_THEME_GIT_PROMPT_UNTRACKED=" %F{yellow}✭%F{black}"
282 | else
283 | ZSH_THEME_GIT_PROMPT_UNTRACKED=$BULLETTRAIN_GIT_UNTRACKED
284 | fi
285 | if [ ! -n "${BULLETTRAIN_GIT_RENAMED+1}" ]; then
286 | ZSH_THEME_GIT_PROMPT_RENAMED=" ➜"
287 | else
288 | ZSH_THEME_GIT_PROMPT_RENAMED=$BULLETTRAIN_GIT_RENAMED
289 | fi
290 | if [ ! -n "${BULLETTRAIN_GIT_UNMERGED+1}" ]; then
291 | ZSH_THEME_GIT_PROMPT_UNMERGED=" ═"
292 | else
293 | ZSH_THEME_GIT_PROMPT_UNMERGED=$BULLETTRAIN_GIT_UNMERGED
294 | fi
295 | if [ ! -n "${BULLETTRAIN_GIT_AHEAD+1}" ]; then
296 | ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
297 | else
298 | ZSH_THEME_GIT_PROMPT_AHEAD=$BULLETTRAIN_GIT_AHEAD
299 | fi
300 | if [ ! -n "${BULLETTRAIN_GIT_BEHIND+1}" ]; then
301 | ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
302 | else
303 | ZSH_THEME_GIT_PROMPT_BEHIND=$BULLETTRAIN_GIT_BEHIND
304 | fi
305 | if [ ! -n "${BULLETTRAIN_GIT_DIVERGED+1}" ]; then
306 | ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
307 | else
308 | ZSH_THEME_GIT_PROMPT_DIVERGED=$BULLETTRAIN_GIT_PROMPT_DIVERGED
309 | fi
310 |
311 | # SCREEN
312 | if [ ! -n "${BULLETTRAIN_SCREEN_BG+1}" ]; then
313 | BULLETTRAIN_SCREEN_BG=white
314 | fi
315 | if [ ! -n "${BULLETTRAIN_SCREEN_FG+1}" ]; then
316 | BULLETTRAIN_SCREEN_FG=black
317 | fi
318 | if [ ! -n "${BULLETTRAIN_SCREEN_PREFIX+1}" ]; then
319 | BULLETTRAIN_SCREEN_PREFIX="⬗"
320 | fi
321 |
322 | # COMMAND EXECUTION TIME
323 | if [ ! -n "${BULLETTRAIN_EXEC_TIME_ELAPSED+1}" ]; then
324 | BULLETTRAIN_EXEC_TIME_ELAPSED=5
325 | fi
326 | if [ ! -n "${BULLETTRAIN_EXEC_TIME_BG+1}" ]; then
327 | BULLETTRAIN_EXEC_TIME_BG=yellow
328 | fi
329 | if [ ! -n "${BULLETTRAIN_EXEC_TIME_FG+1}" ]; then
330 | BULLETTRAIN_EXEC_TIME_FG=black
331 | fi
332 |
333 |
334 | # ------------------------------------------------------------------------------
335 | # SEGMENT DRAWING
336 | # A few functions to make it easy and re-usable to draw segmented prompts
337 | # ------------------------------------------------------------------------------
338 |
339 | CURRENT_BG='NONE'
340 | SEGMENT_SEPARATOR=''
341 |
342 | # Begin a segment
343 | # Takes three arguments, background, foreground and text. All of them can be omitted,
344 | # rendering default background/foreground and no text.
345 | prompt_segment() {
346 | local bg fg
347 | [[ -n $1 ]] && bg="%K{$1}" || bg="%k"
348 | [[ -n $2 ]] && fg="%F{$2}" || fg="%f"
349 | if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
350 | echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
351 | else
352 | echo -n "%{$bg%}%{$fg%} "
353 | fi
354 | CURRENT_BG=$1
355 | [[ -n $3 ]] && echo -n $3
356 | }
357 |
358 | # End the prompt, closing any open segments
359 | prompt_end() {
360 | if [[ -n $CURRENT_BG ]]; then
361 | echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
362 | else
363 | echo -n "%{%k%}"
364 | fi
365 | echo -n "%{%f%}"
366 | CURRENT_BG=''
367 | }
368 |
369 | # ------------------------------------------------------------------------------
370 | # PROMPT COMPONENTS
371 | # Each component will draw itself, and hide itself if no information needs
372 | # to be shown
373 | # ------------------------------------------------------------------------------
374 |
375 | # Context: user@hostname (who am I and where am I)
376 | context() {
377 | local user="$(whoami)"
378 | [[ "$user" != "$BULLETTRAIN_CONTEXT_DEFAULT_USER" || -n "$BULLETTRAIN_IS_SSH_CLIENT" ]] && echo -n "${user}@$BULLETTRAIN_CONTEXT_HOSTNAME"
379 | }
380 |
381 | prompt_context() {
382 | local _context="$(context)"
383 | [[ -n "$_context" ]] && prompt_segment $BULLETTRAIN_CONTEXT_BG $BULLETTRAIN_CONTEXT_FG "$_context"
384 | }
385 |
386 | # Based on http://stackoverflow.com/a/32164707/3859566
387 | function displaytime {
388 | local T=$1
389 | local D=$((T/60/60/24))
390 | local H=$((T/60/60%24))
391 | local M=$((T/60%60))
392 | local S=$((T%60))
393 | [[ $D > 0 ]] && printf '%dd' $D
394 | [[ $H > 0 ]] && printf '%dh' $H
395 | [[ $M > 0 ]] && printf '%dm' $M
396 | printf '%ds' $S
397 | }
398 |
399 | # Prompt previous command execution time
400 | preexec() {
401 | cmd_timestamp=`date +%s`
402 | }
403 |
404 | precmd() {
405 | local stop=`date +%s`
406 | local start=${cmd_timestamp:-$stop}
407 | let BULLETTRAIN_last_exec_duration=$stop-$start
408 | cmd_timestamp=''
409 | }
410 |
411 | prompt_cmd_exec_time() {
412 | [ $BULLETTRAIN_last_exec_duration -gt $BULLETTRAIN_EXEC_TIME_ELAPSED ] && prompt_segment $BULLETTRAIN_EXEC_TIME_BG $BULLETTRAIN_EXEC_TIME_FG "$(displaytime $BULLETTRAIN_last_exec_duration)"
413 | }
414 |
415 | # Custom
416 | prompt_custom() {
417 | if [[ $BULLETTRAIN_CUSTOM_MSG == false ]]; then
418 | return
419 | fi
420 |
421 | local custom_msg
422 | eval custom_msg=$BULLETTRAIN_CUSTOM_MSG
423 | [[ -n "${custom_msg}" ]] && prompt_segment $BULLETTRAIN_CUSTOM_BG $BULLETTRAIN_CUSTOM_FG "${custom_msg}"
424 | }
425 |
426 | # Git
427 | prompt_git() {
428 | if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" == "1" ]]; then
429 | return
430 | fi
431 |
432 | local ref dirty mode repo_path git_prompt
433 | repo_path=$(git rev-parse --git-dir 2>/dev/null)
434 |
435 | if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
436 | if [[ $BULLETTRAIN_GIT_COLORIZE_DIRTY == true && -n $(git status --porcelain --ignore-submodules) ]]; then
437 | BULLETTRAIN_GIT_BG=$BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR
438 | BULLETTRAIN_GIT_FG=$BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR
439 | fi
440 | prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG
441 |
442 | eval git_prompt=${BULLETTRAIN_GIT_PROMPT_CMD}
443 | if [[ $BULLETTRAIN_GIT_EXTENDED == true ]]; then
444 | echo -n ${git_prompt}$(git_prompt_status)
445 | else
446 | echo -n ${git_prompt}
447 | fi
448 | fi
449 | }
450 |
451 | prompt_hg() {
452 | local rev status
453 | if $(hg id >/dev/null 2>&1); then
454 | if $(hg prompt >/dev/null 2>&1); then
455 | if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
456 | # if files are not added
457 | prompt_segment red white
458 | st='±'
459 | elif [[ -n $(hg prompt "{status|modified}") ]]; then
460 | # if any modification
461 | prompt_segment yellow black
462 | st='±'
463 | else
464 | # if working copy is clean
465 | prompt_segment green black
466 | fi
467 | echo -n $(hg prompt "☿ {rev}@{branch}") $st
468 | else
469 | st=""
470 | rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
471 | branch=$(hg id -b 2>/dev/null)
472 | if $(hg st | grep -Eq "^\?"); then
473 | prompt_segment red black
474 | st='±'
475 | elif $(hg st | grep -Eq "^(M|A)"); then
476 | prompt_segment yellow black
477 | st='±'
478 | else
479 | prompt_segment green black
480 | fi
481 | echo -n "☿ $rev@$branch" $st
482 | fi
483 | fi
484 | }
485 |
486 | # Dir: current working directory
487 | prompt_dir() {
488 | local dir=''
489 | local _context="$(context)"
490 | [[ $BULLETTRAIN_DIR_CONTEXT_SHOW == true && -n "$_context" ]] && dir="${dir}${_context}:"
491 |
492 | if [[ $BULLETTRAIN_DIR_EXTENDED == 0 ]]; then
493 | #short directories
494 | dir="${dir}%1~"
495 | elif [[ $BULLETTRAIN_DIR_EXTENDED == 2 ]]; then
496 | #long directories
497 | dir="${dir}%0~"
498 | else
499 | #medium directories (default case)
500 | dir="${dir}%4(c:...:)%3c"
501 | fi
502 |
503 | prompt_segment $BULLETTRAIN_DIR_BG $BULLETTRAIN_DIR_FG $dir
504 | }
505 |
506 | # RUBY
507 | # RVM: only shows RUBY info if on a gemset that is not the default one
508 | # RBENV: shows current ruby version active in the shell; also with non-global gemsets if any is active
509 | # CHRUBY: shows current ruby version active in the shell
510 | prompt_ruby() {
511 | if command -v rvm-prompt > /dev/null 2>&1; then
512 | prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(rvm-prompt i v g)"
513 | elif command -v chruby > /dev/null 2>&1; then
514 | prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(chruby | sed -n -e 's/ \* //p')"
515 | elif command -v rbenv > /dev/null 2>&1; then
516 | current_gemset() {
517 | echo "$(rbenv gemset active 2&>/dev/null | sed -e 's/ global$//')"
518 | }
519 |
520 | if [[ -n $(current_gemset) ]]; then
521 | prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(rbenv version | sed -e 's/ (set.*$//')"@"$(current_gemset)"
522 | else
523 | prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(rbenv version | sed -e 's/ (set.*$//')"
524 | fi
525 | fi
526 | }
527 |
528 | # ELIXIR
529 | prompt_elixir() {
530 | if command -v elixir > /dev/null 2>&1; then
531 | prompt_segment $BULLETTRAIN_ELIXIR_BG $BULLETTRAIN_ELIXIR_FG $BULLETTRAIN_ELIXIR_PREFIX" $(elixir -v | tail -n 1 | awk '{print $2}')"
532 | fi
533 | }
534 |
535 | # PERL
536 | # PLENV: shows current PERL version active in the shell
537 | prompt_perl() {
538 | if command -v plenv > /dev/null 2>&1; then
539 | prompt_segment $BULLETTRAIN_PERL_BG $BULLETTRAIN_PERL_FG $BULLETTRAIN_PERL_PREFIX" $(plenv version | sed -e 's/ (set.*$//')"
540 | fi
541 | }
542 |
543 | # Go
544 | prompt_go() {
545 | setopt extended_glob
546 | if [[ (-f *.go(#qN) || -d Godeps || -f glide.yaml) ]]; then
547 | if command -v go > /dev/null 2>&1; then
548 | prompt_segment $BULLETTRAIN_GO_BG $BULLETTRAIN_GO_FG $BULLETTRAIN_GO_PREFIX" $(go version | grep --colour=never -oE '[[:digit:]].[[:digit:]]+')"
549 | fi
550 | fi
551 | }
552 |
553 | # Rust
554 | prompt_rust() {
555 | if [[ (-f Cargo.toml) ]]; then
556 | if command -v rustc > /dev/null 2>&1; then
557 | prompt_segment $BULLETTRAIN_RUST_BG $BULLETTRAIN_RUST_FG $BULLETTRAIN_RUST_PREFIX" $(rustc -V version | cut -d' ' -f2)"
558 | fi
559 | fi
560 | }
561 |
562 | # Kubernetes Context
563 | prompt_kctx() {
564 | if [[ "$BULLETTRAIN_KCTX_KUBECTL" == "true" ]] && command -v kubectl > /dev/null 2>&1; then
565 | local jsonpath='{.current-context}'
566 | if [[ "$BULLETTRAIN_KCTX_NAMESPACE" == "true" ]]; then
567 | jsonpath="${jsonpath}{':'}{..namespace}"
568 | fi
569 | prompt_segment $BULLETTRAIN_KCTX_BG $BULLETTRAIN_KCTX_FG $BULLETTRAIN_KCTX_PREFIX" $(kubectl config view --minify --output "jsonpath=${jsonpath}" 2>/dev/null)"
570 | elif [[ -f $BULLETTRAIN_KCTX_KCONFIG ]]; then
571 | prompt_segment $BULLETTRAIN_KCTX_BG $BULLETTRAIN_KCTX_FG $BULLETTRAIN_KCTX_PREFIX" $(cat $BULLETTRAIN_KCTX_KCONFIG | grep current-context | awk '{print $2}')"
572 | fi
573 | }
574 |
575 | # Virtualenv: current working virtualenv
576 | prompt_virtualenv() {
577 | local virtualenv_path="$VIRTUAL_ENV"
578 | if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
579 | prompt_segment $BULLETTRAIN_VIRTUALENV_BG $BULLETTRAIN_VIRTUALENV_FG $BULLETTRAIN_VIRTUALENV_PREFIX" $(basename $virtualenv_path)"
580 | elif which pyenv &> /dev/null; then
581 | if [[ "$(pyenv version | sed -e 's/ (set.*$//' | tr '\n' ' ' | sed 's/.$//')" != "system" ]]; then
582 | prompt_segment $BULLETTRAIN_VIRTUALENV_BG $BULLETTRAIN_VIRTUALENV_FG $BULLETTRAIN_VIRTUALENV_PREFIX" $(pyenv version | sed -e 's/ (set.*$//' | tr '\n' ' ' | sed 's/.$//')"
583 | fi
584 | fi
585 | }
586 |
587 | # NVM: Node version manager
588 | prompt_nvm() {
589 | local nvm_prompt
590 | if type nvm >/dev/null 2>&1; then
591 | nvm_prompt=$(nvm current 2>/dev/null)
592 | [[ "${nvm_prompt}x" == "x" || "${nvm_prompt}" == "system" ]] && return
593 | elif type node >/dev/null 2>&1; then
594 | nvm_prompt="$(node --version)"
595 | else
596 | return
597 | fi
598 | nvm_prompt=${nvm_prompt}
599 | prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt
600 | }
601 |
602 | #AWS Profile
603 | prompt_aws() {
604 | local spaces=" "
605 |
606 | if [[ -n "$AWS_PROFILE" ]]; then
607 | prompt_segment $BULLETTRAIN_AWS_BG $BULLETTRAIN_AWS_FG $BULLETTRAIN_AWS_PREFIX$spaces$AWS_PROFILE
608 | fi
609 | }
610 |
611 | # SCREEN Session
612 | prompt_screen() {
613 | local session_name="$STY"
614 | if [[ "$session_name" != "" ]]; then
615 | prompt_segment $BULLETTRAIN_SCREEN_BG $BULLETTRAIN_SCREEN_FG $BULLETTRAIN_SCREEN_PREFIX" $session_name"
616 | fi
617 | }
618 |
619 | prompt_time() {
620 | if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
621 | prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
622 | else
623 | prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%T}
624 | fi
625 | }
626 |
627 | # Status:
628 | # - was there an error
629 | # - am I root
630 | # - are there background jobs?
631 | prompt_status() {
632 | local symbols
633 | symbols=()
634 | [[ $RETVAL -ne 0 && $BULLETTRAIN_STATUS_EXIT_SHOW != true ]] && symbols+="✘"
635 | [[ $RETVAL -ne 0 && $BULLETTRAIN_STATUS_EXIT_SHOW == true ]] && symbols+="✘ $RETVAL"
636 | [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡%f"
637 | [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="⚙"
638 |
639 | if [[ -n "$symbols" && $RETVAL -ne 0 ]]; then
640 | prompt_segment $BULLETTRAIN_STATUS_ERROR_BG $BULLETTRAIN_STATUS_FG "$symbols"
641 | elif [[ -n "$symbols" ]]; then
642 | prompt_segment $BULLETTRAIN_STATUS_BG $BULLETTRAIN_STATUS_FG "$symbols"
643 | fi
644 |
645 | }
646 |
647 | # Prompt Character
648 | prompt_chars() {
649 | local bt_prompt_chars="${BULLETTRAIN_PROMPT_CHAR}"
650 |
651 | if [[ $BULLETTRAIN_PROMPT_ROOT == true ]]; then
652 | bt_prompt_chars="%(!.%F{red}# .%F{green}${bt_prompt_chars}%f)"
653 | fi
654 |
655 | if [[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == false ]]; then
656 | bt_prompt_chars="${bt_prompt_chars}"
657 | fi
658 |
659 | echo -n "$bt_prompt_chars"
660 |
661 | if [[ -n $BULLETTRAIN_PROMPT_CHAR ]]; then
662 | echo -n " "
663 | fi
664 | }
665 |
666 | # Prompt Line Separator
667 | prompt_line_sep() {
668 | if [[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == true ]]; then
669 | # newline wont print without a non newline character, so add a zero-width space
670 | echo -e '\n%{\u200B%}'
671 | fi
672 | }
673 |
674 | # ------------------------------------------------------------------------------
675 | # MAIN
676 | # Entry point
677 | # ------------------------------------------------------------------------------
678 |
679 | build_prompt() {
680 | RETVAL=$?
681 | for segment in $BULLETTRAIN_PROMPT_ORDER
682 | do
683 | prompt_$segment
684 | done
685 | prompt_end
686 | }
687 |
688 | NEWLINE='
689 | '
690 | PROMPT=''
691 | [[ $BULLETTRAIN_PROMPT_ADD_NEWLINE == true ]] && PROMPT="$PROMPT$NEWLINE"
692 | PROMPT="$PROMPT"'%{%f%b%k%}$(build_prompt)'
693 | [[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == true ]] && PROMPT="$PROMPT$NEWLINE"
694 | PROMPT="$PROMPT"'%{${fg_bold[default]}%}'
695 | [[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == false ]] && PROMPT="$PROMPT "
696 | PROMPT="$PROMPT"'$(prompt_chars)%{$reset_color%}'
697 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/color-input.zsh-theme:
--------------------------------------------------------------------------------
1 | # Refer https://misc.flogisoft.com/bash/tip_colors_and_formatting for the ANSI/VT100 control sequences
2 |
3 | local user_color=026
4 | local dir_color=130
5 | local git_branch_color=010
6 | local input_color=220
7 |
8 | # Uncomment the following line to hide the virtual environment name.
9 | # export VIRTUAL_ENV_DISABLE_PROMPT=1
10 |
11 | # User details in green, bold
12 | local user='%B$FG[${user_color}]%}%n@%m%{$reset_color%}'
13 | # Directory details in cyan, bold
14 | local dir='%B$FG[${dir_color}]%~%{$reset_color%}'
15 | # git branch details in green
16 | local git_branch='$FG[${git_branch_color}]$(git_prompt_info)%{$reset_color%}'
17 |
18 | # Error message on command returning non-zero exit code
19 | error_msg="\e[0;31mCommand failed"
20 |
21 | PROMPT="${user}:${dir}:${git_branch}
22 | $ $FG[${input_color}]"
23 |
24 | # Resetting color to default white.
25 | preexec()
26 | {
27 | echo -ne "\e[0m"
28 | }
29 |
30 | # Printing error message if command failed.
31 | precmd()
32 | {
33 | # Command failed
34 | if [ $? -ne 0 ];
35 | then
36 | echo "${error_msg}"
37 | fi
38 | }
39 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/comfyline.zsh-theme:
--------------------------------------------------------------------------------
1 | ##########################################
2 | ### Comfyline - theme for zsh ###
3 | # Original Author: not pua ( imnotpua ) #
4 | # email: atp@tutamail.com #
5 | ##########################################
6 |
7 |
8 | # make prompt work without oh-my-zsh
9 | setopt PROMPT_SUBST
10 | export LANG=en_US.UTF-8
11 | export LC_ALL=en_US.UTF-8
12 |
13 | # default segment seperators
14 | if [[ $COMFYLINE_SEGSEP == "" ]]; then
15 | COMFYLINE_SEGSEP='\ue0b4'
16 | fi
17 |
18 | if [[ $COMFYLINE_SEGSEP_REVERSE == "" ]]; then
19 | COMFYLINE_SEGSEP_REVERSE='\ue0b6'
20 | fi
21 |
22 | # date and time formats
23 | if [[ $COMFYLINE_DATE_FORMAT == "" ]]; then
24 | COMFYLINE_DATE_FORMAT="%A, %e %B %Y"
25 | fi
26 |
27 | if [[ $COMFYLINE_TIME_FORMAT == "" ]]; then
28 | COMFYLINE_TIME_FORMAT="%l:%M %p"
29 | fi
30 |
31 | # default light theme
32 | if [[ $RETVAL_RANK == "" ]]; then
33 | RETVAL_RANK=1
34 | fi
35 | if [[ $HOST_RANK == "" ]]; then
36 | HOST_RANK=2
37 | fi
38 | if [[ $USER_RANK == "" ]] then
39 | USER_RANK=3
40 | fi
41 | if [[ $DIR_RANK == "" ]]; then
42 | DIR_RANK=4
43 | fi
44 | if [[ $GIT_RANK == "" ]] then
45 | GIT_RANK=5
46 | fi
47 | if [[ $VENV_RANK = "" ]]; then
48 | VENV_RANK=6
49 | fi
50 | if [[ $BAT_RANK == "" ]] then
51 | BAT_RANK=-3
52 | fi
53 | if [[ $DATE_RANK == "" ]]; then
54 | DATE_RANK=-2
55 | fi
56 | if [[ $TIME_RANK == "" ]]; then
57 | TIME_RANK=-1
58 | fi
59 |
60 | # default colors
61 | if [[ $RETVAL_b == "" ]]; then
62 | RETVAL_b="#8a8bd8"
63 | fi
64 | if [[ $RETVAL_f == "" ]]; then
65 | RETVAL_f="#61355c"
66 | fi
67 | if [[ $HOST_b == "" ]]; then
68 | HOST_b="#b3b5fb"
69 | fi
70 | if [[ $HOST_f == "" ]]; then
71 | HOST_f="#4a4b87"
72 | fi
73 | if [[ $USER_b == "" ]]; then
74 | USER_b="#f8bbe5"
75 | fi
76 | if [[ $USER_f == "" ]]; then
77 | USER_f="#874c80"
78 | fi
79 | if [[ $GIT_b == "" ]]; then
80 | GIT_b="#f6b3b3"
81 | fi
82 | if [[ $GIT_f == "" ]]; then
83 | GIT_f="#d95353"
84 | fi
85 | if [[ $GIT_CLEAN_b == "" ]]; then
86 | GIT_CLEAN_b="#b3f58c"
87 | fi
88 | if [[ $GIT_CLEAN_f == "" ]]; then
89 | GIT_CLEAN_f="#568459"
90 | fi
91 | if [[ $DIR_b == "" ]]; then
92 | DIR_b="#e1bff2"
93 | fi
94 | if [[ $DIR_f == "" ]]; then
95 | DIR_f="#844189"
96 | fi
97 | if [[ $VENV_b == "" ]]; then
98 | VENV_b="#a8ddf9"
99 | fi
100 | if [[ $VENV_f == "" ]]; then
101 | VENV_f="#0066a4"
102 | fi
103 | if [[ $BAT_b == "" ]]; then
104 | BAT_b="#b3b5fb"
105 | fi
106 | if [[ $BAT_f == "" ]]; then
107 | BAT_f="#4a4b87"
108 | fi
109 | if [[ $DATE_b == "" ]]; then
110 | DATE_b="#f8bbe5"
111 | fi
112 | if [[ $DATE_f == "" ]]; then
113 | DATE_f="#874c80"
114 | fi
115 | if [[ $TIME_b == "" ]]; then
116 | TIME_b="#e1bff2"
117 | fi
118 | if [[ $TIME_f == "" ]]; then
119 | TIME_f="#844189"
120 | fi
121 |
122 | # basic functions
123 |
124 | #function takes 4 arguments, background, foreground, text and rank (for edge cases)
125 | function create_segment(){
126 | if [[ $4 -lt $RIGHTMOST_RANK ]]; then
127 | local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE"
128 | echo -n "$segment%K{$1}%F{$2} $3 "
129 | elif [[ $4 -gt $LEFTMOST_RANK ]]; then
130 | local segment="%K{$1}$COMFYLINE_SEGSEP "
131 | echo -n "$segment%F{$2}$3%F{$1} "
132 | elif [[ $4 -eq $RIGHTMOST_RANK ]]; then
133 | if [[ $COMFYLINE_NO_START -eq 1 ]]; then
134 | local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE"
135 | echo -n "$segment%K{$1}%F{$2} $3"
136 | else
137 | local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE"
138 | echo -n "$segment%K{$1}%F{$2} $3 %k%F{$1}$COMFYLINE_SEGSEP"
139 | fi
140 | elif [[ $4 -eq $LEFTMOST_RANK ]]; then
141 | if [[ $COMFYLINE_NO_START -eq 1 ]]; then
142 | local segment="%K{$1} "
143 | echo -n "$segment%F{$2}$3%F{$1} "
144 | else
145 | local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE%K{$1} "
146 | echo -n "$segment%F{$2}$3%F{$1} "
147 | fi
148 | fi
149 |
150 | }
151 | ### explanation: creates segment seperator with new bg but fg as old bg.
152 | ### then prints contents in new fg and prepares for next fg as current bg
153 |
154 | # segment functions
155 | function retval(){
156 | if [[ $COMFYLINE_RETVAL_NUMBER -eq 2 ]]; then
157 | symbol="%(?..✘ %?)"
158 | elif [[ $COMFYLINE_RETVAL_NUMBER -eq 1 ]]; then
159 | symbol="%?"
160 | else
161 | symbol="%(?..✘)"
162 | fi
163 | create_segment $RETVAL_b $RETVAL_f $symbol $RETVAL_RANK
164 | }
165 |
166 | function hostname(){
167 | if [[ $COMFYLINE_FULL_HOSTNAME -eq 1 ]]; then
168 | create_segment $HOST_b $HOST_f "%M" $HOST_RANK
169 | else
170 | create_segment $HOST_b $HOST_f "%m" $HOST_RANK
171 | fi
172 | }
173 |
174 | function username(){
175 | create_segment $USER_b $USER_f "%n" $USER_RANK
176 | }
177 |
178 | function dir(){
179 | if [[ $COMFYLINE_FULL_DIR -eq 1 ]]; then
180 | symbol="%d"
181 | else
182 | symbol="%~"
183 | fi
184 | create_segment $DIR_b $DIR_f $symbol $DIR_RANK
185 | }
186 |
187 | # variables to set git_prompt info and status
188 | ZSH_THEME_GIT_PROMPT_PREFIX=" \ue0a0 "
189 | ZSH_THEME_GIT_PROMPT_SUFFIX=""
190 | ZSH_THEME_GIT_PROMPT_DIRTY=""
191 | ZSH_THEME_GIT_PROMPT_CLEAN=""
192 | ZSH_THEME_GIT_PROMPT_ADDED=" ✚"
193 | ZSH_THEME_GIT_PROMPT_MODIFIED=" ±"
194 | ZSH_THEME_GIT_PROMPT_DELETED=" \u2796"
195 | ZSH_THEME_GIT_PROMPT_UNTRACKED=" !"
196 | ZSH_THEME_GIT_PROMPT_RENAMED=" \u21b7"
197 | ZSH_THEME_GIT_PROMPT_UNMERGED=" \u21e1"
198 | ZSH_THEME_GIT_PROMPT_AHEAD=" \u21c5"
199 | ZSH_THEME_GIT_PROMPT_BEHIND=" \u21b1"
200 | ZSH_THEME_GIT_PROMPT_DIVERGED=" \u21b0"
201 |
202 | function gitrepo(){
203 | if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
204 | if [[ $(git status --porcelain) == "" ]]; then
205 | if [[ $(command -v git_prompt_info 2> /dev/null) ]]; then
206 | create_segment $GIT_CLEAN_b $GIT_CLEAN_f "$(git_prompt_info)$(git_prompt_status)" $GIT_RANK
207 | else
208 | create_segment $GIT_CLEAN_b $GIT_CLEAN_f "$ZSH_THEME_GIT_PROMPT_PREFIX$(git rev-parse --abbrev-ref HEAD)" $GIT_RANK
209 | fi
210 | else
211 | if [[ $(command -v git_prompt_info 2> /dev/null) ]]; then
212 | create_segment $GIT_b $GIT_f "$(git_prompt_info)$(git_prompt_status)" $GIT_RANK
213 | else
214 | create_segment $GIT_b $GIT_f "$ZSH_THEME_GIT_PROMPT_PREFIX$(git rev-parse --abbrev-ref HEAD)" $GIT_RANK
215 | fi
216 | fi
217 | fi
218 | }
219 |
220 | function venv(){
221 | if [ -n "$VIRTUAL_ENV" ]; then
222 | create_segment $VENV_b $VENV_f ${VIRTUAL_ENV:t:gs/%/%%} $VENV_RANK
223 | fi
224 | }
225 |
226 | # battery function
227 |
228 | # variables
229 |
230 | if [[ $COMFYLINE_BATTERY_LOW == "" ]]; then
231 | COMFYLINE_BATTERY_LOW=15
232 | fi
233 | if [[ $COMFYLINE_BATTERY_HIGH == "" ]]; then
234 | COMFYLINE_BATTERY_HIGH=90
235 | fi
236 | if [[ $COMFYLINE_CHARGING_ICON == "" ]]; then
237 | COMFYLINE_CHARGING_ICON="⚡️"
238 | fi
239 | if [[ $COMFYLINE_HIGHCHARGE_ICON == "" ]]; then
240 | COMFYLINE_HIGHCHARGE_ICON=""
241 | fi
242 | if [[ $COMFYLINE_MIDCHARGE_ICON == "" ]]; then
243 | COMFYLINE_MIDCHARGE_ICON=""
244 | fi
245 | if [[ $COMFYLINE_LOWCHARGE_ICON == "" ]]; then
246 | COMFYLINE_LOWCHARGE_ICON=""
247 | fi
248 |
249 | function calcbat(){
250 | BAT=""
251 | if [[ $(uname) == "Linux" ]]; then
252 | number=$(ls /sys/class/power_supply/ | grep 'BAT' | wc -l )
253 | if [[ $number -eq 0 ]]; then
254 | return 0
255 | fi
256 | for ((i=0;i<$number;i++));do
257 | capacity=$(cat /sys/class/power_supply/BAT${i}/capacity)
258 | stats=$(cat /sys/class/power_supply/BAT${i}/status)
259 | if [[ $stats == "Charging" ]]; then
260 | stats="$COMFYLINE_CHARGING_ICON"
261 | elif [[ $stats == "Discharging" ]]; then
262 | if [ $capacity -gt $COMFYLINE_BATTERY_HIGH ]; then
263 | stats="$COMFYLINE_HIGHCHARGE_ICON"
264 | elif [ $capacity -lt $COMFYLINE_BATTERY_LOW ]; then
265 | stats="$COMFYLINE_LOWCHARGE_ICON"
266 | else
267 | stats="$COMFYLINE_MIDCHARGE_ICON"
268 | fi
269 | elif [[ $stats == "Not charging" ]]; then
270 | stats="$COMFYLINE_HIGHCHARGE_ICON"
271 | fi
272 | BAT="$BAT$capacity%% $stats "
273 | done
274 |
275 | elif [[ $(uname) == "Darwin" ]]; then
276 | battery_details = $(pmset -g batt)
277 | charged=$(echo "$battery_details" | grep -w 'charged')
278 | charging=$(echo "$battery_details" | grep -w 'AC Power')
279 | discharging=$(echo "$battery_details" | grep -w 'Battery Power')
280 | capacity=$(echo "$battery_details" | grep -o "([0-9]*)"%)
281 |
282 | if [ -n "$charging" ]; then
283 | stats="$COMFYLINE_CHARGING_ICON"
284 | elif [[ -n "$discharging" ]]; then
285 | if [ $capacity -gt $COMFYLINE_BATTERY_HIGH ]; then
286 | stats="$COMFYLINE_HIGHCHARGE_ICON"
287 | elif [ $capacity -lt $COMFYLINE_BATTERY_LOW ]; then
288 | stats="$COMFYLINE_LOWCHARGE_ICON"
289 | else
290 | stats="$COMFYLINE_MIDCHARGE_ICON"
291 | fi
292 | fi
293 | BAT="$capacity%% $stats"
294 |
295 | elif [[ $(uname) == "FreeBSD" || $(uname) == "OpenBSD" ]]; then
296 | capacity=$(apm -l)
297 | stats=$(apm -b)
298 | if [ $stats -eq 3 ]; then
299 | stats="$COMFYLINE_CHARGING_ICON"
300 | else
301 | if [[ $capacity -gt $COMFYLINE_BATTERY_HIGH ]]; then
302 | stats="$COMFYLINE_HIGHCHARGE_ICON"
303 | elif [[ $capacity -lt $COMFYLINE_BATTERY_LOW ]]; then
304 | stats="$COMFYLINE_LOWCHARGE_ICON"
305 | else
306 | stats="$COMFYLINE_MIDCHARGE_ICON"
307 | fi
308 | fi
309 | BAT="$capacity%% $stats"
310 | fi
311 | }
312 |
313 | # function to call battery calculation
314 | function currbat(){
315 | if [[ $COMFYLINE_BATTERY_PLUGIN -eq 1 ]]; then
316 | create_segment $BAT_b $BAT_f "$(battery_pct_prompt)" $BAT_RANK
317 | else
318 | calcbat
319 | create_segment $BAT_b $BAT_f "$BAT" $BAT_RANK
320 | fi
321 | }
322 |
323 | function currdate(){
324 | info="%D{$COMFYLINE_DATE_FORMAT}"
325 | create_segment $DATE_b $DATE_f $info $DATE_RANK
326 | }
327 |
328 | function currtime(){
329 | info="%D{$COMFYLINE_TIME_FORMAT}"
330 | create_segment $TIME_b $TIME_f $info $TIME_RANK
331 | }
332 |
333 | function endleft(){
334 | echo -n "%k$COMFYLINE_SEGSEP%f"
335 | }
336 |
337 | # parse variables
338 |
339 | segments=("retval" "hostname" "username" "dir" "gitrepo" "venv" "currbat" "currtime" "currdate")
340 | segment_ranks=($RETVAL_RANK $HOST_RANK $USER_RANK $DIR_RANK $GIT_RANK $VENV_RANK $BAT_RANK $TIME_RANK $DATE_RANK)
341 |
342 | # split into left and right
343 |
344 | left_prompt=()
345 | right_prompt=()
346 | left_ranks=()
347 | right_ranks=()
348 | for ((i=1;i<=${#segments[@]};i++)); do
349 | if [[ segment_ranks[$i] -gt 0 ]]; then
350 | left_prompt+=(${segments[$i]})
351 | left_ranks+=(${segment_ranks[$i]})
352 | elif [[ segment_ranks[$i] -lt 0 ]]; then
353 | right_prompt+=(${segments[$i]})
354 | right_ranks+=(${segment_ranks[$i]#-})
355 | fi
356 | done
357 |
358 | # sort the prompts according to ranks and find the leftmost and rightmost
359 | # I use the traditional iterative method to find max/min and using count-sort for sorting
360 |
361 | LEFTMOST_RANK=100
362 | declare -A sorted_left
363 | for ((i=1;i<=${#left_prompt[@]};i++)); do
364 | if [[ $left_ranks[$i] -lt $LEFTMOST_RANK ]]; then LEFTMOST_RANK=$left_ranks[$i] fi
365 | sorted_left[$left_ranks[$i]]="$left_prompt[$i]"
366 | done
367 |
368 | RIGHTMOST_RANK=100
369 | declare -A sorted_right
370 | for ((i=1;i<=${#right_prompt[@]};i++)); do
371 | if [[ $right_ranks[$i] -lt $RIGHTMOST_RANK ]]; then RIGHTMOST_RANK=$right_ranks[$i] fi
372 | sorted_right[$right_ranks[$i]]="$right_prompt[$i]"
373 | done
374 | ((RIGHTMOST_RANK*=-1))
375 |
376 |
377 | # finally make_prompt which makes prompts
378 | make_left_prompt(){
379 | for ((j = 1; j <= ${#left_prompt[@]}; j++)); do
380 | type $sorted_left[$j] &>/dev/null && $sorted_left[$j]
381 | done
382 | }
383 |
384 | make_right_prompt(){
385 | for ((j = ${#right_prompt[@]}; j>0; j--)); do
386 | type $sorted_right[$j] &>/dev/null && $sorted_right[$j]
387 | done
388 | }
389 |
390 | export PROMPT='%{%f%b%k%}$(make_left_prompt)$(endleft) '
391 | export RPROMPT=' %{%f%b%k%}$(make_right_prompt)' # spaces left so that hiding is triggered
392 |
393 | if [[ $COMFYLINE_NEXT_LINE_CHAR == "" ]]; then
394 | COMFYLINE_NEXT_LINE_CHAR='➟'
395 | fi
396 |
397 | if [[ $COMFYLINE_NEXT_LINE_CHAR_COLOR == "" ]]; then
398 | COMFYLINE_NEXT_LINE_CHAR_COLOR="grey"
399 | fi
400 |
401 | next_line_maker(){
402 | echo -n "%F{$COMFYLINE_NEXT_LINE_CHAR_COLOR}$COMFYLINE_NEXT_LINE_CHAR %f"
403 | }
404 |
405 | # setting up typing area
406 | if [[ COMFYLINE_START_NEXT_LINE -eq 2 ]]; then
407 |
408 | PROMPT=$PROMPT'
409 | '$(next_line_maker)
410 |
411 |
412 | elif [[ COMFYLINE_NO_GAP_LINE -eq 1 ]]; then
413 | else
414 |
415 | PROMPT='
416 | '$PROMPT
417 |
418 | fi
419 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/emoji.zsh-theme:
--------------------------------------------------------------------------------
1 | PROMPT=" %(?:%{$fg_bold[green]%}➜:%{$fg_bold[red]%}➜)"
2 | PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
3 |
4 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✏️ "
7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) ✅"
8 |
--------------------------------------------------------------------------------
/assets/add_zsh_theme/fishbone++.zsh-theme:
--------------------------------------------------------------------------------
1 |
2 | local username="%n"
3 | local path_prefix="%{$fg[yellow]%}["
4 | local path_string="%{$fg[blue]%}%~"
5 | local path_postfix="%{$fg[yellow]%}]"
6 | local prompt_string="❯❯ "
7 | local local_time="%T"
8 | local newline=$'\n'
9 | local line_mode=$'\n'
10 |
11 | # customize user settings
12 | # prompt symbol
13 | if [ ! -z "$FISHBONEPP_PROMPT" ]; then
14 | prompt_string="$FISHBONEPP_PROMPT"
15 | fi
16 | # username
17 | if [ ! -z "$FISHBONEPP_USER" ]; then
18 | username="$FISHBONEPP_USER"
19 | fi
20 | # time mode
21 | if [ "$FISHBONEPP_TIME" = "12HR" ]; then
22 | local_time="%t"
23 | elif [ "$FISHBONEPP_TIME" = "FULL" ]; then
24 | local_time="%*"
25 | else
26 | local_time="%T"
27 | fi
28 | # new line on start
29 | if [ "$FISHBONEPP_NEWLINE" = false ]; then
30 | newline=''
31 | fi
32 | # line mode
33 | if [ "$FISHBONEPP_LINE_MODE" = "singleline" ]; then
34 | line_mode=''
35 | fi
36 |
37 | local host_name="%{$fg[blue]%}${username}"
38 | local time_string="%{$fg[blue]%}${local_time}"
39 | # Make prompt_string red if the previous command failed.
40 | local return_status="%(?:%{$fg[cyan]%}$prompt_string:%{$fg[red]%}$prompt_string%}"
41 |
42 |
43 | # set the git_prompt_info text
44 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue](%{$reset_color%}%{$fg[yellow]%}"
45 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%{$fg[blue])%}"
46 | ZSH_THEME_GIT_PROMPT_DIRTY="⚡"
47 | ZSH_THEME_GIT_PROMPT_CLEAN=""
48 |
49 | PROMPT='${newline}\
50 | ${host_name}${hosr}%{$reset_color%}@${time_string} ${line_mode}\
51 | ${path_prefix}${path_string}${path_postfix}$(git_prompt_info)$(git_prompt_status) \
52 | ${return_status} %{$reset_color%}'
53 |
54 |
55 | ZSH_THEME_GIT_PROMPT_ADDED="➕"
56 | ZSH_THEME_GIT_PROMPT_MODIFIED="✒️ "
57 | ZSH_THEME_GIT_PROMPT_DELETED="➖"
58 | ZSH_THEME_GIT_PROMPT_RENAMED="⁉️ "
59 | ZSH_THEME_GIT_PROMPT_UNMERGED="🥺"
60 | ZSH_THEME_GIT_PROMPT_UNTRACKED="🚝"
61 |
--------------------------------------------------------------------------------
/assets/fastfetch/config-compact.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3 | "logo": {
4 | "source": "~/.config/fastfetch/fedora.png",
5 | "type": "kitty-direct",
6 | "height": 10,
7 | "width": 20,
8 | "padding": {
9 | "top": 1
10 | }
11 | },
12 | "display": {
13 | "separator": " -> "
14 | },
15 | "modules": [
16 | "break",
17 | {
18 | "type": "title",
19 | "keyWidth": 10,
20 | "format": " {6}{7}{8}"
21 | },
22 | {
23 | "type": "custom",
24 | "format": " ─────────────────────────── "
25 | },
26 | {
27 | "type": "kernel",
28 | "key": " ",
29 | "keyColor": "yellow"
30 | },
31 | {
32 | "type": "wm",
33 | "key": " ",
34 | "keyColor": "blue"
35 | },
36 | {
37 | "type": "shell",
38 | "key": " ",
39 | "keyColor": "yellow"
40 | },
41 | {
42 | "type": "terminal",
43 | "key": " ",
44 | "keyColor": "blue"
45 | },
46 | /*
47 | {
48 | "type": "packages",
49 | "key": " ",
50 | "keyColor": "yellow"
51 | },
52 | */
53 | {
54 | "type": "memory",
55 | "key": " ",
56 | "keyColor": "magenta",
57 | // format: used / total
58 | "format": "{1} / {2}"
59 | },
60 | {
61 | "type": "uptime",
62 | "key": " ",
63 | "keyColor": "green"
64 | },
65 | {
66 | "type": "custom",
67 | "format": " ─────────────────────────── "
68 | },
69 | {
70 | "type": "custom",
71 | "format": " \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[90m "
72 | },
73 | "break",
74 | ]
75 | }
76 |
--------------------------------------------------------------------------------
/assets/fastfetch/config-pokemon.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3 | "logo": {
4 | "height": 5,
5 | "width": 10,
6 | "padding": {
7 | "top": 1
8 | }
9 | },
10 | "display": {
11 | "separator": " -> "
12 | },
13 | "modules": [
14 | "break",
15 | {
16 | "type": "title",
17 | "keyWidth": 10,
18 | "format": " {6}{7}{8}"
19 | },
20 | {
21 | "type": "custom",
22 | "format": " ─────────────────────────── "
23 | },
24 | {
25 | "type": "kernel",
26 | "key": " ",
27 | "keyColor": "yellow"
28 | },
29 | {
30 | "type": "wm",
31 | "key": " ",
32 | "keyColor": "blue"
33 | },
34 | {
35 | "type": "shell",
36 | "key": " ",
37 | "keyColor": "yellow"
38 | },
39 | {
40 | "type": "terminal",
41 | "key": " ",
42 | "keyColor": "blue"
43 | },
44 | /*
45 | {
46 | "type": "packages",
47 | "key": " ",
48 | "keyColor": "yellow"
49 | },
50 | */
51 | {
52 | "type": "memory",
53 | "key": " ",
54 | "keyColor": "magenta",
55 | // format: used / total
56 | "format": "{1} / {2}"
57 | },
58 | {
59 | "type": "uptime",
60 | "key": " ",
61 | "keyColor": "green"
62 | },
63 | {
64 | "type": "custom",
65 | "format": " ─────────────────────────── "
66 | },
67 | {
68 | "type": "custom",
69 | "format": " \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[90m "
70 | },
71 | "break",
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/assets/fastfetch/config-v2.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3 | "logo": {
4 | //"source": "~/.config/fastfetch/nixos.png",
5 | //"type": "kitty-direct",
6 | "height": 15,
7 | "width": 30,
8 | "padding": {
9 | "top": 1
10 | }
11 | },
12 | "display": {
13 | "separator": " ➜ "
14 | },
15 |
16 | "modules": [
17 | "break",
18 | {
19 | "type": "os",
20 | "key": " DISTRO",
21 | "keyColor": "31",
22 | },
23 | {
24 | "type": "kernel",
25 | "key": " ├ ",
26 | "keyColor": "31",
27 | },
28 | {
29 | "type": "packages",
30 | "key": " ├ ",
31 | "keyColor": "31",
32 | },
33 | {
34 | "type": "shell",
35 | "key": " └ ",
36 | "keyColor": "31",
37 | },
38 | "break",
39 | {
40 | "type": "wm",
41 | "key": " DE/WM",
42 | "keyColor": "32",
43 | },
44 | {
45 | "type": "wmtheme",
46 | "key": " ├ ",
47 | "keyColor": "32",
48 | },
49 | {
50 | "type": "icons",
51 | "key": " ├ ",
52 | "keyColor": "32",
53 | },
54 | {
55 | "type": "cursor",
56 | "key": " ├ ",
57 | "keyColor": "32",
58 | },
59 | {
60 | "type": "terminal",
61 | "key": " ├ ",
62 | "keyColor": "32",
63 | },
64 | {
65 | "type": "terminalfont",
66 | "key": " └ ",
67 | "keyColor": "32",
68 | },
69 | "break",
70 | {
71 | "type": "host",
72 | "format": "{2}",
73 | "key": " SYSTEM",
74 | "keyColor": "33",
75 | },
76 | {
77 | "type": "cpu",
78 | "format": "{1} ({3}) @ {7} GHz",
79 | "key": " ├ ",
80 | "keyColor": "33",
81 | },
82 | {
83 | "type": "gpu",
84 | "format": "{2}",
85 | "key": " ├ ",
86 | "keyColor": "33",
87 | },
88 | {
89 | "type": "memory",
90 | "key": " ├ ",
91 | "keyColor": "33",
92 | },
93 | {
94 | "type": "swap",
95 | "key": " ├ ",
96 | "keyColor": "33",
97 | },
98 | {
99 | "type": "disk",
100 | "key": " ├ ",
101 | "keyColor": "33",
102 | },
103 | {
104 | "type": "display",
105 | "key": " └ ",
106 | "compactType": "original-with-refresh-rate",
107 | "keyColor": "33",
108 | },
109 | "break",
110 | "break",
111 | ]
112 | }
113 |
--------------------------------------------------------------------------------
/assets/fastfetch/config.jsonc:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
4 | "logo": {
5 | "padding": {
6 | "top": 1
7 | }
8 | },
9 | "display": {
10 | "separator": " "
11 | },
12 | "modules": [
13 | "break",
14 | {
15 | "type": "os",
16 | "key": " DISTRO",
17 | "keyColor": "yellow"
18 | },
19 | {
20 | "type": "kernel",
21 | "key": "│ ├",
22 | "keyColor": "yellow"
23 | },
24 | {
25 | "type": "packages",
26 | "key": "│ ├",
27 | "keyColor": "yellow"
28 | },
29 | {
30 | "type": "shell",
31 | "key": "│ └",
32 | "keyColor": "yellow"
33 | },
34 | {
35 | "type": "wm",
36 | "key": " DE/WM",
37 | "keyColor": "blue"
38 | },
39 | {
40 | "type": "wmtheme",
41 | "key": "│ ├",
42 | "keyColor": "blue"
43 | },
44 | {
45 | "type": "icons",
46 | "key": "│ ├",
47 | "keyColor": "blue"
48 | },
49 | {
50 | "type": "cursor",
51 | "key": "│ ├",
52 | "keyColor": "blue",
53 | },
54 | {
55 | "type": "terminalfont",
56 | "key": "│ ├",
57 | "keyColor": "blue",
58 | },
59 | {
60 | "type": "terminal",
61 | "key": "│ └",
62 | "keyColor": "blue"
63 | },
64 | {
65 | "type": "host",
66 | "key": " SYSTEM",
67 | "keyColor": "green"
68 | },
69 | {
70 | "type": "cpu",
71 | "key": "│ ├",
72 | "keyColor": "green"
73 | },
74 | {
75 | "type": "gpu",
76 | "key": "│ ├",
77 | "format": "{2}",
78 | "keyColor": "green"
79 | },
80 | {
81 | "type": "display",
82 | "key": "│ ├",
83 | "keyColor": "green",
84 | "compactType": "original-with-refresh-rate"
85 | },
86 | {
87 | "type": "memory",
88 | "key": "│ ├",
89 | "keyColor": "green"
90 | },
91 | {
92 | "type": "swap",
93 | "key": "│ ├",
94 | "keyColor": "green"
95 | },
96 | {
97 | "type": "uptime",
98 | "key": "│ ├",
99 | "keyColor": "green"
100 | },
101 | {
102 | "type": "display",
103 | "key": "│ └",
104 | "keyColor": "green"
105 | },
106 | {
107 | "type": "sound",
108 | "key": " AUDIO",
109 | "format": "{2}",
110 | "keyColor": "magenta"
111 | },
112 | {
113 | "type": "player",
114 | "key": "│ ├",
115 | "keyColor": "magenta"
116 | },
117 | {
118 | "type": "media",
119 | "key": "│ └",
120 | "keyColor": "magenta"
121 | },
122 | {
123 | "type": "custom",
124 | "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[38m \u001b[39m \u001b[39m \u001b[38m \u001b[37m \u001b[36m \u001b[35m \u001b[34m \u001b[33m \u001b[32m \u001b[31m \u001b[90m "
125 | },
126 | "break",
127 | ]
128 | }
129 |
--------------------------------------------------------------------------------
/assets/fastfetch/fedora.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JaKooLit/Fedora-Hyprland/ebdc4250f812a0e07fc0092b39f177e29a8075c4/assets/fastfetch/fedora.png
--------------------------------------------------------------------------------
/assets/gtk-3.0/settings.ini:
--------------------------------------------------------------------------------
1 | [Settings]
2 | gtk-theme-name=Andromeda-dark
3 | gtk-icon-theme-name=Flat-Remix-Blue-Dark
4 | gtk-font-name=Fira Code Semi-Bold 14
5 | gtk-cursor-theme-name=Bibata-Modern-Ice
6 | gtk-cursor-theme-size=24
7 | gtk-toolbar-style=GTK_TOOLBAR_ICONS
8 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
9 | gtk-button-images=1
10 | gtk-menu-images=1
11 | gtk-enable-event-sounds=1
12 | gtk-enable-input-feedback-sounds=0
13 | gtk-xft-antialias=1
14 | gtk-xft-hinting=1
15 | gtk-xft-hintstyle=hintslight
16 | gtk-xft-rgba=rgb
17 | gtk-application-prefer-dark-theme=1
18 |
--------------------------------------------------------------------------------
/assets/hyprland.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=Hyprland
3 | Comment=An intelligent dynamic tiling Wayland compositor
4 | Exec=Hyprland
5 | Type=Application
6 |
--------------------------------------------------------------------------------
/assets/sddm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JaKooLit/Fedora-Hyprland/ebdc4250f812a0e07fc0092b39f177e29a8075c4/assets/sddm.png
--------------------------------------------------------------------------------
/assets/xfce4/helpers.rc:
--------------------------------------------------------------------------------
1 | FileManager=Thunar
2 | TerminalEmulator=kitty
3 | #WebBrowser=firefox
4 | #MailReader=evolution
5 |
--------------------------------------------------------------------------------
/auto-install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # https://github.com/JaKooLit
3 |
4 | # Set some colors for output messages
5 | OK="$(tput setaf 2)[OK]$(tput sgr0)"
6 | ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
7 | NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
8 | INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
9 | WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
10 | CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
11 | MAGENTA="$(tput setaf 5)"
12 | ORANGE="$(tput setaf 214)"
13 | WARNING="$(tput setaf 1)"
14 | YELLOW="$(tput setaf 3)"
15 | GREEN="$(tput setaf 2)"
16 | BLUE="$(tput setaf 4)"
17 | SKY_BLUE="$(tput setaf 6)"
18 | RESET="$(tput sgr0)"
19 |
20 | # Variables
21 | Distro="Fedora-Hyprland"
22 | Github_URL="https://github.com/JaKooLit/$Distro.git"
23 | Distro_DIR="$HOME/$Distro"
24 |
25 | printf "\n%.0s" {1..1}
26 |
27 | if ! command -v git &> /dev/null
28 | then
29 | echo "${INFO} Git not found! ${SKY_BLUE}Installing Git...${RESET}"
30 | if ! sudo dnf install -y git; then
31 | echo "${ERROR} Failed to install Git. Exiting."
32 | exit 1
33 | fi
34 | fi
35 |
36 | printf "\n%.0s" {1..1}
37 |
38 | if [ -d "$Distro_DIR" ]; then
39 | echo "${YELLOW}$Distro_DIR exists. Updating the repository... ${RESET}"
40 | cd "$Distro_DIR"
41 | git stash && git pull
42 | chmod +x install.sh
43 | ./install.sh
44 | else
45 | echo "${MAGENTA}$Distro_DIR does not exist. Cloning the repository...${RESET}"
46 | git clone --depth=1 "$Github_URL" "$Distro_DIR"
47 | cd "$Distro_DIR"
48 | chmod +x install.sh
49 | ./install.sh
50 | fi
--------------------------------------------------------------------------------
/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JaKooLit/Fedora-Hyprland/ebdc4250f812a0e07fc0092b39f177e29a8075c4/image.png
--------------------------------------------------------------------------------
/install-scripts/00-hypr-pkgs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Hyprland-Dots Packages #
4 | # edit your packages desired here.
5 | # WARNING! If you remove packages here, dotfiles may not work properly.
6 | # and also, ensure that packages are present in fedora repo or add copr repo
7 |
8 | # add packages wanted here
9 | Extra=(
10 |
11 | )
12 |
13 | # packages neeeded
14 | hypr_package=(
15 | bc
16 | curl
17 | findutils
18 | gawk
19 | git
20 | grim
21 | gvfs
22 | gvfs-mtp
23 | hyprpolkitagent
24 | ImageMagick
25 | inxi
26 | jq
27 | kitty
28 | kvantum
29 | nano
30 | network-manager-applet
31 | openssl
32 | pamixer
33 | pavucontrol
34 | pipewire-alsa
35 | pipewire-utils
36 | playerctl
37 | python3-requests
38 | python3-pip
39 | python3-pyquery
40 | qt5ct
41 | qt6ct
42 | qt6-qtsvg
43 | rofi-wayland
44 | slurp
45 | swappy
46 | unzip # required later
47 | waybar
48 | wget2
49 | wl-clipboard
50 | wlogout
51 | xdg-user-dirs
52 | xdg-utils
53 | yad
54 | )
55 |
56 | # the following packages can be deleted. however, dotfiles may not work properly
57 | hypr_package_2=(
58 | brightnessctl
59 | btop
60 | cava
61 | loupe
62 | fastfetch
63 | gnome-system-monitor
64 | mousepad
65 | mpv
66 | mpv-mpris
67 | nvtop
68 | qalculate-gtk
69 | )
70 |
71 | copr_packages=(
72 | nwg-displays
73 | cliphist
74 | nwg-look
75 | SwayNotificationCenter
76 | pamixer
77 | swww
78 | wallust
79 | )
80 |
81 | # List of packages to uninstall as it conflicts some packages
82 | uninstall=(
83 | aylurs-gtk-shell
84 | dunst
85 | mako
86 | rofi
87 | )
88 |
89 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
90 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
91 |
92 | # Change the working directory to the parent directory of the script
93 | PARENT_DIR="$SCRIPT_DIR/.."
94 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
95 |
96 | # Source the global functions script
97 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
98 | echo "Failed to source Global_functions.sh"
99 | exit 1
100 | fi
101 |
102 | # Set the name of the log file to include the current date and time
103 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log"
104 |
105 | # conflicting packages removal
106 | overall_failed=0
107 | printf "\n%s - ${SKY_BLUE}Removing some packages${RESET} as it conflicts with KooL's Hyprland Dots \n" "${NOTE}"
108 | for PKG in "${uninstall[@]}"; do
109 | uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
110 | if [ $? -ne 0 ]; then
111 | overall_failed=1
112 | fi
113 | done
114 |
115 | if [ $overall_failed -ne 0 ]; then
116 | echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
117 | fi
118 |
119 | printf "\n%.0s" {1..1}
120 |
121 | # Installation of main components
122 | printf "\n%s - Installing ${SKY_BLUE}KooL's hyprland necessary packages${RESET} .... \n" "${NOTE}"
123 |
124 | for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${copr_packages[@]}" "${Extra[@]}"; do
125 | install_package "$PKG1" "$LOG"
126 | done
127 |
128 | printf "\n%.0s" {1..2}
129 |
--------------------------------------------------------------------------------
/install-scripts/02-Final-Check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Final checking if packages are installed
4 | # NOTE: These package checks are only the essentials
5 |
6 | packages=(
7 | cliphist
8 | kvantum
9 | rofi-wayland
10 | ImageMagick
11 | SwayNotificationCenter
12 | swww
13 | wallust
14 | waybar
15 | wl-clipboard
16 | wlogout
17 | kitty
18 | hypridle
19 | hyprlock
20 | hyprland
21 | )
22 |
23 | # Local packages that should be in /usr/local/bin/
24 | local_pkgs_installed=(
25 |
26 | )
27 |
28 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
29 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
30 |
31 | # Change the working directory to the parent directory of the script
32 | PARENT_DIR="$SCRIPT_DIR/.."
33 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
34 |
35 | # Source the global functions script
36 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
37 | echo "Failed to source Global_functions.sh"
38 | exit 1
39 | fi
40 |
41 | # Set the name of the log file to include the current date and time
42 | LOG="Install-Logs/00_CHECK-$(date +%d-%H%M%S)_installed.log"
43 |
44 | printf "\n%s - Final Check if all ${SKY_BLUE}Essential packages${RESET} were installed \n" "${NOTE}"
45 | # Initialize an empty array to hold missing packages
46 | missing=()
47 | local_missing=()
48 |
49 | # Function to check if a package is installed using rpm (Fedora)
50 | is_installed_rpm() {
51 | rpm -q "$1" &>/dev/null
52 | }
53 |
54 | # Loop through each package
55 | for pkg in "${packages[@]}"; do
56 | # Check if the package is installed via rpm
57 | if ! is_installed_rpm "$pkg"; then
58 | missing+=("$pkg")
59 | fi
60 | done
61 |
62 | # Check for local packages
63 | for pkg1 in "${local_pkgs_installed[@]}"; do
64 | if ! [ -f "/usr/local/bin/$pkg1" ]; then
65 | local_missing+=("$pkg1")
66 | fi
67 | done
68 |
69 | # Log missing packages
70 | if [ ${#missing[@]} -eq 0 ] && [ ${#local_missing[@]} -eq 0 ]; then
71 | echo "${OK} GREAT! It seems All ${YELLOW}essential packages${RESET} are installed." | tee -a "$LOG"
72 | else
73 | if [ ${#missing[@]} -ne 0 ]; then
74 | echo "${WARN} The following packages are not installed and will be logged:"
75 | for pkg in "${missing[@]}"; do
76 | echo "$pkg"
77 | echo "$pkg" >> "$LOG" # Log the missing package to the file
78 | done
79 | fi
80 |
81 | if [ ${#local_missing[@]} -ne 0 ]; then
82 | echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
83 | for pkg1 in "${local_missing[@]}"; do
84 | echo "$pkg1 is not installed. can't find it in /usr/local/bin/"
85 | echo "$pkg1" >> "$LOG" # Log the missing local package to the file
86 | done
87 | fi
88 |
89 | # Add a timestamp when the missing packages were logged
90 | echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
91 | fi
--------------------------------------------------------------------------------
/install-scripts/Global_functions.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Global Functions for Scripts #
4 |
5 | # Create Directory for Install Logs
6 | if [ ! -d Install-Logs ]; then
7 | mkdir Install-Logs
8 | fi
9 |
10 | # Log file
11 | LOG="Install-Logs/install.log"
12 |
13 | # Set some colors for output messages
14 | OK="$(tput setaf 2)[OK]$(tput sgr0)"
15 | ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
16 | NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
17 | INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
18 | WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
19 | CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
20 | MAGENTA="$(tput setaf 5)"
21 | ORANGE="$(tput setaf 214)"
22 | WARNING="$(tput setaf 1)"
23 | YELLOW="$(tput setaf 3)"
24 | GREEN="$(tput setaf 2)"
25 | BLUE="$(tput setaf 4)"
26 | SKY_BLUE="$(tput setaf 6)"
27 | RESET="$(tput sgr0)"
28 |
29 |
30 | # Show progress function
31 | show_progress() {
32 | local pid=$1
33 | local package_name=$2
34 | local spin_chars=("●○○○○○○○○○" "○●○○○○○○○○" "○○●○○○○○○○" "○○○●○○○○○○" "○○○○●○○○○" \
35 | "○○○○○●○○○○" "○○○○○○●○○○" "○○○○○○○●○○" "○○○○○○○○●○" "○○○○○○○○○●")
36 | local i=0
37 |
38 | tput civis
39 | printf "\r${INFO} Installing ${YELLOW}%s${RESET} ..." "$package_name"
40 |
41 | while ps -p $pid &> /dev/null; do
42 | printf "\r${INFO} Installing ${YELLOW}%s${RESET} %s" "$package_name" "${spin_chars[i]}"
43 | i=$(( (i + 1) % 10 ))
44 | sleep 0.3
45 | done
46 |
47 | printf "\r${INFO} Installing ${YELLOW}%s${RESET} ... Done!%-20s \n" "$package_name" ""
48 | tput cnorm
49 | }
50 |
51 | # Function to install packages
52 | install_package() {
53 | if rpm -q "$1" &>/dev/null ; then
54 | echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
55 | else
56 | # Run dnf and redirect all output to a log file
57 | (
58 | stdbuf -oL sudo dnf install -y "$1" 2>&1
59 | ) >> "$LOG" 2>&1 &
60 | PID=$!
61 | show_progress $PID "$1"
62 |
63 | # Double check if package is installed
64 | if rpm -q "$1" &>/dev/null ; then
65 | echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
66 | else
67 | echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the $LOG. You may need to install manually."
68 | fi
69 | fi
70 | }
71 |
72 | # Function for removing packages
73 | uninstall_package() {
74 | local pkg="$1"
75 |
76 | # Checking if package is installed
77 | if rpm -q "$pkg" &>/dev/null; then
78 | echo -e "${NOTE} removing $pkg ..."
79 | sudo dnf remove -y "$pkg" 2>&1 | tee -a "$LOG" | grep -v "error: target not found"
80 |
81 | if ! rpm -q "$pkg" &>/dev/null; then
82 | echo -e "\e[1A\e[K${OK} $pkg removed."
83 | else
84 | echo -e "\e[1A\e[K${ERROR} $pkg Removal failed. No actions required."
85 | return 1
86 | fi
87 | else
88 | echo -e "${INFO} Package $pkg not installed, skipping."
89 | fi
90 | return 0
91 | }
--------------------------------------------------------------------------------
/install-scripts/InputGroup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Adding users into input group #
4 |
5 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
6 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 |
8 | # Change the working directory to the parent directory of the script
9 | PARENT_DIR="$SCRIPT_DIR/.."
10 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
11 |
12 | # Source the global functions script
13 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
14 | echo "Failed to source Global_functions.sh"
15 | exit 1
16 | fi
17 |
18 | # Set the name of the log file to include the current date and time
19 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
20 |
21 | # Check if the 'input' group exists
22 | if grep -q '^input:' /etc/group; then
23 | echo "${OK} ${MAGENTA}input${RESET} group exists."
24 | else
25 | echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..."
26 | sudo groupadd input
27 | echo "${MAGENTA}input${RESET} group created" >> "$LOG"
28 | fi
29 |
30 | # Add the user to the 'input' group
31 | sudo usermod -aG input "$(whoami)"
32 | echo "${OK} ${YELLOW}user${RESET} added to the ${MAGENTA}input${RESET} group. Changes will take effect after you log out and log back in." >> "$LOG"
33 |
34 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/ags.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Aylur's GTK Shell v 1.9.0 #
4 | # for desktop overview
5 |
6 | ags=(
7 | cmake
8 | typescript
9 | nodejs-npm
10 | meson
11 | gjs
12 | gjs-devel
13 | gobject-introspection
14 | gobject-introspection-devel
15 | gtk3-devel
16 | gtk-layer-shell
17 | upower
18 | NetworkManager
19 | pam-devel
20 | pulseaudio-libs-devel
21 | libdbusmenu-gtk3
22 | libsoup3
23 | )
24 |
25 | # specific tags to download
26 | ags_tag="v1.9.0"
27 |
28 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
29 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
30 |
31 | # Change the working directory to the parent directory of the script
32 | PARENT_DIR="$SCRIPT_DIR/.."
33 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
34 |
35 | # Source the global functions script
36 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
37 | echo "Failed to source Global_functions.sh"
38 | exit 1
39 | fi
40 |
41 | # Set the name of the log file to include the current date and time
42 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
43 | MLOG="install-$(date +%d-%H%M%S)_ags2.log"
44 |
45 | # Check if AGS is installed
46 | if command -v ags &>/dev/null; then
47 | AGS_VERSION=$(ags -v | awk '{print $NF}')
48 | if [[ "$AGS_VERSION" == "1.9.0" ]]; then
49 | printf "${INFO} ${MAGENTA}Aylur's GTK Shell v1.9.0${RESET} is already installed. Skipping installation."
50 | printf "\n%.0s" {1..2}
51 | exit 0
52 | fi
53 | fi
54 |
55 | # Installation of main components
56 | printf "\n%s - Installing ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}"
57 |
58 | # Installing ags Dependencies
59 | for PKG1 in "${ags[@]}"; do
60 | install_package "$PKG1" "$LOG"
61 | done
62 |
63 | printf "\n%.0s" {1..1}
64 |
65 | # ags v1
66 | printf "${NOTE} Install and Compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}..\n"
67 |
68 | # Check if directory exists and remove it
69 | if [ -d "ags" ]; then
70 | printf "${NOTE} Removing existing ags directory...\n"
71 | rm -rf "ags"
72 | fi
73 |
74 | printf "\n%.0s" {1..1}
75 | printf "${INFO} Kindly Standby...cloning and compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}...\n"
76 | printf "\n%.0s" {1..1}
77 | # Clone repository with the specified tag and capture git output into MLOG
78 | if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then
79 | cd ags_v1.9.0 || exit 1
80 | npm install
81 | meson setup build
82 | if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
83 | printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
84 | else
85 | echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG"
86 | fi
87 | # Move logs to Install-Logs directory
88 | mv "$MLOG" ../Install-Logs/ || true
89 | cd ..
90 | else
91 | echo -e "\n${ERROR} Failed to download ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Please check your connection\n" 2>&1 | tee -a "$LOG"
92 | mv "$MLOG" ../Install-Logs/ || true
93 | exit 1
94 | fi
95 |
96 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/bluetooth.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Bluetooth #
4 |
5 | blue=(
6 | bluez
7 | bluez-tools
8 | blueman
9 | python3-cairo
10 | )
11 |
12 |
13 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
14 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 |
16 | # Change the working directory to the parent directory of the script
17 | PARENT_DIR="$SCRIPT_DIR/.."
18 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
19 |
20 | # Source the global functions script
21 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
22 | echo "Failed to source Global_functions.sh"
23 | exit 1
24 | fi
25 |
26 | # Set the name of the log file to include the current date and time
27 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log"
28 |
29 | # Bluetooth
30 | printf "${NOTE} Installing ${SKY_BLUE}Bluetooth${RESET} Packages...\n"
31 | for BLUE in "${blue[@]}"; do
32 | install_package "$BLUE" "$LOG"
33 | done
34 |
35 | printf " Activating ${YELLOW}Bluetooth${RESET} Services...\n"
36 | sudo systemctl enable --now bluetooth.service 2>&1 | tee -a "$LOG"
37 |
38 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/copr.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # COPR repo and tweaking of dnf #
4 |
5 | # COPR Repos and packages needed from them
6 | # solopasha/hyprland - most packages
7 | # erikreider/SwayNotificationCenter swaync
8 | # errornointernet/packages - wallust ONLY
9 | # tofik/nwg-shell - nwg-displays ONLY
10 |
11 | # List of COPR repositories to be added and enabled
12 | COPR_REPOS=(
13 | solopasha/hyprland
14 | erikreider/SwayNotificationCenter
15 | errornointernet/packages
16 | tofik/nwg-shell
17 | )
18 |
19 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
20 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
21 |
22 | # Change the working directory to the parent directory of the script
23 | PARENT_DIR="$SCRIPT_DIR/.."
24 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
25 |
26 | # Source the global functions script
27 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
28 | echo "Failed to source Global_functions.sh"
29 | exit 1
30 | fi
31 |
32 | # Set the name of the log file
33 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_copr.log"
34 |
35 | # Function to add dnf config if not present
36 | add_config_if_not_present() {
37 | local file="$1"
38 | local config="$2"
39 | grep -qF "$config" "$file" || echo "$config" | sudo tee -a "$file" > /dev/null
40 | }
41 |
42 | # Check and add configuration settings to /etc/dnf/dnf.conf
43 | add_config_if_not_present "/etc/dnf/dnf.conf" "max_parallel_downloads=5"
44 | add_config_if_not_present "/etc/dnf/dnf.conf" "fastestmirror=True"
45 | add_config_if_not_present "/etc/dnf/dnf.conf" "defaultyes=True"
46 |
47 | # Enable RPM Fusion repositories
48 | sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm &&
49 |
50 | # Enable COPR Repositories
51 | for repo in "${COPR_REPOS[@]}"; do
52 | sudo dnf copr enable -y "$repo" 2>&1 | tee -a "$LOG" || { printf "%s - Failed to enable necessary copr repos\n" "${ERROR}"; exit 1; }
53 | done
54 |
55 | printf "\n%.0s" {1..1}
56 |
57 | # Limit package installation to specific packages from certain COPRs
58 | declare -A COPR_PACKAGE_LIMITS=(
59 | ["errornointernet/packages"]="wallust"
60 | ["tofik/nwg-shell"]="nwg-displays"
61 | )
62 |
63 | # Function to modify repo files to restrict package installation
64 | restrict_copr_packages() {
65 | local repo="$1"
66 | local package="$2"
67 | local repo_file="/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:${repo//\//:}.repo"
68 |
69 | if [ -f "$repo_file" ]; then
70 | if grep -q "^includepkgs=$package$" "$repo_file"; then
71 | echo "${NOTE} Package restriction already exists for ${YELLOW}$repo${RESET}."
72 | else
73 | echo "includepkgs=$package" | sudo tee -a "$repo_file" > /dev/null
74 | echo "${OK} Restricting ${YELLOW}$repo${RESET} to only install ${MAGENTA}$package${RESET}."
75 | fi
76 | else
77 | echo "${WARN} Repo file not found: $repo_file"
78 | fi
79 | }
80 |
81 | # Apply package restrictions
82 | for repo in "${!COPR_PACKAGE_LIMITS[@]}"; do
83 | restrict_copr_packages "$repo" "${COPR_PACKAGE_LIMITS[$repo]}"
84 | done
85 |
86 | printf "\n%.0s" {1..1}
87 |
88 | # Update package cache and install packages
89 | sudo dnf update -y
90 |
91 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/dotfiles-main.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Hyprland-Dots to download from main #
4 |
5 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
6 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 |
8 | # Change the working directory to the parent directory of the script
9 | PARENT_DIR="$SCRIPT_DIR/.."
10 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
11 |
12 | # Source the global functions script
13 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
14 | echo "Failed to source Global_functions.sh"
15 | exit 1
16 | fi
17 |
18 |
19 | printf "${NOTE} Cloning and Installing ${SKY_BLUE}KooL's Hyprland Dots${RESET}....\n"
20 | # Check if Hyprland-Dots exists
21 | if [ -d Hyprland-Dots ]; then
22 | cd Hyprland-Dots
23 | git stash && git pull
24 | chmod +x copy.sh
25 | ./copy.sh
26 | else
27 | if git clone --depth=1 https://github.com/JaKooLit/Hyprland-Dots; then
28 | cd Hyprland-Dots || exit 1
29 | chmod +x copy.sh
30 | ./copy.sh
31 | else
32 | echo -e "$ERROR Can't download ${YELLOW}KooL's Hyprland-Dots${RESET} . Check your internet connection"
33 | fi
34 | fi
35 |
36 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/fonts.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # FONTS #
4 |
5 | fonts=(
6 | adobe-source-code-pro-fonts
7 | fira-code-fonts
8 | fontawesome-fonts-all
9 | google-droid-sans-fonts
10 | google-noto-sans-cjk-fonts
11 | google-noto-color-emoji-fonts
12 | google-noto-emoji-fonts
13 | jetbrains-mono-fonts
14 | )
15 |
16 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
17 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
18 |
19 | # Change the working directory to the parent directory of the script
20 | PARENT_DIR="$SCRIPT_DIR/.."
21 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
22 |
23 | # Source the global functions script
24 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
25 | echo "Failed to source Global_functions.sh"
26 | exit 1
27 | fi
28 |
29 | # Set the name of the log file to include the current date and time
30 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_fonts.log"
31 |
32 |
33 | # Installation of main components
34 | printf "\n%s - Installing necessary ${SKY_BLUE}fonts${RESET}.... \n" "${NOTE}"
35 |
36 | for PKG1 in "${fonts[@]}"; do
37 | install_package "$PKG1" "$LOG"
38 | done
39 |
40 | printf "\n%.0s" {1..2}
41 |
42 | # jetbrains nerd font. Necessary for waybar
43 | DOWNLOAD_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz"
44 | # Maximum number of download attempts
45 | MAX_ATTEMPTS=2
46 | for ((ATTEMPT = 1; ATTEMPT <= MAX_ATTEMPTS; ATTEMPT++)); do
47 | curl -OL "$DOWNLOAD_URL" 2>&1 | tee -a "$LOG" && break
48 | echo "Download ${YELLOW}DOWNLOAD_URL${RESET} attempt $ATTEMPT failed. Retrying in 2 seconds..." 2>&1 | tee -a "$LOG"
49 | sleep 2
50 | done
51 |
52 | # Check if the JetBrainsMono directory exists and delete it if it does
53 | if [ -d ~/.local/share/fonts/JetBrainsMonoNerd ]; then
54 | rm -rf ~/.local/share/fonts/JetBrainsMonoNerd 2>&1 | tee -a "$LOG"
55 | fi
56 |
57 | mkdir -p ~/.local/share/fonts/JetBrainsMonoNerd 2>&1 | tee -a "$LOG"
58 | # Extract the new files into the JetBrainsMono directory and log the output
59 | tar -xJkf JetBrainsMono.tar.xz -C ~/.local/share/fonts/JetBrainsMonoNerd 2>&1 | tee -a "$LOG"
60 |
61 | # clean up
62 | if [ -d "JetBrainsMono.tar.xz" ]; then
63 | rm -r JetBrainsMono.tar.xz 2>&1 | tee -a "$LOG"
64 | fi
65 |
66 | # Fantasque Mono Nerd Font
67 | if wget -q https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FantasqueSansMono.zip; then
68 | mkdir -p "$HOME/.local/share/fonts/FantasqueSansMonoNerd" && unzip -o -q "FantasqueSansMono.zip" -d "$HOME/.local/share/fonts/FantasqueSansMono" && echo "FantasqueSansMono installed successfully" | tee -a "$LOG"
69 | else
70 | echo -e "\n${ERROR} Failed to download ${YELLOW}Fantasque Sans Mono Nerd Font${RESET} Please check your connection\n" | tee -a "$LOG"
71 | fi
72 |
73 | # Victor Mono-Font
74 | if wget -q https://rubjo.github.io/victor-mono/VictorMonoAll.zip; then
75 | mkdir -p "$HOME/.local/share/fonts/VictorMono" && unzip -o -q "VictorMonoAll.zip" -d "$HOME/.local/share/fonts/VictorMono" && echo "Victor Font installed successfully" | tee -a "$LOG"
76 | else
77 | echo -e "\n${ERROR} Failed to download ${YELLOW}Victor Mono Font${RESET} Please check your connection\n" | tee -a "$LOG"
78 | fi
79 |
80 | # Update font cache and log the output
81 | fc-cache -v 2>&1 | tee -a "$LOG"
82 |
83 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/gtk_themes.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # GTK Themes & ICONS and Sourcing from a different Repo #
4 |
5 | engine=(
6 | unzip
7 | #gtk-engine-murrine
8 | )
9 |
10 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
11 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
12 |
13 | # Change the working directory to the parent directory of the script
14 | PARENT_DIR="$SCRIPT_DIR/.."
15 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
16 |
17 | # Source the global functions script
18 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
19 | echo "Failed to source Global_functions.sh"
20 | exit 1
21 | fi
22 |
23 | # Set the name of the log file to include the current date and time
24 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log"
25 |
26 |
27 | # installing engine needed for gtk themes
28 | for PKG1 in "${engine[@]}"; do
29 | install_package "$PKG1" "$LOG"
30 | done
31 |
32 | # Check if the directory exists and delete it if present
33 | if [ -d "GTK-themes-icons" ]; then
34 | echo "$NOTE GTK themes and Icons directory exist..deleting..." 2>&1 | tee -a "$LOG"
35 | rm -rf "GTK-themes-icons" 2>&1 | tee -a "$LOG"
36 | fi
37 |
38 | echo "$NOTE Cloning ${SKY_BLUE}GTK themes and Icons${RESET} repository..." 2>&1 | tee -a "$LOG"
39 | if git clone --depth=1 https://github.com/JaKooLit/GTK-themes-icons.git ; then
40 | cd GTK-themes-icons
41 | chmod +x auto-extract.sh
42 | ./auto-extract.sh
43 | cd ..
44 | echo "$OK Extracted GTK Themes & Icons to ~/.icons & ~/.themes directories" 2>&1 | tee -a "$LOG"
45 | else
46 | echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG"
47 | fi
48 |
49 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/hyprland.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Main Hyprland Package #
4 |
5 | hypr=(
6 | hyprland
7 | hypridle
8 | hyprlock
9 | )
10 |
11 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
12 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
13 |
14 | # Change the working directory to the parent directory of the script
15 | PARENT_DIR="$SCRIPT_DIR/.."
16 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
17 |
18 | # Source the global functions script
19 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
20 | echo "Failed to source Global_functions.sh"
21 | exit 1
22 | fi
23 |
24 |
25 | # Create Directory for Install Logs
26 | if [ ! -d Install-Logs ]; then
27 | mkdir Install-Logs
28 | fi
29 |
30 | # Set the name of the log file to include the current date and time
31 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log"
32 |
33 | # Hyprland
34 | printf "${NOTE} Installing ${SKY_BLUE}Hyprland packages${RESET} .......\n"
35 | for HYPR in "${hypr[@]}"; do
36 | install_package "$HYPR" "$LOG"
37 | done
38 |
39 | printf "\n%.0s" {1..2}
40 |
--------------------------------------------------------------------------------
/install-scripts/nvidia.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Nvidia Packages and other nvidia stuff #
4 |
5 | nvidia_pkg=(
6 | akmod-nvidia
7 | xorg-x11-drv-nvidia-cuda
8 | libva
9 | libva-nvidia-driver
10 | )
11 |
12 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
13 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14 |
15 | # Change the working directory to the parent directory of the script
16 | PARENT_DIR="$SCRIPT_DIR/.."
17 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
18 |
19 | # Source the global functions script
20 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
21 | echo "Failed to source Global_functions.sh"
22 | exit 1
23 | fi
24 |
25 |
26 | # Create Directory for Install Logs
27 | if [ ! -d Install-Logs ]; then
28 | mkdir Install-Logs
29 | fi
30 |
31 | # Set the name of the log file to include the current date and time
32 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
33 |
34 |
35 | # Install additional Nvidia packages
36 | printf "${YELLOW} Installing ${SKY_BLUE}Nvidia Packages${RESET}...\n"
37 | for NVIDIA in "${nvidia_pkg[@]}"; do
38 | install_package "$NVIDIA"
39 | done
40 |
41 | printf "${INFO} adding nvidia options to ${YELLOW}/etc/default/grub${RESET} ..."
42 |
43 | # Additional options to add to GRUB_CMDLINE_LINUX
44 | additional_options="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 nvidia_drm.fbdev=1"
45 |
46 | # Check if additional options are already present in GRUB_CMDLINE_LINUX
47 | if grep -q "GRUB_CMDLINE_LINUX.*$additional_options" /etc/default/grub; then
48 | echo "GRUB_CMDLINE_LINUX already contains the additional options" 2>&1 | tee -a "$LOG"
49 | else
50 | # Append the additional options to GRUB_CMDLINE_LINUX
51 | sudo sed -i "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"$additional_options /" /etc/default/grub
52 | echo "Added the additional options to GRUB_CMDLINE_LINUX" 2>&1 | tee -a "$LOG"
53 | fi
54 |
55 | # Update GRUB configuration
56 | sudo grub2-mkconfig -o /boot/grub2/grub.cfg
57 |
58 | echo "${NOTE} Nvidia DRM modeset and additional options have been added to /etc/default/grub. Please reboot for changes to take effect." 2>&1 | tee -a "$LOG"
59 |
60 | printf "\n%.0s" {1..2}
61 |
--------------------------------------------------------------------------------
/install-scripts/rog.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Asus ROG Laptop stuff #
4 |
5 | asusctl=(
6 | asusctl
7 | supergfxctl
8 | asusctl-rog-gui
9 | tuned-ppd
10 | )
11 |
12 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
13 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
14 |
15 | # Change the working directory to the parent directory of the script
16 | PARENT_DIR="$SCRIPT_DIR/.."
17 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
18 |
19 | # Source the global functions script
20 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
21 | echo "Failed to source Global_functions.sh"
22 | exit 1
23 | fi
24 |
25 | # Set the name of the log file to include the current date and time
26 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_rog.log"
27 |
28 | # Adding COPR for ASUS ROG
29 | sudo dnf copr enable -y lukenukem/asus-linux
30 | sudo dnf update
31 |
32 |
33 | ### Install software for Asus ROG laptops ###
34 | printf " Installing ${SKY_BLUE}ASUS ROG packages${RESET}...\n"
35 | for ASUS in "${asusctl[@]}"; do
36 | install_package "$ASUS" "$LOG"
37 | done
38 |
39 | printf " Activating ROG services...\n"
40 | sudo systemctl enable --now supergfxd 2>&1 | tee -a "$LOG"
41 |
42 | printf " enabling tuned (power-profiles-daemon) ...\n"
43 | sudo systemctl enable tuned 2>&1 | tee -a "$LOG"
44 |
45 | printf "\n%.0s" {1..2}
46 |
--------------------------------------------------------------------------------
/install-scripts/sddm.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # SDDM #
4 |
5 | sddm=(
6 | sddm
7 | qt6-qt5compat
8 | qt6-qtdeclarative
9 | qt6-qtsvg
10 | )
11 |
12 | # login managers to attempt to disable
13 | login=(
14 | lightdm
15 | gdm3
16 | gdm
17 | lxdm
18 | lxdm-gtk3
19 | )
20 |
21 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
22 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
23 |
24 | # Change the working directory to the parent directory of the script
25 | PARENT_DIR="$SCRIPT_DIR/.."
26 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
27 |
28 | # Source the global functions script
29 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
30 | echo "Failed to source Global_functions.sh"
31 | exit 1
32 | fi
33 |
34 | # Set the name of the log file to include the current date and time
35 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log"
36 |
37 |
38 | # Installation of additional sddm stuff
39 | printf "\n%s - Installing ${SKY_BLUE}SDDM and dependencies${RESET} .... \n" "${NOTE}"
40 | for PKG2 in "${sddm[@]}"; do
41 | install_package "$PKG2" "$LOG"
42 | done
43 |
44 | # Check if other login managers are installed and disabling their service before enabling sddm
45 | for login_manager in "${login[@]}"; do
46 | if sudo dnf list installed "$login_manager" > /dev/null; then
47 | echo "disabling $login_manager..."
48 | sudo systemctl disable "$login_manager.service" >> "$LOG" 2>&1
49 | echo "$login_manager disabled."
50 | fi
51 | done
52 |
53 | # Double check with systemctl
54 | for manager in "${login[@]}"; do
55 | if systemctl is-active --quiet "$manager" > /dev/null 2>&1; then
56 | echo "$manager is active, disabling it..." >> "$LOG" 2>&1
57 | sudo systemctl disable "$manager" --now >> "$LOG" 2>&1
58 | fi
59 | done
60 |
61 | printf "\n%.0s" {1..1}
62 | printf "${INFO} Activating sddm service........\n"
63 | sudo systemctl set-default graphical.target 2>&1 | tee -a "$LOG"
64 | sudo systemctl enable sddm.service 2>&1 | tee -a "$LOG"
65 |
66 | wayland_sessions_dir=/usr/share/wayland-sessions
67 | [ ! -d "$wayland_sessions_dir" ] && { printf "$CAT - $wayland_sessions_dir not found, creating...\n"; sudo mkdir -p "$wayland_sessions_dir" 2>&1 | tee -a "$LOG"; }
68 | sudo cp assets/hyprland.desktop "$wayland_sessions_dir/" 2>&1 | tee -a "$LOG"
69 |
70 | printf "\n%.0s" {1..2}
71 |
--------------------------------------------------------------------------------
/install-scripts/sddm_theme.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # SDDM themes #
4 |
5 | source_theme="https://codeberg.org/JaKooLit/sddm-sequoia"
6 | theme_name="sequoia_2"
7 |
8 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
9 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
10 |
11 | # Change the working directory to the parent directory of the script
12 | PARENT_DIR="$SCRIPT_DIR/.."
13 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
14 |
15 | # Source the global functions script
16 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
17 | echo "Failed to source Global_functions.sh"
18 | exit 1
19 | fi
20 |
21 | # Set the name of the log file to include the current date and time
22 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm_theme.log"
23 |
24 | # SDDM-themes
25 | printf "${INFO} Installing ${SKY_BLUE}Additional SDDM Theme${RESET}\n"
26 |
27 | # Check if /usr/share/sddm/themes/$theme_name exists and remove if it does
28 | if [ -d "/usr/share/sddm/themes/$theme_name" ]; then
29 | sudo rm -rf "/usr/share/sddm/themes/$theme_name"
30 | echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory." 2>&1 | tee -a "$LOG"
31 | fi
32 |
33 | # Check if $theme_name directory exists in the current directory and remove if it does
34 | if [ -d "$theme_name" ]; then
35 | rm -rf "$theme_name"
36 | echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory from the current location." 2>&1 | tee -a "$LOG"
37 | fi
38 |
39 | # Clone the repository
40 | if git clone --depth=1 "$source_theme" "$theme_name"; then
41 | if [ ! -d "$theme_name" ]; then
42 | echo "${ERROR} Failed to clone the repository." | tee -a "$LOG"
43 | fi
44 |
45 | # Create themes directory if it doesn't exist
46 | if [ ! -d "/usr/share/sddm/themes" ]; then
47 | sudo mkdir -p /usr/share/sddm/themes
48 | echo "${OK} - Directory '/usr/share/sddm/themes' created." | tee -a "$LOG"
49 | fi
50 |
51 | # Move cloned theme to the themes directory
52 | sudo mv "$theme_name" "/usr/share/sddm/themes/$theme_name" 2>&1 | tee -a "$LOG"
53 |
54 | # setting up SDDM theme
55 | sddm_conf_dir="/etc/sddm.conf.d"
56 | BACKUP_SUFFIX=".bak"
57 |
58 | echo -e "${NOTE} Setting up the login screen." | tee -a "$LOG"
59 |
60 | if [ -d "$sddm_conf_dir" ]; then
61 | echo "Backing up files in $sddm_conf_dir" | tee -a "$LOG"
62 | for file in "$sddm_conf_dir"/*; do
63 | if [ -f "$file" ]; then
64 | if [[ "$file" == *$BACKUP_SUFFIX ]]; then
65 | echo "Skipping backup file: $file" | tee -a "$LOG"
66 | continue
67 | fi
68 | # Backup each original file
69 | sudo cp "$file" "$file$BACKUP_SUFFIX" 2>&1 | tee -a "$LOG"
70 | echo "Backup created for $file" | tee -a "$LOG"
71 |
72 | # Edit existing "Current="
73 | if grep -q '^[[:space:]]*Current=' "$file"; then
74 | sudo sed -i "s/^[[:space:]]*Current=.*/Current=$theme_name/" "$file" 2>&1 | tee -a "$LOG"
75 | echo "Updated theme in $file" | tee -a "$LOG"
76 | fi
77 | fi
78 | done
79 | else
80 | echo "$CAT - $sddm_conf_dir not found, creating..." | tee -a "$LOG"
81 | sudo mkdir -p "$sddm_conf_dir" 2>&1 | tee -a "$LOG"
82 | fi
83 |
84 | if [ ! -f "$sddm_conf_dir/theme.conf.user" ]; then
85 | echo -e "[Theme]\nCurrent = $theme_name" | sudo tee "$sddm_conf_dir/theme.conf.user" > /dev/null
86 |
87 | if [ -f "$sddm_conf_dir/theme.conf.user" ]; then
88 | echo "Created and configured $sddm_conf_dir/theme.conf.user with theme $theme_name" | tee -a "$LOG"
89 | else
90 | echo "Failed to create $sddm_conf_dir/theme.conf.user" | tee -a "$LOG"
91 | fi
92 | else
93 | echo "$sddm_conf_dir/theme.conf.user already exists, skipping creation." | tee -a "$LOG"
94 | fi
95 |
96 |
97 | # Replace current background from assets
98 | sudo cp -r assets/sddm.png "/usr/share/sddm/themes/$theme_name/backgrounds/default" 2>&1 | tee -a "$LOG"
99 | sudo sed -i 's|^wallpaper=".*"|wallpaper="backgrounds/default"|' "/usr/share/sddm/themes/$theme_name/theme.conf" 2>&1 | tee -a "$LOG"
100 |
101 | printf "\n%.0s" {1..1}
102 | printf "${NOTE} copying ${YELLOW}JetBrains Mono Nerd Font${RESET} to ${YELLOW}/usr/local/share/fonts${RESET} .......\n"
103 | printf "${NOTE} necessary for the new SDDM theme to work properly........\n"
104 |
105 | sudo mkdir -p /usr/local/share/fonts/JetBrainsMonoNerd && \
106 | sudo cp -r "$HOME/.local/share/fonts/JetBrainsMonoNerd" /usr/local/share/fonts/JetBrainsMonoNerd
107 |
108 | if [ $? -eq 0 ]; then
109 | echo "Fonts copied successfully."
110 | else
111 | echo "Failed to copy fonts."
112 | fi
113 |
114 | # Update font cache and log the output
115 | fc-cache -v -f 2>&1 | tee -a "$LOG"
116 |
117 | printf "\n%.0s" {1..1}
118 |
119 |
120 | echo "${OK} - ${MAGENTA}Additional SDDM Theme${RESET} successfully installed." | tee -a "$LOG"
121 |
122 | else
123 |
124 | echo "${ERROR} - Failed to clone the sddm theme repository. Please check your internet connection." | tee -a "$LOG" >&2
125 | fi
126 |
127 |
128 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/thunar.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Thunar and recommended additions #
4 |
5 | thunar=(
6 | ffmpegthumbnailer
7 | Thunar
8 | thunar-volman
9 | tumbler
10 | thunar-archive-plugin
11 | xarchiver
12 | )
13 |
14 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
15 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
16 |
17 | # Change the working directory to the parent directory of the script
18 | PARENT_DIR="$SCRIPT_DIR/.."
19 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
20 |
21 | # Source the global functions script
22 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
23 | echo "Failed to source Global_functions.sh"
24 | exit 1
25 | fi
26 |
27 | # Set the name of the log file to include the current date and time
28 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
29 |
30 | # Thunar
31 | printf "${NOTE} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n\n"
32 | for THUNAR in "${thunar[@]}"; do
33 | install_package "$THUNAR" "$LOG"
34 | done
35 |
36 | printf "\n%.0s" {1..1}
37 |
38 | # Check for existing configs and copy if does not exist
39 | for DIR1 in gtk-3.0 Thunar xfce4; do
40 | DIRPATH=~/.config/$DIR1
41 | if [ -d "$DIRPATH" ]; then
42 | echo -e "${NOTE} Config for ${MAGENTA}$DIR1${RESET} found, no need to copy." 2>&1 | tee -a "$LOG"
43 | else
44 | echo -e "${NOTE} Config for ${YELLOW}$DIR1${RESET} not found, copying from assets." 2>&1 | tee -a "$LOG"
45 | cp -r assets/$DIR1 ~/.config/ && echo "${OK} Copy $DIR1 completed!" || echo "${ERROR} Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG"
46 | fi
47 | done
48 |
49 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/thunar_default.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # Thunar-default #
4 |
5 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
6 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 |
8 | # Change the working directory to the parent directory of the script
9 | PARENT_DIR="$SCRIPT_DIR/.."
10 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
11 |
12 | # Source the global functions script
13 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
14 | echo "Failed to source Global_functions.sh"
15 | exit 1
16 | fi
17 |
18 | # Set the name of the log file to include the current date and time
19 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar-default.log"
20 |
21 | printf "${INFO} Setting ${SKY_BLUE}Thunar${RESET} as default file manager...\n"
22 |
23 | xdg-mime default thunar.desktop inode/directory
24 | xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search
25 | echo "${OK} ${MAGENTA}Thunar${RESET} is now set as the default file manager." | tee -a "$LOG"
26 |
27 | printf "\n%.0s" {1..2}
28 |
--------------------------------------------------------------------------------
/install-scripts/xdph.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # XDG-Desktop-Portals #
4 |
5 | xdg=(
6 | xdg-desktop-portal-hyprland
7 | xdg-desktop-portal-gtk
8 | )
9 |
10 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
11 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
12 |
13 | # Change the working directory to the parent directory of the script
14 | PARENT_DIR="$SCRIPT_DIR/.."
15 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
16 |
17 | # Source the global functions script
18 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
19 | echo "Failed to source Global_functions.sh"
20 | exit 1
21 | fi
22 |
23 | # Set the name of the log file to include the current date and time
24 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
25 |
26 | # XDG-DESKTOP-PORTAL-HYPRLAND
27 | printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n\n"
28 | for xdgs in "${xdg[@]}"; do
29 | install_package "$xdgs" "$LOG"
30 | done
31 |
32 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/install-scripts/zsh.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # ZSH and oh-my-zsh #
4 |
5 | zsh=(
6 | lsd
7 | fzf
8 | mercurial
9 | zsh
10 | util-linux
11 | )
12 |
13 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
14 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 |
16 | # Change the working directory to the parent directory of the script
17 | PARENT_DIR="$SCRIPT_DIR/.."
18 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
19 |
20 | # Source the global functions script
21 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
22 | echo "Failed to source Global_functions.sh"
23 | exit 1
24 | fi
25 |
26 | # Set the name of the log file to include the current date and time
27 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log"
28 |
29 | # Check if the log file already exists, if yes, append a counter to make it unique
30 | COUNTER=1
31 | while [ -f "$LOG" ]; do
32 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_${COUNTER}_zsh.log"
33 | ((COUNTER++))
34 | done
35 |
36 | # Installing zsh packages
37 | printf "${NOTE} Installing core zsh packages...${RESET}\n"
38 | for ZSHP in "${zsh[@]}"; do
39 | install_package "$ZSHP"
40 | done
41 |
42 | printf "\n%.0s" {1..1}
43 |
44 | # Install Oh My Zsh, plugins, and set zsh as default shell
45 | if command -v zsh >/dev/null; then
46 | printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n"
47 | if [ ! -d "$HOME/.oh-my-zsh" ]; then
48 | sh -c "$(curl -fsSL https://install.ohmyz.sh)" "" --unattended
49 | else
50 | echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
51 | fi
52 |
53 | # Check if the directories exist before cloning the repositories
54 | if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
55 | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
56 | else
57 | echo "${INFO} Directory zsh-autosuggestions already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
58 | fi
59 |
60 | if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
61 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
62 | else
63 | echo "${INFO} Directory zsh-syntax-highlighting already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
64 | fi
65 |
66 | # Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
67 | if [ -f "$HOME/.zshrc" ]; then
68 | cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
69 | fi
70 |
71 | if [ -f "$HOME/.zprofile" ]; then
72 | cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
73 | fi
74 |
75 | # Copying the preconfigured zsh themes and profile
76 | cp -r 'assets/.zshrc' ~/
77 | cp -r 'assets/.zprofile' ~/
78 |
79 | # Check if the current shell is zsh
80 | current_shell=$(basename "$SHELL")
81 | if [ "$current_shell" != "zsh" ]; then
82 | printf "${NOTE} Changing default shell to ${MAGENTA}zsh${RESET}..."
83 | printf "\n%.0s" {1..2}
84 |
85 | # Loop to ensure the chsh command succeeds
86 | while ! chsh -s "$(command -v zsh)"; do
87 | echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
88 | sleep 1
89 | done
90 |
91 | printf "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
92 | else
93 | echo "${NOTE} Your shell is already set to ${MAGENTA}zsh${RESET}."
94 | fi
95 |
96 | fi
97 |
98 | # copy additional oh-my-zsh themes from assets
99 | if [ -d "$HOME/.oh-my-zsh/themes" ]; then
100 | cp -r assets/add_zsh_theme/* ~/.oh-my-zsh/themes >> "$LOG" 2>&1
101 | fi
102 |
103 | printf "\n%.0s" {1..2}
104 |
105 |
--------------------------------------------------------------------------------
/install-scripts/zsh_pokemon.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # pokemon-color-scripts#
4 |
5 | ## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
6 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
7 |
8 | # Change the working directory to the parent directory of the script
9 | PARENT_DIR="$SCRIPT_DIR/.."
10 | cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
11 |
12 | # Source the global functions script
13 | if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
14 | echo "Failed to source Global_functions.sh"
15 | exit 1
16 | fi
17 |
18 | # Set the name of the log file to include the current date and time
19 | LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh_pokemon.log"
20 |
21 | printf "${INFO} Installing ${SKY_BLUE}Pokemon color scripts${RESET} ..."
22 |
23 | if [ -d "pokemon-colorscripts" ]; then
24 | cd pokemon-colorscripts && git pull && sudo ./install.sh && cd ..
25 | else
26 | git clone --depth=1 https://gitlab.com/phoneybadger/pokemon-colorscripts.git &&
27 | cd pokemon-colorscripts && sudo ./install.sh && cd ..
28 | fi
29 |
30 | # Check if ~/.zshrc exists
31 | if [ -f "$HOME/.zshrc" ]; then
32 | sed -i 's|^#pokemon-colorscripts --no-title -s -r \| fastfetch -c \$HOME/.config/fastfetch/config-pokemon.jsonc --logo-type file-raw --logo-height 10 --logo-width 5 --logo -|pokemon-colorscripts --no-title -s -r \| fastfetch -c \$HOME/.config/fastfetch/config-pokemon.jsonc --logo-type file-raw --logo-height 10 --logo-width 5 --logo -|' "$HOME/.zshrc" >> "$LOG" 2>&1
33 | sed -i "s|^fastfetch -c \$HOME/.config/fastfetch/config-compact.jsonc|#fastfetch -c \$HOME/.config/fastfetch/config-compact.jsonc|" "$HOME/.zshrc" >> "$LOG" 2>&1
34 | else
35 | echo "$HOME/.zshrc not found. Cant enable ${YELLOW}Pokemon color scripts${RESET}" >> "$LOG" 2>&1
36 | fi
37 |
38 | printf "\n%.0s" {1..2}
39 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # https://github.com/JaKooLit
3 |
4 | clear
5 |
6 | # Set some colors for output messages
7 | OK="$(tput setaf 2)[OK]$(tput sgr0)"
8 | ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
9 | NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
10 | INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
11 | WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
12 | CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
13 | MAGENTA="$(tput setaf 5)"
14 | ORANGE="$(tput setaf 214)"
15 | WARNING="$(tput setaf 1)"
16 | YELLOW="$(tput setaf 3)"
17 | GREEN="$(tput setaf 2)"
18 | BLUE="$(tput setaf 4)"
19 | SKY_BLUE="$(tput setaf 6)"
20 | RESET="$(tput sgr0)"
21 |
22 | # Create Directory for Install Logs
23 | if [ ! -d Install-Logs ]; then
24 | mkdir Install-Logs
25 | fi
26 |
27 | # Set the name of the log file to include the current date and time
28 | LOG="Install-Logs/01-Hyprland-Install-Scripts-$(date +%d-%H%M%S).log"
29 |
30 | # Check if running as root. If root, script will exit
31 | if [[ $EUID -eq 0 ]]; then
32 | echo "${ERROR} This script should ${WARNING}NOT${RESET} be executed as root!! Exiting......." | tee -a "$LOG"
33 | printf "\n%.0s" {1..2}
34 | exit 1
35 | fi
36 |
37 | # install whiptails if detected not installed. Necessary for this version
38 | if ! command -v whiptail >/dev/null; then
39 | echo "${NOTE} - whiptail is not installed. Installing..." | tee -a "$LOG"
40 | sudo dnf install -y newt
41 | printf "\n%.0s" {1..1}
42 | fi
43 |
44 | clear
45 |
46 | printf "\n%.0s" {1..2}
47 | echo -e "\e[35m
48 | ╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
49 | ╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ 2025
50 | ╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘ Fedora Linux
51 | \e[0m"
52 | printf "\n%.0s" {1..1}
53 |
54 | # Welcome message using whiptail (for displaying information)
55 | whiptail --title "KooL Fedora-Hyprland (2025) Install Script" \
56 | --msgbox "Welcome to KooL Fedora-Hyprland (2025) Install Script!!!\n\n\
57 | ATTENTION: Run a full system update and Reboot first !!! (Highly Recommended)\n\n\
58 | NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland may NOT start!" \
59 | 15 80
60 |
61 | # Ask if the user wants to proceed
62 | if ! whiptail --title "Proceed with Installation?" \
63 | --yesno "Would you like to proceed?" 7 50; then
64 | echo -e "\n"
65 | echo "❌ ${INFO} You 🫵 chose ${YELLOW}NOT${RESET} to proceed. ${YELLOW}Exiting...${RESET}" | tee -a "$LOG"
66 | echo -e "\n"
67 | exit 1
68 | fi
69 |
70 | echo "👌 ${OK} 🇵🇭 ${MAGENTA}KooL..${RESET} ${SKY_BLUE}lets continue with the installation...${RESET}" | tee -a "$LOG"
71 |
72 | sleep 1
73 | printf "\n%.0s" {1..1}
74 |
75 | # install pciutils if detected not installed. Necessary for detecting GPU
76 | if ! rpm -q pciutils > /dev/null; then
77 | echo "pciutils is not installed. Installing..." | tee -a "$LOG"
78 | sudo dnf install -y pciutils
79 | printf "\n%.0s" {1..1}
80 | fi
81 |
82 | # Path to the install-scripts directory
83 | script_directory=install-scripts
84 |
85 | # Function to execute a script if it exists and make it executable
86 | execute_script() {
87 | local script="$1"
88 | local script_path="$script_directory/$script"
89 | if [ -f "$script_path" ]; then
90 | chmod +x "$script_path"
91 | if [ -x "$script_path" ]; then
92 | env "$script_path"
93 | else
94 | echo "Failed to make script '$script' executable." | tee -a "$LOG"
95 | fi
96 | else
97 | echo "Script '$script' not found in '$script_directory'." | tee -a "$LOG"
98 | fi
99 | }
100 |
101 | #################
102 | ## Default values for the options (will be overwritten by preset file if available)
103 | gtk_themes="OFF"
104 | bluetooth="OFF"
105 | thunar="OFF"
106 | ags="OFF"
107 | sddm="OFF"
108 | sddm_theme="OFF"
109 | xdph="OFF"
110 | zsh="OFF"
111 | pokemon="OFF"
112 | rog="OFF"
113 | dots="OFF"
114 | input_group="OFF"
115 | nvidia="OFF"
116 |
117 | # Function to load preset file
118 | load_preset() {
119 | if [ -f "$1" ]; then
120 | echo "✅ Loading preset: $1"
121 | source "$1"
122 | else
123 | echo "⚠️ Preset file not found: $1. Using default values."
124 | fi
125 | }
126 |
127 | # Check if --preset argument is passed
128 | if [[ "$1" == "--preset" && -n "$2" ]]; then
129 | load_preset "$2"
130 | fi
131 |
132 | # List of services to check for active login managers
133 | services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service")
134 |
135 | # Function to check if any login services are active
136 | check_services_running() {
137 | active_services=() # Array to store active services
138 | for svc in "${services[@]}"; do
139 | if systemctl is-active --quiet "$svc"; then
140 | active_services+=("$svc")
141 | fi
142 | done
143 |
144 | if [ ${#active_services[@]} -gt 0 ]; then
145 | return 0
146 | else
147 | return 1
148 | fi
149 | }
150 |
151 | if check_services_running; then
152 | active_list=$(printf "%s\n" "${active_services[@]}")
153 |
154 | # Display the active login manager(s) in the whiptail message box
155 | whiptail --title "Active non-SDDM login manager(s) detected" \
156 | --msgbox "The following login manager(s) are active:\n\n$active_list\n\nIf you want to install SDDM and SDDM theme, stop and disable the active services above, reboot before running this script\n\nYour option to install SDDM and SDDM theme has now been removed\n\n- Ja " 23 80
157 | fi
158 |
159 | # Check if NVIDIA GPU is detected
160 | nvidia_detected=false
161 | if lspci | grep -i "nvidia" &> /dev/null; then
162 | nvidia_detected=true
163 | whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install akmod-nvidia, xorg-x11-drv-nvidia-cuda, etc if you choose to configure." 12 60
164 | fi
165 |
166 | # Initialize the options array for whiptail checklist
167 | options_command=(
168 | whiptail --title "Select Options" --checklist "Choose options to install or configure\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 28 85 20
169 | )
170 |
171 | # Add NVIDIA options if detected
172 | if [ "$nvidia_detected" == "true" ]; then
173 | options_command+=(
174 | "nvidia" "Do you want script to configure NVIDIA GPU?" "OFF"
175 | )
176 | fi
177 |
178 | # Check if user is already in the 'input' group
179 | input_group_detected=false
180 | if ! groups "$(whoami)" | grep -q '\binput\b'; then
181 | input_group_detected=true
182 | whiptail --title "Input Group" --msgbox "You are not currently in the input group.\n\nAdding you to the input group might be necessary for the Waybar keyboard-state functionality." 12 60
183 | fi
184 |
185 | # Add 'input_group' option if necessary
186 | if [ "$input_group_detected" == "true" ]; then
187 | options_command+=(
188 | "input_group" "Add your USER to input group for some waybar functionality?" "OFF"
189 | )
190 | fi
191 |
192 | # Conditionally add SDDM and SDDM theme options if no active login manager is found
193 | if ! check_services_running; then
194 | options_command+=(
195 | "sddm" "Install & configure SDDM login manager?" "OFF"
196 | "sddm_theme" "Download & Install Additional SDDM theme?" "OFF"
197 | )
198 | fi
199 |
200 | # Add the remaining static options
201 | options_command+=(
202 | "gtk_themes" "Install GTK themes (required for Dark/Light function)" "OFF"
203 | "bluetooth" "Do you want script to configure Bluetooth?" "OFF"
204 | "thunar" "Do you want Thunar file manager to be installed?" "OFF"
205 | "ags" "Install AGS v1 for Desktop-Like Overview" "OFF"
206 | "xdph" "Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?" "OFF"
207 | "zsh" "Install zsh shell with Oh-My-Zsh?" "OFF"
208 | "pokemon" "Add Pokemon color scripts to your terminal?" "OFF"
209 | "rog" "Are you installing on Asus ROG laptops?" "OFF"
210 | "dots" "Download and install pre-configured KooL Hyprland dotfiles?" "OFF"
211 | )
212 |
213 | # Capture the selected options before the while loop starts
214 | while true; do
215 | selected_options=$("${options_command[@]}" 3>&1 1>&2 2>&3)
216 |
217 | # Check if the user pressed Cancel (exit status 1)
218 | if [ $? -ne 0 ]; then
219 | echo -e "\n"
220 | echo "❌ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG"
221 | exit 0 # Exit the script if Cancel is pressed
222 | fi
223 |
224 | # If no option was selected, notify and restart the selection
225 | if [ -z "$selected_options" ]; then
226 | whiptail --title "Warning" --msgbox "No options were selected. Please select at least one option." 10 60
227 | continue # Return to selection if no options selected
228 | fi
229 |
230 | # Strip the quotes and trim spaces if necessary (sanitize the input)
231 | selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ')
232 |
233 | # Convert selected options into an array (preserving spaces in values)
234 | IFS=' ' read -r -a options <<< "$selected_options"
235 |
236 | # Check if the "dots" option was selected
237 | dots_selected="OFF"
238 | for option in "${options[@]}"; do
239 | if [[ "$option" == "dots" ]]; then
240 | dots_selected="ON"
241 | break
242 | fi
243 | done
244 |
245 | # If "dots" is not selected, show a note and ask the user to proceed or return to choices
246 | if [[ "$dots_selected" == "OFF" ]]; then
247 | # Show a note about not selecting the "dots" option
248 | if ! whiptail --title "KooL Hyprland Dot Files" --yesno \
249 | "You have not selected to install the pre-configured KooL Hyprland dotfiles.\n\nKindly NOTE that if you proceed without Dots, Hyprland will start with default vanilla Hyprland configuration and I won't be able to give you support.\n\nWould you like to continue install without KooL Hyprland Dots or return to choices/options?" \
250 | --yes-button "Continue" --no-button "Return" 15 90; then
251 | echo "🔙 Returning to options..." | tee -a "$LOG"
252 | continue
253 | else
254 | # User chose to continue
255 | echo "${INFO} ⚠️ Continuing WITHOUT the dotfiles installation..." | tee -a "$LOG"
256 | printf "\n%.0s" {1..1}
257 | fi
258 | fi
259 |
260 | # Prepare the confirmation message
261 | confirm_message="You have selected the following options:\n\n"
262 | for option in "${options[@]}"; do
263 | confirm_message+=" - $option\n"
264 | done
265 | confirm_message+="\nAre you happy with these choices?"
266 |
267 | # Confirmation prompt
268 | if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 25 80; then
269 | echo -e "\n"
270 | echo "❌ ${SKY_BLUE}You're not 🫵 happy${RESET}. ${YELLOW}Returning to options...${RESET}" | tee -a "$LOG"
271 | continue
272 | fi
273 |
274 | echo "👌 ${OK} You confirmed your choices. Proceeding with ${SKY_BLUE}KooL 🇵🇭 Hyprland Installation...${RESET}" | tee -a "$LOG"
275 | break
276 | done
277 |
278 | printf "\n%.0s" {1..1}
279 |
280 | echo "${INFO} Adding ${SKY_BLUE}some COPR repos...${RESET}" | tee -a "$LOG"
281 | sleep 1
282 | execute_script "copr.sh"
283 |
284 | echo "${INFO} Installing ${SKY_BLUE}necessary dependencies...${RESET}" | tee -a "$LOG"
285 | sleep 1
286 | execute_script "00-hypr-pkgs.sh"
287 |
288 | echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG"
289 | sleep 1
290 | execute_script "fonts.sh"
291 |
292 | echo "${INFO} Installing ${SKY_BLUE}Hyprland...${RESET}" | tee -a "$LOG"
293 | sleep 1
294 | execute_script "hyprland.sh"
295 |
296 | # Clean up the selected options (remove quotes and trim spaces)
297 | selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ')
298 |
299 | # Convert selected options into an array (splitting by spaces)
300 | IFS=' ' read -r -a options <<< "$selected_options"
301 |
302 | # Loop through selected options
303 | for option in "${options[@]}"; do
304 | case "$option" in
305 | sddm)
306 | if check_services_running; then
307 | active_list=$(printf "%s\n" "${active_services[@]}")
308 | whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60
309 | exec "$0"
310 | else
311 | echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG"
312 | execute_script "sddm.sh"
313 | fi
314 | ;;
315 | nvidia)
316 | echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG"
317 | execute_script "nvidia.sh"
318 | ;;
319 | gtk_themes)
320 | echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG"
321 | execute_script "gtk_themes.sh"
322 | ;;
323 | input_group)
324 | echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG"
325 | execute_script "InputGroup.sh"
326 | ;;
327 | ags)
328 | echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG"
329 | execute_script "ags.sh"
330 | ;;
331 | xdph)
332 | echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG"
333 | execute_script "xdph.sh"
334 | ;;
335 | bluetooth)
336 | echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG"
337 | execute_script "bluetooth.sh"
338 | ;;
339 | thunar)
340 | echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG"
341 | execute_script "thunar.sh"
342 | execute_script "thunar_default.sh"
343 | ;;
344 | sddm_theme)
345 | echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG"
346 | execute_script "sddm_theme.sh"
347 | ;;
348 | zsh)
349 | echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG"
350 | execute_script "zsh.sh"
351 | ;;
352 | pokemon)
353 | echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG"
354 | execute_script "zsh_pokemon.sh"
355 | ;;
356 | rog)
357 | echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG"
358 | execute_script "rog.sh"
359 | ;;
360 | dots)
361 | echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG"
362 | execute_script "dotfiles-main.sh"
363 | ;;
364 | *)
365 | echo "Unknown option: $option" | tee -a "$LOG"
366 | ;;
367 | esac
368 | done
369 |
370 | # Perform cleanup
371 | printf "\n${OK} Performing some clean up.\n"
372 | files_to_delete=("JetBrainsMono.tar.xz" "VictorMonoAll.zip" "FantasqueSansMono.zip")
373 | for file in "${files_to_delete[@]}"; do
374 | if [ -e "$file" ]; then
375 | echo "$file found. Deleting..." | tee -a "$LOG"
376 | rm "$file"
377 | echo "$file deleted successfully." | tee -a "$LOG"
378 | fi
379 | done
380 |
381 | clear
382 |
383 | # copy fastfetch config if fedora is not present
384 | if [ ! -f "$HOME/.config/fastfetch/fedora.png" ]; then
385 | cp -r assets/fastfetch "$HOME/.config/"
386 | fi
387 |
388 |
389 | # final check essential packages if it is installed
390 | execute_script "02-Final-Check.sh"
391 |
392 | printf "\n%.0s" {1..1}
393 |
394 | # Check if hyprland or hyprland-git is installed
395 | if rpm -q hyprland &> /dev/null || rpm -q hyprland-git &> /dev/null; then
396 | printf "\n ${OK} 👌 Hyprland is installed. However, some essential packages may not be installed. Please see above!"
397 | printf "\n${CAT} Ignore this message if it states ${YELLOW}All essential packages${RESET} are installed as per above\n"
398 | sleep 2
399 | printf "\n%.0s" {1..2}
400 |
401 | printf "${SKY_BLUE}Thank you${RESET} 🫰 for using 🇵🇭 ${MAGENTA}KooL's Hyprland Dots${RESET}. ${YELLOW}Enjoy and Have a good day!${RESET}"
402 | printf "\n%.0s" {1..2}
403 |
404 | printf "\n${NOTE} You can start Hyprland by typing ${SKY_BLUE}Hyprland${RESET} (IF SDDM is not installed) (note the capital H!).\n"
405 | printf "\n${NOTE} However, it is ${YELLOW}highly recommended to reboot${RESET} your system.\n\n"
406 |
407 | while true; do
408 | echo -n "${CAT} Would you like to reboot now? (y/n): "
409 | read HYP
410 | HYP=$(echo "$HYP" | tr '[:upper:]' '[:lower:]')
411 |
412 | if [[ "$HYP" == "y" || "$HYP" == "yes" ]]; then
413 | echo "${INFO} Rebooting now..."
414 | systemctl reboot
415 | break
416 | elif [[ "$HYP" == "n" || "$HYP" == "no" ]]; then
417 | echo "👌 ${OK} You chose NOT to reboot"
418 | printf "\n%.0s" {1..1}
419 | # Check if NVIDIA GPU is present
420 | if lspci | grep -i "nvidia" &> /dev/null; then
421 | echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..."
422 | printf "\n%.0s" {1..1}
423 | fi
424 | break
425 | else
426 | echo "${WARN} Invalid response. Please answer with 'y' or 'n'."
427 | fi
428 | done
429 | else
430 | # Print error message if neither package is installed
431 | printf "\n${WARN} Hyprland is NOT installed. Please check 00_CHECK-time_installed.log and other files in the Install-Logs/ directory..."
432 | printf "\n%.0s" {1..3}
433 | exit 1
434 | fi
435 |
436 | printf "\n%.0s" {1..2}
--------------------------------------------------------------------------------
/preset.sh:
--------------------------------------------------------------------------------
1 | # 💫 https://github.com/JaKooLit 💫 #
2 |
3 | # Define the options you want to preselect (either ON or OFF)
4 | # IMPORTANT: answer should be inside ""
5 |
6 | ### Script will install nvidia-dkms nvidia-utils & nvidia-settings
7 | ###-Would you like script to Configure NVIDIA for you?
8 | nvidia="OFF"
9 |
10 | ###-Install GTK themes (required for Dark/Light function)?
11 | gtk_themes="ON"
12 |
13 | ###-Do you want to configure Bluetooth?
14 | bluetooth="ON"
15 |
16 | ###-Do you want to install Thunar file manager?
17 | thunar="ON"
18 |
19 | ### Adding user to the 'input' group might be necessary for waybar keyboard-state functionality
20 | input_group="ON"
21 |
22 | ### Desktop overview Demo Link in README
23 | ### Desktop overview Demo Link in README
24 | ### Install AGS (aylur's GTK shell) v1 for Desktop-Like Overview?"
25 | ags="ON"
26 |
27 | ###-Install & configure SDDM log-in Manager
28 | sddm="ON"
29 | ### install and download SDDM themes
30 | sddm_theme="ON"
31 |
32 | ###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)
33 | xdph="ON"
34 |
35 | ### Shell extension. Bash alternative
36 | ###-Install zsh, oh-my-zsh
37 | zsh="ON"
38 | ### add Pokemon color scripts to terminal
39 | pokemon="ON"
40 |
41 | ### This will install ASUSCTL & SUPERGFXCTL
42 | ###-Installing on Asus ROG Laptops?
43 | rog="OFF"
44 |
45 | ###-Download and Add pre-configured Hyprland dotfiles?
46 | dots="ON"
47 |
--------------------------------------------------------------------------------
/uninstall-old.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Exit immediately if a command exits with a non-zero status
4 | set -e
5 |
6 | # Colors
7 | RED='\033[0;31m'
8 | GREEN='\033[0;32m'
9 | YELLOW='\033[1;33m'
10 | BLUE='\033[0;34m'
11 | MAGENTA='\033[0;35m'
12 | CYAN='\033[0;36m'
13 | CLEAR='\033[0m'
14 |
15 | # Function to print colorful text
16 | print_color() {
17 | printf "%b%s%b\n" "$1" "$2" "$CLEAR"
18 | }
19 |
20 | # Function to print centered text
21 | print_centered() {
22 | local text="$1"
23 | local color="$2"
24 | local width=$(tput cols)
25 | local padding=$(( (width - ${#text}) / 2 ))
26 | printf "%b%*s%s%*s%b\n" "$color" $padding "" "$text" $padding "" "$CLEAR"
27 | }
28 |
29 | # Function to safely remove packages
30 | safe_remove() {
31 | for package in "$@"; do
32 | if rpm -q "$package" &> /dev/null; then
33 | sudo dnf remove -y "$package"
34 | else
35 | print_color $YELLOW "Package $package is not installed, skipping."
36 | fi
37 | done
38 | }
39 |
40 | # Function to safely remove COPR repositories
41 | safe_remove_copr() {
42 | for repo in "$@"; do
43 | if sudo dnf copr list | grep -q "$repo"; then
44 | sudo dnf copr remove -y "$repo"
45 | else
46 | print_color $YELLOW "COPR repository $repo is not enabled, skipping."
47 | fi
48 | done
49 | }
50 |
51 | # Function to safely remove directories and files
52 | safe_remove_item() {
53 | local item="$1"
54 | if [ -e "$item" ]; then
55 | rm -rf "$item"
56 | print_color $GREEN "Removed: $item"
57 | else
58 | print_color $YELLOW "Item $item does not exist, skipping."
59 | fi
60 | }
61 |
62 | # Function to ask user before removing an item
63 | ask_before_remove() {
64 | local item="$1"
65 | read -p "Do you want to remove $item? (y/n): " choice
66 | case "$choice" in
67 | y|Y ) safe_remove_item "$item";;
68 | n|N ) print_color $YELLOW "Keeping $item";;
69 | * ) print_color $YELLOW "Invalid input. Keeping $item";;
70 | esac
71 | }
72 |
73 | # Print banner
74 | print_color $MAGENTA "UNINSTALL HYPRLAND"
75 |
76 | print_centered "Made with ♥ by vdcds" $CYAN
77 |
78 | # Warning message
79 | print_color $RED "
80 | █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
81 | █ █
82 | █ ╔═╗╔╦╗╔═╗╔═╗ ┬ █
83 | █ ╚═╗ ║ ║ ║╠═╝ │ █
84 | █ ╚═╝ ╩ ╚═╝╩ o █
85 | █ █
86 | █ ╔═╗╔╗╔╔╦╗ ╦═╗╔═╗╔═╗╔╦╗ █
87 | █ ╠═╣║║║ ║║ ╠╦╝║╣ ╠═╣ ║║ █
88 | █ ╩ ╩╝╚╝═╩╝ ╩╚═╚═╝╩ ╩═╩╝ █
89 | █ █
90 | █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
91 |
92 | !!! IMPORTANT WARNING !!!
93 |
94 | This script will UNINSTALL Hyprland and related components.
95 |
96 | • All Hyprland configurations will be DELETED
97 | • Related packages will be REMOVED
98 | • This action is IRREVERSIBLE
99 |
100 | BEFORE PROCEEDING:
101 | 1. Ensure you have a BACKUP of any important configurations
102 | 2. Close all running applications
103 | 3. Be prepared for potential system changes
104 |
105 | If you're unsure about any aspect of this process,
106 | please STOP now and seek additional information.
107 | "
108 |
109 | # Confirmation to proceed
110 | print_color $YELLOW "Are you ABSOLUTELY SURE you want to proceed with the uninstallation?"
111 | read -p "Type 'yes' to continue or any other key to cancel: " confirm
112 | if [[ $confirm != "yes" ]]; then
113 | print_color $GREEN "Uninstallation cancelled. No changes were made to your system."
114 | exit 1
115 | fi
116 |
117 | # Main uninstallation process
118 | print_color $BLUE "Starting Hyprland uninstallation process..."
119 |
120 | # Uninstall Hyprland and related packages
121 | print_color $YELLOW "Removing Hyprland and related packages..."
122 | safe_remove hyprland hyprcursor waybar kvantum polkit-gnome swappy SwayNotificationCenter wlogout kitty rofi-wayland aylurs-gtk-shell cliphist hypridle hyprlock pamixer pyprland swww
123 |
124 | # Remove COPR repositories
125 | print_color $YELLOW "Removing COPR repositories..."
126 | safe_remove_copr solopasha/hyprland erikreider/SwayNotificationCenter
127 |
128 | # Remove additional components
129 | print_color $YELLOW "Removing additional components..."
130 | safe_remove blueman thunar thunar-archive-plugin thunar-media-tags-plugin thunar-volman sddm xdg-desktop-portal-hyprland
131 |
132 | # Ask before removing zsh and related packages
133 | ask_before_remove zsh
134 | ask_before_remove util-linux-user
135 | ask_before_remove pokemon-colorscripts-git
136 |
137 | # Remove ROG-related packages
138 | safe_remove asusctl supergfxctl
139 |
140 | # Remove fonts
141 | print_color $YELLOW "Removing fonts..."
142 | safe_remove 'jetbrains-mono-fonts*' 'fira-code-fonts*'
143 |
144 | # Remove configuration files
145 | print_color $YELLOW "Removing configuration files..."
146 | config_items=(
147 | ~/.config/ags
148 | ~/.config/hypr
149 | ~/.config/waybar
150 | ~/.config/wofi
151 | ~/.config/dunst
152 | ~/.config/swappy
153 | ~/.config/wlogout
154 | ~/.config/kitty
155 | ~/.config/rofi
156 | ~/.config/gtk-3.0
157 | ~/.config/gtk-4.0
158 | ~/.config/xdg-desktop-portal-hyprland
159 | ~/.config/btop
160 | ~/.config/cava
161 | ~/.config/Thunar
162 | ~/.config/xfce4
163 | ~/.config/wallust
164 | ~/.zshrc
165 | ~/.p10k.zsh
166 | /etc/environment.d/hyprland.conf
167 | )
168 |
169 | for item in "${config_items[@]}"; do
170 | ask_before_remove "$item"
171 | done
172 |
173 | # Ask about wallpaper collection
174 | ask_before_remove ~/Pictures/wallpapers
175 |
176 | # Remove Fedora-Hyprland directory
177 | ask_before_remove ~/Fedora-Hyprland
178 |
179 | # Remove nwg-look (installed from source)
180 | print_color $YELLOW "Removing nwg-look..."
181 | if [ -d ~/nwg-look ]; then
182 | cd ~/nwg-look
183 | if [ -f Makefile ]; then
184 | sudo make uninstall
185 | fi
186 | cd ~
187 | safe_remove_item ~/nwg-look
188 |
189 | # Remove binary if it exists
190 | if [ -f /usr/local/bin/nwg-look ]; then
191 | sudo rm /usr/local/bin/nwg-look
192 | fi
193 |
194 | print_color $GREEN "Removed nwg-look."
195 | else
196 | print_color $YELLOW "nwg-look directory not found, skipping."
197 | fi
198 |
199 | # Ask before removing Oh My Zsh
200 | if [ -d ~/.oh-my-zsh ]; then
201 | ask_before_remove ~/.oh-my-zsh
202 | fi
203 |
204 | # Clean up any leftover dependencies
205 | print_color $YELLOW "Cleaning up leftover dependencies..."
206 | sudo dnf autoremove -y
207 |
208 | print_color $GREEN "Hyprland and related components have been uninstalled."
209 | print_color $YELLOW "It's recommended to reboot your system now."
210 | print_color $CYAN "To reset to the default Fedora desktop environment, run:"
211 | print_color $CYAN "sudo dnf group install @workstation-product-environment"
212 |
213 | # Final ASCII Art
214 | print_color $MAGENTA "
215 |
216 | THANK YOU FOR USING THIS AMAZING HYPRLAND CONFIG IN FIRST PLACE!
217 |
218 |
219 | "
220 |
221 | print_centered "Made by vdcds" $CYAN
--------------------------------------------------------------------------------
/uninstall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # 💫 https://github.com/JaKooLit 💫 #
3 | # KooL Fedora-Hyprland uninstall script #
4 |
5 | clear
6 |
7 | # Set some colors for output messages
8 | OK="$(tput setaf 2)[OK]$(tput sgr0)"
9 | ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
10 | NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
11 | INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
12 | WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
13 | CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
14 | MAGENTA="$(tput setaf 5)"
15 | ORANGE="$(tput setaf 214)"
16 | WARNING="$(tput setaf 1)"
17 | YELLOW="$(tput setaf 3)"
18 | GREEN="$(tput setaf 2)"
19 | BLUE="$(tput setaf 4)"
20 | SKY_BLUE="$(tput setaf 6)"
21 | RESET="$(tput sgr0)"
22 |
23 | printf "\n%.0s" {1..2}
24 | echo -e "\e[35m
25 | ╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
26 | ╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ UNINSTALL
27 | ╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘ Fedora Linux
28 | \e[0m"
29 | printf "\n%.0s" {1..1}
30 |
31 | # Welcome Message
32 | whiptail --title "Fedora-Hyprland KooL Dots Uninstall Script" --yesno \
33 | "Hello! This script will uninstall KooL Hyprland packages and configs.
34 |
35 | You can choose packages and directories you want to remove.
36 | NOTE: This will remove configs from ~/.config
37 |
38 | WARNING: After uninstallation, your system may become unstable.
39 |
40 | Shall we Proceed?" 20 80
41 |
42 | if [ $? -eq 1 ]; then
43 | echo "$INFO uninstall process canceled."
44 | exit 0
45 | fi
46 |
47 | # Function to remove selected packages on Fedora
48 | remove_packages() {
49 | local selected_packages_file=$1
50 | while read -r package; do
51 | # Check if the package is installed using dnf
52 | if dnf list installed "$package" &> /dev/null; then
53 | echo "Removing package: $package"
54 | if ! sudo dnf remove -y "$package"; then
55 | echo "$ERROR Failed to remove package: $package"
56 | else
57 | echo "$OK Successfully removed package: $package"
58 | fi
59 | else
60 | echo "$INFO Package ${YELLOW}$package${RESET} not found. Skipping."
61 | fi
62 | done < "$selected_packages_file"
63 | }
64 |
65 | # Function to remove selected directories
66 | remove_directories() {
67 | local selected_dirs_file=$1
68 | while read -r dir; do
69 | pattern="$HOME/.config/$dir*"
70 | # Loop through directories matching the pattern
71 | for dir_to_remove in $pattern; do
72 | if [ -d "$dir_to_remove" ]; then
73 | echo "Removing directory: $dir_to_remove"
74 | if ! rm -rf "$dir_to_remove"; then
75 | echo "$ERROR Failed to remove directory: $dir_to_remove"
76 | else
77 | echo "$OK Successfully removed directory: $dir_to_remove"
78 | fi
79 | else
80 | echo "$INFO Directory ${YELLOW}$dir_to_remove${RESET} not found. Skipping."
81 | fi
82 | done
83 | done < "$selected_dirs_file"
84 | }
85 |
86 | # Function to safely remove COPR repositories
87 | remove_copr() {
88 | for repo in "$@"; do
89 | if sudo dnf copr list | grep -q "$repo"; then
90 | sudo dnf copr remove -y "$repo"
91 | else
92 | # Print message in yellow when the repository is not enabled
93 | echo -e "${YELLOW}COPR repository $repo is not enabled, skipping.${RESET}"
94 | fi
95 | done
96 | }
97 |
98 |
99 | # Define the list of packages to choose from (with options_command tags)
100 | packages=(
101 | "btop" "resource monitor" "off"
102 | "brightnessctl" "brightnessctl" "off"
103 | "cava" "Cross-platform Audio Visualizer" "off"
104 | "cliphist" "clipboard manager" "off"
105 | "fastfetch" "fastfetch" "off"
106 | "ffmpegthumbnailer" "FFmpeg Thumbnailer" "off"
107 | "grim" "screenshot tool" "off"
108 | "ImageMagick" "Image manipulation tool" "off"
109 | "kitty" "kitty-terminal" "off"
110 | "kvantum" "QT apps theming" "off"
111 | "mousepad" "simple text editor" "off"
112 | "mpv" "multi-media player" "off"
113 | "mpv-mpris" "mpv-plugin" "off"
114 | "network-manager-applet" "network-manager-applet" "off"
115 | "nvtop" "gpu resource monitor" "off"
116 | "nwg-displays" "display monitor configuration app" "off"
117 | "nwg-look" "gtk settings app" "off"
118 | "pamixer" "pamixer" "off"
119 | "pavucontrol" "pavucontrol" "off"
120 | "playerctl" "playerctl" "off"
121 | "pyprland" "pyprland" "off"
122 | "qalculate-gtk" "calculater - QT" "off"
123 | "qt5ct" "qt5ct" "off"
124 | "qt6ct" "qt6ct" "off"
125 | "rofi-wayland" "rofi-wayland" "off"
126 | "slurp" "screenshot tool" "off"
127 | "swappy" "screenshot tool" "off"
128 | "SwayNotificationCenter" "notification agent" "off"
129 | "swww" "wallpaper engine" "off"
130 | "Thunar" "File Manager" "off"
131 | "thunar-archive-plugin" "Archive Plugin" "off"
132 | "thunar-volman" "Volume Management" "off"
133 | "tumbler" "Thumbnail Service" "off"
134 | "wallust" "color pallete generator" "off"
135 | "waybar" "wayland bar" "off"
136 | "wl-clipboard" "clipboard manager" "off"
137 | "wlogout" "logout menu" "off"
138 | "xdg-desktop-portal-hyprland" "hyprland file picker" "off"
139 | "yad" "dialog box" "off"
140 | "yt-dlp" "video downloader" "off"
141 | "xarchiver" "Archive Manager" "off"
142 | "hypridle" "hyprland idling agent" "off"
143 | "hyprlock" "lockscreen" "off"
144 | "hyprpolkitagent" "hyprland polkit agent" "off"
145 | "hyprland" "hyprland main package" "off"
146 | )
147 |
148 | # Define the list of directories to choose from (with options_command tags)
149 | directories=(
150 | "ags" "AGS desktop overview configuration" "off"
151 | "btop" "btop configuration" "off"
152 | "cava" "cava configuration" "off"
153 | "fastfetch" "fastfetch configuration" "off"
154 | "hypr" "main hyprland configuration" "off"
155 | "kitty" "kitty terminal configuration" "off"
156 | "Kvantum" "Kvantum-manager configuration" "off"
157 | "qt5ct" "qt5ct configuration" "off"
158 | "qt6ct" "qt6ct configuration" "off"
159 | "rofi" "rofi configuration" "off"
160 | "swappy" "swappy (screenshot tool) configuration" "off"
161 | "swaync" "swaync (notification agent) configuration" "off"
162 | "Thunar" "Thunar file manager configuration" "off"
163 | "wallust" "wallust (color pallete) configuration" "off"
164 | "waybar" "waybar configuration" "off"
165 | "wlogout" "wlogout (logout menu) configuration" "off"
166 | )
167 |
168 | # Loop for package selection until user selects something or cancels
169 | while true; do
170 | package_choices=$(whiptail --title "Select Packages to Uninstall" --checklist \
171 | "Select the packages you want to remove\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 35 90 25 \
172 | "${packages[@]}" 3>&1 1>&2 2>&3)
173 |
174 | # Check if the user canceled the operation
175 | if [ $? -eq 1 ]; then
176 | echo "$INFO uninstall process canceled."
177 | exit 0
178 | fi
179 |
180 | # If no packages are selected, ask again
181 | if [[ -z "$package_choices" ]]; then
182 | echo "$NOTE No packages selected. Please select at least one package."
183 | else
184 | echo "$package_choices" | tr -d '"' | tr ' ' '\n' > /tmp/selected_packages.txt
185 | echo "Packages to remove: $package_choices"
186 | break
187 | fi
188 | done
189 |
190 | # Loop for directory selection until user selects something or cancels
191 | while true; do
192 | dir_choices=$(whiptail --title "Select Directories to Remove" --checklist \
193 | "Select the directories you want to remove\nNOTE: This will remove configs from ~/.config\n\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 28 90 18 \
194 | "${directories[@]}" 3>&1 1>&2 2>&3)
195 |
196 | # Check if the user canceled the operation
197 | if [ $? -eq 1 ]; then
198 | echo "$INFO uninstall process canceled."
199 | exit 0
200 | fi
201 |
202 | # If no directories are selected, ask again
203 | if [[ -z "$dir_choices" ]]; then
204 | echo "$NOTE No directories selected. Please select at least one directory."
205 | else
206 | # Save each selected directory to a new line in the temporary file
207 | echo "$dir_choices" | tr -d '"' | tr ' ' '\n' > /tmp/selected_directories.txt
208 | echo "Directories to remove: $dir_choices"
209 | break
210 | fi
211 | done
212 |
213 | # First confirmation - Warning about potential instability
214 | if ! whiptail --title "Warning" --yesno \
215 | "Warning: Removing these packages and directories may cause your system to become unstable and you may not be able to recover it.\n\nAre you sure you want to proceed?" \
216 | 10 80; then
217 | echo "$INFO uninstall process canceled."
218 | exit 0
219 | fi
220 |
221 | # Second confirmation - Final confirmation to proceed
222 | if ! whiptail --title "Final Confirmation" --yesno \
223 | "Are you absolutely sure you want to remove the selected packages and directories?\n\nWARNING! This action is irreversible." \
224 | 10 80; then
225 | echo "$INFO uninstall process canceled."
226 | exit 0
227 | fi
228 |
229 | printf "\n%.0s" {1..1}
230 | printf "\n%s${SKY_BLUE}Attempting to remove selected packages${RESET}\n" "${NOTE}"
231 | MAX_ATTEMPTS=2
232 | ATTEMPT=0
233 |
234 | while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
235 | # Remove packages
236 | remove_packages /tmp/selected_packages.txt
237 |
238 | # Check if any packages still need to be removed, retry if needed
239 | MISSING_PACKAGE_COUNT=0
240 | while read -r package; do
241 | if dnf list installed "$package" &> /dev/null; then
242 | MISSING_PACKAGE_COUNT=$((MISSING_PACKAGE_COUNT + 1))
243 | fi
244 | done < /tmp/selected_packages.txt
245 |
246 | if [ $MISSING_PACKAGE_COUNT -gt 0 ]; then
247 | ATTEMPT=$((ATTEMPT + 1))
248 | echo "Attempt #$ATTEMPT failed, retrying..."
249 | else
250 | break
251 | fi
252 | done
253 |
254 | printf "\n%.0s" {1..1}
255 | printf "\n%s${SKY_BLUE}Attempting to remove locally installed packages${RESET}\n" "${NOTE}"
256 | for file in ags; do
257 | if [ -f "/usr/local/bin/$file" ]; then
258 | sudo rm "/usr/local/bin/$file"
259 | echo "$file removed."
260 | fi
261 | done
262 |
263 | printf "\n%.0s" {1..1}
264 | printf "\n%s${SKY_BLUE}Attempting to remove selected directories${RESET}\n" "${NOTE}"
265 | remove_directories /tmp/selected_directories.txt
266 |
267 | # Remove COPR repositories
268 | printf "\n%.0s" {1..1}
269 | printf "\n%s ${INFO} Removing COPR repositories..."
270 | COPR_REPOS=(
271 | solopasha/hyprland
272 | erikreider/SwayNotificationCenter
273 | errornointernet/packages
274 | tofik/nwg-shell
275 | )
276 | remove_copr "${COPR_REPOS[@]}"
277 |
278 | printf "\n%.0s" {1..1}
279 | echo -e "$MAGENTA Hyprland and related components have been uninstalled.$RESET"
280 | echo -e "$YELLOW It is recommended to reboot your system now.$RESET"
281 | printf "\n%.0s" {1..1}
--------------------------------------------------------------------------------