Compare commits
39 Commits
bf5a01b1e7
...
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 |
@@ -6,19 +6,22 @@ PACKAGES=(
|
|||||||
|
|
||||||
linux base linux-firmware lvm2 sudo polkit # base
|
linux base linux-firmware lvm2 sudo polkit # base
|
||||||
pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management
|
pulseaudio pulseaudio-bluetooth bluez bluez-utils networkmanager udisks2 # device management
|
||||||
openssh strace sysstat htop screen man-db which rlwrap # system
|
openssh rsync strace sysstat htop screen man-db which dnsutils # system
|
||||||
|
|
||||||
nodejs dash jq # runtime
|
nodejs dash jq # runtime
|
||||||
qemu-system-x86 # virt
|
qemu-system-x86 # virt
|
||||||
|
postgresql #db
|
||||||
|
|
||||||
|
rlwrap fzf # shell helpers
|
||||||
vifm vim less # nav & edit
|
vifm vim less # nav & edit
|
||||||
vim-ale vim-fugitive # vim plugins
|
vim-ale vim-fugitive # vim plugins
|
||||||
|
|
||||||
just shellcheck # shell scripting
|
just shellcheck # shell scripting
|
||||||
git zip # data processing
|
git zip # storage
|
||||||
gnupg pass pass-otp # crypt
|
bc xxd # data processing
|
||||||
|
gnupg pass pass-otp pwgen # crypt
|
||||||
imv mpv imagemagick gimp # media
|
imv mpv imagemagick gimp # media
|
||||||
aichat libqalculate translate-shell # utils
|
aichat libqalculate translate-shell # utils
|
||||||
libreoffice-still # docs
|
libreoffice-still # docs
|
||||||
|
|
||||||
qutebrowser qt6-wayland # web browsing
|
qutebrowser qt6-wayland # web browsing
|
||||||
@@ -26,8 +29,8 @@ PACKAGES=(
|
|||||||
neomutt telegram-desktop # communication
|
neomutt telegram-desktop # communication
|
||||||
|
|
||||||
greetd sway swaybg swayidle # desktop basic
|
greetd sway swaybg swayidle # desktop basic
|
||||||
alacritty bemenu-wayland i3blocks mako libnotify # terminals, ui
|
alacritty wmenu i3blocks mako libnotify # terminals, ui
|
||||||
wev wl-clipboard wtype slurp grim # interaction
|
wev wl-clipboard cliphist wtype slurp grim # interaction
|
||||||
ttf-roboto ttf-roboto-mono otf-font-awesome # fonts
|
ttf-roboto ttf-roboto-mono otf-font-awesome # fonts
|
||||||
kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes
|
kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
role="$1"
|
role="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
session_ts="$(date +%s)"
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
aichat --role "$role" "$@"
|
aichat --save-session --session "$session_ts" --role "$role" "$@"
|
||||||
else
|
|
||||||
aichat --role "$role" --session
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
read -e -r -p "> " input
|
||||||
|
aichat --save-session --session "$session_ts" --role "$role" "$input"
|
||||||
|
done
|
||||||
|
|||||||
@@ -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"
|
|
||||||
@@ -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
|
|
||||||
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"
|
echo "🔌 $cap% ${w}W"
|
||||||
else
|
else
|
||||||
echo "🔋 $cap% ${w}W"
|
echo "🔋 $cap% ${w}W"
|
||||||
[ "$cap" -lt "15" ] && exit 33
|
if [ "$cap" -lt "15" ]; then
|
||||||
|
exit 33
|
||||||
|
fi
|
||||||
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
|
#!/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,
|
### This file is covered by the GNU General Public License,
|
||||||
### which should be included with libshell as the file LICENSE.
|
### which should be included with libshell as the file LICENSE.
|
||||||
### All copyright information are listed in the COPYING.
|
### All copyright information are listed in the COPYING.
|
||||||
@@ -6,13 +8,13 @@
|
|||||||
#exec 2>/tmp/pinentry.log
|
#exec 2>/tmp/pinentry.log
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
|
############################### PATCH #################################
|
||||||
|
. ~/.config/menu/env.sh
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
VERSION='1.0'
|
VERSION='1.0'
|
||||||
FLAVOR='bash'
|
FLAVOR='bash'
|
||||||
|
|
||||||
############################### PATCH #################################
|
|
||||||
. ~/.config/bemenu/env.sh
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
keyinfo=''
|
keyinfo=''
|
||||||
error=''
|
error=''
|
||||||
timeout=0
|
timeout=0
|
||||||
@@ -123,9 +125,8 @@ cmd_getpin()
|
|||||||
output="$(
|
output="$(
|
||||||
echo -n "|"
|
echo -n "|"
|
||||||
############################### PATCH #################################
|
############################### PATCH #################################
|
||||||
bemenu \
|
~/.local/bin/menu/horizontal.sh \
|
||||||
--password indicator \
|
-Pp "${prompt:-$def_prompt}" \
|
||||||
--prompt "${prompt:-$def_prompt}" \
|
|
||||||
</dev/null | tr -d '\n'
|
</dev/null | tr -d '\n'
|
||||||
ret=${PIPESTATUS[0]}
|
ret=${PIPESTATUS[0]}
|
||||||
# yad \
|
# yad \
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
shift
|
shift
|
||||||
query="$1"
|
query="$1"
|
||||||
if [ -z "$query" ]; then
|
if [ -z "$query" ]; then
|
||||||
query="$(echo "tui" | bemenu --prompt "qalc")"
|
query="$(echo "tui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
|
||||||
fi
|
fi
|
||||||
if [ "$query" = "tui" ]; then
|
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
|
elif [ -n "$query" ]; then
|
||||||
qalc_res="$(qalc --terse "$query")"
|
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
|
if [ "$qalc_res" = "$menu_res" ]; then
|
||||||
wl-copy "$qalc_res"
|
wl-copy "$qalc_res"
|
||||||
notify-send "$qalc_res" -a calc "Result copied to clipboard"
|
notify-send "$qalc_res" -a calc "Result copied to clipboard"
|
||||||
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"
|
||||||
@@ -3,10 +3,10 @@ set -e
|
|||||||
|
|
||||||
cd "$PASSWORD_STORE_DIR"
|
cd "$PASSWORD_STORE_DIR"
|
||||||
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
|
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
|
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";;
|
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";;
|
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
|
||||||
esac
|
esac
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
sure() {
|
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
|
case "$1" in
|
||||||
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
|
#!/bin/bash
|
||||||
|
|
||||||
out="$(printf '' | bemenu --prompt ':sway')"
|
out="$(printf '' | ~/.local/bin/menu/horizontal.sh -p ':sway')"
|
||||||
eval "executor_args=($out)"
|
eval "executor_args=($out)"
|
||||||
#shellcheck disable=SC2154
|
#shellcheck disable=SC2154
|
||||||
sway "${executor_args[@]}"
|
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
|
||||||
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
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
# see https://github.com/sigoden/aichat/blob/main/config.example.yaml
|
# see https://github.com/sigoden/aichat/blob/main/config.example.yaml
|
||||||
# see https://github.com/sigoden/aichat/blob/main/models.yaml
|
# see https://github.com/sigoden/aichat/blob/main/models.yaml
|
||||||
|
|
||||||
model: openrouter:anthropic/claude-sonnet-4
|
|
||||||
function_calling: false
|
|
||||||
|
|
||||||
clients:
|
clients:
|
||||||
|
|
||||||
- type: openai-compatible
|
- type: openai-compatible
|
||||||
@@ -12,22 +9,9 @@ clients:
|
|||||||
api_key: {{ .user.AI_OPENROUTER_KEY }}
|
api_key: {{ .user.AI_OPENROUTER_KEY }}
|
||||||
models:
|
models:
|
||||||
|
|
||||||
- name: anthropic/claude-opus-4
|
- name: anthropic/claude-sonnet-4.5
|
||||||
max_input_tokens: 200000
|
max_input_tokens: 350000
|
||||||
max_output_tokens: 20000
|
max_output_tokens: 65000
|
||||||
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
|
|
||||||
require_max_tokens: true
|
require_max_tokens: true
|
||||||
input_price: 3
|
input_price: 3
|
||||||
output_price: 15
|
output_price: 15
|
||||||
@@ -38,35 +22,15 @@ clients:
|
|||||||
reasoning:
|
reasoning:
|
||||||
effort: high
|
effort: high
|
||||||
|
|
||||||
- name: deepseek/deepseek-chat-v3.1
|
- name: deepseek/deepseek-v3.2-exp
|
||||||
max_input_tokens: 163840
|
max_input_tokens: 163840
|
||||||
input_price: 0.20
|
input_price: 0.20
|
||||||
output_price: 0.80
|
output_price: 0.40
|
||||||
patch:
|
patch:
|
||||||
body:
|
body:
|
||||||
reasoning:
|
reasoning:
|
||||||
effort: high
|
effort: high
|
||||||
|
|
||||||
- name: deepseek/deepseek-chat-v3.1:free
|
|
||||||
max_input_tokens: 163840
|
|
||||||
input_price: 0
|
|
||||||
output_price: 0
|
|
||||||
patch:
|
|
||||||
body:
|
|
||||||
reasoning:
|
|
||||||
effort: high
|
|
||||||
|
|
||||||
|
|
||||||
- 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: openai/gpt-4.1
|
- name: openai/gpt-4.1
|
||||||
max_input_tokens: 1047576
|
max_input_tokens: 1047576
|
||||||
max_output_tokens: 32768
|
max_output_tokens: 32768
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
model: openrouter:deepseek/deepseek-chat-v3.1:free
|
|
||||||
---
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
model: openrouter:deepseek/deepseek-chat-v3.1
|
model: openrouter:deepseek/deepseek-v3.2-exp
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
model: openrouter:anthropic/claude-opus-4
|
|
||||||
---
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
model: openrouter:anthropic/claude-sonnet-4
|
model: openrouter:anthropic/claude-sonnet-4.5
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -67,28 +67,28 @@ mods = "Alt"
|
|||||||
action = "ToggleViMode"
|
action = "ToggleViMode"
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "N"
|
key = "n"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "Left"
|
action = "Left"
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "E"
|
key = "e"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "Down"
|
action = "Down"
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "I"
|
key = "i"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "Up"
|
action = "Up"
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "O"
|
key = "o"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "Right"
|
action = "Right"
|
||||||
|
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "H"
|
key = "h"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "ToggleViMode"
|
action = "ToggleViMode"
|
||||||
|
|
||||||
@@ -103,12 +103,12 @@ mode = "Vi"
|
|||||||
action = "SearchPrevious"
|
action = "SearchPrevious"
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "J"
|
key = "j"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "SemanticRightEnd"
|
action = "SemanticRightEnd"
|
||||||
|
|
||||||
[[keyboard.bindings]]
|
[[keyboard.bindings]]
|
||||||
key = "i"
|
key = "l"
|
||||||
mode = "Vi"
|
mode = "Vi"
|
||||||
action = "ToggleViMode"
|
action = "ToggleViMode"
|
||||||
|
|
||||||
@@ -2,14 +2,27 @@
|
|||||||
|
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
shopt -s autocd
|
||||||
|
|
||||||
stty intr ^K
|
stty intr ^K
|
||||||
|
|
||||||
|
alias ssh='wssh'
|
||||||
|
alias sudo='wsudo'
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias node='NODE_NO_READLINE=1 rlwrap node'
|
alias node='NODE_NO_READLINE=1 rlwrap node'
|
||||||
|
|
||||||
|
alias d='cd ~/dev'
|
||||||
|
alias k='cd ~/know'
|
||||||
|
alias t='cd ~/tmp'
|
||||||
|
alias l='cd ~/lfs'
|
||||||
|
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
|
|
||||||
|
export FZF_COMPLETION_TRIGGER='*'
|
||||||
|
eval "$(fzf --bash)"
|
||||||
|
|
||||||
PS0+='\e]133;C\e\\'
|
PS0+='\e]133;C\e\\'
|
||||||
command_done() {
|
command_done() {
|
||||||
printf '\e]133;D\e\\'
|
printf '\e]133;D\e\\'
|
||||||
|
|||||||
@@ -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 }} \
|
|
||||||
"
|
|
||||||
1
arch-user/config/cliphist/config
Normal file
1
arch-user/config/cliphist/config
Normal file
@@ -0,0 +1 @@
|
|||||||
|
max-items 50
|
||||||
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
|
defaultBranch = main
|
||||||
[pull]
|
[pull]
|
||||||
rebase = false
|
rebase = false
|
||||||
|
[safe]
|
||||||
|
directory = *
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
@@ -1 +1 @@
|
|||||||
pinentry-program ~/.local/bin/bemenu/pinentry.sh
|
pinentry-program ~/.local/bin/menu/pinentry.sh
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
separator_block_width=20
|
separator_block_width=20
|
||||||
command=~/.local/bin/i3blocks/$BLOCK_NAME.sh
|
command=~/.local/bin/i3blocks/$BLOCK_NAME.sh
|
||||||
|
|
||||||
[weather]
|
[bandwidth]
|
||||||
label=⛅
|
interval=10
|
||||||
interval=3600
|
|
||||||
|
[volume]
|
||||||
|
interval=once
|
||||||
|
signal=2
|
||||||
|
|
||||||
{{ if file.Exists "/sys/class/power_supply/ACAD/" }}
|
{{ if file.Exists "/sys/class/power_supply/ACAD/" }}
|
||||||
[battery]
|
[battery]
|
||||||
interval=10
|
interval=10
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
[volume]
|
|
||||||
interval=once
|
|
||||||
signal=2
|
|
||||||
|
|
||||||
[xkb_layout]
|
[xkb_layout]
|
||||||
label=⌨
|
label=⌨
|
||||||
interval=once
|
interval=once
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
format=<span size="{{ .theme.font.size_base_pt }}pt" weight="bold">%s - %a</span>\n%b
|
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" }}
|
background-color=#{{ .theme.color.bg_accent_dark }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }}
|
||||||
border-size=2
|
border-size=2
|
||||||
border-radius=4
|
border-radius=4
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
exec qutebrowser
|
exec qutebrowser -R
|
||||||
exec gimp
|
exec gimp
|
||||||
exec sqlitebrowser
|
|
||||||
exec telegram-desktop
|
exec telegram-desktop
|
||||||
man man
|
man man
|
||||||
calc calc
|
calc calc
|
||||||
@@ -15,4 +14,3 @@ pass pass info
|
|||||||
capture screenshot selection
|
capture screenshot selection
|
||||||
capture screenshot output
|
capture screenshot output
|
||||||
capture pick-color
|
capture pick-color
|
||||||
float-sh nmtui
|
|
||||||
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" }} \
|
||||||
|
"
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
export PATH=~/.local/bin:$PATH
|
export PATH=~/.local/bin:$PATH
|
||||||
|
|
||||||
#export WLR_RENDERER=vulkan
|
#export WLR_RENDERER=vulkan
|
||||||
|
|
||||||
export QT_STYLE_OVERRIDE=kvantum
|
export QT_STYLE_OVERRIDE=kvantum
|
||||||
export GTK_THEME=Materia-dark
|
export GTK_THEME=Materia-dark
|
||||||
|
|
||||||
|
|||||||
@@ -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']
|
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}")
|
#print(f"Execution time {time.time() - start_ts}")
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ set keymap vi-command
|
|||||||
"n":backward-char
|
"n":backward-char
|
||||||
"\C-n":backward-char
|
"\C-n":backward-char
|
||||||
# e -> k (reverse swap)
|
# e -> k (reverse swap)
|
||||||
|
set keymap vi-insert
|
||||||
|
"\C-e":"\C-j"
|
||||||
set keymap vi-command
|
set keymap vi-command
|
||||||
"e":previous-history
|
"e":previous-history
|
||||||
"\C-e":kill-line
|
"\C-e":kill-line
|
||||||
@@ -63,3 +65,9 @@ set keymap vi-insert
|
|||||||
"\C-h":operate-and-get-next
|
"\C-h":operate-and-get-next
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
|
########### custom ##############
|
||||||
|
$if qalc
|
||||||
|
set show-mode-in-prompt off
|
||||||
|
$endif
|
||||||
|
#################################
|
||||||
|
|||||||
@@ -16,13 +16,14 @@ default_border pixel 2
|
|||||||
gaps inner 4
|
gaps inner 4
|
||||||
smart_borders on
|
smart_borders on
|
||||||
smart_gaps on
|
smart_gaps on
|
||||||
|
show_marks on
|
||||||
title_align center
|
title_align center
|
||||||
font pango:{{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }}
|
font pango:{{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }}
|
||||||
output * bg #{{ .theme.color.bg }} solid_color
|
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 #{{ .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_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.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.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.low 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.low 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 }}
|
client.urgent #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }}
|
||||||
bar {
|
bar {
|
||||||
position top
|
position top
|
||||||
@@ -38,7 +39,7 @@ bar {
|
|||||||
separator #{{ .theme.color.fg_dark }}
|
separator #{{ .theme.color.fg_dark }}
|
||||||
focused_workspace #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }}
|
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 }}
|
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 }}
|
binding_mode #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,9 +75,53 @@ bindgesture swipe:left workspace next
|
|||||||
############################################
|
############################################
|
||||||
|
|
||||||
############### containers #################
|
############### containers #################
|
||||||
# top row - layouts
|
|
||||||
bindsym --to-code {
|
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
|
$altmod+p split v
|
||||||
$mod+l layout splith
|
$mod+l layout splith
|
||||||
$altmod+l split h
|
$altmod+l split h
|
||||||
@@ -88,15 +133,15 @@ bindsym --to-code {
|
|||||||
$altmod+u split none
|
$altmod+u split none
|
||||||
$mod+y layout tabbed
|
$mod+y layout tabbed
|
||||||
$altmod+y split h; layout tabbed
|
$altmod+y split h; layout tabbed
|
||||||
|
$mod+j focus parent
|
||||||
}
|
}
|
||||||
# mid row - focus, movement
|
|
||||||
bindsym --to-code {
|
bindsym --to-code {
|
||||||
$mod+$fwd focus child
|
$mod+$fwd exec ~/.local/bin/sway/focus-cousin.sh prev
|
||||||
$mod+$left focus left
|
$mod+$left focus left
|
||||||
$mod+$up focus up
|
$mod+$up focus up
|
||||||
$mod+$down focus down
|
$mod+$down focus down
|
||||||
$mod+$right focus right
|
$mod+$right focus right
|
||||||
$mod+$bwd focus parent
|
$mod+$bwd exec ~/.local/bin/sway/focus-cousin.sh next
|
||||||
$altmod+$left move left 40px
|
$altmod+$left move left 40px
|
||||||
$altmod+$up move up 40px
|
$altmod+$up move up 40px
|
||||||
$altmod+$down move down 40px
|
$altmod+$down move down 40px
|
||||||
@@ -106,21 +151,29 @@ bindsym --to-code {
|
|||||||
$altmod2+$down resize grow height 4ppt or 40px
|
$altmod2+$down resize grow height 4ppt or 40px
|
||||||
$altmod2+$right resize grow width 2ppt or 40px
|
$altmod2+$right resize grow width 2ppt or 40px
|
||||||
}
|
}
|
||||||
# bottom row - 3d
|
|
||||||
bindsym --to-code {
|
bindsym --to-code {
|
||||||
$mod+d scratchpad show
|
$mod+d scratchpad show
|
||||||
$altmod+d sticky enable; move scratchpad
|
$altmod+d sticky enable; move scratchpad
|
||||||
$mod+z focus tiling
|
$mod+k focus tiling
|
||||||
$altmod+z focus floating; floating disable; sticky disable
|
$altmod+k focus floating; floating disable; sticky disable
|
||||||
$mod+h focus floating
|
$mod+h focus floating
|
||||||
$altmod+h floating enable; sticky enable
|
$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+x exec wtype -M ctrl x -m ctrl
|
||||||
$mod+c exec wtype -M ctrl c -m ctrl
|
$mod+c exec wtype -M ctrl c -m ctrl
|
||||||
$mod+v exec wtype -M ctrl v -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
|
floating_modifier $mod normal
|
||||||
############################################
|
############################################
|
||||||
@@ -129,6 +182,11 @@ floating_modifier $mod normal
|
|||||||
bindsym --to-code {
|
bindsym --to-code {
|
||||||
# generic
|
# generic
|
||||||
$mod+Escape kill
|
$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
|
# media
|
||||||
XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%-
|
XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%-
|
||||||
XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+
|
XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+
|
||||||
@@ -136,10 +194,7 @@ bindsym --to-code {
|
|||||||
XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks
|
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
|
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
|
XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks
|
||||||
# basic scripts
|
XF86Calculator exec .local/bin/menu/run-calc.sh calc tui
|
||||||
$mod+Return exec alacritty msg create-window
|
|
||||||
$mod+Colon exec ~/.local/bin/sway/command-mode.sh
|
|
||||||
$mod+Space exec ~/.local/bin/bemenu/run.sh
|
|
||||||
}
|
}
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
@@ -147,6 +202,7 @@ bindsym --to-code {
|
|||||||
exec mako
|
exec mako
|
||||||
exec swayidle
|
exec swayidle
|
||||||
exec alacritty --daemon
|
exec alacritty --daemon
|
||||||
|
exec wl-paste --watch cliphist store
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
############## app-specific ##################
|
############## app-specific ##################
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ noremap! <C-e> <C-j>
|
|||||||
" i -> k
|
" i -> k
|
||||||
noremap i k
|
noremap i k
|
||||||
noremap I K
|
noremap I K
|
||||||
noremap! <C-i> <C-k>
|
"noremap! <C-i> <C-k> " breaks tab
|
||||||
" o -> l
|
" o -> l
|
||||||
noremap o l
|
noremap o l
|
||||||
noremap O L
|
noremap O L
|
||||||
@@ -145,7 +145,7 @@ noremap! <C-е> <C-ж>
|
|||||||
" i -> k
|
" i -> k
|
||||||
noremap и к
|
noremap и к
|
||||||
noremap И К
|
noremap И К
|
||||||
noremap! <C-и> <C-к>
|
"noremap! <C-и> <C-к> " breaks tab
|
||||||
" o -> l
|
" o -> l
|
||||||
noremap о л
|
noremap о л
|
||||||
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,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 #############
|
########## scripts #############
|
||||||
cp -rf bin/* ~/.local/bin
|
cp -rf bin/* ~/.local/bin
|
||||||
|
|
||||||
LN_EXCLUDE_DIRS=(i3blocks bemenu sway)
|
LN_EXCLUDE_DIRS=(i3blocks menu sway)
|
||||||
|
|
||||||
ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} "
|
ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} "
|
||||||
for sdir in bin/*; do
|
for sdir in bin/*; do
|
||||||
@@ -71,8 +71,8 @@ gomplate --input-dir config \
|
|||||||
--plugin jq=/bin/jq \
|
--plugin jq=/bin/jq \
|
||||||
-c theme=config/theme.json \
|
-c theme=config/theme.json \
|
||||||
-c user="file:///$HOME/.config/workspace.conf?type=application/x-env" \
|
-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/bash/bashrc ~/.bashrc
|
||||||
ln -sf ~/.config/profile ~/.profile
|
ln -sf ~/.config/profile ~/.profile
|
||||||
ln -sf ~/.config/less/lesskey ~/.lesskey
|
ln -sf ~/.config/less/lesskey ~/.lesskey
|
||||||
@@ -80,7 +80,16 @@ mkdir -p ~/.gnupg && ln -sf ~/.config/gnupg/gpg-agent.conf ~/.gnupg
|
|||||||
################################
|
################################
|
||||||
|
|
||||||
############# data ############
|
############# 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
|
swaymsg reload || true
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
#################################
|
|
||||||
@@ -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,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 #############
|
|
||||||
|
|
||||||
"################################
|
|
||||||
@@ -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