From 5dc25a0a06bd88ab2d16c06535d5a3ca12b9cab5 Mon Sep 17 00:00:00 2001 From: vlnko Date: Wed, 3 Dec 2025 11:31:33 +0300 Subject: [PATCH] first commit --- README.md | 7 +++ alacritty-install.sh | 125 +++++++++++++++++++++++++++++++++++++++++++ check-ip.sh | 19 +++++++ nvim-install.sh | 27 ++++++++++ 4 files changed, 178 insertions(+) create mode 100644 README.md create mode 100755 alacritty-install.sh create mode 100755 check-ip.sh create mode 100755 nvim-install.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..db9aa09 --- /dev/null +++ b/README.md @@ -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 diff --git a/alacritty-install.sh b/alacritty-install.sh new file mode 100755 index 0000000..63e5b14 --- /dev/null +++ b/alacritty-install.sh @@ -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 < ~/.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 < ~/.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" diff --git a/check-ip.sh b/check-ip.sh new file mode 100755 index 0000000..eca16d4 --- /dev/null +++ b/check-ip.sh @@ -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 diff --git a/nvim-install.sh b/nvim-install.sh new file mode 100755 index 0000000..19ece02 --- /dev/null +++ b/nvim-install.sh @@ -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 < ~/.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"