Compare commits
66 Commits
719baaf847
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dd079c4ef2 | |||
| 732cdffd25 | |||
| 22c64e10a0 | |||
| 88302b9bca | |||
| 7023046b63 | |||
| 6fd661f286 | |||
| 882a27b1cb | |||
| dd11cd9253 | |||
| bfb053a4ef | |||
| 6d5bb72149 | |||
| ee9d27147e | |||
| f4dd706b6a | |||
| dc4de3e6b8 | |||
| 67a6e5fa53 | |||
| 20abc74f48 | |||
| 178608bb04 | |||
| d5dc5f651e | |||
| 0a4c5c39f9 | |||
| 533cafa56d | |||
| b1d63d0e67 | |||
| 3778dc20fe | |||
| 38d44f03d3 | |||
| ee1c79f088 | |||
| 4fc1f7cc6c | |||
| 17079f021c | |||
| 825ed5263c | |||
| 06660b992f | |||
| 0ed437b0ea | |||
| 316a3ff9e4 | |||
| 4b4d7a684c | |||
| b5a41d9ae0 | |||
| a833ef01eb | |||
| c9dbae4c0c | |||
| bc031c5bb8 | |||
| 3398c6b4ef | |||
| 6bf779a68e | |||
| d8eae8a1a5 | |||
| 5c078feab5 | |||
| 119632adfd | |||
| bf5a01b1e7 | |||
| 5f827671f1 | |||
| acfaf08000 | |||
| 26770fbc77 | |||
| 24ec5904fe | |||
| 14263c00b2 | |||
| 56b3f093db | |||
| 78ff179a25 | |||
| ec4433827a | |||
| 3fc6f3e225 | |||
| e30caf308a | |||
| 5f4011b63a | |||
| 539681260b | |||
| 54836c9435 | |||
| e5d95820a7 | |||
| 2feac52b39 | |||
| df63c246ff | |||
| 85628b5acc | |||
| 5305539a3f | |||
| 2eea5707bd | |||
| 6811313bf1 | |||
| 5d10729945 | |||
| 9da09b8d81 | |||
| 72f91d0395 | |||
| 09ed42abc7 | |||
| 0b3a513191 | |||
| 4f869f4ac3 |
@@ -112,7 +112,4 @@ passwd <username>
|
||||
23. login, `sudo su`
|
||||
24. Uncomment locale in `/etc/locale.gen`, run `locale-gen`
|
||||
25. `echo "<name>" > /etc/hostname`
|
||||
26. `systemctl enable NetworkManager --now`
|
||||
27. Enable and sync time: `systemctl enable systemd-timesyncd --now`
|
||||
28. Get tz from `tzselect`, set via `timedatectl set-timezone [tz]`
|
||||
29. Update hwclock: `hwclock -w --utc`
|
||||
26. Get tz from `tzselect`, set via `timedatectl set-timezone [tz]`
|
||||
|
||||
@@ -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 screen man-db # 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
|
||||
libqalculate translate-shell # utils
|
||||
sqlitebrowser qt5-wayland # db
|
||||
aichat libqalculate translate-shell # utils
|
||||
libreoffice-still # docs
|
||||
|
||||
qutebrowser qt6-wayland # web browsing
|
||||
@@ -27,9 +29,10 @@ 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
|
||||
ttf-roboto ttf-roboto-mono ttf-font-awesome # fonts
|
||||
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
|
||||
|
||||
)
|
||||
|
||||
@@ -64,7 +67,7 @@ while read -r entity; do
|
||||
etype="${entity_parts[0]}"
|
||||
ename="${entity_parts[1]}"
|
||||
eid="${entity_parts[2]}"
|
||||
[ "$etype" != "user" ] && [ "$etype" != "group" ] && echo "ERROR: bad entity type" >&2 && exit 1
|
||||
[ "$etype" != "user" ] && [ "$etype" != "group" ] && echo "ERROR: bad entity type $etype" >&2 && exit 1
|
||||
|
||||
# every user has their own primary group with id matching uid,
|
||||
# so for each entry we need a usergroup
|
||||
|
||||
14
arch-user/bin/ai
Executable file
14
arch-user/bin/ai
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
role="$1"
|
||||
shift
|
||||
|
||||
session_ts="$(date +%s)"
|
||||
if [ -n "$1" ]; then
|
||||
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
|
||||
109
arch-user/bin/backup
Executable file
109
arch-user/bin/backup
Executable file
@@ -0,0 +1,109 @@
|
||||
#!/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
|
||||
@@ -1,211 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
LIST=();
|
||||
# gui
|
||||
if [ "$USER" = "yrzam" ]; then
|
||||
LIST+=(
|
||||
"web" "web projects"
|
||||
"web" "web life"
|
||||
)
|
||||
WEB_HAS_PROFILES=1
|
||||
else
|
||||
LIST+=(
|
||||
"web" "web"
|
||||
)
|
||||
fi
|
||||
LIST+=(
|
||||
"gui" "telegram-desktop"
|
||||
"gui" "gimp"
|
||||
"gui" "sqlitebrowser"
|
||||
# tui
|
||||
"shell_tui" "vifm"
|
||||
"shell_tui" "vim"
|
||||
"tui" "htop"
|
||||
"float_tui" "nmtui"
|
||||
"float_tui" "bluetoothctl"
|
||||
"man" "man"
|
||||
"float_tui" "node"
|
||||
"term" "term"
|
||||
# native
|
||||
"screen_pick" "screenshot output"
|
||||
"screen_pick" "screenshot selection"
|
||||
"screen_pick" "color-picker"
|
||||
"todo" "pass"
|
||||
"calc" "calc"
|
||||
"todo" "translate ru-en"
|
||||
"todo" "translate en-ru"
|
||||
"grep_dict" "dict"
|
||||
)
|
||||
if [ "$FEAT_BRIGHTNESS" ]; then
|
||||
LIST+=(
|
||||
"brightness" "brightness"
|
||||
)
|
||||
fi
|
||||
LIST+=(
|
||||
"direct" "sway reload"
|
||||
"power" "logout"
|
||||
"todo" "inhibit"
|
||||
"power" "suspend"
|
||||
"power" "poweroff"
|
||||
"power" "poweroff --check-inhibitors=no"
|
||||
"power" "reboot"
|
||||
)
|
||||
|
||||
sure() {
|
||||
echo yes | bemenu --prompt "sure?"
|
||||
}
|
||||
|
||||
# generic
|
||||
exec_gui() {
|
||||
exec "$@"
|
||||
}
|
||||
exec_tui() {
|
||||
exec footclient -D ~/ "$@"
|
||||
}
|
||||
exec_float_tui() { # todo
|
||||
exec footclient --app-id="footclient_float" -D ~/ "$@"
|
||||
}
|
||||
exec_shell_tui() {
|
||||
exec footclient -D ~/ "$SHELL" -c "$@"
|
||||
}
|
||||
exec_shell_full() {
|
||||
exec footclient -D ~/ "$SHELL" -c "($1); read -n1"
|
||||
}
|
||||
exec_direct() {
|
||||
exec "$@"
|
||||
}
|
||||
exec_term() {
|
||||
exec footclient -D ~/
|
||||
}
|
||||
# custom
|
||||
exec_web() {
|
||||
shift
|
||||
if [ "$WEB_HAS_PROFILES" ]; then
|
||||
shift
|
||||
fi
|
||||
qutebrowser "$*"
|
||||
}
|
||||
exec_man() {
|
||||
shift
|
||||
page="$1"
|
||||
if [ -z "$page" ]; then
|
||||
page="$(
|
||||
man -k . | \
|
||||
bemenu --prompt "man" | \
|
||||
sed ' s/\s\+\-.*//;s/ //g'
|
||||
)"
|
||||
fi
|
||||
[ -n "$page" ] && exec footclient "$SHELL" -c "man '$page' || read -n1"
|
||||
}
|
||||
exec_screen_pick() {
|
||||
if [ "$*" = "screenshot output" ]; then
|
||||
mon="$(swaymsg -t get_outputs | jq -r '. | map(select(.focused == true)) | .[0].name')"
|
||||
grim -o "$mon" - | wl-copy -t image/png
|
||||
notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000
|
||||
elif [ "$*" = "screenshot selection" ]; then
|
||||
grim -g "$(slurp)" - | wl-copy -t image/png
|
||||
notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000
|
||||
elif [ "$*" = "color-picker" ]; then
|
||||
hex="$(
|
||||
grim -g "$(slurp -p)" -t ppm - | \
|
||||
magick - -format '%[pixel:p{0,0}]' txt:- | \
|
||||
tail -n 1 | \
|
||||
cut -d ' ' -f 4
|
||||
)"
|
||||
notify-send "$hex" -a screenshot "stnrit" -t 3000
|
||||
fi
|
||||
}
|
||||
exec_pass() {
|
||||
echo 1
|
||||
}
|
||||
exec_calc() {
|
||||
shift
|
||||
query="$1"
|
||||
if [ -z "$query" ]; then
|
||||
query="$(echo "tui" | bemenu --prompt "qalc")"
|
||||
fi
|
||||
if [ "$query" = "tui" ]; then
|
||||
exec_float_tui "qalc"
|
||||
elif [ -n "$query" ]; then
|
||||
qalc_res="$(qalc --terse "$query")"
|
||||
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
|
||||
if [ "$qalc_res" = "$menu_res" ]; then
|
||||
wl-copy "$qalc_res"
|
||||
notify-send "$qalc_res" -a calc "Result copied to clipboard" -t 3000
|
||||
elif [ -n "$menu_res" ]; then
|
||||
exec_calc _ "$menu_res"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
exec_transl() {
|
||||
echo 1
|
||||
}
|
||||
exec_grep_dict() {
|
||||
shift
|
||||
dict="$1"
|
||||
pattern="$2"
|
||||
dicts_path="$HOME/know/dict/"
|
||||
if [ -z "$dict" ]; then
|
||||
dict="$(find "$dicts_path" -type f -printf "%f\n" | bemenu --prompt "dict")"
|
||||
[ -z "$dict" ] && return
|
||||
fi
|
||||
if [ -z "$pattern" ]; then
|
||||
pattern="$(echo -n | bemenu --prompt "grep $dict")"
|
||||
[ -z "$pattern" ] && return
|
||||
fi
|
||||
res="$({ echo ..; grep "$pattern" "$dicts_path/$dict"; } | bemenu --prompt " ")"
|
||||
if [ "$res" = ".." ]; then
|
||||
exec_grep_dict _ "$dict"
|
||||
else
|
||||
wl-copy "$res"
|
||||
notify-send "$res" -a dict "Word copied to clipboard" -t 3000
|
||||
fi
|
||||
}
|
||||
exec_brightness() {
|
||||
shift
|
||||
target="$1"
|
||||
if [ -z "$target" ]; then
|
||||
current="$(($(brightnessctl g)*100/$(brightnessctl m)))"
|
||||
current_i="$((current/5))"
|
||||
list="$(echo 1%; seq 5 5 100 | sed 's/$/%/')";
|
||||
target="$(echo "$list" | bemenu --index $current_i --prompt "$current% ->")";
|
||||
fi
|
||||
if [ -n "$target" ] && [ "$target" != "$current%" ]; then
|
||||
brightnessctl set "$target"
|
||||
[ -z "$1" ] && exec_brightness _
|
||||
fi
|
||||
}
|
||||
exec_power() {
|
||||
case "$1" in
|
||||
poweroff|reboot|suspend) sure && systemctl "$@";;
|
||||
logout) sure && swaymsg exit;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
out="$*";
|
||||
else
|
||||
out=$(
|
||||
for (( i=1; i<${#LIST[@]}; i+=2 )); do
|
||||
echo "${LIST[$i]}";
|
||||
done | bemenu --prompt ">"
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
if [ "$out" ]; then
|
||||
for (( i=1; i<${#LIST[@]}; i+=2 )); do
|
||||
if [[ "$out" == "${LIST[$i]}"* ]]; then
|
||||
executor=${LIST[$((i-1))]}
|
||||
fi
|
||||
done
|
||||
[ -z "$executor" ] && executor=shell_full
|
||||
|
||||
if [ "$executor" = "shell_full" ]; then
|
||||
"exec_$executor" "$out"
|
||||
else
|
||||
eval "executor_args=($out)"
|
||||
#shellcheck disable=SC2154
|
||||
"exec_$executor" "${executor_args[@]}"
|
||||
fi
|
||||
fi
|
||||
101
arch-user/bin/i3blocks/bandwidth.sh
Executable file
101
arch-user/bin/i3blocks/bandwidth.sh
Executable 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
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl "https://wttr.in/?format=%l;%t%20%p" --silent | sed 's/^\(.\{3\}\)\(.*\);/\1 /'
|
||||
echo
|
||||
2
arch-user/bin/menu/horizontal.sh
Executable file
2
arch-user/bin/menu/horizontal.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
eval "wmenu $WMENU_HOPTS \"$@\""
|
||||
@@ -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 \
|
||||
19
arch-user/bin/menu/run-calc.sh
Executable file
19
arch-user/bin/menu/run-calc.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
shift
|
||||
query="$1"
|
||||
if [ -z "$query" ]; then
|
||||
query="$(echo "tui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
|
||||
fi
|
||||
if [ "$query" = "tui" ]; then
|
||||
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" | ~/.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"
|
||||
elif [ -n "$menu_res" ]; then
|
||||
"$0" _ "$menu_res"
|
||||
fi
|
||||
fi
|
||||
21
arch-user/bin/menu/run-capture.sh
Executable file
21
arch-user/bin/menu/run-capture.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$*" = "screenshot output" ]; then
|
||||
mon="$(swaymsg -t get_outputs | jq -r '. | map(select(.focused == true)) | .[0].name')"
|
||||
outfile="screenshot-$(date +%s).png"
|
||||
grim -o "$mon" - | tee ~/tmp/"$outfile" | wl-copy -t image/png
|
||||
notify-send Done -a screenshot "Saved to tmp/$outfile\nCopied to clipboard"
|
||||
elif [ "$*" = "screenshot selection" ]; then
|
||||
outfile="screenshot-$(date +%s).png"
|
||||
grim -g "$(slurp)" - | tee ~/tmp/"$outfile" | wl-copy -t image/png
|
||||
notify-send Done -a screenshot "Saved to tmp/$outfile\nCopied to clipboard"
|
||||
elif [ "$*" = "pick-color" ]; then
|
||||
hex="$(
|
||||
grim -g "$(slurp -p)" -t ppm - | \
|
||||
magick - -format '%[pixel:p{0,0}]' txt:- | \
|
||||
tail -n 1 | \
|
||||
cut -d ' ' -f 4
|
||||
)"
|
||||
echo -n "$hex" | wl-copy
|
||||
notify-send "$hex" -a screenshot "Color code copied to clipboard"
|
||||
fi
|
||||
3
arch-user/bin/menu/run-float-sh-keep.sh
Executable file
3
arch-user/bin/menu/run-float-sh-keep.sh
Executable 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; }' -- "$@"
|
||||
|
||||
2
arch-user/bin/menu/run-float-sh.sh
Executable file
2
arch-user/bin/menu/run-float-sh.sh
Executable 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
15
arch-user/bin/menu/run-man.sh
Executable 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"
|
||||
13
arch-user/bin/menu/run-pass.sh
Executable file
13
arch-user/bin/menu/run-pass.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd "$PASSWORD_STORE_DIR"
|
||||
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
|
||||
pw="$(echo "$pws" | ~/.local/bin/menu/vertical.sh -p "pass")"
|
||||
|
||||
case "$2" in
|
||||
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
|
||||
|
||||
10
arch-user/bin/menu/run-power.sh
Executable file
10
arch-user/bin/menu/run-power.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
sure() {
|
||||
echo yes | ~/.local/bin/menu/horizontal.sh -p "sure?" || exec ~/.local/bin/menu/run.sh
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
poweroff|reboot|suspend) sure && systemctl "$@";;
|
||||
logout) sure && swaymsg exit;;
|
||||
esac
|
||||
20
arch-user/bin/menu/run.sh
Executable file
20
arch-user/bin/menu/run.sh
Executable 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
4
arch-user/bin/menu/vertical.sh
Executable 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
16
arch-user/bin/postgres/start.sh
Executable 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
4
arch-user/bin/psql.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
psql -h "/run/user/$(id -u)" "$1"
|
||||
@@ -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[@]}"
|
||||
|
||||
21
arch-user/bin/sway/focus-cousin.sh
Executable file
21
arch-user/bin/sway/focus-cousin.sh
Executable 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
|
||||
7
arch-user/bin/sway/paste-from-history.sh
Executable file
7
arch-user/bin/sway/paste-from-history.sh
Executable 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
|
||||
|
||||
54
arch-user/bin/sway/search-mode.sh
Executable file
54
arch-user/bin/sway/search-mode.sh
Executable 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
|
||||
2
arch-user/bin/vim/dump-highlight.sh
Executable file
2
arch-user/bin/vim/dump-highlight.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
vim -c 'redir > ~/tmp/vim-highlight.dump' -c 'silent! highlight' -c 'redir END' -c 'q'
|
||||
echo >> ~/tmp/vim-highlight.dump
|
||||
34
arch-user/bin/wssh
Executable file
34
arch-user/bin/wssh
Executable 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
141
arch-user/bin/wsudo
Executable 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
|
||||
2
arch-user/config/Kvantum/kvantum.kvconfig
Normal file
2
arch-user/config/Kvantum/kvantum.kvconfig
Normal file
@@ -0,0 +1,2 @@
|
||||
[General]
|
||||
theme=MateriaDark
|
||||
40
arch-user/config/aichat/config.yaml.tmpl
Normal file
40
arch-user/config/aichat/config.yaml.tmpl
Normal file
@@ -0,0 +1,40 @@
|
||||
# see https://github.com/sigoden/aichat/blob/main/config.example.yaml
|
||||
# see https://github.com/sigoden/aichat/blob/main/models.yaml
|
||||
|
||||
clients:
|
||||
|
||||
- type: openai-compatible
|
||||
name: openrouter
|
||||
api_base: https://openrouter.ai/api/v1
|
||||
api_key: {{ .user.AI_OPENROUTER_KEY }}
|
||||
models:
|
||||
|
||||
- name: anthropic/claude-sonnet-4.5
|
||||
max_input_tokens: 350000
|
||||
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
|
||||
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
|
||||
max_output_tokens: 32768
|
||||
input_price: 2
|
||||
output_price: 8
|
||||
supports_vision: true
|
||||
supports_function_calling: true
|
||||
3
arch-user/config/aichat/roles/ds.md
Normal file
3
arch-user/config/aichat/roles/ds.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
model: openrouter:deepseek/deepseek-v3.2-exp
|
||||
---
|
||||
3
arch-user/config/aichat/roles/gpt.md
Normal file
3
arch-user/config/aichat/roles/gpt.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
model: openrouter:openai/gpt-4.1
|
||||
---
|
||||
3
arch-user/config/aichat/roles/sonnet.md
Normal file
3
arch-user/config/aichat/roles/sonnet.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
model: openrouter:anthropic/claude-sonnet-4.5
|
||||
---
|
||||
114
arch-user/config/alacritty/alacritty.toml.tmpl
Normal file
114
arch-user/config/alacritty/alacritty.toml.tmpl
Normal file
@@ -0,0 +1,114 @@
|
||||
[bell]
|
||||
animation = "EaseOutExpo"
|
||||
duration = 0
|
||||
|
||||
[colors.bright]
|
||||
black = "#{{ .theme.color.bg }}"
|
||||
magenta = "#{{ .theme.color.fg_accent }}"
|
||||
white = "#{{ .theme.color.fg }}"
|
||||
|
||||
[colors.normal]
|
||||
black = "#{{ .theme.color.bg }}"
|
||||
blue = "#5dc5f8"
|
||||
cyan = "#24dfc4"
|
||||
green = "#35d450"
|
||||
magenta = "#{{ .theme.color.fg_accent }}"
|
||||
red = "#ff4d51"
|
||||
white = "#{{ .theme.color.fg }}"
|
||||
yellow = "#e9e836"
|
||||
|
||||
[colors.primary]
|
||||
background = "#{{ .theme.color.bg }}"
|
||||
foreground = "#{{ .theme.color.fg }}"
|
||||
|
||||
[colors.search.focused_match]
|
||||
background = "#{{ .theme.color.bg_accent_dark }}"
|
||||
foreground = "#{{ .theme.color.fg }}"
|
||||
|
||||
[colors.search.matches]
|
||||
background = "#{{ .theme.color.bg_accent_dark }}"
|
||||
foreground = "#{{ .theme.color.fg }}"
|
||||
|
||||
[cursor]
|
||||
blink_interval = 250
|
||||
vi_mode_style = "Block"
|
||||
|
||||
[font]
|
||||
size={{ .theme.font.size_base_pt }}
|
||||
|
||||
[font.normal]
|
||||
family = "{{ .theme.font.name_mono }}"
|
||||
|
||||
[scrolling]
|
||||
history = 10000
|
||||
|
||||
[window]
|
||||
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"
|
||||
|
||||
@@ -2,12 +2,30 @@
|
||||
|
||||
[[ $- != *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
|
||||
PS1='\[\033[38;2;153;136;255m\]\u@\h:\W\$\[\033[0m\]\[\e[0;91m\]${?#0}\[\e[0m\] '
|
||||
|
||||
export FZF_COMPLETION_TRIGGER='*'
|
||||
eval "$(fzf --bash)"
|
||||
|
||||
PS0+='\e]133;C\e\\'
|
||||
command_done() {
|
||||
printf '\e]133;D\e\\'
|
||||
}
|
||||
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }command_done
|
||||
PS1='\[\033[1;95m\]\u@\h:\W\$\[\033[0m\]\[\033[1;91m\]${?#0}\[\033[0m\] '
|
||||
|
||||
@@ -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 }} \
|
||||
--ab #{{ .theme.color.bg }} \
|
||||
--hb #{{ .theme.color.bg }} \
|
||||
--fb #{{ .theme.color.bg }} \
|
||||
--tb #{{ .theme.color.bg }} \
|
||||
--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 }} \
|
||||
"
|
||||
1
arch-user/config/cliphist/config
Normal file
1
arch-user/config/cliphist/config
Normal file
@@ -0,0 +1 @@
|
||||
max-items 50
|
||||
25
arch-user/config/fontconfig/fonts.conf.tmpl
Normal file
25
arch-user/config/fontconfig/fonts.conf.tmpl
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer><family>{{ .theme.font.name_regular }}</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer><family>{{ .theme.font.name_regular }}</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer><family>{{ .theme.font.name_mono }}</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>system-ui</family>
|
||||
<prefer><family>{{ .theme.font.name_regular }}</family></prefer>
|
||||
</alias>
|
||||
<match target="pattern">
|
||||
<edit name="size" mode="append">
|
||||
<double>{{ .theme.font.size_base_pt }}</double>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
@@ -1,255 +0,0 @@
|
||||
# -*- 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=1000
|
||||
# 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
|
||||
|
||||
## 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=<regular0> <bright4> # black-on-bright-blue
|
||||
# search-box-no-match=<regular0> <regular1> # black-on-red
|
||||
# search-box-match=<regular0> <regular3> # black-on-yellow
|
||||
# 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=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
clipboard-copy=Control+c XF86Copy
|
||||
clipboard-paste=Control+v XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# search-start=Control+Shift+r
|
||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
||||
# font-decrease=Control+minus Control+KP_Subtract
|
||||
# font-reset=Control+0 Control+KP_0
|
||||
# spawn-terminal=Control+Shift+n
|
||||
# minimize=none
|
||||
# maximize=none
|
||||
# fullscreen=none
|
||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-selected=[xargs -r firefox] none
|
||||
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
|
||||
# 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=Control+Shift+u
|
||||
# noop=none
|
||||
|
||||
[search-bindings]
|
||||
# cancel=Control+g Control+c Escape
|
||||
# commit=Return
|
||||
# find-prev=Control+r
|
||||
# find-next=Control+s
|
||||
# cursor-left=Left Control+b
|
||||
# cursor-left-word=Control+Left Mod1+b
|
||||
# cursor-right=Right Control+f
|
||||
# cursor-right-word=Control+Right Mod1+f
|
||||
# cursor-home=Home Control+a
|
||||
# cursor-end=End Control+e
|
||||
# delete-prev=BackSpace
|
||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
||||
# delete-next=Delete
|
||||
# delete-next-word=Mod1+d Control+Delete
|
||||
# extend-char=Shift+Right
|
||||
# extend-to-word-boundary=Control+w Control+Shift+Right
|
||||
# extend-to-next-whitespace=Control+Shift+w
|
||||
# extend-line-down=Shift+Down
|
||||
# extend-backward-char=Shift+Left
|
||||
# extend-backward-to-word-boundary=Control+Shift+Left
|
||||
# extend-backward-to-next-whitespace=none
|
||||
# extend-line-up=Shift+Up
|
||||
clipboard-paste=Control+v Control+y XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# unicode-input=none
|
||||
# quit=none
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# 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
|
||||
1
arch-user/config/fzf/config
Normal file
1
arch-user/config/fzf/config
Normal file
@@ -0,0 +1 @@
|
||||
--color=base16
|
||||
1
arch-user/config/fzf/env.sh
Normal file
1
arch-user/config/fzf/env.sh
Normal file
@@ -0,0 +1 @@
|
||||
export FZF_DEFAULT_OPTS_FILE="$HOME/.config/fzf/config"
|
||||
@@ -5,3 +5,7 @@
|
||||
defaultBranch = main
|
||||
[pull]
|
||||
rebase = false
|
||||
[safe]
|
||||
directory = *
|
||||
[commit]
|
||||
gpgsign = true
|
||||
@@ -1 +1 @@
|
||||
pinentry-program ~/.local/bin/bemenu/pinentry.sh
|
||||
pinentry-program ~/.local/bin/menu/pinentry.sh
|
||||
|
||||
5
arch-user/config/gnupg/scdaemon.conf
Normal file
5
arch-user/config/gnupg/scdaemon.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
pcsc-driver /usr/lib/libpcsclite.so
|
||||
card-timeout 5
|
||||
disable-ccid
|
||||
allow-admin
|
||||
enable-pinpad-varlen
|
||||
@@ -1,24 +1,28 @@
|
||||
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
|
||||
signal=1
|
||||
|
||||
[login]
|
||||
label=👤
|
||||
command=echo "$USER@tty$XDG_VTNR"
|
||||
interval=once
|
||||
|
||||
[time]
|
||||
label=🕓
|
||||
command=date +"%Y-%m-%dT%H:%M:%SZ"
|
||||
@@ -1,9 +1,15 @@
|
||||
format=<b>%s - %a</b>\n%b
|
||||
font=Roboto 10
|
||||
format=<span size="{{ .theme.font.size_base_pt }}pt" weight="bold">%s - %a</span>\n%b
|
||||
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
|
||||
icon-border-radius=4
|
||||
border-color=#{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }}
|
||||
padding=5,10
|
||||
width=400
|
||||
width=600
|
||||
progress-color=#{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }}
|
||||
layer=overlay
|
||||
|
||||
[app-name=screenshot]
|
||||
default-timeout=10000
|
||||
|
||||
|
||||
16
arch-user/config/menu/base.runlist
Normal file
16
arch-user/config/menu/base.runlist
Normal file
@@ -0,0 +1,16 @@
|
||||
exec qutebrowser -R
|
||||
exec gimp
|
||||
exec telegram-desktop
|
||||
man man
|
||||
calc calc
|
||||
power suspend
|
||||
power poweroff
|
||||
power poweroff --check-inhibitors=no
|
||||
power logout
|
||||
power reboot
|
||||
pass pass
|
||||
pass pass otp
|
||||
pass pass info
|
||||
capture screenshot selection
|
||||
capture screenshot output
|
||||
capture pick-color
|
||||
15
arch-user/config/menu/env.sh.tmpl
Executable file
15
arch-user/config/menu/env.sh.tmpl
Executable 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" }} \
|
||||
"
|
||||
@@ -1,16 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PATH=$PATH:~/.local/bin
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
export WLR_RENDERER=vulkan
|
||||
#export WLR_RENDERER=vulkan
|
||||
export QT_STYLE_OVERRIDE=kvantum
|
||||
export GTK_THEME=Materia-dark
|
||||
|
||||
for fpath in ~/.config/*/env.sh; do
|
||||
. "$fpath"
|
||||
done
|
||||
|
||||
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
|
||||
|
||||
@@ -39,10 +39,13 @@ c.bindings.key_mappings.update(dict(zip("ьЬыЫфФпПбБжЖлЛуУяЯа
|
||||
############################################
|
||||
|
||||
# styles
|
||||
c.colors.webpage.preferred_color_scheme = 'dark'
|
||||
#c.colors.webpage.preferred_color_scheme = 'dark'
|
||||
c.colors.webpage.darkmode.enabled = True
|
||||
c.colors.webpage.darkmode.threshold.background = 128
|
||||
c.colors.webpage.darkmode.threshold.foreground = 127
|
||||
c.colors.webpage.bg = '#'+env['QB_THEME_COLOR_BG']
|
||||
c.fonts.default_family = 'Roboto'
|
||||
c.fonts.default_size = '12pt'
|
||||
##########################################
|
||||
|
||||
# search engines
|
||||
@@ -51,7 +54,6 @@ c.url.searchengines = {
|
||||
'!d': 'https://lite.duckduckgo.com/lite?&q={}',
|
||||
'!g': 'https://google.com/search?hl=en&q={}',
|
||||
'!y': 'https://ya.ru/search/?text={}',
|
||||
'!c': 'https://chat.openai.com/chat?q={}',
|
||||
}
|
||||
###########################################
|
||||
|
||||
@@ -60,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}")
|
||||
|
||||
@@ -6,6 +6,16 @@ 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
|
||||
@@ -15,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
|
||||
@@ -38,7 +50,7 @@ set keymap vi-command
|
||||
"\C-k":next-history
|
||||
# j -> e
|
||||
set keymap vi-insert
|
||||
"\C-e":self-insert
|
||||
"\C-j":self-insert
|
||||
set keymap vi-command
|
||||
"j":vi-end-word
|
||||
"J":vi-end-word
|
||||
@@ -53,3 +65,9 @@ set keymap vi-insert
|
||||
"\C-h":operate-and-get-next
|
||||
|
||||
#################################
|
||||
|
||||
########### custom ##############
|
||||
$if qalc
|
||||
set show-mode-in-prompt off
|
||||
$endif
|
||||
#################################
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# vim: filetype=swayconfig
|
||||
|
||||
set $mod Mod4
|
||||
set $altmod Mod4+Mod5
|
||||
set $altmod2 Mod4+Shift
|
||||
set $altmod Mod4+Shift
|
||||
set $altmod2 Mod4+Mod5
|
||||
set $kbmod Alt_R
|
||||
set $fwd m
|
||||
set $left n
|
||||
@@ -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.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.low 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.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,27 +75,73 @@ bindgesture swipe:left workspace next
|
||||
############################################
|
||||
|
||||
############### containers #################
|
||||
# top row - layouts
|
||||
bindsym --to-code {
|
||||
$mod+p layout splith
|
||||
$altmod+p split h
|
||||
$mod+l layout splitv
|
||||
$altmod+l split v
|
||||
$mod+f fullscreen
|
||||
$mod+w layout tabbed
|
||||
$altmod+w split v; layout tabbed
|
||||
$mod+u split none
|
||||
$mod+y layout stacking
|
||||
$altmod+y split h; layout stacking
|
||||
$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
|
||||
}
|
||||
# mid row - focus, movement
|
||||
bindsym --to-code {
|
||||
$mod+$fwd focus child
|
||||
$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
|
||||
$mod+f fullscreen
|
||||
$mod+w layout stacking
|
||||
$altmod+w split v; layout stacking
|
||||
$mod+q split v; layout stacking
|
||||
$mod+u split none
|
||||
$altmod+u split none
|
||||
$mod+y layout tabbed
|
||||
$altmod+y split h; layout tabbed
|
||||
$mod+j focus parent
|
||||
}
|
||||
bindsym --to-code {
|
||||
$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
|
||||
@@ -102,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+x sticky enable; move scratchpad
|
||||
$mod+z focus tiling
|
||||
$altmod+z focus floating; floating disable; sticky disable
|
||||
$altmod+d sticky enable; move scratchpad
|
||||
$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
|
||||
############################################
|
||||
@@ -125,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%+
|
||||
@@ -132,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
|
||||
##############################################
|
||||
#############################################
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
timeout 280 'notify-send "Suspend in 20s" "Produce some acivity or run inhibit to cancel" -a "idle" -t 20000'
|
||||
timeout 300 'systemctl suspend'
|
||||
timeout 280 '[ "$(cat /sys/class/power_supply/AC/online 2>/dev/null)" = "0" ] && notify-send "Suspend in 20s" "Produce some acivity or run inhibit to cancel" -a "idle" -t 20000 -h string:x-canonical-private-synchronous:inactivity' resume '[ "$(cat /sys/class/power_supply/AC/online 2>/dev/null)" = "0" ] && notify-send "" -a "idle" -t 1 -h string:x-canonical-private-synchronous:inactivity'
|
||||
timeout 300 '[ "$(cat /sys/class/power_supply/AC/online 2>/dev/null)" = "0" ] && systemctl suspend'
|
||||
timeout 1780 'notify-send "Suspend in 20s" "Produce some acivity or run inhibit to cancel" -a "idle" -t 20000 -h string:x-canonical-private-synchronous:inactivity' resume 'notify-send "" -a "idle" -t 1 -h string:x-canonical-private-synchronous:inactivity'
|
||||
timeout 1800 'systemctl suspend'
|
||||
|
||||
@@ -46,6 +46,31 @@ 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 ###############
|
||||
@@ -68,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
|
||||
@@ -93,6 +118,15 @@ 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!
|
||||
@@ -111,7 +145,7 @@ noremap! <C-е> <C-ж>
|
||||
" i -> k
|
||||
noremap и к
|
||||
noremap И К
|
||||
noremap! <C-и> <C-к>
|
||||
"noremap! <C-и> <C-к> " breaks tab
|
||||
" o -> l
|
||||
noremap о л
|
||||
noremap О Л
|
||||
11
arch-user/config/workspace-compat/bashrc
Normal file
11
arch-user/config/workspace-compat/bashrc
Normal 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
|
||||
}
|
||||
1
arch-user/config/workspace-compat/env.sh
Normal file
1
arch-user/config/workspace-compat/env.sh
Normal file
@@ -0,0 +1 @@
|
||||
export WSCOMPAT_DIR=~/.config/workspace-compat
|
||||
41
arch-user/config/workspace-compat/profile.tmpl
Normal file
41
arch-user/config/workspace-compat/profile.tmpl
Normal 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"
|
||||
@@ -1,2 +1,5 @@
|
||||
GIT_USER_EMAIL=
|
||||
GIT_USER_NAME=
|
||||
BACKUP_KEY_VOL_UUID=
|
||||
BACKUP_DATA_VOL_UUID=
|
||||
AI_OPENROUTER_KEY=
|
||||
|
||||
@@ -16,7 +16,7 @@ xkb_symbols "yurmak" {
|
||||
replace key <LCTL> { [ Super_L ] };
|
||||
replace key <LWIN> { [ Alt_R ] };
|
||||
replace key <LALT> { [ ISO_Level3_Shift ] };
|
||||
replace key <RALT> { [ ALT_L ] };
|
||||
replace key <RALT> { [ Alt_L ] };
|
||||
#####################################
|
||||
|
||||
########### characters ##############
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -1,55 +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
|
||||
#################################
|
||||
|
||||
##### 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-e":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
|
||||
|
||||
#################################
|
||||
@@ -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
|
||||
############################
|
||||
@@ -1,139 +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
|
||||
|
||||
"###########################################
|
||||
|
||||
"############## 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>
|
||||
|
||||
"#################################
|
||||
|
||||
"####### 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 #############
|
||||
|
||||
"################################
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
export BASIC_PACMAN="vim less"
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user