fctix5: init (#718)
Link: https://github.com/danth/stylix/pull/718 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
f48cab39ba
commit
911c07f40f
4 changed files with 481 additions and 0 deletions
84
modules/fcitx5/highlight.svg.mustache
Normal file
84
modules/fcitx5/highlight.svg.mustache
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
version="1.1"
|
||||
id="svg6"
|
||||
sodipodi:docname="highlight.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
viewBox="0 0 60 60"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs10">
|
||||
<inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect998"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,15,0,1 @ F,0,0,1,0,15,0,1 @ F,0,0,1,0,15,0,1 @ F,0,0,1,0,15,0,1"
|
||||
unit="px"
|
||||
method="arc"
|
||||
mode="F"
|
||||
radius="15"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" />
|
||||
<inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect996"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1 @ IC,0,0,1,0,0,0,1"
|
||||
unit="px"
|
||||
method="bezier"
|
||||
mode="F"
|
||||
radius="0"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview8"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="6.0512821"
|
||||
inkscape:cx="-6.9406779"
|
||||
inkscape:cy="29.663135"
|
||||
inkscape:window-width="1440"
|
||||
inkscape:window-height="834"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg6" />
|
||||
<path
|
||||
id="svg_1"
|
||||
width="40"
|
||||
height="40"
|
||||
x="10.000001"
|
||||
y="10.000001"
|
||||
fill="#015ad7"
|
||||
stroke="#000000"
|
||||
stroke-width="0"
|
||||
rx="0"
|
||||
sodipodi:type="rect"
|
||||
d="m 25.000001,10.000001 h 10 a 15,15 45 0 1 15,15 v 10 a 15,15 135 0 1 -15,15 h -10 a 15,15 45 0 1 -15,-15 v -10 a 15,15 135 0 1 15,-15 z"
|
||||
inkscape:path-effect="#path-effect998"
|
||||
style="fill:#{{base04-hex}};fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
33
modules/fcitx5/hm.nix
Normal file
33
modules/fcitx5/hm.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
# Adapted from https://github.com/sanweiya/fcitx5-mellow-themes under the BSD 2 license (compatible with this project's license (MIT))
|
||||
theme = config.lib.stylix.colors {
|
||||
template = ./theme.conf.mustache;
|
||||
extension = "conf";
|
||||
};
|
||||
highlight = config.lib.stylix.colors {
|
||||
template = ./highlight.svg.mustache;
|
||||
extension = "svg";
|
||||
};
|
||||
panel = config.lib.stylix.colors {
|
||||
template = ./panel.svg.mustache;
|
||||
extension = "svg";
|
||||
};
|
||||
in {
|
||||
options.stylix.targets.fcitx5.enable =
|
||||
config.lib.stylix.mkEnableTarget "fcitx5" true;
|
||||
|
||||
config =
|
||||
lib.mkIf
|
||||
(config.stylix.enable && config.stylix.targets.fcitx5.enable)
|
||||
{
|
||||
xdg.dataFile = {
|
||||
"fcitx5/themes/stylix/highlight.svg".source = highlight;
|
||||
"fcitx5/themes/stylix/panel.svg".source = panel;
|
||||
"fcitx5/themes/stylix/theme.conf".source = theme;
|
||||
};
|
||||
};
|
||||
}
|
||||
124
modules/fcitx5/panel.svg.mustache
Normal file
124
modules/fcitx5/panel.svg.mustache
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
version="1.1"
|
||||
id="svg7"
|
||||
sodipodi:docname="panel.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
viewBox="0 0 60 60"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs11">
|
||||
<inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect1"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,19,0,1 @ F,0,0,1,0,19,0,1 @ F,0,0,1,0,19,0,1 @ F,0,0,1,0,19,0,1"
|
||||
radius="9.5"
|
||||
unit="px"
|
||||
method="bezier"
|
||||
mode="F"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" />
|
||||
<inkscape:path-effect
|
||||
effect="fillet_chamfer"
|
||||
id="path-effect475"
|
||||
is_visible="true"
|
||||
lpeversion="1"
|
||||
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
||||
unit="px"
|
||||
method="auto"
|
||||
mode="F"
|
||||
radius="12"
|
||||
chamfer_steps="1"
|
||||
flexible="false"
|
||||
use_knot_distance="true"
|
||||
apply_no_radius="true"
|
||||
apply_with_radius="true"
|
||||
only_selected="false"
|
||||
hide_knots="false" />
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter480"
|
||||
x="-0.2"
|
||||
y="-0.2"
|
||||
width="1.4717949"
|
||||
height="1.4717949">
|
||||
<feFlood
|
||||
flood-opacity="0.498039"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood470" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite472" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="3"
|
||||
result="blur"
|
||||
id="feGaussianBlur474" />
|
||||
<feOffset
|
||||
dx="2.8"
|
||||
dy="2.8"
|
||||
result="offset"
|
||||
id="feOffset476" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite478" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview9"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.9"
|
||||
inkscape:cx="-36.949153"
|
||||
inkscape:cy="20.254237"
|
||||
inkscape:window-width="1440"
|
||||
inkscape:window-height="834"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g5" />
|
||||
<g
|
||||
id="g5">
|
||||
<title
|
||||
id="title2">Layer 1</title>
|
||||
<path
|
||||
id="svg_1"
|
||||
width="39"
|
||||
height="39"
|
||||
x="10.5"
|
||||
y="10.5"
|
||||
fill="#f0f0f0"
|
||||
stroke="#adadad"
|
||||
rx="0"
|
||||
style="fill:#{{base00-hex}};fill-opacity:1;stroke:#{{base01-hex}};stroke-width:1.2;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter480)"
|
||||
inkscape:path-effect="#path-effect1"
|
||||
sodipodi:type="rect"
|
||||
d="m 29.5,10.5 h 1 c 10.49341,0 19,8.50659 19,19 v 1 c 0,10.49341 -8.50659,19 -19,19 h -1 c -10.49341,0 -19,-8.50659 -19,-19 v -1 c 0,-10.49341 8.50659,-19 19,-19 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
240
modules/fcitx5/theme.conf.mustache
Normal file
240
modules/fcitx5/theme.conf.mustache
Normal file
|
|
@ -0,0 +1,240 @@
|
|||
[Metadata]
|
||||
Name=Stylix
|
||||
Version=0.1
|
||||
Author="sanweiya and ontake (make-42)"
|
||||
Description="Stylix fcitx5 theme based on the mellow-themes by sanweiya"
|
||||
|
||||
[InputPanel]
|
||||
NormalColor=#{{base05-hex}}
|
||||
HighlightCandidateColor=#{{base04-hex}}
|
||||
EnableBlur=False
|
||||
BlurMask=
|
||||
FullWidthHighlight=True
|
||||
HighlightColor=#{{base04-hex}}
|
||||
HighlightBackgroundColor=#{{base0E-hex}}
|
||||
|
||||
[InputPanel/BlurMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[InputPanel/Background]
|
||||
Image=panel.svg
|
||||
Color=#{{base01-hex}}
|
||||
BorderColor=#{{base01-hex}}
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[InputPanel/Background/Margin]
|
||||
Left=15
|
||||
Right=15
|
||||
Top=15
|
||||
Bottom=15
|
||||
|
||||
[InputPanel/Background/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[InputPanel/Highlight]
|
||||
Image=highlight.svg
|
||||
Color=#{{base01-hex}}
|
||||
BorderColor=#{{base01-hex}}00
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[InputPanel/Highlight/Margin]
|
||||
Left=15
|
||||
Right=15
|
||||
Top=10
|
||||
Bottom=10
|
||||
|
||||
[InputPanel/Highlight/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[InputPanel/Highlight/HighlightClickMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[InputPanel/ContentMargin]
|
||||
Left=9
|
||||
Right=9
|
||||
Top=7
|
||||
Bottom=7
|
||||
|
||||
[InputPanel/TextMargin]
|
||||
Left=9
|
||||
Right=9
|
||||
Top=6
|
||||
Bottom=7
|
||||
|
||||
[InputPanel/PrevPage]
|
||||
Image=
|
||||
|
||||
[InputPanel/PrevPage/ClickMargin]
|
||||
Left=5
|
||||
Right=5
|
||||
Top=4
|
||||
Bottom=4
|
||||
|
||||
[InputPanel/NextPage]
|
||||
Image=
|
||||
|
||||
[InputPanel/NextPage/ClickMargin]
|
||||
Left=5
|
||||
Right=5
|
||||
Top=4
|
||||
Bottom=4
|
||||
|
||||
[InputPanel/ShadowMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu]
|
||||
NormalColor=#{{base05-hex}}
|
||||
HighlightCandidateColor=#{{base02-hex}}
|
||||
Spacing=0
|
||||
|
||||
[Menu/Background]
|
||||
Image=panel.svg
|
||||
Color=#{{base01-hex}}
|
||||
BorderColor=#{{base01-hex}}00
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[Menu/Background/Margin]
|
||||
Left=11
|
||||
Right=11
|
||||
Top=11
|
||||
Bottom=11
|
||||
|
||||
[Menu/Background/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/Highlight]
|
||||
Image=highlight.svg
|
||||
Color=#{{base05-hex}}
|
||||
BorderColor=#{{base05-hex}}00
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[Menu/Highlight/Margin]
|
||||
Left=5
|
||||
Right=5
|
||||
Top=5
|
||||
Bottom=5
|
||||
|
||||
[Menu/Highlight/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/Separator]
|
||||
Image=
|
||||
Color=#{{base00-hex}}
|
||||
BorderColor=#{{base00-hex}}00
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[Menu/Separator/Margin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/Separator/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/CheckBox]
|
||||
Image=radio.svg
|
||||
Color=#{{base01-hex}}
|
||||
BorderColor=#{{base01-hex}}00
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[Menu/CheckBox/Margin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/CheckBox/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/SubMenu]
|
||||
Image=arrow.svg
|
||||
Color=#{{base01-hex}}
|
||||
BorderColor=#{{base01-hex}}00
|
||||
BorderWidth=0
|
||||
Overlay=
|
||||
Gravity="Top Left"
|
||||
OverlayOffsetX=0
|
||||
OverlayOffsetY=0
|
||||
HideOverlayIfOversize=False
|
||||
|
||||
[Menu/SubMenu/Margin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/SubMenu/OverlayClipMargin]
|
||||
Left=0
|
||||
Right=0
|
||||
Top=0
|
||||
Bottom=0
|
||||
|
||||
[Menu/ContentMargin]
|
||||
Left=11
|
||||
Right=11
|
||||
Top=11
|
||||
Bottom=11
|
||||
|
||||
[Menu/TextMargin]
|
||||
Left=6
|
||||
Right=6
|
||||
Top=6
|
||||
Bottom=6
|
||||
Loading…
Add table
Add a link
Reference in a new issue