mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
rofi: add options to for location, xoffset & yoffset
This commit is contained in:
parent
2304c145f3
commit
6833f96c14
1 changed files with 36 additions and 0 deletions
|
@ -113,6 +113,17 @@ let
|
|||
(rowsColorsToString colors.rows)}
|
||||
'';
|
||||
|
||||
locationsMap = {
|
||||
center = 0;
|
||||
top-left = 1;
|
||||
top = 2;
|
||||
top-right = 3;
|
||||
right = 4;
|
||||
bottom-right = 5;
|
||||
bottom = 6;
|
||||
bottom-left = 7;
|
||||
left = 8;
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -195,6 +206,28 @@ in
|
|||
description = "Whether to run rofi fullscreen.";
|
||||
};
|
||||
|
||||
location = mkOption {
|
||||
default = "center";
|
||||
type = types.enum (builtins.attrNames locationsMap);
|
||||
description = "The location rofi appears on the screen.";
|
||||
};
|
||||
|
||||
xoffset = mkOption {
|
||||
default = 0;
|
||||
type = types.int;
|
||||
description = ''
|
||||
Offset in the x-axis in pixels relative to the chosen location.
|
||||
'';
|
||||
};
|
||||
|
||||
yoffset = mkOption {
|
||||
default = 0;
|
||||
type = types.int;
|
||||
description = ''
|
||||
Offset in the y-axis in pixels relative to the chosen location.
|
||||
'';
|
||||
};
|
||||
|
||||
colors = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr colorsSubmodule;
|
||||
|
@ -258,6 +291,9 @@ in
|
|||
${setOption "terminal" cfg.terminal}
|
||||
${setOption "cycle" cfg.cycle}
|
||||
${setOption "fullscreen" cfg.fullscreen}
|
||||
${setOption "location" (builtins.getAttr cfg.location locationsMap)}
|
||||
${setOption "xoffset" cfg.xoffset}
|
||||
${setOption "yoffset" cfg.yoffset}
|
||||
|
||||
${setColorScheme cfg.colors}
|
||||
|
||||
|
|
Loading…
Reference in a new issue