guake把用户偏好放在哪里了?

guake把用户偏好放在哪里了?

以前 guake 曾经将其首选项存储在

~/.gconf/apps/guake/general

但随着转移到 gtk3,它已转移到 gsettings 和 dconf 。虽然 dconf-editor 确实通过切换开关向我显示了首选项,但我无法弄清楚它实际所在的位置。

答案1

直接的方式:

# save settings
guake --save-preferences ~/Downloads/guake_prefs

# load settings
guake --restore-preferences ~/Downloads/guake_prefs

我在 Ubuntu 20.04 上的经验的另一种方式,

# save the config file
dconf save /apps/guake/ > Downloads/guake.dconf

# load
dconf load /apps/guake/ < Downloads/guake.dconf

您还可以安装dconf 编辑器对于 UI 编辑器。

sudo apt-get update -y
sudo apt-get install -y dconf-editor

然后打开 dconf Editor 并选择 guake 的配置选项/apps/guake/

答案2

以下是仅转储 guake 相关配置的命令:

dconf dump /apps/guake/

输出应如下所示:

[general]
prompt-on-quit=true
window-height=46
mouse-display=true
window-width=100
max-tab-name-length=100
window-losefocus=true
quick-open-enable=false
history-size=1000
open-tab-cwd=true
window-tabbar=true
window-halignment=0
quick-open-command-line='gvim %(file_path)s'
compat-delete='delete-sequence'
scroll-keystroke=true
abbreviate-tab-names=true
display-n=0
use-audible-bell=false
use-default-font=true
scroll-output=true
use-scrollbar=true
use-trayicon=true
set-window-title=true
use-popup=true
window-refocus=false
use-vte-titles=true

[keybindings/global]
show-hide='F12'

[style]
cursor-shape=0
cursor-blink-mode=2

[style/background]
transparency=100

[style/font]
allow-bold=true
palette='#000000000000:#999900000000:#0000a6a60000:#999999990000:#00000000b2b2:#b2b20000b2b2:#0000a6a6b2b2:#bfbfbfbfbfbf:#666666666666:#e5e500000000:#0000d9d90000:#e5e5e5e50000:#00000000ffff:#e5e50000e5e5:#0000e5e5e5e5:#e5e5e5e5e5e5:#000000000000:#ffffffffdddd'
palette-name='Custom'

可以将其保存到文件中并稍后再次加载。

dconf dump /apps/guake/ > dconf-guake-dump.txt
# Later:
dconf load /apps/guake/ < dconf-guake-dump.txt

相关内容