mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-08-27 20:36:26 -04:00
Change system+login shell to Dash, add zsh and configuration
This commit is contained in:
@@ -7,9 +7,10 @@ Some major/noteworthy differences from common configurations:
|
||||
- pipewire is used in place of pulseaudio
|
||||
- OpenRC is the chosen init system
|
||||
- EXT4 fast_commit mode is enabled by default
|
||||
- makepkg is configured for better than stock performance
|
||||
- a custom .bashrc with useful power management aliases is included
|
||||
- ...all of this and more on KDE Plasma (Wayland)
|
||||
- makepkg is configured for better than stock performance and uses more space-efficient compression
|
||||
- dash is used as the system and login shell
|
||||
- custom zshrc and bashrc files are included with useful system management aliases
|
||||
- ...all of this and more on KDE Plasma Wayland
|
||||
|
||||
# Usage
|
||||
Upon loading up the official Artix base ISO (tested on weekly base images only), logging in, connecting to the internet, and switching to the root user, run:
|
||||
|
||||
+19
-10
@@ -28,7 +28,7 @@ rc-update add NetworkManager
|
||||
# bootloader installation and configuration
|
||||
pacman -S grub efibootmgr os-prober mtools dosfstools --noconfirm
|
||||
if [ "$boot" == 1 ]; then
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB-rwinkhart --recheck
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB --recheck
|
||||
fi
|
||||
if [ "$boot" == 2 ]; then
|
||||
grub-install --target=i386-pc "$disk"
|
||||
@@ -63,19 +63,26 @@ permit nopass $username as root cmd /usr/bin/reboot
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/doas-completion -o /usr/share/bash-completion/completions/doas
|
||||
ln -s /usr/bin/doas /usr/bin/sudo
|
||||
|
||||
# misc. configuration
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/makepkg.conf -o /etc/makepkg.conf
|
||||
# shell configuration
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/shell-profile -o /home/"$username"/.profile
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/bashrc -o /home/"$username"/.bashrc
|
||||
chown "$username":"$users" /home/"$username"/.bashrc
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/zshrc -o /home/"$username"/.zshrc
|
||||
chown "$username":users /home/"$username"/{.profile,.bashrc,.zshrc}
|
||||
chsh -s /bin/dash "$username"
|
||||
ln -sfT dash /usr/bin/sh
|
||||
pacman -Sy zsh zsh-autosuggestions zsh-syntax-highlighting openrc-zsh-completions --noconfirm
|
||||
|
||||
# pacman configuration
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/pacman.conf -o /etc/pacman.conf
|
||||
pacman -Sy yay pacman-contrib --noconfirm
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/makepkg.conf -o /etc/makepkg.conf
|
||||
pacman -S pacman-contrib --noconfirm
|
||||
mkdir -p /etc/pacman.d/hooks
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/paccache-clean-hook -o /etc/pacman.d/hooks/paccache-clean.hook
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/modemmanager-hook -o /etc/pacman.d/hooks/modemmanager.hook
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/paccache-clean.hook -o /etc/pacman.d/hooks/paccache-clean.hook
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/modemmanager.hook -o /etc/pacman.d/hooks/modemmanager.hook
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/dash-link.hook -o /etc/pacman.d/hooks/dash-link.hook
|
||||
if [ "$gpu" == 'NVIDIA' ]; then
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/nvidia-hook -o /etc/pacman.d/hooks/nvidia.hook
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/nvidia.hook -o /etc/pacman.d/hooks/nvidia.hook
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/nvidia-lts.hook -o /etc/pacman.d/hooks/nvidia-lts.hook
|
||||
fi
|
||||
|
||||
# installing hardware-specific packages
|
||||
@@ -123,10 +130,12 @@ chmod 755 /home/"$username"/{.config,.local/share}
|
||||
if [ "$formfactor" == 1 ] || [ "$formfactor" == 2 ] || [ "$formfactor" == 3 ]; then
|
||||
pacman -S plasma-desktop plasma-wayland-session plasma-wayland-protocols kscreen kwallet-pam kdeplasma-addons spectacle gwenview plasma-nm plasma-pa breeze-gtk kde-gtk-config kio-extras khotkeys kwalletmanager yakuake ark kate bluedevil dolphin qt5-imageformats pipewire pipewire-pulse pipewire-jack pipewire-alsa wireplumber wayland-protocols polkit micro bluez-openrc --needed --noconfirm
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/pam-login -o /etc/pam.d/login
|
||||
echo -e "if [ -z \$DISPLAY ] && [ "\$\(tty\)" = "/dev/tty1" ]; then exec dbus-run-session startplasma-wayland; fi" >> /home/"$username"/.bash_profile
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/konsolerc -o /home/"$username"/.config/konsolerc
|
||||
chmod 755 /home/"$username"/.config/konsolerc
|
||||
chown "$username":users /home/"$username"/.config/konsolerc
|
||||
fi
|
||||
|
||||
mkdir -p /home/"$username"/.config/autostart/
|
||||
mkdir /home/"$username"/.config/autostart
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/pipewire-start/pipewire.desktop -o /home/"$username"/.config/autostart/pipewire.desktop
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/powerset/powerset.sh -o /usr/local/bin/powerset.sh
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/pipewire-start/pipewire-start.sh -o /usr/local/bin/pipewire-start.sh
|
||||
|
||||
@@ -13,5 +13,6 @@ alias schedutil='doas /usr/local/bin/powerset.sh schedutil'
|
||||
alias ondemand='doas /usr/local/bin/powerset.sh ondemand'
|
||||
alias poweroff='doas /usr/bin/poweroff'
|
||||
alias reboot='doas /usr/bin/reboot'
|
||||
alias blank='/usr/local/bin/plasmablank.sh'
|
||||
|
||||
PS1='\[\e[36m\]\u\[\e[0m\]@\[\e[36m\]\h:\[\e[0m\]\W\[\e[36m\]|$\[\e[0m\] '
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Package
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = bash
|
||||
|
||||
[Action]
|
||||
Description = Re-pointing /bin/sh symlink to dash...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/ln -sfT dash /usr/bin/sh
|
||||
Depends = dash
|
||||
@@ -0,0 +1,5 @@
|
||||
[Desktop Entry]
|
||||
DefaultProfile=Custom.profile
|
||||
|
||||
[General]
|
||||
ConfigVersion=1
|
||||
@@ -1,11 +0,0 @@
|
||||
[Trigger]
|
||||
Operation=Install
|
||||
Operation=Upgrade
|
||||
Type=Package
|
||||
Target=modemmanager
|
||||
|
||||
[Action]
|
||||
Description=Re-disable ModemManager DBUS service after upgrade.
|
||||
When=PostTransaction
|
||||
NeedsTargets
|
||||
Exec=/bin/sh -c 'echo -e "[D-BUS Service]\nName=org.freedesktop.ModemManager1\nExec=/bin/false\nUser=root\nSystemdService=dbus-org.freedesktop.ModemManager1.service" > /usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service'
|
||||
@@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Operation=Install
|
||||
Operation=Upgrade
|
||||
Type=Package
|
||||
Target=modemmanager
|
||||
|
||||
[Action]
|
||||
Description=Re-disable ModemManager DBUS service after upgrade.
|
||||
When=PostTransaction
|
||||
NeedsTargets
|
||||
Exec=/bin/sh -c 'printf "[D-BUS Service]\nName=org.freedesktop.ModemManager1\nExec=/bin/false\nUser=root\nSystemdService=dbus-org.freedesktop.ModemManager1.service" > /usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service'
|
||||
Executable → Regular
-1
@@ -5,7 +5,6 @@ Operation=Remove
|
||||
Type=Package
|
||||
Target=nvidia-lts
|
||||
Target=linux-lts
|
||||
# Change the linux part above and in the Exec line if a different kernel is used
|
||||
|
||||
[Action]
|
||||
Description=Update Nvidia module in initcpio
|
||||
@@ -5,7 +5,6 @@ Operation=Remove
|
||||
Type=Package
|
||||
Target=nvidia
|
||||
Target=linux
|
||||
# Change the linux part above and in the Exec line if a different kernel is used
|
||||
|
||||
[Action]
|
||||
Description=Update Nvidia module in initcpio
|
||||
@@ -1,6 +1,4 @@
|
||||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
#!/bin/sh
|
||||
|
||||
# WAYLAND ENV
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
@@ -13,14 +11,11 @@ export XDG_STATE_HOME="$HOME"/.local/state
|
||||
export XDG_CACHE_HOME="$HOME"/.cache
|
||||
|
||||
# DOTFILE MANAGEMENT
|
||||
export HISTFILE="${XDG_STATE_HOME}"/bash/history
|
||||
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
||||
export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
|
||||
|
||||
export EDITOR=micro
|
||||
export BUILDDIR=/tmp/makepkg
|
||||
export HISTSIZE=10000
|
||||
export HISTFILESIZE=100000
|
||||
|
||||
if [ -z $DISPLAY ] && [ $(tty) = /dev/tty6 ]; then exec setterm --blank=force; exit; fi
|
||||
[ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ] && exec dbus-run-session startplasma-wayland
|
||||
@@ -0,0 +1,52 @@
|
||||
# Lines configured by zsh-newuser-install
|
||||
HISTFILE=~/.local/share/zsh/histfile
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
unsetopt beep
|
||||
bindkey -e
|
||||
# End of lines configured by zsh-newuser-install
|
||||
# The following lines were added by compinstall
|
||||
zstyle :compinstall filename '/home/cuan/.zshrc'
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
# End of lines added by compinstall
|
||||
# The following lines represent custom user configuration
|
||||
art_cat='%F{214}/\_,_/\
|
||||
\ 0 0 /%f'
|
||||
art_dog=' %F{222}/___/
|
||||
| 6.6 |%f'
|
||||
art_snail=' %F{114}|_/
|
||||
/o o\%f'
|
||||
art_bunny=' /_/
|
||||
|^.^|'
|
||||
art_jellyfish='%F{183}<===>
|
||||
//|\\%f'
|
||||
art_school=' %F{214}<°))>< %F{222}><(((.>
|
||||
%F{114}><(((°> %F{183}><((((°>%f'
|
||||
art_array=("$art_cat" "$art_dog" "$art_snail" "$art_bunny" "$art_jellyfish" "$art_school")
|
||||
print -Pr "$art_array[$((RANDOM%6+1))]"
|
||||
PS1='%F{cyan}%n%f@%F{cyan}%m:%f%1~%f%F{cyan}|%#%f '
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
bindkey '^[[H' beginning-of-line
|
||||
bindkey '^[[F' end-of-line
|
||||
bindkey '^[[3~' delete-char
|
||||
function yakuake_clear() {
|
||||
clear
|
||||
print -Pr "$art_array[$((RANDOM%6+1))]"
|
||||
print -Pn $PS1
|
||||
}
|
||||
zle -N zsh-redraw yakuake_clear
|
||||
bindkey "^L" zsh-redraw
|
||||
# End of lines representing custom user configuration
|
||||
# The following lines represent custom user aliases
|
||||
alias ls='ls --color=auto'
|
||||
alias orphans='doas pacman -Rcns $(pacman -Qqdt)'
|
||||
alias powersave='doas /usr/local/bin/powerset.sh powersave'
|
||||
alias performance='doas /usr/local/bin/powerset.sh performance'
|
||||
alias schedutil='doas /usr/local/bin/powerset.sh schedutil'
|
||||
alias ondemand='doas /usr/local/bin/powerset.sh ondemand'
|
||||
alias poweroff='doas /usr/bin/poweroff'
|
||||
alias reboot='doas /usr/bin/reboot'
|
||||
alias blank='/usr/local/bin/plasmablank.sh'
|
||||
# End of lines representing custom user aliases
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
loadkeys us
|
||||
echo ----------------------------------------------------------------------------------------------
|
||||
echo rwinkhart\'s artix install script
|
||||
echo last updated march 07, 2023
|
||||
echo last updated march 30, 2023
|
||||
echo ----------------------------------------------------------------------------------------------
|
||||
echo You will be asked some questions before installation.
|
||||
echo -e "----------------------------------------------------------------------------------------------\n"
|
||||
@@ -164,7 +164,7 @@ echo "$hostname" > /mnt/etc/hostname
|
||||
echo "hostname=\'"$hostname"\'" > /mnt/etc/conf.d/hostname
|
||||
|
||||
# installing base packages
|
||||
base_devel='db diffutils gc guile libisl libmpc perl autoconf automake bash binutils bison esysusers etmpfiles fakeroot file findutils flex gawk gcc gettext grep groff gzip libtool m4 make pacman pacman-contrib patch pkgconf python sed opendoas texinfo which bc udev'
|
||||
base_devel='db diffutils gc guile libisl libmpc perl autoconf automake bash dash binutils bison esysusers etmpfiles fakeroot file findutils flex gawk gcc gettext grep groff gzip libtool m4 make pacman pacman-contrib patch pkgconf python sed opendoas texinfo which bc udev'
|
||||
basestrap /mnt base $base_devel openrc elogind-openrc linux linux-firmware git micro man-db bash-completion
|
||||
|
||||
# exporting variables
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
/usr/bin/pipewire &
|
||||
/usr/bin/pipewire-pulse &
|
||||
/usr/bin/wireplumber
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
timeout 5s ydotoold &
|
||||
sleep 1
|
||||
ydotool key 1:1 1:0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
|
||||
doas /usr/local/bin/plasmablank-root.sh
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
for CPU in $(seq 0 $(($(nproc) - 1))); do
|
||||
echo $1 > /sys/devices/system/cpu/cpu"$CPU"/cpufreq/scaling_governor
|
||||
printf $1 > /sys/devices/system/cpu/cpu"$CPU"/cpufreq/scaling_governor
|
||||
cat /sys/devices/system/cpu/cpu"$CPU"/cpufreq/scaling_governor
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user