Skip to content

Commit b89326a

Browse files
author
Tim Heinsohn
committed
packages, install scripts
1 parent 7a07d9f commit b89326a

File tree

12 files changed

+191
-39
lines changed

12 files changed

+191
-39
lines changed

.rubocop.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rubocop/rubocop.yml

aider/install

+23-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
#!/bin/bash
22

3-
pipx install aider-chat
4-
pipx runpip aider-chat install aider-chat[help,playwright]
5-
~.local/share/pipx/venvs/aider-chat/bin/python -m playwright install --with-deps chromium
6-
pipx inject aider-chat boto3
7-
pipx upgrade aider-chat
8-
pipx runpip aider-chat install --upgrade aider-chat[help,playwright]
3+
# NOTE: Aider only supports Python up to 3.13 by now due to distutils issue
4+
# <https://github.com/Aider-AI/aider/issues/1984>
95

6+
# Install Aider with uv
7+
echo "Installing aider-chat..."
8+
uv tool install --python python3.12 aider-chat
9+
10+
# Create virtual environment
11+
echo "Creating virtual environment..."
12+
uv venv --python python3.12 ~/.aider-venv
13+
14+
# Install additional dependencies
15+
echo "Installing dependencies..."
16+
source ~/.aider-venv/bin/activate
17+
uv pip install aider-chat[help,playwright] boto3
18+
deactivate
19+
20+
# Install Playwright browsers
21+
echo "Installing Playwright browsers..."
22+
~/.aider-venv/bin/python -m playwright install --with-deps chromium
23+
24+
# Verify installation
25+
echo "Verifying installation..."
26+
~/.local/bin/aider --version

aider/update

+50-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
#!/bin/bash
22

3-
pipx upgrade aider-chat
4-
pipx runpip aider-chat install --upgrade --upgrade-strategy only-if-needed aider-chat[help,playwright]
5-
pipx inject aider-chat boto3
3+
# Issue: <https://github.com/Aider-AI/aider/issues/1984>
4+
#!/bin/bash
5+
6+
# Update Aider using uv
7+
echo "Updating aider-chat..."
8+
uv tool install --python python3.12 --upgrade aider-chat
9+
10+
# Update dependencies in virtual environment
11+
if [ -d ~/.aider-venv ]; then
12+
echo "Updating dependencies..."
13+
source ~/.aider-venv/bin/activate
14+
uv pip install --upgrade aider-chat[help,playwright] boto3
15+
deactivate
16+
else
17+
echo "Virtual environment not found. Running full installation..."
18+
./aider/install
19+
exit 0
20+
fi
21+
22+
# Verify and update Playwright
23+
echo "Verifying Playwright installation..."
24+
if ~/.aider-venv/bin/python -c "import playwright; print('Playwright version:', playwright.__version__)"; then
25+
echo "Playwright is installed"
26+
27+
# Check if browsers are installed
28+
echo "Checking installed browsers..."
29+
if ~/.aider-venv/bin/python -m playwright install --dry-run chromium; then
30+
echo "Browsers are already installed"
31+
else
32+
echo "Attempting to install browsers..."
33+
if ~/.aider-venv/bin/python -m playwright install --with-deps chromium; then
34+
echo "Playwright browsers installed successfully"
35+
else
36+
echo "Warning: Could not install browsers automatically"
37+
echo "You may need to install system dependencies manually:"
38+
echo "For Arch Linux: sudo pacman -S --noconfirm libnsl nss nspr gtk3 libxss alsa-lib"
39+
echo "Then try running: ~/.aider-venv/bin/python -m playwright install chromium"
40+
fi
41+
fi
42+
else
43+
echo "Error: Playwright is not installed correctly"
44+
echo "Attempting to reinstall Playwright..."
45+
source ~/.aider-venv/bin/activate
46+
uv pip install --force-reinstall playwright
47+
deactivate
48+
fi
49+
50+
# Verify installation
51+
echo "Verifying installation..."
52+
~/.local/bin/aider --version

bin/packages

+7
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,10 @@ extra/zip
188188
Compressor/archiver for creating and modifying zipfiles
189189
extra/zsh-history-substring-search
190190
ZSH port of Fish history search (up arrow)
191+
aur/google-chrome
192+
aur/html2md
191193
aur/neovim-remote
194+
aur/nvm
192195
aur/pinentry-rofi
193196
aur/spotify
194197
aur/zsh-theme-powerlevel10k
@@ -206,6 +209,7 @@ extra/chromium
206209
extra/evolution
207210
extra/flameshot
208211
extra/gcompris-qt
212+
extra/github-cli
209213
extra/glab
210214
extra/gopass
211215
extra/htop
@@ -218,17 +222,20 @@ extra/pavucontrol
218222
extra/postgresql
219223
extra/pv
220224
extra/python-pipx
225+
extra/python-psycopg2
221226
extra/rclone
222227
extra/redis
223228
extra/repgrep
224229
extra/signal-desktop
225230
extra/speech-dispatcher
226231
extra/tealdeer
227232
extra/telegram-desktop
233+
extra/tflint
228234
extra/thunderbird
229235
extra/typescript-language-server
230236
extra/unzip
231237
extra/upower
238+
extra/uv
232239
extra/vice
233240
extra/vlc
234241
extra/xorg-xkill

bin/starter

+7-4
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@ npm install -g vscode-langservers-extracted &&
3030
npm install -g @microsoft/compose-language-service &&
3131

3232
# docker
33-
npm install -g dockerfile-language-server-nodejs
33+
npm install -g dockerfile-language-server-nodejs &&
3434

3535
# sentry spotlight
36-
npm install -g @spotlightjs/spotlight
36+
npm install -g @spotlightjs/spotlight &&
37+
38+
# terraform-ls
39+
./terraform-ls/install &&
3740

3841
# add user to wheel group to get sudo privileges granted, e. g. for journalctl
3942
# NOTE: requires "%wheel ALL=(ALL) ALL" in visudo
40-
sudo usermod -aG wheel $USER
43+
sudo usermod -aG wheel $USER &&
4144

4245
# add user to video group to allow adjusting brightness w/o sudo
43-
sudo usermod -aG video $USER
46+
sudo usermod -aG video $USER &&
4447

4548
# run acpi_listen after enabling this and press brightness keys on keyboard,
4649
# e.g. Fn+F5/F6

browser-use/install

+40-24
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
#!/bin/bash
22

3-
# Install system dependencies for Playwright
4-
echo "Installing system dependencies..."
5-
./playwright/install
6-
7-
# Create virtual environment
8-
echo "Creating virtual environment..."
9-
uv venv --python python3.12 ~/.browser-use-venv
3+
# # Install system dependencies for Playwright
4+
# echo "NOTE: ensure ~/dotfiles/playwright/install was successfull before contiuuing here"
5+
#
6+
# Create virtual environment if it doesn't exist
7+
if [ ! -d ~/.browser-use-venv ]; then
8+
echo "Creating virtual environment..."
9+
uv venv --python python3.12 ~/.browser-use-venv
10+
fi
1011

11-
# Install dependencies
12-
echo "Installing browser-use and dependencies..."
12+
# # Install dependencies
13+
# echo "Installing browser-use and dependencies..."
1314
source ~/.browser-use-venv/bin/activate
14-
15-
# Install main packages
16-
uv pip install browser-use
17-
uv pip install gradio fastapi uvicorn
18-
19-
20-
# Install Playwright
21-
uv pip install playwright
22-
23-
# Install browser dependencies
24-
echo "Installing Playwright browsers..."
25-
./playwright/install
15+
#
16+
# # Install main packages
17+
# uv pip install browser-use
18+
# uv pip install gradio fastapi uvicorn
19+
#
20+
# # Install Playwright
21+
# uv pip install playwright
2622

2723
# Install additional requirements
24+
sudo mkdir -p /opt/browser-use-webui
25+
sudo chown $USER:$USER /opt/browser-use-webui
26+
27+
git clone [email protected]:warmshao/browser-use-webui.git /opt/browser-use-webui
28+
cd /opt/browser-use-webui
2829
if [ -f requirements.txt ]; then
2930
echo "Installing additional requirements..."
3031
uv pip install -r requirements.txt
@@ -34,13 +35,28 @@ deactivate
3435

3536
# Verify installation
3637
echo "Verifying installation..."
37-
if ~/.browser-use-venv/bin/python -c "import browser_use_webui; print('browser-use-webui version:', browser_use_webui.__version__)"; then
38-
echo "Installation successful"
38+
if ~/.browser-use-venv/bin/python -c "import browser_use"; then
39+
echo "browser-use installed successfully"
40+
if ~/.browser-use-venv/bin/python -c "import gradio, fastapi, uvicorn"; then
41+
echo "Web UI dependencies installed successfully"
42+
else
43+
echo "Web UI dependencies installation failed"
44+
exit 1
45+
fi
3946
else
40-
echo "Installation failed"
47+
echo "browser-use installation failed"
4148
exit 1
4249
fi
4350

51+
# Create launcher script
52+
echo "Creating launcher script..."
53+
cat > ~/.browser-use-venv/bin/browser-use-webui << 'EOF'
54+
#!/bin/bash
55+
source ~/.browser-use-venv/bin/activate
56+
python /opt/browser-use-webui/webui.py "$@"
57+
EOF
58+
chmod +x ~/.browser-use-venv/bin/browser-use-webui
59+
4460
# Create symlink for easy access
4561
echo "Creating symlink..."
4662
ln -sf ~/.browser-use-venv/bin/browser-use-webui ~/.local/bin/browser-use-webui

i3/config

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ bindsym $mod+e exec --no-startup-id rofi -show emoji -modi emoji theme DarkBlue
9292
# password manager
9393
#bindsym $mod+p exec rofi-pass
9494
bindsym $mod+p exec --no-startup-id rofi-pass -theme DarkBlue --root $HOME/.password-store/inaudito-private:$HOME/ia.passwords/:$HOME/.password-store
95+
bindsym $mod+Shift+p exec --no-startup-id rofi-pass -theme DarkBlue --root $HOME/ia.passwords:/$HOME/.password-store/inaudito-private
9596

9697
# change focus
9798
bindsym $mod+h focus left

nvim/lua/lsp_setup.lua

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
5858
})
5959
lspconfig.dockerls.setup{}
6060

61+
lspconfig.terraformls.setup{}
62+
6163
vim.diagnostic.config({
6264
float = {
6365
show_header = true,

playwright/install

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
# <https://blog.nicoandres.dev/use-playwright-in-arch-linux/>
4+
# <https://github.com/microsoft/playwright/issues/2621#issuecomment-2083083392>
5+
sudo pacman -S --needed core/nss core/nspr extra/at-spi2-core extra/libcups extra/libdrm core/dbus extra/libxcb extra/libxkbcommon extra/at-spi2-core extra/libx11 extra/libxcomposite extra/libxdamage extra/libxext extra/libxfixes extra/libxrandr extra/mesa extra/pango extra/cairo extra/alsa-lib extra/xorg-server-xvfb
6+
yay -S icu66 enchant libffi7
7+
sudo pacman -S woff2 hyphen
8+
sudo ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3
9+
10+
yay -S libwebp
11+
sudo ln -s /usr/lib/libwebp.so.7 /usr/lib/libwebp.so.6
12+
13+
git clone https://github.com/festvox/flite.git /tmp/flite
14+
cd /tmp/flite
15+
./configure --enable-shared
16+
make
17+
make get_voices
18+
sudo cp build/x86_64-linux-gnu/lib/libflite.so.1 /usr/lib
19+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_grapheme_lang.so.1 /usr/lib
20+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_grapheme_lex.so.1 /usr/lib
21+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_indic_lang.so.1 /usr/lib
22+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_indic_lex.so.1 /usr/lib
23+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_time_awb.so.1 /usr/lib
24+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_us_awb.so.1 /usr/lib
25+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_us_kal.so.1 /usr/lib
26+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_us_kal16.so.1 /usr/lib
27+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_us_rms.so.1 /usr/lib
28+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmu_us_slt.so.1 /usr/lib
29+
sudo cp build/x86_64-linux-gnu/lib/libflite_cmulex.so.1 /usr/lib
30+
sudo cp build/x86_64-linux-gnu/lib/libflite_usenglish.so.1 /usr/lib
31+
32+
yay -S playwright
33+
34+
playwright install

rails/rails-new

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# A wrapper around `rails new` that works with RVM.
4+
#
5+
# Usage: ~/dotfiles/rails-new APP_PATH [options]
6+
if [ -z "$1" ]; then
7+
echo "Usage: $0 <app_name>"
8+
exit 1
9+
fi
10+
11+
# prepare RVM if RVM is installed
12+
if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
13+
# shellcheck disable=SC1091
14+
source "$HOME/.rvm/scripts/rvm"
15+
DESIRED_RUBY=$(rvm current | awk '{print $1}')
16+
rvm use "$DESIRED_RUBY"
17+
fi
18+
19+
# run rails new
20+
APP_NAME=$1
21+
shift # remove first argument (APP_NAME) from arguments
22+
rails new "$APP_NAME" "$@"

rails/template.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@
2424
gem "solargraph-rails"
2525
end
2626

27-
run "bundle install"
2827
generate "rspec:install"
2928
rake "db:create"
3029

3130
run "cp ~/dotfiles/rubocop/rubocop.yml .rubocop.yml"
32-
run "rubocop -A"
3331

3432
# Add documentation comments to core classes
3533
inject_into_file "app/controllers/application_controller.rb", before: "class ApplicationController < ActionController::Base" do
@@ -71,3 +69,4 @@
7169
RUBY
7270
end
7371

72+
run "rubocop -A"

zsh/zshrc

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ eval "$(sheldon source)" # sheldon
4848
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
4949
[[ -s "$HOME/.rvm/scripts/completion" ]] && source "$HOME/.rvm/scripts/completion"
5050

51+
# nvm
52+
[[ -s "/usr/share/nvm/init-nvm.sh" ]] && source "/usr/share/nvm/init-nvm.sh"
53+
5154
# history
5255
# see </usr/share/doc/zsh-history-substring-search/README.md>
5356
source $ZSH_PLUGINS/zsh-history-substring-search/zsh-history-substring-search.zsh

0 commit comments

Comments
 (0)