Add dynamic theming to fcitx5

inky
Elnu 2 years ago
parent c8e11c6fe5
commit b93ae2556a

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

@ -1,19 +1,7 @@
{ pkgs, ... }:
let
themes = ".local/share/fcitx5/themes/"; # fcitx5 theme folder
nord = pkgs.fetchFromGitHub {
owner = "tonyfettes";
repo = "fcitx5-nord";
rev = "bdaa8fb723b8d0b22f237c9a60195c5f9c9d74d1";
sha256 = "qVo/0ivZ5gfUP17G29CAW0MrRFUO0KN1ADl1I/rvchE=";
};
gruvbox = pkgs.fetchFromGitHub {
owner = "ayamir";
repo = "fcitx5-gruvbox";
rev = "80bd3ab4c723fc6fcc4a222b6cede6f8337eedda";
sha256 = "UZc6UTpodxP3pJ6q58FZsJaHr1Wwl/NLYYmo22QYmNk=";
};
themeFolder = ".local/share/fcitx5/themes/Theme/";
in
{
i18n.inputMethod = {
@ -22,10 +10,9 @@ in
};
home.file = {
"${themes}Nord-Dark".source = "${nord}/Nord-Dark";
"${themes}Nord-Light".source = "${nord}/Nord-Light";
"${themes}Gruvbox-Dark".source = "${gruvbox}/Gruvbox-Dark";
"${themes}Gruvbox-Light".source = "${gruvbox}/Gruvbox-Light";
".config/fcitx5/conf/classicui.conf".text = "Theme=Nord-Dark";
"${themeFolder}theme.conf".text = import ./theme.nix;
"${themeFolder}arrow.png".source = ./arrow.png;
"${themeFolder}radio.png".source = ./radio.png;
".config/fcitx5/conf/classicui.conf".text = "Theme=Theme";
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

@ -0,0 +1,86 @@
# Modified from https://github.com/tonyfettes/fcitx5-nord
let
colors = import ../colors;
background = "${colors.background-alt}80";
highlight = "${colors.background}";
in
''
[Metadata]
ScaleWithDPI=True
[InputPanel]
Font=Sans 13
NormalColor=${colors.foreground}
HighlightCandidateColor=${colors.foreground-bright};
HighlightColor=${colors.undefined}
HighlightBackgroundColor=${colors.undefined}
Spacing=3
[InputPanel/TextMargin]
Left=10
Right=10
Top=6
Bottom=6
[InputPanel/Background]
Color=${background}
[InputPanel/Background/Margin]
Left=2
Right=2
Top=2
Bottom=2
[InputPanel/Highlight]
Color=${highlight}
[InputPanel/Highlight/Margin]
Left=10
Right=10
Top=7
Bottom=7
[Menu]
Font=Sans 10
NormalColor=${colors.foreground}
Spacing=3
[Menu/Background]
Color=${background}
[Menu/Background/Margin]
Left=2
Right=2
Top=2
Bottom=2
[Menu/ContentMargin]
Left=2
Right=2
Top=2
Bottom=2
[Menu/Highlight]
Color=${highlight}
[Menu/Highlight/Margin]
Left=10
Right=10
Top=5
Bottom=5
[Menu/Separator]
Color=${highlight}
[Menu/CheckBox]
Image=radio.png
[Menu/SubMenu]
Image=arrow.png
[Menu/TextMargin]
Left=5
Right=5
Top=5
Bottom=5
''
Loading…
Cancel
Save