From 00917f86c048315d30306b4eab658ada91a485e4 Mon Sep 17 00:00:00 2001 From: Yuri Zamyatin Date: Sun, 25 Jan 2026 22:46:30 +0000 Subject: [PATCH] wip --- arch-root/bin/sync-agent.sh | 13 ++++ arch-root/install.sh | 1 + arch-user/bin/archiso/make.sh | 4 +- arch-user/bin/backup | 62 ++----------------- .../config/alacritty/alacritty.toml.tmpl | 3 + arch-user/config/bash/bashrc | 2 +- arch-user/config/readline/inputrc | 46 ++++---------- arch-user/config/sway/config.tmpl | 1 + 8 files changed, 39 insertions(+), 93 deletions(-) create mode 100644 arch-root/bin/sync-agent.sh diff --git a/arch-root/bin/sync-agent.sh b/arch-root/bin/sync-agent.sh new file mode 100644 index 0000000..64da669 --- /dev/null +++ b/arch-root/bin/sync-agent.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +key_vol_path="/dev/disk/by-uuid/$BACKUP_KEY_VOL_UUID" +data_vol_path="/dev/disk/by-uuid/$BACKUP_DATA_VOL_UUID" + +remote_open() { + +} + +remote_close() { + +} diff --git a/arch-root/install.sh b/arch-root/install.sh index 10198fd..4f17331 100755 --- a/arch-root/install.sh +++ b/arch-root/install.sh @@ -27,6 +27,7 @@ PACKAGES=( qutebrowser qt6-wayland # web browsing hugo miniserve # web utils neomutt telegram-desktop # communication + transmission-cli # torrents greetd sway swaybg swayidle # desktop basic alacritty wmenu i3blocks mako libnotify # terminals, ui diff --git a/arch-user/bin/archiso/make.sh b/arch-user/bin/archiso/make.sh index b3285ac..d701111 100755 --- a/arch-user/bin/archiso/make.sh +++ b/arch-user/bin/archiso/make.sh @@ -2,8 +2,8 @@ set -e sudo rm -rf /tmp/archiso-work /tmp/archiso-out -cd ~/know/archiso -sudo mkarchiso -v -w /tmp/archiso-work -o /tmp/archiso-out "profile-$1" +cd ~/dev +sudo mkarchiso -v -w /tmp/archiso-work -o /tmp/archiso-out ~/dev/archiso-"$1" iso=(/tmp/archiso-out/*) sudo dd if="$iso" of="$2" status=progress bs=4M sudo rm -rf /tmp/archiso-work /tmp/archiso-out diff --git a/arch-user/bin/backup b/arch-user/bin/backup index ea52c91..1e36536 100755 --- a/arch-user/bin/backup +++ b/arch-user/bin/backup @@ -43,67 +43,15 @@ remote_close() { echo close done } -declare -A repos -add_repos_local() { - while IFS= read -r -d $'\0'; do - repo_path="$REPLY" - [ ! -f "$repo_path/HEAD" ] && continue - repo_path="$(realpath "$(dirname "$repo_path")")" - repos["$repo_path"]=1 - done < <(find "$@" -type d -name .git -print0) +push_homedir() { + } -add_repos_remote() { - cd "$1" - while IFS= read -r -d $'\0'; do - repo_path="$REPLY" - [ ! -f "$repo_path/HEAD" ] && continue - repo_path="/$(dirname "$repo_path")" - [[ ! " $(groups) " == *" $(echo "$repo_path" | cut -d'/' -f3) "* ]] && continue - repos["$repo_path"]=1 - done < <(find "home" -type d -name '*.git' -print0 2>/dev/null) -} - -sync_one() { - local_path="$1" - remote_path="$2$1/$(basename "$1").git" - echo "$local_path <-> $remote_path" - remote_url="file:///$remote_path" - if [ ! -d "$local_path" ]; then - mkdir -p "$(dirname "$local_path")" - git clone "$remote_url" "$local_path" - else - cd "$local_path" - git add . - git diff-index --quiet HEAD || git commit -m autocommit || true - if [ ! -d "$remote_path" ]; then - mkdir -p "$(dirname "$remote_path")" - git clone --bare "file:///$1" "$remote_path" - else - git pull "$remote_url" - git push "$remote_url" - fi - fi -} - -sync_repos() { - for i in "${!repos[@]}"; do - sync_one "$i" "$1" - sync -f "$1" - done -} - -if [[ "$1" = "open" ]]; then - remote_open - exit 0 -fi - remote_open -add_repos_remote "$data_mnt" + for g in $(groups); do - [ -d "/home/$g/dev" ] && add_repos_local "/home/$g/dev" -maxdepth 2 - [ -d "/home/$g/know" ] && add_repos_local "/home/$g/know" -maxdepth 2 + done -sync_repos "$data_mnt" + remote_close echo ALL OK diff --git a/arch-user/config/alacritty/alacritty.toml.tmpl b/arch-user/config/alacritty/alacritty.toml.tmpl index a22a05d..a77134e 100644 --- a/arch-user/config/alacritty/alacritty.toml.tmpl +++ b/arch-user/config/alacritty/alacritty.toml.tmpl @@ -1,3 +1,6 @@ +[general] +live_config_reload = false + [bell] animation = "EaseOutExpo" duration = 0 diff --git a/arch-user/config/bash/bashrc b/arch-user/config/bash/bashrc index a461fe1..3f50247 100644 --- a/arch-user/config/bash/bashrc +++ b/arch-user/config/bash/bashrc @@ -4,7 +4,7 @@ shopt -s autocd -stty intr ^K +stty intr ^_ alias ssh='wssh' alias sudo='wsudo' diff --git a/arch-user/config/readline/inputrc b/arch-user/config/readline/inputrc index 1d60b63..23d7e91 100644 --- a/arch-user/config/readline/inputrc +++ b/arch-user/config/readline/inputrc @@ -13,56 +13,36 @@ set keymap vi-insert "\C-b":backward-char "\C-f":forward-char "\eb":backward-word -"\ef":forward-word +"\ef":forward-word +"\C-k": kill-line +"\C-u": unix-line-discard ################################# -##### remap - colemak-dh ####### +##### remap - colemak-dh ######## # n -> h -set keymap vi-insert -"\C-n":backward-delete-char set keymap vi-command -"n":backward-char -"\C-n":backward-char -# e -> k (reverse swap) -set keymap vi-insert -"\C-e":"\C-j" +"n": backward-char +# e -> j set keymap vi-command -"e":previous-history -"\C-e":kill-line -# i -> j (reverse swap) -#set keymap vi-insert -# "\C-i":accept-line # ascii code conflicts with tab +"e": previous-history +# i -> k set keymap vi-command -"i":next-history -# "\C-i":accept-line # ascii code conflicts with tab +"i": next-history # o -> l set keymap vi-command -"o":forward-char -"\C-o":clear-screen +"o": forward-char # k -> n -#set keymap vi-insert -#"\C-k":menu-complete # bound to intr, use tab set keymap vi-command -"k":vi-search-again -"K":vi-search-again -"\C-k":next-history +"k": vi-search-again # j -> e -set keymap vi-insert -"\C-j":self-insert set keymap vi-command -"j":vi-end-word -"J":vi-end-word +"j": vi-end-word # l -> i -set keymap vi-insert -"\C-l":complete set keymap vi-command -"l":vi-insertion-mode -"L":vi-insert-beg +"l": vi-insertion-mode # h -> o -set keymap vi-insert -"\C-h":operate-and-get-next ################################# diff --git a/arch-user/config/sway/config.tmpl b/arch-user/config/sway/config.tmpl index ca8fca2..6804303 100644 --- a/arch-user/config/sway/config.tmpl +++ b/arch-user/config/sway/config.tmpl @@ -46,6 +46,7 @@ bar { ########################################### ################ inputs #################### +mouse_warping container input "type:keyboard" { xkb_layout us(yurmak),ru(yurmak) repeat_rate 50