Compare commits

..

9 Commits

Author SHA1 Message Date
c28e440154 wip 2026-03-09 20:25:54 +00:00
870795b81f wip 2026-03-01 18:09:50 +00:00
d85bc01fc0 wip 2026-03-01 17:11:29 +00:00
0329c60330 wip 2026-02-15 21:57:26 +00:00
70dd3cd2f9 wip 2026-02-15 21:24:50 +00:00
0cfa0e8d9f wip 2026-02-01 18:54:42 +00:00
7be8e842db wip 2026-01-25 23:18:10 +00:00
e8e7803e9e wip 2026-01-25 22:50:28 +00:00
00917f86c0 wip 2026-01-25 22:46:30 +00:00
17 changed files with 78 additions and 178 deletions

View File

@@ -20,13 +20,14 @@ PACKAGES=(
git zip # storage
bc xxd # data processing
gnupg pass pass-otp pwgen # crypt
imv mpv imagemagick gimp # media
imv mpv ffmpeg imagemagick gimp # media
aichat libqalculate translate-shell # utils
libreoffice-still # docs
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

View File

@@ -1,14 +1,21 @@
#!/bin/bash
session_ts="$(date +%s)"
role="$1"
shift
session_ts="$(date +%s)"
work() {
aichat --save-session --session "$session_ts" --role "$role" "$*"
}
if [ -n "$1" ]; then
aichat --save-session --session "$session_ts" --role "$role" "$@"
work "$@"
fi
while true; do
read -e -r -p "> " input
aichat --save-session --session "$session_ts" --role "$role" "$input"
if [ -z "$input" ]; then
input="$(rlwrap cat)"
fi
work "$input"
done

View File

@@ -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

View File

@@ -1,109 +0,0 @@
#!/bin/bash
set -e
source ~/.config/workspace.conf
key_vol_path="/dev/disk/by-uuid/$BACKUP_KEY_VOL_UUID"
data_vol_path="/dev/disk/by-uuid/$BACKUP_DATA_VOL_UUID"
data_mnt=
remote_open() {
data_mapper_name="$(lsblk "$data_vol_path" -no name --raw | awk 'NR==2')"
key_mnt="$(lsblk "$key_vol_path" -no mountpoint)"
if [ -z "$data_mapper_name" ]; then
echo unlocking data luks vol..
if [ -z "$key_mnt" ]; then
echo mounting key vol..
udisksctl mount -b "$key_vol_path"
key_mnt="$(lsblk "$key_vol_path" -no mountpoint)"
fi
echo decrypting key..
gpg --batch --yes --output /tmp/backup-keyfile --decrypt "$key_mnt/keyfile.gpg"
udisksctl unlock -b "$data_vol_path" --key-file /tmp/backup-keyfile
data_mapper_name="$(lsblk "$data_vol_path" -no name --raw | awk 'NR==2')"
echo unlock ok, doing key cleanup
fi
rm -f /tmp/backup-keyfile
[ -n "$key_mnt" ] && udisksctl unmount -b "$key_vol_path"
data_mnt="$(lsblk "/dev/mapper/$data_mapper_name" -no mountpoint)"
if [ -z "$data_mnt" ]; then
echo mounting data vol..
udisksctl mount -b "/dev/mapper/$data_mapper_name"
data_mnt="$(lsblk "/dev/mapper/$data_mapper_name" -no mountpoint)"
fi
echo open done
}
remote_close() {
data_mapper_name="$(lsblk "$data_vol_path" -no name --raw | awk 'NR==2')"
if [ -n "$data_mapper_name" ]; then
echo unmounting data vol..
udisksctl unmount -b "/dev/mapper/$data_mapper_name"
fi
udisksctl lock -b "$data_vol_path" # must be open here (fail if not)
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)
}
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

View File

@@ -0,0 +1,21 @@
#!/bin/bash
if [ $# -ne 3 ]; then
echo "Usage: $0 <video_file> <subtitle_file> <output_file>"
exit 1
fi
if [ ! -f "$1" ]; then
echo "Error: Video file '$1' not found"
exit 1
fi
if [ ! -f "$2" ]; then
echo "Error: Subtitle file '$2' not found"
exit 1
fi
ext="${3##*.}"
if [ "$ext" = "mp4" ]; then
ffmpeg -i "$1" -i "$2" -c copy -c:s mov_text "$3"
else
ffmpeg -i "$1" -i "$2" -c copy "$3"
fi

View File

@@ -1,6 +1,10 @@
# see https://github.com/sigoden/aichat/blob/main/config.example.yaml
# see https://github.com/sigoden/aichat/blob/main/models.yaml
compress_threshold: 100000
summarize_prompt: 'Summarize the discussion in 5000 words or less to use as a prompt for future context.'
save_session: false
clients:
- type: openai-compatible
@@ -9,32 +13,22 @@ clients:
api_key: {{ .user.AI_OPENROUTER_KEY }}
models:
- name: anthropic/claude-sonnet-4.5
max_input_tokens: 350000
- name: anthropic/claude-sonnet-4.6
max_input_tokens: 1000000
max_output_tokens: 65000
require_max_tokens: true
input_price: 3
output_price: 15
supports_vision: true
supports_function_calling: true
patch:
body:
reasoning:
effort: high
- name: deepseek/deepseek-v3.2-exp
- name: deepseek/deepseek-v3.2
max_input_tokens: 163840
input_price: 0.20
max_output_tokens: 65000
input_price: 0.25
output_price: 0.40
patch:
body:
reasoning:
effort: high
- name: openai/gpt-4.1
max_input_tokens: 1047576
max_output_tokens: 32768
input_price: 2
output_price: 8
supports_vision: true
supports_function_calling: true

View File

@@ -1,3 +1,3 @@
---
model: openrouter:deepseek/deepseek-v3.2-exp
model: openrouter:deepseek/deepseek-v3.2
---

View File

@@ -1,3 +0,0 @@
---
model: openrouter:openai/gpt-4.1
---

View File

@@ -1,3 +1,3 @@
---
model: openrouter:anthropic/claude-sonnet-4.5
model: openrouter:anthropic/claude-sonnet-4.6
---

View File

@@ -1,3 +1,6 @@
[general]
live_config_reload = false
[bell]
animation = "EaseOutExpo"
duration = 0

View File

@@ -4,7 +4,7 @@
shopt -s autocd
stty intr ^K
stty intr ^N
alias ssh='wssh'
alias sudo='wsudo'
@@ -13,16 +13,20 @@ alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias node='NODE_NO_READLINE=1 rlwrap node'
alias d='cd ~/dev'
alias k='cd ~/know'
alias t='cd ~/tmp'
alias l='cd ~/lfs'
alias d='~/dev'
alias k='~/know'
alias t='~/tmp'
alias l='~/lfs'
export EDITOR=vim
export PAGER=less
export FZF_COMPLETION_TRIGGER='*'
eval "$(fzf --bash)"
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
PS0+='\e]133;C\e\\'
command_done() {
printf '\e]133;D\e\\'

View File

@@ -3,5 +3,3 @@ unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null

View File

@@ -1 +1,3 @@
pinentry-program ~/.local/bin/menu/pinentry.sh
default-cache-ttl 2419200
max-cache-ttl 2419200

View File

@@ -14,55 +14,35 @@ set keymap vi-insert
"\C-f":forward-char
"\eb":backward-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"
# 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
# i -> k
set keymap vi-command
"i": next-history
# "\C-i":accept-line # ascii code conflicts with tab
# o -> l
set keymap vi-command
"o": forward-char
"\C-o":clear-screen
# 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
# j -> e
set keymap vi-insert
"\C-j":self-insert
set keymap vi-command
"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
# h -> o
set keymap vi-insert
"\C-h":operate-and-get-next
#################################

View File

@@ -46,6 +46,7 @@ bar {
###########################################
################ inputs ####################
mouse_warping container
input "type:keyboard" {
xkb_layout us(yurmak),ru(yurmak)
repeat_rate 50

View File

@@ -58,7 +58,7 @@ autocmd VimEnter * highlight SignColumn ctermbg=none
highlight Title term=bold ctermfg=4 gui=bold
highlight Special term=bold ctermfg=4
highlight PreProc term=underline ctermfg=4
highlight Underlined term=underline cterm=underline ctermfg=4 gui=underline
highlight Underlined term=underline cterm=underline ctermfg=4
" fg blue (4 or 12) -> magenta (5)
highlight SpecialKey term=bold ctermfg=5
highlight Directory term=bold ctermfg=5
@@ -70,7 +70,8 @@ highlight NonText term=bold ctermfg=5 gui=bold
highlight DiffDelete term=bold ctermfg=5 ctermbg=14 gui=bold
highlight Changed ctermfg=5
" bg
highlight SpellCap cterm=underline ctermfg=9 ctermbg=none gui=undercurl
highlight SpellBad term=bold ctermfg=0 ctermbg=9
highlight Search term=bold ctermfg=0 ctermbg=11
"###########################################
"############## file-specific ###############

View File

@@ -1,5 +1,5 @@
[ -f ~/.bashrc ] && . ~/.bashrc
stty intr ^K
stty intr ^N
alias ssh='wssh'
alias sudo='wsudo'
su() {