aboutsummaryrefslogtreecommitdiff
path: root/home/dot_local/share/mode/switch.d/executable_fcitx5
diff options
context:
space:
mode:
Diffstat (limited to 'home/dot_local/share/mode/switch.d/executable_fcitx5')
-rw-r--r--home/dot_local/share/mode/switch.d/executable_fcitx567
1 files changed, 67 insertions, 0 deletions
diff --git a/home/dot_local/share/mode/switch.d/executable_fcitx5 b/home/dot_local/share/mode/switch.d/executable_fcitx5
new file mode 100644
index 0000000..2cc6ccb
--- /dev/null
+++ b/home/dot_local/share/mode/switch.d/executable_fcitx5
@@ -0,0 +1,67 @@
+#!/bin/sh
+[ $no_cfg -eq 1 ] && return
+
+mkcd "$XDG_DATA_HOME/fcitx5/themes/mode"
+rounding=6
+size=$(( 2 * $rounding + 4 ))
+margin_h=6
+margin_v=4
+
+bg='#000000'
+fg='#ffffff'
+accent='#404040'
+accent_text=$fg
+sel_bg=$(mix_rgb $color12 $bg 0.4)
+sel_fg=$fg
+
+magick \
+ -size ${size}x${size} xc:transparent \
+ -fill xc:"$accent" \
+ -draw "roundrectangle 0,0 $(( $size - 1 )),$(( $size - 1 )) $rounding,$rounding" \
+ highlight.png
+
+cat base.conf - << EOF > theme.conf
+[InputPanel]
+NormalColor=$fg
+HighlightCandidateColor=$accent_text
+HighlightColor=$sel_fg
+HighlightBackgroundColor=$sel_bg
+
+[InputPanel/Background]
+Color=$bg
+
+[InputPanel/Highlight]
+Image=highlight.png
+
+[InputPanel/Highlight/Margin]
+Left=$rounding
+Right=$rounding
+Top=$rounding
+Bottom=$rounding
+
+[InputPanel/ContentMargin]
+Left=$(( 2 + $rounding - $margin_h ))
+Right=$(( 2 + $rounding - $margin_h ))
+Top=$(( 2 + $rounding - $margin_v ))
+Bottom=$(( 2 + $rounding - $margin_v ))
+
+[InputPanel/TextMargin]
+Left=$margin_h
+Right=$margin_h
+Top=$margin_v
+Bottom=$margin_v
+
+[Menu]
+NormalColor=$fg
+
+[Menu/Background]
+Color=$bg
+
+[Menu/Highlight]
+Color=$accent
+
+[Menu/Separator]
+Color=$color7
+
+EOF
+