mirror of
https://github.com/nix-community/home-manager
synced 2024-12-28 04:39:48 +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).";
|
||||
};
|
||||
|
||||
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 {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
@ -57,6 +66,8 @@ in {
|
|||
Type = "simple";
|
||||
ExecStart = "${cfg.package}/bin/swayosd-server"
|
||||
+ (optionalString (cfg.display != null) " --display ${cfg.display}")
|
||||
+ (optionalString (cfg.stylePath != null)
|
||||
" --style ${escapeShellArg cfg.stylePath}")
|
||||
+ (optionalString (cfg.topMargin != null)
|
||||
" --top-margin ${toString cfg.topMargin}");
|
||||
Restart = "always";
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
outPath = "@swayosd@";
|
||||
};
|
||||
display = "DISPLAY";
|
||||
stylePath = "/etc/xdg/swayosd/style.css";
|
||||
topMargin = 0.1;
|
||||
};
|
||||
|
||||
|
@ -20,7 +21,7 @@
|
|||
WantedBy=graphical-session.target
|
||||
|
||||
[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
|
||||
Type=simple
|
||||
|
||||
|
|
Loading…
Reference in a new issue