禁用鼠标hover时自动激活Gnome Shell活动
我一直在寻找一种方法来禁用Gnome Shell中“活动”按钮的“热门角落”function。 我希望它需要点击,以便我不会在鼠标hover时意外激活它。
对于11.10
这个位置改为11.04,下面是11.04。 您可以通过快速编辑文件/usr/share/gnome-shell/js/ui/layout.js
来执行此操作。如果您找到代码:
this._corner = new Clutter.Rectangle({ name: 'hot-corner', width: 1, height: 1, opacity: 0, reactive: true });
更改reactive: true
为reactive: false
并且它将禁用热点,但仍然允许通过单击“活动”按钮或按超级 (Windows)键来激活概览屏幕。
我将研究制作扩展来修改此行为,而不是直接修改panel.js文件,因为它将被更新覆盖。
11.04
与上面相同但编辑文件/usr/share/gnome-shell/js/ui/panel.js
:
this._corner = new Clutter.Rectangle({ width: 1, height: 1, opacity: 0, reactive: true });
Activities配置程序扩展可以选择禁用“活动”热点。 它被称为“禁用热门角落”。 此外,默认情况下,文本将替换为图标 – 这样可以节省空间。
适用于Ubuntu 12.10。
在11.10及更高版本中,您可以通过从官方Gnome-shell扩展站点安装“ No Topleft Hot Corner ”扩展来禁用热门角落。
从https://github.com/hermanus/gnome-shell-extensions/tree/master/Gnome-shell-activities-hotspot-disabler下载extension.js
和metadata.json
,并将它们放在~/.local/share/gnome-shell/extensions/activitieshotspotdisabler@harmus.gmail.com/
。 目录的名称很重要 – 如果您也更改了metadata.json
的uuid,则可以更改它。
这将安装一个覆盖Panel.HotCorner.prototype._onCornerEntered
函数的扩展,因此只有在单击“活动”时才会显示活动屏幕。 要激活它,请访问https://extensions.gnome.org/local/ 。
目前,此扩展适用于Gnome版本3.6,这是Ubuntu 12.10附带的版本。 如果您浏览Github上的历史记录 ,您会发现适用于较旧Gnome版本的版本(最高3.0。= Ubuntu 11.04。)