Compare commits

...

41 Commits

Author SHA1 Message Date
dd079c4ef2 pg 2026-01-03 21:55:47 +00:00
732cdffd25 packages 2025-11-04 14:00:17 +00:00
22c64e10a0 aliases 2025-11-04 00:24:15 +00:00
88302b9bca cliphist 2025-10-26 10:43:48 +00:00
7023046b63 fix 2025-10-26 03:37:58 +00:00
6fd661f286 fix 2025-10-26 03:16:52 +00:00
882a27b1cb colors 2025-10-26 02:41:07 +00:00
dd11cd9253 exec, colors 2025-10-26 02:28:38 +00:00
bfb053a4ef run.sh 2025-10-26 01:11:17 +00:00
6d5bb72149 calc migration 2025-10-26 00:39:16 +00:00
ee9d27147e run.sh add space for tab completion 2025-10-26 00:31:51 +00:00
f4dd706b6a bemenu -> wmenu 2025-10-26 00:11:49 +00:00
dc4de3e6b8 bemenu -> wmenu 2025-10-25 23:30:01 +00:00
67a6e5fa53 interval 2025-10-25 15:48:16 +00:00
20abc74f48 i3blocks 2025-10-25 14:18:56 +00:00
178608bb04 i3blocks scripts 2025-10-24 22:00:38 +00:00
d5dc5f651e merge 2025-10-24 20:54:54 +00:00
0a4c5c39f9 configs 2025-10-24 20:53:57 +00:00
533cafa56d configs 2025-10-21 18:36:09 +00:00
b1d63d0e67 Merge branch 'main' of git.yrz.am:yrzam/workspace 2025-10-16 17:54:44 +00:00
3778dc20fe fzf 2025-10-16 17:54:20 +00:00
38d44f03d3 minor structural improvements 2025-10-12 18:54:08 +00:00
ee1c79f088 formatting 2025-10-12 13:36:32 +00:00
4fc1f7cc6c fix 2025-10-06 00:13:04 +00:00
17079f021c use different separator for constitency 2025-10-05 20:15:36 +00:00
825ed5263c wssh 2025-10-05 19:42:36 +00:00
06660b992f configs 2025-10-04 14:54:06 +00:00
0ed437b0ea config 2025-10-02 23:02:02 +00:00
316a3ff9e4 uncommited 2025-10-02 07:46:48 +00:00
4b4d7a684c compat 2025-09-29 20:57:11 +00:00
b5a41d9ae0 wscompat 2025-09-29 20:39:27 +00:00
a833ef01eb uncommited 2025-09-29 12:23:34 +00:00
c9dbae4c0c movements 2025-09-28 23:49:17 +00:00
bc031c5bb8 fixes 2025-09-28 23:07:59 +00:00
3398c6b4ef revamp compat 2025-09-28 22:08:05 +00:00
6bf779a68e fixes 2025-09-26 05:08:39 +00:00
d8eae8a1a5 config 2025-09-22 22:19:32 +00:00
5c078feab5 configs 2025-09-21 23:19:49 +00:00
119632adfd fix 2025-09-18 06:06:04 +00:00
bf5a01b1e7 configs 2025-09-16 04:26:57 +00:00
5f827671f1 config 2025-09-15 18:52:54 +00:00
60 changed files with 744 additions and 764 deletions

View File

@@ -6,20 +6,22 @@ PACKAGES=(
linux base linux-firmware lvm2 sudo polkit # base
pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management
openssh sysstat htop screen man-db which rlwrap # system
openssh rsync strace sysstat htop screen man-db which dnsutils # system
nodejs dash jq # runtime
qemu-system-x86 # virt
postgresql #db
rlwrap fzf # shell helpers
vifm vim less # nav & edit
vim-ale vim-fugitive # vim plugins
just shellcheck # shell scripting
git zip # data processing
gnupg pass pass-otp # crypt
git zip # storage
bc xxd # data processing
gnupg pass pass-otp pwgen # crypt
imv mpv imagemagick gimp # media
aichat libqalculate translate-shell # utils
sqlitebrowser qt5-wayland # db
aichat libqalculate translate-shell # utils
libreoffice-still # docs
qutebrowser qt6-wayland # web browsing
@@ -27,8 +29,8 @@ PACKAGES=(
neomutt telegram-desktop # communication
greetd sway swaybg swayidle # desktop basic
foot bemenu-wayland i3blocks mako libnotify # terminals, ui
wev wl-clipboard wtype slurp grim # interaction
alacritty wmenu i3blocks mako libnotify # terminals, ui
wev wl-clipboard cliphist wtype slurp grim # interaction
ttf-roboto ttf-roboto-mono otf-font-awesome # fonts
kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes

View File

@@ -1,10 +1,14 @@
#!/bin/sh
#!/bin/bash
role="$1"
shift
session_ts="$(date +%s)"
if [ -n "$1" ]; then
aichat --role "$role" "$@"
else
aichat --role "$role" --session
aichat --save-session --session "$session_ts" --role "$role" "$@"
fi
while true; do
read -e -r -p "> " input
aichat --save-session --session "$session_ts" --role "$role" "$input"
done

View File

@@ -1,12 +0,0 @@
#!/bin/sh
shift
page="$1"
if [ -z "$page" ]; then
page="$(
man -k . | \
(bemenu --prompt "man" || exec ~/.local/bin/bemenu/run.sh) | \
sed ' s/\s\+\-.*//;s/ //g'
)"
fi
exec footclient --app-id="footclient_float" "$SHELL" -c "man '$page' || read -n1"

View File

@@ -1,20 +0,0 @@
#!/bin/bash
rl_full="$(cat "$HOME/.config/bemenu/"*.runlist)"
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
inp="$(echo "$rl" | bemenu --prompt ">")"
eval "inp_arr=($inp)"
exectr=float-sh-keep
while IFS= read -r line; do
if [[ "$inp" == "$line"* ]]; then
exectr="$(echo "$rl_full" | grep -F "$line" -m 1 | cut -d' ' -f1)"
fi
done <<< "$rl"
case "$exectr" in
exec) exec $inp;;
float-sh) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "($inp)";;
float-sh-keep) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "($inp); read -n1";;
*) exec bash "$HOME/.local/bin/bemenu/run-$exectr.sh" "${inp_arr[@]}";;
esac

View File

@@ -0,0 +1,101 @@
#!/usr/bin/env bash
# https://github.com/vivien/i3blocks-contrib/blob/master/bandwidth/bandwidth
# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>
# Copyright (C) 2014 kaueraal
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Get custom IN and OUT labels if provided by command line arguments
INLABEL="🠟 "
OUTLABEL="🠝 "
# Use the provided interface, otherwise the device used for the default route.
if [[ -z $INTERFACE ]] && [[ -n $BLOCK_INSTANCE ]]; then
INTERFACE=$BLOCK_INSTANCE
elif [[ -z $INTERFACE ]]; then
INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')
fi
# Exit if there is no default route
[[ -z "$INTERFACE" ]] && exit
# Issue #36 compliant.
if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || \
(! [ "$TREAT_UNKNOWN_AS_UP" = "1" ] &&
! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ])
then
echo "$INTERFACE down"
echo "$INTERFACE down"
echo "#FF0000"
exit 0
fi
# path to store the old results in
path="/tmp/$(basename $0)-${INTERFACE}"
# grabbing data for each adapter.
read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes"
read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes"
# get time
time="$(date +%s)"
# write current data if file does not exist. Do not exit, this will cause
# problems if this file is sourced instead of executed as another process.
if ! [[ -f "${path}" ]]; then
echo "${time} ${rx} ${tx}" > "${path}"
chmod 0666 "${path}"
fi
# read previous state and update data storage
read old < "${path}"
echo "${time} ${rx} ${tx}" > "${path}"
# parse old data and calc time passed
old=(${old//;/ })
time_diff=$(( $time - ${old[0]} ))
# sanity check: has a positive amount of time passed
[[ "${time_diff}" -gt 0 ]] || exit
# calc bytes transferred, and their rate in byte/s
rx_diff=$(( $rx - ${old[1]} ))
tx_diff=$(( $tx - ${old[2]} ))
rx_rate=$(( $rx_diff / $time_diff ))
tx_rate=$(( $tx_diff / $time_diff ))
# shift by 10 bytes to get KiB/s. If the value is larger than
# 1024^2 = 1048576, then display MiB/s instead
# incoming
echo -n "$INLABEL"
rx_kib=$(( $rx_rate >> 10 ))
if hash bc 2>/dev/null && [[ "$rx_rate" -gt 1048576 ]]; then
printf '%sM' "`echo "scale=1; $rx_kib / 1024" | bc`"
else
echo -n "${rx_kib}K"
fi
echo -n " "
# outgoing
echo -n "$OUTLABEL"
tx_kib=$(( $tx_rate >> 10 ))
if hash bc 2>/dev/null && [[ "$tx_rate" -gt 1048576 ]]; then
printf '%sM\n' "`echo "scale=1; $tx_kib / 1024" | bc`"
else
echo "${tx_kib}K"
fi

View File

@@ -10,5 +10,7 @@ if [ "$stat" = "1" ]; then
echo "🔌 $cap% ${w}W"
else
echo "🔋 $cap% ${w}W"
[ "$cap" -lt "15" ] && exit 33
if [ "$cap" -lt "15" ]; then
exit 33
fi
fi

View File

@@ -1,3 +0,0 @@
#!/bin/bash
curl "https://wttr.in/?format=%l;%t%20%p" --silent | sed 's/^\(.\{3\}\)\(.*\);/\1 /'
echo

View File

@@ -0,0 +1,2 @@
#!/bin/sh
eval "wmenu $WMENU_HOPTS \"$@\""

View File

@@ -1,4 +1,6 @@
#!/bin/bash -efu
# based on https://github.com/legionus/pinentry-bash/blob/master/pinentry-bash
### This file is covered by the GNU General Public License,
### which should be included with libshell as the file LICENSE.
### All copyright information are listed in the COPYING.
@@ -6,13 +8,13 @@
#exec 2>/tmp/pinentry.log
#set -x
############################### PATCH #################################
. ~/.config/menu/env.sh
#######################################################################
VERSION='1.0'
FLAVOR='bash'
############################### PATCH #################################
. ~/.config/bemenu/env.sh
#######################################################################
keyinfo=''
error=''
timeout=0
@@ -123,9 +125,8 @@ cmd_getpin()
output="$(
echo -n "|"
############################### PATCH #################################
bemenu \
--password indicator \
--prompt "${prompt:-$def_prompt}" \
~/.local/bin/menu/horizontal.sh \
-Pp "${prompt:-$def_prompt}" \
</dev/null | tr -d '\n'
ret=${PIPESTATUS[0]}
# yad \

View File

@@ -3,13 +3,13 @@
shift
query="$1"
if [ -z "$query" ]; then
query="$(echo "tui" | bemenu --prompt "qalc")"
query="$(echo "tui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
fi
if [ "$query" = "tui" ]; then
exec footclient --app-id="footclient_float" -D ~/ "qalc"
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "qalc"
elif [ -n "$query" ]; then
qalc_res="$(qalc --terse "$query")"
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
menu_res="$(echo -e "$qalc_res\ntui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
if [ "$qalc_res" = "$menu_res" ]; then
wl-copy "$qalc_res"
notify-send "$qalc_res" -a calc "Result copied to clipboard"

View File

@@ -0,0 +1,3 @@
#!/bin/bash
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c '"$@"; { echo "[exited with code $?]"; read -n1; }' -- "$@"

View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c '"$@"' -- "$@"

15
arch-user/bin/menu/run-man.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
shift
page="$1"
if [ -z "$page" ]; then
page="$(
apropos -s 1,5,8 . | \
~/.local/bin/menu/vertical.sh -p "man" | \
sed 's/ (\([^)]*\)).*/.\1/'
)"
if [ -z "$page" ]; then
exec ~/.local/bin/menu/run.sh
fi
fi
exec ~/.local/bin/menu/run-float-sh.sh "man" "$page"

View File

@@ -3,10 +3,10 @@ set -e
cd "$PASSWORD_STORE_DIR"
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
pw="$(echo "$pws" | bemenu --prompt "pass")"
pw="$(echo "$pws" | ~/.local/bin/menu/vertical.sh -p "pass")"
case "$2" in
info) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "pass $pw | vim -";;
info) ~/.local/bin/menu/run-float-sh.sh sh -c "pass $pw | vim -";;
otp) pass otp -c "$pw" && notify-send "$pw" -a pass "OTP copied to clipboard, clears in 45s";;
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
esac

View File

@@ -1,7 +1,7 @@
#!/bin/sh
sure() {
echo yes | bemenu --prompt "sure?" || exec ~/.local/bin/bemenu/run.sh
echo yes | ~/.local/bin/menu/horizontal.sh -p "sure?" || exec ~/.local/bin/menu/run.sh
}
case "$1" in

20
arch-user/bin/menu/run.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
rl_full="$(cat ~/.config/menu/*.runlist)"
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
inp="$(echo "$rl" | sed 's/$/ /' | ~/.local/bin/menu/vertical.sh -p ">")"
[ -z "$inp" ] && exit 0
eval "inp_arr=($inp)"
exectr=float-sh-keep
while IFS= read -r line; do
if [[ "$inp" == "$line"* ]]; then
exectr="$(echo "$rl_full" | grep -F "$line" -m 1 | cut -d' ' -f1)"
fi
done <<< "$rl"
case "$exectr" in
exec) exec $inp;;
*) bash "$HOME/.local/bin/menu/run-$exectr.sh" "${inp_arr[@]}" || notify-send "Executor error" -a run.sh "exec: $exectr\nargs: ${inp_arr[@]}\ncode: $?"
esac

4
arch-user/bin/menu/vertical.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
input=$(cat)
lines=$(echo "$input" | wc -l)
echo "$input" | eval "wmenu $WMENU_VOPTS -l $((lines < 50 ? lines : 50)) \"$@\""

16
arch-user/bin/postgres/start.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -eo pipefail
if [ "$1" != "foreground" ]; then
exec ~/.local/bin/screen/detach.sh postgres "$0" foreground
fi
version="$(pg_config --version | sed -n 's/^PostgreSQL \([0-9]*\).*/\1/p')"
export PGDATA=~/know/db/"$version"
mkdir -p "$PGDATA"
if [ ! -f "$PGDATA/postgresql.conf" ]; then
initdb
fi
postgres -c "unix_socket_directories=/run/user/$(id -u)" -c "listen_addresses=" -c "io_method=sync"

4
arch-user/bin/psql.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -e
psql -h "/run/user/$(id -u)" "$1"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
out="$(printf '' | bemenu --prompt ':sway')"
out="$(printf '' | ~/.local/bin/menu/horizontal.sh -p ':sway')"
eval "executor_args=($out)"
#shellcheck disable=SC2154
sway "${executor_args[@]}"

View File

@@ -0,0 +1,21 @@
#!/bin/bash
parent_has_sibl=$(swaymsg -t get_tree | jq '
def check_focused(parent; grandparent):
if .focused then
if grandparent and (grandparent.type == "con" or grandparent.type == "workspace") and (grandparent.nodes | length) > 1 then 1 else 0 end
else
. as $current |
((.nodes[]? | check_focused($current; parent)),
(.floating_nodes[]? | check_focused($current; parent)))
end;
first(check_focused(null; null) // 0)
')
#echo "$parent_has_sibl"
if [ "$parent_has_sibl" = 1 ]; then
swaymsg "focus parent; focus $1 sibling; focus child"
else
swaymsg "focus $1 sibling; focus child"
fi

View File

@@ -0,0 +1,7 @@
#!/bin/sh
item="$(cliphist list | ~/.local/bin/menu/vertical.sh -p paste)"
if [ -n "$item" ]; then
echo "$item" | cliphist decode | wl-copy
wtype -M ctrl v -m ctrl
fi

View File

@@ -0,0 +1,54 @@
get_windows_with_workspace() {
swaymsg -t get_tree | jq -r '
def calc_ws_name(ws_name):
if ws_name == "__i3_scratch" then "_"
elif (ws_name | test("^[0-9]+:")) then (ws_name | sub("^[0-9]+:"; ""))
else ws_name
end;
def get_windows(workspace_name):
if (.type == "con" or .type == "floating_con") and .pid != null and (.name // "") != "" then
{
id: .id,
name: .name | ascii_downcase,
app_id: (.app_id // .window_properties.class // "unknown") | ascii_downcase,
workspace: workspace_name,
focused: .focused
}
else empty end,
(.nodes[]? | get_windows(workspace_name)),
(.floating_nodes[]? | get_windows(workspace_name));
def traverse_all:
if .type == "workspace" then
. as $ws | (.name | calc_ws_name(.)) as $ws_name | get_windows($ws_name)
else empty end,
(.nodes[]? | traverse_all);
traverse_all |
"\(.id)|\(.app_id)|\(.name)|\(.workspace)|\(.focused)"
'
}
window_list=$(get_windows_with_workspace)
formatted_list=$(echo "$window_list" | while IFS='|' read -r id app_id name workspace focused; do
if [ "$focused" = "true" ]; then
indicator="> "
else
indicator=" "
fi
printf "%s%s%s %s %s\n" "$workspace" "$indicator" "$id" "$app_id" "$name"
done)
selection=$(echo "$formatted_list" | ~/.local/bin/menu/vertical.sh -p "/")
[ -z "$selection" ] && exit 0
window_id=$(echo "$selection" | sed -E 's/^...([0-9]+).*/\1/')
if [ -n "$window_id" ]; then
swaymsg "[con_id=\"$window_id\"] focus"
else
echo "Failed to extract window ID."
exit 1
fi

34
arch-user/bin/wssh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
set -e
if [ $# -lt 1 ]; then
echo "Usage: $0 <hostname> [ssh-options]"
exit 1
fi
if [[ "$*" == *" -- "* ]]; then
exec /bin/ssh "$@"
fi
[ -z "$WSCOMPAT_MASTER" ] && WSCOMPAT_MASTER="$(whoami)"
read -r -d '' init_cmd << WSCOMPAT_EOF_9oqn7IVF || true
export WS_IS_COMPAT=1
export WSCOMPAT_MASTER="$WSCOMPAT_MASTER"
export WSCOMPAT_DIR="/tmp/wscompat_${WSCOMPAT_MASTER}_\$(whoami)"
rm -rf "\$WSCOMPAT_DIR" && mkdir -p "\$WSCOMPAT_DIR" && chmod 700 "\$WSCOMPAT_DIR"
cat << 'WSCOMPAT_EOF_84EbM3la' > "\$WSCOMPAT_DIR/profile"
$(
sed 's/WSCOMPAT_EOF_/WSCOMPAT_EOF__/g' "$WSCOMPAT_DIR/profile"
for file in "$WSCOMPAT_DIR/profile"*.sh; do
if [ -f "$file" ]; then
sed 's/WSCOMPAT_EOF_/WSCOMPAT_EOF__/g' "$file"
fi
done
)
WSCOMPAT_EOF_84EbM3la
. \$WSCOMPAT_DIR/profile
# pam, systemd - wrap in login shell
exec /bin/bash --login --norc --noprofile -c "exec /bin/bash --rcfile \"\$WSCOMPAT_DIR/bashrc\""
WSCOMPAT_EOF_9oqn7IVF
exec /bin/ssh -t "$@" "$init_cmd"

141
arch-user/bin/wsudo Executable file
View File

@@ -0,0 +1,141 @@
#!/bin/bash
parse() {
sudo_user="root"
sudo_command=""
sudo_login_shell=""
local args=("$@")
local i=0
local arg_count=${#args[@]}
expand_flags() {
local expanded=()
for arg in "$@"; do
if [[ $arg =~ ^-[a-zA-Z]{2,}$ ]]; then
local chars="${arg:1}"
for ((j=0; j<${#chars}; j++)); do
expanded+=("-${chars:$j:1}")
done
else
expanded+=("$arg")
fi
done
args=("${expanded[@]}")
arg_count=${#args[@]}
}
expand_flags "$@"
while [[ $i -lt $arg_count ]]; do
case "${args[$i]}" in
-u|--user)
((i++))
if [[ $i -lt $arg_count ]]; then
sudo_user="${args[$i]}"
fi
((i++));;
-i|--login)
sudo_login_shell=true
((i++));;
-s|--shell)
((i++));;
--)
((i++))
sudo_command="${args[*]:$i}"
break;;
-*)
((i++));;
su)
((i++))
local su_user=""
local su_args=()
while [[ $i -lt $arg_count ]]; do
su_args+=("${args[$i]}")
((i++))
done
local su_expanded=()
for arg in "${su_args[@]}"; do
if [[ $arg =~ ^-[a-zA-Z]{2,}$ ]]; then
local chars="${arg:1}"
for ((j=0; j<${#chars}; j++)); do
su_expanded+=("-${chars:$j:1}")
done
else
su_expanded+=("$arg")
fi
done
local k=0
local su_count=${#su_expanded[@]}
while [[ $k -lt $su_count ]]; do
case "${su_expanded[$k]}" in
-|-l|--login)
sudo_login_shell=true
((k++));;
-c|--command)
((k++))
if [[ $k -lt $su_count ]]; then
sudo_command="${su_expanded[$k]}"
((k++))
fi;;
--session-command=*)
sudo_command="${su_expanded[$k]#*=}"
((k++));;
-m|-p|--preserve-environment)
((k++));;
-s|--shell)
((k++))
if [[ $k -lt $su_count && "${su_expanded[$k]}" != -* ]]; then
((k++))
fi;;
-*)
((k++));;
*)
if [[ -z "$su_user" ]]; then
su_user="${su_expanded[$k]}"
((k++))
else
((k++))
fi;;
esac
done
if [[ -n "$su_user" ]]; then
sudo_user="$su_user"
fi
break;;
*)
sudo_command="${args[*]:$i}"
break;;
esac
done
}
parse "$@"
[ -z "$WSCOMPAT_MASTER" ] && WSCOMPAT_MASTER="$(whoami)"
read -r -d '' init_cmd << WSCOMPAT_EOF_ahkiem3K || true
export WS_IS_COMPAT=1
export WSCOMPAT_MASTER="$WSCOMPAT_MASTER"
export WSCOMPAT_DIR="/tmp/wscompat_${WSCOMPAT_MASTER}_\$(whoami)"
rm -rf "\$WSCOMPAT_DIR" && mkdir -p "\$WSCOMPAT_DIR" && chmod 700 "\$WSCOMPAT_DIR"
cat << 'WSCOMPAT_EOF_daePe0Ph' > "\$WSCOMPAT_DIR/profile"
$(
sed 's/WSCOMPAT_EOF_/WSCOMPAT_EOF__/g' "$WSCOMPAT_DIR/profile"
for file in "$WSCOMPAT_DIR/profile"*.sh; do
if [ -f "$file" ]; then
sed 's/WSCOMPAT_EOF_/WSCOMPAT_EOF__/g' "$file"
fi
done
)
WSCOMPAT_EOF_daePe0Ph
. \$WSCOMPAT_DIR/profile
WSCOMPAT_EOF_ahkiem3K
if [ -z "$sudo_command" ]; then
sudo_command="exec /bin/bash --rcfile \"\$WSCOMPAT_DIR/bashrc\""
fi
if [ "$sudo_login_shell" ]; then
exec /bin/sudo -u "$sudo_user" \
/bin/bash --login --noprofile --norc -c "$init_cmd; cd; $sudo_command"
else
exec /bin/sudo -u "$sudo_user" \
/bin/bash --noprofile --norc -c "$init_cmd; $sudo_command"
fi

View File

@@ -1,9 +1,6 @@
# see https://github.com/sigoden/aichat/blob/main/config.example.yaml
# see https://github.com/sigoden/aichat/blob/main/models.yaml
model: openrouter:anthropic/claude-sonnet-4
function_calling: false
clients:
- type: openai-compatible
@@ -12,22 +9,9 @@ clients:
api_key: {{ .user.AI_OPENROUTER_KEY }}
models:
- name: anthropic/claude-opus-4
max_input_tokens: 200000
max_output_tokens: 20000
require_max_tokens: true
input_price: 15
output_price: 75
supports_vision: true
supports_function_calling: true
patch:
body:
reasoning:
effort: high
- name: anthropic/claude-sonnet-4
max_input_tokens: 200000
max_output_tokens: 20000
- name: anthropic/claude-sonnet-4.5
max_input_tokens: 350000
max_output_tokens: 65000
require_max_tokens: true
input_price: 3
output_price: 15
@@ -38,27 +22,14 @@ clients:
reasoning:
effort: high
- name: deepseek/deepseek-r1-0528
max_input_tokens: 65536
input_price: 0.28
output_price: 1.12
- name: deepseek/deepseek-r1-0528:free
max_input_tokens: 65536
input_price: 0
output_price: 0
- name: perplexity/sonar-pro
max_input_tokens: 200000
input_price: 3
output_price: 15
- name: perplexity/sonar
max_input_tokens: 127072
input_price: 1
output_price: 1
- name: deepseek/deepseek-v3.2-exp
max_input_tokens: 163840
input_price: 0.20
output_price: 0.40
patch:
body:
reasoning:
effort: high
- name: openai/gpt-4.1
max_input_tokens: 1047576

View File

@@ -1,3 +0,0 @@
---
model: openrouter:deepseek/deepseek-r1-0528:free
---

View File

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

View File

@@ -1,3 +0,0 @@
---
model: openrouter:anthropic/claude-opus-4
---

View File

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

View File

@@ -48,3 +48,67 @@ title = "term"
[window.padding]
x = 8
y = 4
[[keyboard.bindings]]
key = "C"
mods = "Control"
action = "Copy"
[[keyboard.bindings]]
key = "V"
mods = "Control"
action = "Paste"
[[keyboard.bindings]]
key = "Escape"
mods = "Alt"
action = "ToggleViMode"
[[keyboard.bindings]]
key = "n"
mode = "Vi"
action = "Left"
[[keyboard.bindings]]
key = "e"
mode = "Vi"
action = "Down"
[[keyboard.bindings]]
key = "i"
mode = "Vi"
action = "Up"
[[keyboard.bindings]]
key = "o"
mode = "Vi"
action = "Right"
[[keyboard.bindings]]
key = "h"
mode = "Vi"
action = "ToggleViMode"
[[keyboard.bindings]]
key = "k"
mode = "Vi"
action = "SearchNext"
[[keyboard.bindings]]
key = "K"
mode = "Vi"
action = "SearchPrevious"
[[keyboard.bindings]]
key = "j"
mode = "Vi"
action = "SemanticRightEnd"
[[keyboard.bindings]]
key = "l"
mode = "Vi"
action = "ToggleViMode"

View File

@@ -2,14 +2,27 @@
[[ $- != *i* ]] && return
shopt -s autocd
stty intr ^K
alias ssh='wssh'
alias sudo='wsudo'
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'
export EDITOR=vim
export FZF_COMPLETION_TRIGGER='*'
eval "$(fzf --bash)"
PS0+='\e]133;C\e\\'
command_done() {
printf '\e]133;D\e\\'

View File

@@ -1,24 +0,0 @@
#!/bin/sh
export BEMENU_OPTS="\
--ignorecase \
--width-factor 0.5 \
--fn \"{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}\" \
--list 500 \
--border 2 \
--scrollbar autohide \
--border-radius 4 \
--bdr #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
--scf #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
--scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
--nb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
--ab #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
--hb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
--fb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
--tb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
--nf #{{ .theme.color.fg }} \
--af #{{ .theme.color.fg }} \
--cf #{{ .theme.color.fg }} \
--hf #{{ .theme.color.fg_accent }} \
--tf #{{ .theme.color.fg_accent }} \
--ff #{{ .theme.color.fg_accent }} \
"

View File

@@ -0,0 +1 @@
max-items 50

View File

@@ -1,280 +0,0 @@
{{ define "fadeColor" }}
{{- $color := .color -}}
{{- $opacity := .opacity -}}
{{ $result := "" }}
{{- range $color | regexp.Replace "(..)" "$1 " | strings.TrimSpace | strings.Split " " -}}
{{- $result = printf "%s%s" $result (conv.ParseInt . 16 32 | math.Mul $opacity | math.Round | conv.ToInt | printf "%02x") -}}
{{- end -}}
{{- $result -}}
{{- end -}}
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
title=term
# locked-title=no
font={{ .theme.font.name_mono }}:size={{ .theme.font.size_base_pt }}
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# font-size-adjustment=0.5
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# strikeout-thickness=<font strikeout thickness>
# box-drawings-uses-font-glyphs=no
# dpi-aware=no
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
pad=8x4 # optionally append 'center'
# resize-by-cells=yes
# resize-keep-grid=yes
# resize-delay-ms=100
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is libutempter (Linux)
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ulog (FreeBSD)
[environment]
# name=value
[bell]
urgent=yes
# notify=no
# visual=no
# command=
# command-focused=no
[desktop-notifications]
# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body}
# command-action-argument=--action ${action-name}=${action-label}
# close=""
# inhibit-when-focused=yes
[scrollback]
lines=10000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
# style=block
# color=<inverse foreground/background>
# blink=no
blink-rate=250
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
# hide-when-typing=no
# alternate-scroll-mode=yes
[touch]
# long-press-delay=400
[colors]
#alpha=1
background={{ .theme.color.bg }}
foreground={{ .theme.color.fg }}
# flash=7f7f00
# flash-alpha=0.5
## Normal/regular colors (color palette 0-7)
# regular0=242424 # black
# regular1=f62b5a # red
# regular2=47b413 # green
# regular3=e3c401 # yellow
# regular4=24acd4 # blue
# regular5=f2affd # magenta
# regular6=13c299 # cyan
# regular7=e6e6e6 # white
## Bright colors (color palette 8-15)
# bright0=616161 # bright black
# bright1=ff4d51 # bright red
# bright2=35d450 # bright green
# bright3=e9e836 # bright yellow
# bright4=5dc5f8 # bright blue
# bright5=feabf2 # bright magenta
# bright6=24dfc4 # bright cyan
# bright7=ffffff # bright white
regular0={{ .theme.color.bg }}
regular1=ff4d51
regular2=35d450
regular3=e9e836
regular4=5dc5f8
regular5={{ .theme.color.fg_accent }}
regular6=24dfc4
regular7={{ .theme.color.fg }}
bright0={{ .theme.color.bg }}
bright5={{ .theme.color.fg_accent }}
bright7={{ .theme.color.fg }}
## dimmed colors (see foot.ini(5) man page)
# dim0=<not set>
# ...
# dim7=<not-set>
## The remaining 256-color palette
# 16 = <256-color palette #16>
# ...
# 255 = <256-color palette #255>
## Sixel colors
# sixel0 = 000000
# sixel1 = 3333cc
# sixel2 = cc2121
# sixel3 = 33cc33
# sixel4 = cc33cc
# sixel5 = 33cccc
# sixel6 = cccc33
# sixel7 = 878787
# sixel8 = 424242
# sixel9 = 545499
# sixel10 = 994242
# sixel11 = 549954
# sixel12 = 995499
# sixel13 = 549999
# sixel14 = 999954
# sixel15 = cccccc
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
scrollback-indicator={{ .theme.color.bg }} {{ template "fadeColor" (dict "color" .theme.color.fg_accent "opacity" .theme.opacity.med) }}
search-box-no-match={{ .theme.color.fg }} {{ .theme.color.bg_accent_dark }}
search-box-match={{ .theme.color.fg }} {{ .theme.color.bg_accent_dark }}
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-maximized=no
# double-click-to-maximize=yes
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
scrollback-up-page=Control+Shift+b
scrollback-up-half-page=Control+Shift+u
scrollback-up-line=Control+Shift+i
scrollback-down-page=Control+Shift+f
scrollback-down-half-page=Control+Shift+d
scrollback-down-line=Control+Shift+e
scrollback-home=none
scrollback-end=Control+Shift+g
clipboard-copy=Control+c
clipboard-paste=Control+v
primary-paste=Control+Shift+p
search-start=Control+Shift+slash
font-increase=Control+plus
font-decrease=Control+minus
font-reset=Control+equal
spawn-terminal=Control+Shift+h
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
pipe-scrollback=[sh -c 'f=$(mktemp); cat - > $f; footclient vim $f'] Control+Shift+s
# pipe-selected=[xargs -r firefox] none
pipe-command-output=[wl-copy] Control+Shift+y
# show-urls-launch=Control+Shift+o
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
unicode-input=none
# noop=none
[search-bindings]
cancel=Escape
commit=Return
find-prev=Control+Shift+k
find-next=Control+k
# prompt - emacs like
cursor-left=Control+b Left
cursor-left-word=Mod1+b Control+Left
cursor-right=Control+f Right
cursor-right-word=Mod1+f Control+Right
cursor-home=Control+a
cursor-end=Control+e
delete-prev=BackSpace Control+n
delete-prev-word=Control+w Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
delete-to-start=Control+u
delete-to-end=none
#######################
extend-char=Shift+o
extend-to-word-boundary=Shift+w
# extend-to-next-whitespace=Control+Shift+w
extend-to-next-whitespace=none
extend-line-down=Shift+e
extend-backward-char=Shift+n
extend-backward-to-word-boundary=Shift+b
# extend-backward-to-next-whitespace=none
extend-line-up=Shift+i
clipboard-paste=Control+v
primary-paste=Control+Shift+p
# unicode-input=none
scrollback-up-page=none
scrollback-up-half-page=none
scrollback-up-line=none
scrollback-down-page=none
scrollback-down-half-page=none
scrollback-down-line=none
scrollback-home=none
scrollback-end=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# scrollback-up-mouse=BTN_WHEEL_BACK
# scrollback-down-mouse=BTN_WHEEL_FORWARD
# font-increase=Control+BTN_WHEEL_BACK
# font-decrease=Control+BTN_WHEEL_FORWARD
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-quote = BTN_LEFT-3
# select-row=BTN_LEFT-4
# vim: ft=dosini

View File

@@ -0,0 +1 @@
--color=base16

View File

@@ -0,0 +1 @@
export FZF_DEFAULT_OPTS_FILE="$HOME/.config/fzf/config"

View File

@@ -5,3 +5,7 @@
defaultBranch = main
[pull]
rebase = false
[safe]
directory = *
[commit]
gpgsign = true

View File

@@ -1 +1 @@
pinentry-program ~/.local/bin/bemenu/pinentry.sh
pinentry-program ~/.local/bin/menu/pinentry.sh

View File

@@ -1,19 +1,18 @@
separator_block_width=20
command=~/.local/bin/i3blocks/$BLOCK_NAME.sh
[weather]
label=⛅
interval=3600
[bandwidth]
interval=10
[volume]
interval=once
signal=2
{{ if file.Exists "/sys/class/power_supply/ACAD/" }}
[battery]
interval=10
{{ end }}
[volume]
interval=once
signal=2
[xkb_layout]
label=⌨
interval=once

View File

@@ -1,5 +1,5 @@
format=<span size="{{ .theme.font.size_base_pt }}pt" weight="bold">%s - %a</span>\n%b
font={{ .theme.font.name_regular }} {{ math.Sub .theme.font.size_base_pt .theme.font.size_step_pt }}
font={{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }}
background-color=#{{ .theme.color.bg_accent_dark }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }}
border-size=2
border-radius=4

View File

@@ -1,6 +1,5 @@
exec qutebrowser
exec qutebrowser -R
exec gimp
exec sqlitebrowser
exec telegram-desktop
man man
calc calc
@@ -15,4 +14,3 @@ pass pass info
capture screenshot selection
capture screenshot output
capture pick-color
float-sh nmtui

View File

@@ -0,0 +1,15 @@
#!/bin/sh
export WMENU_VOPTS="\
-i \
-f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \
-n {{ .theme.color.fg }} -N {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
-m {{ .theme.color.bg_accent_dark }} -M {{ .theme.color.fg_accent }} \
-s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
"
export WMENU_HOPTS="\
-i \
-f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \
-n {{ .theme.color.fg }} -N {{ .theme.color.bg }} \
-m {{ .theme.color.bg_accent_dark }} -M {{ .theme.color.fg_accent }} \
-s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
"

View File

@@ -3,7 +3,6 @@
export PATH=~/.local/bin:$PATH
#export WLR_RENDERER=vulkan
export QT_STYLE_OVERRIDE=kvantum
export GTK_THEME=Materia-dark

View File

@@ -62,4 +62,10 @@ c.url.default_page = 'file:///home/'+env['USER']+'/.local/share/qutebrowser/star
c.url.start_pages = ['file:///home/'+env['USER']+'/.local/share/qutebrowser/start.html']
########################################
# downloads
c.downloads.location.directory = "~/tmp/"
c.downloads.location.prompt = False
c.downloads.remove_finished = 10000
########################################
#print(f"Execution time {time.time() - start_ts}")

View File

@@ -25,6 +25,8 @@ set keymap vi-command
"n":backward-char
"\C-n":backward-char
# e -> k (reverse swap)
set keymap vi-insert
"\C-e":"\C-j"
set keymap vi-command
"e":previous-history
"\C-e":kill-line
@@ -63,3 +65,9 @@ set keymap vi-insert
"\C-h":operate-and-get-next
#################################
########### custom ##############
$if qalc
set show-mode-in-prompt off
$endif
#################################

View File

@@ -12,15 +12,18 @@ set $right o
set $bwd quotedbl
################ styles ####################
default_border pixel 1
default_border pixel 2
gaps inner 4
smart_borders on
smart_gaps on
show_marks on
title_align center
font pango:{{ .theme.font.name_regular }} {{ math.Sub .theme.font.size_base_pt .theme.font.size_step_pt }}
font pango:{{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }}
output * bg #{{ .theme.color.bg }} solid_color
client.focused #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}
client.focused_tab_title #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }}
client.focused_inactive #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }}
client.unfocused #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }}
client.focused_tab_title #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }}
client.focused_inactive #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }}
client.unfocused #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }}
client.urgent #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }}
bar {
position top
@@ -36,7 +39,7 @@ bar {
separator #{{ .theme.color.fg_dark }}
focused_workspace #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }}
inactive_workspace #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg }}
urgent_workspace #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }}
urgent_workspace #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_dark }}
binding_mode #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }}
}
}
@@ -72,9 +75,53 @@ bindgesture swipe:left workspace next
############################################
############### containers #################
# top row - layouts
bindsym --to-code {
$mod+p layout splitv
$altmod+1 mark 1
$altmod+2 mark 2
$altmod+3 mark 3
$altmod+4 mark 4
$altmod+5 mark 5
$altmod+6 mark 6
$altmod+7 mark 7
$altmod+8 mark 8
$altmod+9 mark 9
$altmod+0 mark 0
$mod+1 [con_mark="1"] focus
$mod+2 [con_mark="2"] focus
$mod+3 [con_mark="3"] focus
$mod+4 [con_mark="4"] focus
$mod+5 [con_mark="5"] focus
$mod+6 [con_mark="6"] focus
$mod+7 [con_mark="7"] focus
$mod+8 [con_mark="8"] focus
$mod+9 [con_mark="9"] focus
$mod+0 [con_mark="0"] focus
$mod+Minus opacity minus 0.05
$altmod+Minus opacity plus 0.05
}
bindsym --to-code {
$altmod+KP_1 mark 1
$altmod+KP_2 mark 2
$altmod+KP_3 mark 3
$altmod+KP_4 mark 4
$altmod+KP_5 mark 5
$altmod+KP_6 mark 6
$altmod+KP_7 mark 7
$altmod+KP_8 mark 8
$altmod+KP_9 mark 9
$altmod+KP_0 mark 0
$mod+KP_1 [con_mark="1"] focus
$mod+KP_2 [con_mark="2"] focus
$mod+KP_3 [con_mark="3"] focus
$mod+KP_4 [con_mark="4"] focus
$mod+KP_5 [con_mark="5"] focus
$mod+KP_6 [con_mark="6"] focus
$mod+KP_7 [con_mark="7"] focus
$mod+KP_8 [con_mark="8"] focus
$mod+KP_9 [con_mark="9"] focus
$mod+KP_0 [con_mark="0"] focus
}
bindsym --to-code {
$altmod+p split v
$mod+l layout splith
$altmod+l split h
@@ -86,15 +133,15 @@ bindsym --to-code {
$altmod+u split none
$mod+y layout tabbed
$altmod+y split h; layout tabbed
$mod+j focus parent
}
# mid row - focus, movement
bindsym --to-code {
$mod+$fwd focus child
$mod+$fwd exec ~/.local/bin/sway/focus-cousin.sh prev
$mod+$left focus left
$mod+$up focus up
$mod+$down focus down
$mod+$right focus right
$mod+$bwd focus parent
$mod+$bwd exec ~/.local/bin/sway/focus-cousin.sh next
$altmod+$left move left 40px
$altmod+$up move up 40px
$altmod+$down move down 40px
@@ -104,21 +151,29 @@ bindsym --to-code {
$altmod2+$down resize grow height 4ppt or 40px
$altmod2+$right resize grow width 2ppt or 40px
}
# bottom row - 3d
bindsym --to-code {
$mod+d scratchpad show
$altmod+d sticky enable; move scratchpad
$mod+z focus tiling
$altmod+z focus floating; floating disable; sticky disable
$mod+k focus tiling
$altmod+k focus floating; floating disable; sticky disable
$mod+h focus floating
$altmod+h floating enable; sticky enable
$mod+k focus prev sibling
$mod+Comma opacity minus 0.05
$mod+Period opacity plus 0.05
$mod+slash focus next sibling
$mod+x exec wtype -M ctrl x -m ctrl
$mod+c exec wtype -M ctrl c -m ctrl
$mod+v exec wtype -M ctrl v -m ctrl
$altmod+v exec ~/.local/bin/sway/paste-from-history.sh
$mod+Slash exec ~/.local/bin/sway/search-mode.sh
$mod+z focus child
}
bindsym --to-code {
$mod+Left focus left
$mod+Up focus up
$mod+Down focus down
$mod+Right focus right
$altmod+Left move left 40px
$altmod+Up move up 40px
$altmod+Down move down 40px
$altmod+Right move right 40px
}
floating_modifier $mod normal
############################################
@@ -127,6 +182,11 @@ floating_modifier $mod normal
bindsym --to-code {
# generic
$mod+Escape kill
# basic scripts
$mod+Return exec alacritty msg create-window
$altmod+Return exec alacritty
$mod+Colon exec ~/.local/bin/sway/command-mode.sh
$mod+Space exec ~/.local/bin/menu/run.sh
# media
XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%-
XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+
@@ -134,19 +194,17 @@ bindsym --to-code {
XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks
XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% && pkill -SIGRTMIN+2 i3blocks
XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks
# basic scripts
$mod+Colon exec ~/.local/bin/sway/command-mode.sh
$mod+Return exec footclient
$mod+Space exec ~/.local/bin/bemenu/run.sh
XF86Calculator exec .local/bin/menu/run-calc.sh calc tui
}
##############################################
################# daemons ####################
exec foot -s
exec mako
exec swayidle
exec alacritty --daemon
exec wl-paste --watch cliphist store
##############################################
############## app-specific ##################
for_window [app_id="_float"] floating enable, resize set 960 540
##############################################
#############################################

View File

@@ -93,7 +93,7 @@ noremap! <C-e> <C-j>
" i -> k
noremap i k
noremap I K
noremap! <C-i> <C-k>
"noremap! <C-i> <C-k> " breaks tab
" o -> l
noremap o l
noremap O L
@@ -145,7 +145,7 @@ noremap! <C-е> <C-ж>
" i -> k
noremap и к
noremap И К
noremap! <C-и> <C-к>
"noremap! <C-и> <C-к> " breaks tab
" o -> l
noremap о л
noremap О Л

View File

@@ -0,0 +1,11 @@
[ -f ~/.bashrc ] && . ~/.bashrc
stty intr ^K
alias ssh='wssh'
alias sudo='wsudo'
su() {
if [ "$1" = "-" ]; then
shift && wsudo - -u "$@"
else
wsudo -u "$@"
fi
}

View File

@@ -0,0 +1 @@
export WSCOMPAT_DIR=~/.config/workspace-compat

View File

@@ -0,0 +1,41 @@
#!/bin/bash
if [ -z "$WSCOMPAT_DIR" ] || [ "$WS_IS_COMPAT" != 1 ]; then
exit 0
fi
[ -f /etc/profile ] && . /etc/profile
[ -f ~/.profile ] && . ~/.profile
export EDITOR=vim
export SHELL=/bin/bash
export PATH="$WSCOMPAT_DIR:$PATH"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/bashrc"
{{ tmpl.Inline (file.Read "config/workspace-compat/bashrc") . }}
WSCOMPAT_EOF_04tcIQE7
export VIMINIT="source $WSCOMPAT_DIR/vimrc"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/vimrc"
{{ tmpl.Inline (file.Read "config/vim/vimrc.tmpl") . }}
WSCOMPAT_EOF_04tcIQE7
export INPUTRC="$WSCOMPAT_DIR/inputrc"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/inputrc"
{{ tmpl.Inline (file.Read "config/readline/inputrc") . }}
WSCOMPAT_EOF_04tcIQE7
export LESSKEYIN="$WSCOMPAT_DIR/lesskey"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/lesskey"
{{ tmpl.Inline (file.Read "config/less/lesskey") . }}
WSCOMPAT_EOF_04tcIQE7
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/wssh"
{{ tmpl.Inline (file.Read "bin/wssh") . }}
WSCOMPAT_EOF_04tcIQE7
chmod +x "$WSCOMPAT_DIR/wssh"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/wsudo"
{{ tmpl.Inline (file.Read "bin/wsudo") . }}
WSCOMPAT_EOF_04tcIQE7
chmod +x "$WSCOMPAT_DIR/wsudo"

View File

@@ -1,10 +0,0 @@
#!/bin/bash
set -e
cd "$(dirname "$(readlink -f -- "$0")")"
umask 002
export IS_COMPAT=1
gomplate --file config/vim/vimrc --out ../linux-compat/home/.vimrc
gomplate --file config/readline/inputrc --out ../linux-compat/home/.inputrc
gomplate --file config/less/lesskey --out ../linux-compat/home/.lesskey

View File

@@ -48,7 +48,7 @@ mkdir -p "${USER_DIRS[@]}"
########## scripts #############
cp -rf bin/* ~/.local/bin
LN_EXCLUDE_DIRS=(i3blocks bemenu sway)
LN_EXCLUDE_DIRS=(i3blocks menu sway)
ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} "
for sdir in bin/*; do
@@ -71,8 +71,8 @@ gomplate --input-dir config \
--plugin jq=/bin/jq \
-c theme=config/theme.json \
-c user="file:///$HOME/.config/workspace.conf?type=application/x-env" \
--exclude /workspace.conf
--exclude /workspace.conf \
--exclude /workspace-compat/* --exclude !/workspace-compat/env.sh
ln -sf ~/.config/bash/bashrc ~/.bashrc
ln -sf ~/.config/profile ~/.profile
ln -sf ~/.config/less/lesskey ~/.lesskey
@@ -80,7 +80,16 @@ mkdir -p ~/.gnupg && ln -sf ~/.config/gnupg/gpg-agent.conf ~/.gnupg
################################
############# data ############
cp -rf data/* ~/.local/share
gomplate --input-dir data \
--output-map "$HOME/.local/share/{{ .in | strings.ReplaceAll \".tmpl\" \"\" }}" \
--exclude-processing "!*.tmpl" \
-c theme=config/theme.json
###############################
########### compat ############
export IS_COMPAT=1
gomplate --file config/workspace-compat/profile.tmpl --out ~/.config/workspace-compat/profile
export IS_COMPAT=0
###############################
swaymsg reload || true

View File

@@ -1,65 +0,0 @@
set editing-mode vi
########### prompt ##############
set show-mode-in-prompt on
set vi-ins-mode-string \1\e[1 q\2
set vi-cmd-mode-string \1\e[2 q\2
#################################
############# new ###############
set keymap vi-insert
"\C-a":beginning-of-line
"\C-e":end-of-line
"\C-b":backward-char
"\C-f":forward-char
"\eb":backward-word
"\ef":forward-word
#################################
##### 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-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
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

@@ -1,48 +0,0 @@
###### colemak dh movement #####
# n -> h
#n Help
#N Help
# e -> j
e forw-line
E forw-line-force
# i -> k
i back-line
^I back-line
I back-line-force
# o -> l
^O repaint
# k -> n
^K forw-line
k repeat-search
\ek repeat-search-all
K reverse-search
\eK reverse-search-all
#^O^K osc8-forw-search
#^Ok osc8-forw-search
:k next-file
# j -> e
j forw-line
^J forw-line
J examine
:j examine
# l -> i
# noop
# h -> o
#^H^H osc8-open
############################
######### custom ###########
n left-scroll
o right-scroll
############################

View File

@@ -1,173 +0,0 @@
"########## system ###########
set nocompatible
set ttyfast
set encoding=utf-8
set mouse=a
set autoread
au FocusGained,BufEnter * silent! checktime
"#############################
"######### generic ###########
" status line
set showmode
set showcmd
set ruler
" syntax hl
syntax enable
filetype on
filetype plugin on
" lines
set number
set relativenumber
set numberwidth=3
set wrap
set showmatch " brackets
" search
set hlsearch
set incsearch
set ignorecase
set smartcase
" tabs
set shiftwidth=4
set tabstop=4
set softtabstop=0
set noexpandtab
" scroll
set scrolloff=5
" commands
set wildmenu
set wildmode=list:longest,full
set gdefault
" colors
colorscheme default
set t_Co=16
set notermguicolors
set t_RV= " bugfix
" new
highlight LineNr ctermfg=5 ctermbg=none
autocmd VimEnter * highlight SignColumn ctermbg=none
" fg magenta (5) -> blue (4)
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
" fg blue (4 or 12) -> magenta (5)
highlight SpecialKey term=bold ctermfg=5
highlight Directory term=bold ctermfg=5
highlight Folded term=standout ctermfg=5 ctermbg=7
highlight FoldColumn term=standout ctermfg=5 ctermbg=7
highlight SignColumn term=standout ctermfg=5 ctermbg=7
highlight Comment term=bold ctermfg=5
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
"###########################################
"############## file-specific ###############
autocmd FileType markdown setlocal spell
autocmd FileType gitcommit setlocal spell
autocmd FileType markdown setlocal complete+=kspell
autocmd FileType gitcommit setlocal complete+=kspell
"############################################
"####### remap - colemak-dh #######
" n -> h
noremap n h
noremap N H
noremap! <C-n> <C-h>
" e -> j
noremap e j
noremap E J
noremap! <C-e> <C-j>
" i -> k
noremap i k
noremap I K
noremap! <C-i> <C-k>
" o -> l
noremap o l
noremap O L
noremap! <C-o> <C-l>
" k -> n
noremap k n
noremap K N
noremap! <C-k> <C-n>
" j -> e
noremap j e
noremap J E
noremap! <C-j> <C-e>
" l -> i
noremap l i
noremap L I
noremap! <C-l> <C-i>
" h -> o
noremap h o
noremap H O
noremap! <C-h> <C-o>
"#################################
"############### new keybinds ###############
cnoremap <C-a> <Home>
cnoremap <C-e> <End>
cnoremap <C-b> <Left>
cnoremap <C-f> <Right>
cnoremap <M-b> <S-Left>
cnoremap <M-f> <S-Right>
"############################################
"####### custom commands #########
" W - Save file as superuser
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
"#################################
"######### localization ##########
set langmap=ьЬыЫфФпПбБжЖлЛуУяЯаАрРсСтТгГмМнНеЕиИоОчЧцЦдДвВзЗкКхХ;qQwWfFpPbBjJlLuUyYaArRsStTgGmMnNeEiIoOxXcCdDvVzZkKhH
" n -> h
noremap н х
noremap Н Х
noremap! <C-н> <C-х>
" e -> j
noremap е ж
noremap Е Ж
noremap! <C-е> <C-ж>
" i -> k
noremap и к
noremap И К
noremap! <C-и> <C-к>
" o -> l
noremap о л
noremap О Л
noremap! <C-о> <C-л>
" k -> n
noremap к н
noremap К Н
noremap! <C-к> <C-н>
" j -> e
noremap й е
noremap Й Е
noremap! <C-й> <C-е>
" l -> i
noremap л и
noremap Л И
noremap! <C-л> <C-и>
" h -> o
noremap х о
noremap Х O
noremap! <C-х> <C-о>
"#################################
"############# hacks #############
"################################

View File

@@ -1,3 +0,0 @@
#!/bin/sh
export BASIC_PACMAN="vim less"

View File

@@ -1,9 +0,0 @@
#!/bin/bash
set -e
cd "$(dirname "$(readlink -f -- "$0")")"
[[ -z "$1" ]] && echo "ERROR: no destination" >&1 && exit 1
scp -r home/. "$1:/tmp/workspace"
ssh "$1" "cp -rfT /tmp/workspace ~/ && rm -rf /tmp/workspace"