安装老版本的 typora (不要钱)

动机:新版本的 typora 开始收费了,如果不交钱,每次打开的时候都会有弹窗找你要钱。
所以干脆安装个老版本的 typora。老版本完全可以满足我的需求。

1. 下载老版本的 typora

我是从太平洋电脑网下载的,
https://dl.pconline.com.cn/download/2853408-1.html
另外我也放在百度网盘了:
链接: https://pan.baidu.com/s/1tGmSYXTv_rJHk_SyJEhW0A?pwd=f4uv 提取码: f4uv 复制这段内容后打开百度网盘手机App,操作更方便哦

2. 解压缩

解压缩以后,把 Typora-linux-x64 文件夹放在主文件夹 ~/ 下。

3. 自定义命令,启动 typora

自定义一个文件夹 mycommands,在主文件夹下,把这个路径加入环境变量

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:~/mycommands"

在 mycommands 文件夹下新建文件 typora,写入:

#!/bin/bash

file=$1

echo $file
if [ ${file:-1} == 1  ] # 如果 file 变量没有赋值
then
        echo 1
        ~/Typora-linux-x64/bin/Typora-linux-x64/Typora > /dev/null 2>&1 &
else
        echo 2
        ~/Typora-linux-x64/bin/Typora-linux-x64/Typora $file > /dev/null 2>&1 &
fi

然后把 typora 文件权限设置为可读写可执行,

sudo chmod 777 mycommands/typora

4. 使用

在命令行下

typora

就会弹出 typora 界面。
如果打

typora file

就会弹出 typora 界面,并且打开 file。

posted on 2022-09-07 19:34  luyi07  阅读(1036)  评论(0编辑  收藏  举报

导航