如何让水银记住自定义触发器
我正在尝试为我的 shell/apple 脚本文件运行创建一个自定义触发器,以便我只需按一下按钮即可启动我的开发环境。所以基本上:
我在 ~ 中有一个名为 start_server.sh 的 shell 脚本(包括一些苹果脚本),它做了 3 件事:
- 启动solr服务器
- 启动memcached
- 启动脚本/服务器
我有一个保存的 Quicksilver 命令(。 qs)打开start_server.sh(所以start_server.sh,那么操作是“在终端中运行”)
我创建了一个调用此保存的 qs 命令的自定义触发器。
我这样做了然后测试了它并且它有效。然后我尝试仔细检查它,所以我退出了quicksilver,当我检查触发器时,它只是说:“打开(空)”作为操作。我再次设置触发器,当我重新启动 QS 时,同样的事情再次发生。我不知道为什么,但我打开终端的旧自定义触发器一直有效,那么为什么这个不起作用呢?
这是我重新启动 QS 后触发器的屏幕截图:http://grab.by/4XWW
如果您有任何关于如何为我的服务器启动“按钮”的其他建议,请这样做:)谢谢!
作为补充说明,我已经尝试过此线程上的步骤,但无济于事: http://groups.google.com/group/blacktree-quicksilver/browse_thread/thread/7b65ecf6625f8989
以下是 Triggers.plist 文件中假定的自定义触发器的片段:
<dict>
<key>ID</key>
<string>2903BB6B-94CB-4DE8-B00D-23973FA54F3D</string>
<key>command</key>
<dict>
<key>actionID</key>
<string>FileOpenAction</string>
<key>directID</key>
<string>/Users/eumir/Documents/QScripts/start-dx-command.qscommand</string>
</dict>
<key>enabled</key>
<true/>
<key>keyCode</key>
<integer>39</integer>
<key>modifiers</key>
<integer>1573160</integer>
<key>onPress</key>
<true/>
<key>type</key>
<string>QSHotKeyTrigger</string>
</dict>
取出文件夹中的空格,然后filename ,重新启动后仍返回 null。
I am trying to make a custom trigger for my shell/apple script file to run so I can just launch my dev environment at the push of a button. So basically:
I have a shell script(and some apple script included) in ~ named start_server.sh which does 3 things:
- start up solr server
- start up memcached
- start up script/server
I have a saved quicksilver command(.qs) that opens up start_server.sh(so start_server.sh, then the action is "Run in Terminal")
I created a custom trigger that calls this saved qs command.
I did that then tested it and it works. I then tried to double check it so I quit quicksilver and when I checked the triggers it just said: "Open (null)" as the action. I set the trigger again and when i restarted QS the same thing happened again. I don't know why but my old custom trigger to open terminal has worked since forever so why doesn't this one work?
Here's a screenie of the triggers after I restart QS: http://grab.by/4XWW
If you have any other suggestion on how to make a "push button" start for my server then please do so :) Thanks!
As an added note, I have already tried the steps on this thread but to no avail: http://groups.google.com/group/blacktree-quicksilver/browse_thread/thread/7b65ecf6625f8989
Here's a snippet of the supposed custom trigger in the Triggers.plist file:
<dict>
<key>ID</key>
<string>2903BB6B-94CB-4DE8-B00D-23973FA54F3D</string>
<key>command</key>
<dict>
<key>actionID</key>
<string>FileOpenAction</string>
<key>directID</key>
<string>/Users/eumir/Documents/QScripts/start-dx-command.qscommand</string>
</dict>
<key>enabled</key>
<true/>
<key>keyCode</key>
<integer>39</integer>
<key>modifiers</key>
<integer>1573160</integer>
<key>onPress</key>
<true/>
<key>type</key>
<string>QSHotKeyTrigger</string>
</dict>
Took out spaces in the folder and filename and it still returns null upon restarting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,你有最新的测试版吗?最近版本号发生了变化。
其次,我创建了一个自定义触发器,并且通过重新启动 Quicksilver 可以正常工作。我试图找出应用程序存储触发器信息的位置,并找到此属性文件:~/Library/Apllication Support/Quicksilver/Triggers.plist。
自定义条目的 ID 类似于“FE2976DF-DF14-4191-B56C-8A5E68F48A84”。
因此,您可以尝试创建触发器,从 plist 文件中复制相应的行,关闭 Quicksilver,如果这些行消失了(我实际上对此表示怀疑),请再次将它们复制进去。
如果这不起作用,至少您现在知道去哪里寻找。
编辑:plist 文件中的条目是键值对。 (null) 可能表明目标值丢失(至少据我所知,无法重现问题)。
First of all, do you have the latest beta? There was a change in the version numbers recently.
Secondly, I created a custom trigger and it worked without problems through a restart of Quicksilver. I tried to figure out where the app stores the trigger information and found this properties file: ~/Library/Apllication Support/Quicksilver/Triggers.plist.
Custom entries get an ID like "FE2976DF-DF14-4191-B56C-8A5E68F48A84".
So what you could try is to create your trigger, copy the respective lines from the plist file, close Quicksilver and if the lines are gone (which I actually doubt) copy them in again.
If that doesn't work, at least you now know where to look.
Edit: the entries in the plist file are key-value pairs. The (null) might indicate that the target value is missing (at least as far as I can tell without being able to reproduce the problem).
我遇到了同样的问题,并且发现如果触发器指向的所有内容都在目录中,那么运气好的话就会坚持下去。换句话说,如果我想将 Cmd-Shift-Ctrl-k 绑定到“Open KeePass X”,那么我需要确保 KeePassX.app 在目录中。
希望这有帮助,
-克里斯
I've hit the same problem, and found some luck getting triggers to stick if everything they point to is in the Catalog. In other words, if I want to bind Cmd-Shift-Ctrl-k to "Open KeePass X", then I need to make sure that KeePassX.app is in the catalog.
Hope this helps,
-Chris