mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
swayosd: add custom style option
This commit is contained in:
parent
33a20182e3
commit
bfa7c06436
2 changed files with 13 additions and 1 deletions
|
@ -26,6 +26,15 @@ in {
|
||||||
description = "OSD margin from top edge (0.5 would be screen center).";
|
description = "OSD margin from top edge (0.5 would be screen center).";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
stylePath = mkOption {
|
||||||
|
type = types.nullOr types.path;
|
||||||
|
default = null;
|
||||||
|
example = "/etc/xdg/swayosd/style.css";
|
||||||
|
description = ''
|
||||||
|
Use a custom Stylesheet file instead of looking for one.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
display = mkOption {
|
display = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -57,6 +66,8 @@ in {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${cfg.package}/bin/swayosd-server"
|
ExecStart = "${cfg.package}/bin/swayosd-server"
|
||||||
+ (optionalString (cfg.display != null) " --display ${cfg.display}")
|
+ (optionalString (cfg.display != null) " --display ${cfg.display}")
|
||||||
|
+ (optionalString (cfg.stylePath != null)
|
||||||
|
" --style ${escapeShellArg cfg.stylePath}")
|
||||||
+ (optionalString (cfg.topMargin != null)
|
+ (optionalString (cfg.topMargin != null)
|
||||||
" --top-margin ${toString cfg.topMargin}");
|
" --top-margin ${toString cfg.topMargin}");
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
outPath = "@swayosd@";
|
outPath = "@swayosd@";
|
||||||
};
|
};
|
||||||
display = "DISPLAY";
|
display = "DISPLAY";
|
||||||
|
stylePath = "/etc/xdg/swayosd/style.css";
|
||||||
topMargin = 0.1;
|
topMargin = 0.1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --top-margin 0.100000
|
ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --style '/etc/xdg/swayosd/style.css' --top-margin 0.100000
|
||||||
Restart=always
|
Restart=always
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue