Mapped touchscreen to /dev/touchscreen, fixed touch gestures

But you're unable to unlock the framework12 without keyboard (virtual
keyboard doesn't appear)
This commit is contained in:
Aleksandr Lebedev 2025-07-31 00:24:05 +02:00
parent 45dbea7758
commit 40c709b116
4 changed files with 40 additions and 10 deletions

View file

@ -21,7 +21,7 @@ double edgesizetop = 50.0;
double edgesizeright = 50.0;
double edgesizebottom = 50.0;
double edgessizecaling = 1.0;
char *device = "/dev/input/event7";
char *device = "/dev/touchscreen";
// Gestures can also be specified interactively from the command line using -g
Gesture gestures[] = {
@ -33,20 +33,24 @@ Gesture gestures[] = {
"niri msg action focus-workspace-down"},
{1, SwipeUD, CornerTopRight, DistanceMedium, ActModeReleased,
"niri msg action focus-workspace-up"},
{1, SwipeDU, CornerBottomLeft, DistanceShort, ActModeReleased,
"niri msg action switch-preset-column-width"},
//{1, SwipeUD, EdgeTop, DistanceAny, ActModeReleased, "nwggrid -o 0.98"},
//"pkill -SIGRTMIN -f wvkbd"},
//{2, SwipeUD, EdgeAny, DistanceAny, ActModeReleased,
//"sway-interactive-screenshot -s focused-output"},
//"sway-interactive-screenshot -s focused-output"},
//{3, SwipeLR, EdgeAny, DistanceAny, ActModeReleased,
//"swaymsg layout tabbed"},
//"swaymsg layout tabbed"},
//{3, SwipeRL, EdgeAny, DistanceAny, ActModeReleased,
//"swaymsg layout toggle split"},
{2, SwipeUD, EdgeLeft, DistanceShort, ActModePressed, "niri msg action fullscreen-window"},
{2, SwipeUD, EdgeRight, DistanceMedium, ActModeReleased, "niri msg action close-window"},
//"swaymsg layout toggle split"},
{2, SwipeUD, EdgeLeft, DistanceShort, ActModePressed,
"niri msg action fullscreen-window"},
{2, SwipeUD, EdgeRight, DistanceMedium, ActModeReleased,
"niri msg action close-window"},
{2, SwipeDU, EdgeBottom, DistanceAny, ActModeReleased,
"pkill -34 -f wvkbd"},
//{2, SwipeUD, EdgeBottom, DistanceAny, ActModeReleased,
//"pkill -9 -f wvkbd-mobintl"},
//"pkill -9 -f wvkbd-mobintl"},
{3, SwipeDU, EdgeAny, DistanceAny, ActModeReleased,
"niri msg action toggle-overview"},
};

View file

@ -69,7 +69,7 @@ in {
};
touchscreen-gestures = lib.mkIf (hwconfig.hasTouchscreen) {
command = [
"while true; do ${lisgd-patched}/bin/lisgd; done" #https://git.sr.ht/~mil/lisgd
"${lisgd-patched}/bin/lisgd" #https://git.sr.ht/~mil/lisgd
];
};
touchscreen-keyboard = lib.mkIf (hwconfig.hasTouchscreen) {
@ -117,7 +117,7 @@ in {
}
{
command = [
"emacs"
"${config.programs.emacs.package}/bin/emacs"
"--daemon"
];
}
@ -228,6 +228,12 @@ in {
QT_QPA_PLATFORM = "wayland";
DISPLAY = ":0";
};
layer-rules = [
{
#this is for later to place keyboard on top of hyprlock
matches = [{namespace = "wvkbd";}];
}
];
window-rules = [
{
#active
@ -345,4 +351,19 @@ in {
};
};
};
systemd.user.services.lisgd-niri = lib.mkIf (hwconfig.hasTouchscreen) {
Unit = {
Description = "Makes sure that you have touchscreen gestures.";
};
Install = {
WantedBy = ["default.target"];
};
Service = {
ExecStart = "${pkgs.writeShellScript "run-lisgd" ''
${lisgd-patched}/bin/lisgd
''}";
Restart = "on-failure";
RestartSec = 5;
};
};
}