我的 .zathurarc 配置中曾经有以下内容,它允许我通过按 Shift-1、Shift-2、Shift-3、Shift-4 来更改配色方案,以切换到原始配色方案,琥珀色在深色上分别为蓝灰色、黑底绿、黑底蓝:
map ! feedkeys ":set recolor-lightcolor \#ffffff<Return>:set recolor-darkcolor \#000000<Return>" # original (black on white)
map @ feedkeys ":set recolor-lightcolor \#0a0a12<Return>:set recolor-darkcolor \#ff9900<Return>" # amber on dark slate
map \# feedkeys ":set recolor-lightcolor \#000000<Return>:set recolor-darkcolor \#00B800<Return>" # green on black
map $ feedkeys ":set recolor-lightcolor \#002b36<Return>:set recolor-darkcolor \#839496<Return>" # bluish (midnight mode)
最近版本的 zathura 不适用于此功能,特别是我认为他们似乎不喜欢这<Return>
一点。有谁知道我如何修改这些才能再次工作?
答案1
上面的解决方案对我不起作用(使用 Zathura 0.4.7),但以下是有效的:
(注:还添加了“set recolor true”只是为了测试方便)
set recolor true
# midnight mode
map <F1> focus_inputbar ":set recolor-lightcolor \#002b36"
map <F2> focus_inputbar ":set recolor-darkcolor \#839496"
map ! feedkeys "<F1><Return><F2><Return>"
# amber on dark slate
map <F3> focus_inputbar ":set recolor-lightcolor \#0a0a12"
map <F4> focus_inputbar ":set recolor-darkcolor \#ff9900"
map @ feedkeys "<F3><Return><F4><Return>"
# green on black
map <F6> focus_inputbar ":set recolor-lightcolor #000000"
map <F7> focus_inputbar ":set recolor-darkcolor \#00B800"
map \# feedkeys "<F6><Return><F7><Return>"
# original (black on white)
map <F8> focus_inputbar ":set recolor-lightcolor \#ffffff"
map <F9> focus_inputbar ":set recolor-darkcolor \#000000"
map $ feedkeys "<F8><Return><F9><Return>"
答案2
我想我已经找到了解决方法对于这个问题。
我的~/.config/zathura/zathurarc
文件:
# midnight mode
map <F1> feedkeys ":set recolor-lightcolor \#002b36<Return>"
map <F2> feedkeys ":set recolor-darkcolor \#839496<Return>"
map ! feedkeys "<F1><F2>"
# amber on dark slate
map <F3> feedkeys ":set recolor-lightcolor \#0a0a12<Return>"
map <F4> feedkeys ":set recolor-darkcolor \#ff9900<Return>"
map @ feedkeys "<F3><F4>"
# green on black
map <F6> feedkeys ":set recolor-lightcolor #000000<Return>"
map <F7> feedkeys ":set recolor-darkcolor \#00B800<Return>"
map \# feedkeys "<F6><F7>"
# original (black on white)
map <F8> feedkeys ":set recolor-lightcolor \#ffffff<Return>"
map <F9> feedkeys ":set recolor-darkcolor \#000000<Return>"
map $ feedkeys "<F8><F9>"
正如您在上面看到的,根据zathurarc
联机帮助页(ZATHURARC(5)
),我是mapping
命令set
,Special keys
然后这些maps
是我的绑定。请注意,我在 Zathura 中没有对这些键 ( <F[1-8]>
) 进行任何绑定。
编辑:由于F5
分配给演示模式,我已将其更改map <F5>
为map <F6>
另一个maps
迭代模式。