uncommited

This commit is contained in:
Yuri Zamyatin 2025-09-29 12:23:34 +00:00
parent c9dbae4c0c
commit a833ef01eb
No known key found for this signature in database
GPG Key ID: 4009A4CD0333B579
5 changed files with 69 additions and 22 deletions

View File

@ -5,7 +5,7 @@ if [ $# -lt 1 ]; then
exit 1
fi
[ -z "$WSCOMPAT_MASTER" ] && WSCOMPAT_MASTER="$(whoami)"
read -r -d '' init_cmd << EOF_9oqn7IVF
read -r -d '' init_cmd << WSCOMPAT_EOF_9oqn7IVF
export WS_IS_COMPAT=1
export WSCOMPAT_MASTER="$WSCOMPAT_MASTER"
export WSCOMPAT_DIR="/tmp/wscompat_${WSCOMPAT_MASTER}_\$(whoami)"
@ -14,18 +14,20 @@ read -r -d '' init_cmd << EOF_9oqn7IVF
trap ws_cleanup EXIT
rm -rf "\$WSCOMPAT_DIR" && mkdir -p "\$WSCOMPAT_DIR" && chmod 700 "\$WSCOMPAT_DIR"
cat << 'EOF_84EbM3la' > "\$WSCOMPAT_DIR/profile"
cat << 'WSCOMPAT_EOF_84EbM3la' > "\$WSCOMPAT_DIR/profile"
$(
cat "$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 cat "$file"; fi
if [ -f "$file" ]; then
sed 's/WSCOMPAT_EOF_/WSCOMPAT_EOF__/g' "$file"
fi
done
)
EOF_84EbM3la
WSCOMPAT_EOF_84EbM3la
. \$WSCOMPAT_DIR/profile
# pam, systemd - wrap in login shell
exec /bin/bash --login --norc --noprofile -c "exec /bin/bash"
EOF_9oqn7IVF
WSCOMPAT_EOF_9oqn7IVF
ssh -t "$@" "$init_cmd"
/bin/ssh -t "$@" "$init_cmd"

View File

@ -77,9 +77,52 @@ bindgesture swipe:left workspace next
############### containers #################
# numeric row
bindsym --to-code {
$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
}
# numeric row
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
}
# top row - layouts
bindsym --to-code {
$mod+p layout splitv

View File

@ -1 +1 @@
export WSCOMPAT_DIR=~/.local/bin/workspace-compat
export WSCOMPAT_DIR=~/.config/workspace-compat

View File

@ -14,20 +14,22 @@ export PATH="$WSCOMPAT_DIR:$PATH"
stty intr ^K
export VIMINIT="source $WSCOMPAT_DIR/.vimrc"
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/.vimrc"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/.vimrc"
{{ template "vimrc" . }}
EOF_04tcIQE7
WSCOMPAT_EOF_04tcIQE7
export INPUTRC="$WSCOMPAT_DIR/.inputrc"
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/.inputrc"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/.inputrc"
{{ template "inputrc" . }}
EOF_04tcIQE7
WSCOMPAT_EOF_04tcIQE7
export LESSKEYIN="$WSCOMPAT_DIR/.lesskey"
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/.lesskey"
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/.lesskey"
{{ template "lesskey" . }}
EOF_04tcIQE7
WSCOMPAT_EOF_04tcIQE7
cat << 'EOF_04tcIQE7' > "$WSCOMPAT_DIR/wssh"
{{ tmpl.Exec "wssh" . | strings.ReplaceAll "EOF_" "EOF_1_" }}
EOF_04tcIQE7
cat << 'WSCOMPAT_EOF_04tcIQE7' > "$WSCOMPAT_DIR/wssh"
{{ template "wssh" . }}
WSCOMPAT_EOF_04tcIQE7
chmod +x "$WSCOMPAT_DIR/wssh"
#ln -s "$WSCOMPAT_DIR/wssh" "$WSCOMPAT_DIR/ssh"

View File

@ -8,7 +8,6 @@ set -e
cd "$(dirname "$(readlink -f -- "$0")")"
umask 002
[[ "$(id -u)" == "0" ]] && echo "ERROR: wrong user" >&1 && exit 1
export IS_COMPAT=0
########## init config #########
if [[ ! -f ~/.config/workspace.conf ]]; then
@ -49,7 +48,7 @@ mkdir -p "${USER_DIRS[@]}"
########## scripts #############
cp -rf bin/* ~/.local/bin
LN_EXCLUDE_DIRS=(i3blocks bemenu sway workspace-compat)
LN_EXCLUDE_DIRS=(i3blocks bemenu sway)
ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} "
for sdir in bin/*; do
@ -65,13 +64,14 @@ done
################################
########### config #############
export IS_COMPAT=0
gomplate --input-dir config \
--output-map "$HOME/.config/{{ .in | strings.ReplaceAll \".tmpl\" \"\" }}" \
--exclude-processing "!*.tmpl" \
--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/profile.tmpl
ln -sf ~/.config/bash/bashrc ~/.bashrc
ln -sf ~/.config/profile ~/.profile
@ -85,12 +85,12 @@ cp -rf data/* ~/.local/share
########### compat ############
export IS_COMPAT=1
gomplate --file bin/workspace-compat/profile.tmpl \
gomplate --file config/workspace-compat/profile.tmpl \
-t vimrc=config/vim/vimrc \
-t inputrc=config/readline/inputrc \
-t lesskey=config/less/lesskey \
-t wssh=bin/wssh \
--out ~/.local/bin/workspace-compat/profile
--out ~/.config/workspace-compat/profile
export IS_COMPAT=0
###############################