我试图控制 Ubuntu 14.4.1 Launcher 的行为。我希望它在每次我有像 firefox maxmaized 这样的浏览器窗口时自动隐藏。我找到了这个解决方案:
#!/bin/bash
## Change value of "hide" to the command which worked for you to hide the panel
hide='gsettings set com.canonical.Unity2d.Launcher hide-mode 1;'
## Change value of "show" to the command which worked for you to show the panel when it was hidden
show='gsettings set com.canonical.Unity2d.Launcher hide-mode 0;'
## Look for the grep value, add a new browser or application name followed by "\|" eg: 'firefox\|google\|chromium'
while [ 1 ]
do z=$(wmctrl -l …Run Code Online (Sandbox Code Playgroud) 正如标题所说,如何使用键盘快捷键在 ~/Downloads 文件夹中启动 bash 脚本?我尝试绑定cd ~/Downloads && ./bash-script.sh到不同的加速器(例如键盘上的“工具”按钮或音乐播放器按钮,以及 F4)但没有运气,是的,脚本被标记为可执行,我试图在“自定义快捷方式”下执行此操作系统设置 -> 键盘,该命令在终端中有效。