更改启动器“隐藏”设置的快捷方式
当我在我的笔记本电脑上工作时,我有一段时间,我只使用了几个程序,因此Launcher的默认智能设置(’Dodge windows’)非常方便。 但是我也有时间段,我必须经常在程序之间切换,然后我发现Launcher不会隐藏它非常有用(并且对我的工作流程更好)。
现在,每次我都不想切换时,我必须打开CCSM并更改设置(Unity插件 – >隐藏启动器),但如果我可以使用它的快捷方式会更容易。 所以我的问题:
有没有办法创建一个快捷方式来切换(或更改)Compiz的两个设置?
我想到compiz的命令行界面,但我无法直接找到类似的东西。
你可以跑
gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" 2
将启动器隐藏模式设置为“道奇Windows”,和
gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" 0
将它设置为永不隐藏。
模式编号为:
- 0 – 从不
- 1 – 自动隐藏
- 2 – 道奇Windows
- 3 – 道奇活动窗口
您可以通过调用(该值必须为2或0之前)来使其成为切换:
gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" $((2 - $(gconftool-2 --get "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode")))
然后,您将使用以下命令创建新的键绑定( Alt + F2 → gnome-keybinding-properties
):
/bin/bash -c "gconftool-2 --type int --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" $((2 - $(gconftool-2 --get "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode")))"
如果您使用的是Ubuntu 15.04(生动),以下命令应该适合您。
要启用启动器自动隐藏设置,请使用:
dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" 1
要禁用它,请使用:
dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" 0
对于Unity
使启动器自动隐藏的命令:
gconftool-2 --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" --type string "1"
并且让它永远不会隐藏的命令:
gconftool-2 --set "/apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode" --type string "0"
对于Unity-2D
要自动隐藏启动器:
gsettings set com.canonical.Unity2d.Launcher hide-mode 1
永远不要隐藏启动器:
gsettings set com.canonical.Unity2d.Launcher hide-mode 0
我创建了一个名为Unity Launcher Toggle的应用程序指示器,可让您在启动器模式之间切换。 http://napdivad.com/unity_launcher_toggle/
以下是如何为Ubuntu 16或17做到这一点:(基于falconepl和htorque的回答)
(这会切换启动器的自动隐藏)
dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" $((1 - $(dconf read "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode")))