Add niri for yoga
This commit is contained in:
parent
0103e72ee6
commit
c00150dd95
|
@ -1,5 +1,20 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
iio-sway = pkgs.stdenv.mkDerivation {
|
||||
name = "iio-sway";
|
||||
version = "0.0.1";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "okeri";
|
||||
repo = "iio-sway";
|
||||
rev = "e07477d1b2478fede1446e97424a94c80767819d";
|
||||
hash = "sha256-JGacKajslCOvd/BFfFSf7s1/hgF6rJqJ6H6xNnsuMb4=";
|
||||
};
|
||||
buildInputs = with pkgs; [ dbus ];
|
||||
nativeBuildInputs = with pkgs; [ meson ninja pkg-config ];
|
||||
meta.mainProgram = "iio-sway";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Common configuration
|
||||
|
@ -49,25 +64,23 @@
|
|||
|
||||
startup = [
|
||||
# rotation
|
||||
(
|
||||
let
|
||||
iio-sway = pkgs.stdenv.mkDerivation {
|
||||
name = "iio-sway";
|
||||
version = "0.0.1";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "okeri";
|
||||
repo = "iio-sway";
|
||||
rev = "e07477d1b2478fede1446e97424a94c80767819d";
|
||||
hash = "sha256-JGacKajslCOvd/BFfFSf7s1/hgF6rJqJ6H6xNnsuMb4=";
|
||||
};
|
||||
buildInputs = with pkgs; [ dbus ];
|
||||
nativeBuildInputs = with pkgs; [ meson ninja pkg-config ];
|
||||
};
|
||||
in
|
||||
{ command = "${iio-sway}/bin/iio-sway"; }
|
||||
)
|
||||
{ command = "${lib.getExe iio-sway}"; }
|
||||
];
|
||||
};
|
||||
programs.my-niri.enable = true;
|
||||
programs.niri.settings = {
|
||||
# input.keyboard.xkb.options = "ctrl:swapcaps";
|
||||
input.mouse = lib.mkForce {
|
||||
# Make M575 fast for now
|
||||
accel-profile = "adaptive";
|
||||
accel-speed = 0.4;
|
||||
};
|
||||
input.touch.map-to-output = "eDP-1";
|
||||
switch-events = with config.lib.niri.actions; {
|
||||
tablet-mode-on.action = spawn "systemctl" "--user" "kill" "--signal" "SIGUSR2" "wvkbd";
|
||||
tablet-mode-off.action = spawn "systemctl" "--user" "kill" "--signal" "SIGUSR1" "wvkbd";
|
||||
};
|
||||
};
|
||||
## Virtual keyboard
|
||||
systemd.user.services.wvkbd = {
|
||||
Unit = {
|
||||
|
@ -99,7 +112,7 @@
|
|||
settings = [
|
||||
{
|
||||
profile.name = "undocked";
|
||||
profile.outputs = [{ criteria = "LVDS-1"; }];
|
||||
profile.outputs = [{ criteria = "eDP-1"; }];
|
||||
}
|
||||
{
|
||||
profile.name = "work-both";
|
||||
|
|
Loading…
Reference in a new issue