Skip to content

Instantly share code, notes, and snippets.

@alanmugiwara
Created June 13, 2024 01:46
Show Gist options
  • Select an option

  • Save alanmugiwara/e9372e60872c76e57cea2bace937da0c to your computer and use it in GitHub Desktop.

Select an option

Save alanmugiwara/e9372e60872c76e57cea2bace937da0c to your computer and use it in GitHub Desktop.
#!/bin/bash
# Atualizar repositórios e pacotes
echo "Atualizando repositórios e pacotes..."
sudo pacman -Syu --noconfirm
# Instalar yay (se ainda não estiver instalado)
if ! command -v yay &> /dev/null
then
echo "Instalando yay..."
sudo pacman -S --needed --noconfirm base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
cd ..
rm -rf yay
fi
# Instalar Brave Browser
echo "Instalando Brave Browser..."
yay -S --noconfirm brave-bin
# Instalar Git
echo "Instalando Git..."
sudo pacman -S --noconfirm git
# Instalar Tortoise Git
echo "Instalando Tortoise Git..."
yay -S --noconfirm tortoisegit
# Instalar Golang
echo "Instalando Golang..."
sudo pacman -S --noconfirm go
# Instalar NodeJS
echo "Instalando NodeJS..."
sudo pacman -S --noconfirm nodejs npm
# Instalar Eclipse OpenJDK
echo "Instalando Eclipse OpenJDK..."
sudo pacman -S --noconfirm jdk-openjdk
# Instalar Visual Studio Code
echo "Instalando Visual Studio Code..."
yay -S --noconfirm visual-studio-code-bin
# Remover Firefox
echo "Removendo Firefox..."
sudo pacman -Rns --noconfirm firefox
# Instalar ferramentas para monitorar a temperatura da CPU
echo "Instalando lm_sensors e vcgencmd..."
sudo pacman -S --noconfirm lm_sensors
yay -S --noconfirm vcgencmd
# Configurar lm_sensors
echo "Configurando lm_sensors..."
sudo sensors-detect --auto
# Exibir temperatura da CPU (opcional)
echo "Temperatura atual da CPU:"
vcgencmd measure_temp
# Instalar OneDrive abraunegg
echo "Instalando OneDrive (abraunegg)..."
yay -S --noconfirm onedrive-abraunegg
# Configurar OneDrive abraunegg
echo "Configurando OneDrive..."
onedrive --synchronize
onedrive
# Criar serviço systemd para OneDrive
echo "Criando serviço systemd para OneDrive..."
mkdir -p ~/.config/systemd/user/
cat <<EOT > ~/.config/systemd/user/onedrive.service
[Unit]
Description=OneDrive Free Client
After=network-online.target
[Service]
ExecStart=/usr/bin/onedrive --monitor
Restart=on-failure
RestartSec=3
[Install]
WantedBy=default.target
EOT
# Ativar e iniciar o serviço systemd para OneDrive
echo "Ativando e iniciando o serviço systemd para OneDrive..."
systemctl --user enable onedrive
systemctl --user start onedrive
echo "Script concluído!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment