home: themes: setup theme types for i3
This commit is contained in:
parent
0cdb05ecf1
commit
8dff0e21e1
|
@ -4,6 +4,7 @@
|
|||
./emacs.nix
|
||||
./flameshot.nix
|
||||
./secrets
|
||||
./themes
|
||||
./tmux.nix
|
||||
./x
|
||||
];
|
||||
|
|
9
home/themes/color.nix
Normal file
9
home/themes/color.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ lib }:
|
||||
let
|
||||
mkColorOption = with lib; {default ? "#000000", description ? "" }: mkOption {
|
||||
inherit description default;
|
||||
example = "#abcdef";
|
||||
type = types.strMatching "#[0-9a-f]{6}";
|
||||
};
|
||||
in
|
||||
mkColorOption
|
22
home/themes/default.nix
Normal file
22
home/themes/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
themeType = types.submodule {
|
||||
options = {
|
||||
i3Theme = mkOption {
|
||||
type = import ./i3.nix { inherit lib; };
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.home = {
|
||||
theme = mkOption {
|
||||
type = themeType;
|
||||
};
|
||||
|
||||
themes = mkOption {
|
||||
type = with types; attrsOf themeType;
|
||||
};
|
||||
};
|
||||
}
|
183
home/themes/i3.nix
Normal file
183
home/themes/i3.nix
Normal file
|
@ -0,0 +1,183 @@
|
|||
{ lib }:
|
||||
with lib;
|
||||
let
|
||||
mkColorOption = import ./color.nix { inherit lib; };
|
||||
|
||||
barColorSetModule = types.submodule {
|
||||
options = {
|
||||
border = mkColorOption {};
|
||||
background = mkColorOption {};
|
||||
text = mkColorOption {};
|
||||
};
|
||||
};
|
||||
|
||||
colorSetModule = types.submodule {
|
||||
options = {
|
||||
border = mkColorOption {};
|
||||
childBorder = mkColorOption {};
|
||||
background = mkColorOption {};
|
||||
text = mkColorOption {};
|
||||
indicator = mkColorOption {};
|
||||
};
|
||||
};
|
||||
in
|
||||
types.submodule {
|
||||
options = {
|
||||
bar = mkOption {
|
||||
type = types.submodule {
|
||||
options = {
|
||||
background = mkColorOption {
|
||||
default = "#000000";
|
||||
description = "Background color of the bar.";
|
||||
};
|
||||
|
||||
statusline = mkColorOption {
|
||||
default = "#ffffff";
|
||||
description = "Text color to be used for the statusline.";
|
||||
};
|
||||
|
||||
separator = mkColorOption {
|
||||
default = "#666666";
|
||||
description = "Text color to be used for the separator.";
|
||||
};
|
||||
|
||||
focusedWorkspace = mkOption {
|
||||
type = barColorSetModule;
|
||||
default = {
|
||||
border = "#4c7899";
|
||||
background = "#285577";
|
||||
text = "#ffffff";
|
||||
};
|
||||
description = ''
|
||||
Border, background and text color for a workspace button when the workspace has focus.
|
||||
'';
|
||||
};
|
||||
|
||||
activeWorkspace = mkOption {
|
||||
type = barColorSetModule;
|
||||
default = {
|
||||
border = "#333333";
|
||||
background = "#5f676a";
|
||||
text = "#ffffff";
|
||||
};
|
||||
description = ''
|
||||
Border, background and text color for a workspace button when the workspace is active.
|
||||
'';
|
||||
};
|
||||
|
||||
inactiveWorkspace = mkOption {
|
||||
type = barColorSetModule;
|
||||
default = {
|
||||
border = "#333333";
|
||||
background = "#222222";
|
||||
text = "#888888";
|
||||
};
|
||||
description = ''
|
||||
Border, background and text color for a workspace button when the workspace does not
|
||||
have focus and is not active.
|
||||
'';
|
||||
};
|
||||
|
||||
urgentWorkspace = mkOption {
|
||||
type = barColorSetModule;
|
||||
default = {
|
||||
border = "#2f343a";
|
||||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
};
|
||||
description = ''
|
||||
Border, background and text color for a workspace button when the workspace contains
|
||||
a window with the urgency hint set.
|
||||
'';
|
||||
};
|
||||
|
||||
bindingMode = mkOption {
|
||||
type = barColorSetModule;
|
||||
default = {
|
||||
border = "#2f343a";
|
||||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
};
|
||||
description =
|
||||
"Border, background and text color for the binding mode indicator";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
background = mkOption {
|
||||
type = types.str;
|
||||
default = "#ffffff";
|
||||
description = ''
|
||||
Background color of the window. Only applications which do not cover
|
||||
the whole area expose the color.
|
||||
'';
|
||||
};
|
||||
|
||||
focused = mkOption {
|
||||
type = colorSetModule;
|
||||
default = {
|
||||
border = "#4c7899";
|
||||
background = "#285577";
|
||||
text = "#ffffff";
|
||||
indicator = "#2e9ef4";
|
||||
childBorder = "#285577";
|
||||
};
|
||||
description = "A window which currently has the focus.";
|
||||
};
|
||||
|
||||
focusedInactive = mkOption {
|
||||
type = colorSetModule;
|
||||
default = {
|
||||
border = "#333333";
|
||||
background = "#5f676a";
|
||||
text = "#ffffff";
|
||||
indicator = "#484e50";
|
||||
childBorder = "#5f676a";
|
||||
};
|
||||
description = ''
|
||||
A window which is the focused one of its container,
|
||||
but it does not have the focus at the moment.
|
||||
'';
|
||||
};
|
||||
|
||||
unfocused = mkOption {
|
||||
type = colorSetModule;
|
||||
default = {
|
||||
border = "#333333";
|
||||
background = "#222222";
|
||||
text = "#888888";
|
||||
indicator = "#292d2e";
|
||||
childBorder = "#222222";
|
||||
};
|
||||
description = "A window which is not focused.";
|
||||
};
|
||||
|
||||
urgent = mkOption {
|
||||
type = colorSetModule;
|
||||
default = {
|
||||
border = "#2f343a";
|
||||
background = "#900000";
|
||||
text = "#ffffff";
|
||||
indicator = "#900000";
|
||||
childBorder = "#900000";
|
||||
};
|
||||
description = "A window which has its urgency hint activated.";
|
||||
};
|
||||
|
||||
placeholder = mkOption {
|
||||
type = colorSetModule;
|
||||
default = {
|
||||
border = "#000000";
|
||||
background = "#0c0c0c";
|
||||
text = "#ffffff";
|
||||
indicator = "#000000";
|
||||
childBorder = "#0c0c0c";
|
||||
};
|
||||
description = ''
|
||||
Background and text color are used to draw placeholder window
|
||||
contents (when restoring layouts). Border and indicator are ignored.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue