Giter Site home page Giter Site logo

hammerspoon-config's Issues

clipboard history display twice

clipboard.lua配置之后
copy第一次后bar上显示正常,但是当第二次copy其他内容时,第一次的内容会被再一次显示在bar上。

补充个获取某输入法source id的方法

吃到作者的安利,然后遇到了这个问题:不知道我的输入法的sourceID是啥,因此这里将搜到的办法放出来,方便后面的Googler

首先下载 Inputsource ,解压后将 Inputsource 移动到 /usr/local/bin/ 。
然后唤出终端,键入
/usr/local/bin/Inputsource
获取目前输入法的 input source ID 。

ime.lua:29: attempt to index a nil value

2019-04-16 15:07:48: 15:07:48 ERROR: LuaSkin: hs.application.watcher callback: /Users/kong/.hammerspoon/ime/ime.lua:29: attempt to index a nil value
stack traceback:
/Users/kong/.hammerspoon/ime/ime.lua:29: in function 'updateFocusAppInputMethod'
/Users/kong/.hammerspoon/ime/ime.lua:62: in function 'applicationWatcher'
2019-04-16 15:07:48: ********

建议:剪贴板改用 ClipboardTool 实现

ClipboardTool 的文档

Hammerspoon docs: ClipboardTool

ClipboardTool 的优势

  1. 支持搜索剪贴板历史
  2. 剪贴板支持图片格式
  3. 重启 Hammerspoon,剪贴板数据仍存在
  4. 支持忽略某些特殊应用复制的数据,比如 1Password

示例代码

-- 下载 https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ClipboardTool.spoon.zip
-- 使用 Hammerspoon 加载解压后的 ClipShow.spoon 文件
hs.loadSpoon('ClipboardTool')
spoon.ClipboardTool.show_in_menubar = true
spoon.ClipboardTool.paste_on_select = true
spoon.ClipboardTool.menubar_title = ""
spoon.ClipboardTool:start()
hs.hotkey.bind({"cmd", "shift"}, 'v', function()
  spoon.ClipboardTool:showClipboard()
end)

效果图

image

ctrl+alt+cmd + left/right does't work

142 -- Move between screens 143 hs.hotkey.bind({"ctrl", "alt", "cmd"}, "Left", hs.fnutils.partial(winmovescreen, "left")) 144 hs.hotkey.bind({"ctrl", "alt", "cmd"}, "Right", hs.fnutils.partial(winmovescreen, "right"))

press hot key combine and nothing happen

window.lua:11: in function 'winresize'

2019-04-16 15:03:48: ********
2019-04-16 15:03:52: ********
2019-04-16 15:03:52: 15:03:52 ERROR: LuaSkin: hs.hotkey callback: /Users/kong/.hammerspoon/window/window.lua:11: attempt to index a nil value (local 'win')
stack traceback:
/Users/kong/.hammerspoon/window/window.lua:11: in function 'winresize'
(...tail calls...)
2019-04-16 15:03:52: ********
2019-04-16 15:03:53: ********

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.