Gnome3 快捷键修改

Gnome3 快捷键修改

gsettings 命令

文档: https://developer.gnome.org/gio/stable/gsettings-tool.html

查找 key

查看配置: https://github.com/GNOME/gsettings-desktop-schemas/tree/master/schemas

命令: gsettings list-keys [:PATH]

执行:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
~$: gsettings list-keys org.gnome.desktop.wm.keybindings
cycle-windows-backward
minimize
move-to-workspace-7
move-to-workspace-8
move-to-workspace-9
move-to-monitor-left
move-to-workspace-5
move-to-workspace-6
move-to-workspace-10
move-to-workspace-11
move-to-workspace-12
move-to-center
unmaximize
panel-main-menu
cycle-windows
cycle-panels-backward
panel-run-dialog
switch-to-workspace-down
move-to-corner-ne
move-to-side-e
move-to-workspace-right
always-on-top
move-to-workspace-up
raise
maximize
cycle-group-backward
move-to-side-n
move-to-side-s
maximize-horizontally
move-to-side-w
move-to-corner-nw
switch-windows
begin-move
move-to-monitor-down
switch-windows-backward
move-to-workspace-left
move-to-corner-se
activate-window-menu
switch-input-source
toggle-above
move-to-monitor-right
switch-input-source-backward
move-to-workspace-last
lower
cycle-panels
toggle-fullscreen
toggle-on-all-workspaces
move-to-monitor-up
move-to-corner-sw
toggle-shaded
switch-to-workspace-1
switch-to-workspace-2
switch-to-workspace-3
switch-to-workspace-4
raise-or-lower
switch-panels
switch-panels-backward
switch-applications-backward
maximize-vertically
switch-to-workspace-7
switch-to-workspace-5
show-desktop
switch-to-workspace-8
switch-to-workspace-9
switch-to-workspace-6
switch-applications
switch-to-workspace-10
switch-to-workspace-11
switch-to-workspace-12
switch-to-workspace-left
toggle-maximized
set-spew-mark
begin-resize
move-to-workspace-down
switch-to-workspace-last
switch-group-backward
switch-group
cycle-group
close
switch-to-workspace-up
move-to-workspace-1
move-to-workspace-2
move-to-workspace-3
move-to-workspace-4
switch-to-workspace-right

可以看到输出了key值,现在根据key获取value

查找 value

命令: gsettings get [:PATH] KEY

执行:

1
2
~$: gsettings get org.gnome.desktop.wm.keybindings minimize
['<Super>h']

这里的输出是我的电脑配置 win + h 最小化窗口

修改 value

执行:

1
~$: gsettings set org.gnome.desktop.wm.keybindings minimize '[]'

现在win + h已经失效了

批量查询

1
2
3
4
~$: gsettings list-keys org.gnome.desktop.wm.keybindings | awk ' {printf "%s  %s\n", "gsettings get org.gnome.desktop.wm.keybindings",$1}' > t.sh
~$: sh t.sh > t.txt
~$: cat t.sh
~$: cat t.txt