diff options
Diffstat (limited to '.local')
-rw-r--r-- | .local/share/fcitx5/themes/default/base.conf | 42 | ||||
-rw-r--r-- | .local/share/fcitx5/themes/loek/base.conf | 58 | ||||
-rwxr-xr-x | .local/share/mode/mode | 2 | ||||
-rwxr-xr-x | .local/share/mode/switch.d/fcitx5 | 51 |
4 files changed, 87 insertions, 66 deletions
diff --git a/.local/share/fcitx5/themes/default/base.conf b/.local/share/fcitx5/themes/default/base.conf new file mode 100644 index 0000000..4a27495 --- /dev/null +++ b/.local/share/fcitx5/themes/default/base.conf @@ -0,0 +1,42 @@ +# vim:ft=dosini +[Metadata] +Name=default +Version=0.1 +Author=loek +Description=custom theme +ScaleWithDPI=True + +[InputPanel] +Font=sans-serif 12 + +[InputPanel/Background/Margin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/Background/Margin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/ContentMargin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/Highlight/Margin] +Left=0 +Right=0 +Top=0 +Bottom=0 + +[Menu/TextMargin] +Left=0 +Right=0 +Top=0 +Bottom=0 + + diff --git a/.local/share/fcitx5/themes/loek/base.conf b/.local/share/fcitx5/themes/loek/base.conf deleted file mode 100644 index 44e7c31..0000000 --- a/.local/share/fcitx5/themes/loek/base.conf +++ /dev/null @@ -1,58 +0,0 @@ -# vim:ft=dosini -[Metadata] -Name=Loek -Version=0.1 -Author=loek -Description=custom theme -ScaleWithDPI=True - -[InputPanel] -Font=Sans 12 -Spacing=3 - -[InputPanel/TextMargin] -Left=7 -Right=7 -Top=4 -Bottom=4 - -[InputPanel/Background] -BorderWidth=2 - -[InputPanel/Background/Margin] -Left=2 -Right=2 -Top=2 -Bottom=2 - -[InputPanel/Highlight/Margin] -Left=7 -Right=7 -Top=4 -Bottom=4 - -[Menu/Background/Margin] -Left=2 -Right=2 -Top=2 -Bottom=2 - -[Menu/ContentMargin] -Left=2 -Right=2 -Top=2 -Bottom=2 - -[Menu/Highlight/Margin] -Left=7 -Right=7 -Top=4 -Bottom=4 - -[Menu/TextMargin] -Left=5 -Right=5 -Top=5 -Bottom=5 - - diff --git a/.local/share/mode/mode b/.local/share/mode/mode index 9eaf675..3969fa1 100755 --- a/.local/share/mode/mode +++ b/.local/share/mode/mode @@ -65,7 +65,7 @@ switch() { interpreter="$(basename "$(command -v $(head -n1 "$switch_function" | sed -n 's/^#!\(.*\)/\1/p'))")" if [ "$interpreter" = "sh" ] ; then # source scripts if they are POSIX sh (makes plugin functions available) - . "$switch_function" & + ( . "$switch_function" ) & else # else, just run them "$switch_function" & diff --git a/.local/share/mode/switch.d/fcitx5 b/.local/share/mode/switch.d/fcitx5 index ee99f13..4b35478 100755 --- a/.local/share/mode/switch.d/fcitx5 +++ b/.local/share/mode/switch.d/fcitx5 @@ -1,28 +1,65 @@ #!/bin/sh -cat "$XDG_DATA_HOME/fcitx5/themes/loek/base.conf" - << EOF > "$XDG_DATA_HOME/fcitx5/themes/loek/theme.conf" +cd "$XDG_DATA_HOME/fcitx5/themes/default" +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=$color13 -HighlightBackgroundColor=$bg +HighlightColor=$sel_fg +HighlightBackgroundColor=$sel_bg [InputPanel/Background] Color=$bg -BorderColor=$accent [InputPanel/Highlight] -Color=$accent +Image=highlight.png -[Menu/Background] -Color=$bg +[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 |