first commit
This commit is contained in:
commit
5dc25a0a06
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# scripts
|
||||
|
||||
### Bash scripts for setting things up
|
||||
|
||||
- `nvim-install.sh` installs nvim and creates my config file for it
|
||||
- `alacritty-install.sh` installs alacritty, creates my config file and installs catpuccin frappe theme
|
||||
- `check-ip.sh` checks the public IP address linked to the domain name
|
||||
125
alacritty-install.sh
Executable file
125
alacritty-install.sh
Executable file
@ -0,0 +1,125 @@
|
||||
#!/bin/bash
|
||||
echo " "
|
||||
# Step 1: Install Alacritty using pacman
|
||||
sudo pacman -Sy --noconfirm alacritty
|
||||
echo "✅ Alacritty installed"
|
||||
|
||||
# Step 2: Create the Alacritty config directory
|
||||
mkdir -p ~/.config/alacritty
|
||||
echo "✅ Config directory created"
|
||||
|
||||
# Step 3: Write your custom alacritty.toml configuration
|
||||
cat <<EOF > ~/.config/alacritty/alacritty.toml
|
||||
[general]
|
||||
import = [
|
||||
"~/.config/alacritty/themes/catppuccin_frappe.toml"
|
||||
]
|
||||
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[window]
|
||||
padding.x = 10
|
||||
padding.y = 10
|
||||
dimensions.columns = 100
|
||||
dimensions.lines = 30
|
||||
|
||||
decorations = "Buttonless"
|
||||
|
||||
opacity = 0.95
|
||||
blur = true
|
||||
|
||||
option_as_alt = "Both"
|
||||
|
||||
[font]
|
||||
normal.family = "Adwaita Mono"
|
||||
|
||||
size = 13
|
||||
EOF
|
||||
echo "✅ Alacritty config written"
|
||||
|
||||
# Step 4. Create catpuccin theme
|
||||
mkdir -p ~/.config/alacritty/themes
|
||||
echo "✅ Themes directory created"
|
||||
|
||||
cat <<EOF > ~/.config/alacritty/themes/catppuccin_frappe.toml
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
background = '#303446' # base
|
||||
foreground = '#C6D0F5' # text
|
||||
# Bright and dim foreground colors
|
||||
dim_foreground = '#C6D0F5' # text
|
||||
bright_foreground = '#C6D0F5' # text
|
||||
|
||||
# Cursor colors
|
||||
[colors.cursor]
|
||||
text = '#303446' # base
|
||||
cursor = '#F2D5CF' # rosewater
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
text = '#303446' # base
|
||||
cursor = '#BABBF1' # lavender
|
||||
|
||||
# Search colors
|
||||
[colors.search.matches]
|
||||
foreground = '#303446' # base
|
||||
background = '#A5ADCE' # subtext0
|
||||
[colors.search.focused_match]
|
||||
foreground = '#303446' # base
|
||||
background = '#A6D189' # green
|
||||
[colors.footer_bar]
|
||||
foreground = '#303446' # base
|
||||
background = '#A5ADCE' # subtext0
|
||||
|
||||
# Keyboard regex hints
|
||||
[colors.hints.start]
|
||||
foreground = '#303446' # base
|
||||
background = '#E5C890' # yellow
|
||||
[colors.hints.end]
|
||||
foreground = '#303446' # base
|
||||
background = '#A5ADCE' # subtext0
|
||||
|
||||
# Selection colors
|
||||
[colors.selection]
|
||||
text = '#303446' # base
|
||||
background = '#F2D5CF' # rosewater
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#51576D' # surface1
|
||||
red = '#E78284' # red
|
||||
green = '#A6D189' # green
|
||||
yellow = '#E5C890' # yellow
|
||||
blue = '#8CAAEE' # blue
|
||||
magenta = '#F4B8E4' # pink
|
||||
cyan = '#81C8BE' # teal
|
||||
white = '#B5BFE2' # subtext1
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#626880' # surface2
|
||||
red = '#E78284' # red
|
||||
green = '#A6D189' # green
|
||||
yellow = '#E5C890' # yellow
|
||||
blue = '#8CAAEE' # blue
|
||||
magenta = '#F4B8E4' # pink
|
||||
cyan = '#81C8BE' # teal
|
||||
white = '#A5ADCE' # subtext0
|
||||
|
||||
# Dim colors
|
||||
[colors.dim]
|
||||
black = '#51576D' # surface1
|
||||
red = '#E78284' # red
|
||||
green = '#A6D189' # green
|
||||
yellow = '#E5C890' # yellow
|
||||
blue = '#8CAAEE' # blue
|
||||
magenta = '#F4B8E4' # pink
|
||||
cyan = '#81C8BE' # teal
|
||||
white = '#B5BFE2' # subtext1
|
||||
EOF
|
||||
|
||||
echo "✅ Catpuccin Frappe theme config created"
|
||||
|
||||
# Step 5: Notify user of success
|
||||
echo " "
|
||||
echo "You can now open Alacritty with 'alacritty' command"
|
||||
19
check-ip.sh
Executable file
19
check-ip.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
URL="gitea.vlnko.com"
|
||||
IPADDR="31.210.220.6"
|
||||
|
||||
while true; do
|
||||
timestamp=$(date +"%H:%M:%S")
|
||||
|
||||
result=$(nslookup $URL | grep $IPADDR)
|
||||
|
||||
if [ -n "$result" ]; then
|
||||
echo "✔️ Запись обновилась."
|
||||
echo "$result"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf "\r🔃Проверил $IPADDR в $timestamp: Запись еще не обновилась."
|
||||
sleep 60
|
||||
done
|
||||
27
nvim-install.sh
Executable file
27
nvim-install.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Step 1: Install Neovim using pacman
|
||||
sudo pacman -Sy --noconfirm neovim
|
||||
echo "✅ Neovim installed"
|
||||
|
||||
# Step 2: Create the Neovim config directory
|
||||
mkdir -p ~/.config/nvim
|
||||
|
||||
# Step 3: Write your custom init.lua configuration
|
||||
cat <<EOF > ~/.config/nvim/init.lua
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=2")
|
||||
vim.cmd("set softtabstop=2")
|
||||
vim.cmd("set shiftwidth=2")
|
||||
vim.cmd("set number relativenumber")
|
||||
vim.cmd("highlight Normal guibg=transparent")
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
EOF
|
||||
echo "✅ Config written (~/.config/nvim/init.lua)"
|
||||
|
||||
# Step 4: Install clipboard manager
|
||||
sudo pacman -S wl-clipboard
|
||||
echo "✅ Clipboard manager installed"
|
||||
|
||||
# Step 4: Notify user of success
|
||||
echo "All done! You can now open Neovim with 'nvim' command"
|
||||
Loading…
Reference in New Issue
Block a user