Framework 12 Initial setup

This commit is contained in:
Aleksandr Lebedev 2025-07-13 20:37:21 +02:00
parent af5b392286
commit 3d0fdb6ac4
9 changed files with 294 additions and 9 deletions

View file

@ -0,0 +1,48 @@
/*
distancethreshold: Minimum cutoff for a gestures to take effect
degreesleniency: Offset degrees within which gesture is recognized (max=45)
timeoutms: Maximum duration for a gesture to take place in miliseconds
orientation: Number of 90 degree turns to shift gestures by
verbose: 1=enabled, 0=disabled; helpful for debugging
device: Path to the /dev/ filesystem device events should be read from
gestures: Array of gestures; binds num of fingers / gesturetypes to commands
Supported gestures: SwipeLR, SwipeRL, SwipeDU, SwipeUD,
SwipeDLUR, SwipeURDL, SwipeDRUL, SwipeULDR
*/
unsigned int distancethreshold = 125;
unsigned int distancethreshold_pressed = 60;
unsigned int degreesleniency = 15;
unsigned int timeoutms = 800;
unsigned int orientation = 0;
unsigned int verbose = 0;
double edgesizeleft = 50.0;
double edgesizetop = 50.0;
double edgesizeright = 50.0;
double edgesizebottom = 50.0;
double edgessizecaling = 1.0;
char *device = "/dev/input/touchscreen";
//Gestures can also be specified interactively from the command line using -g
Gesture gestures[] = {
/* nfingers gesturetype command */
//{1, SwipeLR, EdgeAny, DistanceAny, ActModeReleased, "niri msg action "},
//{1, SwipeRL, EdgeAny, DistanceAny, ActModeReleased,
// "xdotool key --clearmodifiers Alt+Shift+r"},
//{1, SwipeDLUR, EdgeAny, DistanceAny, ActModeReleased, "sxmo_vol.sh up"},
//{1, SwipeURDL, EdgeAny, DistanceAny, ActModeReleased, "sxmo_vol.sh down"},
//{1, SwipeDRUL, EdgeAny, DistanceAny, ActModeReleased,
// "sxmo_brightness.sh up"},
//{1, SwipeULDR, EdgeAny, DistanceAny, ActModeReleased,
//"sxmo_brightness.sh down"},
//{2, SwipeLR, EdgeAny, DistanceAny, ActModeReleased,
// "xdotool key --clearmodifiers Alt+e"},
//{2, SwipeRL, EdgeAny, DistanceAny, ActModeReleased,
// "xdotool key --clearmodifiers Alt+r"},
{2, SwipeDU, EdgeAny, DistanceAny, ActModeReleased,
"pidof wvkbd-mobintl || wvkbd-mobintl -l simple,special,emoji &"},
{2, SwipeUD, EdgeAny, DistanceAny, ActModeReleased,
"pkill -9 -f wvkbd-mobintl"},
{3, SwipeDU, EdgeAny, DistanceAny, ActModeReleased,
"niri msg action toggle-overview"},
};

View file

@ -0,0 +1,2 @@
{ pkgs }:
pkgs.lisgd.override { conf = ./lisgd-config.h; }

View file

@ -24,7 +24,9 @@
libnotify
hyprlock
networkmanagerapplet
];
] ++ lib.optionals (hwconfig.hasTouchscreen) (with pkgs;[
wvkbd # https://github.com/jjsullivan5196/wvkbd
]);
programs.niri = {
settings = {
outputs = lib.mkIf (hwconfig.hostname == "kylekrein-homepc") {
@ -47,8 +49,14 @@
"25%"
];
};
touchscreen-gestures = lib.mkIf (hwconfig.hasTouchscreen) {
command = [
"${lib.getExe (import ./lisgd.nix { inherit pkgs; })}" #https://git.sr.ht/~mil/lisgd
];
};
in [
set-low-brightness
touchscreen-gestures
{
command = [
"${lib.getExe pkgs.networkmanagerapplet}"