mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
tests/espanso: reorganize darwin and linux
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
c283a23ef6
commit
d2b2c72add
12 changed files with 37 additions and 19 deletions
|
|
@ -1,5 +0,0 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
|
||||
espanso-darwin-basic-configuration = ./basic-configuration.nix;
|
||||
}
|
||||
|
|
@ -52,10 +52,10 @@
|
|||
|
||||
configFile=home-files/.config/espanso/config/default.yml
|
||||
assertFileExists "$configFile"
|
||||
assertFileContent "$configFile" ${../espanso/basic-configuration.yaml}
|
||||
assertFileContent "$configFile" ${./basic-configuration.yaml}
|
||||
|
||||
matchFile=home-files/.config/espanso/match/base.yml
|
||||
assertFileExists "$matchFile"
|
||||
assertFileContent "$matchFile" ${../espanso/basic-matches.yaml}
|
||||
assertFileContent "$matchFile" ${./basic-matches.yaml}
|
||||
'';
|
||||
}
|
||||
3
tests/modules/services/espanso/darwin/default.nix
Normal file
3
tests/modules/services/espanso/darwin/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
espanso-basic-configuration = ./basic-configuration.nix;
|
||||
}
|
||||
|
|
@ -1,13 +1,3 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
espanso-basic-configuration = import ./basic-configuration.nix { };
|
||||
espanso-basic-configuration-wayland = import ./basic-configuration.nix {
|
||||
waylandSupport = true;
|
||||
x11Support = false;
|
||||
};
|
||||
espanso-basic-configuration-x11 = import ./basic-configuration.nix {
|
||||
waylandSupport = false;
|
||||
x11Support = true;
|
||||
};
|
||||
}
|
||||
(lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin (import ./darwin/default.nix))
|
||||
// (lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux (import ./linux/default.nix))
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
show_notifications: false
|
||||
18
tests/modules/services/espanso/linux/basic-matches.yaml
Normal file
18
tests/modules/services/espanso/linux/basic-matches.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
global_vars:
|
||||
- name: currentdate
|
||||
params:
|
||||
format: '%d/%m/%Y'
|
||||
type: date
|
||||
- name: currenttime
|
||||
params:
|
||||
format: '%R'
|
||||
type: date
|
||||
matches:
|
||||
- replace: It's {{currentdate}} {{currenttime}}
|
||||
trigger: :now
|
||||
- replace: 'line1
|
||||
|
||||
line2'
|
||||
trigger: :hello
|
||||
- regex: :hi(?P<person>.*)\.
|
||||
replace: Hi {{person}}!
|
||||
11
tests/modules/services/espanso/linux/default.nix
Normal file
11
tests/modules/services/espanso/linux/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
espanso-basic-configuration = import ./basic-configuration.nix { };
|
||||
espanso-basic-configuration-wayland = import ./basic-configuration.nix {
|
||||
waylandSupport = true;
|
||||
x11Support = false;
|
||||
};
|
||||
espanso-basic-configuration-x11 = import ./basic-configuration.nix {
|
||||
waylandSupport = false;
|
||||
x11Support = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue