Compare commits
284 Commits
Arch-Hyprl
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f8e544a9e | ||
|
|
715a43cffc | ||
|
|
7ebe599868 | ||
|
|
ae0c8b155c | ||
|
|
3781f9c510 | ||
|
|
bbeaa681e0 | ||
|
|
47f4e4d7b6 | ||
|
|
23f52b3f00 | ||
|
|
956fb369b5 | ||
|
|
9cf06be539 | ||
|
|
1808001bdb | ||
|
|
46728206a0 | ||
|
|
27b7ba5578 | ||
|
|
bcfade3e24 | ||
|
|
f231d77b5c | ||
|
|
d1c0e89737 | ||
|
|
f1e2d27625 | ||
|
|
2789e1544c | ||
|
|
a9e33e5c58 | ||
|
|
93581957d4 | ||
|
|
6c86adfcdc | ||
|
|
0ab997e352 | ||
|
|
5b427072ae | ||
|
|
f6a7c27229 | ||
|
|
aa140acf69 | ||
|
|
560ecf3bb6 | ||
|
|
516f2e609c | ||
|
|
66cebd2247 | ||
|
|
c16b3bc2c0 | ||
|
|
ead2235eba | ||
|
|
729149b7cc | ||
|
|
efba587fde | ||
|
|
c2a30d5a08 | ||
|
|
ab31c829e2 | ||
|
|
5b29ba38d8 | ||
|
|
d26c9e30bd | ||
|
|
78aa1dbcb2 | ||
|
|
47836c2fb9 | ||
|
|
3b2281568c | ||
|
|
f185af7389 | ||
|
|
deb545e3b1 | ||
|
|
5a3895682d | ||
|
|
2fbfecd07a | ||
|
|
8813180c2d | ||
|
|
2afc7293d5 | ||
|
|
e433e89754 | ||
|
|
b5f342f62c | ||
|
|
0803fb9c0f | ||
|
|
10d45b5d99 | ||
|
|
3fcfdc0bad | ||
|
|
5011f153be | ||
|
|
672a700695 | ||
|
|
78310220d4 | ||
|
|
409c612049 | ||
|
|
aab92dac45 | ||
|
|
165b06ea25 | ||
|
|
9ff63be4ac | ||
|
|
807ca99fc2 | ||
|
|
63330afe2f | ||
|
|
6b88c9cc58 | ||
|
|
ced0769af2 | ||
|
|
26ee47374d | ||
|
|
14711bacd3 | ||
|
|
ead1dc65a5 | ||
|
|
d29eee9b17 | ||
|
|
6cfb2ef41f | ||
|
|
7b759fd829 | ||
|
|
585357ca07 | ||
|
|
1f034b4f22 | ||
|
|
36e84ebc53 | ||
|
|
a4164ca612 | ||
|
|
ff2e5a02e3 | ||
|
|
eedc504ecd | ||
|
|
6820111709 | ||
|
|
ffee7f7b9a | ||
|
|
9b3df653a9 | ||
|
|
050fd2dcc4 | ||
|
|
2c54155221 | ||
|
|
1e1253d1e6 | ||
|
|
8c0de4d74f | ||
|
|
4212522647 | ||
|
|
9b41ac3eeb | ||
|
|
750d565ee1 | ||
|
|
79b725deb6 | ||
|
|
cde0a7c6f8 | ||
|
|
3e0c99b822 | ||
|
|
e2e2e47738 | ||
|
|
f4a2591cde | ||
|
|
817c1d9810 | ||
|
|
d158b95283 | ||
|
|
a5aab435fd | ||
|
|
3c65d6b5b6 | ||
|
|
e632e64fce | ||
|
|
9e144ad61a | ||
|
|
92b279e5a0 | ||
|
|
64040f0b34 | ||
|
|
c93101a99e | ||
|
|
bab65fd28d | ||
|
|
ccb1ceb29e | ||
|
|
5fb35a7d3e | ||
|
|
c20d0682d1 | ||
|
|
acc2238bf0 | ||
|
|
a74b17a97c | ||
|
|
068d55dd4b | ||
|
|
06187ec5e6 | ||
|
|
f0c32198fc | ||
|
|
ec1285d8d1 | ||
|
|
3486e33dde | ||
|
|
0bdef7305d | ||
|
|
f3d0b3ddfb | ||
|
|
96d3adc1ed | ||
|
|
e6b78f074a | ||
|
|
902464683c | ||
|
|
3010cc882d | ||
|
|
cd16826482 | ||
|
|
96c03b18a2 | ||
|
|
11a27c79b9 | ||
|
|
e565faf376 | ||
|
|
17494d5d9d | ||
|
|
971a4083ff | ||
|
|
432a2070cf | ||
|
|
450267e45b | ||
|
|
279536e69b | ||
|
|
ffaf189402 | ||
|
|
e31f518c36 | ||
|
|
3c6090925b | ||
|
|
d345c08e01 | ||
|
|
36b0732056 | ||
|
|
30fb2d1814 | ||
|
|
213e3757df | ||
|
|
e87f6c1beb | ||
|
|
16f1b2418d | ||
|
|
54ff099d51 | ||
|
|
79ce9a266e | ||
|
|
ab7063cadc | ||
|
|
eafb151d0d | ||
|
|
7976768137 | ||
|
|
5a459d35e7 | ||
|
|
59f9364309 | ||
|
|
185a7d2db7 | ||
|
|
07ab9e9147 | ||
|
|
f0186dec33 | ||
|
|
bf44e13dac | ||
|
|
aae594ecff | ||
|
|
c3c4d621ca | ||
|
|
58185e1dd3 | ||
|
|
ea2125a467 | ||
|
|
1182b17d0b | ||
|
|
cc3d20e664 | ||
|
|
b16f579e86 | ||
|
|
11f2b0c6fe | ||
|
|
2ee27f6959 | ||
|
|
6c5c4b22b8 | ||
|
|
c1b872865a | ||
|
|
8d92fdd1af | ||
|
|
07f5053b2b | ||
|
|
e4e488fc4c | ||
|
|
1970cca375 | ||
|
|
2828811ad8 | ||
|
|
653ca995ae | ||
|
|
f4fcd6deed | ||
|
|
52531e7d1f | ||
|
|
5db40aafa3 | ||
|
|
1d2126b7ff | ||
|
|
622e09c781 | ||
|
|
5baaec6f12 | ||
|
|
941b24ed1d | ||
|
|
cfab030ca2 | ||
|
|
8ea3dc390c | ||
|
|
6c1b941fa1 | ||
|
|
3e7f5664e5 | ||
|
|
af4d191ee3 | ||
|
|
5fa3096724 | ||
|
|
d00addba58 | ||
|
|
e28b5940cb | ||
|
|
49f8cef0be | ||
|
|
ac4ffc922a | ||
|
|
c93e1861d0 | ||
|
|
4185638900 | ||
|
|
a4f16e24cb | ||
|
|
d09e2dfd09 | ||
|
|
9695a4c75b | ||
|
|
68af696789 | ||
|
|
b2f43b18fd | ||
|
|
f450ddd382 | ||
|
|
04c090a828 | ||
|
|
bb58ae9940 | ||
|
|
39e515f9b0 | ||
|
|
8842d72a79 | ||
|
|
573321fd5f | ||
|
|
e766866207 | ||
|
|
fb9b3a8205 | ||
|
|
3420522393 | ||
|
|
409aadf655 | ||
|
|
dcc282968e | ||
|
|
a66845607d | ||
|
|
f5e3ed99d2 | ||
|
|
2d31448492 | ||
|
|
39d3f1a958 | ||
|
|
28c12f6df2 | ||
|
|
79af4e7b7d | ||
|
|
8a60729680 | ||
|
|
fd1358d920 | ||
|
|
113fee6d7a | ||
|
|
87676210e2 | ||
|
|
cf6cc1010e | ||
|
|
52dfbe8593 | ||
|
|
e9c5d3d4a6 | ||
|
|
1e2704bc23 | ||
|
|
f049050b73 | ||
|
|
094ccb9b1f | ||
|
|
47791287f1 | ||
|
|
4fba08d8d6 | ||
|
|
a19b9b8a8d | ||
|
|
5f20c04b05 | ||
|
|
9aa43ae531 | ||
|
|
bf67e6030c | ||
|
|
9873283814 | ||
|
|
03aa990f35 | ||
|
|
2c4cdd3889 | ||
|
|
eb486d7ef2 | ||
|
|
262b6eb87c | ||
|
|
3233396b72 | ||
|
|
df48873278 | ||
|
|
3af8762a88 | ||
|
|
e35d66658c | ||
|
|
e320af02c8 | ||
|
|
6a67a21a33 | ||
|
|
b6d982d168 | ||
|
|
2590e76bd2 | ||
|
|
bde3ef8433 | ||
|
|
6b3d3efbb5 | ||
|
|
c4074aeffa | ||
|
|
f578249698 | ||
|
|
b43ace2f24 | ||
|
|
815438934a | ||
|
|
5d5af21bea | ||
|
|
e1d258503a | ||
|
|
fa9c2ae04f | ||
|
|
8a7f40c75a | ||
|
|
d6a25e04e7 | ||
|
|
61b61a980c | ||
|
|
cc9ce2cb49 | ||
|
|
7278a45305 | ||
|
|
049c27ac22 | ||
|
|
90121d9172 | ||
|
|
2b0528ca89 | ||
|
|
528551ea86 | ||
|
|
8c71bdeee7 | ||
|
|
63f2f45866 | ||
|
|
c1f67feb18 | ||
|
|
d215fbd786 | ||
|
|
1d812d7357 | ||
|
|
083c20878e | ||
|
|
695081332b | ||
|
|
93d3a18b9a | ||
|
|
29cc1c3f52 | ||
|
|
bfbbbd2e52 | ||
|
|
e2fe39222c | ||
|
|
872fd89261 | ||
|
|
d3f0016158 | ||
|
|
8995c47902 | ||
|
|
058859a07e | ||
|
|
54363d5267 | ||
|
|
b2628c8126 | ||
|
|
7ecb641731 | ||
|
|
497e71fdf5 | ||
|
|
35aa72e021 | ||
|
|
9c1741e00d | ||
|
|
fcf18bede5 | ||
|
|
6abc879468 | ||
|
|
38ce478f5c | ||
|
|
527a504e83 | ||
|
|
a44b376e79 | ||
|
|
2e62542a35 | ||
|
|
5343041805 | ||
|
|
221870054e | ||
|
|
193977dcb6 | ||
|
|
c18526390d | ||
|
|
7b403cd72d | ||
|
|
9a6fce78ab | ||
|
|
0c8c829c57 | ||
|
|
2ed79c491a | ||
|
|
c1c5450c9b |
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
147
CHANGELOGS.md
147
CHANGELOGS.md
@@ -1,181 +1,312 @@
|
|||||||
## Changelogs
|
## CHANGELOGS
|
||||||
|
|
||||||
|
## Dec 2025
|
||||||
|
|
||||||
|
Added:
|
||||||
|
|
||||||
|
- `qt5-quickcontrols2` to sddm.sh - User reported w/o this SDDM crashed on login
|
||||||
|
Fixed:
|
||||||
|
- AGS v1
|
||||||
|
- It now does the following:
|
||||||
|
- Clone upstream AGS 1.9.0.
|
||||||
|
- Stub out PAM/GUtils via pam.ts.
|
||||||
|
- Build and install AGS.
|
||||||
|
- Install the known-good launcher from install-scripts/ags.launcher.com.github.Aylur.ags.
|
||||||
|
- Points /usr/local/bin/ags at that launcher.
|
||||||
|
- AGS is no longer removed when you add quickshell.
|
||||||
|
- AGS overview is a backup if quickshell overview fails.
|
||||||
|
- meson build errors
|
||||||
|
- `rofi-wayland` package changed to 'rofi'
|
||||||
|
- Add missing monitor scripts from Fedora-Hyprland PR #234
|
||||||
|
|
||||||
|
## 22 July 2025
|
||||||
|
|
||||||
|
- Updated sddm theme and script to work with the updated simple_sddm_2 theme
|
||||||
|
|
||||||
|
## 17 July 2025
|
||||||
|
|
||||||
|
- added quickshell script to replace ags for desktop overview
|
||||||
|
|
||||||
|
## 08 June 2025
|
||||||
|
|
||||||
|
- updated SDDM theme.
|
||||||
|
|
||||||
|
## 20 March 2025
|
||||||
|
|
||||||
|
- adjusted hyprland installation script. This is great for those who are using -git packages
|
||||||
|
- added findutils as dependencies
|
||||||
|
|
||||||
|
## 11 March 2025
|
||||||
|
|
||||||
|
- Added uninstall script
|
||||||
|
- forked AGS v1 into JakooLit repo. This is just incase Aylur decide to take down v1
|
||||||
|
|
||||||
|
## 10 March 2025
|
||||||
|
|
||||||
|
- Dropped pyprland in favor of hyprland built in tool for a drop down like terminal and Desktop magnifier
|
||||||
|
|
||||||
|
## 06 March 2025
|
||||||
|
|
||||||
|
- Switched to whiptail version for Y & N questions
|
||||||
|
- switched eza to lsd
|
||||||
|
|
||||||
|
## 23 Feb 2025
|
||||||
|
|
||||||
|
- added Victor Mono Font for proper hyprlock font rendering for Dots v2.3.12
|
||||||
|
- added Fantasque Sans Mono Nerd for Kitty
|
||||||
|
|
||||||
|
## 22 Feb 2025
|
||||||
|
|
||||||
|
- replaced eog with loupe
|
||||||
|
- changed url for installing oh-my-zsh to get wider coverage. Some countries are blocking github raw url's
|
||||||
|
|
||||||
|
## 20 Feb 2025
|
||||||
|
|
||||||
|
- Added nwg-displays for the upcoming Kools dots v2.3.12
|
||||||
|
|
||||||
|
## 18 Feb 2025
|
||||||
|
|
||||||
|
- Change default zsh theme to adnosterzak
|
||||||
|
- pokemon coloscript integrated with fastfetch when opted with pokemon to add some bling
|
||||||
|
- additional external oh-my-zsh theme
|
||||||
|
|
||||||
|
## 06 Feb 2025
|
||||||
|
|
||||||
|
- added semi-unattended function.
|
||||||
|
- move all the initial questions at the beginning
|
||||||
|
|
||||||
|
## 04 Feb 2025
|
||||||
|
|
||||||
|
- Re-coded for better visibility
|
||||||
|
- Offered a new SDDM theme.
|
||||||
|
- script will automatically detect if you have nvidia but script still offer if you want to set up for user
|
||||||
|
|
||||||
## 29 Jan 2025
|
## 29 Jan 2025
|
||||||
|
|
||||||
- enhanced nvidia.sh to add additional systemd-bootloader entries for nvidia
|
- enhanced nvidia.sh to add additional systemd-bootloader entries for nvidia
|
||||||
|
|
||||||
## 16 Jan 2025
|
## 16 Jan 2025
|
||||||
- updated nvidia.sh to install non-git libva-nvidia-driver
|
|
||||||
|
- updated nvidia.sh to install non-git libva-nvidia-driver
|
||||||
|
|
||||||
## 13 Jan 2025
|
## 13 Jan 2025
|
||||||
|
|
||||||
- replaced polkit-gnome with hyprpolkitagent
|
- replaced polkit-gnome with hyprpolkitagent
|
||||||
|
|
||||||
## 12 Jan 2025
|
## 12 Jan 2025
|
||||||
|
|
||||||
- switch to final version of aylurs-gtk-shell-v1
|
- switch to final version of aylurs-gtk-shell-v1
|
||||||
|
|
||||||
## 11 Jan 2025
|
## 11 Jan 2025
|
||||||
|
|
||||||
- added cachyos-hyprland-settings to uninstall
|
- added cachyos-hyprland-settings to uninstall
|
||||||
|
|
||||||
## 06 Jan 2025
|
## 06 Jan 2025
|
||||||
|
|
||||||
- added copying of modified fastfetch-compact for Arch
|
- added copying of modified fastfetch-compact for Arch
|
||||||
- default theme for oh my zsh theme is now "funky"
|
- default theme for oh my zsh theme is now "funky"
|
||||||
|
|
||||||
## 26 Dec 2024
|
## 26 Dec 2024
|
||||||
|
|
||||||
- Removal of Bibata Ice cursor on assets since its integrated in the GTK Themes and Icons extract from a separate repo
|
- Removal of Bibata Ice cursor on assets since its integrated in the GTK Themes and Icons extract from a separate repo
|
||||||
- integrated hyprcursor in Bibata Ice Cursor
|
- integrated hyprcursor in Bibata Ice Cursor
|
||||||
|
|
||||||
## 15 Nov 2024
|
## 15 Nov 2024
|
||||||
|
|
||||||
- revert Aylurs GTK Shell (AGS) to install older version
|
- revert Aylurs GTK Shell (AGS) to install older version
|
||||||
- added aylurs-gtk-shell to uninstall
|
- added aylurs-gtk-shell to uninstall
|
||||||
|
|
||||||
## 20 Sep 2024
|
## 20 Sep 2024
|
||||||
|
|
||||||
- User will be ask if they want to set Thunar as default file manager if they decided to install it
|
- User will be ask if they want to set Thunar as default file manager if they decided to install it
|
||||||
|
|
||||||
## 19 Sep 2024
|
## 19 Sep 2024
|
||||||
|
|
||||||
- Added fastfetch on tty. However, will be disabled if user decided to install pokemon colorscripts
|
- Added fastfetch on tty. However, will be disabled if user decided to install pokemon colorscripts
|
||||||
|
|
||||||
## 18 Sep 2024
|
## 18 Sep 2024
|
||||||
|
|
||||||
- dotfiles will now be downloaded from main or master branch instead of from the releases version.
|
- dotfiles will now be downloaded from main or master branch instead of from the releases version.
|
||||||
|
|
||||||
## 14 Sep 2024
|
## 14 Sep 2024
|
||||||
|
|
||||||
- remove the final error checks instead, introduced a final check of essential packages to ran Hyprland
|
- remove the final error checks instead, introduced a final check of essential packages to ran Hyprland
|
||||||
|
|
||||||
## 08 Sep 2024
|
## 08 Sep 2024
|
||||||
|
|
||||||
- Added final error checks on install-logs
|
- Added final error checks on install-logs
|
||||||
|
|
||||||
## 07 Sep 2024
|
## 07 Sep 2024
|
||||||
|
|
||||||
- added pulseaudio check
|
- added pulseaudio check
|
||||||
- added sof-firmware
|
- added sof-firmware
|
||||||
|
|
||||||
## 29 Aug 2024
|
## 29 Aug 2024
|
||||||
|
|
||||||
- switched over to non-git wallust package
|
- switched over to non-git wallust package
|
||||||
- improved indentions on some install scripts
|
- improved indentions on some install scripts
|
||||||
|
|
||||||
## 28 Aug 2024
|
## 28 Aug 2024
|
||||||
|
|
||||||
- Added final check if hyprland is installed and will give an error to user
|
- Added final check if hyprland is installed and will give an error to user
|
||||||
|
|
||||||
## 26 Aug 2024
|
## 26 Aug 2024
|
||||||
|
|
||||||
- Set to uninstall rofi as conflicts with rofi-wayland
|
- Set to uninstall rofi as conflicts with rofi-wayland
|
||||||
- added nvidia_drm.fbdev=1 for grub
|
- added nvidia_drm.fbdev=1 for grub
|
||||||
|
|
||||||
## 14 Aug 2024
|
## 14 Aug 2024
|
||||||
|
|
||||||
- added archlinux-keyring on base.sh
|
- added archlinux-keyring on base.sh
|
||||||
|
|
||||||
## 08 Aug 2024
|
## 08 Aug 2024
|
||||||
|
|
||||||
- Increased to 1 sec delay for installing base-devel [commit](https://github.com/JaKooLit/Arch-Hyprland/commit/7ebfa06c3b186f9bec0bcf268fae401ba67dfc2a)
|
- Increased to 1 sec delay for installing base-devel [commit](https://github.com/JaKooLit/Arch-Hyprland/commit/7ebfa06c3b186f9bec0bcf268fae401ba67dfc2a)
|
||||||
|
|
||||||
## 07 Jul 2024
|
## 07 Jul 2024
|
||||||
|
|
||||||
- added eza (ls replacement for tty). Note only on .zshrc
|
- added eza (ls replacement for tty). Note only on .zshrc
|
||||||
|
|
||||||
## 25 Jun 2024
|
## 25 Jun 2024
|
||||||
|
|
||||||
- added fbdev=1 for nvidia.sh on `/etc/modprobe.d/nvidia.conf`. see here `https://wiki.hyprland.org/Nvidia/#drm-kernel-mode-setting`
|
- added fbdev=1 for nvidia.sh on `/etc/modprobe.d/nvidia.conf`. see here `https://wiki.hyprland.org/Nvidia/#drm-kernel-mode-setting`
|
||||||
|
|
||||||
## 26 May 2024
|
## 26 May 2024
|
||||||
|
|
||||||
- Added fzf for zsh (CTRL R to invoke FZF history)
|
- Added fzf for zsh (CTRL R to invoke FZF history)
|
||||||
|
|
||||||
## 23 May 2024
|
## 23 May 2024
|
||||||
|
|
||||||
- added qalculate-gtk to work with rofi-calc. Default keybinds (SUPER ALT C)
|
- added qalculate-gtk to work with rofi-calc. Default keybinds (SUPER ALT C)
|
||||||
- added power-profiles-daemon for ROG laptops. Note, I cant add to all since it conflicts with TLP, CPU-Auto-frequency etc.
|
- added power-profiles-daemon for ROG laptops. Note, I cant add to all since it conflicts with TLP, CPU-Auto-frequency etc.
|
||||||
- added fastfetch
|
- added fastfetch
|
||||||
|
|
||||||
## 22 May 2024
|
## 22 May 2024
|
||||||
|
|
||||||
- nwg-look is now in extra repo so replaced with nwg-look from nwg-look-bin
|
- nwg-look is now in extra repo so replaced with nwg-look from nwg-look-bin
|
||||||
- change the sddm theme destination to /etc/sddm.conf.d/10-theme.conf to theme.conf.user
|
- change the sddm theme destination to /etc/sddm.conf.d/10-theme.conf to theme.conf.user
|
||||||
|
|
||||||
## 19 May 2024
|
## 19 May 2024
|
||||||
|
|
||||||
- Disabled the auto-login in .zprofile as it causes auto-login to Hyprland if any wayland was chosen. Can enabled if only using hyprland
|
- Disabled the auto-login in .zprofile as it causes auto-login to Hyprland if any wayland was chosen. Can enabled if only using hyprland
|
||||||
|
|
||||||
## 10 May 2024
|
## 10 May 2024
|
||||||
|
|
||||||
- added wallust-git and remove python-pywal for migration to wallust on Hyprland-Dots v2.2.11
|
- added wallust-git and remove python-pywal for migration to wallust on Hyprland-Dots v2.2.11
|
||||||
|
|
||||||
## 08 May 2024
|
## 08 May 2024
|
||||||
|
|
||||||
- Adjusted sddm.sh since it does not respect preset.sh
|
- Adjusted sddm.sh since it does not respect preset.sh
|
||||||
- install.sh have been rearranged so it quits if user choose not to proceed
|
- install.sh have been rearranged so it quits if user choose not to proceed
|
||||||
|
|
||||||
## 07 May 2024
|
## 07 May 2024
|
||||||
|
|
||||||
- Minor typo change on nvidia.sh
|
- Minor typo change on nvidia.sh
|
||||||
- switch back to cava since installing cava-git keep it hanging (see known-issue on readme)
|
- switch back to cava since installing cava-git keep it hanging (see known-issue on readme)
|
||||||
|
|
||||||
## 05 May 2024
|
## 05 May 2024
|
||||||
|
|
||||||
- switched to rofi-wayland Extra Repo
|
- switched to rofi-wayland Extra Repo
|
||||||
|
|
||||||
## 04 May 2024
|
## 04 May 2024
|
||||||
|
|
||||||
- separated fonts installation script for easy debugging
|
- separated fonts installation script for easy debugging
|
||||||
|
|
||||||
## 03 May 2024
|
## 03 May 2024
|
||||||
|
|
||||||
- added python3-pyquery for new weather-waybar python based on Hyprland-Dots
|
- added python3-pyquery for new weather-waybar python based on Hyprland-Dots
|
||||||
|
|
||||||
## 02 May 2024
|
## 02 May 2024
|
||||||
|
|
||||||
- Added pyprland (hyprland plugin)
|
- Added pyprland (hyprland plugin)
|
||||||
|
|
||||||
## 26 Apr 2024
|
## 26 Apr 2024
|
||||||
|
|
||||||
- Updated sddm.sh for Qt6 variant
|
- Updated sddm.sh for Qt6 variant
|
||||||
|
|
||||||
## 23 Apr 2024
|
## 23 Apr 2024
|
||||||
|
|
||||||
- Dropping swayidle and swaylock in favor of hypridle and hyprlock
|
- Dropping swayidle and swaylock in favor of hypridle and hyprlock
|
||||||
|
|
||||||
## 20 Apr 2024
|
## 20 Apr 2024
|
||||||
|
|
||||||
- Change default Oh-my-zsh theme to xiong-chiamiov-plus
|
- Change default Oh-my-zsh theme to xiong-chiamiov-plus
|
||||||
|
|
||||||
## 16 Mar 2024
|
## 16 Mar 2024
|
||||||
|
|
||||||
- added hyprcursor
|
- added hyprcursor
|
||||||
|
|
||||||
## 1 Mar 2024
|
## 1 Mar 2024
|
||||||
|
|
||||||
- replaced sddm-git with sddm
|
- replaced sddm-git with sddm
|
||||||
|
|
||||||
## 11 Jan 2024
|
## 11 Jan 2024
|
||||||
|
|
||||||
- dropped wlsunset
|
- dropped wlsunset
|
||||||
|
|
||||||
## 05 Jan 2024
|
## 05 Jan 2024
|
||||||
|
|
||||||
- Added a preset feature
|
- Added a preset feature
|
||||||
- Added templates for contributing, and reporting, etc
|
- Added templates for contributing, and reporting, etc
|
||||||
|
|
||||||
## 01 Jan 2024
|
## 01 Jan 2024
|
||||||
|
|
||||||
- Re-coded complete and test
|
- Re-coded complete and test
|
||||||
- Added to spice up pacman.conf including adding of ILoveCandy on it :)
|
- Added to spice up pacman.conf including adding of ILoveCandy on it :)
|
||||||
|
|
||||||
## 30 Dec 2023
|
## 30 Dec 2023
|
||||||
|
|
||||||
- Install scripts reconstructed
|
- Install scripts reconstructed
|
||||||
|
|
||||||
## 29 December 2023
|
## 29 December 2023
|
||||||
|
|
||||||
- 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
|
- 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
|
||||||
|
|
||||||
## 16 Dec 2023
|
## 16 Dec 2023
|
||||||
|
|
||||||
- zsh theme switched to `agnoster` theme by default
|
- zsh theme switched to `agnoster` theme by default
|
||||||
- pywal tty color change disabled by default
|
- pywal tty color change disabled by default
|
||||||
|
|
||||||
## 13 Dec 2023
|
## 13 Dec 2023
|
||||||
|
|
||||||
- switched hyprland to Extra Repo hyprland (both nvidia and non-nvidia). Seeing they are updating all the time :)
|
- switched hyprland to Extra Repo hyprland (both nvidia and non-nvidia). Seeing they are updating all the time :)
|
||||||
|
|
||||||
## 11 Dec 2023
|
## 11 Dec 2023
|
||||||
|
|
||||||
- Changing over to zsh automatically if user opted
|
- Changing over to zsh automatically if user opted
|
||||||
- If chose to install zsh and have no login manager, zsh auto login will auto start Hyprland
|
- If chose to install zsh and have no login manager, zsh auto login will auto start Hyprland
|
||||||
- added as optional, with zsh, pokemon colorscripts
|
- added as optional, with zsh, pokemon colorscripts
|
||||||
- improved zsh install scripts, so even the existing zsh users of can still opt for zsh and oh-my-zsh installation :)
|
- improved zsh install scripts, so even the existing zsh users of can still opt for zsh and oh-my-zsh installation :)
|
||||||
|
|
||||||
## 03 Dec 2023
|
## 03 Dec 2023
|
||||||
|
|
||||||
- Added kvantum for qt apps theming
|
- Added kvantum for qt apps theming
|
||||||
- return of wlogout due to theming issues of rofi-power
|
- return of wlogout due to theming issues of rofi-power
|
||||||
|
|
||||||
## 01 Dec 2023
|
## 01 Dec 2023
|
||||||
|
|
||||||
- Added pipewire to install
|
- Added pipewire to install
|
||||||
|
|
||||||
## 30 Nov 2023
|
## 30 Nov 2023
|
||||||
|
|
||||||
- switched to swaylock-effects-git as non-git does not seem to work
|
- switched to swaylock-effects-git as non-git does not seem to work
|
||||||
|
|
||||||
## 29 Nov 2023
|
## 29 Nov 2023
|
||||||
- nvidia.sh edited to remove hyprland-nvidia-git as well
|
|
||||||
|
- nvidia.sh edited to remove hyprland-nvidia-git as well
|
||||||
|
|
||||||
## 26 Nov 2023
|
## 26 Nov 2023
|
||||||
|
|
||||||
- nvidia - Move to hyprland-git. see [`commit`](https://github.com/hyprwm/Hyprland/commit/cd96ceecc551c25631783499bd92c6662c5d3616)
|
- nvidia - Move to hyprland-git. see [`commit`](https://github.com/hyprwm/Hyprland/commit/cd96ceecc551c25631783499bd92c6662c5d3616)
|
||||||
|
|
||||||
## 25 Nov 2023
|
## 25 Nov 2023
|
||||||
|
|
||||||
- drop wlogout since Hyprland-Dots v2.1.9 uses rofi-power
|
- drop wlogout since Hyprland-Dots v2.1.9 uses rofi-power
|
||||||
|
|
||||||
## 23-Nov-2023
|
## 23-Nov-2023
|
||||||
|
|
||||||
- Added Bibata cursor to install if opted for GTK Themes. However, it is not pre-applied. Use nwg-look utility to apply
|
- Added Bibata cursor to install if opted for GTK Themes. However, it is not pre-applied. Use nwg-look utility to apply
|
||||||
|
|
||||||
## 19-Nov-2023
|
## 19-Nov-2023
|
||||||
|
|
||||||
- Adjust dotfiles script to download from releases instead of from upstream
|
- Adjust dotfiles script to download from releases instead of from upstream
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
81
CODE_OF_CONDUCT.es.md
Normal file
81
CODE_OF_CONDUCT.es.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# Código de Conducta del Pacto del Colaborador
|
||||||
|
|
||||||
|
[Ver versión en inglés](./CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
|
## Nuestro compromiso
|
||||||
|
|
||||||
|
Nosotros, como miembros, contribuyentes y líderes, nos comprometemos a hacer que la participación en nuestra comunidad sea una experiencia libre de acoso para todas las personas, sin distinción de edad, complexión, discapacidad visible o invisible, etnia, características sexuales, identidad y expresión de género, nivel de experiencia, educación, situación socioeconómica, nacionalidad, apariencia personal, raza, religión, orientación o identidad sexual.
|
||||||
|
|
||||||
|
Nos comprometemos a actuar e interactuar de maneras que contribuyan a una comunidad abierta, acogedora, diversa, inclusiva y saludable.
|
||||||
|
|
||||||
|
## Nuestros estándares
|
||||||
|
|
||||||
|
Ejemplos de comportamiento que contribuye a un entorno positivo para nuestra comunidad incluyen:
|
||||||
|
|
||||||
|
- Demostrar empatía y amabilidad hacia otras personas.
|
||||||
|
- Ser respetuoso con opiniones, puntos de vista y experiencias que difieran de las nuestras.
|
||||||
|
- Dar y aceptar con gracia retroalimentación constructiva.
|
||||||
|
- Asumir la responsabilidad y disculparse ante quienes se vean afectados por nuestros errores, y aprender de la experiencia.
|
||||||
|
- Centrarse en lo que es mejor no solo para nosotros como individuos, sino para la comunidad en su conjunto.
|
||||||
|
|
||||||
|
Ejemplos de comportamiento inaceptable incluyen:
|
||||||
|
|
||||||
|
- El uso de lenguaje o imágenes sexualizadas, y cualquier tipo de atención o insinuación sexual.
|
||||||
|
- Troleo, comentarios insultantes o despectivos, y ataques personales o políticos.
|
||||||
|
- Acoso público o privado.
|
||||||
|
- Publicación de información privada de otras personas, como direcciones físicas o de correo electrónico, sin su permiso explícito.
|
||||||
|
- Otra conducta que, razonablemente, pudiera considerarse inapropiada en un entorno profesional.
|
||||||
|
|
||||||
|
## Responsabilidades de cumplimiento
|
||||||
|
|
||||||
|
Los líderes de la comunidad son responsables de aclarar y hacer cumplir nuestros estándares de comportamiento aceptable y tomarán medidas correctivas apropiadas y justas en respuesta a cualquier comportamiento que consideren inapropiado, amenazante, ofensivo o dañino.
|
||||||
|
|
||||||
|
Los líderes de la comunidad tienen el derecho y la responsabilidad de eliminar, editar o rechazar comentarios, confirmaciones de cambios (commits), código, ediciones del wiki, incidencias y otras contribuciones que no estén alineadas con este Código de Conducta, y comunicarán los motivos de las decisiones de moderación cuando corresponda.
|
||||||
|
|
||||||
|
## Alcance
|
||||||
|
|
||||||
|
Este Código de Conducta se aplica a todos los espacios de la comunidad y también cuando una persona representa oficialmente a la comunidad en espacios públicos. Ejemplos de representar a nuestra comunidad incluyen usar una dirección de correo electrónico oficial, publicar a través de una cuenta oficial en redes sociales o actuar como representante designado en un evento en línea o presencial.
|
||||||
|
|
||||||
|
## Cumplimiento
|
||||||
|
|
||||||
|
Los casos de comportamiento abusivo, acosador o de otra forma inaceptable pueden ser reportados a los líderes de la comunidad responsables del cumplimiento en mail[at]ml4w.com. Todas las quejas serán revisadas e investigadas de manera rápida y justa.
|
||||||
|
|
||||||
|
Todos los líderes de la comunidad están obligados a respetar la privacidad y seguridad de quien reporte cualquier incidente.
|
||||||
|
|
||||||
|
## Guías de aplicación
|
||||||
|
|
||||||
|
Los líderes de la comunidad seguirán estas Guías de Impacto Comunitario para determinar las consecuencias por cualquier acción que consideren en violación de este Código de Conducta:
|
||||||
|
|
||||||
|
### 1. Corrección
|
||||||
|
|
||||||
|
Impacto comunitario: Uso de lenguaje inapropiado u otro comportamiento considerado no profesional o no bienvenido en la comunidad.
|
||||||
|
|
||||||
|
Consecuencia: Una advertencia privada y por escrito de parte de los líderes de la comunidad, brindando claridad sobre la naturaleza de la violación y una explicación de por qué el comportamiento fue inapropiado. Se puede solicitar una disculpa pública.
|
||||||
|
|
||||||
|
### 2. Advertencia
|
||||||
|
|
||||||
|
Impacto comunitario: Una violación por un incidente único o una serie de acciones.
|
||||||
|
|
||||||
|
Consecuencia: Una advertencia con consecuencias para comportamientos continuados. Ninguna interacción con las personas involucradas, incluida la interacción no solicitada con quienes hacen cumplir el Código de Conducta, por un período de tiempo especificado. Esto incluye evitar interacciones en espacios de la comunidad así como en canales externos como redes sociales. Violaciones a estos términos pueden llevar a una suspensión temporal o permanente.
|
||||||
|
|
||||||
|
### 3. Suspensión temporal
|
||||||
|
|
||||||
|
Impacto comunitario: Una violación grave de los estándares de la comunidad, incluido el comportamiento inapropiado sostenido.
|
||||||
|
|
||||||
|
Consecuencia: Una suspensión temporal de cualquier tipo de interacción o comunicación pública con la comunidad por un período de tiempo especificado. No se permite interacción pública o privada con las personas involucradas, incluida la interacción no solicitada con quienes hacen cumplir el Código de Conducta, durante este período. Violar estos términos puede llevar a una suspensión permanente.
|
||||||
|
|
||||||
|
### 4. Suspensión permanente
|
||||||
|
|
||||||
|
Impacto comunitario: Demostrar un patrón de violación de los estándares de la comunidad, incluido el comportamiento inapropiado sostenido, acoso a una persona o agresión o desprecio hacia clases de individuos.
|
||||||
|
|
||||||
|
Consecuencia: Suspensión permanente de cualquier tipo de interacción pública dentro de la comunidad.
|
||||||
|
|
||||||
|
## Atribución
|
||||||
|
|
||||||
|
Este Código de Conducta está adaptado del [Contributor Covenant][homepage], versión 2.0, disponible en https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Las Guías de Impacto Comunitario se inspiraron en la [escala de aplicación del código de conducta de Mozilla](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
Para respuestas a preguntas comunes sobre este código de conducta, vea las preguntas frecuentes en https://www.contributor-covenant.org/faq. Traducciones disponibles en https://www.contributor-covenant.org/translations.
|
||||||
148
COMMIT_MESSAGE_GUIDELINES.es.md
Normal file
148
COMMIT_MESSAGE_GUIDELINES.es.md
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
# Guía para Mensajes de Commit
|
||||||
|
|
||||||
|
[Ver versión en inglés](./COMMIT_MESSAGE_GUIDELINES.md)
|
||||||
|
|
||||||
|
Un buen mensaje de commit debe ser descriptivo y aportar contexto sobre los cambios realizados. Esto facilita entender y revisar los cambios en el futuro.
|
||||||
|
|
||||||
|
## Recomendaciones
|
||||||
|
|
||||||
|
- Empieza con un resumen breve de los cambios del commit.
|
||||||
|
- Usa el modo imperativo en el resumen, como si dieras una instrucción. Por ejemplo, "Add feature" en lugar de "Added feature".
|
||||||
|
- Proporciona detalles adicionales en el cuerpo del mensaje, si es necesario: motivo del cambio, impacto, dependencias añadidas o eliminadas, etc.
|
||||||
|
- Mantén cada línea en 72 caracteres o menos para que sea fácil de leer en la salida de `git log`.
|
||||||
|
|
||||||
|
### Ejemplos de buenos mensajes
|
||||||
|
|
||||||
|
- "Add authentication feature for user login"
|
||||||
|
- "Fix bug causing application to crash on startup"
|
||||||
|
- "Update documentation for API endpoints"
|
||||||
|
|
||||||
|
Recordatorio: escribir mensajes de commit descriptivos ahorra tiempo en el futuro y ayuda a otras personas a entender los cambios hechos al código.
|
||||||
|
|
||||||
|
## Tipos de commit
|
||||||
|
|
||||||
|
A continuación, una lista (ampliable) de tipos de commit que puedes usar:
|
||||||
|
|
||||||
|
`feat`: Añade una característica nueva al proyecto
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
feat: Add multi-image upload support
|
||||||
|
```
|
||||||
|
|
||||||
|
`fix`: Corrige un error o problema en el proyecto
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
fix: Fix bug causing application to crash on startup
|
||||||
|
```
|
||||||
|
|
||||||
|
`docs`: Cambios en documentación
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
docs: Update documentation for API endpoints
|
||||||
|
```
|
||||||
|
|
||||||
|
`style`: Cambios cosméticos o de formato (colores, formateo de código, etc.)
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
style: Update colors and formatting
|
||||||
|
```
|
||||||
|
|
||||||
|
`refactor`: Cambios internos que no alteran el comportamiento, pero mejoran calidad/mantenibilidad
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
refactor: Remove unused code
|
||||||
|
```
|
||||||
|
|
||||||
|
`test`: Añadir o modificar tests
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
test: Add tests for new feature
|
||||||
|
```
|
||||||
|
|
||||||
|
`chore`: Cambios que no encajan en otras categorías (actualizar dependencias, configurar build, etc.)
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
chore: Update dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
`perf`: Mejoras de rendimiento
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
perf: Improve performance of image processing
|
||||||
|
```
|
||||||
|
|
||||||
|
`security`: Aborda temas de seguridad
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
security: Update dependencies to address security issues
|
||||||
|
```
|
||||||
|
|
||||||
|
`merge`: Fusiones de ramas
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
merge: Merge branch 'feature/branch-name' into develop
|
||||||
|
```
|
||||||
|
|
||||||
|
`revert`: Revertir un commit previo
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
revert: Revert "Add feature"
|
||||||
|
```
|
||||||
|
|
||||||
|
`build`: Cambios en el sistema de build o dependencias
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
build: Update dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
`ci`: Cambios en la integración continua (CI)
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
ci: Update CI configuration
|
||||||
|
```
|
||||||
|
|
||||||
|
`config`: Cambios en archivos de configuración
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
config: Update configuration files
|
||||||
|
```
|
||||||
|
|
||||||
|
`deploy`: Cambios en el proceso de despliegue
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
deploy: Update deployment scripts
|
||||||
|
```
|
||||||
|
|
||||||
|
`init`: Inicialización de repositorio o proyecto
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
init: Initialize project
|
||||||
|
```
|
||||||
|
|
||||||
|
`move`: Mover archivos o directorios
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
move: Move files to new directory
|
||||||
|
```
|
||||||
|
|
||||||
|
`rename`: Renombrar archivos o directorios
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
rename: Rename files
|
||||||
|
```
|
||||||
|
|
||||||
|
`remove`: Eliminar archivos o directorios
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
remove: Remove files
|
||||||
|
```
|
||||||
|
|
||||||
|
`update`: Actualización de código, dependencias u otros componentes
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
update: Update code
|
||||||
|
```
|
||||||
|
|
||||||
|
Estos son solo ejemplos; puedes definir tipos personalizados si los usas de forma consistente y con mensajes claros y descriptivos.
|
||||||
|
|
||||||
|
**Importante:** Si planeas usar un tipo de commit personalizado que no esté en la lista, añádelo aquí para que otras personas lo entiendan también. Crea un pull request para incluirlo en este archivo.
|
||||||
58
CONTRIBUTING.es.md
Normal file
58
CONTRIBUTING.es.md
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Guía para Contribuir a KooL Hyprland Projects (Arch)
|
||||||
|
|
||||||
|
[Ver versión en inglés](./CONTRIBUTING.md)
|
||||||
|
|
||||||
|
¡Gracias por tu interés en contribuir! Aceptamos correcciones de errores, nuevas características, mejoras de documentación y otras mejoras generales.
|
||||||
|
|
||||||
|
## Primeros pasos
|
||||||
|
|
||||||
|
1. Haz un fork del repositorio (rama `development`) en tu cuenta de GitHub.
|
||||||
|
- Botón **Fork** o [enlace directo](https://github.com/JaKooLit/Arch-Hyprland/fork).
|
||||||
|
- Desmarca la opción de copiar solo la rama `main` para incluir `development` y otras ramas.
|
||||||
|
|
||||||
|
2. Clona tu fork en tu equipo:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone --depth=1 -b development https://github.com/JaKooLit/Arch-Hyprland.git
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Crea una rama para tus cambios:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git checkout -b tu-rama
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Realiza tus cambios y crea un commit con mensaje descriptivo (sigue la [guía de commits](./COMMIT_MESSAGE_GUIDELINES.md)):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git commit -m "feat: add a new feature"
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Sube tu rama a tu fork:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git push origin tu-rama
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Abre un **pull request** contra `development`.
|
||||||
|
- Usa la [plantilla de PR](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/PULL_REQUEST_TEMPLATE.md) y añade etiquetas relevantes.
|
||||||
|
|
||||||
|
## Directrices
|
||||||
|
|
||||||
|
- Sigue el estilo de código del proyecto.
|
||||||
|
- Actualiza la documentación cuando sea necesario.
|
||||||
|
- Añade tests si aplica y verifica que pasen.
|
||||||
|
- Mantén el PR enfocado; evita cambios no relacionados.
|
||||||
|
- Revisa estos archivos útiles:
|
||||||
|
- [bug.yml](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/bug.yml)
|
||||||
|
- [feature.yml](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/feature.yml)
|
||||||
|
- [documentation-update.yml](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/documentation-update.yml)
|
||||||
|
- [PULL_REQUEST_TEMPLATE.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/PULL_REQUEST_TEMPLATE.md)
|
||||||
|
- [COMMIT_MESSAGE_GUIDELINES.md](./COMMIT_MESSAGE_GUIDELINES.md)
|
||||||
|
- [CONTRIBUTING.md](./CONTRIBUTING.md)
|
||||||
|
- [LICENSE](https://github.com/JaKooLit/Arch-Hyprland/blob/main/LICENSE.md)
|
||||||
|
- [README.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/README.md)
|
||||||
|
|
||||||
|
## Contacto
|
||||||
|
|
||||||
|
Para preguntas, usa [GitHub Discussions](https://github.com/JaKooLit/Arch-Hyprland/discussions) o el [Servidor de Discord](https://discord.gg/kool-tech-world).
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Contributing to Community Standards
|
# Contributing to KooL Hyprland Projects
|
||||||
|
|
||||||
Thank you for your interest in contributing to Community Standards! We welcome any contributions, including bug fixes, feature enhancements, documentation improvements, and other general improvements.
|
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.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@@ -55,10 +55,9 @@ Thank you for your interest in contributing to Community Standards! We welcome a
|
|||||||
- Make sure all tests pass or fully tested before submitting your changes.
|
- Make sure all tests pass or fully tested before submitting your changes.
|
||||||
- Keep your pull request focused and avoid including unrelated changes.
|
- Keep your pull request focused and avoid including unrelated changes.
|
||||||
- Remember to follow the following files before submitting your changes.
|
- Remember to follow the following files before submitting your changes.
|
||||||
- [bug_report.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/bug_report.md) - Use this template to create a report to help us improve.
|
- [bug.yml](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/bug.yml) - Use this template to create a report to help us improve.
|
||||||
- [feature_request.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/feature_request.md) - Use this template to suggest a feature for this project.
|
- [feature.yml](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/feature.yml) - Use this template to suggest a feature for this project.
|
||||||
- [documentation_update.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/documentation_update.md) - Use this template to propose a change to the documentation.
|
- [documentation-update.yml](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/documentation-update.yml) - Use this template to propose a change to the documentation.
|
||||||
- [custom.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/ISSUE_TEMPLATE/custom.md) - Use this template to submit a custom issue.
|
|
||||||
- [PULL_REQUEST_TEMPLATE.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/PULL_REQUEST_TEMPLATE.md) - Use this template to submit a pull request.
|
- [PULL_REQUEST_TEMPLATE.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/.github/PULL_REQUEST_TEMPLATE.md) - Use this template to submit a pull request.
|
||||||
- [COMMIT_MESSAGE_GUIDELINES.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/COMMIT_MESSAGE_GUIDELINES.md) - Read this file to learn about the commit message guidelines.
|
- [COMMIT_MESSAGE_GUIDELINES.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/COMMIT_MESSAGE_GUIDELINES.md) - Read this file to learn about the commit message guidelines.
|
||||||
- [CONTRIBUTING.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/CONTRIBUTING.md) - Read this file to learn about the contributing guidelines.
|
- [CONTRIBUTING.md](https://github.com/JaKooLit/Arch-Hyprland/blob/main/CONTRIBUTING.md) - Read this file to learn about the contributing guidelines.
|
||||||
@@ -67,4 +66,4 @@ Thank you for your interest in contributing to Community Standards! We welcome a
|
|||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
If you have any questions, feel free to contact via [GitHub Discussions](https://github.com/JaKooLit/Arch-Hyprland/discussions) or [Through Discord Server](https://discord.gg/V2SJ92vbEN)
|
If you have any questions, feel free to contact via [GitHub Discussions](https://github.com/JaKooLit/Arch-Hyprland/discussions) or [Through Discord Server](https://discord.gg/kool-tech-world)
|
||||||
|
|||||||
BIN
Installer.png
BIN
Installer.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 MiB |
221
README.md
221
README.md
@@ -6,8 +6,7 @@
|
|||||||
<img src="https://raw.githubusercontent.com/JaKooLit/Hyprland-Dots/main/assets/latte.png" width="400" />
|
<img src="https://raw.githubusercontent.com/JaKooLit/Hyprland-Dots/main/assets/latte.png" width="400" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
   <a href="https://discord.gg/9JEgZsfhex"> <img src="https://img.shields.io/discord/1151869464405606400?style=for-the-badge&logo=discord&color=cba6f7&link=https%3A%2F%2Fdiscord.gg%9JEgZsfhex"> </a>
|
   <a href="https://discord.gg/kool-tech-world"> <img src="https://img.shields.io/discord/1151869464405606400?style=for-the-badge&logo=discord&color=cba6f7&link=https%3A%2F%2Fdiscord.gg%kool-tech-world"> </a>
|
||||||
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,7 +33,7 @@
|
|||||||
<a href="https://github.com/JaKooLit/Hyprland-Dots/wiki"><kbd> <br> Wiki <br> </kbd></a>  
|
<a href="https://github.com/JaKooLit/Hyprland-Dots/wiki"><kbd> <br> Wiki <br> </kbd></a>  
|
||||||
<a href="https://github.com/JaKooLit/Hyprland-Dots/wiki/Keybinds"><kbd> <br> Keybinds <br> </kbd></a>  
|
<a href="https://github.com/JaKooLit/Hyprland-Dots/wiki/Keybinds"><kbd> <br> Keybinds <br> </kbd></a>  
|
||||||
<a href="https://github.com/JaKooLit/Hyprland-Dots/wiki/FAQ"><kbd> <br> FAQ <br> </kbd></a>  
|
<a href="https://github.com/JaKooLit/Hyprland-Dots/wiki/FAQ"><kbd> <br> FAQ <br> </kbd></a>  
|
||||||
<a href="https://discord.gg/9JEgZsfhex"><kbd> <br> Discord <br> </kbd></a>
|
<a href="https://discord.gg/kool-tech-world"><kbd> <br> Discord <br> </kbd></a>
|
||||||
</div><br>
|
</div><br>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -49,82 +48,79 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
https://github.com/JaKooLit/Hyprland-Dots/assets/85185940/50d53755-0f11-45d6-9913-76039e84a2cd
|
https://github.com/user-attachments/assets/49bc12b2-abaf-45de-a21c-67aacd9bb872
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Gallery and Videos
|
### Gallery and Videos
|
||||||
|
|
||||||
- latest Ksk royal's [youtube video](https://youtu.be/lR7EtbVYWuc?si=eNHVSbStKS1eNVly) installation
|
#### 🎥 Feb 2025 Video explanation of installation with preset
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>
|
|
||||||
📷 Screenshots
|
|
||||||
</summary>
|
|
||||||
<p align="center">
|
|
||||||
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-ScreenShots/Arch-v2/Arch-Default-Layout.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/dark-theme.png" />
|
|
||||||
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/Light-theme.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-ScreenShots/Arch-v2/Another-Screenshot.png"" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
- [YOUTUBE-LINK](https://youtu.be/wQ70lo7P6vA?si=_QcbrNKh_Bg0L3wC)
|
||||||
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/default-waybar.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/rofi.png" />
|
- [YOUTUBE-Hyprland-Playlist](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t)
|
||||||
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/wlogout-dark.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/showcase2.png"" />
|
|
||||||
<img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/waybar-layout.png" /> <img align="center" width="49%" src="https://raw.githubusercontent.com/JaKooLit/screenshots/main/Hyprland-Dots-Showcase/waybar-style.png"" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
#### 📷 More Screenshots on v2 [`Link`](https://github.com/JaKooLit/screenshots/tree/main/Hyprland-Dots-Showcase) and [`Previous-Screenshots`](https://github.com/JaKooLit/screenshots/tree/main/Hyprland-ScreenShots/Arch-v2) and
|
|
||||||
|
|
||||||
|
|
||||||
#### ✨ A video walk through my dotfiles[`Link`](https://youtu.be/fO-RBHvVEcc?si=ijqxxnq_DLiyO8xb)
|
|
||||||
#### ✨ A video walk on My Hyprland-Dots v2[`Link`](https://youtu.be/yaVurRoXc-s?si=iDnBC5S3thPBX3ZE)
|
|
||||||
|
|
||||||
#### 📽️ youtube video showcase: [`Link`](https://youtu.be/W2UFwkgdwNo)
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### 🪧🪧🪧 ANNOUNCEMENT 🪧🪧🪧
|
### 🪧🪧🪧 ANNOUNCEMENT 🪧🪧🪧
|
||||||
|
|
||||||
- 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.
|
- 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.
|
||||||
- Hyprland-Dots use are constantly evolving / improving. you can check CHANGELOGS here [`Hyprland-Dots-Changelogs`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Changelogs)
|
- Hyprland-Dots use are constantly evolving / improving. you can check CHANGELOGS here [`Hyprland-Dots-Changelogs`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Changelogs)
|
||||||
- Since the Hyprland-Dots are evolving, some of the screenshots maybe old
|
- Since the Hyprland-Dots are evolving, some of the screenshots maybe old
|
||||||
- the wallpaper offered to be downloaded towards the end is from this [`REPO`](https://github.com/JaKooLit/Wallpaper-Bank)
|
- the wallpaper offered to be downloaded towards the end is from this [`REPO`](https://github.com/JaKooLit/Wallpaper-Bank)
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script. This script does NOT include uninstallation of packages
|
> install a backup tool like `snapper` or `timeshift`. and Backup your system before installing hyprland using this script (HIGHLY RECOMMENDED)
|
||||||
|
|
||||||
> [!NOTE]
|
> [!CAUTION]
|
||||||
> Main reason why I have not included an uninstallation script is simple. Some packages maybe already installed on your system by default. If I create an uninstall script with packages that I have set to install, you may end up a unrecoverable system.
|
|
||||||
|
|
||||||
> [!CAUTION]
|
|
||||||
> Download this script on a directory where you have write permissions. ie. HOME. Or any directory within your home directory. Else script will fail
|
> Download this script on a directory where you have write permissions. ie. HOME. Or any directory within your home directory. Else script will fail
|
||||||
|
|
||||||
#### 🆕 Prerequisites
|
#### 🆕 Prerequisites
|
||||||
|
|
||||||
- This install script is intended for atleast Server type / Minimal Arch Linux installed.
|
- This install script is intended for atleast Server type / Minimal Arch Linux installed.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> 🔘 Pipewire and Pipewire audio
|
> 🔘 Pipewire and Pipewire audio
|
||||||
- This script will install pipewire and will also disable or will uninstall pulseaudio. If you dont want it, edit install.sh, about line 191 and comment the line `execute_script "pipewire.sh"` or you can simply just delete pipewire.sh in install-scripts directory before installing.
|
|
||||||
|
- This script will install pipewire and will also disable or will uninstall pulseaudio. If you dont want it, edit install.sh, about line 191 and comment the line `execute_script "pipewire.sh"` or you can simply just delete pipewire.sh in install-scripts directory before installing.
|
||||||
|
|
||||||
#### ✨ Customize the packages to be installed
|
#### ✨ Customize the packages to be installed
|
||||||
|
|
||||||
- inside the install-scripts directory, you can edit 00-hypr-pkgs.sh. Care though as the Hyprland Dots may not work properly!
|
- inside the install-scripts directory, you can edit 00-hypr-pkgs.sh. Care though as the Hyprland Dots may not work properly!
|
||||||
|
|
||||||
#### 💫 SDDM and GTK Themes offered
|
#### 🚩 Switching to SDDM assuming you have GDM installed and running
|
||||||
- If you opted to install SDDM theme, here's the [`LINK`](https://github.com/JaKooLit/simple-sddm-2)
|
|
||||||
- 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.
|
- if you really want switch to SDDM from GDM, you need to disable the gdm first.
|
||||||
|
- `sudo systemctl disable gdm.service` then reboot
|
||||||
|
- 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.
|
||||||
|
- NOTE: Distro-Hyprland is Arch-Hyprland, or Fedora-Hyprland .. depends on which install scripts you downloaded.
|
||||||
|
|
||||||
|
#### 💫 SDDM and GTK Themes offered
|
||||||
|
|
||||||
|
- If you opted to install SDDM theme, here's the [`LINK`](https://github.com/JaKooLit/simple-sddm-2) which is a modified fork of [`LINK`](https://github.com/Keyitdev/sddm-astronaut-theme)
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
#### 👀 Nvidia GPU Owners.
|
||||||
|
|
||||||
#### 👀 NVidia GPU Owners.
|
|
||||||
- By default, nvidia-dkms will be installed. and only supports GTX 900 and newer. If required to install older driver, edit the nvidia.sh in install-scripts directory
|
- By default, nvidia-dkms will be installed. and only supports GTX 900 and newer. If required to install older driver, edit the nvidia.sh in install-scripts directory
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> If you want to use nouveau driver, choose N when asked if you have nvidia gpu. This is because the nvidia installer part, it will blacklist nouveau. Hyprland will still be installed but it will skip blacklisting nouveau.
|
> 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.
|
||||||
|
|
||||||
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
|
- After installation, check [`THIS`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Notes_to_remember#--for-nvidia-gpu-users)
|
||||||
|
|
||||||
|
## ✨ Auto clone and install
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> If you are using FISH SHELL, DO NOT use this function. Clone and ran install.sh instead
|
||||||
|
|
||||||
|
- you can use this command to automatically clone the installer and ran the script for you
|
||||||
|
- NOTE: `curl` package is required before running this command
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sh <(curl -L https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/auto-install.sh)
|
||||||
|
```
|
||||||
|
|
||||||
## ✨ to use this script
|
## ✨ to use this script
|
||||||
> clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
|
|
||||||
|
|
||||||
>[!IMPORTANT]
|
- clone this repo (latest commit only) to reduce file size download by using git. Change directory, make executable and run the script
|
||||||
> Make sure you have base-devel installed
|
|
||||||
|
|
||||||
- Without base-devel installed, script will fail
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland
|
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland
|
||||||
@@ -133,116 +129,169 @@ chmod +x install.sh
|
|||||||
./install.sh
|
./install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
<p align="center">
|
### 💥 💥 UNINSTALL SCRIPT / Removal of Config Files
|
||||||
<img align="center" width="100%" src="https://raw.githubusercontent.com/JaKooLit/Arch-Hyprland/main/Installer.png" />
|
|
||||||
|
- 11 March 2025, due to popular request, created a guided `uninstall.sh` script. USE this with caution as it may render your system unstable.
|
||||||
|
- I will not be responsible if your system breaks
|
||||||
|
- The best still to revert to previous state of your system is via `timeshift or snapper`
|
||||||
|
|
||||||
#### ✨ for ZSH and OH-MY-ZSH installation
|
#### ✨ for ZSH and OH-MY-ZSH installation
|
||||||
|
|
||||||
> installer should auto change your default shell to zsh. However, if it does not, do this
|
> installer should auto change your default shell to zsh. However, if it does not, do this
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chsh -s $(which zsh)
|
chsh -s $(which zsh)
|
||||||
zsh
|
zsh
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
```
|
```
|
||||||
|
|
||||||
- reboot or logout
|
- reboot or logout
|
||||||
- by default `funky` theme is installed. You can find more themes from this [`OH-MY-ZSH-THEMES`](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes)
|
- 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)
|
||||||
- to change the theme, `SUPER SHIFT O` , choose desired theme, and close and open terminal.
|
- to change the theme, `SUPER SHIFT O` , choose desired theme, and close and open terminal.
|
||||||
- or manually edit `~/.zshrc` . Look for ZSH_THEME="desired theme"
|
- or manually edit `~/.zshrc` . Look for ZSH_THEME="desired theme"
|
||||||
|
|
||||||
|
#### 🎞️ AGS Overview DEMO
|
||||||
|
|
||||||
|
- in case you wonder, here is a short demo of AGS overview [Youtube LINK](https://youtu.be/zY5SLNPBJTs)
|
||||||
|
|
||||||
#### ✨ TO DO once installation done and dotfiles copied
|
#### ✨ TO DO once installation done and dotfiles copied
|
||||||
- ~~if you opted to install gtk themes, to apply the theme and icon, press the dark/light button (beside the padlock). To apply Bibata modern ice cursor, launch nwg-look (GTK Settings) through rofi.~~ Hyprland-Dots v2.1.18, initial boot file will attempt to apply GTK themes,cursor, and icons. You can tweak more using nwg-look (GTK-Settings) utility
|
|
||||||
|
|
||||||
- SUPER H for HINT or click on the waybar HINT! Button
|
|
||||||
- Head over to [FAQ](https://github.com/JaKooLit/Hyprland-Dots/wiki/FAQ) and [TIPS](https://github.com/JaKooLit/Hyprland-Dots/wiki/TIPS)
|
|
||||||
|
|
||||||
|
- SUPER H for HINT or click on the waybar HINT! Button
|
||||||
|
- Head over to [KooL Hyprland WIKI](https://github.com/JaKooLit/Hyprland-Dots/wiki)
|
||||||
|
|
||||||
#### 🙋 Got a questions regarding the Hyprland Dots or configurations? 🙋
|
#### 🙋 Got a questions regarding the Hyprland Dots or configurations? 🙋
|
||||||
|
|
||||||
- Head over to wiki Link [`WIKI`](https://github.com/JaKooLit/Hyprland-Dots/wiki)
|
- Head over to wiki Link [`WIKI`](https://github.com/JaKooLit/Hyprland-Dots/wiki)
|
||||||
|
|
||||||
#### ⌨ Keybinds
|
#### ⌨ Keybinds
|
||||||
- Keybinds [`CLICK`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Keybinds)
|
|
||||||
> [!TIP]
|
|
||||||
> KooL's Dots v2.3.7 has a searchable keybind function via rofi. (SUPER SHIFT K) or right click the `HINTS` waybar button
|
|
||||||
|
|
||||||
#### 🙋 👋 Having issues or questions?
|
- Keybinds [`CLICK`](https://github.com/JaKooLit/Hyprland-Dots/wiki/Keybinds)
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> KooL Hyprland has a searchable keybind function via rofi. (SUPER SHIFT K) or right click the `HINTS` waybar button
|
||||||
|
|
||||||
|
#### 🔄 switching between Hyprland-git and none Hyprland-git
|
||||||
|
|
||||||
|
- you can use my prepared script [`LINK`](https://github.com/JaKooLit/Arch-Hyprland/tree/main/assets/hyprland-install)
|
||||||
|
- Readme is also there
|
||||||
|
|
||||||
|
#### 🙋 👋 Having issues or questions?
|
||||||
|
|
||||||
- for the install part, kindly open issue on this repo
|
- for the install part, kindly open issue on this repo
|
||||||
- for the Pre-configured Hyprland dots / configuration, submit issue [`here`](https://github.com/JaKooLit/Hyprland-Dots/issues)
|
- for the Pre-configured Hyprland dots / configuration, submit issue [`here`](https://github.com/JaKooLit/Hyprland-Dots/issues)
|
||||||
|
|
||||||
#### 🔧 Proper way to re-installing a particular script from install-scripts directory
|
#### 🔧 Proper way to re-installing a particular script from install-scripts directory
|
||||||
- CD into Arch-Hyprland directory and then ran the below command.
|
|
||||||
|
- CD into Arch-Hyprland directory and then ran the below command.
|
||||||
- i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or
|
- i.e. `./install-scripts/gtk-themes.sh` - For reinstall GTK Themes or
|
||||||
- `./install-scripts/sddm.sh` - For reinstall sddm
|
- `./install-scripts/sddm.sh` - For reinstall sddm
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> DO NOT cd into install-scripts directory as script will most likely to fail
|
> DO NOT cd into install-scripts directory as script will most likely to fail
|
||||||
|
#### 🛠️ Optional system monitor scripts (cross-distro compatible)
|
||||||
|
- These installer helpers will set up user-level services and install required packages automatically.
|
||||||
|
- Works on Fedora, Arch, and other distributions using standard tools.
|
||||||
|
- Re-run any time from the repo root (do not `cd` into `install-scripts`).
|
||||||
|
|
||||||
|
- `./install-scripts/battery-monitor.sh`
|
||||||
|
- Installs: `acpi`, `libnotify`
|
||||||
|
- Creates: `~/.config/hypr/scripts/battery-monitor.sh` and user service `battery-monitor.service`
|
||||||
|
- Manage: `systemctl --user status|start|stop battery-monitor`
|
||||||
|
- `./install-scripts/disk-monitor.sh`
|
||||||
|
- Installs: `libnotify`
|
||||||
|
- Creates: `~/.config/hypr/scripts/disk-monitor.sh` and user service `disk-monitor.service`
|
||||||
|
- Manage: `systemctl --user status|start|stop disk-monitor`
|
||||||
|
- `./install-scripts/temp-monitor.sh`
|
||||||
|
- Installs: `lm_sensors`, `libnotify`
|
||||||
|
- Detects sensors (runs `sudo sensors-detect --auto` once)
|
||||||
|
- Creates: `~/.config/hypr/scripts/temp-monitor.sh` and user service `temp-monitor.service`
|
||||||
|
- Manage: `systemctl --user status|start|stop temp-monitor`
|
||||||
|
> Packages above are installed by the respective installer scripts; no manual action is required. If you prefer package pre-install via the main package list, ensure `acpi`, `lm_sensors`, and `libnotify` are present in your setup.
|
||||||
|
|
||||||
#### 🛣️ Roadmap:
|
#### 🛣️ Roadmap:
|
||||||
- ~~[ ] Install zsh and oh-my-zsh without necessary steps above~~ DONE
|
|
||||||
- [ ] possibly adding gruvbox themes, cursors, icons
|
- [ ] show a progress bar in downloading and compiling part when installing outside AUR or official repo
|
||||||
|
|
||||||
#### ❗ some known issues for nvidia
|
#### ❗ some known issues for nvidia
|
||||||
- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was
|
|
||||||
```
|
- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was
|
||||||
|
|
||||||
|
```
|
||||||
while in sddm press ctrl+alt+F2 or F3
|
while in sddm press ctrl+alt+F2 or F3
|
||||||
log into your account
|
log into your account
|
||||||
`lspci -nn`, find the id of your nvidia card
|
`lspci -nn`, find the id of your nvidia card
|
||||||
`ls /dev/dri/by-path` find the matching id
|
`ls /dev/dri/by-path` find the matching id
|
||||||
`ls -l /dev/dri/by-path` to check where the symlink points to
|
`ls -l /dev/dri/by-path` to check where the symlink points to
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
- 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
|
|
||||||
|
- 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
|
||||||
|
|
||||||
- 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)
|
- 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)
|
||||||
|
|
||||||
|
|
||||||
- reports from a member of discord for Nvidia for additional env's
|
- reports from a member of discord for Nvidia for additional env's
|
||||||
- remove # from the following env's on
|
- remove # from the following env's on
|
||||||
|
|
||||||
```
|
```
|
||||||
env = GBM_BACKEND,nvidia-drm
|
env = GBM_BACKEND,nvidia-drm
|
||||||
env = WLR_RENDERER_ALLOW_SOFTWARE,1
|
env = WLR_RENDERER_ALLOW_SOFTWARE,1
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ❗ other known issues
|
#### ❗ other known issues
|
||||||
|
|
||||||
- [ ] If you are using this script on an Arch-Based distros like Arco linux, or cachy OS or EOS or Manjaro, make sure to install pipewire, pipewire-pulse & pipewire-audio first. Arco Linux, on some of their ISO's still shipped with pulseaudio as audio backend. You will experience getting "stuck" on installation.
|
- [ ] If you are using this script on an Arch-Based distros like Arco linux, or cachy OS or EOS or Manjaro, make sure to install pipewire, pipewire-pulse & pipewire-audio first. Arco Linux, on some of their ISO's still shipped with pulseaudio as audio backend. You will experience getting "stuck" on installation.
|
||||||
- [ ] To install pipewire and its services , `sudo pacman -S pipewire wireplumber pipewire-audio pipewire-pulse` . When prompted, remove / replace pulseaudio. After that, you can ran `./install.sh`
|
- [ ] To install pipewire and its services , `sudo pacman -S pipewire wireplumber pipewire-audio pipewire-pulse` . When prompted, remove / replace pulseaudio. After that, you can ran `./install.sh`
|
||||||
- [ ] installing of cava-git on a newly installed Arch makes the install keep hanging. Switched back to cava. After booting and logged in, if cava dont work, replace it cava-git `yay -S cava-git` or `paru -S cava-git`
|
- [ ] installing of cava-git on a newly installed Arch makes the install keep hanging. Switched back to cava. After booting and logged in, if cava dont work, replace it cava-git `yay -S cava-git` or `paru -S cava-git`
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Auto start of Hyprland after login (no SDDM or GDM or any login managers)
|
> Auto start of Hyprland after login (no SDDM or GDM or any login managers)
|
||||||
- [ ] 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.
|
- [ ] 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.
|
||||||
- [ ] to avoid this, I disabled it. You can re-enable again by editing `~/.zprofile` . Remove all the # on the first lines
|
- [ ] to avoid this, I disabled it. You can re-enable again by editing `~/.zprofile` . Remove all the # on the first lines
|
||||||
- [ ] 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 pacman -Rns rofi` . Install rofi-wayland with `sudo pacman -S rofi-wayland`. Rofi-wayland is compatible with x11 so no need to worry.
|
- [ ] 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 pacman -Rns rofi` . Install rofi-wayland with `sudo pacman -S rofi-wayland`. Rofi-wayland is compatible with x11 so no need to worry.
|
||||||
|
|
||||||
|
|
||||||
#### 🫥 Improving performance for Older Nvidia Cards using driver 470
|
#### 🫥 Improving performance for Older Nvidia Cards using driver 470
|
||||||
- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
|
|
||||||
|
- [`SEE HERE`](https://github.com/JaKooLit/Hyprland-Dots/discussions/123#discussion-6035205)
|
||||||
|
|
||||||
#### 📒 Final Notes
|
#### 📒 Final Notes
|
||||||
- join my discord channel [`Discord`](https://discord.com/invite/9JEgZsfhex)
|
|
||||||
|
- join my discord channel [`Discord`](https://discord.com/invite/kool-tech-world)
|
||||||
- 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 :)
|
- 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 :)
|
||||||
|
|
||||||
|
#### ✍️ Contributing
|
||||||
|
|
||||||
|
|
||||||
#### ⏩ Contributing
|
|
||||||
- As stated above, these script does not contain actual config files. These are only the installer of packages
|
- As stated above, these script does not contain actual config files. These are only the installer of packages
|
||||||
- The development branch of this script is pulling the latest "stable" releases of the Hyprland-Dotfiles.
|
- If you want to contribute and/or test the Hyprland-Dotfiles (development branch), [`Hyprland-Dots-Development`](https://github.com/JaKooLit/Hyprland-Dots/tree/development)
|
||||||
- If you want to contribute and/or test the Hyprland-Dotfiles (development branch), [`Hyprland-Dots-Development`](https://github.com/JaKooLit/Hyprland-Dots/tree/development)
|
- 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
|
||||||
|
- Want to contribute on This Installer? Click [`HERE`](https://github.com/JaKooLit/Arch-Hyprland/blob/main/CONTRIBUTING.md) for a guide how to contribute
|
||||||
|
|
||||||
#### 👍👍👍 Thanks and Credits!
|
#### 👍👍👍 Thanks and Credits!
|
||||||
|
|
||||||
- [`Hyprland`](https://hyprland.org/) Of course to Hyprland and @vaxerski for this awesome Dynamic Tiling Manager.
|
- [`Hyprland`](https://hyprland.org/) Of course to Hyprland and @vaxerski for this awesome Dynamic Tiling Manager.
|
||||||
|
|
||||||
## 💖 Support
|
## 💖 Support
|
||||||
|
|
||||||
- a Star on my Github repos would be nice 🌟
|
- a Star on my Github repos would be nice 🌟
|
||||||
|
|
||||||
- Subscribe to my Youtube Channel [YouTube](https://www.youtube.com/@Ja.KooLit)
|
- Subscribe to my Youtube Channel [YouTube](https://www.youtube.com/@Ja.KooLit)
|
||||||
|
|
||||||
- You can also buy me Coffee Through ko-fi.com or Coffee.com 🤩
|
- you can also give support through coffee's or btc 😊
|
||||||
|
|
||||||
<a href='https://ko-fi.com/jakoolit' target='_blank'><img height='35' style='border:0px;height:46px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' />
|
[](https://ko-fi.com/jakoolit)
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
[](https://www.buymeacoffee.com/JaKooLit)
|
[](https://www.buymeacoffee.com/JaKooLit)
|
||||||
|
|
||||||
#### 📹 Youtube videos (Click to view and watch the playlist) 📹
|
Or you can donate cryto on my btc wallet :)
|
||||||
|
|
||||||
|
> 1N3MeV2dsX6gQB42HXU6MF2hAix1mqjo8i
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
#### 📹 Youtube videos (Click to view and watch the playlist) 📹
|
||||||
|
|
||||||
[](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t)
|
[](https://youtube.com/playlist?list=PLDtGd5Fw5_GjXCznR0BzCJJDIQSZJRbxx&si=iaNjLulFdsZ6AV-t)
|
||||||
|
|
||||||
|
|
||||||
## 🥰🥰 💖💖 👍👍👍
|
## 🥰🥰 💖💖 👍👍👍
|
||||||
|
|
||||||
[](https://starchart.cc/JaKooLit/Arch-Hyprland)
|
[](https://starchart.cc/JaKooLit/Arch-Hyprland)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
ZSH_THEME="funky"
|
ZSH_THEME="agnosterzak"
|
||||||
|
|
||||||
plugins=(
|
plugins=(
|
||||||
git
|
git
|
||||||
@@ -19,15 +19,18 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
|
|
||||||
# Display Pokemon-colorscripts
|
# Display Pokemon-colorscripts
|
||||||
# Project page: https://gitlab.com/phoneybadger/pokemon-colorscripts#on-other-distros-and-macos
|
# Project page: https://gitlab.com/phoneybadger/pokemon-colorscripts#on-other-distros-and-macos
|
||||||
#pokemon-colorscripts --no-title -s -r
|
#pokemon-colorscripts --no-title -s -r #without fastfetch
|
||||||
|
#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 -
|
||||||
|
|
||||||
# fastfetch. Will be disabled if above colorscript was chosen to install
|
# fastfetch. Will be disabled if above colorscript was chosen to install
|
||||||
fastfetch -c $HOME/.config/fastfetch/config-compact.jsonc
|
fastfetch -c $HOME/.config/fastfetch/config-compact.jsonc
|
||||||
|
|
||||||
# Set-up icons for files/folders in terminal
|
# Set-up icons for files/directories in terminal using lsd
|
||||||
alias ls='eza -a --icons'
|
alias ls='lsd'
|
||||||
alias ll='eza -al --icons'
|
alias l='ls -l'
|
||||||
alias lt='eza -a --tree --level=1 --icons'
|
alias la='ls -a'
|
||||||
|
alias lla='ls -la'
|
||||||
|
alias lt='ls --tree'
|
||||||
|
|
||||||
# Set-up FZF key bindings (CTRL R for fuzzy history finder)
|
# Set-up FZF key bindings (CTRL R for fuzzy history finder)
|
||||||
source <(fzf --zsh)
|
source <(fzf --zsh)
|
||||||
|
|||||||
370
assets/add_zsh_theme/agnosterzak.zsh-theme
Normal file
370
assets/add_zsh_theme/agnosterzak.zsh-theme
Normal file
@@ -0,0 +1,370 @@
|
|||||||
|
# vim:ft=zsh ts=2 sw=2 sts=2
|
||||||
|
#
|
||||||
|
# agnoster's Theme - https://gist.github.com/3712874
|
||||||
|
# A Powerline-inspired theme for ZSH
|
||||||
|
#
|
||||||
|
# # README
|
||||||
|
#
|
||||||
|
# In order for this theme to render correctly, you will need a
|
||||||
|
# [Powerline-patched font](https://gist.github.com/1595572).
|
||||||
|
#
|
||||||
|
# In addition, I recommend the
|
||||||
|
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
|
||||||
|
# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
|
||||||
|
# it has significantly better color fidelity.
|
||||||
|
#
|
||||||
|
# # Goals
|
||||||
|
#
|
||||||
|
# The aim of this theme is to only show you *relevant* information. Like most
|
||||||
|
# prompts, it will only show git information when in a git working directory.
|
||||||
|
# However, it goes a step further: everything from the current user and
|
||||||
|
# hostname to whether the last call exited with an error to whether background
|
||||||
|
# jobs are running in this shell will all be displayed automatically when
|
||||||
|
# appropriate.
|
||||||
|
|
||||||
|
### Segment drawing
|
||||||
|
# A few utility functions to make it easy and re-usable to draw segmented prompts
|
||||||
|
|
||||||
|
CURRENT_BG='NONE'
|
||||||
|
|
||||||
|
# Characters
|
||||||
|
SEGMENT_SEPARATOR="\ue0b0"
|
||||||
|
PLUSMINUS="\u00b1"
|
||||||
|
BRANCH="\ue0a0"
|
||||||
|
DETACHED="\u27a6"
|
||||||
|
CROSS="\u2718"
|
||||||
|
LIGHTNING="\u26a1"
|
||||||
|
GEAR="\u2699"
|
||||||
|
|
||||||
|
# Begin a segment
|
||||||
|
# Takes two arguments, background and foreground. Both can be omitted,
|
||||||
|
# rendering default background/foreground.
|
||||||
|
prompt_segment() {
|
||||||
|
local bg fg
|
||||||
|
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
||||||
|
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
||||||
|
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
||||||
|
print -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
||||||
|
else
|
||||||
|
print -n "%{$bg%}%{$fg%} "
|
||||||
|
fi
|
||||||
|
CURRENT_BG=$1
|
||||||
|
[[ -n $3 ]] && print -n $3
|
||||||
|
}
|
||||||
|
|
||||||
|
# End the prompt, closing any open segments
|
||||||
|
prompt_end() {
|
||||||
|
if [[ -n $CURRENT_BG ]]; then
|
||||||
|
print -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
|
||||||
|
else
|
||||||
|
print -n "%{%k%}"
|
||||||
|
fi
|
||||||
|
print -n "%{%f%}"
|
||||||
|
CURRENT_BG=''
|
||||||
|
}
|
||||||
|
|
||||||
|
### Prompt components
|
||||||
|
# Each component will draw itself, and hide itself if no information needs to be shown
|
||||||
|
|
||||||
|
# Context: user@hostname (who am I and where am I)
|
||||||
|
prompt_context() {
|
||||||
|
if [[ -n "$SSH_CLIENT" ]]; then
|
||||||
|
prompt_segment magenta white "%{$fg_bold[white]%(!.%{%F{white}%}.)%}$USER@%m%{$fg_no_bold[white]%}"
|
||||||
|
else
|
||||||
|
prompt_segment yellow magenta "%{$fg_bold[magenta]%(!.%{%F{magenta}%}.)%}@$USER%{$fg_no_bold[magenta]%}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Battery Level
|
||||||
|
prompt_battery() {
|
||||||
|
HEART='♥ '
|
||||||
|
|
||||||
|
if [[ $(uname) == "Darwin" ]] ; then
|
||||||
|
|
||||||
|
function battery_is_charging() {
|
||||||
|
[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_pct() {
|
||||||
|
local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"
|
||||||
|
typeset -F maxcapacity=$(echo $smart_battery_status | grep '^.*"MaxCapacity"\ =\ ' | sed -e 's/^.*"MaxCapacity"\ =\ //')
|
||||||
|
typeset -F currentcapacity=$(echo $smart_battery_status | grep '^.*"CurrentCapacity"\ =\ ' | sed -e 's/^.*CurrentCapacity"\ =\ //')
|
||||||
|
integer i=$(((currentcapacity/maxcapacity) * 100))
|
||||||
|
echo $i
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_pct_remaining() {
|
||||||
|
if battery_is_charging ; then
|
||||||
|
battery_pct
|
||||||
|
else
|
||||||
|
echo "External Power"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_time_remaining() {
|
||||||
|
local smart_battery_status="$(ioreg -rc "AppleSmartBattery")"
|
||||||
|
if [[ $(echo $smart_battery_status | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
|
||||||
|
timeremaining=$(echo $smart_battery_status | grep '^.*"AvgTimeToEmpty"\ =\ ' | sed -e 's/^.*"AvgTimeToEmpty"\ =\ //')
|
||||||
|
if [ $timeremaining -gt 720 ] ; then
|
||||||
|
echo "::"
|
||||||
|
else
|
||||||
|
echo "~$((timeremaining / 60)):$((timeremaining % 60))"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
b=$(battery_pct_remaining)
|
||||||
|
if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
|
||||||
|
if [ $b -gt 50 ] ; then
|
||||||
|
prompt_segment green white
|
||||||
|
elif [ $b -gt 20 ] ; then
|
||||||
|
prompt_segment yellow white
|
||||||
|
else
|
||||||
|
prompt_segment red white
|
||||||
|
fi
|
||||||
|
echo -n "%{$fg_bold[white]%}$HEART$(battery_pct_remaining)%%%{$fg_no_bold[white]%}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(uname) == "Linux" && -d /sys/module/battery ]] ; then
|
||||||
|
|
||||||
|
function battery_is_charging() {
|
||||||
|
! [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_pct() {
|
||||||
|
if (( $+commands[acpi] )) ; then
|
||||||
|
echo "$(acpi | cut -f2 -d ',' | tr -cd '[:digit:]')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_pct_remaining() {
|
||||||
|
if [ ! $(battery_is_charging) ] ; then
|
||||||
|
battery_pct
|
||||||
|
else
|
||||||
|
echo "External Power"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function battery_time_remaining() {
|
||||||
|
if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
|
||||||
|
echo $(acpi | cut -f3 -d ',')
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
b=$(battery_pct_remaining)
|
||||||
|
if [[ $(acpi 2&>/dev/null | grep -c '^Battery.*Discharging') -gt 0 ]] ; then
|
||||||
|
if [ $b -gt 40 ] ; then
|
||||||
|
prompt_segment green white
|
||||||
|
elif [ $b -gt 20 ] ; then
|
||||||
|
prompt_segment yellow white
|
||||||
|
else
|
||||||
|
prompt_segment red white
|
||||||
|
fi
|
||||||
|
echo -n "%{$fg_bold[white]%}$HEART$(battery_pct_remaining)%%%{$fg_no_bold[white]%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Git: branch/detached head, dirty status
|
||||||
|
prompt_git() {
|
||||||
|
#«»±˖˗‑‐‒ ━ ✚‐↔←↑↓→↭⇎⇔⋆━◂▸◄►◆☀★☗☊✔✖❮❯⚑⚙
|
||||||
|
local PL_BRANCH_CHAR
|
||||||
|
() {
|
||||||
|
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
|
||||||
|
PL_BRANCH_CHAR="$BRANCH"
|
||||||
|
}
|
||||||
|
local ref dirty mode repo_path clean has_upstream
|
||||||
|
local modified untracked added deleted tagged stashed
|
||||||
|
local ready_commit git_status bgclr fgclr
|
||||||
|
local commits_diff commits_ahead commits_behind has_diverged to_push to_pull
|
||||||
|
|
||||||
|
repo_path=$(git rev-parse --git-dir 2>/dev/null)
|
||||||
|
|
||||||
|
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||||
|
dirty=$(parse_git_dirty)
|
||||||
|
git_status=$(git status --porcelain 2> /dev/null)
|
||||||
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
|
||||||
|
if [[ -n $dirty ]]; then
|
||||||
|
clean=''
|
||||||
|
bgclr='yellow'
|
||||||
|
fgclr='magenta'
|
||||||
|
else
|
||||||
|
clean=' ✔'
|
||||||
|
bgclr='green'
|
||||||
|
fgclr='white'
|
||||||
|
fi
|
||||||
|
|
||||||
|
local upstream=$(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} 2> /dev/null)
|
||||||
|
if [[ -n "${upstream}" && "${upstream}" != "@{upstream}" ]]; then has_upstream=true; fi
|
||||||
|
|
||||||
|
local current_commit_hash=$(git rev-parse HEAD 2> /dev/null)
|
||||||
|
|
||||||
|
local number_of_untracked_files=$(\grep -c "^??" <<< "${git_status}")
|
||||||
|
# if [[ $number_of_untracked_files -gt 0 ]]; then untracked=" $number_of_untracked_files◆"; fi
|
||||||
|
if [[ $number_of_untracked_files -gt 0 ]]; then untracked=" $number_of_untracked_files☀"; fi
|
||||||
|
|
||||||
|
local number_added=$(\grep -c "^A" <<< "${git_status}")
|
||||||
|
if [[ $number_added -gt 0 ]]; then added=" $number_added✚"; fi
|
||||||
|
|
||||||
|
local number_modified=$(\grep -c "^.M" <<< "${git_status}")
|
||||||
|
if [[ $number_modified -gt 0 ]]; then
|
||||||
|
modified=" $number_modified●"
|
||||||
|
bgclr='red'
|
||||||
|
fgclr='white'
|
||||||
|
fi
|
||||||
|
|
||||||
|
local number_added_modified=$(\grep -c "^M" <<< "${git_status}")
|
||||||
|
local number_added_renamed=$(\grep -c "^R" <<< "${git_status}")
|
||||||
|
if [[ $number_modified -gt 0 && $number_added_modified -gt 0 ]]; then
|
||||||
|
modified="$modified$((number_added_modified+number_added_renamed))±"
|
||||||
|
elif [[ $number_added_modified -gt 0 ]]; then
|
||||||
|
modified=" ●$((number_added_modified+number_added_renamed))±"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local number_deleted=$(\grep -c "^.D" <<< "${git_status}")
|
||||||
|
if [[ $number_deleted -gt 0 ]]; then
|
||||||
|
deleted=" $number_deleted‒"
|
||||||
|
bgclr='red'
|
||||||
|
fgclr='white'
|
||||||
|
fi
|
||||||
|
|
||||||
|
local number_added_deleted=$(\grep -c "^D" <<< "${git_status}")
|
||||||
|
if [[ $number_deleted -gt 0 && $number_added_deleted -gt 0 ]]; then
|
||||||
|
deleted="$deleted$number_added_deleted±"
|
||||||
|
elif [[ $number_added_deleted -gt 0 ]]; then
|
||||||
|
deleted=" ‒$number_added_deleted±"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local tag_at_current_commit=$(git describe --exact-match --tags $current_commit_hash 2> /dev/null)
|
||||||
|
if [[ -n $tag_at_current_commit ]]; then tagged=" ☗$tag_at_current_commit "; fi
|
||||||
|
|
||||||
|
local number_of_stashes="$(git stash list -n1 2> /dev/null | wc -l)"
|
||||||
|
if [[ $number_of_stashes -gt 0 ]]; then
|
||||||
|
stashed=" ${number_of_stashes##*( )}⚙"
|
||||||
|
bgclr='magenta'
|
||||||
|
fgclr='white'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $number_added -gt 0 || $number_added_modified -gt 0 || $number_added_deleted -gt 0 ]]; then ready_commit=' ⚑'; fi
|
||||||
|
|
||||||
|
local upstream_prompt=''
|
||||||
|
if [[ $has_upstream == true ]]; then
|
||||||
|
commits_diff="$(git log --pretty=oneline --topo-order --left-right ${current_commit_hash}...${upstream} 2> /dev/null)"
|
||||||
|
commits_ahead=$(\grep -c "^<" <<< "$commits_diff")
|
||||||
|
commits_behind=$(\grep -c "^>" <<< "$commits_diff")
|
||||||
|
upstream_prompt="$(git rev-parse --symbolic-full-name --abbrev-ref @{upstream} 2> /dev/null)"
|
||||||
|
upstream_prompt=$(sed -e 's/\/.*$/ ☊ /g' <<< "$upstream_prompt")
|
||||||
|
fi
|
||||||
|
|
||||||
|
has_diverged=false
|
||||||
|
if [[ $commits_ahead -gt 0 && $commits_behind -gt 0 ]]; then has_diverged=true; fi
|
||||||
|
if [[ $has_diverged == false && $commits_ahead -gt 0 ]]; then
|
||||||
|
if [[ $bgclr == 'red' || $bgclr == 'magenta' ]] then
|
||||||
|
to_push=" $fg_bold[white]↑$commits_ahead$fg_bold[$fgclr]"
|
||||||
|
else
|
||||||
|
to_push=" $fg_bold[black]↑$commits_ahead$fg_bold[$fgclr]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ $has_diverged == false && $commits_behind -gt 0 ]]; then to_pull=" $fg_bold[magenta]↓$commits_behind$fg_bold[$fgclr]"; fi
|
||||||
|
|
||||||
|
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
|
||||||
|
mode=" <B>"
|
||||||
|
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
|
||||||
|
mode=" >M<"
|
||||||
|
elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
|
||||||
|
mode=" >R>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
prompt_segment $bgclr $fgclr
|
||||||
|
|
||||||
|
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]%}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_hg() {
|
||||||
|
local rev status
|
||||||
|
if $(hg id >/dev/null 2>&1); then
|
||||||
|
if $(hg prompt >/dev/null 2>&1); then
|
||||||
|
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
|
||||||
|
# if files are not added
|
||||||
|
prompt_segment red white
|
||||||
|
st='±'
|
||||||
|
elif [[ -n $(hg prompt "{status|modified}") ]]; then
|
||||||
|
# if any modification
|
||||||
|
prompt_segment yellow black
|
||||||
|
st='±'
|
||||||
|
else
|
||||||
|
# if working copy is clean
|
||||||
|
prompt_segment green black
|
||||||
|
fi
|
||||||
|
print -n $(hg prompt "☿ {rev}@{branch}") $st
|
||||||
|
else
|
||||||
|
st=""
|
||||||
|
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
|
||||||
|
branch=$(hg id -b 2>/dev/null)
|
||||||
|
if `hg st | grep -q "^\?"`; then
|
||||||
|
prompt_segment red black
|
||||||
|
st='±'
|
||||||
|
elif `hg st | grep -q "^[MA]"`; then
|
||||||
|
prompt_segment yellow black
|
||||||
|
st='±'
|
||||||
|
else
|
||||||
|
prompt_segment green black
|
||||||
|
fi
|
||||||
|
print -n "☿ $rev@$branch" $st
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Dir: current working directory
|
||||||
|
prompt_dir() {
|
||||||
|
prompt_segment cyan white "%{$fg_bold[white]%}%~%{$fg_no_bold[white]%}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Virtualenv: current working virtualenv
|
||||||
|
prompt_virtualenv() {
|
||||||
|
local virtualenv_path="$VIRTUAL_ENV"
|
||||||
|
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
|
||||||
|
prompt_segment blue black "(`basename $virtualenv_path`)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_time() {
|
||||||
|
prompt_segment blue white "%{$fg_bold[white]%}%D{%a %e %b - %H:%M}%{$fg_no_bold[white]%}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Status:
|
||||||
|
# - was there an error
|
||||||
|
# - am I root
|
||||||
|
# - are there background jobs?
|
||||||
|
prompt_status() {
|
||||||
|
local symbols
|
||||||
|
symbols=()
|
||||||
|
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}$CROSS"
|
||||||
|
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}$LIGHTNING"
|
||||||
|
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}$GEAR"
|
||||||
|
|
||||||
|
[[ -n "$symbols" ]] && prompt_segment black default "$symbols"
|
||||||
|
}
|
||||||
|
|
||||||
|
## Main prompt
|
||||||
|
build_prompt() {
|
||||||
|
RETVAL=$?
|
||||||
|
print -n "\n"
|
||||||
|
prompt_status
|
||||||
|
#prompt_battery
|
||||||
|
prompt_time
|
||||||
|
prompt_virtualenv
|
||||||
|
prompt_dir
|
||||||
|
prompt_git
|
||||||
|
prompt_hg
|
||||||
|
prompt_end
|
||||||
|
CURRENT_BG='NONE'
|
||||||
|
print -n "\n"
|
||||||
|
prompt_context
|
||||||
|
prompt_end
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT='%{%f%b%k%}$(build_prompt) '
|
||||||
392
assets/add_zsh_theme/antares.zsh-theme
Normal file
392
assets/add_zsh_theme/antares.zsh-theme
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
|
||||||
|
###
|
||||||
|
### You can re-define the following variables in your .zshrc file
|
||||||
|
### in order to customize the appearance of the prompt
|
||||||
|
###
|
||||||
|
|
||||||
|
# The indentation of the rprompt
|
||||||
|
ZLE_RPROMPT_INDENT=${ZLE_RPROMPT_INDENT:-0}
|
||||||
|
|
||||||
|
# Whether to use oh-my-zsh's git-prompt plugin
|
||||||
|
# or the builtin logic written in this file
|
||||||
|
ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT=""
|
||||||
|
|
||||||
|
# Whether to gather additional details about the git status
|
||||||
|
# This option only applies when using the builtin logic
|
||||||
|
# Usefull when dealing with huge repositories to speed things up
|
||||||
|
ZSH_ANTARES_USE_LIGHT_GIT_MODE=""
|
||||||
|
|
||||||
|
# The colors to use for the various elements of the prompt
|
||||||
|
ZSH_ANTARES_FG_EXECTIME="#dd00ff"
|
||||||
|
ZSH_ANTARES_FG_ERRVAL="#c31a1a"
|
||||||
|
ZSH_ANTARES_FG_DECO="#ffffff"
|
||||||
|
ZSH_ANTARES_FG_PWD_OK="#ffffff"
|
||||||
|
ZSH_ANTARES_BG_PWD_OK="#0055ff"
|
||||||
|
ZSH_ANTARES_FG_PWD_ERR="#ffffff"
|
||||||
|
ZSH_ANTARES_BG_PWD_ERR="#c31a1a"
|
||||||
|
ZSH_ANTARES_FG_GIT_INIT="#000000"
|
||||||
|
ZSH_ANTARES_BG_GIT_INIT="#b5f3a1"
|
||||||
|
ZSH_ANTARES_FG_GIT_BARE="#000000"
|
||||||
|
ZSH_ANTARES_BG_GIT_BARE="#b07a4e"
|
||||||
|
ZSH_ANTARES_FG_GIT_BRANCH="#000000"
|
||||||
|
ZSH_ANTARES_BG_GIT_BRANCH="#47cc2b"
|
||||||
|
ZSH_ANTARES_FG_GIT_DETACH="#000000"
|
||||||
|
ZSH_ANTARES_BG_GIT_DETACH="#eeaa22"
|
||||||
|
ZSH_ANTARES_FG_GIT_CONFLICT="#000000"
|
||||||
|
ZSH_ANTARES_BG_GIT_CONFLICT="#c31a1a"
|
||||||
|
ZSH_ANTARES_FG_GIT_AHEAD="#cfcfcf"
|
||||||
|
ZSH_ANTARES_FG_GIT_BEHIND="#9f9f9f"
|
||||||
|
ZSH_ANTARES_FG_GIT_STAGED="#6cc6ee"
|
||||||
|
ZSH_ANTARES_FG_GIT_ADDED="#04c304"
|
||||||
|
ZSH_ANTARES_FG_GIT_DELETED="#e7165a"
|
||||||
|
ZSH_ANTARES_FG_GIT_CHANGED="#ee9931"
|
||||||
|
ZSH_ANTARES_FG_GIT_CONFLICTS="#ff0000"
|
||||||
|
ZSH_ANTARES_FG_GIT_UNTRACKED="#bbffff"
|
||||||
|
ZSH_ANTARES_FG_GIT_STASHED="#eaa0ff"
|
||||||
|
ZSH_ANTARES_FG_GIT_TAG="#ffffff"
|
||||||
|
ZSH_ANTARES_FG_JOBS="#9f9f9f"
|
||||||
|
ZSH_ANTARES_FG_PRIVILEDGES="#ffdd44"
|
||||||
|
|
||||||
|
# The characters (or strings, by will) to use for some of the elements
|
||||||
|
ZSH_ANTARES_STR_GIT_BARE="⛁"
|
||||||
|
ZSH_ANTARES_STR_GIT_AHEAD="↑"
|
||||||
|
ZSH_ANTARES_STR_GIT_BEHIND="↓"
|
||||||
|
ZSH_ANTARES_STR_GIT_STAGED="●"
|
||||||
|
ZSH_ANTARES_STR_GIT_ADDED="✚"
|
||||||
|
ZSH_ANTARES_STR_GIT_DELETED="━"
|
||||||
|
ZSH_ANTARES_STR_GIT_CHANGED="✱"
|
||||||
|
ZSH_ANTARES_STR_GIT_CONFLICTS="✖"
|
||||||
|
ZSH_ANTARES_STR_GIT_UNTRACKED="❍"
|
||||||
|
ZSH_ANTARES_STR_GIT_STASHED="⚑"
|
||||||
|
ZSH_ANTARES_STR_GIT_TAG="🏲"
|
||||||
|
ZSH_ANTARES_STR_JOBS="⚙"
|
||||||
|
ZSH_ANTARES_STR_ROOT="#"
|
||||||
|
ZSH_ANTARES_STR_USER="$"
|
||||||
|
|
||||||
|
# The path expansion to use to display the pwd
|
||||||
|
ZSH_ANTARES_PATHVAR='%~'
|
||||||
|
|
||||||
|
# The minimum amount of time (in seconds) a command shall take to complete
|
||||||
|
# in order to display the execution time in the prompt
|
||||||
|
ZSH_ANTARES_MIN_EXEC_TIME=0
|
||||||
|
|
||||||
|
# The control character used to insert a new line
|
||||||
|
# You shouldn't edit this variable, but if you really want to...
|
||||||
|
ZSH_ANTARES_LINEFEED=$'\n'
|
||||||
|
|
||||||
|
###
|
||||||
|
### End of the re-definable section
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
antares_update_git_status()
|
||||||
|
{
|
||||||
|
ZSH_ANTARES_GIT_STATUS=""
|
||||||
|
ZSH_ANTARES_GIT_IN_WORKING_TREE=0
|
||||||
|
ZSH_ANTARES_GIT_IS_INIT_REPO=0
|
||||||
|
ZSH_ANTARES_GIT_IS_BARE_REPO=0
|
||||||
|
ZSH_ANTARES_GIT_IS_DETACHED_HEAD=0
|
||||||
|
ZSH_ANTARES_GIT_HAS_CONFLICTS=0
|
||||||
|
ZSH_ANTARES_GIT_HAS_TAGS=0
|
||||||
|
ZSH_ANTARES_GIT_TAG=""
|
||||||
|
|
||||||
|
if ( $(git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null) )
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_IN_WORKING_TREE=1
|
||||||
|
private branch_name="$(git branch --show-current)"
|
||||||
|
if [ -n "$branch_name" ]
|
||||||
|
then
|
||||||
|
if [ -z "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
|
||||||
|
then
|
||||||
|
GIT_BRANCH="$branch_name"
|
||||||
|
fi
|
||||||
|
if ( ! $(git rev-parse --verify HEAD 1>/dev/null 2>/dev/null) )
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_IS_INIT_REPO=1
|
||||||
|
fi
|
||||||
|
if [ $(git rev-parse --is-bare-repository) = "true" ]
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_IS_BARE_REPO=1
|
||||||
|
GIT_BRANCH="$ZSH_ANTARES_STR_GIT_BARE"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ZSH_ANTARES_GIT_IS_DETACHED_HEAD=1
|
||||||
|
if [ -z "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
|
||||||
|
then
|
||||||
|
GIT_BRANCH="$(git rev-parse --short HEAD)"
|
||||||
|
if [ -z "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ]
|
||||||
|
then
|
||||||
|
private git_tag="$(git tag --points-at=HEAD)"
|
||||||
|
if [ -n "$git_tag" ]
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_HAS_TAGS=1
|
||||||
|
private n_tags="$(echo "$git_tag" | wc -l)"
|
||||||
|
if (( n_tags == 1 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_TAG=" $ZSH_ANTARES_STR_GIT_TAG $git_tag"
|
||||||
|
elif (( n_tags > 1 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_TAG=" $ZSH_ANTARES_STR_GIT_TAG $n_tags"
|
||||||
|
else
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
antares_reset_git_info
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( ZSH_ANTARES_GIT_IS_BARE_REPO ))
|
||||||
|
then
|
||||||
|
antares_reset_git_counts
|
||||||
|
GIT_AHEAD=$(git rev-list --left-only HEAD..FETCH_HEAD --count)
|
||||||
|
GIT_BEHIND=$(git rev-list --right-only HEAD..FETCH_HEAD --count)
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
|
||||||
|
then
|
||||||
|
GIT_ADDED=0
|
||||||
|
elif [ -n "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ]
|
||||||
|
then
|
||||||
|
antares_reset_git_counts
|
||||||
|
return
|
||||||
|
else
|
||||||
|
private git_status="$(git status -sb)"
|
||||||
|
if [ -n "$git_status" ]
|
||||||
|
then
|
||||||
|
GIT_STAGED=$(echo $git_status | grep '^[AMD]. ' | wc -l)
|
||||||
|
GIT_ADDED=$(echo $git_status | grep '^A ' | wc -l)
|
||||||
|
GIT_DELETED=$(echo $git_status | grep -E '^(D |.D) ' | wc -l)
|
||||||
|
GIT_CHANGED=$(echo $git_status | grep -E '^(M |.M) ' | wc -l)
|
||||||
|
GIT_CONFLICTS=$(echo $git_status | grep '^U. ' | wc -l)
|
||||||
|
GIT_UNTRACKED=$(echo $git_status | grep '^?? ' | wc -l)
|
||||||
|
GIT_STASHED=$(git stash list | wc -l)
|
||||||
|
if (( ZSH_ANTARES_GIT_IS_DETACHED_HEAD ))
|
||||||
|
then
|
||||||
|
GIT_AHEAD=0
|
||||||
|
GIT_BEHIND=0
|
||||||
|
elif (( ! ZSH_ANTARES_GIT_IS_INIT_REPO ))
|
||||||
|
then
|
||||||
|
private left_right=$(echo $git_status | grep '^## ' | cut -d" " -f2)
|
||||||
|
GIT_AHEAD=$(git rev-list --left-only $left_right --count)
|
||||||
|
GIT_BEHIND=$(git rev-list --right-only $left_right --count)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_ANTARES_GIT_HAS_CONFLICTS=$(( GIT_CONFLICTS > 0 ))
|
||||||
|
}
|
||||||
|
|
||||||
|
antares_reset_git_info()
|
||||||
|
{
|
||||||
|
if [ -z "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
|
||||||
|
then
|
||||||
|
GIT_BRANCH=""
|
||||||
|
fi
|
||||||
|
antares_reset_git_counts
|
||||||
|
}
|
||||||
|
antares_reset_git_counts()
|
||||||
|
{
|
||||||
|
if [ -n "$ZSH_ANTARES_USE_OHMYZSH_GIT_PROMPT" ]
|
||||||
|
then
|
||||||
|
GIT_ADDED=0
|
||||||
|
else
|
||||||
|
GIT_AHEAD=0
|
||||||
|
GIT_BEHIND=0
|
||||||
|
GIT_STAGED=0
|
||||||
|
GIT_ADDED=0
|
||||||
|
GIT_DELETED=0
|
||||||
|
GIT_CHANGED=0
|
||||||
|
GIT_CONFLICTS=0
|
||||||
|
GIT_UNTRACKED=0
|
||||||
|
GIT_STASHED=0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
antares_update_prompt()
|
||||||
|
{
|
||||||
|
ZSH_ANTARES_RETURN=""
|
||||||
|
if [ -n "$ZSH_ANTARES_EXEC_FLAG" ]
|
||||||
|
then
|
||||||
|
if (( ZSH_ANTARES_MIN_EXEC_TIME >= 0 ))
|
||||||
|
then
|
||||||
|
private exec_time=$(( SECONDS - ZSH_ANTARES_EXEC_START ))
|
||||||
|
if (( exec_time >= ZSH_ANTARES_MIN_EXEC_TIME ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_RETURN+="%F{$ZSH_ANTARES_FG_EXECTIME}%B⤷%b $exec_time%f"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$ZSH_ANTARES_ERR_CODE" != "0" ]]
|
||||||
|
then
|
||||||
|
if [ -z "$ZSH_ANTARES_RETURN" ]
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_RETURN+="%F{$ZSH_ANTARES_FG_ERRVAL}%B⤷%b%f"
|
||||||
|
fi
|
||||||
|
ZSH_ANTARES_RETURN+=" %F{$ZSH_ANTARES_FG_ERRVAL}✘%B${ZSH_ANTARES_ERR_CODE}%b%f"
|
||||||
|
fi
|
||||||
|
[ -n "$ZSH_ANTARES_RETURN" ] && ZSH_ANTARES_RETURN+="$ZSH_ANTARES_LINEFEED"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_ANTARES_FILLER=""
|
||||||
|
private fillchar=" "
|
||||||
|
|
||||||
|
private width=$(( COLUMNS - ${ZLE_RPROMPT_INDENT:-1} ))
|
||||||
|
|
||||||
|
private decosize=7
|
||||||
|
private pwdsize=${#${(%):-$ZSH_ANTARES_PATHVAR}}
|
||||||
|
private pwdcut=""
|
||||||
|
private gitsize=${#${(%):-$GIT_BRANCH$ZSH_ANTARES_GIT_TAG}}
|
||||||
|
private gitcut=""
|
||||||
|
|
||||||
|
if (( pwdsize + gitsize + (decosize * 2) > width )); then
|
||||||
|
private half_width=$(( width / 2 ))
|
||||||
|
private pwd_over_half=$(( (pwdsize + decosize) > half_width ))
|
||||||
|
private git_over_half=$(( (gitsize + decosize) > half_width ))
|
||||||
|
if (( pwd_over_half > 0 )) && (( git_over_half > 0 ))
|
||||||
|
then
|
||||||
|
(( pwdcut = half_width - decosize ))
|
||||||
|
(( gitcut = half_width - decosize ))
|
||||||
|
elif (( pwd_over_half > 0 ))
|
||||||
|
then
|
||||||
|
(( pwdcut = width - gitsize - (decosize * 2) ))
|
||||||
|
ZSH_ANTARES_FILLER="\${(l:$(( width - pwdcut - gitsize - (decosize * 2) ))::$fillchar:)}"
|
||||||
|
elif (( git_over_half > 0 ))
|
||||||
|
then
|
||||||
|
(( gitcut = width - pwdsize - (decosize * 2) ))
|
||||||
|
ZSH_ANTARES_FILLER="\${(l:$(( width - pwdsize - gitcut - (decosize * 2) ))::$fillchar:)}"
|
||||||
|
else
|
||||||
|
ZSH_ANTARES_FILLER="\${(l:$(( width - pwdsize - gitsize - (decosize * 2) ))::$fillchar:)}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ZSH_ANTARES_FILLER="\${(l:$(( width - pwdsize - gitsize - (decosize * 2) ))::$fillchar:)}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ZSH_ANTARES_EXEC_FLAG" ]
|
||||||
|
then
|
||||||
|
private pwd_fg_color="%(?.${ZSH_ANTARES_FG_PWD_OK}.${ZSH_ANTARES_FG_PWD_ERR})"
|
||||||
|
private pwd_bg_color="%(?.${ZSH_ANTARES_BG_PWD_OK}.${ZSH_ANTARES_BG_PWD_ERR})"
|
||||||
|
else
|
||||||
|
private pwd_fg_color="$ZSH_ANTARES_FG_PWD_OK"
|
||||||
|
private pwd_bg_color="$ZSH_ANTARES_BG_PWD_OK"
|
||||||
|
fi
|
||||||
|
ZSH_ANTARES_PWD="%K{$pwd_bg_color}%F{$pwd_fg_color} %${pwdcut}<...<${ZSH_ANTARES_PATHVAR}%<< %f%k%F{$pwd_bg_color}▓▒░%f"
|
||||||
|
|
||||||
|
ZSH_ANTARES_GIT_BRANCH=""
|
||||||
|
if (( ZSH_ANTARES_GIT_IN_WORKING_TREE ))
|
||||||
|
then
|
||||||
|
if (( ZSH_ANTARES_GIT_HAS_CONFLICTS ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_CONFLICT}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_CONFLICT}%F{$ZSH_ANTARES_FG_GIT_CONFLICT}"
|
||||||
|
elif (( ZSH_ANTARES_GIT_IS_DETACHED_HEAD ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_DETACH}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_DETACH}%F{$ZSH_ANTARES_FG_GIT_DETACH}"
|
||||||
|
if (( ZSH_ANTARES_GIT_HAS_TAGS ))
|
||||||
|
then
|
||||||
|
GIT_BRANCH+="%F{$ZSH_ANTARES_FG_GIT_TAG}${ZSH_ANTARES_GIT_TAG}%f"
|
||||||
|
fi
|
||||||
|
elif (( ZSH_ANTARES_GIT_IS_BARE_REPO ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_BARE}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_BARE}%F{$ZSH_ANTARES_FG_GIT_BARE}"
|
||||||
|
elif (( ZSH_ANTARES_GIT_IS_INIT_REPO ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_INIT}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_INIT}%F{$ZSH_ANTARES_FG_GIT_INIT}"
|
||||||
|
else
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_BG_GIT_BRANCH}░▒▓%f%K{$ZSH_ANTARES_BG_GIT_BRANCH}%F{$ZSH_ANTARES_FG_GIT_BRANCH}"
|
||||||
|
fi
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+=" %${gitcut}>...>$GIT_BRANCH%>> %f%k"
|
||||||
|
if [ -n "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ]
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_FG_DECO}├╼%f"
|
||||||
|
else
|
||||||
|
ZSH_ANTARES_GIT_BRANCH+="%F{$ZSH_ANTARES_FG_DECO}├╮%f"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_ANTARES_JOBS="%(1j.%F{$ZSH_ANTARES_FG_JOBS}${ZSH_ANTARES_STR_JOBS}%j%f .)"
|
||||||
|
|
||||||
|
ZSH_ANTARES_PRIVILEDGES="%F{$ZSH_ANTARES_FG_PRIVILEDGES}%B%(!.${ZSH_ANTARES_STR_ROOT}.${ZSH_ANTARES_STR_USER})%b%f"
|
||||||
|
}
|
||||||
|
|
||||||
|
antares_update_rprompt()
|
||||||
|
{
|
||||||
|
ZSH_ANTARES_GIT_STATUS=""
|
||||||
|
|
||||||
|
[ -n "$ZSH_ANTARES_USE_LIGHT_GIT_MODE" ] && return
|
||||||
|
|
||||||
|
(( ZSH_ANTARES_GIT_IN_WORKING_TREE )) || return
|
||||||
|
|
||||||
|
if (( GIT_CONFLICTS > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_CONFLICTS}${ZSH_ANTARES_STR_GIT_CONFLICTS}${GIT_CONFLICTS}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_STAGED > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_STAGED}${ZSH_ANTARES_STR_GIT_STAGED}${GIT_STAGED}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_DELETED > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_DELETED}${ZSH_ANTARES_STR_GIT_DELETED}${GIT_DELETED}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_CHANGED > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_CHANGED}${ZSH_ANTARES_STR_GIT_CHANGED}${GIT_CHANGED}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_ADDED > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_ADDED}${ZSH_ANTARES_STR_GIT_ADDED}${GIT_ADDED}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_UNTRACKED > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_UNTRACKED}${ZSH_ANTARES_STR_GIT_UNTRACKED}${GIT_UNTRACKED}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_STASHED > 0 ))
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_GIT_STASHED}${ZSH_ANTARES_STR_GIT_STASHED}${GIT_STASHED}%f"
|
||||||
|
fi
|
||||||
|
if (( ! ZSH_ANTARES_GIT_IS_DETACHED_HEAD ))
|
||||||
|
then
|
||||||
|
private ahead_behind=""
|
||||||
|
if (( GIT_AHEAD > 0 ))
|
||||||
|
then
|
||||||
|
ahead_behind+="%F{$ZSH_ANTARES_FG_GIT_AHEAD}${ZSH_ANTARES_STR_GIT_AHEAD}${GIT_AHEAD}%f"
|
||||||
|
fi
|
||||||
|
if (( GIT_BEHIND > 0 ))
|
||||||
|
then
|
||||||
|
ahead_behind+="%F{$ZSH_ANTARES_FG_GIT_BEHIND}${ZSH_ANTARES_STR_GIT_BEHIND}${GIT_BEHIND}%f"
|
||||||
|
fi
|
||||||
|
if [ -n "$ahead_behind" ]
|
||||||
|
then
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" $ahead_behind"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
ZSH_ANTARES_GIT_STATUS+=" %F{$ZSH_ANTARES_FG_DECO}╾─╯%f"
|
||||||
|
}
|
||||||
|
|
||||||
|
antares_precmd()
|
||||||
|
{
|
||||||
|
ZSH_ANTARES_ERR_CODE="$?"
|
||||||
|
antares_update_git_status
|
||||||
|
antares_update_prompt
|
||||||
|
antares_update_rprompt
|
||||||
|
ZSH_ANTARES_EXEC_FLAG=""
|
||||||
|
}
|
||||||
|
|
||||||
|
antares_preexec()
|
||||||
|
{
|
||||||
|
ZSH_ANTARES_EXEC_FLAG="+"
|
||||||
|
ZSH_ANTARES_EXEC_START=$SECONDS
|
||||||
|
}
|
||||||
|
|
||||||
|
autoload -U add-zsh-hook
|
||||||
|
add-zsh-hook precmd antares_precmd
|
||||||
|
add-zsh-hook preexec antares_preexec
|
||||||
|
|
||||||
|
PROMPT='${ZSH_ANTARES_RETURN}\
|
||||||
|
%F{$ZSH_ANTARES_FG_DECO}╭┤%f${ZSH_ANTARES_PWD}${(e)ZSH_ANTARES_FILLER}${ZSH_ANTARES_GIT_BRANCH}
|
||||||
|
%F{$ZSH_ANTARES_FG_DECO}╰─╼%f ${ZSH_ANTARES_JOBS}${ZSH_ANTARES_PRIVILEDGES} '
|
||||||
|
|
||||||
|
RPROMPT='${ZSH_ANTARES_GIT_STATUS}'
|
||||||
|
|
||||||
696
assets/add_zsh_theme/bullet-train.zsh-theme
Normal file
696
assets/add_zsh_theme/bullet-train.zsh-theme
Normal file
@@ -0,0 +1,696 @@
|
|||||||
|
# README
|
||||||
|
#
|
||||||
|
# In order for this theme to render correctly, you will need a
|
||||||
|
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
|
||||||
|
#
|
||||||
|
# In addition, I recommend the
|
||||||
|
# [Tomorrow Night theme](https://github.com/chriskempson/tomorrow-theme) and, if
|
||||||
|
# you're using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over
|
||||||
|
# Terminal.app - it has significantly better color fidelity.
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# CONFIGURATION
|
||||||
|
# The default configuration, that can be overwrite in your .zshrc file
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
VIRTUAL_ENV_DISABLE_PROMPT=true
|
||||||
|
|
||||||
|
# Define order and content of prompt
|
||||||
|
if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then
|
||||||
|
BULLETTRAIN_PROMPT_ORDER=(
|
||||||
|
time
|
||||||
|
status
|
||||||
|
custom
|
||||||
|
context
|
||||||
|
dir
|
||||||
|
screen
|
||||||
|
perl
|
||||||
|
ruby
|
||||||
|
virtualenv
|
||||||
|
nvm
|
||||||
|
aws
|
||||||
|
go
|
||||||
|
rust
|
||||||
|
elixir
|
||||||
|
git
|
||||||
|
hg
|
||||||
|
cmd_exec_time
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# PROMPT
|
||||||
|
if [ ! -n "${BULLETTRAIN_PROMPT_CHAR+1}" ]; then
|
||||||
|
BULLETTRAIN_PROMPT_CHAR="\$"
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_PROMPT_ROOT+1}" ]; then
|
||||||
|
BULLETTRAIN_PROMPT_ROOT=true
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_PROMPT_SEPARATE_LINE+1}" ]; then
|
||||||
|
BULLETTRAIN_PROMPT_SEPARATE_LINE=true
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_PROMPT_ADD_NEWLINE+1}" ]; then
|
||||||
|
BULLETTRAIN_PROMPT_ADD_NEWLINE=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# STATUS
|
||||||
|
if [ ! -n "${BULLETTRAIN_STATUS_EXIT_SHOW+1}" ]; then
|
||||||
|
BULLETTRAIN_STATUS_EXIT_SHOW=false
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_STATUS_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_STATUS_BG=green
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_STATUS_ERROR_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_STATUS_ERROR_BG=red
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_STATUS_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_STATUS_FG=white
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TIME
|
||||||
|
if [ ! -n "${BULLETTRAIN_TIME_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_TIME_BG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_TIME_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_TIME_FG=black
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CUSTOM
|
||||||
|
if [ ! -n "${BULLETTRAIN_CUSTOM_MSG+1}" ]; then
|
||||||
|
BULLETTRAIN_CUSTOM_MSG=false
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_CUSTOM_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_CUSTOM_BG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_CUSTOM_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_CUSTOM_FG=default
|
||||||
|
fi
|
||||||
|
|
||||||
|
# VIRTUALENV
|
||||||
|
if [ ! -n "${BULLETTRAIN_VIRTUALENV_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_VIRTUALENV_BG=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_VIRTUALENV_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_VIRTUALENV_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_VIRTUALENV_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_VIRTUALENV_PREFIX=🐍
|
||||||
|
fi
|
||||||
|
|
||||||
|
# NVM
|
||||||
|
if [ ! -n "${BULLETTRAIN_NVM_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_NVM_BG=green
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_NVM_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_NVM_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_NVM_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_NVM_PREFIX="⬡ "
|
||||||
|
fi
|
||||||
|
|
||||||
|
# AWS
|
||||||
|
if [ ! -n "${BULLETTRAIN_AWS_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_AWS_BG=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_AWS_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_AWS_FG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_AWS_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_AWS_PREFIX="☁️"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# RUBY
|
||||||
|
if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_RUBY_BG=red
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_RUBY_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_RUBY_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_RUBY_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_RUBY_PREFIX=♦️
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Go
|
||||||
|
if [ ! -n "${BULLETTRAIN_GO_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_GO_BG=cyan
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GO_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_GO_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GO_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_GO_PREFIX="go"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rust
|
||||||
|
if [ ! -n "${BULLETTRAIN_RUST_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_RUST_BG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_RUST_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_RUST_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_RUST_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_RUST_PREFIX="🦀"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Kubernetes Context
|
||||||
|
if [ ! -n "${BULLETTRAIN_KCTX_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_KCTX_BG=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_KCTX_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_KCTX_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_KCTX_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_KCTX_PREFIX="⎈"
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_KCTX_KCONFIG+1}" ]; then
|
||||||
|
BULLETTRAIN_KCTX_KCONFIG="${HOME}/.kube/config"
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_KCTX_KUBECTL+1}" ]; then
|
||||||
|
BULLETTRAIN_KCTX_KUBECTL="true"
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_KCTX_NAMESPACE+1}" ]; then
|
||||||
|
BULLETTRAIN_KCTX_NAMESPACE="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ELIXIR
|
||||||
|
if [ ! -n "${BULLETTRAIN_ELIXIR_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_ELIXIR_BG=magenta
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_ELIXIR_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_ELIXIR_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_ELIXIR_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_ELIXIR_PREFIX="💧"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# DIR
|
||||||
|
if [ ! -n "${BULLETTRAIN_DIR_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_DIR_BG=blue
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_DIR_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_DIR_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_DIR_CONTEXT_SHOW+1}" ]; then
|
||||||
|
BULLETTRAIN_DIR_CONTEXT_SHOW=false
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_DIR_EXTENDED+1}" ]; then
|
||||||
|
BULLETTRAIN_DIR_EXTENDED=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# GIT
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_COLORIZE_DIRTY=false
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_BG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_FG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_EXTENDED+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_EXTENDED=true
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_PROMPT_CMD+1}" ]; then
|
||||||
|
BULLETTRAIN_GIT_PROMPT_CMD="\$(git_prompt_info)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# PERL
|
||||||
|
if [ ! -n "${BULLETTRAIN_PERL_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_PERL_BG=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_PERL_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_PERL_FG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_PERL_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_PERL_PREFIX=🐪
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CONTEXT
|
||||||
|
if [ ! -n "${BULLETTRAIN_CONTEXT_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_CONTEXT_BG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_CONTEXT_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_CONTEXT_FG=default
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_CONTEXT_HOSTNAME+1}" ]; then
|
||||||
|
BULLETTRAIN_CONTEXT_HOSTNAME=%m
|
||||||
|
fi
|
||||||
|
|
||||||
|
# GIT PROMPT
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_PREFIX+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="\ue0a0 "
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=$BULLETTRAIN_GIT_PREFIX
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_SUFFIX+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=$BULLETTRAIN_GIT_SUFFIX
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_DIRTY+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}✘%F{black}"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=$BULLETTRAIN_GIT_DIRTY
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_CLEAN+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=" %F{green}✔%F{black}"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=$BULLETTRAIN_GIT_CLEAN
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_ADDED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED=" %F{green}✚%F{black}"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED=$BULLETTRAIN_GIT_ADDED
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_MODIFIED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED=" %F{blue}✹%F{black}"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED=$BULLETTRAIN_GIT_MODIFIED
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_DELETED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED=" %F{red}✖%F{black}"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED=$BULLETTRAIN_GIT_DELETED
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_UNTRACKED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %F{yellow}✭%F{black}"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED=$BULLETTRAIN_GIT_UNTRACKED
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_RENAMED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED=" ➜"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED=$BULLETTRAIN_GIT_RENAMED
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_UNMERGED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED=" ═"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED=$BULLETTRAIN_GIT_UNMERGED
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_AHEAD+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_AHEAD=$BULLETTRAIN_GIT_AHEAD
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_BEHIND+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_BEHIND=$BULLETTRAIN_GIT_BEHIND
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_GIT_DIVERGED+1}" ]; then
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
|
||||||
|
else
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIVERGED=$BULLETTRAIN_GIT_PROMPT_DIVERGED
|
||||||
|
fi
|
||||||
|
|
||||||
|
# SCREEN
|
||||||
|
if [ ! -n "${BULLETTRAIN_SCREEN_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_SCREEN_BG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_SCREEN_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_SCREEN_FG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_SCREEN_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_SCREEN_PREFIX="⬗"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# COMMAND EXECUTION TIME
|
||||||
|
if [ ! -n "${BULLETTRAIN_EXEC_TIME_ELAPSED+1}" ]; then
|
||||||
|
BULLETTRAIN_EXEC_TIME_ELAPSED=5
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_EXEC_TIME_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_EXEC_TIME_BG=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_EXEC_TIME_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_EXEC_TIME_FG=black
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# SEGMENT DRAWING
|
||||||
|
# A few functions to make it easy and re-usable to draw segmented prompts
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
CURRENT_BG='NONE'
|
||||||
|
SEGMENT_SEPARATOR=''
|
||||||
|
|
||||||
|
# Begin a segment
|
||||||
|
# Takes three arguments, background, foreground and text. All of them can be omitted,
|
||||||
|
# rendering default background/foreground and no text.
|
||||||
|
prompt_segment() {
|
||||||
|
local bg fg
|
||||||
|
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
||||||
|
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
||||||
|
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
||||||
|
echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
||||||
|
else
|
||||||
|
echo -n "%{$bg%}%{$fg%} "
|
||||||
|
fi
|
||||||
|
CURRENT_BG=$1
|
||||||
|
[[ -n $3 ]] && echo -n $3
|
||||||
|
}
|
||||||
|
|
||||||
|
# End the prompt, closing any open segments
|
||||||
|
prompt_end() {
|
||||||
|
if [[ -n $CURRENT_BG ]]; then
|
||||||
|
echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
|
||||||
|
else
|
||||||
|
echo -n "%{%k%}"
|
||||||
|
fi
|
||||||
|
echo -n "%{%f%}"
|
||||||
|
CURRENT_BG=''
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# PROMPT COMPONENTS
|
||||||
|
# Each component will draw itself, and hide itself if no information needs
|
||||||
|
# to be shown
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Context: user@hostname (who am I and where am I)
|
||||||
|
context() {
|
||||||
|
local user="$(whoami)"
|
||||||
|
[[ "$user" != "$BULLETTRAIN_CONTEXT_DEFAULT_USER" || -n "$BULLETTRAIN_IS_SSH_CLIENT" ]] && echo -n "${user}@$BULLETTRAIN_CONTEXT_HOSTNAME"
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_context() {
|
||||||
|
local _context="$(context)"
|
||||||
|
[[ -n "$_context" ]] && prompt_segment $BULLETTRAIN_CONTEXT_BG $BULLETTRAIN_CONTEXT_FG "$_context"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Based on http://stackoverflow.com/a/32164707/3859566
|
||||||
|
function displaytime {
|
||||||
|
local T=$1
|
||||||
|
local D=$((T/60/60/24))
|
||||||
|
local H=$((T/60/60%24))
|
||||||
|
local M=$((T/60%60))
|
||||||
|
local S=$((T%60))
|
||||||
|
[[ $D > 0 ]] && printf '%dd' $D
|
||||||
|
[[ $H > 0 ]] && printf '%dh' $H
|
||||||
|
[[ $M > 0 ]] && printf '%dm' $M
|
||||||
|
printf '%ds' $S
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prompt previous command execution time
|
||||||
|
preexec() {
|
||||||
|
cmd_timestamp=`date +%s`
|
||||||
|
}
|
||||||
|
|
||||||
|
precmd() {
|
||||||
|
local stop=`date +%s`
|
||||||
|
local start=${cmd_timestamp:-$stop}
|
||||||
|
let BULLETTRAIN_last_exec_duration=$stop-$start
|
||||||
|
cmd_timestamp=''
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_cmd_exec_time() {
|
||||||
|
[ $BULLETTRAIN_last_exec_duration -gt $BULLETTRAIN_EXEC_TIME_ELAPSED ] && prompt_segment $BULLETTRAIN_EXEC_TIME_BG $BULLETTRAIN_EXEC_TIME_FG "$(displaytime $BULLETTRAIN_last_exec_duration)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Custom
|
||||||
|
prompt_custom() {
|
||||||
|
if [[ $BULLETTRAIN_CUSTOM_MSG == false ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local custom_msg
|
||||||
|
eval custom_msg=$BULLETTRAIN_CUSTOM_MSG
|
||||||
|
[[ -n "${custom_msg}" ]] && prompt_segment $BULLETTRAIN_CUSTOM_BG $BULLETTRAIN_CUSTOM_FG "${custom_msg}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Git
|
||||||
|
prompt_git() {
|
||||||
|
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" == "1" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local ref dirty mode repo_path git_prompt
|
||||||
|
repo_path=$(git rev-parse --git-dir 2>/dev/null)
|
||||||
|
|
||||||
|
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||||
|
if [[ $BULLETTRAIN_GIT_COLORIZE_DIRTY == true && -n $(git status --porcelain --ignore-submodules) ]]; then
|
||||||
|
BULLETTRAIN_GIT_BG=$BULLETTRAIN_GIT_COLORIZE_DIRTY_BG_COLOR
|
||||||
|
BULLETTRAIN_GIT_FG=$BULLETTRAIN_GIT_COLORIZE_DIRTY_FG_COLOR
|
||||||
|
fi
|
||||||
|
prompt_segment $BULLETTRAIN_GIT_BG $BULLETTRAIN_GIT_FG
|
||||||
|
|
||||||
|
eval git_prompt=${BULLETTRAIN_GIT_PROMPT_CMD}
|
||||||
|
if [[ $BULLETTRAIN_GIT_EXTENDED == true ]]; then
|
||||||
|
echo -n ${git_prompt}$(git_prompt_status)
|
||||||
|
else
|
||||||
|
echo -n ${git_prompt}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_hg() {
|
||||||
|
local rev status
|
||||||
|
if $(hg id >/dev/null 2>&1); then
|
||||||
|
if $(hg prompt >/dev/null 2>&1); then
|
||||||
|
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
|
||||||
|
# if files are not added
|
||||||
|
prompt_segment red white
|
||||||
|
st='±'
|
||||||
|
elif [[ -n $(hg prompt "{status|modified}") ]]; then
|
||||||
|
# if any modification
|
||||||
|
prompt_segment yellow black
|
||||||
|
st='±'
|
||||||
|
else
|
||||||
|
# if working copy is clean
|
||||||
|
prompt_segment green black
|
||||||
|
fi
|
||||||
|
echo -n $(hg prompt "☿ {rev}@{branch}") $st
|
||||||
|
else
|
||||||
|
st=""
|
||||||
|
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
|
||||||
|
branch=$(hg id -b 2>/dev/null)
|
||||||
|
if $(hg st | grep -Eq "^\?"); then
|
||||||
|
prompt_segment red black
|
||||||
|
st='±'
|
||||||
|
elif $(hg st | grep -Eq "^(M|A)"); then
|
||||||
|
prompt_segment yellow black
|
||||||
|
st='±'
|
||||||
|
else
|
||||||
|
prompt_segment green black
|
||||||
|
fi
|
||||||
|
echo -n "☿ $rev@$branch" $st
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Dir: current working directory
|
||||||
|
prompt_dir() {
|
||||||
|
local dir=''
|
||||||
|
local _context="$(context)"
|
||||||
|
[[ $BULLETTRAIN_DIR_CONTEXT_SHOW == true && -n "$_context" ]] && dir="${dir}${_context}:"
|
||||||
|
|
||||||
|
if [[ $BULLETTRAIN_DIR_EXTENDED == 0 ]]; then
|
||||||
|
#short directories
|
||||||
|
dir="${dir}%1~"
|
||||||
|
elif [[ $BULLETTRAIN_DIR_EXTENDED == 2 ]]; then
|
||||||
|
#long directories
|
||||||
|
dir="${dir}%0~"
|
||||||
|
else
|
||||||
|
#medium directories (default case)
|
||||||
|
dir="${dir}%4(c:...:)%3c"
|
||||||
|
fi
|
||||||
|
|
||||||
|
prompt_segment $BULLETTRAIN_DIR_BG $BULLETTRAIN_DIR_FG $dir
|
||||||
|
}
|
||||||
|
|
||||||
|
# RUBY
|
||||||
|
# RVM: only shows RUBY info if on a gemset that is not the default one
|
||||||
|
# RBENV: shows current ruby version active in the shell; also with non-global gemsets if any is active
|
||||||
|
# CHRUBY: shows current ruby version active in the shell
|
||||||
|
prompt_ruby() {
|
||||||
|
if command -v rvm-prompt > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(rvm-prompt i v g)"
|
||||||
|
elif command -v chruby > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(chruby | sed -n -e 's/ \* //p')"
|
||||||
|
elif command -v rbenv > /dev/null 2>&1; then
|
||||||
|
current_gemset() {
|
||||||
|
echo "$(rbenv gemset active 2&>/dev/null | sed -e 's/ global$//')"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ -n $(current_gemset) ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(rbenv version | sed -e 's/ (set.*$//')"@"$(current_gemset)"
|
||||||
|
else
|
||||||
|
prompt_segment $BULLETTRAIN_RUBY_BG $BULLETTRAIN_RUBY_FG $BULLETTRAIN_RUBY_PREFIX" $(rbenv version | sed -e 's/ (set.*$//')"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ELIXIR
|
||||||
|
prompt_elixir() {
|
||||||
|
if command -v elixir > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_ELIXIR_BG $BULLETTRAIN_ELIXIR_FG $BULLETTRAIN_ELIXIR_PREFIX" $(elixir -v | tail -n 1 | awk '{print $2}')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# PERL
|
||||||
|
# PLENV: shows current PERL version active in the shell
|
||||||
|
prompt_perl() {
|
||||||
|
if command -v plenv > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_PERL_BG $BULLETTRAIN_PERL_FG $BULLETTRAIN_PERL_PREFIX" $(plenv version | sed -e 's/ (set.*$//')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Go
|
||||||
|
prompt_go() {
|
||||||
|
setopt extended_glob
|
||||||
|
if [[ (-f *.go(#qN) || -d Godeps || -f glide.yaml) ]]; then
|
||||||
|
if command -v go > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_GO_BG $BULLETTRAIN_GO_FG $BULLETTRAIN_GO_PREFIX" $(go version | grep --colour=never -oE '[[:digit:]].[[:digit:]]+')"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Rust
|
||||||
|
prompt_rust() {
|
||||||
|
if [[ (-f Cargo.toml) ]]; then
|
||||||
|
if command -v rustc > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_RUST_BG $BULLETTRAIN_RUST_FG $BULLETTRAIN_RUST_PREFIX" $(rustc -V version | cut -d' ' -f2)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kubernetes Context
|
||||||
|
prompt_kctx() {
|
||||||
|
if [[ "$BULLETTRAIN_KCTX_KUBECTL" == "true" ]] && command -v kubectl > /dev/null 2>&1; then
|
||||||
|
local jsonpath='{.current-context}'
|
||||||
|
if [[ "$BULLETTRAIN_KCTX_NAMESPACE" == "true" ]]; then
|
||||||
|
jsonpath="${jsonpath}{':'}{..namespace}"
|
||||||
|
fi
|
||||||
|
prompt_segment $BULLETTRAIN_KCTX_BG $BULLETTRAIN_KCTX_FG $BULLETTRAIN_KCTX_PREFIX" $(kubectl config view --minify --output "jsonpath=${jsonpath}" 2>/dev/null)"
|
||||||
|
elif [[ -f $BULLETTRAIN_KCTX_KCONFIG ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_KCTX_BG $BULLETTRAIN_KCTX_FG $BULLETTRAIN_KCTX_PREFIX" $(cat $BULLETTRAIN_KCTX_KCONFIG | grep current-context | awk '{print $2}')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Virtualenv: current working virtualenv
|
||||||
|
prompt_virtualenv() {
|
||||||
|
local virtualenv_path="$VIRTUAL_ENV"
|
||||||
|
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_VIRTUALENV_BG $BULLETTRAIN_VIRTUALENV_FG $BULLETTRAIN_VIRTUALENV_PREFIX" $(basename $virtualenv_path)"
|
||||||
|
elif which pyenv &> /dev/null; then
|
||||||
|
if [[ "$(pyenv version | sed -e 's/ (set.*$//' | tr '\n' ' ' | sed 's/.$//')" != "system" ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_VIRTUALENV_BG $BULLETTRAIN_VIRTUALENV_FG $BULLETTRAIN_VIRTUALENV_PREFIX" $(pyenv version | sed -e 's/ (set.*$//' | tr '\n' ' ' | sed 's/.$//')"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# NVM: Node version manager
|
||||||
|
prompt_nvm() {
|
||||||
|
local nvm_prompt
|
||||||
|
if type nvm >/dev/null 2>&1; then
|
||||||
|
nvm_prompt=$(nvm current 2>/dev/null)
|
||||||
|
[[ "${nvm_prompt}x" == "x" || "${nvm_prompt}" == "system" ]] && return
|
||||||
|
elif type node >/dev/null 2>&1; then
|
||||||
|
nvm_prompt="$(node --version)"
|
||||||
|
else
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
nvm_prompt=${nvm_prompt}
|
||||||
|
prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
#AWS Profile
|
||||||
|
prompt_aws() {
|
||||||
|
local spaces=" "
|
||||||
|
|
||||||
|
if [[ -n "$AWS_PROFILE" ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_AWS_BG $BULLETTRAIN_AWS_FG $BULLETTRAIN_AWS_PREFIX$spaces$AWS_PROFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# SCREEN Session
|
||||||
|
prompt_screen() {
|
||||||
|
local session_name="$STY"
|
||||||
|
if [[ "$session_name" != "" ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_SCREEN_BG $BULLETTRAIN_SCREEN_FG $BULLETTRAIN_SCREEN_PREFIX" $session_name"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_time() {
|
||||||
|
if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
|
||||||
|
else
|
||||||
|
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%T}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Status:
|
||||||
|
# - was there an error
|
||||||
|
# - am I root
|
||||||
|
# - are there background jobs?
|
||||||
|
prompt_status() {
|
||||||
|
local symbols
|
||||||
|
symbols=()
|
||||||
|
[[ $RETVAL -ne 0 && $BULLETTRAIN_STATUS_EXIT_SHOW != true ]] && symbols+="✘"
|
||||||
|
[[ $RETVAL -ne 0 && $BULLETTRAIN_STATUS_EXIT_SHOW == true ]] && symbols+="✘ $RETVAL"
|
||||||
|
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡%f"
|
||||||
|
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="⚙"
|
||||||
|
|
||||||
|
if [[ -n "$symbols" && $RETVAL -ne 0 ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_STATUS_ERROR_BG $BULLETTRAIN_STATUS_FG "$symbols"
|
||||||
|
elif [[ -n "$symbols" ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_STATUS_BG $BULLETTRAIN_STATUS_FG "$symbols"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prompt Character
|
||||||
|
prompt_chars() {
|
||||||
|
local bt_prompt_chars="${BULLETTRAIN_PROMPT_CHAR}"
|
||||||
|
|
||||||
|
if [[ $BULLETTRAIN_PROMPT_ROOT == true ]]; then
|
||||||
|
bt_prompt_chars="%(!.%F{red}# .%F{green}${bt_prompt_chars}%f)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == false ]]; then
|
||||||
|
bt_prompt_chars="${bt_prompt_chars}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "$bt_prompt_chars"
|
||||||
|
|
||||||
|
if [[ -n $BULLETTRAIN_PROMPT_CHAR ]]; then
|
||||||
|
echo -n " "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prompt Line Separator
|
||||||
|
prompt_line_sep() {
|
||||||
|
if [[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == true ]]; then
|
||||||
|
# newline wont print without a non newline character, so add a zero-width space
|
||||||
|
echo -e '\n%{\u200B%}'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# MAIN
|
||||||
|
# Entry point
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
build_prompt() {
|
||||||
|
RETVAL=$?
|
||||||
|
for segment in $BULLETTRAIN_PROMPT_ORDER
|
||||||
|
do
|
||||||
|
prompt_$segment
|
||||||
|
done
|
||||||
|
prompt_end
|
||||||
|
}
|
||||||
|
|
||||||
|
NEWLINE='
|
||||||
|
'
|
||||||
|
PROMPT=''
|
||||||
|
[[ $BULLETTRAIN_PROMPT_ADD_NEWLINE == true ]] && PROMPT="$PROMPT$NEWLINE"
|
||||||
|
PROMPT="$PROMPT"'%{%f%b%k%}$(build_prompt)'
|
||||||
|
[[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == true ]] && PROMPT="$PROMPT$NEWLINE"
|
||||||
|
PROMPT="$PROMPT"'%{${fg_bold[default]}%}'
|
||||||
|
[[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == false ]] && PROMPT="$PROMPT "
|
||||||
|
PROMPT="$PROMPT"'$(prompt_chars)%{$reset_color%}'
|
||||||
38
assets/add_zsh_theme/color-input.zsh-theme
Normal file
38
assets/add_zsh_theme/color-input.zsh-theme
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# Refer https://misc.flogisoft.com/bash/tip_colors_and_formatting for the ANSI/VT100 control sequences
|
||||||
|
|
||||||
|
local user_color=026
|
||||||
|
local dir_color=130
|
||||||
|
local git_branch_color=010
|
||||||
|
local input_color=220
|
||||||
|
|
||||||
|
# Uncomment the following line to hide the virtual environment name.
|
||||||
|
# export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
|
|
||||||
|
# User details in green, bold
|
||||||
|
local user='%B$FG[${user_color}]%}%n@%m%{$reset_color%}'
|
||||||
|
# Directory details in cyan, bold
|
||||||
|
local dir='%B$FG[${dir_color}]%~%{$reset_color%}'
|
||||||
|
# git branch details in green
|
||||||
|
local git_branch='$FG[${git_branch_color}]$(git_prompt_info)%{$reset_color%}'
|
||||||
|
|
||||||
|
# Error message on command returning non-zero exit code
|
||||||
|
error_msg="\e[0;31mCommand failed"
|
||||||
|
|
||||||
|
PROMPT="${user}:${dir}:${git_branch}
|
||||||
|
$ $FG[${input_color}]"
|
||||||
|
|
||||||
|
# Resetting color to default white.
|
||||||
|
preexec()
|
||||||
|
{
|
||||||
|
echo -ne "\e[0m"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Printing error message if command failed.
|
||||||
|
precmd()
|
||||||
|
{
|
||||||
|
# Command failed
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
echo "${error_msg}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
418
assets/add_zsh_theme/comfyline.zsh-theme
Normal file
418
assets/add_zsh_theme/comfyline.zsh-theme
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
##########################################
|
||||||
|
### Comfyline - theme for zsh ###
|
||||||
|
# Original Author: not pua ( imnotpua ) #
|
||||||
|
# email: atp@tutamail.com #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
# make prompt work without oh-my-zsh
|
||||||
|
setopt PROMPT_SUBST
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
# default segment seperators
|
||||||
|
if [[ $COMFYLINE_SEGSEP == "" ]]; then
|
||||||
|
COMFYLINE_SEGSEP='\ue0b4'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $COMFYLINE_SEGSEP_REVERSE == "" ]]; then
|
||||||
|
COMFYLINE_SEGSEP_REVERSE='\ue0b6'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# date and time formats
|
||||||
|
if [[ $COMFYLINE_DATE_FORMAT == "" ]]; then
|
||||||
|
COMFYLINE_DATE_FORMAT="%A, %e %B %Y"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $COMFYLINE_TIME_FORMAT == "" ]]; then
|
||||||
|
COMFYLINE_TIME_FORMAT="%l:%M %p"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# default light theme
|
||||||
|
if [[ $RETVAL_RANK == "" ]]; then
|
||||||
|
RETVAL_RANK=1
|
||||||
|
fi
|
||||||
|
if [[ $HOST_RANK == "" ]]; then
|
||||||
|
HOST_RANK=2
|
||||||
|
fi
|
||||||
|
if [[ $USER_RANK == "" ]] then
|
||||||
|
USER_RANK=3
|
||||||
|
fi
|
||||||
|
if [[ $DIR_RANK == "" ]]; then
|
||||||
|
DIR_RANK=4
|
||||||
|
fi
|
||||||
|
if [[ $GIT_RANK == "" ]] then
|
||||||
|
GIT_RANK=5
|
||||||
|
fi
|
||||||
|
if [[ $VENV_RANK = "" ]]; then
|
||||||
|
VENV_RANK=6
|
||||||
|
fi
|
||||||
|
if [[ $BAT_RANK == "" ]] then
|
||||||
|
BAT_RANK=-3
|
||||||
|
fi
|
||||||
|
if [[ $DATE_RANK == "" ]]; then
|
||||||
|
DATE_RANK=-2
|
||||||
|
fi
|
||||||
|
if [[ $TIME_RANK == "" ]]; then
|
||||||
|
TIME_RANK=-1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# default colors
|
||||||
|
if [[ $RETVAL_b == "" ]]; then
|
||||||
|
RETVAL_b="#8a8bd8"
|
||||||
|
fi
|
||||||
|
if [[ $RETVAL_f == "" ]]; then
|
||||||
|
RETVAL_f="#61355c"
|
||||||
|
fi
|
||||||
|
if [[ $HOST_b == "" ]]; then
|
||||||
|
HOST_b="#b3b5fb"
|
||||||
|
fi
|
||||||
|
if [[ $HOST_f == "" ]]; then
|
||||||
|
HOST_f="#4a4b87"
|
||||||
|
fi
|
||||||
|
if [[ $USER_b == "" ]]; then
|
||||||
|
USER_b="#f8bbe5"
|
||||||
|
fi
|
||||||
|
if [[ $USER_f == "" ]]; then
|
||||||
|
USER_f="#874c80"
|
||||||
|
fi
|
||||||
|
if [[ $GIT_b == "" ]]; then
|
||||||
|
GIT_b="#f6b3b3"
|
||||||
|
fi
|
||||||
|
if [[ $GIT_f == "" ]]; then
|
||||||
|
GIT_f="#d95353"
|
||||||
|
fi
|
||||||
|
if [[ $GIT_CLEAN_b == "" ]]; then
|
||||||
|
GIT_CLEAN_b="#b3f58c"
|
||||||
|
fi
|
||||||
|
if [[ $GIT_CLEAN_f == "" ]]; then
|
||||||
|
GIT_CLEAN_f="#568459"
|
||||||
|
fi
|
||||||
|
if [[ $DIR_b == "" ]]; then
|
||||||
|
DIR_b="#e1bff2"
|
||||||
|
fi
|
||||||
|
if [[ $DIR_f == "" ]]; then
|
||||||
|
DIR_f="#844189"
|
||||||
|
fi
|
||||||
|
if [[ $VENV_b == "" ]]; then
|
||||||
|
VENV_b="#a8ddf9"
|
||||||
|
fi
|
||||||
|
if [[ $VENV_f == "" ]]; then
|
||||||
|
VENV_f="#0066a4"
|
||||||
|
fi
|
||||||
|
if [[ $BAT_b == "" ]]; then
|
||||||
|
BAT_b="#b3b5fb"
|
||||||
|
fi
|
||||||
|
if [[ $BAT_f == "" ]]; then
|
||||||
|
BAT_f="#4a4b87"
|
||||||
|
fi
|
||||||
|
if [[ $DATE_b == "" ]]; then
|
||||||
|
DATE_b="#f8bbe5"
|
||||||
|
fi
|
||||||
|
if [[ $DATE_f == "" ]]; then
|
||||||
|
DATE_f="#874c80"
|
||||||
|
fi
|
||||||
|
if [[ $TIME_b == "" ]]; then
|
||||||
|
TIME_b="#e1bff2"
|
||||||
|
fi
|
||||||
|
if [[ $TIME_f == "" ]]; then
|
||||||
|
TIME_f="#844189"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# basic functions
|
||||||
|
|
||||||
|
#function takes 4 arguments, background, foreground, text and rank (for edge cases)
|
||||||
|
function create_segment(){
|
||||||
|
if [[ $4 -lt $RIGHTMOST_RANK ]]; then
|
||||||
|
local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE"
|
||||||
|
echo -n "$segment%K{$1}%F{$2} $3 "
|
||||||
|
elif [[ $4 -gt $LEFTMOST_RANK ]]; then
|
||||||
|
local segment="%K{$1}$COMFYLINE_SEGSEP "
|
||||||
|
echo -n "$segment%F{$2}$3%F{$1} "
|
||||||
|
elif [[ $4 -eq $RIGHTMOST_RANK ]]; then
|
||||||
|
if [[ $COMFYLINE_NO_START -eq 1 ]]; then
|
||||||
|
local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE"
|
||||||
|
echo -n "$segment%K{$1}%F{$2} $3"
|
||||||
|
else
|
||||||
|
local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE"
|
||||||
|
echo -n "$segment%K{$1}%F{$2} $3 %k%F{$1}$COMFYLINE_SEGSEP"
|
||||||
|
fi
|
||||||
|
elif [[ $4 -eq $LEFTMOST_RANK ]]; then
|
||||||
|
if [[ $COMFYLINE_NO_START -eq 1 ]]; then
|
||||||
|
local segment="%K{$1} "
|
||||||
|
echo -n "$segment%F{$2}$3%F{$1} "
|
||||||
|
else
|
||||||
|
local segment="%F{$1}$COMFYLINE_SEGSEP_REVERSE%K{$1} "
|
||||||
|
echo -n "$segment%F{$2}$3%F{$1} "
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
### explanation: creates segment seperator with new bg but fg as old bg.
|
||||||
|
### then prints contents in new fg and prepares for next fg as current bg
|
||||||
|
|
||||||
|
# segment functions
|
||||||
|
function retval(){
|
||||||
|
if [[ $COMFYLINE_RETVAL_NUMBER -eq 2 ]]; then
|
||||||
|
symbol="%(?..✘ %?)"
|
||||||
|
elif [[ $COMFYLINE_RETVAL_NUMBER -eq 1 ]]; then
|
||||||
|
symbol="%?"
|
||||||
|
else
|
||||||
|
symbol="%(?..✘)"
|
||||||
|
fi
|
||||||
|
create_segment $RETVAL_b $RETVAL_f $symbol $RETVAL_RANK
|
||||||
|
}
|
||||||
|
|
||||||
|
function hostname(){
|
||||||
|
if [[ $COMFYLINE_FULL_HOSTNAME -eq 1 ]]; then
|
||||||
|
create_segment $HOST_b $HOST_f "%M" $HOST_RANK
|
||||||
|
else
|
||||||
|
create_segment $HOST_b $HOST_f "%m" $HOST_RANK
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function username(){
|
||||||
|
create_segment $USER_b $USER_f "%n" $USER_RANK
|
||||||
|
}
|
||||||
|
|
||||||
|
function dir(){
|
||||||
|
if [[ $COMFYLINE_FULL_DIR -eq 1 ]]; then
|
||||||
|
symbol="%d"
|
||||||
|
else
|
||||||
|
symbol="%~"
|
||||||
|
fi
|
||||||
|
create_segment $DIR_b $DIR_f $symbol $DIR_RANK
|
||||||
|
}
|
||||||
|
|
||||||
|
# variables to set git_prompt info and status
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" \ue0a0 "
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED=" ✚"
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED=" ±"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED=" \u2796"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED=" !"
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED=" \u21b7"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED=" \u21e1"
|
||||||
|
ZSH_THEME_GIT_PROMPT_AHEAD=" \u21c5"
|
||||||
|
ZSH_THEME_GIT_PROMPT_BEHIND=" \u21b1"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIVERGED=" \u21b0"
|
||||||
|
|
||||||
|
function gitrepo(){
|
||||||
|
if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
|
||||||
|
if [[ $(git status --porcelain) == "" ]]; then
|
||||||
|
if [[ $(command -v git_prompt_info 2> /dev/null) ]]; then
|
||||||
|
create_segment $GIT_CLEAN_b $GIT_CLEAN_f "$(git_prompt_info)$(git_prompt_status)" $GIT_RANK
|
||||||
|
else
|
||||||
|
create_segment $GIT_CLEAN_b $GIT_CLEAN_f "$ZSH_THEME_GIT_PROMPT_PREFIX$(git rev-parse --abbrev-ref HEAD)" $GIT_RANK
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ $(command -v git_prompt_info 2> /dev/null) ]]; then
|
||||||
|
create_segment $GIT_b $GIT_f "$(git_prompt_info)$(git_prompt_status)" $GIT_RANK
|
||||||
|
else
|
||||||
|
create_segment $GIT_b $GIT_f "$ZSH_THEME_GIT_PROMPT_PREFIX$(git rev-parse --abbrev-ref HEAD)" $GIT_RANK
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function venv(){
|
||||||
|
if [ -n "$VIRTUAL_ENV" ]; then
|
||||||
|
create_segment $VENV_b $VENV_f ${VIRTUAL_ENV:t:gs/%/%%} $VENV_RANK
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# battery function
|
||||||
|
|
||||||
|
# variables
|
||||||
|
|
||||||
|
if [[ $COMFYLINE_BATTERY_LOW == "" ]]; then
|
||||||
|
COMFYLINE_BATTERY_LOW=15
|
||||||
|
fi
|
||||||
|
if [[ $COMFYLINE_BATTERY_HIGH == "" ]]; then
|
||||||
|
COMFYLINE_BATTERY_HIGH=90
|
||||||
|
fi
|
||||||
|
if [[ $COMFYLINE_CHARGING_ICON == "" ]]; then
|
||||||
|
COMFYLINE_CHARGING_ICON="⚡️"
|
||||||
|
fi
|
||||||
|
if [[ $COMFYLINE_HIGHCHARGE_ICON == "" ]]; then
|
||||||
|
COMFYLINE_HIGHCHARGE_ICON=""
|
||||||
|
fi
|
||||||
|
if [[ $COMFYLINE_MIDCHARGE_ICON == "" ]]; then
|
||||||
|
COMFYLINE_MIDCHARGE_ICON=""
|
||||||
|
fi
|
||||||
|
if [[ $COMFYLINE_LOWCHARGE_ICON == "" ]]; then
|
||||||
|
COMFYLINE_LOWCHARGE_ICON=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
function calcbat(){
|
||||||
|
BAT=""
|
||||||
|
if [[ $(uname) == "Linux" ]]; then
|
||||||
|
number=$(ls /sys/class/power_supply/ | grep 'BAT' | wc -l )
|
||||||
|
if [[ $number -eq 0 ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
for ((i=0;i<$number;i++));do
|
||||||
|
capacity=$(cat /sys/class/power_supply/BAT${i}/capacity)
|
||||||
|
stats=$(cat /sys/class/power_supply/BAT${i}/status)
|
||||||
|
if [[ $stats == "Charging" ]]; then
|
||||||
|
stats="$COMFYLINE_CHARGING_ICON"
|
||||||
|
elif [[ $stats == "Discharging" ]]; then
|
||||||
|
if [ $capacity -gt $COMFYLINE_BATTERY_HIGH ]; then
|
||||||
|
stats="$COMFYLINE_HIGHCHARGE_ICON"
|
||||||
|
elif [ $capacity -lt $COMFYLINE_BATTERY_LOW ]; then
|
||||||
|
stats="$COMFYLINE_LOWCHARGE_ICON"
|
||||||
|
else
|
||||||
|
stats="$COMFYLINE_MIDCHARGE_ICON"
|
||||||
|
fi
|
||||||
|
elif [[ $stats == "Not charging" ]]; then
|
||||||
|
stats="$COMFYLINE_HIGHCHARGE_ICON"
|
||||||
|
fi
|
||||||
|
BAT="$BAT$capacity%% $stats "
|
||||||
|
done
|
||||||
|
|
||||||
|
elif [[ $(uname) == "Darwin" ]]; then
|
||||||
|
battery_details = $(pmset -g batt)
|
||||||
|
charged=$(echo "$battery_details" | grep -w 'charged')
|
||||||
|
charging=$(echo "$battery_details" | grep -w 'AC Power')
|
||||||
|
discharging=$(echo "$battery_details" | grep -w 'Battery Power')
|
||||||
|
capacity=$(echo "$battery_details" | grep -o "([0-9]*)"%)
|
||||||
|
|
||||||
|
if [ -n "$charging" ]; then
|
||||||
|
stats="$COMFYLINE_CHARGING_ICON"
|
||||||
|
elif [[ -n "$discharging" ]]; then
|
||||||
|
if [ $capacity -gt $COMFYLINE_BATTERY_HIGH ]; then
|
||||||
|
stats="$COMFYLINE_HIGHCHARGE_ICON"
|
||||||
|
elif [ $capacity -lt $COMFYLINE_BATTERY_LOW ]; then
|
||||||
|
stats="$COMFYLINE_LOWCHARGE_ICON"
|
||||||
|
else
|
||||||
|
stats="$COMFYLINE_MIDCHARGE_ICON"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
BAT="$capacity%% $stats"
|
||||||
|
|
||||||
|
elif [[ $(uname) == "FreeBSD" || $(uname) == "OpenBSD" ]]; then
|
||||||
|
capacity=$(apm -l)
|
||||||
|
stats=$(apm -b)
|
||||||
|
if [ $stats -eq 3 ]; then
|
||||||
|
stats="$COMFYLINE_CHARGING_ICON"
|
||||||
|
else
|
||||||
|
if [[ $capacity -gt $COMFYLINE_BATTERY_HIGH ]]; then
|
||||||
|
stats="$COMFYLINE_HIGHCHARGE_ICON"
|
||||||
|
elif [[ $capacity -lt $COMFYLINE_BATTERY_LOW ]]; then
|
||||||
|
stats="$COMFYLINE_LOWCHARGE_ICON"
|
||||||
|
else
|
||||||
|
stats="$COMFYLINE_MIDCHARGE_ICON"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
BAT="$capacity%% $stats"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# function to call battery calculation
|
||||||
|
function currbat(){
|
||||||
|
if [[ $COMFYLINE_BATTERY_PLUGIN -eq 1 ]]; then
|
||||||
|
create_segment $BAT_b $BAT_f "$(battery_pct_prompt)" $BAT_RANK
|
||||||
|
else
|
||||||
|
calcbat
|
||||||
|
create_segment $BAT_b $BAT_f "$BAT" $BAT_RANK
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function currdate(){
|
||||||
|
info="%D{$COMFYLINE_DATE_FORMAT}"
|
||||||
|
create_segment $DATE_b $DATE_f $info $DATE_RANK
|
||||||
|
}
|
||||||
|
|
||||||
|
function currtime(){
|
||||||
|
info="%D{$COMFYLINE_TIME_FORMAT}"
|
||||||
|
create_segment $TIME_b $TIME_f $info $TIME_RANK
|
||||||
|
}
|
||||||
|
|
||||||
|
function endleft(){
|
||||||
|
echo -n "%k$COMFYLINE_SEGSEP%f"
|
||||||
|
}
|
||||||
|
|
||||||
|
# parse variables
|
||||||
|
|
||||||
|
segments=("retval" "hostname" "username" "dir" "gitrepo" "venv" "currbat" "currtime" "currdate")
|
||||||
|
segment_ranks=($RETVAL_RANK $HOST_RANK $USER_RANK $DIR_RANK $GIT_RANK $VENV_RANK $BAT_RANK $TIME_RANK $DATE_RANK)
|
||||||
|
|
||||||
|
# split into left and right
|
||||||
|
|
||||||
|
left_prompt=()
|
||||||
|
right_prompt=()
|
||||||
|
left_ranks=()
|
||||||
|
right_ranks=()
|
||||||
|
for ((i=1;i<=${#segments[@]};i++)); do
|
||||||
|
if [[ segment_ranks[$i] -gt 0 ]]; then
|
||||||
|
left_prompt+=(${segments[$i]})
|
||||||
|
left_ranks+=(${segment_ranks[$i]})
|
||||||
|
elif [[ segment_ranks[$i] -lt 0 ]]; then
|
||||||
|
right_prompt+=(${segments[$i]})
|
||||||
|
right_ranks+=(${segment_ranks[$i]#-})
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# sort the prompts according to ranks and find the leftmost and rightmost
|
||||||
|
# I use the traditional iterative method to find max/min and using count-sort for sorting
|
||||||
|
|
||||||
|
LEFTMOST_RANK=100
|
||||||
|
declare -A sorted_left
|
||||||
|
for ((i=1;i<=${#left_prompt[@]};i++)); do
|
||||||
|
if [[ $left_ranks[$i] -lt $LEFTMOST_RANK ]]; then LEFTMOST_RANK=$left_ranks[$i] fi
|
||||||
|
sorted_left[$left_ranks[$i]]="$left_prompt[$i]"
|
||||||
|
done
|
||||||
|
|
||||||
|
RIGHTMOST_RANK=100
|
||||||
|
declare -A sorted_right
|
||||||
|
for ((i=1;i<=${#right_prompt[@]};i++)); do
|
||||||
|
if [[ $right_ranks[$i] -lt $RIGHTMOST_RANK ]]; then RIGHTMOST_RANK=$right_ranks[$i] fi
|
||||||
|
sorted_right[$right_ranks[$i]]="$right_prompt[$i]"
|
||||||
|
done
|
||||||
|
((RIGHTMOST_RANK*=-1))
|
||||||
|
|
||||||
|
|
||||||
|
# finally make_prompt which makes prompts
|
||||||
|
make_left_prompt(){
|
||||||
|
for ((j = 1; j <= ${#left_prompt[@]}; j++)); do
|
||||||
|
type $sorted_left[$j] &>/dev/null && $sorted_left[$j]
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
make_right_prompt(){
|
||||||
|
for ((j = ${#right_prompt[@]}; j>0; j--)); do
|
||||||
|
type $sorted_right[$j] &>/dev/null && $sorted_right[$j]
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
export PROMPT='%{%f%b%k%}$(make_left_prompt)$(endleft) '
|
||||||
|
export RPROMPT=' %{%f%b%k%}$(make_right_prompt)' # spaces left so that hiding is triggered
|
||||||
|
|
||||||
|
if [[ $COMFYLINE_NEXT_LINE_CHAR == "" ]]; then
|
||||||
|
COMFYLINE_NEXT_LINE_CHAR='➟'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $COMFYLINE_NEXT_LINE_CHAR_COLOR == "" ]]; then
|
||||||
|
COMFYLINE_NEXT_LINE_CHAR_COLOR="grey"
|
||||||
|
fi
|
||||||
|
|
||||||
|
next_line_maker(){
|
||||||
|
echo -n "%F{$COMFYLINE_NEXT_LINE_CHAR_COLOR}$COMFYLINE_NEXT_LINE_CHAR %f"
|
||||||
|
}
|
||||||
|
|
||||||
|
# setting up typing area
|
||||||
|
if [[ COMFYLINE_START_NEXT_LINE -eq 2 ]]; then
|
||||||
|
|
||||||
|
PROMPT=$PROMPT'
|
||||||
|
'$(next_line_maker)
|
||||||
|
|
||||||
|
|
||||||
|
elif [[ COMFYLINE_NO_GAP_LINE -eq 1 ]]; then
|
||||||
|
else
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
'$PROMPT
|
||||||
|
|
||||||
|
fi
|
||||||
7
assets/add_zsh_theme/emoji.zsh-theme
Normal file
7
assets/add_zsh_theme/emoji.zsh-theme
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PROMPT=" %(?:%{$fg_bold[green]%}➜:%{$fg_bold[red]%}➜)"
|
||||||
|
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✏️ "
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) ✅"
|
||||||
60
assets/add_zsh_theme/fishbone++.zsh-theme
Normal file
60
assets/add_zsh_theme/fishbone++.zsh-theme
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
local username="%n"
|
||||||
|
local path_prefix="%{$fg[yellow]%}["
|
||||||
|
local path_string="%{$fg[blue]%}%~"
|
||||||
|
local path_postfix="%{$fg[yellow]%}]"
|
||||||
|
local prompt_string="❯❯ "
|
||||||
|
local local_time="%T"
|
||||||
|
local newline=$'\n'
|
||||||
|
local line_mode=$'\n'
|
||||||
|
|
||||||
|
# customize user settings
|
||||||
|
# prompt symbol
|
||||||
|
if [ ! -z "$FISHBONEPP_PROMPT" ]; then
|
||||||
|
prompt_string="$FISHBONEPP_PROMPT"
|
||||||
|
fi
|
||||||
|
# username
|
||||||
|
if [ ! -z "$FISHBONEPP_USER" ]; then
|
||||||
|
username="$FISHBONEPP_USER"
|
||||||
|
fi
|
||||||
|
# time mode
|
||||||
|
if [ "$FISHBONEPP_TIME" = "12HR" ]; then
|
||||||
|
local_time="%t"
|
||||||
|
elif [ "$FISHBONEPP_TIME" = "FULL" ]; then
|
||||||
|
local_time="%*"
|
||||||
|
else
|
||||||
|
local_time="%T"
|
||||||
|
fi
|
||||||
|
# new line on start
|
||||||
|
if [ "$FISHBONEPP_NEWLINE" = false ]; then
|
||||||
|
newline=''
|
||||||
|
fi
|
||||||
|
# line mode
|
||||||
|
if [ "$FISHBONEPP_LINE_MODE" = "singleline" ]; then
|
||||||
|
line_mode=''
|
||||||
|
fi
|
||||||
|
|
||||||
|
local host_name="%{$fg[blue]%}${username}"
|
||||||
|
local time_string="%{$fg[blue]%}${local_time}"
|
||||||
|
# Make prompt_string red if the previous command failed.
|
||||||
|
local return_status="%(?:%{$fg[cyan]%}$prompt_string:%{$fg[red]%}$prompt_string%}"
|
||||||
|
|
||||||
|
|
||||||
|
# set the git_prompt_info text
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue](%{$reset_color%}%{$fg[yellow]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%{$fg[blue])%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="⚡"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
PROMPT='${newline}\
|
||||||
|
${host_name}${hosr}%{$reset_color%}@${time_string} ${line_mode}\
|
||||||
|
${path_prefix}${path_string}${path_postfix}$(git_prompt_info)$(git_prompt_status) \
|
||||||
|
${return_status} %{$reset_color%}'
|
||||||
|
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED="➕"
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED="✒️ "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED="➖"
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED="⁉️ "
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED="🥺"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="🚝"
|
||||||
73
assets/fastfetch/config-pokemon.jsonc
Normal file
73
assets/fastfetch/config-pokemon.jsonc
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||||
|
"logo": {
|
||||||
|
"height": 5,
|
||||||
|
"width": 10,
|
||||||
|
"padding": {
|
||||||
|
"top": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"display": {
|
||||||
|
"separator": " -> "
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
"break",
|
||||||
|
{
|
||||||
|
"type": "title",
|
||||||
|
"keyWidth": 10,
|
||||||
|
"format": " {6}{7}{8}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": " ─────────────────────────── "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "kernel",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "yellow"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "wm",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "yellow"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "terminal",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "blue"
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
"type": "packages",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "yellow"
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"type": "memory",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "magenta",
|
||||||
|
// format: used / total
|
||||||
|
"format": "{1} / {2}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "uptime",
|
||||||
|
"key": " ",
|
||||||
|
"keyColor": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": " ─────────────────────────── "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom",
|
||||||
|
"format": " \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m \u001b[90m "
|
||||||
|
},
|
||||||
|
"break",
|
||||||
|
]
|
||||||
|
}
|
||||||
7
assets/hyprland-install/README
Normal file
7
assets/hyprland-install/README
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Arch-Hyprland - Sharing a scripts to install hyprland git or non-git versions
|
||||||
|
|
||||||
|
Basically created this script so I can easily switch to git and non-git version of hyprland on Arch Linux
|
||||||
|
|
||||||
|
|
||||||
|
chmod +x actions.sh
|
||||||
|
./actions.sh
|
||||||
63
assets/hyprland-install/actions.sh
Executable file
63
assets/hyprland-install/actions.sh
Executable file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||||
|
|
||||||
|
# Set some colors for output messages
|
||||||
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
|
MAGENTA=$(tput setaf 5)
|
||||||
|
WARNING=$(tput setaf 1)
|
||||||
|
YELLOW=$(tput setaf 3)
|
||||||
|
BLUE=$(tput setaf 4)
|
||||||
|
RESET=$(tput sgr0)
|
||||||
|
|
||||||
|
|
||||||
|
# Make all scripts in the scripts directory executable
|
||||||
|
echo -e "${INFO} Making all files in the ${BLUE}scripts${RESET} directory executable..."
|
||||||
|
chmod +x ./scripts/*
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo -e "${BLUE} Please choose an option:${RESET}"
|
||||||
|
echo -e "${YELLOW} -- 1 - Install non-git Hyprland version${RESET}"
|
||||||
|
echo -e "${YELLOW} -- 2 - Install git Hyprland version${RESET}"
|
||||||
|
echo -e "${YELLOW} -- 3 - Update Hyprland-git packages${RESET}"
|
||||||
|
echo -e "${MAGENTA} -- 4 - Quit${RESET}"
|
||||||
|
|
||||||
|
read -p "${CAT} Enter your choice [1, 2, or 3]: " choice
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
1)
|
||||||
|
printf "\n${OK} You chose ${BLUE}non-git version of Hyprland${RESET}....... executing...\n"
|
||||||
|
echo -e "${YELLOW} Uninstalling some hyprland packages first...${RESET}"
|
||||||
|
./scripts/uninstall.sh &&
|
||||||
|
./scripts/install-hyprland.sh
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
printf "\n${OK} You chose ${BLUE}git version of Hyprland${RESET}....... executing...\n"
|
||||||
|
echo -e "${YELLOW} Uninstalling some hyprland packages....${RESET}"
|
||||||
|
./scripts/uninstall.sh &&
|
||||||
|
./scripts/install-hyprland-git.sh
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
printf "\n${OK} You chose ${BLUE} to update Hyprland-git packages${RESET}....... executing...\n"
|
||||||
|
./scripts/install-hyprland-git.sh
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
4)
|
||||||
|
echo -e "${MAGENTA} You have cancel it. Good Bye!!...${RESET}"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "\n${WARNING} There are only 4 Choices!!!! 1 2 3 or 4. Enter 1, 2, 3, or 4 only.${RESET}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
done
|
||||||
86
assets/hyprland-install/scripts/install-hyprland-git.sh
Executable file
86
assets/hyprland-install/scripts/install-hyprland-git.sh
Executable file
@@ -0,0 +1,86 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||||
|
|
||||||
|
# Set some colors for output messages
|
||||||
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
|
MAGENTA="$(tput setaf 5)"
|
||||||
|
ORANGE="$(tput setaf 214)"
|
||||||
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
# List of packages to install / update
|
||||||
|
packages=(
|
||||||
|
"hyprutils-git"
|
||||||
|
"hyprcursor-git"
|
||||||
|
"hyprwayland-scanner-git"
|
||||||
|
"aquamarine-git"
|
||||||
|
"hyprgraphics-git"
|
||||||
|
"hyprlang-git"
|
||||||
|
"hyprland-protocols-git"
|
||||||
|
"hyprland-qt-support-git"
|
||||||
|
"hyprland-qtutils-git"
|
||||||
|
"hyprland-git"
|
||||||
|
"hyprlock-git"
|
||||||
|
"hypridle-git"
|
||||||
|
"xdg-desktop-portal-hyprland-git"
|
||||||
|
"hyprpolkitagent-git"
|
||||||
|
)
|
||||||
|
|
||||||
|
# rotating stars progress
|
||||||
|
show_progress() {
|
||||||
|
spin='-'
|
||||||
|
while ps | grep $1 &> /dev/null; do
|
||||||
|
echo -ne "\rInstalling ${ORANGE}$2${RESET} ... Kindly wait! $spin"
|
||||||
|
sleep 0.3
|
||||||
|
case $spin in
|
||||||
|
'-') spin='\';;
|
||||||
|
'\') spin='|';;
|
||||||
|
'|') spin='/';;
|
||||||
|
'/') spin='-';;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo -en "\rInstalling ${ORANGE}$2${RESET} ... Kindly wait! .... Done!"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clearing cache
|
||||||
|
echo -n "${CAT} Recommend (choose y to all) to clear ${MAGENTA}pacman and aur helper${RESET} cache ..."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
sudo pacman -Scc &&
|
||||||
|
$ISAUR -Scc
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${NOTE} Installing ${BLUE}git hyprland version${RESET}....."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
|
# Installing packages
|
||||||
|
for package in "${packages[@]}"; do
|
||||||
|
$ISAUR -S --noconfirm "$package" &>/dev/null &
|
||||||
|
pid=$!
|
||||||
|
|
||||||
|
show_progress $pid $package
|
||||||
|
|
||||||
|
wait $pid
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\n${OK} ${ORANGE}$package${RESET} successfully installed."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
else
|
||||||
|
echo -e "\n${ERROR} Failed to install ${MAGENTA}$package${RESET}"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${OK} Done!! Now you NEED to ${YELLOW}EXIT${RESET} Hyprland and Re-Login! Enjoy!!!!"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
80
assets/hyprland-install/scripts/install-hyprland.sh
Executable file
80
assets/hyprland-install/scripts/install-hyprland.sh
Executable file
@@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||||
|
|
||||||
|
# Set some colors for output messages
|
||||||
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
|
MAGENTA="$(tput setaf 5)"
|
||||||
|
ORANGE="$(tput setaf 214)"
|
||||||
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
# List of packages to install / update
|
||||||
|
packages=(
|
||||||
|
"aquamarine"
|
||||||
|
"hyprutils"
|
||||||
|
"hyprcursor"
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
"hyprgraphics"
|
||||||
|
"hyprlang"
|
||||||
|
"hyprland-protocols"
|
||||||
|
"hyprland-qt-support"
|
||||||
|
"hyprland-qtutils"
|
||||||
|
"hyprland"
|
||||||
|
"hyprlock"
|
||||||
|
"hypridle"
|
||||||
|
"xdg-desktop-portal-hyprland"
|
||||||
|
"hyprpolkitagent"
|
||||||
|
)
|
||||||
|
|
||||||
|
# rotating stars progress
|
||||||
|
show_progress() {
|
||||||
|
spin='-'
|
||||||
|
while ps | grep $1 &> /dev/null; do
|
||||||
|
echo -ne "\rInstalling ${ORANGE}$2${RESET} ... Kindly wait! $spin"
|
||||||
|
sleep 0.3
|
||||||
|
case $spin in
|
||||||
|
'-') spin='\';;
|
||||||
|
'\') spin='|';;
|
||||||
|
'|') spin='/';;
|
||||||
|
'/') spin='-';;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
echo -en "\rInstalling ${ORANGE}$2${RESET} ... Kindly wait! .... Done!"
|
||||||
|
}
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${NOTE} Installing ${BLUE}non-git hyprland version${RESET}....."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
|
# Installing packages
|
||||||
|
for package in "${packages[@]}"; do
|
||||||
|
$ISAUR -S --noconfirm "$package" &>/dev/null &
|
||||||
|
pid=$!
|
||||||
|
|
||||||
|
show_progress $pid $package
|
||||||
|
|
||||||
|
wait $pid
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\n${OK} ${ORANGE}$package${RESET} successfully installed."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
else
|
||||||
|
echo -e "\n${ERROR} Failed to install ${MAGENTA}$package${RESET}"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${OK} Done!! Now you NEED to ${YELLOW}EXIT${RESET} Hyprland and Re-Login! Enjoy!!!!"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
90
assets/hyprland-install/scripts/uninstall.sh
Executable file
90
assets/hyprland-install/scripts/uninstall.sh
Executable file
@@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
|
||||||
|
|
||||||
|
# uninstalling hyprland packages
|
||||||
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
|
MAGENTA="$(tput setaf 5)"
|
||||||
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
|
||||||
|
# List of packages to uninstall (including git versions)
|
||||||
|
packages=(
|
||||||
|
"aquamarine"
|
||||||
|
"aquamarine-git"
|
||||||
|
"hyprutils"
|
||||||
|
"hyprutils-git"
|
||||||
|
"hyprcursor"
|
||||||
|
"hyprcursor-git"
|
||||||
|
"hyprwayland-scanner"
|
||||||
|
"hyprwayland-scanner-git"
|
||||||
|
"hyprgraphics"
|
||||||
|
"hyprgraphics-git"
|
||||||
|
"hyprlang"
|
||||||
|
"hyprlang-git"
|
||||||
|
"hyprland-protocols"
|
||||||
|
"hyprland-protocols-git"
|
||||||
|
"hyprland-qt-support"
|
||||||
|
"hyprland-qt-support-git"
|
||||||
|
"hyprland-qtutils"
|
||||||
|
"hyprland-qtutils-git"
|
||||||
|
"hyprland"
|
||||||
|
"hyprland-git"
|
||||||
|
"hyprlock"
|
||||||
|
"hyprlock-git"
|
||||||
|
"hypridle"
|
||||||
|
"hypridle-git"
|
||||||
|
"xdg-desktop-portal-hyprland"
|
||||||
|
"xdg-desktop-portal-hyprland-git"
|
||||||
|
"hyprpolkitagent"
|
||||||
|
"hyprpolkitagent-git"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Function for uninstall packages
|
||||||
|
uninstall_package() {
|
||||||
|
local pkg="$1"
|
||||||
|
|
||||||
|
if pacman -Qi "$pkg" &>> /dev/null ; then
|
||||||
|
echo -e "${NOTE} Uninstalling $pkg ..."
|
||||||
|
sudo pacman -Rnsdd --noconfirm "$pkg" | grep -v "error: target not found"
|
||||||
|
|
||||||
|
if ! pacman -Qi "$pkg" &>> /dev/null ; then
|
||||||
|
echo -e "\e[1A\e[K${OK} $pkg was uninstalled."
|
||||||
|
else
|
||||||
|
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
printf "\n%s - Removing Hyprland Packages including -git versions \n" "${NOTE}"
|
||||||
|
|
||||||
|
# Track failures but continue with next packages
|
||||||
|
overall_failed=0
|
||||||
|
for PKG in "${packages[@]}"; do
|
||||||
|
uninstall_package "$PKG"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
|
||||||
|
overall_failed=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove specific configuration file since on my experience, it conflicts.
|
||||||
|
# Dont worry, it will be reinstalled by either xdph non-git or git version
|
||||||
|
sudo rm -rf "/usr/share/xdg-desktop-portal/hyprland-portals.conf"
|
||||||
|
|
||||||
|
if [ $overall_failed -eq 0 ]; then
|
||||||
|
echo -e "${OK} All specified hyprland packages have been uninstalled."
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
BIN
assets/sddm.png
Normal file
BIN
assets/sddm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
50
auto-install.sh
Normal file
50
auto-install.sh
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# https://github.com/JaKooLit
|
||||||
|
|
||||||
|
# Set some colors for output messages
|
||||||
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
|
MAGENTA="$(tput setaf 5)"
|
||||||
|
ORANGE="$(tput setaf 214)"
|
||||||
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
Distro="Arch-Hyprland"
|
||||||
|
Github_URL="https://github.com/JaKooLit/$Distro.git"
|
||||||
|
Distro_DIR="$HOME/$Distro"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
|
if ! command -v git &> /dev/null
|
||||||
|
then
|
||||||
|
echo "${INFO} Git not found! ${SKY_BLUE}Installing Git...${RESET}"
|
||||||
|
if ! sudo pacman -S git --noconfirm; then
|
||||||
|
echo "${ERROR} Failed to install Git. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
|
if [ -d "$Distro_DIR" ]; then
|
||||||
|
echo "${YELLOW}$Distro_DIR exists. Updating the repository... ${RESET}"
|
||||||
|
cd "$Distro_DIR"
|
||||||
|
git stash && git pull
|
||||||
|
chmod +x install.sh
|
||||||
|
./install.sh
|
||||||
|
else
|
||||||
|
echo "${MAGENTA}$Distro_DIR does not exist. Cloning the repository...${RESET}"
|
||||||
|
git clone --depth=1 "$Github_URL" "$Distro_DIR"
|
||||||
|
cd "$Distro_DIR"
|
||||||
|
chmod +x install.sh
|
||||||
|
./install.sh
|
||||||
|
fi
|
||||||
@@ -1,23 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# base devel + archlinux-keyring #
|
# base-devel + archlinux-keyring #
|
||||||
|
|
||||||
base=(
|
base=(
|
||||||
base-devel
|
base-devel
|
||||||
archlinux-keyring
|
archlinux-keyring
|
||||||
|
findutils
|
||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_base.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_base.log"
|
||||||
|
|
||||||
|
# Installation of main components with pacman
|
||||||
# Installation of main components
|
echo -e "\nInstalling ${SKY_BLUE}base-devel${RESET} and ${SKY_BLUE}archlinux-keyring${RESET}..."
|
||||||
printf "\n%s - Installing base-devel \n" "${NOTE}"
|
|
||||||
|
|
||||||
for PKG1 in "${base[@]}"; do
|
for PKG1 in "${base[@]}"; do
|
||||||
sudo pacman -S --noconfirm "$PKG1" | tee -a "$LOG"
|
echo "Installing $PKG1 with pacman..."
|
||||||
|
install_package_pacman "$PKG1" "$LOG"
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..1}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Hyprland Packages #
|
# Hyprland Packages #
|
||||||
|
|
||||||
# edit your packages desired here.
|
# edit your packages desired here.
|
||||||
# WARNING! If you remove packages here, dotfiles may not work properly.
|
# WARNING! If you remove packages here, dotfiles may not work properly.
|
||||||
# and also, ensure that packages are present in AUR and official Arch Repo
|
# and also, ensure that packages are present in AUR and official Arch Repo
|
||||||
|
|
||||||
@@ -11,61 +11,64 @@ Extra=(
|
|||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
hypr_package=(
|
hypr_package=(
|
||||||
#aylurs-gtk-shell
|
#aylurs-gtk-shell
|
||||||
|
bc
|
||||||
cliphist
|
cliphist
|
||||||
curl
|
curl
|
||||||
grim
|
grim
|
||||||
gvfs
|
gvfs
|
||||||
gvfs-mtp
|
gvfs-mtp
|
||||||
hyprpolkitagent
|
hyprpolkitagent
|
||||||
imagemagick
|
imagemagick
|
||||||
inxi
|
inxi
|
||||||
jq
|
jq
|
||||||
kitty
|
kitty
|
||||||
kvantum
|
kvantum
|
||||||
nano
|
libspng
|
||||||
network-manager-applet
|
nano
|
||||||
pamixer
|
network-manager-applet
|
||||||
|
pamixer
|
||||||
pavucontrol
|
pavucontrol
|
||||||
pipewire-alsa
|
|
||||||
playerctl
|
playerctl
|
||||||
python-requests
|
python-requests
|
||||||
python-pyquery
|
python-pyquery
|
||||||
qt5ct
|
qt5ct
|
||||||
qt6ct
|
qt6ct
|
||||||
qt6-svg
|
qt6-svg
|
||||||
rofi-wayland
|
rofi
|
||||||
slurp
|
slurp
|
||||||
swappy
|
swappy
|
||||||
swaync
|
swaync
|
||||||
swww
|
swww
|
||||||
wallust
|
unzip # needed later
|
||||||
|
uwsm # In case someone selects USWM login
|
||||||
|
wallust
|
||||||
waybar
|
waybar
|
||||||
wget
|
wget
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wlogout
|
wlogout
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
xdg-utils
|
xdg-utils
|
||||||
yad
|
yad
|
||||||
)
|
)
|
||||||
|
|
||||||
# the following packages can be deleted. however, dotfiles may not work properly
|
# the following packages can be deleted. however, dotfiles may not work properly
|
||||||
hypr_package_2=(
|
hypr_package_2=(
|
||||||
brightnessctl
|
brightnessctl
|
||||||
btop
|
btop
|
||||||
cava
|
cava
|
||||||
eog
|
loupe
|
||||||
fastfetch
|
fastfetch
|
||||||
gnome-system-monitor
|
gnome-system-monitor
|
||||||
mousepad
|
mousepad
|
||||||
mpv
|
mpv
|
||||||
mpv-mpris
|
mpv-mpris
|
||||||
nvtop
|
nvtop
|
||||||
nwg-look
|
nwg-look
|
||||||
|
nwg-displays
|
||||||
pacman-contrib
|
pacman-contrib
|
||||||
qalculate-gtk
|
qalculate-gtk
|
||||||
vim
|
|
||||||
yt-dlp
|
yt-dlp
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -73,34 +76,39 @@ hypr_package_2=(
|
|||||||
uninstall=(
|
uninstall=(
|
||||||
aylurs-gtk-shell
|
aylurs-gtk-shell
|
||||||
dunst
|
dunst
|
||||||
mako
|
|
||||||
cachyos-hyprland-settings
|
cachyos-hyprland-settings
|
||||||
|
mako
|
||||||
rofi
|
rofi
|
||||||
wallust-git
|
wallust-git
|
||||||
|
rofi-lbonn-wayland
|
||||||
|
rofi-lbonn-wayland-git
|
||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || {
|
||||||
|
echo "${ERROR} Failed to change directory to $PARENT_DIR"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hypr-pkgs.log"
|
||||||
|
|
||||||
# uninstalling conflicting packages
|
# conflicting packages removal
|
||||||
# Initialize a variable to track overall errors
|
|
||||||
overall_failed=0
|
overall_failed=0
|
||||||
|
printf "\n%s - ${SKY_BLUE}Removing some packages${RESET} as it conflicts with KooL's Hyprland Dots \n" "${NOTE}"
|
||||||
printf "\n%s - Removing Mako, Dunst, and rofi as they conflict with swaync and rofi-wayland \n" "${NOTE}"
|
|
||||||
for PKG in "${uninstall[@]}"; do
|
for PKG in "${uninstall[@]}"; do
|
||||||
uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
|
uninstall_package "$PKG" 2>&1 | tee -a "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
# Track if any uninstallation failed
|
|
||||||
overall_failed=1
|
overall_failed=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -109,17 +117,13 @@ if [ $overall_failed -ne 0 ]; then
|
|||||||
echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
|
echo -e "${ERROR} Some packages failed to uninstall. Please check the log."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Installation of main components
|
# Installation of main components
|
||||||
printf "\n%s - Installing hyprland packages.... \n" "${NOTE}"
|
printf "\n%s - Installing ${SKY_BLUE}KooL's Hyprland necessary packages${RESET} .... \n" "${NOTE}"
|
||||||
|
|
||||||
for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do
|
for PKG1 in "${hypr_package[@]}" "${hypr_package_2[@]}" "${Extra[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,11 @@ packages=(
|
|||||||
hypridle
|
hypridle
|
||||||
hyprlock
|
hyprlock
|
||||||
hyprland
|
hyprland
|
||||||
pyprland
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Local packages that should be in /usr/local/bin/
|
# Local packages that should be in /usr/local/bin/
|
||||||
local_pkgs_installed=(
|
local_pkgs_installed=(
|
||||||
ags
|
|
||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
@@ -40,19 +39,19 @@ source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/00_CHECK-$(date +%d-%H%M%S)_installed.log"
|
LOG="Install-Logs/00_CHECK-$(date +%d-%H%M%S)_installed.log"
|
||||||
|
|
||||||
printf "\n%s - Final Check if Essential packages were installed \n" "${NOTE}"
|
printf "\n%s - Final Check if all ${SKY_BLUE}Essential packages${RESET} were installed \n" "${NOTE}"
|
||||||
# Initialize an empty array to hold missing packages
|
# Initialize an empty array to hold missing packages
|
||||||
missing=()
|
missing=()
|
||||||
local_missing=()
|
local_missing=()
|
||||||
|
|
||||||
# Function to check if a package is installed using pacman
|
# Function to check if a packages are installed using pacman
|
||||||
is_installed_pacman() {
|
is_installed_pacman() {
|
||||||
pacman -Qi "$1" &>/dev/null
|
pacman -Qi "$1" &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Loop through each package
|
# Loop through each package
|
||||||
for pkg in "${packages[@]}"; do
|
for pkg in "${packages[@]}"; do
|
||||||
# Check if the package is installed via pacman
|
# Check if the packages are installed
|
||||||
if ! is_installed_pacman "$pkg"; then
|
if ! is_installed_pacman "$pkg"; then
|
||||||
missing+=("$pkg")
|
missing+=("$pkg")
|
||||||
fi
|
fi
|
||||||
@@ -67,25 +66,24 @@ done
|
|||||||
|
|
||||||
# Log missing packages
|
# Log missing packages
|
||||||
if [ ${#missing[@]} -eq 0 ] && [ ${#local_missing[@]} -eq 0 ]; then
|
if [ ${#missing[@]} -eq 0 ] && [ ${#local_missing[@]} -eq 0 ]; then
|
||||||
echo "${OK} All essential packages are installed." | tee -a "$LOG"
|
echo "${OK} GREAT! All ${YELLOW}essential packages${RESET} have been successfully installed." | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
if [ ${#missing[@]} -ne 0 ]; then
|
if [ ${#missing[@]} -ne 0 ]; then
|
||||||
echo "${WARN} The following packages are not installed and will be logged:"
|
echo "${WARN} The following packages are not installed and will be logged:"
|
||||||
for pkg in "${missing[@]}"; do
|
for pkg in "${missing[@]}"; do
|
||||||
echo "$pkg"
|
echo "${WARNING}$pkg${RESET}"
|
||||||
echo "$pkg" >> "$LOG" # Log the missing package to the file
|
echo "$pkg" >> "$LOG"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#local_missing[@]} -ne 0 ]; then
|
if [ ${#local_missing[@]} -ne 0 ]; then
|
||||||
echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
|
echo "${WARN} The following local packages are missing from /usr/local/bin/ and will be logged:"
|
||||||
for pkg1 in "${local_missing[@]}"; do
|
for pkg1 in "${local_missing[@]}"; do
|
||||||
echo "$pkg1 is not installed. Can't find it in /usr/local/bin/"
|
echo "${WARNING}$pkg1${REST} is not installed. Can't find it in /usr/local/bin/"
|
||||||
echo "$pkg1" >> "$LOG" # Log the missing local package to the file
|
echo "$pkg1" >> "$LOG"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add a timestamp when the missing packages were logged
|
|
||||||
echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
|
echo "${NOTE} Missing packages logged at $(date)" >> "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -8,79 +8,125 @@ set -e
|
|||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 5)[WARN]$(tput sgr0)"
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
ORANGE=$(tput setaf 166)
|
MAGENTA="$(tput setaf 5)"
|
||||||
YELLOW=$(tput setaf 3)
|
ORANGE="$(tput setaf 214)"
|
||||||
RESET=$(tput sgr0)
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
# Create Directory for Install Logs
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
mkdir Install-Logs
|
mkdir Install-Logs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Function for installing packages
|
# Show progress function
|
||||||
|
show_progress() {
|
||||||
|
local pid=$1
|
||||||
|
local package_name=$2
|
||||||
|
local spin_chars=("●○○○○○○○○○" "○●○○○○○○○○" "○○●○○○○○○○" "○○○●○○○○○○" "○○○○●○○○○" \
|
||||||
|
"○○○○○●○○○○" "○○○○○○●○○○" "○○○○○○○●○○" "○○○○○○○○●○" "○○○○○○○○○●")
|
||||||
|
local i=0
|
||||||
|
|
||||||
|
tput civis
|
||||||
|
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} ..." "$package_name"
|
||||||
|
|
||||||
|
while ps -p $pid &> /dev/null; do
|
||||||
|
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} %s" "$package_name" "${spin_chars[i]}"
|
||||||
|
i=$(( (i + 1) % 10 ))
|
||||||
|
sleep 0.3
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\r${NOTE} Installing ${YELLOW}%s${RESET} ... Done!%-20s \n" "$package_name" ""
|
||||||
|
tput cnorm
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Function to install packages with pacman
|
||||||
install_package_pacman() {
|
install_package_pacman() {
|
||||||
# Checking if package is already installed
|
# Check if package is already installed
|
||||||
if pacman -Q "$1" &>/dev/null ; then
|
if pacman -Q "$1" &>/dev/null ; then
|
||||||
echo -e "${OK} $1 is already installed. Skipping..."
|
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||||
else
|
else
|
||||||
# Package not installed
|
# Run pacman and redirect all output to a log file
|
||||||
echo -e "${NOTE} Installing $1 ..."
|
(
|
||||||
sudo pacman -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
|
stdbuf -oL sudo pacman -S --noconfirm "$1" 2>&1
|
||||||
# Making sure package is installed
|
) >> "$LOG" 2>&1 &
|
||||||
|
PID=$!
|
||||||
|
show_progress $PID "$1"
|
||||||
|
|
||||||
|
# Double check if package is installed
|
||||||
if pacman -Q "$1" &>/dev/null ; then
|
if pacman -Q "$1" &>/dev/null ; then
|
||||||
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||||
else
|
else
|
||||||
# Something is missing, exiting to review log
|
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install. Please check the $LOG. You may need to install manually."
|
||||||
echo -e "${ERROR} $1 failed to install. Please check the $LOG. You may need to install manually."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
|
# Function to install packages with either yay or paru
|
||||||
# Function for installing packages
|
|
||||||
install_package() {
|
install_package() {
|
||||||
# Checking if package is already installed
|
|
||||||
if $ISAUR -Q "$1" &>> /dev/null ; then
|
if $ISAUR -Q "$1" &>> /dev/null ; then
|
||||||
echo -e "${OK} $1 is already installed. Skipping..."
|
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
|
||||||
else
|
else
|
||||||
# Package not installed
|
(
|
||||||
echo -e "${NOTE} Installing $1 ..."
|
stdbuf -oL $ISAUR -S --noconfirm "$1" 2>&1
|
||||||
$ISAUR -S --noconfirm --needed "$1" 2>&1 | tee -a "$LOG"
|
) >> "$LOG" 2>&1 &
|
||||||
# Making sure package is installed
|
PID=$!
|
||||||
|
show_progress $PID "$1"
|
||||||
|
|
||||||
|
# Double check if package is installed
|
||||||
if $ISAUR -Q "$1" &>> /dev/null ; then
|
if $ISAUR -Q "$1" &>> /dev/null ; then
|
||||||
echo -e "\e[1A\e[K${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||||
else
|
else
|
||||||
# Something is missing, exiting to review log
|
# Something is missing, exiting to review log
|
||||||
echo -e "\e[1A\e[K${ERROR} $1 failed to install :( , please check the install.log. You may need to install manually! Sorry I have tried :("
|
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install :( , please check the install.log. You may need to install manually! Sorry I have tried :("
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function for uninstalling packages
|
# Function to just install packages with either yay or paru without checking if installed
|
||||||
|
install_package_f() {
|
||||||
|
(
|
||||||
|
stdbuf -oL $ISAUR -S --noconfirm "$1" 2>&1
|
||||||
|
) >> "$LOG" 2>&1 &
|
||||||
|
PID=$!
|
||||||
|
show_progress $PID "$1"
|
||||||
|
|
||||||
|
# Double check if package is installed
|
||||||
|
if $ISAUR -Q "$1" &>> /dev/null ; then
|
||||||
|
echo -e "${OK} Package ${YELLOW}$1${RESET} has been successfully installed!"
|
||||||
|
else
|
||||||
|
# Something is missing, exiting to review log
|
||||||
|
echo -e "\n${ERROR} ${YELLOW}$1${RESET} failed to install :( , please check the install.log. You may need to install manually! Sorry I have tried :("
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Function for removing packages
|
||||||
uninstall_package() {
|
uninstall_package() {
|
||||||
local pkg="$1"
|
local pkg="$1"
|
||||||
|
|
||||||
# Checking if package is installed
|
# Checking if package is installed
|
||||||
if pacman -Qi "$pkg" &>> /dev/null ; then
|
if pacman -Qi "$pkg" &>/dev/null; then
|
||||||
# Package is installed
|
echo -e "${NOTE} removing $pkg ..."
|
||||||
echo -e "${NOTE} Uninstalling $pkg ..."
|
|
||||||
sudo pacman -R --noconfirm "$pkg" 2>&1 | tee -a "$LOG" | grep -v "error: target not found"
|
sudo pacman -R --noconfirm "$pkg" 2>&1 | tee -a "$LOG" | grep -v "error: target not found"
|
||||||
# Check if the package was uninstalled
|
|
||||||
if ! pacman -Qi "$pkg" &>> /dev/null ; then
|
if ! pacman -Qi "$pkg" &>/dev/null; then
|
||||||
echo -e "\e[1A\e[K${OK} $pkg was uninstalled."
|
echo -e "\e[1A\e[K${OK} $pkg removed."
|
||||||
else
|
else
|
||||||
echo -e "\e[1A\e[K${ERROR} $pkg failed to uninstall. Please check the log."
|
echo -e "\e[1A\e[K${ERROR} $pkg Removal failed. No actions required."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${NOTE} $pkg is not installed, skipping uninstallation."
|
echo -e "${INFO} Package $pkg not installed, skipping."
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -2,58 +2,35 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Adding users into input group #
|
# Adding users into input group #
|
||||||
|
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_input.log"
|
||||||
|
|
||||||
while true; do
|
# Check if the 'input' group exists
|
||||||
echo "${WARN} This script will add your user to the 'input' group."
|
if grep -q '^input:' /etc/group; then
|
||||||
echo "${NOTE} Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality."
|
echo "${OK} ${MAGENTA}input${RESET} group exists."
|
||||||
|
else
|
||||||
printf "\n%.0s" {1..1}
|
echo "${NOTE} ${MAGENTA}input${RESET} group doesn't exist. Creating ${MAGENTA}input${RESET} group..."
|
||||||
|
sudo groupadd input
|
||||||
if [[ -z $input_group_choid ]]; then
|
echo "${MAGENTA}input${RESET} group created" >> "$LOG"
|
||||||
read -p "${YELLOW}Do you want to proceed? (y/n): ${RESET}" input_group_choid
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $input_group_choid == "y" || $input_group_choid == "Y" ]]; then
|
# Add the user to the 'input' group
|
||||||
# Check if the 'input' group exists
|
sudo usermod -aG input "$(whoami)"
|
||||||
if grep -q '^input:' /etc/group; then
|
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"
|
||||||
echo "${OK} 'input' group exists."
|
|
||||||
else
|
|
||||||
echo "${NOTE} 'input' group doesn't exist. Creating 'input' group..."
|
|
||||||
sudo groupadd input
|
|
||||||
|
|
||||||
# Log the creation of the 'input' group
|
printf "\n%.0s" {1..2}
|
||||||
echo "'input' group created" >> "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add the user to the input group
|
|
||||||
sudo usermod -aG input "$(whoami)"
|
|
||||||
echo "${OK} User added to the 'input' group. Changes will take effect after you log out and log back in."
|
|
||||||
|
|
||||||
# Log the addition of the user to the 'input' group
|
|
||||||
echo "User added to 'input' group" >> "$LOG"
|
|
||||||
break # Break out of the loop if 'yes' is chosen
|
|
||||||
elif [[ $input_group_choid == "n" || $input_group_choid == "N" ]]; then
|
|
||||||
echo "${NOTE} No changes made. Exiting the script."
|
|
||||||
break # Break out of the loop if 'no' is chosen
|
|
||||||
else
|
|
||||||
echo "${ERROR} Invalid choice. Please enter 'y' for yes or 'n' for no."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
clear
|
|
||||||
|
|||||||
18
install-scripts/ags.launcher.com.github.Aylur.ags
Executable file
18
install-scripts/ags.launcher.com.github.Aylur.ags
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/gjs -m
|
||||||
|
|
||||||
|
import { exit, programArgs, programInvocationName } from "system";
|
||||||
|
import GLib from "gi://GLib";
|
||||||
|
|
||||||
|
// Ensure GI can see typelibs in /usr/local and the system girepository
|
||||||
|
GLib.setenv("GI_TYPELIB_PATH", "/usr/local/lib:/usr/lib/girepository-1.0", true);
|
||||||
|
|
||||||
|
imports.package.init({
|
||||||
|
name: "com.github.Aylur.ags",
|
||||||
|
version: "1.9.0",
|
||||||
|
prefix: "/usr/local",
|
||||||
|
libdir: "/usr/local/lib",
|
||||||
|
});
|
||||||
|
|
||||||
|
const module = await import("resource:///com/github/Aylur/ags/main.js");
|
||||||
|
const exitCode = await module.main([programInvocationName, ...programArgs]);
|
||||||
|
exit(exitCode);
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Aylur's GTK Shell v 1.8.2#
|
# Aylur's GTK Shell v 1.9.0 #
|
||||||
|
# for desktop overview
|
||||||
|
|
||||||
|
if [[ $USE_PRESET = [Yy] ]]; then
|
||||||
|
source ./preset.sh
|
||||||
|
fi
|
||||||
|
|
||||||
ags=(
|
ags=(
|
||||||
typescript
|
typescript
|
||||||
@@ -10,7 +15,8 @@ ags=(
|
|||||||
gjs
|
gjs
|
||||||
gtk3
|
gtk3
|
||||||
gtk-layer-shell
|
gtk-layer-shell
|
||||||
upower networkmanager
|
upower
|
||||||
|
networkmanager
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
libdbusmenu-gtk3
|
libdbusmenu-gtk3
|
||||||
libsoup3
|
libsoup3
|
||||||
@@ -20,61 +26,134 @@ ags=(
|
|||||||
ags_tag="v1.9.0"
|
ags_tag="v1.9.0"
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fail early and make pipelines fail if any command fails
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_ags.log"
|
||||||
MLOG="install-$(date +%d-%H%M%S)_ags2.log"
|
MLOG="install-$(date +%d-%H%M%S)_ags2.log"
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
# NOTE: We intentionally do NOT run `ags -v` here, because a broken AGS
|
||||||
|
# installation (missing GUtils, etc.) would crash gjs and spam errors
|
||||||
|
# during install. We always (re)install v1.9.0 when this script is run.
|
||||||
# Installation of main components
|
# Installation of main components
|
||||||
printf "\n%s - Installing AGS Dependencies \n" "${NOTE}"
|
printf "\n%s - Installing ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET} Dependencies \n" "${NOTE}"
|
||||||
|
|
||||||
# Installing ags Dependencies
|
# Installing ags Dependencies
|
||||||
for PKG1 in "${ags[@]}"; do
|
for PKG1 in "${ags[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "\n%.0s" {1..1}
|
printf "\n%.0s" {1..1}
|
||||||
# ags
|
|
||||||
printf "${NOTE} Install and Compiling Aylurs GTK shell $ags_tag..\n"
|
|
||||||
|
|
||||||
# Check if folder exists and remove it
|
# ags v1
|
||||||
if [ -d "ags" ]; then
|
printf "${NOTE} Install and Compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}..\n"
|
||||||
printf "${NOTE} Removing existing ags folder...\n"
|
|
||||||
rm -rf "ags"
|
# Check if directory exists and remove it
|
||||||
|
if [ -d "ags_v1.9.0" ]; then
|
||||||
|
printf "${NOTE} Removing existing ags directory...\n"
|
||||||
|
rm -rf "ags_v1.9.0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clone nwg-look repository with the specified tag
|
printf "\n%.0s" {1..1}
|
||||||
if git clone --recursive -b "$ags_tag" --depth 1 https://github.com/Aylur/ags.git; then
|
printf "${INFO} Kindly Standby...cloning and compiling ${SKY_BLUE}Aylur's GTK shell $ags_tag${RESET}...\n"
|
||||||
cd ags || exit 1
|
printf "\n%.0s" {1..1}
|
||||||
# Build and install ags
|
# Clone repository with the specified tag and compile AGS
|
||||||
|
if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then
|
||||||
|
cd ags_v1.9.0 || exit 1
|
||||||
|
|
||||||
|
# Patch tsconfig to avoid TS5107 failure (moduleResolution=node10 deprecation)
|
||||||
|
if [ -f tsconfig.json ]; then
|
||||||
|
# 1) Ensure ignoreDeprecations is present
|
||||||
|
if ! grep -q '"ignoreDeprecations"[[:space:]]*:' tsconfig.json; then
|
||||||
|
sed -i 's/"compilerOptions":[[:space:]]*{/"compilerOptions": {\n "ignoreDeprecations": "6.0",/' tsconfig.json
|
||||||
|
fi
|
||||||
|
# 2) Bump moduleResolution from node10 to node16 if present
|
||||||
|
if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then
|
||||||
|
sed -i 's/"moduleResolution"[[:space:]]*:[[:space:]]*"node10"/"moduleResolution": "node16"/' tsconfig.json || true
|
||||||
|
fi
|
||||||
|
# 3) Fallback with Node to rewrite JSON if sed failed to catch patterns
|
||||||
|
if grep -q '"moduleResolution"[[:space:]]*:[[:space:]]*"node10"' tsconfig.json; then
|
||||||
|
if command -v node >/dev/null 2>&1; then
|
||||||
|
node -e '\n const fs = require("fs");\n const p = "tsconfig.json";\n const j = JSON.parse(fs.readFileSync(p, "utf8"));\n j.compilerOptions = j.compilerOptions || {};\n if (j.compilerOptions.moduleResolution === "node10") j.compilerOptions.moduleResolution = "node16";\n if (j.compilerOptions.ignoreDeprecations === undefined) j.compilerOptions.ignoreDeprecations = "6.0";\n fs.writeFileSync(p, JSON.stringify(j, null, 2));\n '
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Log what we ended up with for troubleshooting
|
||||||
|
echo "== tsconfig.json after patch ==" >> "$MLOG"
|
||||||
|
grep -n 'moduleResolution\|ignoreDeprecations' tsconfig.json >> "$MLOG" || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace pam.ts with a stub that does NOT depend on GUtils at all.
|
||||||
|
# The desktop overview does not use PAM, and GUtils typelib support is
|
||||||
|
# inconsistent across distros, so we disable these helpers instead of
|
||||||
|
# crashing at startup when the typelib is missing.
|
||||||
|
if [ -f src/utils/pam.ts ]; then
|
||||||
|
printf "%s Replacing src/utils/pam.ts with PAM stub (no GUtils dependency)...\\n" "${NOTE}" | tee -a "$MLOG"
|
||||||
|
cat > src/utils/pam.ts <<'PAM_STUB'
|
||||||
|
// Stubbed PAM auth for AGS installed via Arch-Hyprland.
|
||||||
|
// The desktop overview does not use PAM, and GUtils typelib support
|
||||||
|
// is unreliable across distros, so we disable these helpers here.
|
||||||
|
|
||||||
|
export function authenticate(password: string): Promise<number> {
|
||||||
|
return Promise.reject(new Error("PAM authentication disabled on this system (no GUtils)"));
|
||||||
|
}
|
||||||
|
|
||||||
|
export function authenticateUser(username: string, password: string): Promise<number> {
|
||||||
|
return Promise.reject(new Error("PAM authentication disabled on this system (no GUtils)"));
|
||||||
|
}
|
||||||
|
PAM_STUB
|
||||||
|
fi
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
meson setup build
|
meson setup build
|
||||||
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
if sudo meson install -C build 2>&1 | tee -a "$MLOG"; then
|
||||||
printf "${OK} ags installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
printf "\n${OK} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG"
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Installation failed for ags" 2>&1 | tee -a "$MLOG"
|
echo -e "\n${ERROR} ${YELLOW}Aylur's GTK shell $ags_tag${RESET} Installation failed\n " 2>&1 | tee -a "$MLOG"
|
||||||
|
# Abort here on build/install failure so we do NOT install a broken launcher
|
||||||
|
# or report success when AGS binaries are missing.
|
||||||
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
|
cd ..
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
LAUNCHER_DIR="/usr/local/share/com.github.Aylur.ags"
|
||||||
|
LAUNCHER_PATH="$LAUNCHER_DIR/com.github.Aylur.ags"
|
||||||
|
sudo mkdir -p "$LAUNCHER_DIR"
|
||||||
|
|
||||||
|
# Install the known-good launcher we captured from a working system.
|
||||||
|
# This JS entry script uses GLib to set GI_TYPELIB_PATH and does not
|
||||||
|
# depend on GIRepository, which avoids missing-typelib crashes.
|
||||||
|
LAUNCHER_SRC="$SCRIPT_DIR/ags.launcher.com.github.Aylur.ags"
|
||||||
|
if [ -f "$LAUNCHER_SRC" ]; then
|
||||||
|
sudo install -m 755 "$LAUNCHER_SRC" "$LAUNCHER_PATH"
|
||||||
|
else
|
||||||
|
printf "${WARN} Saved launcher not found at %s; leaving Meson-installed launcher untouched.\\n" "$LAUNCHER_SRC" | tee -a "$MLOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure /usr/local/bin/ags points to the JS entry script.
|
||||||
|
sudo mkdir -p /usr/local/bin
|
||||||
|
sudo ln -srf "$LAUNCHER_PATH" /usr/local/bin/ags
|
||||||
|
printf "${OK} AGS launcher installed.\\n"
|
||||||
# Move logs to Install-Logs directory
|
# Move logs to Install-Logs directory
|
||||||
mv "$MLOG" ../Install-Logs/ || true
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
echo -e "${ERROR} Failed to download ags Please check your connection" 2>&1 | tee -a "$LOG"
|
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"
|
||||||
mv "$MLOG" ../Install-Logs/ || true
|
mv "$MLOG" ../Install-Logs/ || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|||||||
116
install-scripts/battery-monitor.sh
Normal file
116
install-scripts/battery-monitor.sh
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# Battery Monitor and Low Battery Notification #
|
||||||
|
|
||||||
|
battery=(
|
||||||
|
acpi
|
||||||
|
libnotify
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_battery-monitor.log"
|
||||||
|
|
||||||
|
# Battery Monitor
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}Battery Monitor${RESET} Packages...\n"
|
||||||
|
for BAT in "${battery[@]}"; do
|
||||||
|
install_package "$BAT" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create battery monitoring script
|
||||||
|
printf "${NOTE} Creating ${YELLOW}battery monitoring${RESET} script...\n"
|
||||||
|
|
||||||
|
BATTERY_SCRIPT="$HOME/.config/hypr/scripts/battery-monitor.sh"
|
||||||
|
mkdir -p "$HOME/.config/hypr/scripts"
|
||||||
|
|
||||||
|
cat > "$BATTERY_SCRIPT" << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
# Low Battery Notification Script
|
||||||
|
# Monitors battery level and sends notifications
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
LOW_BATTERY_THRESHOLD=20
|
||||||
|
CRITICAL_BATTERY_THRESHOLD=10
|
||||||
|
CHECK_INTERVAL=60 # Check every 60 seconds
|
||||||
|
|
||||||
|
# Track notification state to avoid spam
|
||||||
|
NOTIFIED_LOW=false
|
||||||
|
NOTIFIED_CRITICAL=false
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
# Get battery percentage
|
||||||
|
BATTERY_LEVEL=$(acpi -b | grep -P -o '[0-9]+(?=%)')
|
||||||
|
BATTERY_STATUS=$(acpi -b | grep -o 'Discharging\|Charging\|Full')
|
||||||
|
|
||||||
|
# Only send notifications when discharging
|
||||||
|
if [ "$BATTERY_STATUS" = "Discharging" ]; then
|
||||||
|
if [ "$BATTERY_LEVEL" -le "$CRITICAL_BATTERY_THRESHOLD" ] && [ "$NOTIFIED_CRITICAL" = false ]; then
|
||||||
|
notify-send -u critical -i battery-caution "Critical Battery" "Battery level is at ${BATTERY_LEVEL}%! Please plug in your charger immediately."
|
||||||
|
NOTIFIED_CRITICAL=true
|
||||||
|
NOTIFIED_LOW=true
|
||||||
|
elif [ "$BATTERY_LEVEL" -le "$LOW_BATTERY_THRESHOLD" ] && [ "$NOTIFIED_LOW" = false ]; then
|
||||||
|
notify-send -u normal -i battery-low "Low Battery" "Battery level is at ${BATTERY_LEVEL}%. Consider plugging in your charger."
|
||||||
|
NOTIFIED_LOW=true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Reset notification flags when charging or full
|
||||||
|
NOTIFIED_LOW=false
|
||||||
|
NOTIFIED_CRITICAL=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep "$CHECK_INTERVAL"
|
||||||
|
done
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "$BATTERY_SCRIPT"
|
||||||
|
|
||||||
|
printf "${OK} Battery monitoring script created at ${YELLOW}$BATTERY_SCRIPT${RESET}\n"
|
||||||
|
|
||||||
|
# Create systemd user service
|
||||||
|
printf "${NOTE} Creating ${YELLOW}systemd user service${RESET} for battery monitoring...\n"
|
||||||
|
|
||||||
|
SYSTEMD_DIR="$HOME/.config/systemd/user"
|
||||||
|
mkdir -p "$SYSTEMD_DIR"
|
||||||
|
|
||||||
|
cat > "$SYSTEMD_DIR/battery-monitor.service" << EOF
|
||||||
|
[Unit]
|
||||||
|
Description=Battery Level Monitor
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=$BATTERY_SCRIPT
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
printf "${OK} Systemd service created\n"
|
||||||
|
|
||||||
|
# Enable and start the service
|
||||||
|
printf "${NOTE} Enabling and starting ${YELLOW}battery-monitor${RESET} service...\n"
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
systemctl --user enable battery-monitor.service 2>&1 | tee -a "$LOG"
|
||||||
|
systemctl --user start battery-monitor.service 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
printf "${OK} Battery monitor service is now running!\n"
|
||||||
|
printf "${INFO} You can check status with: ${YELLOW}systemctl --user status battery-monitor${RESET}\n"
|
||||||
|
printf "${INFO} To stop: ${YELLOW}systemctl --user stop battery-monitor${RESET}\n"
|
||||||
|
printf "${INFO} To disable: ${YELLOW}systemctl --user disable battery-monitor${RESET}\n"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
@@ -9,26 +9,30 @@ blue=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_bluetooth.log"
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
printf "${NOTE} Installing Bluetooth Packages...\n"
|
printf "${NOTE} Installing ${SKY_BLUE}Bluetooth${RESET} Packages...\n"
|
||||||
for BLUE in "${blue[@]}"; do
|
for BLUE in "${blue[@]}"; do
|
||||||
install_package "$BLUE" 2>&1 | tee -a "$LOG"
|
install_package "$BLUE" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $BLUE Package installation failed, Please check the installation logs"; exit 1; }
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating Bluetooth Services...\n"
|
printf " Activating ${YELLOW}Bluetooth${RESET} Services...\n"
|
||||||
sudo systemctl enable --now bluetooth.service 2>&1 | tee -a "$LOG"
|
sudo systemctl enable --now bluetooth.service 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
126
install-scripts/disk-monitor.sh
Normal file
126
install-scripts/disk-monitor.sh
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# Disk Space Monitor #
|
||||||
|
|
||||||
|
disk=(
|
||||||
|
libnotify
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_disk-monitor.log"
|
||||||
|
|
||||||
|
# Disk Monitor
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}Disk Monitor${RESET} Packages...\n"
|
||||||
|
for DISK in "${disk[@]}"; do
|
||||||
|
install_package "$DISK" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create disk monitoring script
|
||||||
|
printf "${NOTE} Creating ${YELLOW}disk space monitoring${RESET} script...\n"
|
||||||
|
|
||||||
|
DISK_SCRIPT="$HOME/.config/hypr/scripts/disk-monitor.sh"
|
||||||
|
mkdir -p "$HOME/.config/hypr/scripts"
|
||||||
|
|
||||||
|
cat > "$DISK_SCRIPT" << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
# Disk Space Monitoring Script
|
||||||
|
# Monitors disk usage and sends notifications
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
DISK_WARNING_THRESHOLD=80
|
||||||
|
DISK_CRITICAL_THRESHOLD=90
|
||||||
|
CHECK_INTERVAL=300 # Check every 5 minutes
|
||||||
|
|
||||||
|
# Track notification state
|
||||||
|
declare -A NOTIFIED_WARNING
|
||||||
|
declare -A NOTIFIED_CRITICAL
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
# Get disk usage for all mounted filesystems
|
||||||
|
df -h | grep '^/dev/' | while read -r line; do
|
||||||
|
DEVICE=$(echo "$line" | awk '{print $1}')
|
||||||
|
MOUNT=$(echo "$line" | awk '{print $6}')
|
||||||
|
USAGE=$(echo "$line" | awk '{print $5}' | sed 's/%//')
|
||||||
|
|
||||||
|
# Skip if usage is not a number
|
||||||
|
if ! [[ "$USAGE" =~ ^[0-9]+$ ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check disk usage
|
||||||
|
if [ "$USAGE" -ge "$DISK_CRITICAL_THRESHOLD" ]; then
|
||||||
|
if [ "${NOTIFIED_CRITICAL[$MOUNT]}" != "true" ]; then
|
||||||
|
notify-send -u critical -i drive-harddisk "Critical Disk Space" "Mount point $MOUNT is ${USAGE}% full!\nDevice: $DEVICE"
|
||||||
|
NOTIFIED_CRITICAL[$MOUNT]="true"
|
||||||
|
NOTIFIED_WARNING[$MOUNT]="true"
|
||||||
|
fi
|
||||||
|
elif [ "$USAGE" -ge "$DISK_WARNING_THRESHOLD" ]; then
|
||||||
|
if [ "${NOTIFIED_WARNING[$MOUNT]}" != "true" ]; then
|
||||||
|
notify-send -u normal -i drive-harddisk "Low Disk Space" "Mount point $MOUNT is ${USAGE}% full\nDevice: $DEVICE"
|
||||||
|
NOTIFIED_WARNING[$MOUNT]="true"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Reset notifications when usage drops
|
||||||
|
if [ "$USAGE" -lt $((DISK_WARNING_THRESHOLD - 5)) ]; then
|
||||||
|
NOTIFIED_WARNING[$MOUNT]="false"
|
||||||
|
NOTIFIED_CRITICAL[$MOUNT]="false"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
sleep "$CHECK_INTERVAL"
|
||||||
|
done
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "$DISK_SCRIPT"
|
||||||
|
|
||||||
|
printf "${OK} Disk monitoring script created at ${YELLOW}$DISK_SCRIPT${RESET}\n"
|
||||||
|
|
||||||
|
# Create systemd user service
|
||||||
|
printf "${NOTE} Creating ${YELLOW}systemd user service${RESET} for disk monitoring...\n"
|
||||||
|
|
||||||
|
SYSTEMD_DIR="$HOME/.config/systemd/user"
|
||||||
|
mkdir -p "$SYSTEMD_DIR"
|
||||||
|
|
||||||
|
cat > "$SYSTEMD_DIR/disk-monitor.service" << EOF
|
||||||
|
[Unit]
|
||||||
|
Description=Disk Space Monitor
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=$DISK_SCRIPT
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
printf "${OK} Systemd service created\n"
|
||||||
|
|
||||||
|
# Enable and start the service
|
||||||
|
printf "${NOTE} Enabling and starting ${YELLOW}disk-monitor${RESET} service...\n"
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
systemctl --user enable disk-monitor.service 2>&1 | tee -a "$LOG"
|
||||||
|
systemctl --user start disk-monitor.service 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
printf "${OK} Disk monitor service is now running!\n"
|
||||||
|
printf "${INFO} You can check status with: ${YELLOW}systemctl --user status disk-monitor${RESET}\n"
|
||||||
|
printf "${INFO} View disk usage: ${YELLOW}df -h${RESET}\n"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
26
install-scripts/dotfiles-main.sh
Normal file → Executable file
26
install-scripts/dotfiles-main.sh
Normal file → Executable file
@@ -2,28 +2,36 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Hyprland-Dots to download from main #
|
# Hyprland-Dots to download from main #
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if Hyprland-Dots exists
|
# Check if Hyprland-Dots exists
|
||||||
printf "${NOTE} Downloading KooL's Hyprland Dots....\n"
|
printf "${NOTE} Cloning and Installing ${SKY_BLUE}KooL's Hyprland Dots${RESET}....\n"
|
||||||
|
|
||||||
if [ -d Hyprland-Dots ]; then
|
if [ -d Hyprland-Dots ]; then
|
||||||
cd Hyprland-Dots
|
cd Hyprland-Dots
|
||||||
git stash
|
git stash && git pull
|
||||||
git pull
|
|
||||||
git stash apply
|
|
||||||
chmod +x copy.sh
|
chmod +x copy.sh
|
||||||
./copy.sh
|
./copy.sh
|
||||||
else
|
else
|
||||||
if git clone --depth 1 https://github.com/JaKooLit/Hyprland-Dots; then
|
if git clone --depth=1 https://github.com/JaKooLit/Hyprland-Dots; then
|
||||||
cd Hyprland-Dots || exit 1
|
cd Hyprland-Dots || exit 1
|
||||||
chmod +x copy.sh
|
chmod +x copy.sh
|
||||||
./copy.sh
|
./copy.sh
|
||||||
else
|
else
|
||||||
echo -e "$ERROR Can't download Hyprland-Dots"
|
echo -e "$ERROR Can't download ${YELLOW}KooL's Hyprland-Dots${RESET} . Check your internet connection"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
|
||||||
# Hyprland-Dots to download from Releases #
|
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
printf "${NOTE} Downloading / Checking for existing Hyprland-Dots.tar.gz...\n"
|
|
||||||
|
|
||||||
# Check if Hyprland-Dots.tar.gz exists
|
|
||||||
if [ -f Hyprland-Dots.tar.gz ]; then
|
|
||||||
printf "${NOTE} Hyprland-Dots.tar.gz found.\n"
|
|
||||||
|
|
||||||
# Get the version from the existing tarball filename
|
|
||||||
existing_version=$(echo Hyprland-Dots.tar.gz | grep -oP 'v\d+\.\d+\.\d+' | sed 's/v//')
|
|
||||||
|
|
||||||
# Fetch the tag_name for the latest release using the GitHub API
|
|
||||||
latest_version=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4 | sed 's/v//')
|
|
||||||
|
|
||||||
# Check if versions match
|
|
||||||
if [ "$existing_version" = "$latest_version" ]; then
|
|
||||||
echo -e "${OK} Hyprland-Dots.tar.gz is up-to-date with the latest release ($latest_version)."
|
|
||||||
|
|
||||||
# Sleep for 10 seconds before exiting
|
|
||||||
printf "${NOTE} No update found. Sleeping for 10 seconds...\n"
|
|
||||||
sleep 10
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo -e "${WARN} Hyprland-Dots.tar.gz is outdated (Existing version: $existing_version, Latest version: $latest_version)."
|
|
||||||
if [[ -z $upgrade_choice ]]; then
|
|
||||||
read -p "Do you want to upgrade to the latest version? (y/n): " upgrade_choice
|
|
||||||
fi
|
|
||||||
if [ "$upgrade_choice" = "y" ]; then
|
|
||||||
echo -e "${NOTE} Proceeding to download the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
|
||||||
|
|
||||||
# Delete existing directories starting with JaKooLit-Hyprland-Dots
|
|
||||||
find . -type d -name 'JaKooLit-Hyprland-Dots*' -exec rm -rf {} +
|
|
||||||
rm -f Hyprland-Dots.tar.gz
|
|
||||||
printf "${WARN} Removed existing Hyprland-Dots.tar.gz.\n"
|
|
||||||
else
|
|
||||||
echo -e "${NOTE} User chose not to upgrade. Exiting..." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "${NOTE} Downloading the latest Hyprland source code release...\n"
|
|
||||||
|
|
||||||
# Fetch the tag name for the latest release using the GitHub API
|
|
||||||
latest_tag=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tag_name" | cut -d '"' -f 4)
|
|
||||||
|
|
||||||
# Check if the tag is obtained successfully
|
|
||||||
if [ -z "$latest_tag" ]; then
|
|
||||||
echo -e "${ERROR} Unable to fetch the latest tag information." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fetch the tarball URL for the latest release using the GitHub API
|
|
||||||
latest_tarball_url=$(curl -s https://api.github.com/repos/JaKooLit/Hyprland-Dots/releases/latest | grep "tarball_url" | cut -d '"' -f 4)
|
|
||||||
|
|
||||||
# Check if the URL is obtained successfully
|
|
||||||
if [ -z "$latest_tarball_url" ]; then
|
|
||||||
echo -e "${ERROR} Unable to fetch the tarball URL for the latest release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the filename from the URL and include the tag name in the file name
|
|
||||||
file_name="Hyprland-Dots-${latest_tag}.tar.gz"
|
|
||||||
|
|
||||||
# Download the latest release source code tarball to the current directory
|
|
||||||
if curl -L "$latest_tarball_url" -o "$file_name"; then
|
|
||||||
# Extract the contents of the tarball
|
|
||||||
tar -xzf "$file_name" || exit 1
|
|
||||||
|
|
||||||
# delete existing Hyprland-Dots
|
|
||||||
rm -rf JaKooLit-Hyprland-Dots
|
|
||||||
|
|
||||||
# Identify the extracted directory
|
|
||||||
extracted_directory=$(tar -tf "$file_name" | grep -o '^[^/]\+' | uniq)
|
|
||||||
|
|
||||||
# Rename the extracted directory to JaKooLit-Hyprland-Dots
|
|
||||||
mv "$extracted_directory" JaKooLit-Hyprland-Dots || exit 1
|
|
||||||
|
|
||||||
cd "JaKooLit-Hyprland-Dots" || exit 1
|
|
||||||
|
|
||||||
# Set execute permission for copy.sh and execute it
|
|
||||||
chmod +x copy.sh
|
|
||||||
./copy.sh
|
|
||||||
|
|
||||||
echo -e "${OK} Latest Dotfiles release downloaded, extracted, and processed successfully. Check JaKooLit-Hyprland-Dots folder for more detailed install logs" 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
|
||||||
else
|
|
||||||
echo -e "${ERROR} Failed to download the latest Dotfiles release." 2>&1 | tee -a "../Install-Logs/install-$(date +'%d-%H%M%S')_dotfiles.log"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
clear
|
|
||||||
@@ -12,35 +12,37 @@ fonts=(
|
|||||||
otf-font-awesome
|
otf-font-awesome
|
||||||
ttf-droid
|
ttf-droid
|
||||||
ttf-fira-code
|
ttf-fira-code
|
||||||
|
ttf-fantasque-nerd
|
||||||
ttf-jetbrains-mono
|
ttf-jetbrains-mono
|
||||||
ttf-jetbrains-mono-nerd
|
ttf-jetbrains-mono-nerd
|
||||||
|
ttf-victor-mono
|
||||||
|
noto-fonts
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_fonts.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_fonts.log"
|
||||||
|
|
||||||
|
|
||||||
# Installation of main components
|
# Installation of main components
|
||||||
printf "\n%s - Installing necessary fonts.... \n" "${NOTE}"
|
printf "\n%s - Installing necessary ${SKY_BLUE}fonts${RESET}.... \n" "${NOTE}"
|
||||||
|
|
||||||
for PKG1 in "${fonts[@]}"; do
|
for PKG1 in "${fonts[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
@@ -8,15 +8,18 @@ engine=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log"
|
||||||
@@ -24,28 +27,24 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_themes.log"
|
|||||||
|
|
||||||
# installing engine needed for gtk themes
|
# installing engine needed for gtk themes
|
||||||
for PKG1 in "${engine[@]}"; do
|
for PKG1 in "${engine[@]}"; do
|
||||||
install_package "$PKG1" 2>&1 | tee -a "$LOG"
|
install_package "$PKG1" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\033[1A\033[K${ERROR} - $PKG1 Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check if the directory exists and delete it if present
|
# Check if the directory exists and delete it if present
|
||||||
if [ -d "GTK-themes-icons" ]; then
|
if [ -d "GTK-themes-icons" ]; then
|
||||||
echo "$NOTE GTK themes and Icons folder exist..deleting..." 2>&1 | tee -a "$LOG"
|
echo "$NOTE GTK themes and Icons directory exist..deleting..." 2>&1 | tee -a "$LOG"
|
||||||
rm -rf "GTK-themes-icons" 2>&1 | tee -a "$LOG"
|
rm -rf "GTK-themes-icons" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$NOTE Cloning GTK themes and Icons repository..." 2>&1 | tee -a "$LOG"
|
echo "$NOTE Cloning ${SKY_BLUE}GTK themes and Icons${RESET} repository..." 2>&1 | tee -a "$LOG"
|
||||||
if git clone --depth 1 https://github.com/JaKooLit/GTK-themes-icons.git ; then
|
if git clone --depth=1 https://github.com/JaKooLit/GTK-themes-icons.git ; then
|
||||||
cd GTK-themes-icons
|
cd GTK-themes-icons
|
||||||
chmod +x auto-extract.sh
|
chmod +x auto-extract.sh
|
||||||
./auto-extract.sh
|
./auto-extract.sh
|
||||||
cd ..
|
cd ..
|
||||||
echo "$OK Extracted GTK Themes & Icons to ~/.icons & ~/.themes folders" 2>&1 | tee -a "$LOG"
|
echo "$OK Extracted GTK Themes & Icons to ~/.icons & ~/.themes directories" 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG"
|
echo "$ERROR Download failed for GTK themes and Icons.." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -2,45 +2,50 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Main Hyprland Package #
|
# Main Hyprland Package #
|
||||||
|
|
||||||
hypr=(
|
hypr_eco=(
|
||||||
hyprland
|
|
||||||
hypridle
|
hypridle
|
||||||
hyprlock
|
hyprlock
|
||||||
pyprland
|
)
|
||||||
libspng
|
|
||||||
|
hypr=(
|
||||||
|
hyprland
|
||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprland.log"
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
# Check if Hyprland is installed
|
||||||
|
if command -v Hyprland >/dev/null 2>&1; then
|
||||||
# Removing other Hyprland to avoid conflict
|
printf "$NOTE - ${YELLOW} Hyprland is already installed.${RESET} No action required.\n"
|
||||||
printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n"
|
else
|
||||||
if pacman -Qs hyprland >/dev/null; then
|
printf "$INFO - Hyprland not found. ${SKY_BLUE} Installing Hyprland...${RESET}\n"
|
||||||
printf "${YELLOW} Hyprland detected. uninstalling to install Hyprland-git...${RESET}\n"
|
for HYPRLAND in "${hypr[@]}"; do
|
||||||
for hyprnvi in hyprland-git hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do
|
install_package "$HYPRLAND" "$LOG"
|
||||||
sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Hyprland
|
# Hyprland -eco packages
|
||||||
printf "${NOTE} Installing Hyprland .......\n"
|
printf "${NOTE} - Installing ${SKY_BLUE}other Hyprland-eco packages${RESET} .......\n"
|
||||||
for HYPR in "${hypr[@]}"; do
|
for HYPR in "${hypr_eco[@]}"; do
|
||||||
install_package "$HYPR" 2>&1 | tee -a "$LOG"
|
if ! command -v "$HYPR" >/dev/null 2>&1; then
|
||||||
[ $? -ne 0 ] && {
|
printf "$INFO - ${YELLOW}$HYPR${RESET} not found. Installing ${YELLOW}$HYPR...${RESET}\n"
|
||||||
echo -e "\e[1A\e[K${ERROR} - $HYPR Package installation failed, Please check the installation logs"
|
install_package "$HYPR" "$LOG"
|
||||||
exit 1
|
else
|
||||||
}
|
printf "$NOTE - ${YELLOW} $HYPR is already installed.${RESET} No action required.\n"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Nvidia Stuffs #
|
# Nvidia Stuffs #
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
nvidia_pkg=(
|
nvidia_pkg=(
|
||||||
nvidia-dkms
|
nvidia-dkms
|
||||||
@@ -15,14 +12,19 @@ nvidia_pkg=(
|
|||||||
|
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
||||||
@@ -31,17 +33,17 @@ LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
|||||||
# nvidia stuff
|
# nvidia stuff
|
||||||
printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n"
|
printf "${YELLOW} Checking for other hyprland packages and remove if any..${RESET}\n"
|
||||||
if pacman -Qs hyprland > /dev/null; then
|
if pacman -Qs hyprland > /dev/null; then
|
||||||
printf "${YELLOW} Hyprland detected. uninstalling to install Hyprland from official repo...${RESET}\n"
|
printf "${YELLOW} Hyprland detected. removing to install Hyprland from official repo...${RESET}\n"
|
||||||
for hyprnvi in hyprland-git hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do
|
for hyprnvi in hyprland-git hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git; do
|
||||||
sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true
|
sudo pacman -R --noconfirm "$hyprnvi" 2>/dev/null | tee -a "$LOG" || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install additional Nvidia packages
|
# Install additional Nvidia packages
|
||||||
printf "${YELLOW} Installing Nvidia Packages and Linux headers...\n"
|
printf "${YELLOW} Installing ${SKY_BLUE}Nvidia Packages and Linux headers${RESET}...\n"
|
||||||
for krnl in $(cat /usr/lib/modules/*/pkgbase); do
|
for krnl in $(cat /usr/lib/modules/*/pkgbase); do
|
||||||
for NVIDIA in "${krnl}-headers" "${nvidia_pkg[@]}"; do
|
for NVIDIA in "${krnl}-headers" "${nvidia_pkg[@]}"; do
|
||||||
install_package "$NVIDIA" 2>&1 | tee -a "$LOG"
|
install_package "$NVIDIA" "$LOG"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -50,17 +52,19 @@ if grep -qE '^MODULES=.*nvidia. *nvidia_modeset.*nvidia_uvm.*nvidia_drm' /etc/mk
|
|||||||
echo "Nvidia modules already included in /etc/mkinitcpio.conf" 2>&1 | tee -a "$LOG"
|
echo "Nvidia modules already included in /etc/mkinitcpio.conf" 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf 2>&1 | tee -a "$LOG"
|
sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf 2>&1 | tee -a "$LOG"
|
||||||
echo "Nvidia modules added in /etc/mkinitcpio.conf"
|
echo "${OK} Nvidia modules added in /etc/mkinitcpio.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${INFO} Rebuilding ${YELLOW}Initramfs${RESET}...\n" 2>&1 | tee -a "$LOG"
|
||||||
sudo mkinitcpio -P 2>&1 | tee -a "$LOG"
|
sudo mkinitcpio -P 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
printf "\n%.0s" {1..3}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Additional Nvidia steps
|
# Additional Nvidia steps
|
||||||
NVEA="/etc/modprobe.d/nvidia.conf"
|
NVEA="/etc/modprobe.d/nvidia.conf"
|
||||||
if [ -f "$NVEA" ]; then
|
if [ -f "$NVEA" ]; then
|
||||||
printf "${OK} Seems like nvidia-drm modeset=1 is already added in your system..moving on."
|
printf "${INFO} Seems like ${YELLOW}nvidia_drm modeset=1 fbdev=1${RESET} is already added in your system..moving on."
|
||||||
printf "\n"
|
printf "\n"
|
||||||
else
|
else
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@@ -71,32 +75,32 @@ fi
|
|||||||
|
|
||||||
# Additional for GRUB users
|
# Additional for GRUB users
|
||||||
if [ -f /etc/default/grub ]; then
|
if [ -f /etc/default/grub ]; then
|
||||||
printf "GRUB bootloader detected\n" 2>&1 | tee -a "$LOG"
|
printf "${INFO} ${YELLOW}GRUB${RESET} bootloader detected\n" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
# Check if nvidia-drm.modeset=1 is present
|
# Check if nvidia-drm.modeset=1 is present
|
||||||
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
|
if ! sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub; then
|
||||||
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub
|
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia-drm.modeset=1"/' /etc/default/grub
|
||||||
printf "nvidia-drm.modeset=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} nvidia-drm.modeset=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if nvidia_drm.fbdev=1 is present
|
# Check if nvidia_drm.fbdev=1 is present
|
||||||
if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
if ! sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
||||||
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia_drm.fbdev=1"/' /etc/default/grub
|
sudo sed -i -e 's/\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"/\1 nvidia_drm.fbdev=1"/' /etc/default/grub
|
||||||
printf "nvidia_drm.fbdev=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} nvidia_drm.fbdev=1 added to /etc/default/grub\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Regenerate GRUB configuration
|
# Regenerate GRUB configuration
|
||||||
if sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub || sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
if sudo grep -q "nvidia-drm.modeset=1" /etc/default/grub || sudo grep -q "nvidia_drm.fbdev=1" /etc/default/grub; then
|
||||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
printf "GRUB configuration regenerated\n" 2>&1 | tee -a "$LOG"
|
printf "${INFO} ${YELLOW}GRUB${RESET} configuration regenerated\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Additional steps for GRUB completed\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} Additional steps for ${YELLOW}GRUB${RESET} completed\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Additional for systemd-boot users
|
# Additional for systemd-boot users
|
||||||
if [ -f /boot/loader/loader.conf ]; then
|
if [ -f /boot/loader/loader.conf ]; then
|
||||||
printf "systemd-boot bootloader detected\n" 2>&1 | tee -a "$LOG"
|
printf "${INFO} ${YELLOW}systemd-boot${RESET} bootloader detected\n" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
backup_count=$(find /boot/loader/entries/ -type f -name "*.conf.bak" | wc -l)
|
backup_count=$(find /boot/loader/entries/ -type f -name "*.conf.bak" | wc -l)
|
||||||
conf_count=$(find /boot/loader/entries/ -type f -name "*.conf" | wc -l)
|
conf_count=$(find /boot/loader/entries/ -type f -name "*.conf" | wc -l)
|
||||||
@@ -105,43 +109,17 @@ if [ -f /boot/loader/loader.conf ]; then
|
|||||||
find /boot/loader/entries/ -type f -name "*.conf" | while read imgconf; do
|
find /boot/loader/entries/ -type f -name "*.conf" | while read imgconf; do
|
||||||
# Backup conf
|
# Backup conf
|
||||||
sudo cp "$imgconf" "$imgconf.bak"
|
sudo cp "$imgconf" "$imgconf.bak"
|
||||||
printf "Backup created for systemd-boot loader: %s\n" "$imgconf" 2>&1 | tee -a "$LOG"
|
printf "${INFO} Backup created for systemd-boot loader: %s\n" "$imgconf" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
# Clean up options and update with NVIDIA settings
|
# Clean up options and update with NVIDIA settings
|
||||||
sdopt=$(grep -w "^options" "$imgconf" | sed 's/\b nvidia-drm.modeset=[^ ]*\b//g' | sed 's/\b nvidia_drm.fbdev=[^ ]*\b//g')
|
sdopt=$(grep -w "^options" "$imgconf" | sed 's/\b nvidia-drm.modeset=[^ ]*\b//g' | sed 's/\b nvidia_drm.fbdev=[^ ]*\b//g')
|
||||||
sudo sed -i "/^options/c${sdopt} nvidia-drm.modeset=1 nvidia_drm.fbdev=1" "$imgconf" 2>&1 | tee -a "$LOG"
|
sudo sed -i "/^options/c${sdopt} nvidia-drm.modeset=1 nvidia_drm.fbdev=1" "$imgconf" 2>&1 | tee -a "$LOG"
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "Additional steps for systemd-boot completed\n" 2>&1 | tee -a "$LOG"
|
printf "${OK} Additional steps for ${YELLOW}systemd-boot${RESET} completed\n" 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
printf "systemd-boot is already configured...\n" 2>&1 | tee -a "$LOG"
|
printf "${NOTE} ${YELLOW}systemd-boot${RESET} is already configured...\n" 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
# Blacklist nouveau
|
|
||||||
if [[ -z $blacklist_nouveau ]]; then
|
|
||||||
read -n1 -rep "${CAT} Would you like to blacklist nouveau? (y/n)" blacklist_nouveau
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
|
|
||||||
NOUVEAU="/etc/modprobe.d/nouveau.conf"
|
|
||||||
if [ -f "$NOUVEAU" ]; then
|
|
||||||
printf "${OK} Seems like nouveau is already blacklisted..moving on.\n"
|
|
||||||
else
|
|
||||||
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
|
|
||||||
printf "${NOTE} has been added to $NOUVEAU.\n"
|
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
# To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
|
|
||||||
if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
|
|
||||||
echo "install nouveau /bin/true" | sudo tee -a "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
|
||||||
else
|
|
||||||
echo "install nouveau /bin/true" | sudo tee "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
printf "${NOTE} Skipping nouveau blacklisting..." 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
clear
|
|
||||||
39
install-scripts/nvidia_nouveau.sh
Executable file
39
install-scripts/nvidia_nouveau.sh
Executable file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# Nvidia Blacklist #
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_nvidia.log"
|
||||||
|
|
||||||
|
printf "${INFO} ${SKY_BLUE}blacklist nouveau${RESET}...\n"
|
||||||
|
# Blacklist nouveau
|
||||||
|
NOUVEAU="/etc/modprobe.d/nouveau.conf"
|
||||||
|
if [ -f "$NOUVEAU" ]; then
|
||||||
|
printf "${OK} Seems like ${YELLOW}nouveau${RESET} is already blacklisted..moving on.\n"
|
||||||
|
else
|
||||||
|
echo "blacklist nouveau" | sudo tee -a "$NOUVEAU" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
# To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
|
||||||
|
if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
|
||||||
|
echo "install nouveau /bin/true" | sudo tee -a "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo "install nouveau /bin/true" | sudo tee "/etc/modprobe.d/blacklist.conf" 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
@@ -3,12 +3,23 @@
|
|||||||
# pacman adding up extra-spices #
|
# pacman adding up extra-spices #
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pacman.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pacman.log"
|
||||||
|
|
||||||
echo -e "${NOTE} Adding Extra Spice in pacman.conf ... ${RESET}" 2>&1 | tee -a "$LOG"
|
echo -e "${NOTE} Adding ${MAGENTA}Extra Spice${RESET} in pacman.conf ... ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
pacman_conf="/etc/pacman.conf"
|
pacman_conf="/etc/pacman.conf"
|
||||||
|
|
||||||
# Remove comments '#' from specific lines
|
# Remove comments '#' from specific lines
|
||||||
@@ -32,14 +43,16 @@ done
|
|||||||
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
||||||
if grep -q "^ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
if grep -q "^ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
||||||
sudo sed -i "/^ParallelDownloads/a ILoveCandy" "$pacman_conf"
|
sudo sed -i "/^ParallelDownloads/a ILoveCandy" "$pacman_conf"
|
||||||
echo -e "${CAT} Added ILoveCandy below ParallelDownloads. ${RESET}" 2>&1 | tee -a "$LOG"
|
echo -e "${CAT} Added ${MAGENTA}ILoveCandy${RESET} after ${MAGENTA}ParallelDownloads${RESET}. ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
echo -e "${CAT} ILoveCandy already exists ${RESET}" 2>&1 | tee -a "$LOG"
|
echo -e "${CAT} It seems ${YELLOW}ILoveCandy${RESET} already exists ${RESET} moving on.." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${CAT} Pacman.conf spicing up completed ${RESET}" 2>&1 | tee -a "$LOG"
|
echo -e "${CAT} ${MAGENTA}Pacman.conf${RESET} spicing up completed ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
|
||||||
# updating pacman.conf
|
# updating pacman.conf
|
||||||
|
printf "\n%s - ${SKY_BLUE}Synchronizing Pacman Repo${RESET}\n" "${INFO}"
|
||||||
sudo pacman -Sy
|
sudo pacman -Sy
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|||||||
@@ -3,46 +3,50 @@
|
|||||||
# Paru AUR Helper #
|
# Paru AUR Helper #
|
||||||
# NOTE: If yay is already installed, paru will not be installed #
|
# NOTE: If yay is already installed, paru will not be installed #
|
||||||
|
|
||||||
|
pkg="paru-bin"
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="install-$(date +%d-%H%M%S)_paru.log"
|
LOG="install-$(date +%d-%H%M%S)_yay.log"
|
||||||
|
|
||||||
# Set some colors for output messages
|
# Set some colors for output messages
|
||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 5)[WARN]$(tput sgr0)"
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
ORANGE=$(tput setaf 166)
|
MAGENTA="$(tput setaf 5)"
|
||||||
YELLOW=$(tput setaf 3)
|
ORANGE="$(tput setaf 214)"
|
||||||
RESET=$(tput sgr0)
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
# Create Directory for Install Logs
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
mkdir Install-Logs
|
mkdir Install-Logs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# checking if paru exist and removing if it is
|
|
||||||
if [ -d paru-bin ]; then
|
|
||||||
rm -rf paru-bin 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for AUR helper and install if not found
|
# Check for AUR helper and install if not found
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
|
|
||||||
if [ -n "$ISAUR" ]; then
|
if [ -n "$ISAUR" ]; then
|
||||||
printf "\n%s - AUR helper already installed, moving on..\n" "${OK}"
|
printf "\n%s - ${SKY_BLUE}AUR helper${RESET} already installed, moving on.\n" "${OK}"
|
||||||
else
|
else
|
||||||
printf "\n%s - AUR helper was NOT located\n" "$WARN"
|
printf "\n%s - Installing ${SKY_BLUE}$pkg${RESET} from AUR\n" "${NOTE}"
|
||||||
printf "\n%s - Installing paru-bin from AUR\n" "${NOTE}"
|
|
||||||
git clone https://aur.archlinux.org/paru-bin.git || { printf "%s - Failed to clone paru-bin from AUR\n" "${ERROR}"; exit 1; }
|
# Check if directory exists and remove it
|
||||||
cd paru-bin || { printf "%s - Failed to enter paru directory\n" "${ERROR}"; exit 1; }
|
if [ -d "$pkg" ]; then
|
||||||
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install paru-bin from AUR\n" "${ERROR}"; exit 1; }
|
rm -rf "$pkg"
|
||||||
|
fi
|
||||||
# moving install logs in to Install-Logs folder
|
git clone https://aur.archlinux.org/$pkg.git || { printf "%s - Failed to clone ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||||
mv install*.log ../Install-Logs/ || true
|
cd $pkg || { printf "%s - Failed to enter $pkg directory\n" "${ERROR}"; exit 1; }
|
||||||
|
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||||
|
|
||||||
|
# moving install logs in to Install-Logs directory
|
||||||
|
mv install*.log ../Install-Logs/ || true
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -52,4 +56,4 @@ ISAUR=$(command -v yay || command -v paru)
|
|||||||
|
|
||||||
$ISAUR -Syu --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to update system\n" "${ERROR}"; exit 1; }
|
$ISAUR -Syu --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to update system\n" "${ERROR}"; exit 1; }
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -11,35 +11,44 @@ pipewire=(
|
|||||||
sof-firmware
|
sof-firmware
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# added this as some reports script didnt install this.
|
||||||
|
# basically force reinstall
|
||||||
|
pipewire_2=(
|
||||||
|
pipewire-pulse
|
||||||
|
)
|
||||||
|
|
||||||
############## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##############
|
############## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##############
|
||||||
# Set some colors for output messages
|
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pipewire.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pipewire.log"
|
||||||
|
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
# Disabling pulseaudio to avoid conflicts and logging output
|
||||||
|
echo -e "${NOTE} Disabling pulseaudio to avoid conflicts..."
|
||||||
# Disabling pulseaudio to avoid conflicts
|
systemctl --user disable --now pulseaudio.socket pulseaudio.service >> "$LOG" 2>&1 || true
|
||||||
systemctl --user disable --now pulseaudio.socket pulseaudio.service 2>/dev/null && tee -a "$LOG"
|
|
||||||
|
|
||||||
# Pipewire
|
# Pipewire
|
||||||
printf "${NOTE} Installing Pipewire Packages...\n"
|
echo -e "${NOTE} Installing ${SKY_BLUE}Pipewire${RESET} Packages..."
|
||||||
for PIPEWIRE in "${pipewire[@]}"; do
|
for PIPEWIRE in "${pipewire[@]}"; do
|
||||||
install_package "$PIPEWIRE" 2>&1 | tee -a "$LOG"
|
install_package "$PIPEWIRE" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $PIPEWIRE Package installation failed, Please check the installation logs"; exit 1; }
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "Activating Pipewire Services...\n"
|
for PIPEWIRE2 in "${pipewire_2[@]}"; do
|
||||||
|
install_package_pacman "$PIPEWIRE" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "${NOTE} Activating Pipewire Services..."
|
||||||
|
# Redirect systemctl output to log file
|
||||||
systemctl --user enable --now pipewire.socket pipewire-pulse.socket wireplumber.service 2>&1 | tee -a "$LOG"
|
systemctl --user enable --now pipewire.socket pipewire-pulse.socket wireplumber.service 2>&1 | tee -a "$LOG"
|
||||||
systemctl --user enable --now pipewire.service 2>&1 | tee -a "$LOG"
|
systemctl --user enable --now pipewire.service 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
echo -e "\n${OK} Pipewire Installation and services setup complete!" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|||||||
41
install-scripts/quickshell.sh
Executable file
41
install-scripts/quickshell.sh
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# quickshell - for desktop overview replacing AGS
|
||||||
|
|
||||||
|
if [[ $USE_PRESET = [Yy] ]]; then
|
||||||
|
source ./preset.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
quick=(
|
||||||
|
qt6-5compat
|
||||||
|
quickshell
|
||||||
|
)
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || {
|
||||||
|
echo "${ERROR} Failed to change directory to $PARENT_DIR"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_quick.log"
|
||||||
|
|
||||||
|
# Installation of main components
|
||||||
|
printf "\n%s - Installing ${SKY_BLUE}Quick Shell ${RESET} for Desktop Overview \n" "${NOTE}"
|
||||||
|
|
||||||
|
for PKG1 in "${quick[@]}"; do
|
||||||
|
install_package "$PKG1" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
@@ -2,28 +2,36 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Asus ROG Laptops #
|
# Asus ROG Laptops #
|
||||||
|
|
||||||
|
rog=(
|
||||||
|
power-profiles-daemon
|
||||||
|
asusctl
|
||||||
|
supergfxctl
|
||||||
|
rog-control-center
|
||||||
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_rog.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_rog.log"
|
||||||
|
|
||||||
### Install software for Asus ROG laptops ###
|
### Install software for Asus ROG laptops ###
|
||||||
|
|
||||||
printf " Installing ASUS ROG packages...\n"
|
printf " Installing ${SKY_BLUE}ASUS ROG packages${RESET}...\n"
|
||||||
for ASUS in power-profiles-daemon asusctl supergfxctl rog-control-center; do
|
for ASUS in "${rog[@]}"; do
|
||||||
install_package "$ASUS" 2>&1 | tee -a "$LOG"
|
install_package "$ASUS" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $ASUS Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating ROG services...\n"
|
printf " Activating ROG services...\n"
|
||||||
@@ -32,5 +40,4 @@ sudo systemctl enable supergfxd 2>&1 | tee -a "$LOG"
|
|||||||
printf " enabling power-profiles-daemon...\n"
|
printf " enabling power-profiles-daemon...\n"
|
||||||
sudo systemctl enable power-profiles-daemon 2>&1 | tee -a "$LOG"
|
sudo systemctl enable power-profiles-daemon 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
@@ -1,104 +1,77 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# SDDM Log-in Manager #
|
# SDDM Log-in Manager #
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
sddm=(
|
sddm=(
|
||||||
qt6-5compat
|
qt6-declarative
|
||||||
qt6-declarative
|
|
||||||
qt6-svg
|
qt6-svg
|
||||||
|
qt6-virtualkeyboard
|
||||||
|
qt6-multimedia-ffmpeg
|
||||||
|
qt5-quickcontrols2
|
||||||
sddm
|
sddm
|
||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
# login managers to attempt to disable
|
||||||
|
login=(
|
||||||
|
lightdm
|
||||||
|
gdm3
|
||||||
|
gdm
|
||||||
|
lxdm
|
||||||
|
lxdm-gtk3
|
||||||
|
)
|
||||||
|
|
||||||
# Determine the directory where the script is located
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || {
|
||||||
|
echo "${ERROR} Failed to change directory to $PARENT_DIR"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm.log"
|
||||||
|
|
||||||
|
|
||||||
# Install SDDM and SDDM theme
|
# Install SDDM and SDDM theme
|
||||||
printf "${NOTE} Installing sddm and dependencies........\n"
|
printf "${NOTE} Installing sddm and dependencies........\n"
|
||||||
for package in "${sddm[@]}"; do
|
for package in "${sddm[@]}"; do
|
||||||
install_package "$package" 2>&1 | tee -a "$LOG"
|
install_package "$package" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $package Package installation failed, Please check the installation logs"; exit 1; }
|
done
|
||||||
done
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Check if other login managers installed and disabling its service before enabling sddm
|
# Check if other login managers installed and disabling its service before enabling sddm
|
||||||
for login_manager in lightdm gdm lxdm lxdm-gtk3; do
|
for login_manager in "${login[@]}"; do
|
||||||
if pacman -Qs "$login_manager" > /dev/null; then
|
if pacman -Qs "$login_manager" >/dev/null 2>&1; then
|
||||||
echo "disabling $login_manager..."
|
sudo systemctl disable "$login_manager.service" >>"$LOG" 2>&1
|
||||||
sudo systemctl disable "$login_manager.service" 2>&1 | tee -a "$LOG"
|
echo "$login_manager disabled." >>"$LOG" 2>&1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
printf " Activating sddm service........\n"
|
# Double check with systemctl
|
||||||
|
for manager in "${login[@]}"; do
|
||||||
|
if systemctl is-active --quiet "$manager" >/dev/null 2>&1; then
|
||||||
|
echo "$manager is active, disabling it..." >>"$LOG" 2>&1
|
||||||
|
sudo systemctl disable "$manager" --now >>"$LOG" 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "${INFO} Activating sddm service........\n"
|
||||||
sudo systemctl enable sddm
|
sudo systemctl enable sddm
|
||||||
|
|
||||||
# Set up SDDM
|
|
||||||
echo -e "${NOTE} Setting up the login screen."
|
|
||||||
sddm_conf_dir=/etc/sddm.conf.d
|
|
||||||
[ ! -d "$sddm_conf_dir" ] && { printf "$CAT - $sddm_conf_dir not found, creating...\n"; sudo mkdir "$sddm_conf_dir" 2>&1 | tee -a "$LOG"; }
|
|
||||||
|
|
||||||
wayland_sessions_dir=/usr/share/wayland-sessions
|
wayland_sessions_dir=/usr/share/wayland-sessions
|
||||||
[ ! -d "$wayland_sessions_dir" ] && { printf "$CAT - $wayland_sessions_dir not found, creating...\n"; sudo mkdir "$wayland_sessions_dir" 2>&1 | tee -a "$LOG"; }
|
[ ! -d "$wayland_sessions_dir" ] && {
|
||||||
|
printf "$CAT - $wayland_sessions_dir not found, creating...\n"
|
||||||
|
sudo mkdir "$wayland_sessions_dir" 2>&1 | tee -a "$LOG"
|
||||||
|
}
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
# SDDM-themes
|
|
||||||
valid_input=false
|
|
||||||
while [ "$valid_input" != true ]; do
|
|
||||||
if [[ -z $install_sddm_theme ]]; then
|
|
||||||
read -n 1 -r -p "${CAT} OPTIONAL - Would you like to install SDDM themes? (y/n)" install_sddm_theme
|
|
||||||
fi
|
|
||||||
if [[ $install_sddm_theme =~ ^[Yy]$ ]]; then
|
|
||||||
printf "\n%s - Installing Simple SDDM Theme\n" "${NOTE}"
|
|
||||||
|
|
||||||
# Check if /usr/share/sddm/themes/simple-sddm-2 exists and remove if it does
|
|
||||||
if [ -d "/usr/share/sddm/themes/simple-sddm-2" ]; then
|
|
||||||
sudo rm -rf "/usr/share/sddm/themes/simple-sddm-2"
|
|
||||||
echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm-2' directory." 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if simple-sddm-2 directory exists in the current directory and remove if it does
|
|
||||||
if [ -d "simple-sddm-2" ]; then
|
|
||||||
rm -rf "simple-sddm-2"
|
|
||||||
echo -e "\e[1A\e[K${OK} - Removed existing 'simple-sddm-2' directory from the current location." 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if git clone --depth 1 https://github.com/JaKooLit/simple-sddm-2.git; then
|
|
||||||
while [ ! -d "simple-sddm-2" ]; do
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ! -d "/usr/share/sddm/themes" ]; then
|
|
||||||
sudo mkdir -p /usr/share/sddm/themes
|
|
||||||
echo -e "\e[1A\e[K${OK} - Directory '/usr/share/sddm/themes' created." 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo mv simple-sddm-2 /usr/share/sddm/themes/
|
|
||||||
echo -e "[Theme]\nCurrent=simple-sddm-2" | sudo tee "$sddm_conf_dir/theme.conf.user" &>> "$LOG"
|
|
||||||
else
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - Failed to clone the theme repository. Please check your internet connection" | tee -a "$LOG" >&2
|
|
||||||
fi
|
|
||||||
valid_input=true
|
|
||||||
elif [[ $install_sddm_theme =~ ^[Nn]$ ]]; then
|
|
||||||
printf "\n%s - No SDDM themes will be installed.\n" "${NOTE}" 2>&1 | tee -a "$LOG"
|
|
||||||
valid_input=true
|
|
||||||
else
|
|
||||||
printf "\n%s - Invalid input. Please enter 'y' for Yes or 'n' for No.\n" "${ERROR}" 2>&1 | tee -a "$LOG"
|
|
||||||
install_sddm_theme=""
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
clear
|
|
||||||
|
|||||||
114
install-scripts/sddm_theme.sh
Executable file
114
install-scripts/sddm_theme.sh
Executable file
@@ -0,0 +1,114 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# SDDM themes #
|
||||||
|
|
||||||
|
source_theme="https://github.com/JaKooLit/simple-sddm-2.git"
|
||||||
|
theme_name="simple_sddm_2"
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_sddm_theme.log"
|
||||||
|
|
||||||
|
# SDDM-themes
|
||||||
|
printf "${INFO} Installing ${SKY_BLUE}Additional SDDM Theme${RESET}\n"
|
||||||
|
|
||||||
|
# Check if /usr/share/sddm/themes/$theme_name exists and remove if it does
|
||||||
|
if [ -d "/usr/share/sddm/themes/$theme_name" ]; then
|
||||||
|
sudo rm -rf "/usr/share/sddm/themes/$theme_name"
|
||||||
|
echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory." 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if $theme_name directory exists in the current directory and remove if it does
|
||||||
|
if [ -d "$theme_name" ]; then
|
||||||
|
rm -rf "$theme_name"
|
||||||
|
echo -e "\e[1A\e[K${OK} - Removed existing $theme_name directory from the current location." 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clone the repository
|
||||||
|
if git clone --depth=1 "$source_theme" "$theme_name"; then
|
||||||
|
if [ ! -d "$theme_name" ]; then
|
||||||
|
echo "${ERROR} Failed to clone the repository." | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create themes directory if it doesn't exist
|
||||||
|
if [ ! -d "/usr/share/sddm/themes" ]; then
|
||||||
|
sudo mkdir -p /usr/share/sddm/themes
|
||||||
|
echo "${OK} - Directory '/usr/share/sddm/themes' created." | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Move cloned theme to the themes directory
|
||||||
|
sudo mv "$theme_name" "/usr/share/sddm/themes/$theme_name" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
# setting up SDDM theme
|
||||||
|
sddm_conf="/etc/sddm.conf"
|
||||||
|
BACKUP_SUFFIX=".bak"
|
||||||
|
|
||||||
|
echo -e "${NOTE} Setting up the login screen." | tee -a "$LOG"
|
||||||
|
|
||||||
|
# Backup the sddm.conf file if it exists
|
||||||
|
if [ -f "$sddm_conf" ]; then
|
||||||
|
echo "Backing up $sddm_conf" | tee -a "$LOG"
|
||||||
|
sudo cp "$sddm_conf" "$sddm_conf$BACKUP_SUFFIX" 2>&1 | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo "$sddm_conf does not exist, creating a new one." | tee -a "$LOG"
|
||||||
|
sudo touch "$sddm_conf" 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if the [Theme] section exists
|
||||||
|
if grep -q '^\[Theme\]' "$sddm_conf"; then
|
||||||
|
# Update the Current= line under [Theme]
|
||||||
|
sudo sed -i "/^\[Theme\]/,/^\[/{s/^\s*Current=.*/Current=$theme_name/}" "$sddm_conf" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
# If no Current= line was found and replaced, append it after the [Theme] section
|
||||||
|
if ! grep -q '^\s*Current=' "$sddm_conf"; then
|
||||||
|
sudo sed -i "/^\[Theme\]/a Current=$theme_name" "$sddm_conf" 2>&1 | tee -a "$LOG"
|
||||||
|
echo "Appended Current=$theme_name under [Theme] in $sddm_conf" | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo "Updated Current=$theme_name in $sddm_conf" | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Append the [Theme] section at the end if it doesn't exist
|
||||||
|
echo -e "\n[Theme]\nCurrent=$theme_name" | sudo tee -a "$sddm_conf" > /dev/null
|
||||||
|
echo "Added [Theme] section with Current=$theme_name in $sddm_conf" | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add [General] section with InputMethod=qtvirtualkeyboard if it doesn't exist
|
||||||
|
if ! grep -q '^\[General\]' "$sddm_conf"; then
|
||||||
|
echo -e "\n[General]\nInputMethod=qtvirtualkeyboard" | sudo tee -a "$sddm_conf" > /dev/null
|
||||||
|
echo "Added [General] section with InputMethod=qtvirtualkeyboard in $sddm_conf" | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
# Update InputMethod line if section exists
|
||||||
|
if grep -q '^\s*InputMethod=' "$sddm_conf"; then
|
||||||
|
sudo sed -i '/^\[General\]/,/^\[/{s/^\s*InputMethod=.*/InputMethod=qtvirtualkeyboard/}' "$sddm_conf" 2>&1 | tee -a "$LOG"
|
||||||
|
echo "Updated InputMethod to qtvirtualkeyboard in $sddm_conf" | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
sudo sed -i '/^\[General\]/a InputMethod=qtvirtualkeyboard' "$sddm_conf" 2>&1 | tee -a "$LOG"
|
||||||
|
echo "Appended InputMethod=qtvirtualkeyboard under [General] in $sddm_conf" | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace current background from assets
|
||||||
|
sudo cp -r assets/sddm.png "/usr/share/sddm/themes/$theme_name/Backgrounds/default" 2>&1 | tee -a "$LOG"
|
||||||
|
sudo sed -i 's|^wallpaper=".*"|wallpaper="Backgrounds/default"|' "/usr/share/sddm/themes/$theme_name/theme.conf" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
echo "${OK} - ${MAGENTA}Additional ${YELLOW}$theme_name SDDM Theme${RESET} successfully installed." | tee -a "$LOG"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "${ERROR} - Failed to clone the sddm theme repository. Please check your internet connection." | tee -a "$LOG" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
156
install-scripts/temp-monitor.sh
Normal file
156
install-scripts/temp-monitor.sh
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# Temperature Monitor - CPU/GPU Temperature Alerts #
|
||||||
|
|
||||||
|
temp=(
|
||||||
|
lm_sensors
|
||||||
|
libnotify
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_temp-monitor.log"
|
||||||
|
|
||||||
|
# Temperature Monitor
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}Temperature Monitor${RESET} Packages...\n"
|
||||||
|
for TEMP in "${temp[@]}"; do
|
||||||
|
install_package "$TEMP" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Detect sensors
|
||||||
|
printf "${NOTE} Detecting ${YELLOW}hardware sensors${RESET}...\n"
|
||||||
|
sudo sensors-detect --auto 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
# Create temperature monitoring script
|
||||||
|
printf "${NOTE} Creating ${YELLOW}temperature monitoring${RESET} script...\n"
|
||||||
|
|
||||||
|
TEMP_SCRIPT="$HOME/.config/hypr/scripts/temp-monitor.sh"
|
||||||
|
mkdir -p "$HOME/.config/hypr/scripts"
|
||||||
|
|
||||||
|
cat > "$TEMP_SCRIPT" << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
# Temperature Monitoring Script
|
||||||
|
# Monitors CPU and GPU temperatures and sends alerts
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
CPU_TEMP_WARNING=75
|
||||||
|
CPU_TEMP_CRITICAL=85
|
||||||
|
GPU_TEMP_WARNING=75
|
||||||
|
GPU_TEMP_CRITICAL=85
|
||||||
|
CHECK_INTERVAL=30 # Check every 30 seconds
|
||||||
|
|
||||||
|
# Track notification state
|
||||||
|
NOTIFIED_CPU_WARN=false
|
||||||
|
NOTIFIED_CPU_CRIT=false
|
||||||
|
NOTIFIED_GPU_WARN=false
|
||||||
|
NOTIFIED_GPU_CRIT=false
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
# Get CPU temperature (average of all cores)
|
||||||
|
CPU_TEMP=$(sensors | grep -i 'Package id 0:\|Tdie:' | awk '{print $4}' | sed 's/+//;s/°C//' | head -1)
|
||||||
|
|
||||||
|
# If Package id not found, try other methods
|
||||||
|
if [ -z "$CPU_TEMP" ]; then
|
||||||
|
CPU_TEMP=$(sensors | grep -i 'Core 0:' | awk '{print $3}' | sed 's/+//;s/°C//' | head -1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get GPU temperature (if available)
|
||||||
|
GPU_TEMP=$(sensors | grep -i 'edge:\|temp1:' | awk '{print $2}' | sed 's/+//;s/°C//' | head -1)
|
||||||
|
|
||||||
|
# Check CPU temperature
|
||||||
|
if [ -n "$CPU_TEMP" ]; then
|
||||||
|
CPU_TEMP_INT=${CPU_TEMP%.*}
|
||||||
|
|
||||||
|
if [ "$CPU_TEMP_INT" -ge "$CPU_TEMP_CRITICAL" ]; then
|
||||||
|
if [ "$NOTIFIED_CPU_CRIT" = false ]; then
|
||||||
|
notify-send -u critical -i temperature-high "Critical CPU Temperature" "CPU temperature is ${CPU_TEMP}°C! System may throttle or shutdown."
|
||||||
|
NOTIFIED_CPU_CRIT=true
|
||||||
|
NOTIFIED_CPU_WARN=true
|
||||||
|
fi
|
||||||
|
elif [ "$CPU_TEMP_INT" -ge "$CPU_TEMP_WARNING" ]; then
|
||||||
|
if [ "$NOTIFIED_CPU_WARN" = false ]; then
|
||||||
|
notify-send -u normal -i temperature-normal "High CPU Temperature" "CPU temperature is ${CPU_TEMP}°C"
|
||||||
|
NOTIFIED_CPU_WARN=true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
NOTIFIED_CPU_WARN=false
|
||||||
|
NOTIFIED_CPU_CRIT=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check GPU temperature
|
||||||
|
if [ -n "$GPU_TEMP" ]; then
|
||||||
|
GPU_TEMP_INT=${GPU_TEMP%.*}
|
||||||
|
|
||||||
|
if [ "$GPU_TEMP_INT" -ge "$GPU_TEMP_CRITICAL" ]; then
|
||||||
|
if [ "$NOTIFIED_GPU_CRIT" = false ]; then
|
||||||
|
notify-send -u critical -i temperature-high "Critical GPU Temperature" "GPU temperature is ${GPU_TEMP}°C!"
|
||||||
|
NOTIFIED_GPU_CRIT=true
|
||||||
|
NOTIFIED_GPU_WARN=true
|
||||||
|
fi
|
||||||
|
elif [ "$GPU_TEMP_INT" -ge "$GPU_TEMP_WARNING" ]; then
|
||||||
|
if [ "$NOTIFIED_GPU_WARN" = false ]; then
|
||||||
|
notify-send -u normal -i temperature-normal "High GPU Temperature" "GPU temperature is ${GPU_TEMP}°C"
|
||||||
|
NOTIFIED_GPU_WARN=true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
NOTIFIED_GPU_WARN=false
|
||||||
|
NOTIFIED_GPU_CRIT=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep "$CHECK_INTERVAL"
|
||||||
|
done
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "$TEMP_SCRIPT"
|
||||||
|
|
||||||
|
printf "${OK} Temperature monitoring script created at ${YELLOW}$TEMP_SCRIPT${RESET}\n"
|
||||||
|
|
||||||
|
# Create systemd user service
|
||||||
|
printf "${NOTE} Creating ${YELLOW}systemd user service${RESET} for temperature monitoring...\n"
|
||||||
|
|
||||||
|
SYSTEMD_DIR="$HOME/.config/systemd/user"
|
||||||
|
mkdir -p "$SYSTEMD_DIR"
|
||||||
|
|
||||||
|
cat > "$SYSTEMD_DIR/temp-monitor.service" << EOF
|
||||||
|
[Unit]
|
||||||
|
Description=Temperature Monitor
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=$TEMP_SCRIPT
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
printf "${OK} Systemd service created\n"
|
||||||
|
|
||||||
|
# Enable and start the service
|
||||||
|
printf "${NOTE} Enabling and starting ${YELLOW}temp-monitor${RESET} service...\n"
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
systemctl --user enable temp-monitor.service 2>&1 | tee -a "$LOG"
|
||||||
|
systemctl --user start temp-monitor.service 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
printf "${OK} Temperature monitor service is now running!\n"
|
||||||
|
printf "${INFO} You can check status with: ${YELLOW}systemctl --user status temp-monitor${RESET}\n"
|
||||||
|
printf "${INFO} View temperatures: ${YELLOW}sensors${RESET}\n"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
@@ -2,10 +2,6 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# Thunar #
|
# Thunar #
|
||||||
|
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
thunar=(
|
thunar=(
|
||||||
thunar
|
thunar
|
||||||
thunar-volman
|
thunar-volman
|
||||||
@@ -16,53 +12,39 @@ thunar=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar.log"
|
||||||
|
|
||||||
# Thunar
|
# Thunar
|
||||||
printf "${NOTE} Installing Thunar Packages...\n"
|
printf "${INFO} Installing ${SKY_BLUE}Thunar${RESET} Packages...\n"
|
||||||
for THUNAR in "${thunar[@]}"; do
|
for THUNAR in "${thunar[@]}"; do
|
||||||
install_package "$THUNAR" 2>&1 | tee -a "$LOG"
|
install_package "$THUNAR" "$LOG"
|
||||||
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $THUNAR Package installation failed, Please check the installation logs"; exit 1; }
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Ask the user if they want to use Thunar as the default file manager
|
|
||||||
read -p "${CAT} Do you want to set Thunar as the default file manager? (y/n): " thunar_default
|
|
||||||
|
|
||||||
if [[ "$thunar_default" == [Yy] ]]; then
|
|
||||||
# Setting Thunar as the default file manager
|
|
||||||
xdg-mime default thunar.desktop inode/directory
|
|
||||||
xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search
|
|
||||||
echo "${OK} Thunar has been set as the default file manager." 2>&1 | tee -a "$LOG"
|
|
||||||
else
|
|
||||||
echo "${NOTE} you choose not to set Thunar as default file manager." 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
# Check for existing configs and copy if does not exist
|
# Check for existing configs and copy if does not exist
|
||||||
for DIR1 in gtk-3.0 Thunar xfce4; do
|
for DIR1 in gtk-3.0 Thunar xfce4; do
|
||||||
DIRPATH=~/.config/$DIR1
|
DIRPATH=~/.config/$DIR1
|
||||||
if [ -d "$DIRPATH" ]; then
|
if [ -d "$DIRPATH" ]; then
|
||||||
echo -e "${NOTE} Config for $DIR1 found, no need to copy." 2>&1 | tee -a "$LOG"
|
echo -e "${NOTE} Config for ${MAGENTA}$DIR1${RESET} found, no need to copy." 2>&1 | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
echo -e "${NOTE} Config for $DIR1 not found, copying from assets." 2>&1 | tee -a "$LOG"
|
echo -e "${NOTE} Config for ${YELLOW}$DIR1${RESET} not found, copying from assets." 2>&1 | tee -a "$LOG"
|
||||||
cp -r assets/$DIR1 ~/.config/ && echo "Copy $DIR1 completed!" || echo "Error: Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG"
|
cp -r assets/$DIR1 ~/.config/ && echo "${OK} Copy $DIR1 completed!" || echo "${ERROR} Failed to copy $DIR1 config files." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
|
||||||
30
install-scripts/thunar_default.sh
Executable file
30
install-scripts/thunar_default.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# Thunar-default #
|
||||||
|
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_thunar-default.log"
|
||||||
|
|
||||||
|
printf "${INFO} Setting ${SKY_BLUE}Thunar${RESET} as default file manager...\n"
|
||||||
|
|
||||||
|
xdg-mime default thunar.desktop inode/directory
|
||||||
|
xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search
|
||||||
|
echo "${OK} ${MAGENTA}Thunar${RESET} is now set as the default file manager." | tee -a "$LOG"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# XDG-Desktop-Portals #
|
# XDG-Desktop-Portals hyprland #
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
xdg=(
|
xdg=(
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
@@ -12,63 +9,26 @@ xdg=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_xdph.log"
|
||||||
|
|
||||||
# XDG-DESKTOP-PORTAL-HYPRLAND
|
# XDG-DESKTOP-PORTAL-HYPRLAND
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland${RESET}\n"
|
||||||
for xdgs in "${xdg[@]}"; do
|
for xdgs in "${xdg[@]}"; do
|
||||||
install_package "$xdgs" 2>&1 | tee -a "$LOG"
|
install_package "$xdgs" "$LOG"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $xdph Package installation failed, Please check the installation logs"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "${NOTE} Checking for other XDG-Desktop-Portal-Implementations....\n"
|
printf "\n%.0s" {1..2}
|
||||||
sleep 1
|
|
||||||
printf "\n"
|
|
||||||
printf "${NOTE} XDG-desktop-portal-KDE & GNOME (if installed) should be manually disabled or removed! I can't remove it... sorry...\n"
|
|
||||||
while true; do
|
|
||||||
printf "\n%.0s" {1..2}
|
|
||||||
if [[ -z $XDPH1 ]]; then
|
|
||||||
read -rp "${CAT} Would you like to try to remove other XDG-Desktop-Portal-Implementations? (y/n) " XDPH1
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
case $XDPH1 in
|
|
||||||
[Yy])
|
|
||||||
# Clean out other portals
|
|
||||||
printf "${NOTE} Clearing any other xdg-desktop-portal implementations...\n"
|
|
||||||
# Check if packages are installed and uninstall if present
|
|
||||||
if pacman -Qs xdg-desktop-portal-wlr > /dev/null ; then
|
|
||||||
echo "Removing xdg-desktop-portal-wlr..."
|
|
||||||
sudo pacman -R --noconfirm xdg-desktop-portal-wlr 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
if pacman -Qs xdg-desktop-portal-lxqt > /dev/null ; then
|
|
||||||
echo "Removing xdg-desktop-portal-lxqt..."
|
|
||||||
sudo pacman -R --noconfirm xdg-desktop-portal-lxqt 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
[Nn])
|
|
||||||
echo "no other XDG-implementations will be removed." >> "$LOG"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid input. Please enter 'y' for yes or 'n' for no."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
clear
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# Yay AUR Helper #
|
# Yay AUR Helper #
|
||||||
# NOTE: If paru is already installed, yay will not be installed #
|
# NOTE: If paru is already installed, yay will not be installed #
|
||||||
|
|
||||||
|
pkg="yay-bin"
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
@@ -12,34 +13,39 @@ LOG="install-$(date +%d-%H%M%S)_yay.log"
|
|||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 5)[WARN]$(tput sgr0)"
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
ORANGE=$(tput setaf 166)
|
MAGENTA="$(tput setaf 5)"
|
||||||
YELLOW=$(tput setaf 3)
|
ORANGE="$(tput setaf 214)"
|
||||||
RESET=$(tput sgr0)
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
# Create Directory for Install Logs
|
# Create Directory for Install Logs
|
||||||
if [ ! -d Install-Logs ]; then
|
if [ ! -d Install-Logs ]; then
|
||||||
mkdir Install-Logs
|
mkdir Install-Logs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check Existing yay
|
|
||||||
if [ -d yay ]; then
|
|
||||||
rm -rf yay 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check for AUR helper and install if not found
|
# Check for AUR helper and install if not found
|
||||||
ISAUR=$(command -v yay || command -v paru)
|
ISAUR=$(command -v yay || command -v paru)
|
||||||
if [ -n "$ISAUR" ]; then
|
if [ -n "$ISAUR" ]; then
|
||||||
printf "\n%s - AUR helper already installed, moving on.\n" "${OK}"
|
printf "\n%s - ${SKY_BLUE}AUR helper${RESET} already installed, moving on.\n" "${OK}"
|
||||||
else
|
else
|
||||||
printf "\n%s - AUR helper was NOT located\n" "$WARN"
|
printf "\n%s - Installing ${SKY_BLUE}$pkg${RESET} from AUR\n" "${NOTE}"
|
||||||
printf "\n%s - Installing yay from AUR\n" "${NOTE}"
|
|
||||||
git clone https://aur.archlinux.org/yay.git || { printf "%s - Failed to clone yay from AUR\n" "${ERROR}"; exit 1; }
|
|
||||||
cd yay || { printf "%s - Failed to enter yay directory\n" "${ERROR}"; exit 1; }
|
|
||||||
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install yay from AUR\n" "${ERROR}"; exit 1; }
|
|
||||||
|
|
||||||
# moving install logs in to Install-Logs folder
|
# Check if directory exists and remove it
|
||||||
|
if [ -d "$pkg" ]; then
|
||||||
|
rm -rf "$pkg"
|
||||||
|
fi
|
||||||
|
git clone https://aur.archlinux.org/$pkg.git || { printf "%s - Failed to clone ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||||
|
cd $pkg || { printf "%s - Failed to enter $pkg directory\n" "${ERROR}"; exit 1; }
|
||||||
|
makepkg -si --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to install ${YELLOW}$pkg${RESET} from AUR\n" "${ERROR}"; exit 1; }
|
||||||
|
|
||||||
|
# moving install logs in to Install-Logs directory
|
||||||
mv install*.log ../Install-Logs/ || true
|
mv install*.log ../Install-Logs/ || true
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
@@ -50,4 +56,4 @@ ISAUR=$(command -v yay || command -v paru)
|
|||||||
|
|
||||||
$ISAUR -Syu --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to update system\n" "${ERROR}"; exit 1; }
|
$ISAUR -Syu --noconfirm 2>&1 | tee -a "$LOG" || { printf "%s - Failed to update system\n" "${ERROR}"; exit 1; }
|
||||||
|
|
||||||
clear
|
printf "\n%.0s" {1..2}
|
||||||
@@ -1,108 +1,112 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 💫 https://github.com/JaKooLit 💫 #
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
# zsh and oh my zsh including pokemon-color-scripts#
|
# zsh and oh my zsh#
|
||||||
if [[ $USE_PRESET = [Yy] ]]; then
|
|
||||||
source ./preset.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
zsh=(
|
zsh_pkg=(
|
||||||
eza
|
lsd
|
||||||
zsh
|
mercurial
|
||||||
zsh-completions
|
zsh
|
||||||
fzf
|
zsh-completions
|
||||||
)
|
)
|
||||||
|
|
||||||
|
zsh_pkg2=(
|
||||||
|
fzf
|
||||||
|
)
|
||||||
|
|
||||||
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
# Determine the directory where the script is located
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Change the working directory to the parent directory of the script
|
# Change the working directory to the parent directory of the script
|
||||||
PARENT_DIR="$SCRIPT_DIR/.."
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
cd "$PARENT_DIR" || exit 1
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
# Set the name of the log file to include the current date and time
|
||||||
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log"
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh.log"
|
||||||
|
|
||||||
## Optional Pokemon color scripts
|
# Installing core zsh packages
|
||||||
while true; do
|
printf "\n%s - Installing ${SKY_BLUE}zsh packages${RESET} .... \n" "${NOTE}"
|
||||||
if [[ -z $pokemon_choice ]]; then
|
for ZSH in "${zsh_pkg[@]}"; do
|
||||||
read -p "${CAT} OPTIONAL - Do you want to add Pokemon color scripts? (y/n): " pokemon_choice
|
install_package "$ZSH" "$LOG"
|
||||||
fi
|
done
|
||||||
case "$pokemon_choice" in
|
|
||||||
[Yy]*)
|
|
||||||
zsh+=('pokemon-colorscripts-git')
|
|
||||||
sed -i '/#pokemon-colorscripts --no-title -s -r/s/^#//' assets/.zshrc >> "$LOG" 2>&1
|
|
||||||
|
|
||||||
# commenting out fastfetch since pokemon was chosen to install
|
|
||||||
sed -i '/^fastfetch -c $HOME\/.config\/fastfetch\/config-compact.jsonc/s/^/#/' assets/.zshrc >> "$LOG" 2>&1
|
|
||||||
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
[Nn]*)
|
|
||||||
echo "${NOTE}Skipping Pokemon color scripts installation.${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "${WARN}Please enter 'y' for yes or 'n' for no.${RESET}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Installing zsh packages
|
|
||||||
printf "${NOTE} Installing core zsh packages...${RESET}\n"
|
|
||||||
for ZSH in "${zsh[@]}"; do
|
|
||||||
install_package "$ZSH" 2>&1 | tee -a "$LOG"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo -e "\e[1A\e[K${ERROR} - $ZSH Package installation failed, Please check the installation logs"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
# Check if the zsh-completions directory exists
|
||||||
|
if [ -d "zsh-completions" ]; then
|
||||||
|
rm -rf zsh-completions
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Oh My Zsh, plugins, and set zsh as default shell
|
# Install Oh My Zsh, plugins, and set zsh as default shell
|
||||||
if command -v zsh >/dev/null; then
|
if command -v zsh >/dev/null; then
|
||||||
printf "${NOTE} Installing Oh My Zsh and plugins...\n"
|
printf "${NOTE} Installing ${SKY_BLUE}Oh My Zsh and plugins${RESET} ...\n"
|
||||||
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
||||||
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended || true
|
sh -c "$(curl -fsSL https://install.ohmyz.sh)" "" --unattended
|
||||||
else
|
else
|
||||||
echo "Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory .oh-my-zsh already exists. Skipping re-installation." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
# Check if the directories exist before cloning the repositories
|
|
||||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
# Check if the directories exist before cloning the repositories
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions || true
|
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
|
||||||
else
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||||
echo "Directory zsh-autosuggestions already exists. Skipping cloning." 2>&1 | tee -a "$LOG"
|
else
|
||||||
fi
|
echo "${INFO} Directory zsh-autosuggestions already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting || true
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||||
else
|
else
|
||||||
echo "Directory zsh-syntax-highlighting already exists. Skipping cloning." 2>&1 | tee -a "$LOG"
|
echo "${INFO} Directory zsh-syntax-highlighting already exists. Cloning Skipped." 2>&1 | tee -a "$LOG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
|
# Check if ~/.zshrc and .zprofile exists, create a backup, and copy the new configuration
|
||||||
if [ -f "$HOME/.zshrc" ]; then
|
if [ -f "$HOME/.zshrc" ]; then
|
||||||
cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
|
cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.zprofile" ]; then
|
if [ -f "$HOME/.zprofile" ]; then
|
||||||
cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
|
cp -b "$HOME/.zprofile" "$HOME/.zprofile-backup" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copying the preconfigured zsh themes and profile
|
# Copying the preconfigured zsh themes and profile
|
||||||
cp -r 'assets/.zshrc' ~/
|
cp -r 'assets/.zshrc' ~/
|
||||||
cp -r 'assets/.zprofile' ~/
|
cp -r 'assets/.zprofile' ~/
|
||||||
|
|
||||||
printf "${NOTE} Changing default shell to zsh...\n"
|
# Check if the current shell is zsh
|
||||||
|
current_shell=$(basename "$SHELL")
|
||||||
|
if [ "$current_shell" != "zsh" ]; then
|
||||||
|
printf "${NOTE} Changing default shell to ${MAGENTA}zsh${RESET}..."
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
while ! chsh -s $(which zsh); do
|
# Loop to ensure the chsh command succeeds
|
||||||
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
|
while ! chsh -s "$(command -v zsh)"; do
|
||||||
sleep 1
|
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
|
||||||
done
|
sleep 1
|
||||||
printf "${NOTE} Shell changed successfully to zsh.\n" 2>&1 | tee -a "$LOG"
|
done
|
||||||
|
|
||||||
|
printf "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo "${NOTE} Your shell is already set to ${MAGENTA}zsh${RESET}."
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
# Installing core zsh packages
|
||||||
|
printf "\n%s - Installing ${SKY_BLUE}fzf${RESET} .... \n" "${NOTE}"
|
||||||
|
for ZSH2 in "${zsh_pkg2[@]}"; do
|
||||||
|
install_package "$ZSH2" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy additional oh-my-zsh themes from assets
|
||||||
|
if [ -d "$HOME/.oh-my-zsh/themes" ]; then
|
||||||
|
cp -r assets/add_zsh_theme/* ~/.oh-my-zsh/themes >> "$LOG" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|||||||
40
install-scripts/zsh_pokemon.sh
Executable file
40
install-scripts/zsh_pokemon.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# pokemon-color-scripts#
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
# Change the working directory to the parent directory of the script
|
||||||
|
PARENT_DIR="$SCRIPT_DIR/.."
|
||||||
|
cd "$PARENT_DIR" || { echo "${ERROR} Failed to change directory to $PARENT_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Source the global functions script
|
||||||
|
if ! source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"; then
|
||||||
|
echo "Failed to source Global_functions.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_zsh_pokemon.log"
|
||||||
|
|
||||||
|
printf "${NOTE} Removing any traces of ${SKY_BLUE}Pokemon Color Scripts${RESET}\n"
|
||||||
|
|
||||||
|
# Install Pokemon Color Scripts
|
||||||
|
printf "${NOTE} Installing ${SKY_BLUE}Pokemon Color Scripts${RESET}\n"
|
||||||
|
for pok in "pokemon-colorscripts-git"; do
|
||||||
|
install_package_f "$pok" "$LOG"
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
# Check if ~/.zshrc exists
|
||||||
|
if [ -f "$HOME/.zshrc" ]; then
|
||||||
|
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
|
||||||
|
sed -i "s|^fastfetch -c \$HOME/.config/fastfetch/config-compact.jsonc|#fastfetch -c \$HOME/.config/fastfetch/config-compact.jsonc|" "$HOME/.zshrc" >> "$LOG" 2>&1
|
||||||
|
else
|
||||||
|
echo "$HOME/.zshrc not found. Cant enable ${YELLOW}Pokemon color scripts${RESET}" >> "$LOG" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
598
install.sh
598
install.sh
@@ -1,28 +1,43 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# https://github.com/JaKooLit
|
# https://github.com/JaKooLit
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
# Set some colors for output messages
|
# Set some colors for output messages
|
||||||
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
WARN="$(tput setaf 5)[WARN]$(tput sgr0)"
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
ORANGE=$(tput setaf 166)
|
MAGENTA="$(tput setaf 5)"
|
||||||
YELLOW=$(tput setaf 3)
|
ORANGE="$(tput setaf 214)"
|
||||||
RESET=$(tput sgr0)
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
# Create Directory for Install Logs
|
||||||
|
if [ ! -d Install-Logs ]; then
|
||||||
|
mkdir Install-Logs
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/01-Hyprland-Install-Scripts-$(date +%d-%H%M%S).log"
|
||||||
|
|
||||||
# Check if running as root. If root, script will exit
|
# Check if running as root. If root, script will exit
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
echo "$ERROR This script should not be executed as root! Exiting......."
|
echo "${ERROR} This script should ${WARNING}NOT${RESET} be executed as root!! Exiting......." | tee -a "$LOG"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clear
|
|
||||||
|
|
||||||
# Check if PulseAudio package is installed
|
# Check if PulseAudio package is installed
|
||||||
if pacman -Qq | grep -qw '^pulseaudio$'; then
|
if pacman -Qq | grep -qw '^pulseaudio$'; then
|
||||||
echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')."
|
echo "$ERROR PulseAudio is detected as installed. Uninstall it first or edit install.sh on line 211 (execute_script 'pipewire.sh')." | tee -a "$LOG"
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -32,128 +47,63 @@ if pacman -Q base-devel &> /dev/null; then
|
|||||||
else
|
else
|
||||||
echo "$NOTE Install base-devel.........."
|
echo "$NOTE Install base-devel.........."
|
||||||
|
|
||||||
if sudo pacman -S --noconfirm --needed base-devel; then
|
if sudo pacman -S --noconfirm base-devel; then
|
||||||
echo "$OK base-devel has been installed successfully."
|
echo "👌 ${OK} base-devel has been installed successfully." | tee -a "$LOG"
|
||||||
else
|
else
|
||||||
echo "$ERROR base-devel not found nor cannot be installed."
|
echo "❌ $ERROR base-devel not found nor cannot be installed." | tee -a "$LOG"
|
||||||
echo "$ACTION Please install base-devel manually before running this script... Exiting"
|
echo "$ACTION Please install base-devel manually before running this script... Exiting" | tee -a "$LOG"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install whiptails if detected not installed. Necessary for this version
|
||||||
|
if ! command -v whiptail >/dev/null; then
|
||||||
|
echo "${NOTE} - whiptail is not installed. Installing..." | tee -a "$LOG"
|
||||||
|
sudo pacman -S --noconfirm libnewt
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
printf "\n%.0s" {1..3}
|
|
||||||
echo " | _. |/ _ _ | o _|_ "
|
|
||||||
echo " \_| (_| o |\ (_) (_) |_ | |_ "
|
|
||||||
printf "\n%.0s" {1..2}
|
printf "\n%.0s" {1..2}
|
||||||
|
echo -e "\e[35m
|
||||||
|
╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
|
||||||
|
╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ 2025
|
||||||
|
╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘ Arch Linux
|
||||||
|
\e[0m"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Welcome message
|
# Welcome message using whiptail (for displaying information)
|
||||||
echo "$(tput setaf 6)Welcome to JaKooLit's Arch-Hyprland Install Script!$(tput sgr0)"
|
whiptail --title "KooL Arch-Hyprland (2025) Install Script" \
|
||||||
echo
|
--msgbox "Welcome to KooL Arch-Hyprland (2025) Install Script!!!\n\n\
|
||||||
echo "$(tput setaf 166)ATTENTION: Run a full system update and Reboot first!! (Highly Recommended) $(tput sgr0)"
|
ATTENTION: Run a full system update and Reboot first !!! (Highly Recommended)\n\n\
|
||||||
echo
|
NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland may NOT start!" \
|
||||||
echo "$(tput setaf 3)NOTE: You will be required to answer some questions during the installation! $(tput sgr0)"
|
15 80
|
||||||
echo
|
|
||||||
echo "$(tput setaf 3)NOTE: If you are installing on a VM, ensure to enable 3D acceleration else Hyprland wont start! $(tput sgr0)"
|
|
||||||
echo
|
|
||||||
|
|
||||||
read -p "$(tput setaf 6)Would you like to proceed? (y/n): $(tput sgr0)" proceed
|
# Ask if the user wants to proceed
|
||||||
|
if ! whiptail --title "Proceed with Installation?" \
|
||||||
printf "\n%.0s" {1..2}
|
--yesno "Would you like to proceed?" 7 50; then
|
||||||
|
echo -e "\n"
|
||||||
if [ "$proceed" != "y" ]; then
|
echo "❌ ${INFO} You 🫵 chose ${YELLOW}NOT${RESET} to proceed. ${YELLOW}Exiting...${RESET}" | tee -a "$LOG"
|
||||||
echo "Installation aborted."
|
echo -e "\n"
|
||||||
printf "\n%.0s" {1..2}
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\n%.0s" {1..2}
|
echo "👌 ${OK} 🇵🇭 ${MAGENTA}KooL..${RESET} ${SKY_BLUE}lets continue with the installation...${RESET}" | tee -a "$LOG"
|
||||||
|
|
||||||
echo "$(tput bold)$(tput setaf 166)ATTENTION: Choosing Y on use preset question will install also nvidia stuff! $(tput sgr0)"
|
sleep 1
|
||||||
echo "$(tput bold)$(tput setaf 3)CTRL C to cancel and edit the file preset.sh $(tput sgr0)"
|
printf "\n%.0s" {1..1}
|
||||||
echo "$(tput bold)$(tput setaf 7)If you are not sure what to do, answer N in here $(tput sgr0)"
|
|
||||||
read -p "$(tput setaf 6)Would you like to Use Preset Settings (See note above)? (y/n): $(tput sgr0)" use_preset
|
|
||||||
|
|
||||||
# Use of Preset Settings
|
# install pciutils if detected not installed. Necessary for detecting GPU
|
||||||
if [[ $use_preset = [Yy] ]]; then
|
if ! pacman -Qs pciutils > /dev/null; then
|
||||||
source ./preset.sh
|
echo "${NOTE} - pciutils is not installed. Installing..." | tee -a "$LOG"
|
||||||
|
sudo pacman -S --noconfirm pciutils
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Function to colorize prompts
|
# Path to the install-scripts directory
|
||||||
colorize_prompt() {
|
|
||||||
local color="$1"
|
|
||||||
local message="$2"
|
|
||||||
echo -n "${color}${message}$(tput sgr0)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set the name of the log file to include the current date and time
|
|
||||||
LOG="install-$(date +%d-%H%M%S).log"
|
|
||||||
|
|
||||||
# Initialize variables to store user responses
|
|
||||||
# aur_helper=""
|
|
||||||
# bluetooth=""
|
|
||||||
# dots=""
|
|
||||||
# gtk_themes=""
|
|
||||||
# nvidia=""
|
|
||||||
# rog=""
|
|
||||||
# sddm=""
|
|
||||||
# thunar=""
|
|
||||||
# xdph=""
|
|
||||||
# zsh=""
|
|
||||||
|
|
||||||
# Create Directory for Install Logs
|
|
||||||
if [ ! -d Install-Logs ]; then
|
|
||||||
mkdir Install-Logs
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define the directory where your scripts are located
|
|
||||||
script_directory=install-scripts
|
script_directory=install-scripts
|
||||||
|
|
||||||
# Function to ask a yes/no question and set the response in a variable
|
|
||||||
ask_yes_no() {
|
|
||||||
if [[ ! -z "${!2}" ]]; then
|
|
||||||
echo "$(colorize_prompt "$CAT" "$1 (Preset): ${!2}")"
|
|
||||||
if [[ "${!2}" = [Yy] ]]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
eval "$2=''"
|
|
||||||
fi
|
|
||||||
while true; do
|
|
||||||
read -p "$(colorize_prompt "$CAT" "$1 (y/n): ")" choice
|
|
||||||
case "$choice" in
|
|
||||||
[Yy]* ) eval "$2='Y'"; return 0;;
|
|
||||||
[Nn]* ) eval "$2='N'"; return 1;;
|
|
||||||
* ) echo "Please answer with y or n.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to ask a custom question with specific options and set the response in a variable
|
|
||||||
ask_custom_option() {
|
|
||||||
local prompt="$1"
|
|
||||||
local valid_options="$2"
|
|
||||||
local response_var="$3"
|
|
||||||
|
|
||||||
if [[ ! -z "${!3}" ]]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
eval "$3=''"
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
read -p "$(colorize_prompt "$CAT" "$prompt ($valid_options): ")" choice
|
|
||||||
if [[ " $valid_options " == *" $choice "* ]]; then
|
|
||||||
eval "$response_var='$choice'"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "Please choose one of the provided options: $valid_options"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
# Function to execute a script if it exists and make it executable
|
# Function to execute a script if it exists and make it executable
|
||||||
execute_script() {
|
execute_script() {
|
||||||
local script="$1"
|
local script="$1"
|
||||||
@@ -161,7 +111,7 @@ execute_script() {
|
|||||||
if [ -f "$script_path" ]; then
|
if [ -f "$script_path" ]; then
|
||||||
chmod +x "$script_path"
|
chmod +x "$script_path"
|
||||||
if [ -x "$script_path" ]; then
|
if [ -x "$script_path" ]; then
|
||||||
env USE_PRESET=$use_preset "$script_path"
|
env "$script_path"
|
||||||
else
|
else
|
||||||
echo "Failed to make script '$script' executable."
|
echo "Failed to make script '$script' executable."
|
||||||
fi
|
fi
|
||||||
@@ -170,105 +120,341 @@ execute_script() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Collect user responses to all questions
|
|
||||||
printf "\n"
|
|
||||||
ask_custom_option "-Type AUR helper" "paru or yay" aur_helper
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Do you have any nvidia gpu in your system?" nvidia
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Install GTK themes (required for Dark/Light function)?" gtk_themes
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Do you want to configure Bluetooth?" bluetooth
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Do you want to install Thunar file manager?" thunar
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Install & configure SDDM log-in Manager plus (OPTIONAL) SDDM Theme?" sddm
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)" xdph
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Install zsh, oh-my-zsh & (Optional) pokemon-colorscripts?" zsh
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Installing in a Asus ROG Laptops?" rog
|
|
||||||
printf "\n"
|
|
||||||
ask_yes_no "-Do you want to download pre-configured Hyprland dotfiles?" dots
|
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
# Ensuring all in the scripts folder are made executable
|
## Default values for the options (will be overwritten by preset file if available)
|
||||||
chmod +x install-scripts/*
|
gtk_themes="OFF"
|
||||||
sleep 1
|
bluetooth="OFF"
|
||||||
|
thunar="OFF"
|
||||||
|
quickshell="OFF"
|
||||||
|
sddm="OFF"
|
||||||
|
sddm_theme="OFF"
|
||||||
|
xdph="OFF"
|
||||||
|
zsh="OFF"
|
||||||
|
pokemon="OFF"
|
||||||
|
rog="OFF"
|
||||||
|
dots="OFF"
|
||||||
|
input_group="OFF"
|
||||||
|
nvidia="OFF"
|
||||||
|
nouveau="OFF"
|
||||||
|
|
||||||
|
# Function to load preset file
|
||||||
|
load_preset() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "✅ Loading preset: $1"
|
||||||
|
source "$1"
|
||||||
|
else
|
||||||
|
echo "⚠️ Preset file not found: $1. Using default values."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if --preset argument is passed
|
||||||
|
if [[ "$1" == "--preset" && -n "$2" ]]; then
|
||||||
|
load_preset "$2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if yay or paru is installed
|
||||||
|
echo "${INFO} - Checking if yay or paru is installed"
|
||||||
|
if ! command -v yay &>/dev/null && ! command -v paru &>/dev/null; then
|
||||||
|
echo "${CAT} - Neither yay nor paru found. Asking 🗣️ USER to select..."
|
||||||
|
while true; do
|
||||||
|
aur_helper=$(whiptail --title "Neither Yay nor Paru is installed" --checklist "Neither Yay nor Paru is installed. Choose one AUR.\n\nNOTE: Select only 1 AUR helper!\nINFO: spacebar to select" 12 60 2 \
|
||||||
|
"yay" "AUR Helper yay" "OFF" \
|
||||||
|
"paru" "AUR Helper paru" "OFF" \
|
||||||
|
3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "❌ ${INFO} You cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$aur_helper" ]; then
|
||||||
|
whiptail --title "Error" --msgbox "You must select at least one AUR helper to proceed." 10 60 2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${INFO} - You selected: $aur_helper as your AUR helper" | tee -a "$LOG"
|
||||||
|
|
||||||
|
aur_helper=$(echo "$aur_helper" | tr -d '"')
|
||||||
|
|
||||||
|
# Check if multiple helpers were selected
|
||||||
|
if [[ $(echo "$aur_helper" | wc -w) -ne 1 ]]; then
|
||||||
|
whiptail --title "Error" --msgbox "You must select exactly one AUR helper." 10 60 2
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "${NOTE} - AUR helper is already installed. Skipping AUR helper selection."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# List of services to check for active login managers
|
||||||
|
services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service")
|
||||||
|
|
||||||
|
# Function to check if any login services are active
|
||||||
|
check_services_running() {
|
||||||
|
active_services=() # Array to store active services
|
||||||
|
for svc in "${services[@]}"; do
|
||||||
|
if systemctl is-active --quiet "$svc"; then
|
||||||
|
active_services+=("$svc")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${#active_services[@]} -gt 0 ]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if check_services_running; then
|
||||||
|
active_list=$(printf "%s\n" "${active_services[@]}")
|
||||||
|
|
||||||
|
# Display the active login manager(s) in the whiptail message box
|
||||||
|
whiptail --title "Active non-SDDM login manager(s) detected" \
|
||||||
|
--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
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if NVIDIA GPU is detected
|
||||||
|
nvidia_detected=false
|
||||||
|
if lspci | grep -i "nvidia" &> /dev/null; then
|
||||||
|
nvidia_detected=true
|
||||||
|
whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you chose to configure." 12 60
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the options array for whiptail checklist
|
||||||
|
options_command=(
|
||||||
|
whiptail --title "Select Options" --checklist "Choose options to install or configure\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 28 85 20
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add NVIDIA options if detected
|
||||||
|
if [ "$nvidia_detected" == "true" ]; then
|
||||||
|
options_command+=(
|
||||||
|
"nvidia" "Do you want script to configure NVIDIA GPU?" "OFF"
|
||||||
|
"nouveau" "Do you want Nouveau to be blacklisted?" "OFF"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add 'input_group' option if user is not in input group
|
||||||
|
input_group_detected=false
|
||||||
|
if ! groups "$(whoami)" | grep -q '\binput\b'; then
|
||||||
|
input_group_detected=true
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add 'input_group' option if necessary
|
||||||
|
if [ "$input_group_detected" == "true" ]; then
|
||||||
|
options_command+=(
|
||||||
|
"input_group" "Add your USER to input group for some waybar functionality?" "OFF"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Conditionally add SDDM and SDDM theme options if no active login manager is found
|
||||||
|
if ! check_services_running; then
|
||||||
|
options_command+=(
|
||||||
|
"sddm" "Install & configure SDDM login manager?" "OFF"
|
||||||
|
"sddm_theme" "Download & Install Additional SDDM theme?" "OFF"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add the remaining static options
|
||||||
|
options_command+=(
|
||||||
|
"gtk_themes" "Install GTK themes? (required for Dark/Light function)" "OFF"
|
||||||
|
"bluetooth" "Do you want script to configure Bluetooth?" "OFF"
|
||||||
|
"thunar" "Do you want Thunar file manager to be installed?" "OFF"
|
||||||
|
"quickshell" "Install quickshell for Desktop-Like Overview?" "OFF"
|
||||||
|
"xdph" "Install XDG-DESKTOP-PORTAL-HYPRLAND (for screen share)?" "OFF"
|
||||||
|
"zsh" "Install zsh shell with Oh-My-Zsh?" "OFF"
|
||||||
|
"pokemon" "Add Pokemon color scripts to your terminal?" "OFF"
|
||||||
|
"rog" "Are you installing on Asus ROG laptops?" "OFF"
|
||||||
|
"dots" "Download and install pre-configured KooL Hyprland dotfiles?" "OFF"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Capture the selected options before the while loop starts
|
||||||
|
while true; do
|
||||||
|
selected_options=$("${options_command[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
# Check if the user pressed Cancel (exit status 1)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "\n"
|
||||||
|
echo "❌ ${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG"
|
||||||
|
exit 0 # Exit the script if Cancel is pressed
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If no option was selected, notify and restart the selection
|
||||||
|
if [ -z "$selected_options" ]; then
|
||||||
|
whiptail --title "Warning" --msgbox "No options were selected. Please select at least one option." 10 60
|
||||||
|
continue # Return to selection if no options selected
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Strip the quotes and trim spaces if necessary (sanitize the input)
|
||||||
|
selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ')
|
||||||
|
|
||||||
|
# Convert selected options into an array (preserving spaces in values)
|
||||||
|
IFS=' ' read -r -a options <<< "$selected_options"
|
||||||
|
|
||||||
|
# Check if the "dots" option was selected
|
||||||
|
dots_selected="OFF"
|
||||||
|
for option in "${options[@]}"; do
|
||||||
|
if [[ "$option" == "dots" ]]; then
|
||||||
|
dots_selected="ON"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If "dots" is not selected, show a note and ask the user to proceed or return to choices
|
||||||
|
if [[ "$dots_selected" == "OFF" ]]; then
|
||||||
|
# Show a note about not selecting the "dots" option
|
||||||
|
if ! whiptail --title "KooL Hyprland Dot Files" --yesno \
|
||||||
|
"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?" \
|
||||||
|
--yes-button "Continue" --no-button "Return" 15 90; then
|
||||||
|
echo "🔙 Returning to options..." | tee -a "$LOG"
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
# User chose to continue
|
||||||
|
echo "${INFO} ⚠️ Continuing WITHOUT the dotfiles installation..." | tee -a "$LOG"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prepare the confirmation message
|
||||||
|
confirm_message="You have selected the following options:\n\n"
|
||||||
|
for option in "${options[@]}"; do
|
||||||
|
confirm_message+=" - $option\n"
|
||||||
|
done
|
||||||
|
confirm_message+="\nAre you happy with these choices?"
|
||||||
|
|
||||||
|
# Confirmation prompt
|
||||||
|
if ! whiptail --title "Confirm Your Choices" --yesno "$(printf "%s" "$confirm_message")" 25 80; then
|
||||||
|
echo -e "\n"
|
||||||
|
echo "❌ ${SKY_BLUE}You're not 🫵 happy${RESET}. ${YELLOW}Returning to options...${RESET}" | tee -a "$LOG"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "👌 ${OK} You confirmed your choices. Proceeding with ${SKY_BLUE}KooL 🇵🇭 Hyprland Installation...${RESET}" | tee -a "$LOG"
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
# Ensuring base-devel is installed
|
# Ensuring base-devel is installed
|
||||||
execute_script "00-base.sh"
|
execute_script "00-base.sh"
|
||||||
sleep 1
|
sleep 1
|
||||||
execute_script "pacman.sh"
|
execute_script "pacman.sh"
|
||||||
sleep 1
|
sleep 1
|
||||||
# Execute AUR helper script based on user choice
|
|
||||||
|
# Execute AUR helper script after other installations if applicable
|
||||||
if [ "$aur_helper" == "paru" ]; then
|
if [ "$aur_helper" == "paru" ]; then
|
||||||
execute_script "paru.sh"
|
execute_script "paru.sh"
|
||||||
elif [ "$aur_helper" == "yay" ]; then
|
elif [ "$aur_helper" == "yay" ]; then
|
||||||
execute_script "yay.sh"
|
execute_script "yay.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install hyprland packages
|
sleep 1
|
||||||
|
|
||||||
|
# Run the Hyprland related scripts
|
||||||
|
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland additional packages...${RESET}" | tee -a "$LOG"
|
||||||
|
sleep 1
|
||||||
execute_script "01-hypr-pkgs.sh"
|
execute_script "01-hypr-pkgs.sh"
|
||||||
|
|
||||||
# Install pipewire and pipewire-audio
|
echo "${INFO} Installing ${SKY_BLUE}pipewire and pipewire-audio...${RESET}" | tee -a "$LOG"
|
||||||
|
sleep 1
|
||||||
execute_script "pipewire.sh"
|
execute_script "pipewire.sh"
|
||||||
|
|
||||||
# Install necessary fonts
|
echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG"
|
||||||
|
sleep 1
|
||||||
execute_script "fonts.sh"
|
execute_script "fonts.sh"
|
||||||
|
|
||||||
# Install hyprland
|
echo "${INFO} Installing ${SKY_BLUE}Hyprland...${RESET}"
|
||||||
|
sleep 1
|
||||||
execute_script "hyprland.sh"
|
execute_script "hyprland.sh"
|
||||||
|
|
||||||
# Install AGS from source (older version)
|
# Clean up the selected options (remove quotes and trim spaces)
|
||||||
execute_script "ags.sh"
|
selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ')
|
||||||
|
|
||||||
if [ "$nvidia" == "Y" ]; then
|
# Convert selected options into an array (splitting by spaces)
|
||||||
execute_script "nvidia.sh"
|
IFS=' ' read -r -a options <<< "$selected_options"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$gtk_themes" == "Y" ]; then
|
# Loop through selected options
|
||||||
execute_script "gtk_themes.sh"
|
for option in "${options[@]}"; do
|
||||||
fi
|
case "$option" in
|
||||||
|
sddm)
|
||||||
if [ "$bluetooth" == "Y" ]; then
|
if check_services_running; then
|
||||||
execute_script "bluetooth.sh"
|
active_list=$(printf "%s\n" "${active_services[@]}")
|
||||||
fi
|
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
|
||||||
|
exec "$0"
|
||||||
if [ "$thunar" == "Y" ]; then
|
else
|
||||||
execute_script "thunar.sh"
|
echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG"
|
||||||
fi
|
execute_script "sddm.sh"
|
||||||
|
fi
|
||||||
if [ "$sddm" == "Y" ]; then
|
;;
|
||||||
execute_script "sddm.sh"
|
nvidia)
|
||||||
fi
|
echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "nvidia.sh"
|
||||||
if [ "$xdph" == "Y" ]; then
|
;;
|
||||||
execute_script "xdph.sh"
|
nouveau)
|
||||||
fi
|
echo "${INFO} blacklisting ${SKY_BLUE}nouveau${RESET}"
|
||||||
|
execute_script "nvidia_nouveau.sh" | tee -a "$LOG"
|
||||||
if [ "$zsh" == "Y" ]; then
|
;;
|
||||||
execute_script "zsh.sh"
|
gtk_themes)
|
||||||
fi
|
echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "gtk_themes.sh"
|
||||||
execute_script "InputGroup.sh"
|
;;
|
||||||
|
input_group)
|
||||||
if [ "$rog" == "Y" ]; then
|
echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG"
|
||||||
execute_script "rog.sh"
|
execute_script "InputGroup.sh"
|
||||||
fi
|
;;
|
||||||
|
quickshell)
|
||||||
if [ "$dots" == "Y" ]; then
|
echo "${INFO} Installing ${SKY_BLUE}quickshell for Desktop Overview...${RESET}" | tee -a "$LOG"
|
||||||
execute_script "dotfiles-main.sh"
|
execute_script "quickshell.sh"
|
||||||
|
;;
|
||||||
fi
|
xdph)
|
||||||
|
echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG"
|
||||||
clear
|
execute_script "xdph.sh"
|
||||||
|
;;
|
||||||
|
bluetooth)
|
||||||
|
echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "bluetooth.sh"
|
||||||
|
;;
|
||||||
|
thunar)
|
||||||
|
echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "thunar.sh"
|
||||||
|
execute_script "thunar_default.sh"
|
||||||
|
;;
|
||||||
|
sddm_theme)
|
||||||
|
echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "sddm_theme.sh"
|
||||||
|
;;
|
||||||
|
zsh)
|
||||||
|
echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "zsh.sh"
|
||||||
|
;;
|
||||||
|
pokemon)
|
||||||
|
echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "zsh_pokemon.sh"
|
||||||
|
;;
|
||||||
|
rog)
|
||||||
|
echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "rog.sh"
|
||||||
|
;;
|
||||||
|
dots)
|
||||||
|
echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG"
|
||||||
|
execute_script "dotfiles-main.sh"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown option: $option" | tee -a "$LOG"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
sleep 1
|
||||||
# copy fastfetch config if arch.png is not present
|
# copy fastfetch config if arch.png is not present
|
||||||
if [ ! -f "$HOME/.config/fastfetch/arch.png" ]; then
|
if [ ! -f "$HOME/.config/fastfetch/arch.png" ]; then
|
||||||
cp -r assets/fastfetch "$HOME/.config/"
|
cp -r assets/fastfetch "$HOME/.config/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
# final check essential packages if it is installed
|
# final check essential packages if it is installed
|
||||||
execute_script "02-Final-Check.sh"
|
execute_script "02-Final-Check.sh"
|
||||||
|
|
||||||
@@ -276,25 +462,45 @@ printf "\n%.0s" {1..1}
|
|||||||
|
|
||||||
# Check if hyprland or hyprland-git is installed
|
# Check if hyprland or hyprland-git is installed
|
||||||
if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then
|
if pacman -Q hyprland &> /dev/null || pacman -Q hyprland-git &> /dev/null; then
|
||||||
printf "\n${OK} Hyprland is installed. However, some essential packages may not be installed Please see above!"
|
printf "\n ${OK} 👌 Hyprland is installed. However, some essential packages may not be installed. Please see above!"
|
||||||
printf "\n${CAT} Ignore this message if it states 'All essential packages are installed.'\n"
|
printf "\n${CAT} Ignore this message if it states ${YELLOW}All essential packages${RESET} are installed as per above\n"
|
||||||
sleep 2
|
sleep 2
|
||||||
printf "\n${NOTE} You can start Hyprland by typing 'Hyprland' (IF SDDM is not installed) (note the capital H!).\n"
|
printf "\n%.0s" {1..2}
|
||||||
printf "\n${NOTE} However, it is highly recommended to reboot your system.\n\n"
|
|
||||||
|
|
||||||
# Prompt user to reboot
|
printf "${SKY_BLUE}Thank you${RESET} 🫰 for using 🇵🇭 ${MAGENTA}KooL's Hyprland Dots${RESET}. ${YELLOW}Enjoy and Have a good day!${RESET}"
|
||||||
read -rp "${CAT} Would you like to reboot now? (y/n): " HYP
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
# Check if the user answered 'y' or 'Y'
|
printf "\n${NOTE} You can start Hyprland by typing ${SKY_BLUE}Hyprland${RESET} (IF SDDM is not installed) (note the capital H!).\n"
|
||||||
if [[ "$HYP" =~ ^[Yy]$ ]]; then
|
printf "\n${NOTE} However, it is ${YELLOW}highly recommended to reboot${RESET} your system.\n\n"
|
||||||
if [[ "$nvidia" == "Y" ]]; then
|
|
||||||
echo "${NOTE} NVIDIA GPU detected. Rebooting the system..."
|
while true; do
|
||||||
|
echo -n "${CAT} Would you like to reboot now? (y/n): "
|
||||||
|
read HYP
|
||||||
|
HYP=$(echo "$HYP" | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
|
if [[ "$HYP" == "y" || "$HYP" == "yes" ]]; then
|
||||||
|
echo "${INFO} Rebooting now..."
|
||||||
|
systemctl reboot
|
||||||
|
break
|
||||||
|
elif [[ "$HYP" == "n" || "$HYP" == "no" ]]; then
|
||||||
|
echo "👌 ${OK} You chose NOT to reboot"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
# Check if NVIDIA GPU is present
|
||||||
|
if lspci | grep -i "nvidia" &> /dev/null; then
|
||||||
|
echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..."
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "${WARN} Invalid response. Please answer with 'y' or 'n'."
|
||||||
fi
|
fi
|
||||||
systemctl reboot
|
done
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# Print error message if neither package is installed
|
# Print error message if neither package is installed
|
||||||
printf "\n${WARN} Hyprland failed to install. Please check 00_CHECK-time_installed.log and other files Install-Logs/ directory...\n\n"
|
printf "\n${WARN} Hyprland is NOT installed. Please check 00_CHECK-time_installed.log and other files in the Install-Logs/ directory..."
|
||||||
|
printf "\n%.0s" {1..3}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
49
preset.sh
49
preset.sh
@@ -1,49 +0,0 @@
|
|||||||
# 💫 https://github.com/JaKooLit 💫 #
|
|
||||||
#
|
|
||||||
# CREDIT to: https://github.com/PostCyberPunk for this Preset function
|
|
||||||
|
|
||||||
## -- Make sure you use the right answer or install script will fail ###
|
|
||||||
# Make sure proper AUR Helper is use NO Upperscript. Either paru or yay only is accepted
|
|
||||||
# The rest Change to Y for Yes and N for No.
|
|
||||||
|
|
||||||
### -Type AUR helper
|
|
||||||
### yay or paru
|
|
||||||
aur_helper="yay"
|
|
||||||
############ use : "Y" or "N"
|
|
||||||
###-Do you have any nvidia gpu in your system?
|
|
||||||
nvidia="Y"
|
|
||||||
###-Install GTK themes (required for Dark/Light function)?
|
|
||||||
gtk_themes="Y"
|
|
||||||
###-Do you want to configure Bluetooth?
|
|
||||||
bluetooth="Y"
|
|
||||||
###-Do you want to install Thunar file manager?
|
|
||||||
thunar="Y"
|
|
||||||
###-Install & configure SDDM log-in Manager plus (OPTIONAL) SDDM Theme?
|
|
||||||
sddm="Y"
|
|
||||||
###-Install XDG-DESKTOP-PORTAL-HYPRLAND? (For proper Screen Share ie OBS)
|
|
||||||
xdph="Y"
|
|
||||||
###-Install zsh, oh-my-zsh & (Optional) pokemon-colorscripts?
|
|
||||||
zsh="Y"
|
|
||||||
###-Installing in a Asus ROG Laptops?
|
|
||||||
rog="N"
|
|
||||||
###-Do you want to download pre-configured Hyprland dotfiles?
|
|
||||||
dots="Y"
|
|
||||||
|
|
||||||
### These are the sub-questions of the above choices
|
|
||||||
### Would you like to blacklist nouveau? (y/n)
|
|
||||||
blacklist_nouveau="Y"
|
|
||||||
# Ask the user if they want to use Thunar as the default file manager
|
|
||||||
# Do you want to set Thunar as the default file manager? (y/n): "
|
|
||||||
thunar_default="Y"
|
|
||||||
### XDG-desktop-portal-KDE & GNOME (if installed) should be manually disabled or removed! Script cant remove nor disable it.
|
|
||||||
### Would you like to try to remove other XDG-Desktop-Portal-Implementations? (y/n)
|
|
||||||
XDPH1="Y"
|
|
||||||
### OPTIONAL - Would you like to install SDDM themes? (y/n)
|
|
||||||
install_sddm_theme="Y"
|
|
||||||
### " This script will add your user to the 'input' group."
|
|
||||||
### " Please note that adding yourself to the 'input' group might be necessary for waybar keyboard-state functionality."
|
|
||||||
input_group_choid="Y"
|
|
||||||
### OPTIONAL - Do you want to add Pokemon color scripts? (y/n):
|
|
||||||
pokemon_choice="Y"
|
|
||||||
### Do you want to upgrade to the latest version? (y/n) - This is for the dotfiles
|
|
||||||
upgrade_choice="Y"
|
|
||||||
257
uninstall.sh
Executable file
257
uninstall.sh
Executable file
@@ -0,0 +1,257 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# KooL Arch-Hyprland uninstall script #
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
# Set some colors for output messages
|
||||||
|
OK="$(tput setaf 2)[OK]$(tput sgr0)"
|
||||||
|
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
|
||||||
|
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
|
||||||
|
INFO="$(tput setaf 4)[INFO]$(tput sgr0)"
|
||||||
|
WARN="$(tput setaf 1)[WARN]$(tput sgr0)"
|
||||||
|
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
|
||||||
|
MAGENTA="$(tput setaf 5)"
|
||||||
|
ORANGE="$(tput setaf 214)"
|
||||||
|
WARNING="$(tput setaf 1)"
|
||||||
|
YELLOW="$(tput setaf 3)"
|
||||||
|
GREEN="$(tput setaf 2)"
|
||||||
|
BLUE="$(tput setaf 4)"
|
||||||
|
SKY_BLUE="$(tput setaf 6)"
|
||||||
|
RESET="$(tput sgr0)"
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
echo -e "\e[35m
|
||||||
|
╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
|
||||||
|
╠╩╗│ ││ │║ ╠═╣└┬┘├─┘├┬┘│ ├─┤│││ ││ UNINSTALL
|
||||||
|
╩ ╩└─┘└─┘╩═╝ ╩ ╩ ┴ ┴ ┴└─┴─┘┴ ┴┘└┘─┴┘ Arch Linux
|
||||||
|
\e[0m"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
|
||||||
|
# Show welcome message using whiptail with Yes/No options
|
||||||
|
whiptail --title "Arch-Hyprland KooL Dots Uninstall Script" --yesno \
|
||||||
|
"Hello! This script will uninstall KooL Hyprland packages and configs.
|
||||||
|
|
||||||
|
You can choose packages and directories you want to remove.
|
||||||
|
NOTE: This will remove configs from ~/.config
|
||||||
|
|
||||||
|
WARNING: After uninstallation, your system may become unstable.
|
||||||
|
|
||||||
|
Shall we Proceed?" 20 80
|
||||||
|
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
echo "$INFO uninstall process canceled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Function to remove selected packages
|
||||||
|
remove_packages() {
|
||||||
|
local selected_packages_file=$1
|
||||||
|
while read -r package; do
|
||||||
|
if pacman -Qi "$package" &> /dev/null; then
|
||||||
|
echo "Removing package: $package"
|
||||||
|
if ! sudo pacman -Rs --noconfirm "$package"; then
|
||||||
|
echo "$ERROR Failed to remove package: $package"
|
||||||
|
else
|
||||||
|
echo "$OK Successfully removed package: $package"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$INFO Package ${YELLOW}$package${RESET} not found. Skipping."
|
||||||
|
fi
|
||||||
|
done < "$selected_packages_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to remove selected directories
|
||||||
|
remove_directories() {
|
||||||
|
local selected_dirs_file=$1
|
||||||
|
while read -r dir; do
|
||||||
|
pattern="$HOME/.config/$dir*"
|
||||||
|
# Loop through directories matching the pattern
|
||||||
|
for dir_to_remove in $pattern; do
|
||||||
|
if [ -d "$dir_to_remove" ]; then
|
||||||
|
echo "Removing directory: $dir_to_remove"
|
||||||
|
if ! rm -rf "$dir_to_remove"; then
|
||||||
|
echo "$ERROR Failed to remove directory: $dir_to_remove"
|
||||||
|
else
|
||||||
|
echo "$OK Successfully removed directory: $dir_to_remove"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$INFO Directory ${YELLOW}$dir_to_remove${RESET} not found. Skipping."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done < "$selected_dirs_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Define the list of packages to choose from (with options_command tags)
|
||||||
|
packages=(
|
||||||
|
"btop" "resource monitor" "off"
|
||||||
|
"brightnessctl" "brightnessctl" "off"
|
||||||
|
"cava" "Cross-platform Audio Visualizer" "off"
|
||||||
|
"cliphist" "clipboard manager" "off"
|
||||||
|
"fastfetch" "fastfetch" "off"
|
||||||
|
"ffmpegthumbnailer" "FFmpeg Thumbnailer" "off"
|
||||||
|
"grim" "screenshot tool" "off"
|
||||||
|
"imagemagick" "Image manipulation tool" "off"
|
||||||
|
"kitty" "kitty-terminal" "off"
|
||||||
|
"kvantum" "QT apps theming" "off"
|
||||||
|
"mousepad" "simple text editor" "off"
|
||||||
|
"mpv" "multi-media player" "off"
|
||||||
|
"mpv-mpris" "mpv-plugin" "off"
|
||||||
|
"network-manager-applet" "network-manager-applet" "off"
|
||||||
|
"nvtop" "gpu resource monitor" "off"
|
||||||
|
"nwg-displays" "display monitor configuration app" "off"
|
||||||
|
"nwg-look" "gtk settings app" "off"
|
||||||
|
"pamixer" "pamixer" "off"
|
||||||
|
"pokemon-colorscripts-git" "terminal colorscripts" "off"
|
||||||
|
"pavucontrol" "pavucontrol" "off"
|
||||||
|
"playerctl" "playerctl" "off"
|
||||||
|
"pyprland" "pyprland" "off"
|
||||||
|
"qalculate-gtk" "calculator - QT" "off"
|
||||||
|
"qt5ct" "qt5ct" "off"
|
||||||
|
"qt6ct" "qt6ct" "off"
|
||||||
|
"quickshell" "quickshell" "off"
|
||||||
|
"rofi-wayland" "rofi-wayland" "off"
|
||||||
|
"slurp" "screenshot tool" "off"
|
||||||
|
"swappy" "screenshot tool" "off"
|
||||||
|
"swaync" "notification agent" "off"
|
||||||
|
"swww" "wallpaper engine" "off"
|
||||||
|
"thunar" "File Manager" "off"
|
||||||
|
"thunar-archive-plugin" "Archive Plugin" "off"
|
||||||
|
"thunar-volman" "Volume Management" "off"
|
||||||
|
"tumbler" "Thumbnail Service" "off"
|
||||||
|
"wallust" "color pallete generator" "off"
|
||||||
|
"waybar" "wayland bar" "off"
|
||||||
|
"wl-clipboard" "clipboard manager" "off"
|
||||||
|
"wlogout" "logout menu" "off"
|
||||||
|
"xdg-desktop-portal-hyprland" "hyprland file picker" "off"
|
||||||
|
"yad" "dialog box" "off"
|
||||||
|
"yt-dlp" "video downloader" "off"
|
||||||
|
"xarchiver" "Archive Manager" "off"
|
||||||
|
"hypridle" "hyprland idling agent" "off"
|
||||||
|
"hyprlock" "lockscreen" "off"
|
||||||
|
"hyprpolkitagent" "hyprland polkit agent" "off"
|
||||||
|
"hyprland" "hyprland main package" "off"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Define the list of directories to choose from (with options_command tags)
|
||||||
|
directories=(
|
||||||
|
"btop" "btop configuration" "off"
|
||||||
|
"cava" "cava configuration" "off"
|
||||||
|
"fastfetch" "fastfetch configuration" "off"
|
||||||
|
"hypr" "main hyprland configuration" "off"
|
||||||
|
"kitty" "kitty terminal configuration" "off"
|
||||||
|
"Kvantum" "Kvantum-manager configuration" "off"
|
||||||
|
"quickshell" "quickshell desktop overview configuration" "off"
|
||||||
|
"qt5ct" "qt5ct configuration" "off"
|
||||||
|
"qt6ct" "qt6ct configuration" "off"
|
||||||
|
"rofi" "rofi configuration" "off"
|
||||||
|
"swappy" "swappy (screenshot tool) configuration" "off"
|
||||||
|
"swaync" "swaync (notification agent) configuration" "off"
|
||||||
|
"Thunar" "Thunar file manager configuration" "off"
|
||||||
|
"wallust" "wallust (color pallete) configuration" "off"
|
||||||
|
"waybar" "waybar configuration" "off"
|
||||||
|
"wlogout" "wlogout (logout menu) configuration" "off"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Loop for package selection until user selects something or cancels
|
||||||
|
while true; do
|
||||||
|
package_choices=$(whiptail --title "Select Packages to Uninstall" --checklist \
|
||||||
|
"Select the packages you want to remove\nNOTE: 'SPACEBAR' to select & 'TAB' key to change selection" 35 90 25 \
|
||||||
|
"${packages[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
# Check if the user canceled the operation
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
echo "$INFO uninstall process canceled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If no packages are selected, ask again
|
||||||
|
if [[ -z "$package_choices" ]]; then
|
||||||
|
echo "$NOTE No packages selected. Please select at least one package."
|
||||||
|
else
|
||||||
|
echo "$package_choices" | tr -d '"' | tr ' ' '\n' > /tmp/selected_packages.txt
|
||||||
|
echo "Packages to remove: $package_choices"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Loop for directory selection until user selects something or cancels
|
||||||
|
while true; do
|
||||||
|
dir_choices=$(whiptail --title "Select Directories to Remove" --checklist \
|
||||||
|
"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 \
|
||||||
|
"${directories[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
# Check if the user canceled the operation
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
echo "$INFO uninstall process canceled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If no directories are selected, ask again
|
||||||
|
if [[ -z "$dir_choices" ]]; then
|
||||||
|
echo "$NOTE No directories selected. Please select at least one directory."
|
||||||
|
else
|
||||||
|
# Save each selected directory to a new line in the temporary file
|
||||||
|
echo "$dir_choices" | tr -d '"' | tr ' ' '\n' > /tmp/selected_directories.txt
|
||||||
|
echo "Directories to remove: $dir_choices"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# First confirmation - Warning about potential instability
|
||||||
|
if ! whiptail --title "Warning" --yesno \
|
||||||
|
"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?" \
|
||||||
|
10 80; then
|
||||||
|
echo "$INFO uninstall process canceled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Second confirmation - Final confirmation to proceed
|
||||||
|
if ! whiptail --title "Final Confirmation" --yesno \
|
||||||
|
"Are you absolutely sure you want to remove the selected packages and directories?\n\nWARNING! This action is irreversible." \
|
||||||
|
10 80; then
|
||||||
|
echo "$INFO uninstall process canceled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "\n%s${SKY_BLUE}Attempting to remove selected packages${RESET}\n" "${NOTE}"
|
||||||
|
MAX_ATTEMPTS=2
|
||||||
|
ATTEMPT=0
|
||||||
|
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
|
||||||
|
# Remove packages
|
||||||
|
remove_packages /tmp/selected_packages.txt
|
||||||
|
|
||||||
|
# Check if any packages still need to be removed, retry if needed
|
||||||
|
MISSING_PACKAGE_COUNT=0
|
||||||
|
while read -r package; do
|
||||||
|
if pacman -Qi "$package" &> /dev/null; then
|
||||||
|
MISSING_PACKAGE_COUNT=$((MISSING_PACKAGE_COUNT + 1))
|
||||||
|
fi
|
||||||
|
done < /tmp/selected_packages.txt
|
||||||
|
|
||||||
|
if [ $MISSING_PACKAGE_COUNT -gt 0 ]; then
|
||||||
|
ATTEMPT=$((ATTEMPT + 1))
|
||||||
|
echo "Attempt #$ATTEMPT failed, retrying..."
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "\n%s${SKY_BLUE}Attempting to remove locally installed packages${RESET}\n" "${NOTE}"
|
||||||
|
for file in ags pokemon-colorscripts; do
|
||||||
|
if [ -f "/usr/local/bin/$file" ]; then
|
||||||
|
sudo rm "/usr/local/bin/$file"
|
||||||
|
echo "$file removed."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
printf "\n%s${SKY_BLUE}Attempting to remove selected directories${RESET}\n" "${NOTE}"
|
||||||
|
remove_directories /tmp/selected_directories.txt
|
||||||
|
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
|
echo -e "$MAGENTA Hyprland and related components have been uninstalled.$RESET"
|
||||||
|
echo -e "$YELLOW It is recommended to reboot your system now.$RESET"
|
||||||
|
printf "\n%.0s" {1..1}
|
||||||
Reference in New Issue
Block a user