Compare commits

..

No commits in common. "main" and "0.01a" have entirely different histories.
main ... 0.01a

3 changed files with 34 additions and 118 deletions

View File

@ -6,8 +6,6 @@ CBSH, or Cabooshy's Shell, is a Post installation Script for Arch Linux, and Arc
* TABLE OF CONTENTS :toc:
- [[#about-cbsh][About CBSH]]
- [[#current-list-of-arch-distros-that-i-have-tested-cbsh-on-and-it-works-fine][Current List of Arch distros that i have tested CBSH on and it works fine:]]
- [[#list-of-arch-distros-this-wont-work-on][List of Arch distros this won't work on:]]
- [[#installing-cbsh][Installing CBSH]]
- [[#install-instructions][Install Instructions]]
- [[#potential-bugs][Potential Bugs]]
@ -26,10 +24,7 @@ CBSH, or Cabooshy's Shell, is a Post installation Script for Arch Linux, and Arc
- [[#installing-the-packages-from-the-repos][Installing the packages from the repos]]
- [[#choosing-graphics-drivers][Choosing Graphics Drivers]]
- [[#copying-over-the-configs-from-etccbsh-to-home][Copying over the configs from /etc/cbsh to $HOME]]
- [[#emacs][Emacs]]
- [[#install-chemacs2][Install Chemacs2]]
- [[#install-cbshmacs][Install CBSHMacs]]
- [[#install-doom-emacs][Install DOOM Emacs]]
- [[#installing-doom-emacs][Installing DOOM Emacs!]]
- [[#the-fun-part-setting-the-default-user-shell][The Fun part, Setting the default USER shell!]]
- [[#make-sure-sddm-is-enabled-so-we-dont-boot-into-a-tty-and-networkmanager-is-too-so-the-applet-works][Make Sure SDDM is enabled so we don't boot into a TTY, and NetworkManager is too so the applet works.]]
- [[#installation-complete][Installation Complete!]]
@ -37,18 +32,6 @@ CBSH, or Cabooshy's Shell, is a Post installation Script for Arch Linux, and Arc
* About CBSH
Cabooshy's Shell (CBSH) is a Post Install Script for Arch Linux and Arch based Distro's, it installs my Qtile Desktop, and programs i use on a daily basis, like Emacs.
This Postinstall script is largely based on/inspired by [[https://gitlab.com/dtos/dtos][DTOS]] by Derek Taylor (Distrotube on YT!)
I've been wanting to do something like this for the longest time and my journey into Arch and wanting to know more about packaging my own stuff and that led me to making this. i felt i'd learn more doing it myself with my own setup instead of tweaking DTOS to my own liking, lots of how this script works is very similar to DTOS.
** Current List of Arch distros that i have tested CBSH on and it works fine:
- Arch Linux (No Brainer)
- Arcolinux
- Manjaro Linux
this list will get bigger as i test more distros.
** List of Arch distros this won't work on:
- Artix Linux -- Due to the majority of distros using systemd, this script assumes its installed, and as Artix doesnt use systemd, it wont work, i may make varients of the script that work on artix (to cover all the possible bases of init systems you can choose), but its unlikely as i don't use Artix.
* Installing CBSH
** Install Instructions
@ -61,7 +44,7 @@ cd cbsh
** Potential Bugs
*** Slow Download Times
These Scripts can take a LONG time to complete as there are around 300+ packages. Make sure you are using ParallelDownloads in /etc/pacman.conf for faster download times, for example changing ParallelDownloads so that it downloads up to five packages at a time:
These Scripts can take a LONG time to complete as there are around 200 packages. On Arch, make sure you are using ParallelDownloads in /etc/pacman.conf for faster download times, for example changing ParallelDownloads so that it downloads up to five packages at a time:
#+begin_example
ParallelDownloads = 5
#+end_example
@ -73,10 +56,6 @@ killall emacs
/usr/bin/emacs --daemon &
#+end_example
*** Issues that may cause the script to fail
- lib32-* not found: simple fix this one, before running the script, make sure you have the multilib repo enabled, as the script does install a couple packages from there, another benefit is being able to install Steam, should you wish, as for some reason Steam is still a 32-bit application.
- Package Conflicts: some distros package their own versions of some programs and can cause the script to fail, so far i have not found any conflicts but when i do i will add a list of them here.
* Updating CBSH
CBSH is updated via your package manager.
@ -103,12 +82,12 @@ Many of CBSH's Packages are actually configuration files, these will get stored
* Contributing to CBSH
Contributions from other people are welcomed, but there are a few things you will need to consider before making a merge request.
Contributions from other people are welcomed. especially for distro's i have no experience with, like Fedora, but there are a few things you will need to consider before making a merge request.
** Edit The README.org
I get some people are not well versed in the emacs way of doing things, but this very readme is the postinstall script. Utilising ORG-Mode's magic, i convert the ~README.org~ into the ~cbsh~ script. So by editing the main scripts directly and making a merge request, especially for huge changes, makes a lot more work than what is needed, as i'd have to manually edit the ~README.org~ to make it conform to the changes you proposed in your merge request. So please, edit the ~README.org~.
I get some people are not well versed in the emacs way of doing things, but this very readme is the postinstall script. Utilising ORG-Mode's magic, i convert the ~README.org~ into both ~cbsh~ scripts. So by editing the main scripts directly and making a merge request, especially for huge changes, makes a lot more work than what is needed, as i'd have to manually edit the ~README.org~ to make it conform to the changes you proposed in your merge request. So please, edit the ~README.org~.
As this script is similar to DTOS, DT's [[https://gitlab.com/dtos/dtos/-/blob/master/convert.sh][Conversion Script]] will work to convert my readme to a shell script you can use to test changes.
I Will include a conversion script for non emacs users so they can edit the corresponding (or new!) ~README.org~ with whatever Text-Editor/IDE they want, and then convert it into the script to see if it exports correctly.
** TEST. YOUR. CHANGES. LOCALLY. FIRST.
It would be a very, very good idea to have a local VM with a clean installation of your distro of choice, and clone the clean VM when you need to test the script. Please don't make a merge request without actually testing your changes first in a ~fresh VM~ (One you have not run the script on before).
@ -216,7 +195,7 @@ recieve_keys || err "Error Recieving PGP key $_pgpkey"
* Installing the packages from the repos
All packages listed are either in the standard Arch Repos, Repos provided by the likes of Manjaro, Arco etc. or in my CBSH repos. these will all get installed with pacman. the only exception is DOOM Emacs which will be installed later in the script.
All packages listed are either in the standard Arch Repos or in my CBSH repos. these will all get installed with pacman. the only exception is DOOM Emacs which will be installed later in the script.
~NOTE:~ The `-ask 4` option tells pacman that all questions regarding removing conflicting packages are automatically answered YES
@ -225,16 +204,15 @@ All packages listed are either in the standard Arch Repos, Repos provided by the
sudo pacman --needed --ask 4 -Syu - < pkglist.txt
# Now that pikaur is installed, we can sync the AUR and install some needed packages (Nerd Fonts) from there.
pikaur -Syu librewolf-bin
pikaur -Syu nerd-fonts-source-code-pro nerd-fonts-fira-code librewolf-bin
#+end_src
~NOTE:~ On Arco, SourceCodePro and Librewolf are in their repos, and will be installed from there instead of the AUR.
* Choosing Graphics Drivers
By Default, the script normally installed the Nvidia Drivers, due to me using a Nvidia GPU, but recently i've realised it would be a much better idea to allow the user to install the relevant drivers based on what they use (Intel HD/Iris/Xe Graphics, AMD Graphics, Nvidia Graphics) instead of just installing the Nvidia Drivers if they don't use a Nvidia card.
#+begin_src bash
PS3='Set Graphics Drivers:'
gpu=("intel" "nvidia-open", "nivdia" "amd" "quit")
select choice in "${gpu[@]}"; do
shells=("intel" "nvidia-open", "nivdia" "amd" "quit")
select choice in "${shells[@]}"; do
case $choice in
intel)
sudo pacman -S xf86-video-intel vulkan-intel intel-media-driver && \
@ -265,9 +243,7 @@ select choice in "${gpu[@]}"; do
;;
esac
done
echo "NOTE: Currently, the nvidia-open drivers have an issue where they do not work on systems with AMD APUs,
such as the Laptop Ryzen chips (C/U/H/HS/HX), or the Ryzen 2/3/4/5000 Series G Families of chips on the desktop,
please use the closed source drivers instead to make sure you have a working system."
echo "NOTE: Currently, the nvidia-open drivers have an issue where they do not work on systems with AMD APUs, such as the Laptop Ryzen chips (C/U/H/HS/HX), or the Ryzen 2/3/4/5000 Series G Families of chips on the desktop, please use the closed source drivers instead to make sure you have a working system."
#+end_src
* Copying over the configs from /etc/cbsh to $HOME
@ -306,57 +282,16 @@ sudo sed "8cSKEL=/etc/cbsh" useradd
#+end_src
* Emacs
I am currently in the process of making an Emacs configuration from scratch for CBSH,
we keep the DOOM setup so you still have a well known config to use should you not want to,
you can use either setup as i am using chemacs2 to manage them.
** Install Chemacs2
First, Lets install Chemacs2 as our main emacs "configuration", its actually a shim of sorts that allows you to use more than one emacs configuration,
in our case it allows both CBSHMacs (the Vanilla Emacs Config) and DOOM Emacs to run alongside each other.
#+begin_src bash
echo "###########################"
echo "## Setting Up Chemacs2.. ##"
echo "###########################"
# Backup any Emacs configuration you may have already
[ -d ~/.emacs.d ] && mv ~/.emacs.d ~/.emacs.d.bak.$(date +"%Y%m%d_%H%M%S")
[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.bak.$(date +"%Y%m%d_%H%M%S")
# then we clone Chemacs2
git clone https://github.com/plexus/chemacs2.git ~/.emacs.d
# then finally copy our emacs profiles over
cp /etc/cbsh/chemacs2/* ~/
echo "####################"
echo "## Chemacs2 Done! ##"
echo "####################"
#+end_src
** Install CBSHMacs
CBSHMacs is my Vanilla Emacs configuration being built from scratch with CBSH in mind, allowing me more control and flexibility to properly intergrate Emacs into CBSH.
One thing to note, CBSHMacs doesn't have a install command like DOOM, i'm looking into doing something like this in the future but for now,
Packages get installed on first load with CBSHMacs, CBSHMacs is a lot leaner than DOOM currently so shouldn't take too long for use-package to install everything.
#+begin_src bash
echo "#########################"
echo "## Installing CBSHMacs ##"
echo "#########################"
git clone https://gitlab.com/cbsh/cbsh-macs.git ~/.config/cbsh-macs
#+end_src
** Install DOOM Emacs
Now we install DOOM Emacs, this part will for sure take the longest, DOOM is pretty full featured and has a lot of packages it needs to download from ELPA/MELPA and then set itself up.
* Installing DOOM Emacs!
#+begin_src bash
echo "#########################################################"
echo "## Installing Doom Emacs. This may take a few minutes. ##"
echo "#########################################################"
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.config/doomemacs
~/.config/doomemacs/bin/doom install
~/.config/doomemacs/bin/doom sync
[ -d ~/.emacs.d ] && mv ~/.emacs.d ~/.emacs.d.bak.$(date +"%Y%m%d_%H%M%S")
[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.bak.$(date +"%Y%m%d_%H%M%S")
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install
~/.emacs.d/bin/doom sync
#+end_src
@ -391,6 +326,8 @@ echo "######################################################"
echo "## Disable previous login manager, if there is one. ##"
echo "######################################################"
sudo systemctl disable $(grep '/usr/s\?bin' /etc/systemd/system/display-manager.service | awk -F / '{print $NF}') || echo "Cannot Disable current Display Manager, or a Display Manager isn't already installed."
=======
sudo systemctl disable $(grep '/usr/s\?bin' /etc/systemd/system/display-manager.service | awk -F / '{print $NF}') || echo "Cannot Disable current Display Manager, or one is not installed."
# Then enable SDDM as the Login Manager
sudo systemctl enable sddm

47
cbsh
View File

@ -69,11 +69,13 @@ recieve_keys || err "Error Recieving PGP key $_pgpkey"
sudo pacman --needed --ask 4 -Syu - < pkglist.txt
# Now that pikaur is installed, we can sync the AUR and install some needed packages (Nerd Fonts) from there.
pikaur -Syu librewolf-bin
pikaur -Syu nerd-fonts-source-code-pro nerd-fonts-fira-code librewolf-bin
PS3='Set Graphics Drivers:'
gpu=("intel" "nvidia-open", "nivdia" "amd" "quit")
select choice in "${gpu[@]}"; do
PS3='NOTE: Currently, the nvidia-open drivers have an issue where they do not work on systems with AMD APUs, such as the Laptop Ryzen chips (C/U/H/HS/HX), or the Ryzen 2/3/4/5000 Series G Families of chips on the desktop, please use the closed source drivers instead to make sure you have a working system.
Set Graphics Drivers:'
shells=("intel" "nvidia-open", "nivdia" "amd" "quit")
select choice in "${shells[@]}"; do
case $choice in
intel)
sudo pacman -S xf86-video-intel vulkan-intel intel-media-driver && \
@ -104,9 +106,6 @@ select choice in "${gpu[@]}"; do
;;
esac
done
echo "NOTE: Currently, the nvidia-open drivers have an issue where they do not work on systems with AMD APUs,
such as the Laptop Ryzen chips (C/U/H/HS/HX), or the Ryzen 2/3/4/5000 Series G Families of chips on the desktop,
please use the closed source drivers instead to make sure you have a working system."
echo "#########################################################"
echo "## Copying the config files from /etc/cbsh into \$HOME ##"
@ -134,36 +133,14 @@ echo "#######################################################################"
cd /etc/default
sudo sed "8cSKEL=/etc/cbsh" useradd
echo "###########################"
echo "## Setting Up Chemacs2.. ##"
echo "###########################"
# Backup any Emacs configuration you may have already
[ -d ~/.emacs.d ] && mv ~/.emacs.d ~/.emacs.d.bak.$(date +"%Y%m%d_%H%M%S")
[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.bak.$(date +"%Y%m%d_%H%M%S")
# then we clone Chemacs2
git clone https://github.com/plexus/chemacs2.git ~/.emacs.d
# then finally copy our emacs profiles over
cp /etc/cbsh/chemacs2/* ~/
echo "####################"
echo "## Chemacs2 Done! ##"
echo "####################"
echo "#########################"
echo "## Installing CBSHMacs ##"
echo "#########################"
git clone https://gitlab.com/cbsh/cbsh-macs.git ~/.config/cbsh-macs
echo "#########################################################"
echo "## Installing Doom Emacs. This may take a few minutes. ##"
echo "#########################################################"
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.config/doomemacs
~/.config/doomemacs/bin/doom install
~/.config/doomemacs/bin/doom sync
[ -d ~/.emacs.d ] && mv ~/.emacs.d ~/.emacs.d.bak.$(date +"%Y%m%d_%H%M%S")
[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.bak.$(date +"%Y%m%d_%H%M%S")
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install
~/.emacs.d/bin/doom sync
PS3='Set default USER shell (enter number): '
shells=("fish" "zsh" "bash" "quit")
@ -190,6 +167,8 @@ echo "######################################################"
echo "## Disable previous login manager, if there is one. ##"
echo "######################################################"
sudo systemctl disable $(grep '/usr/s\?bin' /etc/systemd/system/display-manager.service | awk -F / '{print $NF}') || echo "Cannot Disable current Display Manager, or a Display Manager isn't already installed."
=======
sudo systemctl disable $(grep '/usr/s\?bin' /etc/systemd/system/display-manager.service | awk -F / '{print $NF}') || echo "Cannot Disable current Display Manager, or one is not installed."
# Then enable SDDM as the Login Manager
sudo systemctl enable sddm

View File

@ -1,3 +1,4 @@
alacritty
pikaur
base-devel
bash
@ -6,6 +7,7 @@ flameshot
easyeffects
kdeconnect
playerctl
alacritty-cbsh
dmenu-cbsh
dmenu-scripts
cbsh-sddm-theme
@ -31,14 +33,12 @@ mpv
networkmanager
network-manager-applet
pacman-contrib
nemo
pcmanfm
picom
qt5ct
ripgrep
sddm
starship
ttf-sourcecodepro-nerd
ttf-firacode-nerd
ttf-font-awesome
ttf-ubuntu-font-family
xdg-user-dirs