initial laptop sync

This commit is contained in:
2026-03-11 13:14:14 +01:00
parent 528897b4af
commit 24173efbf6
5 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Squeekboard on-screen keyboard
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
Environment=DISPLAY=:0
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Type=simple
ExecStart=/usr/bin/squeekboard
Restart=on-failure
RestartSec=1
[Install]
WantedBy=graphical-session.target

52
.local/bin/lisgd-niri.sh Executable file
View File

@@ -0,0 +1,52 @@
#!/usr/bin/env bash
DEVICE=/dev/input/by-path/pci-0000:00:15.0-platform-i2c_designware.0-event
ORIENTATION=${ORIENTATION:-normal}
echo "Starting lisgd with orientation: $ORIENTATION" >> /tmp/lisgd.log
if [[ $ORIENTATION == "normal" ]]; then
niri msg output eDP-1 transform normal
elif [[ $ORIENTATION == "270" ]]; then
niri msg output eDP-1 transform 270
elif [[ $ORIENTATION == "inverted" ]]; then
niri msg output eDP-1 transform inverted
elif [[ $ORIENTATION == "90" ]]; then
niri msg output eDP-1 transform 90
else
echo "Unknown orientation: $ORIENTATION" >> /tmp/lisgd.log
fi
stop_lisgd() {
pkill -f "lisgd -d $DEVICE" 2>/dev/null
}
start_lisgd() {
echo "Starting lisgd for device: $DEVICE" >> /tmp/lisgd.log
stop_lisgd
sleep 0.1
lisgd -d "$DEVICE" -t 10 -T 5 \
-g "4,DU,*,*,niri msg action open-overview" \
-g "1,DU,B,*,niri msg action open-overview" \
-g "3,LR,*,*,niri msg action focus-column-left" \
-g "3,RL,*,*,niri msg action focus-column-right" \
-g "3,DU,*,*,niri msg action focus-workspace-up" \
-g "3,UD,*,*,niri msg action focus-workspace-down" \
&
LISGD_PID=$!
echo "Started lisgd with PID: $LISGD_PID" >> /tmp/lisgd.log
}
cleanup() {
stop_lisgd
exit 0
}
trap cleanup SIGINT SIGTERM
start_lisgd

8
.local/bin/osk-toggle.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
current=$(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled)
if [ "$current" = "true" ]; then
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
else
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
fi

BIN
.local/bin/rot8 Executable file

Binary file not shown.

12
.local/bin/tablet-mode.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
ARG=$1
PATH=$PATH:~/.local/bin
if [[ $ARG == "on" ]]; then
rot8 --display eDP-1 --hooks /home/ficik/.local/bin/lisgd-niri.sh
else
pkill rot8
niri msg output eDP-1 transform normal
/home/ficik/.local/bin/lisgd-niri.sh
fi