Compare commits
9 Commits
dd079c4ef2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c28e440154 | |||
| 870795b81f | |||
| d85bc01fc0 | |||
| 0329c60330 | |||
| 70dd3cd2f9 | |||
| 0cfa0e8d9f | |||
| 7be8e842db | |||
| e8e7803e9e | |||
| 00917f86c0 |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
21
arch-user/bin/ffmpeg/add-subtitles.sh
Executable file
21
arch-user/bin/ffmpeg/add-subtitles.sh
Executable 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
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
model: openrouter:deepseek/deepseek-v3.2-exp
|
||||
model: openrouter:deepseek/deepseek-v3.2
|
||||
---
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
model: openrouter:openai/gpt-4.1
|
||||
---
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
model: openrouter:anthropic/claude-sonnet-4.5
|
||||
model: openrouter:anthropic/claude-sonnet-4.6
|
||||
---
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
[general]
|
||||
live_config_reload = false
|
||||
|
||||
[bell]
|
||||
animation = "EaseOutExpo"
|
||||
duration = 0
|
||||
|
||||
@@ -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\\'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
pinentry-program ~/.local/bin/menu/pinentry.sh
|
||||
default-cache-ttl 2419200
|
||||
max-cache-ttl 2419200
|
||||
|
||||
@@ -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
|
||||
|
||||
#################################
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ bar {
|
||||
###########################################
|
||||
|
||||
################ inputs ####################
|
||||
mouse_warping container
|
||||
input "type:keyboard" {
|
||||
xkb_layout us(yurmak),ru(yurmak)
|
||||
repeat_rate 50
|
||||
|
||||
@@ -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 ###############
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[ -f ~/.bashrc ] && . ~/.bashrc
|
||||
stty intr ^K
|
||||
stty intr ^N
|
||||
alias ssh='wssh'
|
||||
alias sudo='wsudo'
|
||||
su() {
|
||||
|
||||
Reference in New Issue
Block a user