mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 04:58:41 +00:00 
			
		
		
		
	Refactored setup file
This commit is contained in:
		
							parent
							
								
									dc14ed2b53
								
							
						
					
					
						commit
						ca3e1d27c0
					
				
							
								
								
									
										67
									
								
								setup
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								setup
									
									
									
									
									
								
							| 
						 | 
					@ -9,7 +9,7 @@ git submodule update
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[ ! -d ~/git ]] && echo "Creating git directory in $HOME" && mkdir ~/git
 | 
					[[ ! -d ~/git ]] && echo "Creating git directory in $HOME" && mkdir ~/git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Wayland + Hyprland seems cool
 | 
					# Wayland + Hyprland is quite nice
 | 
				
			||||||
setup_hyprland_arch() {
 | 
					setup_hyprland_arch() {
 | 
				
			||||||
    echo "Setting up Hyprland..."
 | 
					    echo "Setting up Hyprland..."
 | 
				
			||||||
    sudo pacman -S wayland hyprland waybar wofi dunst pipewire wireplumber xdg-desktop-portal-hyprland polkit-kde-agent qt5-wayland qt6-wayland
 | 
					    sudo pacman -S wayland hyprland waybar wofi dunst pipewire wireplumber xdg-desktop-portal-hyprland polkit-kde-agent qt5-wayland qt6-wayland
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,42 @@ setup_hyprland_arch() {
 | 
				
			||||||
    paru -S wdisplays
 | 
					    paru -S wdisplays
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# AwesomeWM (X11) - not a bad tiling WM
 | 
				
			||||||
 | 
					setup_awesomewm() {
 | 
				
			||||||
 | 
					    if [[ "$(cat /etc/os-release)" == *"Ubuntu"* ]]; then
 | 
				
			||||||
 | 
					        sudo apt install awesome
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        sudo pacman -S awesome
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# SDDM
 | 
				
			||||||
 | 
					# Uses Wayland is display server. Requires weston by default
 | 
				
			||||||
 | 
					setup_sddm() {
 | 
				
			||||||
 | 
					    echo "Installing SDDM"
 | 
				
			||||||
 | 
					    if [[ "$(cat /etc/os-release)" == *"Ubuntu"* ]]; then
 | 
				
			||||||
 | 
					        sudo apt install sddm weston
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        sudo pacman -S sddm weston
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    echo "Setting SDDM to use wayland"
 | 
				
			||||||
 | 
					    # Set sddm to use wayland
 | 
				
			||||||
 | 
					    sudo tee /etc/sddm.conf.d/10-wayland.conf <<SDDMWayland > /dev/null
 | 
				
			||||||
 | 
					[General]
 | 
				
			||||||
 | 
					DisplayServer=wayland
 | 
				
			||||||
 | 
					SDDMWayland
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# bspwm - it's okay
 | 
				
			||||||
 | 
					setup_bspwm() {
 | 
				
			||||||
 | 
					    if [[ "$(cat /etc/os-release)" == *"Ubuntu"* ]]; then
 | 
				
			||||||
 | 
					        echo "TODO: Figure out how to setup bspwm on Ubuntu"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        sudo pacman -S bspwm sxhkd polybar
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Setup paru
 | 
					# Setup paru
 | 
				
			||||||
setup_paru() {
 | 
					setup_paru() {
 | 
				
			||||||
| 
						 | 
					@ -37,6 +73,19 @@ setup_paru() {
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Intel specific setup
 | 
				
			||||||
 | 
					# TODO: Auto detect intel and run this
 | 
				
			||||||
 | 
					setup_intel() {
 | 
				
			||||||
 | 
					    echo "Setting up thermald for Intel"
 | 
				
			||||||
 | 
					    if [[ "$(cat /etc/os-release)" == *"Ubuntu"*  ]]; then
 | 
				
			||||||
 | 
					        sudo apt install thermald
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        sudo pacman -S thermald
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    sudo systemctl enable --now thermald
 | 
				
			||||||
 | 
					    sudo thermald --systemd
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ "$(cat /etc/os-release)" == *"Ubuntu"* ]]
 | 
					if [[ "$(cat /etc/os-release)" == *"Ubuntu"* ]]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
| 
						 | 
					@ -56,24 +105,19 @@ else
 | 
				
			||||||
    echo "Updating Arch"
 | 
					    echo "Updating Arch"
 | 
				
			||||||
    sudo pacman -Syyu
 | 
					    sudo pacman -Syyu
 | 
				
			||||||
    echo "Installing tools/utils"
 | 
					    echo "Installing tools/utils"
 | 
				
			||||||
    sudo pacman -S ripgrep fd neovim make stow tmux awesome dmenu arandr autorandr volumeicon picom nitrogen network-manager-applet lxsession thunar lxappearance-gtk3 power-profiles-daemon acpi arc-icon-theme playerctl bspwm sxhkd polybar xorg-xsetroot ttf-jetbrains-mono-nerd ttf-mononoki-nerd ttf-nerd-fonts-symbols-mono ttf-nerd-fonts-symbols ttf-nerd-fonts-symbols-common starship breeze breeze-gtk breeze-icons pass nushell neofetch man-db
 | 
					    sudo pacman -S ripgrep fd neovim make stow tmux dmenu arandr autorandr volumeicon picom nitrogen network-manager-applet lxsession thunar lxappearance-gtk3 power-profiles-daemon acpi arc-icon-theme playerctl xorg-xsetroot ttf-jetbrains-mono-nerd ttf-mononoki-nerd ttf-nerd-fonts-symbols-mono ttf-nerd-fonts-symbols ttf-nerd-fonts-symbols-common starship breeze breeze-gtk breeze-icons pass nushell neofetch man-db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sudo systemctl enable --now power-profiles-daemon
 | 
					    sudo systemctl enable --now power-profiles-daemon
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Intel only...
 | 
					 | 
				
			||||||
    # sudo pacman -S thermald
 | 
					 | 
				
			||||||
    # sudo systemctl enable --now thermald
 | 
					 | 
				
			||||||
    # sudo thermald --systemd
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    # Install paru
 | 
					    # Install paru
 | 
				
			||||||
    setup_paru
 | 
					    setup_paru
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Install wayland + hyprland
 | 
					    # Install wayland + hyprland
 | 
				
			||||||
    setup_hyprland_arch
 | 
					    setup_hyprland_arch
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # sudo powerprofilesctl set performance
 | 
					 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setup_sddm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# tmux plugin manager and theme
 | 
					# tmux plugin manager and theme
 | 
				
			||||||
if [[ ! -d ~/.tmux/plugins/tpm ]]; then
 | 
					if [[ ! -d ~/.tmux/plugins/tpm ]]; then
 | 
				
			||||||
| 
						 | 
					@ -111,5 +155,6 @@ add_to_file 'neofetch' "$HOME/.bashrc"
 | 
				
			||||||
add_to_file 'neofetch' "$HOME/.zshrc"
 | 
					add_to_file 'neofetch' "$HOME/.zshrc"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# I suppose we might as well just try setting up nvim
 | 
					# I suppose we might as well just try setting up nvim
 | 
				
			||||||
echo "Running PackerSync in neovim..."
 | 
					# I am commenting this out for now coz it's annoying
 | 
				
			||||||
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
 | 
					# echo "Running PackerSync in neovim..."
 | 
				
			||||||
 | 
					# nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue