From 511afc41829d5626e9e9b84cbc3d4a7c14d63165 Mon Sep 17 00:00:00 2001 From: awy Date: Sun, 24 Nov 2024 13:29:56 +0300 Subject: upload --- rice.sh | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 rice.sh (limited to 'rice.sh') diff --git a/rice.sh b/rice.sh new file mode 100755 index 0000000..b183064 --- /dev/null +++ b/rice.sh @@ -0,0 +1,76 @@ +#!/bin/sh +set -e +WORKDIRECTORY=$PWD +PERMUSER=$(logname) + +if [ "$(id -u)" -ne 0 ] + then printf "The script has to be run as root.\n" + exit +fi + +DEPLIST="`sed -e 's/#.*$//' -e '/^$/d' dependencies.txt | tr '\n' ' '`" +pacman -Sy --noconfirm +pacman -S $DEPLIST --noconfirm + +usermod -aG seat,input,audio,video $PERMUSER +doas -u $PERMUSER cp -r "$WORKDIRECTORY"/.config /home/$PERMUSER +doas -u $PERMUSER cp -r "$WORKDIRECTORY"/.local /home/$PERMUSER +doas -u $PERMUSER cp -a "$WORKDIRECTORY"/.zprofile /home/$PERMUSER + +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.cache/lf +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.cache/zsh +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/themes +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/icons +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.local/share/fonts + +cd "$WORKDIRECTORY" || exit +doas -u $PERMUSER git clone https://github.com/awnrt/gruvbox-gtk-theme +doas -u $PERMUSER cp -r gruvbox-gtk-theme/Gruvbox-Dark /home/$PERMUSER/.local/share/themes +doas -u $PERMUSER cp -r gruvbox-gtk-theme/Gruvbox-Icons /home/$PERMUSER/.local/share/icons + +doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface gtk-theme "Gruvbox-Dark" +doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface icon-theme "Gruvbox-Icons" +doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu' +doas -u $PERMUSER dbus-launch gsettings set org.gnome.desktop.interface font-name "Sans 11" + +cd "$WORKDIRECTORY" || exit +doas -u $PERMUSER git clone https://github.com/zdharma-continuum/fast-syntax-highlighting +#doas -u $PERMUSER git clone https://github.com/Aloxaf/fzf-tab +mkdir -p /usr/share/zsh/plugins +cp -rf fast-syntax-highlighting /usr/share/zsh/plugins +#cp -rf fzf-tab /usr/share/zsh/plugins +git clone https://git.awy.one/dwl +cd dwl +make clean install +cd "$WORKDIRECTORY" +git clone https://git.awy.one/someblocks +make clean install +cd "$WORKDIRECTORY" +cd .. +rm -rf dwldots + +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.ssh +doas -u $PERMUSER mkdir -p /home/$PERMUSER/.gnupg +doas -u $PERMUSER touch /home/$PERMUSER/.gnupg/gpg-agent.conf + +cat <> /home/$PERMUSER/.gnupg/gpg-agent.conf +enable-ssh-support +pinentry-program /usr/bin/pinentry-qt +default-cache-ttl 34560000 +max-cache-ttl 34560000 +EOL + +chsh -s /bin/zsh $PERMUSER + +mkdir -p /root/.config/nvim +cat <> /root/.config/nvim/init.vim +set title +set clipboard+=unnamedplus +set relativenumber +colorscheme vim +EOL + +sed -i -e "/^#"Color"/s/^#//" /etc/pacman.conf +sed -i -e '/Color/a\ILoveCandy' /etc/pacman.conf + +echo "Your linux is riced!" -- cgit v1.2.3