0%

Part one, to be continued.

According to the wording on its official website, Hammerspoon is:

a tool for powerful automation of OS X.

I use it with Amethyst to manage the windows, and apart from that, here is how I use it:

  • text editing with markdown;
  • work/rest timer;
  • double confirm when pressing ⌘ + Q;
  • one hotkey to toggle day&night mode;

pomo & slowq

Credits go to @dbmrq, dotfiles/home/.hammerspoon at master · dbmrq/dotfiles · GitHub

I use two of his plugins (let’s just call it that).

For slowq, it prevents you from quit your app when you accidentally press ⌘+Q, instead you need to hold for 2/3s to quit.

To use it, download the file, put it in your ~/.hammerspoon/ folder, then you just need to put one line of code in your init.lua:

1
require “slowq”

For work timer, you just need to add 3 lines of code:

1
2
3
4
require "pomo"

hs.hotkey.bind(hyper, '9', '🍅.enabled.🍅', function() pom_enable() end)
hs.hotkey.bind(hyper, '0', '🍅.disabled.🍅', function() pom_disable() end)

Then just press the hotkey and you will get a progress bar at the top of your screen, i just did a little tweek around, change the work/rest to emojis 🍅/☕️.

Hotkey to toggle night mode

First, I googled and write a little function in lua to read applescript files.

1
2
3
4
5
6
7
8
-- function: read applescript content. copy content to data
function applescript_reader(string)
local path = string
local file = io.open(path, "r")
local data = file:read("*a")
file:close()
return data
end

Then I assign a hotkey to call the applescript, long way…

1
2
3
4
5
6
7
8
hotkey.bind(
"alt",
"D",
function()
applescript(applescript_reader("/Users/daLi.h/.hammerspoon/your.applescript"))
alert.show("🌚...Dark or Light...🌝")
end
)

The content of the applescript file is simple:

1
2
3
4
5
6
7
8
9
tell application "System Events"
tell appearance preferences
if dark mode is false then
set dark mode to true
else
set dark mode to false
end if
end tell
end tell%

For window management and text editing part, let’s talk about it next time.

日本奥组委真是太难了。

3 月 12 日看到日本奥组委发推说,2020 年奥运会的圣火已经点燃 🔥!下面的网友很不客气的说,I think you are playing with fire, literally.

我觉得,你们这是 真的 在玩火。

接着就是如火如荼的圣火传递,TorchRelay。在希腊,由于民众不听劝阻,大量聚集在路边观看圣火传递,官方不得不叫停。

4 天前,奥运圣火乘专机抵达日本。奥组委表示,希望的火炬已经开始照亮我们前行的路

Hope has begun lighting our way in Japan. 🔥

不过这希望的火焰还没燃烧多久,就被全球的新冠疫情浇灭了。昨晚,3 月 24 日晚上,国际奥委会和日本奥组委联合宣布,2020 东京奥运会和残奥会延期至 不晚于2021 年夏。

The Tokyo 2020 Olympic and Paralympic Games will now take place no later than summer 2021.

不过,奥运圣火仍会一直燃烧,作为希望的象征。

The Olympic Flames will remain lit in Japan and serve as a symbol of hope for the world.

推特上流行的热搜(trending)也从 #tokyo2020 变成了 #tokyo2021

奥运会延期对我们这些观众可能只是比赛推迟,但对那些苦苦训练了思念的运动员们来说,这意味着他们还要继续努力训练 365 天。 Feel for them.

但是,梦想还在。只是推迟,不是取消。

The dream is still there. It’s has been delayed, but it hasn’t been denied.

Wish them all the best.

你要有做人的底线

XZ 粉丝偷袭 AO3 这个事情估计大家都听说了。事情的来来龙去脉网上已经有很多文章讲了,我就不赘述了。

这件事最后的结果是:

  • AO3 被墙;
  • XZ 工作室以及肖战全球后援会道歉;
  • XZ 丢了代言,败了路人缘;

简直一地鸡毛。

推特用户 @TheBratOllie 说,

XZ 粉丝:我不喜欢 ao3 的同人文 我就举报;ao3 的粉丝:ao3 被墙 我去骂肖战 去给他的电视剧打一星。这就是中国的缩影。一些人不允许别人与自己有不同的想法和喜好。一些人遇到不爽要发泄,却抓不到主要矛,找不到应该背锅的对象,或者单纯就是惹不起不敢讲。于是找个八竿子打不着的软柿子捏来泻火。

像极了电影《寄生虫》里的场景,对不对?住地下室的底层人互相打的头破血流,尸体横陈,住地上的人拍拍身上的尘土,光鲜如故。

一地鸡毛之后,国内互联网不能访问的网站又多了一个。义愤填膺地举报的粉丝们不知道的是,今天被封杀的是一个网站,明天被封杀的可能就是视若无睹神明的 idol

他们招来的这只手握权力的猛虎,在经历过这样的事情之后,只会越来越肆无忌惮(unscrupulous)。

阿尔帕西诺 1963 年凭借《闻香识女人》(Scent of a Woman)获得奥斯卡最佳男主角奖。电影中,他扮演的上校在最后的听证会上的演讲铿锵有力。

I don’t know if Charlie’s silence here today is right or wrong. I’m not a judge or jury. But I can tell you this: he won’t sell anybody out(出卖别人) to buy his future!!

And that, my friends, is called integrity! That’s called courage! Now that’s the stuff leaders should be made of.

Now I have come to the crossroads in my life. I always knew what the right path was. Without exception, I knew. But I never took it. You know why? It was too damn hard.

* 我一直都知道那条路是正确的。无一例外,我都知道。但是我从来没走过那些路。知道为什么吗?那条路太他妈艰难了。

改变社会可能很难,但是,我们应该能做到的,是要求自己做一个正直、诚实的人。

**Be a man of integrity. **

注:公众号有图,这里没图,因为弄图床要备案,而我不想费心去备案。

美国股票市场史无前例第三次熔断 ,金融市场一片哀嚎。
我们就抓住这个机会,从各种新闻标题里学习一下「股票狂跌」到底有多少种说法。

ABC: Markets plummets despite Fed intervention
尽管美联储出手干预,股票市场仍旧暴跌

plummet 指的就是直线下降,暴跌。如下图。

还有一个极为类似的标题:
USA Today: Markets crater even after Fed intervenes to calm Markets

这里的 crater 跟 plummet 类似,美国俚语,指股票暴跌或者交易失败。原意是炮弹炸出来的弹坑,火山口那种。

接着来,
CNN: Dow and US stocks are set to plunge again
美股肯定还会继续跳水

Plunge 原意是「跳水」,这里就是指像跳水一样直线下降。

还有华盛顿邮报,
Washington Post: US stocks nosedive

Nosedive 指的是飞机向下俯冲,nose dive ,鼻子向下跳水,一头扎下去,所以这种暴跌可不可怕?指的就是 sudden sharp drop

还有彭博社,
Bloomberg: Stocks Sink More Than 10% in US
美股下跌超百分之十

这个简单 Sink,下沉,下降。简洁明了。

至于股票熔断是什么,咱也不知道,就不乱发表意见了。