From b93ae2556ac4fe13ec55bccf0de3e9d3fcdeb3fe Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sun, 8 Jan 2023 12:29:08 -0800 Subject: [PATCH] Add dynamic theming to fcitx5 --- fcitx5/arrow.png | Bin 0 -> 337 bytes fcitx5/default.nix | 23 +++--------- fcitx5/radio.png | Bin 0 -> 272 bytes fcitx5/theme.nix | 86 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 18 deletions(-) create mode 100644 fcitx5/arrow.png create mode 100644 fcitx5/radio.png create mode 100644 fcitx5/theme.nix diff --git a/fcitx5/arrow.png b/fcitx5/arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..85a5a97a983a08dacb5cc93957c356c6f21d4baf GIT binary patch literal 337 zcmeAS@N?(olHy`uVBq!ia0vp^AhrMp8<5nmf9C+CSc;uILpXq-h9ji|$mcBZh%9Dc z;5!1sj8nDwq=ABxC9V-A!TD(=<%vb94CUqJdYO6I#mR{Use1WE>9gP2NC6d{^K@|x z(U>^(;>Ii{M*+46^?l5%O@4Vy+vpweiG|V9AUEXF^6Mf8!%s**>CG#9{va)I(VZJ} z9!|N-{Qp;S*}upcl7*t%-n?e2)pRY_$=?CA4AK+wY%y{e~esblyRp~la zIqK5YweJsK&Xx(Q{V~(^|G$kbrMu?v3yaytY?%CkkzvY#ewS~|2@DJdHEAa=&K0<5 zx9xdw`T5hAzfbR+lP>9ex7pn9i|(a>_`HBG+{FUN7>XF!HYb_X{OAfZ-+bohuia}7 eWs7XFWKOlaYBBwD@>QVE7(8A5T-G@yGywpry@h4~ literal 0 HcmV?d00001 diff --git a/fcitx5/default.nix b/fcitx5/default.nix index 20e055a..72ebd32 100644 --- a/fcitx5/default.nix +++ b/fcitx5/default.nix @@ -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"; }; } diff --git a/fcitx5/radio.png b/fcitx5/radio.png new file mode 100644 index 0000000000000000000000000000000000000000..68b0ff2104fc86a05bbd4c097ac1cfdcf5660f56 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#X$M%Ak65bF}ngNC|Tkf zQ4*Y=R#Ki=l*&+EUaps!mtCBkSdglhUz9%kosASw(Ogd##}JRsw-XO?H5&-Hq)T0p z*V>!rneS!4UH5IGqWeMlppM(!m*iSFs