diff mbox series

[bug#44920] : Add fcitx5.

Message ID 868sa9hdls.fsf@163.com
State Accepted
Headers show
Series [bug#44920] : Add fcitx5. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Zhu Zihao Dec. 7, 2020, 2:53 p.m. UTC
All Fcitx5 components updated.

Here are the patches.

Comments

宋文武 Dec. 8, 2020, 12:37 p.m. UTC | #1
Zhu Zihao <all_but_last@163.com> writes:

> All Fcitx5 components updated.
>
> Here are the patches.
>

For fcitx5-gtk, I change the "gtk3" output to "gtk2", as GTK+ 3 is the
default version.

Applied, thank you!


> BTW, fcitx5-chinese-addons contains a cloud pinyin feature, which use
> Google or Baidu's cloud pinyin server. But it was disabled by default
> and it'll ask user to enable it or not, should we make a patch to get
> rid of such anti-features?

I leave it in for now, maybe it's good to ask upstream for a disable
option for cloudpinyin.
diff mbox series

Patch

From bc66cd1957fec1aa6c762498cc898e89ee91114c Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Mon, 7 Dec 2020 22:45:06 +0800
Subject: [PATCH 10/10] gnu: Add fcitx5-material-color-theme.

* gnu/packages/fcitx5.scm(fcitx5-material-color-theme): New variable.
---
 gnu/packages/fcitx5.scm | 70 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index eb268562a9..8ca109ed31 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -411,3 +411,73 @@  including input methods previous bundled inside Fcitx 4:
    (description "Fcitx5-configtool is a graphical configuration tool
 to manage different input methods in Fcitx 5.")
    (license license:gpl2+)))
+
+(define-public fcitx5-material-color-theme
+  (package
+    (name "fcitx5-material-color-theme")
+    (version "0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/hosxy/Fcitx5-Material-Color")
+             (commit version)))
+       (sha256
+        (base32 "1mgc722521jmfx0xc3ibmiycd3q2w7xg2956xcpc07kz90gcdjaa"))))
+    (build-system copy-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (use-modules (srfi srfi-26))
+
+             (let* ((out (assoc-ref outputs "out"))
+                    (assets-dir (string-append
+                                 out "/share/fcitx5-material-color-theme"))
+                    (themes-prefix (string-append out "/share/fcitx5/themes")))
+
+               (define (install-theme-variant variant target)
+                 (let ((dir (string-append themes-prefix "/" target))
+                       (png (string-append "panel-" variant ".png"))
+                       (conf (string-append "theme-" variant ".conf")))
+                   (format #t "install: Installing color variant \"~a\" to ~a~%"
+                           variant dir)
+                   (substitute* conf
+                     (("^Name=.*")
+                      (string-append "Name=" target "\n")))
+                   (mkdir-p dir)
+                   (install-file png dir)
+                   (copy-file conf (string-append dir "/theme.conf"))
+                   (symlink (string-append assets-dir "/arrow.png")
+                            (string-append dir "/arrow.png"))))
+
+               (mkdir-p assets-dir)
+               (install-file "arrow.png" assets-dir)
+               (for-each
+                (lambda (x)
+                  (install-theme-variant
+                   x (string-append "Material-Color-" (string-capitalize x))))
+                '("black" "blue" "brown" "indigo"
+                  "orange" "pink" "red" "teal"))
+
+               (install-theme-variant
+                "deepPurple" "Material-Color-DeepPurple")
+               #t))))))
+    (home-page "https://github.com/hosxy/Fcitx5-Material-Color")
+    (synopsis "Material Design for Fcitx 5")
+    (description "Fcitx5-material-color-theme is a Material Design theme
+for Fcitx 5 with following color variants:
+
+@itemize
+@item Black
+@item Blue
+@item Brown
+@item Indigo
+@item Orange
+@item Pink
+@item Red
+@item teal
+@item DeepPurple
+@end itemize\n")
+    (license license:asl2.0)))
-- 
2.29.2