From af09693bf1f140bc229f6eb926e22382ef4e14fc Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 23 Jul 2021 18:46:49 +0800 Subject: [PATCH 1/3] [feature] add ruby setup script --- devel/ruby.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 devel/ruby.sh diff --git a/devel/ruby.sh b/devel/ruby.sh new file mode 100644 index 0000000..1de293d --- /dev/null +++ b/devel/ruby.sh @@ -0,0 +1,6 @@ + + + +gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/ +bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems + From 2913f3c95f85a12c424732c39a1b2900958cde71 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 23 Jul 2021 18:47:05 +0800 Subject: [PATCH 2/3] [feature] create and open markdown file --- cli/ranger/commands.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cli/ranger/commands.py b/cli/ranger/commands.py index 38ce93b..8b9fd2c 100644 --- a/cli/ranger/commands.py +++ b/cli/ranger/commands.py @@ -226,3 +226,26 @@ class mediacut_open(Command): read=False, ) self.fm.loader.add(obj) + + +class md(Command): + """ + :typeora + + create a markdown file with typora + """ + def execute(self): + import subprocess + import os.path + filename = self.arg(1) + if not filename.endswith(".md"): + filename += ".md" + if not os.path.exists(filename): + open(filename, 'a').close() + descr = "editing" + obj = CommandLoader( + args=['x-open', filename], + descr=descr, + read=True + ) + self.fm.loader.add(obj) From 23c5aa42f67d716c7616d355db7fd2c41342b96b Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 23 Jul 2021 18:47:32 +0800 Subject: [PATCH 3/3] ... --- cli/fish/config.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/fish/config.fish b/cli/fish/config.fish index 3718241..9231dae 100644 --- a/cli/fish/config.fish +++ b/cli/fish/config.fish @@ -53,7 +53,7 @@ if status is-interactive alias dt='date "+%Y%m%d-%H%M%S"' # === PATH and file sourcing - append_paths ~/go/bin ~/bin ~/.local/bin ~/.yarn/bin ~/dotfiles/bin ~/dotfiles/devops/bin ~/Nextcloud/bin + append_paths ~/go/bin ~/bin ~/.local/bin ~/.yarn/bin ~/.config/yarn/global/node_modules/.bin ~/dotfiles/bin ~/dotfiles/devops/bin ~/Nextcloud/bin source_files /usr/share/autojump/autojump.fish /usr/local/share/autojump/autojump.fish \ ~/.jabba/jabba.fish \ ~/.asdf/asdf.fish \