From 35842c95e7405301b0f4199b50f80a60f59947db Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Sun, 4 Dec 2022 23:34:38 +0000 Subject: [PATCH 1/6] Add instalation script for rime-cantonese support. --- .../scripts/fcitx/install-rime-cantonese.sh | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 .config/scripts/fcitx/install-rime-cantonese.sh diff --git a/.config/scripts/fcitx/install-rime-cantonese.sh b/.config/scripts/fcitx/install-rime-cantonese.sh new file mode 100755 index 0000000..eaa1637 --- /dev/null +++ b/.config/scripts/fcitx/install-rime-cantonese.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Script to install rime-cantonese based on https://github.com/rime/rime-cantonese/wiki/FreeBSD-%E5%AE%89%E8%A3%9D%E6%95%99%E7%A8%8B +rimedir="$HOME/.local/share/fcitx5/rime" +clonedir="$rimedir/repos" + +if [[ "$1" == "uninstall" ]] || [[ "$1" == "-u" ]]; then + rm -rf "$clonedir" + find "$rimedir" -type l -delete +else + mkdir -p "$rimedir/opencc" + mkdir -p "$clonedir" + + cd "$rimedir" + clonebasename="$(basename $clonedir)" + git clone https://github.com/rime/rime-cantonese.git "$clonedir/rime-cantonese" + for file in $(find "$clonebasename/rime-cantonese" -type f -name '*.yaml'); do ln -sf "$file"; done + for file in $(find "$clonebasename/rime-cantonese/opencc" -type f); do ln -sf "../$file" "opencc"; done + + git clone https://github.com/CanCLID/rime-loengfan.git "$clonedir/rime-loengfan" + for file in $(find "$clonebasename/rime-cantonese" -type f -name '*.yaml'); do ln -sf "$file"; done +fi From 74698b567312ae936faec7656eff7b90c24fd4c8 Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Sun, 4 Dec 2022 23:35:42 +0000 Subject: [PATCH 2/6] Update environment variables. - Added flatpak bin directory to path, and also the desktop files to $XDG_DATA_DIRS - Export fcitx environment variables. --- .bash_profile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bash_profile b/.bash_profile index f3724cc..7d62552 100644 --- a/.bash_profile +++ b/.bash_profile @@ -7,6 +7,10 @@ # custom scripts and programs PATH="$HOME/.local/bin:$PATH" PATH="$HOME/.config/scripts/bin:$PATH" +PATH="/var/lib/flatpak/exports/bin:$PATH" + +# flatpak desktop files +XDG_DATA_DIRS="/var/lib/flatpak/exports/share:$XDG_DATA_DIRS" if grep "arch-laptop" /etc/hostname &> /dev/null ; then export IS_LAPTOP=1 @@ -15,6 +19,10 @@ fi # for java applicatons export _JAVA_AWT_WM_NONREPARENTING=1 +export XMODIFIERS="@im=fcitx" +export QT_IM_MODULE=fcitx +export GTK_IM_MODULE=fcitx + if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then if [[ ! -z "$IS_LAPTOP" ]]; then WLR_DRM_DEVICES=/dev/dri/card1:/dev/dri/card0 dbus-run-session sway From 38813392c0c2e6a68bd316231e05600655e91a1d Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Sun, 4 Dec 2022 23:38:05 +0000 Subject: [PATCH 3/6] Add fzf plugin. --- .config/nvim/init.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8f586b4..8d37cf1 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -41,4 +41,6 @@ set fileencoding=utf8 call plug#begin('~/.local/share/nvim/site/plugged') Plug 'lervag/vimtex' Plug 'morhetz/gruvbox' +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } +Plug 'junegunn/fzf.vim' call plug#end() From d850c17bdcbc35ea62ed7de3513d8e7eeda2474d Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Sun, 4 Dec 2022 23:40:48 +0000 Subject: [PATCH 4/6] Specify cursor theme. --- .config/gtk-3.0/settings.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index 29417fd..b01d938 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -1,4 +1,4 @@ [Settings] gtk-icon-theme-name=kora gtk-theme-name=Materia-dark-compact -gtk-cursor-theme-name=default +gtk-cursor-theme-name=Bibata-Original-Classic From f666bc37bb78a6b5ddf456c504c6e6211340ed35 Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Sun, 4 Dec 2022 23:41:08 +0000 Subject: [PATCH 5/6] Untrack files. --- .gtkrc-2.0 | 3 --- .nnn_bookmarks | 6 ------ 2 files changed, 9 deletions(-) delete mode 100644 .gtkrc-2.0 delete mode 100644 .nnn_bookmarks diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 deleted file mode 100644 index e9f849e..0000000 --- a/.gtkrc-2.0 +++ /dev/null @@ -1,3 +0,0 @@ -gtk-theme-name="Materia-dark-compact" -gtk-icon-theme-name="kora" -gtk-cursor-theme-name=" default " diff --git a/.nnn_bookmarks b/.nnn_bookmarks deleted file mode 100644 index 63a4538..0000000 --- a/.nnn_bookmarks +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# bookmarks -export NNN_BMS='z:/mnt/InternalSSD/lin;x:/mnt/InternalSSD/win;c:/mnt/InternalHDD' -# use trashcan -export NNN_TRASH=1 From fbbaf80b41eac7ad2f5f36408080bebd8e8efe0b Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Thu, 15 Dec 2022 04:23:39 +0000 Subject: [PATCH 6/6] Add keybind for file fzf. --- .config/nvim/init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8d37cf1..33e1cd7 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -37,6 +37,9 @@ autocmd vimenter * ++nested colorscheme gruvbox set encoding=utf8 set fileencoding=utf8 +" Remapping +noremap :Files + " plugins call plug#begin('~/.local/share/nvim/site/plugged') Plug 'lervag/vimtex'