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
|
git zip # storage
|
||||||
bc xxd # data processing
|
bc xxd # data processing
|
||||||
gnupg pass pass-otp pwgen # crypt
|
gnupg pass pass-otp pwgen # crypt
|
||||||
imv mpv imagemagick gimp # media
|
imv mpv ffmpeg imagemagick gimp # media
|
||||||
aichat libqalculate translate-shell # utils
|
aichat libqalculate translate-shell # utils
|
||||||
libreoffice-still # docs
|
libreoffice-still # docs
|
||||||
|
|
||||||
qutebrowser qt6-wayland # web browsing
|
qutebrowser qt6-wayland # web browsing
|
||||||
hugo miniserve # web utils
|
hugo miniserve # web utils
|
||||||
neomutt telegram-desktop # communication
|
neomutt telegram-desktop # communication
|
||||||
|
transmission-cli # torrents
|
||||||
|
|
||||||
greetd sway swaybg swayidle # desktop basic
|
greetd sway swaybg swayidle # desktop basic
|
||||||
alacritty wmenu i3blocks mako libnotify # terminals, ui
|
alacritty wmenu i3blocks mako libnotify # terminals, ui
|
||||||
|
|||||||
@@ -1,14 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
session_ts="$(date +%s)"
|
||||||
role="$1"
|
role="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
session_ts="$(date +%s)"
|
work() {
|
||||||
|
aichat --save-session --session "$session_ts" --role "$role" "$*"
|
||||||
|
}
|
||||||
|
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
aichat --save-session --session "$session_ts" --role "$role" "$@"
|
work "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -e -r -p "> " input
|
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
|
done
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
sudo rm -rf /tmp/archiso-work /tmp/archiso-out
|
sudo rm -rf /tmp/archiso-work /tmp/archiso-out
|
||||||
cd ~/know/archiso
|
cd ~/dev
|
||||||
sudo mkarchiso -v -w /tmp/archiso-work -o /tmp/archiso-out "profile-$1"
|
sudo mkarchiso -v -w /tmp/archiso-work -o /tmp/archiso-out ~/dev/archiso-"$1"
|
||||||
iso=(/tmp/archiso-out/*)
|
iso=(/tmp/archiso-out/*)
|
||||||
sudo dd if="$iso" of="$2" status=progress bs=4M
|
sudo dd if="$iso" of="$2" status=progress bs=4M
|
||||||
sudo rm -rf /tmp/archiso-work /tmp/archiso-out
|
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/config.example.yaml
|
||||||
# see https://github.com/sigoden/aichat/blob/main/models.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:
|
clients:
|
||||||
|
|
||||||
- type: openai-compatible
|
- type: openai-compatible
|
||||||
@@ -9,32 +13,22 @@ clients:
|
|||||||
api_key: {{ .user.AI_OPENROUTER_KEY }}
|
api_key: {{ .user.AI_OPENROUTER_KEY }}
|
||||||
models:
|
models:
|
||||||
|
|
||||||
- name: anthropic/claude-sonnet-4.5
|
- name: anthropic/claude-sonnet-4.6
|
||||||
max_input_tokens: 350000
|
max_input_tokens: 1000000
|
||||||
max_output_tokens: 65000
|
max_output_tokens: 65000
|
||||||
require_max_tokens: true
|
|
||||||
input_price: 3
|
input_price: 3
|
||||||
output_price: 15
|
output_price: 15
|
||||||
supports_vision: true
|
|
||||||
supports_function_calling: true
|
|
||||||
patch:
|
patch:
|
||||||
body:
|
body:
|
||||||
reasoning:
|
reasoning:
|
||||||
effort: high
|
effort: high
|
||||||
|
|
||||||
- name: deepseek/deepseek-v3.2-exp
|
- name: deepseek/deepseek-v3.2
|
||||||
max_input_tokens: 163840
|
max_input_tokens: 163840
|
||||||
input_price: 0.20
|
max_output_tokens: 65000
|
||||||
|
input_price: 0.25
|
||||||
output_price: 0.40
|
output_price: 0.40
|
||||||
patch:
|
patch:
|
||||||
body:
|
body:
|
||||||
reasoning:
|
reasoning:
|
||||||
effort: high
|
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]
|
[bell]
|
||||||
animation = "EaseOutExpo"
|
animation = "EaseOutExpo"
|
||||||
duration = 0
|
duration = 0
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
shopt -s autocd
|
shopt -s autocd
|
||||||
|
|
||||||
stty intr ^K
|
stty intr ^N
|
||||||
|
|
||||||
alias ssh='wssh'
|
alias ssh='wssh'
|
||||||
alias sudo='wsudo'
|
alias sudo='wsudo'
|
||||||
@@ -13,16 +13,20 @@ alias ls='ls --color=auto'
|
|||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias node='NODE_NO_READLINE=1 rlwrap node'
|
alias node='NODE_NO_READLINE=1 rlwrap node'
|
||||||
|
|
||||||
alias d='cd ~/dev'
|
alias d='~/dev'
|
||||||
alias k='cd ~/know'
|
alias k='~/know'
|
||||||
alias t='cd ~/tmp'
|
alias t='~/tmp'
|
||||||
alias l='cd ~/lfs'
|
alias l='~/lfs'
|
||||||
|
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
|
export PAGER=less
|
||||||
|
|
||||||
export FZF_COMPLETION_TRIGGER='*'
|
export FZF_COMPLETION_TRIGGER='*'
|
||||||
eval "$(fzf --bash)"
|
eval "$(fzf --bash)"
|
||||||
|
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||||
|
|
||||||
PS0+='\e]133;C\e\\'
|
PS0+='\e]133;C\e\\'
|
||||||
command_done() {
|
command_done() {
|
||||||
printf '\e]133;D\e\\'
|
printf '\e]133;D\e\\'
|
||||||
|
|||||||
@@ -3,5 +3,3 @@ unset SSH_AGENT_PID
|
|||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
fi
|
fi
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
pinentry-program ~/.local/bin/menu/pinentry.sh
|
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-b":backward-char
|
||||||
"\C-f":forward-char
|
"\C-f":forward-char
|
||||||
"\eb":backward-word
|
"\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
|
# n -> h
|
||||||
set keymap vi-insert
|
|
||||||
"\C-n":backward-delete-char
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"n":backward-char
|
"n": backward-char
|
||||||
"\C-n":backward-char
|
# e -> j
|
||||||
# e -> k (reverse swap)
|
|
||||||
set keymap vi-insert
|
|
||||||
"\C-e":"\C-j"
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"e":previous-history
|
"e": previous-history
|
||||||
"\C-e":kill-line
|
# i -> k
|
||||||
# i -> j (reverse swap)
|
|
||||||
#set keymap vi-insert
|
|
||||||
# "\C-i":accept-line # ascii code conflicts with tab
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"i":next-history
|
"i": next-history
|
||||||
# "\C-i":accept-line # ascii code conflicts with tab
|
|
||||||
# o -> l
|
# o -> l
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"o":forward-char
|
"o": forward-char
|
||||||
"\C-o":clear-screen
|
|
||||||
|
|
||||||
# k -> n
|
# k -> n
|
||||||
#set keymap vi-insert
|
|
||||||
#"\C-k":menu-complete # bound to intr, use tab
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"k":vi-search-again
|
"k": vi-search-again
|
||||||
"K":vi-search-again
|
|
||||||
"\C-k":next-history
|
|
||||||
# j -> e
|
# j -> e
|
||||||
set keymap vi-insert
|
|
||||||
"\C-j":self-insert
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"j":vi-end-word
|
"j": vi-end-word
|
||||||
"J":vi-end-word
|
|
||||||
# l -> i
|
# l -> i
|
||||||
set keymap vi-insert
|
|
||||||
"\C-l":complete
|
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"l":vi-insertion-mode
|
"l": vi-insertion-mode
|
||||||
"L":vi-insert-beg
|
|
||||||
# h -> o
|
# h -> o
|
||||||
set keymap vi-insert
|
|
||||||
"\C-h":operate-and-get-next
|
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ bar {
|
|||||||
###########################################
|
###########################################
|
||||||
|
|
||||||
################ inputs ####################
|
################ inputs ####################
|
||||||
|
mouse_warping container
|
||||||
input "type:keyboard" {
|
input "type:keyboard" {
|
||||||
xkb_layout us(yurmak),ru(yurmak)
|
xkb_layout us(yurmak),ru(yurmak)
|
||||||
repeat_rate 50
|
repeat_rate 50
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ autocmd VimEnter * highlight SignColumn ctermbg=none
|
|||||||
highlight Title term=bold ctermfg=4 gui=bold
|
highlight Title term=bold ctermfg=4 gui=bold
|
||||||
highlight Special term=bold ctermfg=4
|
highlight Special term=bold ctermfg=4
|
||||||
highlight PreProc term=underline 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)
|
" fg blue (4 or 12) -> magenta (5)
|
||||||
highlight SpecialKey term=bold ctermfg=5
|
highlight SpecialKey term=bold ctermfg=5
|
||||||
highlight Directory 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 DiffDelete term=bold ctermfg=5 ctermbg=14 gui=bold
|
||||||
highlight Changed ctermfg=5
|
highlight Changed ctermfg=5
|
||||||
" bg
|
" 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 ###############
|
"############## file-specific ###############
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[ -f ~/.bashrc ] && . ~/.bashrc
|
[ -f ~/.bashrc ] && . ~/.bashrc
|
||||||
stty intr ^K
|
stty intr ^N
|
||||||
alias ssh='wssh'
|
alias ssh='wssh'
|
||||||
alias sudo='wsudo'
|
alias sudo='wsudo'
|
||||||
su() {
|
su() {
|
||||||
|
|||||||
Reference in New Issue
Block a user