Add dynamic theming to fcitx5
This commit is contained in:
parent
c8e11c6fe5
commit
b93ae2556a
4 changed files with 91 additions and 18 deletions
BIN
fcitx5/arrow.png
Normal file
BIN
fcitx5/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 337 B |
|
@ -1,19 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
themes = ".local/share/fcitx5/themes/"; # fcitx5 theme folder
|
themeFolder = ".local/share/fcitx5/themes/Theme/";
|
||||||
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=";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
|
@ -22,10 +10,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
"${themes}Nord-Dark".source = "${nord}/Nord-Dark";
|
"${themeFolder}theme.conf".text = import ./theme.nix;
|
||||||
"${themes}Nord-Light".source = "${nord}/Nord-Light";
|
"${themeFolder}arrow.png".source = ./arrow.png;
|
||||||
"${themes}Gruvbox-Dark".source = "${gruvbox}/Gruvbox-Dark";
|
"${themeFolder}radio.png".source = ./radio.png;
|
||||||
"${themes}Gruvbox-Light".source = "${gruvbox}/Gruvbox-Light";
|
".config/fcitx5/conf/classicui.conf".text = "Theme=Theme";
|
||||||
".config/fcitx5/conf/classicui.conf".text = "Theme=Nord-Dark";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
fcitx5/radio.png
Normal file
BIN
fcitx5/radio.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 272 B |
86
fcitx5/theme.nix
Normal file
86
fcitx5/theme.nix
Normal file
|
@ -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…
Add table
Reference in a new issue