Giter Club home page Giter Club logo

awesome-hammerspoon's Introduction

awesome-hammerspoon configuration

awesome-hammerspoon is my configuration for Hammerspoon. It has highly modal-based, vim-style keybindings, provides some functionality like desktop widgets, window management, application launcher, instant search, aria2 frontend ... etc.

Get started

  1. Install Hammerspoon first.

  2. git clone https://github.com/ashfinal/awesome-hammerspoon.git ~/.hammerspoon

  3. Reload the configutation.

Keep update

cd ~/.hammerspoon && git pull

How to use

Just press opt, plus A or C or R… to start. If need help, press tab to toggle the keybindings cheatsheet.

Press opt + ? to toggle the help panel, which will show all opt related keybindings.

Screenshots

These screenshots demostrate what awesome-hammerspoon is capable of. Learn more about built-in Spoons.

Desktop widgets

More details

widgets

Window manpulation + R

More details

winresize

Search something + G

More details

hsearch

aria2 Frontend + D

More details

hsearch

You need to run aria2 with RPC enabled before using this. Config aria2 host and token in ~/.hammerspoon/private/config.lua, then you're ready to go.

hsaria2_host = "http://localhost:6800/jsonrpc" -- default host
hsaria2_secret = "token" -- YOUR OWN SECRET

Customization

More details
cp ~/.hammerspoon/config-example.lua ~/.hammerspoon/private/config.lua

Then modify the file ~/.hammerspoon/private/config.lua:

  • Add/remove Spoons.

    Define hspoon_list to decide which Spoons (a distributing format of Hammerspoon module) to be loaded. There are 15 built-in Spoons, learn about them at here.

    There are more Spoons at official spoon repository (you may need a little config before using them).

  • Customize keybindings

    Please read ~/.hammerspoon/private/config.luafor more details.

Finally press cmd + ctrl + shift + r to reload the configuration.

Contribute

More details

Thanks to

More details

https://github.com/zzamboni/oh-my-hammerspoon

https://github.com/scottcs/dot_hammerspoon

https://github.com/dharmapoudel/hammerspoon-config

http://tracesof.net/uebersicht/

awesome-hammerspoon's People

Contributors

ashfinal avatar herder avatar nasyxx avatar octplane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-hammerspoon's Issues

Help with rebinding of one of the actions in basic mode

I wanted to rewrite one of the actions in basic mode to instead of scrolling, call a certain hotkey. (option and arrows to be exact).

I tried rewriting it as follows :

viewM:bind('', 'H', 'Scroll Leftward', function() hs.eventtap.keyStroke("option", "left") end)
viewM:bind('', 'L', 'Scroll Rightward', function() hs.eventtap.keyStroke("option", "right") end)
viewM:bind('', 'J', 'Scroll Downward', function() hs.eventtap.keyStroke("option", "down") end)
viewM:bind('', 'K', 'Scroll Upward', function() hs.eventtap.keyStroke("option", "up") end)

I would think that it would make hjkl, call the hotkeys in VIEW mode, but it didn't work. Do you perhaps know what might cause this issue?

Thank you for any help.

Unable to load image: ./resources/watchbg.png stack traceback

*** ERROR: ...on.app/Contents/Resources/extensions/hs/drawing/init.lua:88: Unable to load image: ./resources/watchbg.png
stack traceback:
[C]: in function 'hs.image.imageFromPath'
...on.app/Contents/Resources/extensions/hs/drawing/init.lua:88: in function 'hs.drawing.internal.image'
/Users/wushengzhong/.hammerspoon/widgets/analogclock.lua:16: in function 'showAnalogClock'
/Users/wushengzhong/.hammerspoon/widgets/analogclock.lua:146: in main chunk
[C]: in function 'rawrequire'
...app/Contents/Resources/extensions/hs/_coresetup/init.lua:529: in function 'require'
/Users/wushengzhong/.hammerspoon/init.lua:372: in main chunk
[C]: in function 'xpcall'
...app/Contents/Resources/extensions/hs/_coresetup/init.lua:561: in function 'hs._coresetup.setup'
(...tail calls...)

多显示器Widget显示错误

多显示器并且将外接显示器(分辨率高于内置显示器)设置为主显示器时widget按照原来的分辨率绘制

In RESIZE mode ⌘ + hjkl will go through windows back and forth but not cycle through them, could it be added?

What I mean is that if I press cmd + l in RESIZE mode, it will switch between active windows, but when you reach the 'end', it will just stop and not cycle through them. It would be really useful I think to give an option to actually cycle through windows so I have two active windows, pressing cmd + l repeatedly, will go back and forth between them without stop.

Also cmd + j/k do nothing for me. What are they supposed to do? :)

A alternative window mover approach?

With this strategy you can use only four keys(h/j/k/l) for eight positions. And another(c) for center and another(f) for full screen.

move-window

The idea is save the last command, decide the position base on last command and current command.

For example if you press h window will go halfleft, then you press k. Now you have h+k which is cornerNW. If you press k again you now have k+k, that will be 'halfup`.

Add a shortcut to show/hide all widgets

Hey. Love your config.

Desktop widgets never have a chance to show since there are always some windows on top of them.
So, I think to add a shortcut to show/hide all widgets on the top level should make sense.

what do you think of it?

screen shot 2017-07-24 at 2 19 03 pm

How can I isolate windows hint functionality to just one function?

I really love this feature :

2017-01-05 at 00 01

I wish I can call it externally with url scheme and I wanted to move the modal switching from hammer spoon to karabiner. I can't however figure out what to do, to implement the win hints functionality. Ideally I want to make it into a function like this one.

I've looked through the source code and still can't figure it out. It seems to be heavily linked to modal switching.

Thank you for any help.

ERROR init.lua:449: bad argument #1 to 'rawrequire' (string expected, got nil)

你好,感谢开源

*** ERROR: ...app/Contents/Resources/extensions/hs/_coresetup/init.lua:449: bad argument #1 to 'rawrequire' (string expected, got nil)
stack traceback:
	[C]: in function 'rawrequire'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:449: in function 'require'
	/Users/Joshua/.hammerspoon/init.lua:269: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:481: in function 'hs._coresetup.setup'
	(...tail calls...)
  • 未曾接触过lua,不造怎么排查是不是我的原因。
  • 但是回退到上一版本就可以用了,所以大概是这次提交的问题.. 然而我看不懂。
-- 大概这个 ?
-require "modalmgr"		 +if #modal_list > 0 then require(modalmgr) end
  • 学习中... 确实好用,我的好多工具可以退休了。

thanks

git warning

when I git this project ,terminal warns me this:
fatal: destination path '/Users/zhan/.hammerspoon' already exists and is not an empty directory.
how I can fix
thanks!

Hsearch call chooser:hide() block me 3 seconds

When i open the hammerspoon console, hide()/show() has no blocked time. When i switch to other program, i press option+g show the chooser which has no blocked time.When i need to press option+g again to hide it , there is always 3 seconds which i have to wait. I add print to find which function cause the block, i found the obj.chooser:hide() cause the stuck. But i don't know how to debug objective-c, is there anyone has the same situation like me ?

environment: 10.12.6

Initial working directory

After installing and reloading the configuration, I received an error that hs.fs.currentDir returned nil (line 23 of init). Fixed by adding hs.fs.chdir('~/.hammerspoon') before the currentDir call.

Unable to disable window hints

Previously, I was able to disable window hints with this line in my custom configuration:

winhints_keys = {{}, ""}

I tried updating this for the new variable name:

hswhints_keys = {{}, ""}

but this will produce the following error when I reload:

*** ERROR: ...oon.app/Contents/Resources/extensions/hs/hotkey/init.lua:432: Invalid key:  - this may mean that the key requested does not exist in your keymap (particularly if you switch keyboard layouts frequently)
stack traceback:
	[C]: in function 'error'
	...oon.app/Contents/Resources/extensions/hs/hotkey/init.lua:23: in upvalue 'getKeycode'
	...oon.app/Contents/Resources/extensions/hs/hotkey/init.lua:192: in function 'hs.hotkey.new'
	...oon.app/Contents/Resources/extensions/hs/hotkey/init.lua:432: in method 'bind'
	/User/me/.hammerspoon/init.lua:49: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:561: in function 'hs._coresetup.setup'
	(...tail calls...)

For now I work around it by commenting out the "Register windowHints" code. It would be nicer if there were a way to simply disable it.

How to modify the "mode status window"?

Please forgive for my ignorance, but how to change the default appearance and location of the "mode status window"( which I am referring the black block that indicates the current mode,shows “dock mode" by default) sits in the right downside corner of the screen? I wish it could be auto-hidden, it would be grateful if you show me how to achieve it, thx.

您好,打扰。请问屏幕右下角modal切换状态显示框如何修改其属性(比如大小,半透明程度,位置)?能否设置其自动隐藏,只有激活时显示?

Some window movement commands cause windows to be relocated to another monitor

A common workflow for me is to throw a window to another monitor and then size it to half the screen. With my previous hammerspoon config this worked fine, but I've noticed that since I've started using this config the window will often revert back to the previous monitor. I can workaround this by sizing to half the screen first, and then throwing to the next monitor, but this only works when the window is on the left half.

init.lua:22: attempt to concatenate a nil value

	(...tail calls...)
2017-02-16 02:30:32: -- Lazy extension loading enabled
2017-02-16 02:30:32: -- Loading ~/.hammerspoon/init.lua
2017-02-16 02:30:32: -- Loading extension: hotkey
2017-02-16 02:30:32: -- Loading extension: hints
2017-02-16 02:30:32: -- Loading extension: uielement
2017-02-16 02:30:32: -- Loading extension: window
2017-02-16 02:30:32: -- Loading extension: drawing
2017-02-16 02:30:32: -- Loading extension: fs
2017-02-16 02:30:32: *** ERROR: /Users/bao3/.hammerspoon/init.lua:22: attempt to concatenate a nil value
stack traceback:
	/Users/bao3/.hammerspoon/init.lua:22: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:481: in function 'hs._coresetup.setup'
	(...tail calls...)

而 init.lua:22 的内容是

privateconf = hs.fs.pathToAbsolute(hs.fs.currentDir()..'/private/awesomeconfig.lua')

外接显示器widget和dock model位置不对!

widget其它人有提这个问题我就不多说了。
我外接27寸2560*1440的显示器,Dock model显示网速的提示出现在了屏幕的**,请问哪里可能改,或者大神给一个更新。谢谢!

Some Window Manipulations don't work

Hi ashfinal,

Thanks for awesome-hammerspoon it's helped me A LOT so far!

I have only installed this recently, and am still learning, so not sure how to troubleshoot this. I have come across some issues with the windows manipulating though. Some of the shortcuts don't work when I'm in manipulation mode (resizeM environment). For example when I want to move the window to the left or right half of the monitor, it won't (the 'H' and 'L' shortcuts in the resizeM modal Environment). The 'Move...' shortcuts do work though, as do the expand and shrink functions. Also the 'Move to X Monitor' shortcuts don't work either.

I'm on a MacBook Pro 2016 TouchBar model with 3 external screens attached running on Mojave 10.14.3. Is there a config step that I have missed?

Thanks for everything you do :-)

T

new wallpaper source

Hi, this repo is so useful, Thanks. But I found that use bingdaily picture as wallpaper too boring, so I add a new module that use unsplash as source, can I make a pull requests?

winhints_keys overlays options so you can't see them

For example I trigger it and have two active windows but I can't see what the other window is :

2016-12-31 at 16 25

Would it be possible to smartly rearrange them so you can always see the names of the windows, and also preserve lettering for each window, so you can remember what each window represents to quickly go back to it. I guess it does preserve the lettering, but haven't checked it when many active windows are open.

Thank you for any help.

Only the window management

I like this hammerspoon config, it's awesome, but I just want the part of window management, how can I get it?

Modal tray is missing

Just updated my config pulling changes from your repo, and now I cannot see the model status on the bottom right corner. Could you please help me, how can I get it back?

Make cmd-alt-arrow window movement to an optional module

These five shortcuts are in conflict with the defaults of popular text editors. Also people may have different preferences on which modifier keys to use. Perhaps we need to move these to a different module, like under misc/ so that we can drop it to use dedicated window management apps or override it using private modules.

resizeextra_lefthalf_keys = resizeextra_lefthalf_keys or {{"cmd", "alt"}, "left"}
if string.len(resizeextra_lefthalf_keys[2]) > 0 then
    hs.hotkey.bind(resizeextra_lefthalf_keys[1], resizeextra_lefthalf_keys[2], "Lefthalf of Screen", function() resize_win('halfleft') end)
end
resizeextra_righthalf_keys = resizeextra_righthalf_keys or {{"cmd", "alt"}, "right"}
if string.len(resizeextra_righthalf_keys[2]) > 0 then
    hs.hotkey.bind(resizeextra_righthalf_keys[1], resizeextra_righthalf_keys[2], "Righthalf of Screen", function() resize_win('halfright') end)
end
resizeextra_fullscreen_keys = resizeextra_fullscreen_keys or {{"cmd", "alt"}, "up"}
if string.len(resizeextra_fullscreen_keys[2]) > 0 then
    hs.hotkey.bind(resizeextra_fullscreen_keys[1], resizeextra_fullscreen_keys[2], "Fullscreen", function() resize_win('fullscreen') end)
end
resizeextra_fcenter_keys = resizeextra_fcenter_keys or {{"cmd", "alt"}, "down"}
if string.len(resizeextra_fcenter_keys[2]) > 0 then
    hs.hotkey.bind(resizeextra_fcenter_keys[1], resizeextra_fcenter_keys[2], "Resize & Center", function() resize_win('fcenter') end)
end
resizeextra_center_keys = resizeextra_center_keys or {{"cmd", "alt"}, "return"}
if string.len(resizeextra_center_keys[2]) > 0 then
    hs.hotkey.bind(resizeextra_center_keys[1], resizeextra_center_keys[2], "Center Window", function() resize_win('center') end)
end

Thoughts?

Error loading images

Using Hammerspoon 0.9.54 installed using brew cask on a MacBook running Sierra, when I reload the config I get the following errors:

2017-07-11 21:16:50: -- Lazy extension loading enabled
2017-07-11 21:16:50: -- Loading ~/.hammerspoon/init.lua
2017-07-11 21:16:50: -- Loading extension: hotkey
2017-07-11 21:16:50: -- Loading extension: hints
2017-07-11 21:16:50: -- Loading extension: uielement
2017-07-11 21:16:50: -- Loading extension: window
2017-07-11 21:16:50: -- Loading extension: drawing
2017-07-11 21:16:50: -- Loading extension: fs
2017-07-11 21:16:50: 21:16:50     hotkey: Enabled hotkey ⌘⌃R
2017-07-11 21:16:50: -- Loading extension: alert
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌃L
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌃S
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌥D
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌃⇧R: Reload Configuration
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌃⇧L: Lock Screen
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌃⇧T: Show Digital Clock
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌃⇧SPACE: Toggle Hotkeys Cheatsheet
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌥LEFT: Lefthalf of Screen
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌥RIGHT: Righthalf of Screen
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌥UP: Fullscreen
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌥DOWN: Resize & Center
2017-07-11 21:16:50:              hotkey: Enabled hotkey ⌘⌥RETURN: Center Window
2017-07-11 21:16:50: -- Loading extension: eventtap
2017-07-11 21:16:50: -- Loading extension: network
2017-07-11 21:16:50: -- Loading extension: osascript
2017-07-11 21:16:50: -- Loading extension: menubar
2017-07-11 21:16:50: -- Loading extension: timer
2017-07-11 21:16:50: -- Loading extension: screen
2017-07-11 21:16:50: -- Loading extension: styledtext
2017-07-11 21:16:50: -- Loading extension: geometry
2017-07-11 21:16:50: -- Loading extension: canvas
2017-07-11 21:16:50: -- Loading extension: image
2017-07-11 21:16:50: *** ERROR: /Users/amit/.hammerspoon/widgets/timelapsed.lua:46: Unable to load image: ./resources/timebg.png
stack traceback:
	[C]: in function 'hs.image.imageFromPath'
	/Users/amit/.hammerspoon/widgets/timelapsed.lua:46: in main chunk
	[C]: in function 'rawrequire'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:529: in function 'require'
	/Users/amit/.hammerspoon/init.lua:372: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:561: in function 'hs._coresetup.setup'
	(...tail calls...)

The image is there in ~/.hammerspoon/resources, but for some reason it isn't able to load it.

interacting with workspaces?

In most of my normal uses, I tile up maximum 2 windows on a screen. On a laptop, without an external display, I would prefer to use workspaces:

  1. Set default workspace for applications
  2. Jump to a specific workspace and open up its default application(s).

Can these be done/added?

*** ERROR:.hammerspoon/init.lua:21: attempt to concatenate a nil value

os: macOS 10.12

*** ERROR: /Users/xxx/.hammerspoon/init.lua:21: attempt to concatenate a nil value
stack traceback:
	/Users/xxx/.hammerspoon/init.lua:21: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:481: in function 'hs._coresetup.setup'
	(...tail calls...)

[feature request] allow to change to and from one mode from same hotkey

So for example I can trigger window management with ⌥ + R and then cancel the mode to go to DOCK mode with pressing escape.

I wish you could trigger window management with same hotkey, but if already in window management mode, it would go back to DOCK mode. I wish it would apply to any other mode out there too. This would be extremely useful for me as I like to quickly jump into one mode and then go back and I don't want to press escape for it. This doesn't mean you should remove the ability to press escape to return to default mode, just give an option to trigger into / from one mode with same hotkey.

Can I only use left alt with hammerspoon?

I use Emacs write things, sometimes will press alt key as a meta key. So I want to know can I only use left alt key with hammerspoon, then I can use right alt key with Emacs.

How to make it so that DOCK MODE and network monitoring does not show at all, only modes show

I find always seeing the network monitoring really distracting. So as seeing DOCK MODE.

What I think would be great, is to always hide it by default, and only show users what mode they are in that is not the default. So if I was in resize window mode, it would show me this permanently until I quit the mode :

2016-12-31 at 16 01

When in view mode, show this :

2016-12-31 at 16 02

And so on. Absence of the mode bar, indicates that I am in normal mode. This would be really amazing to have to complete this superb hammer spoon framework. Thank you for this.

I hope this would be possible to change.

Some problems on freshly installed system

I tried both with MacOS Sierra and El Capitan: On the desktop, one may see that the calendar on the lower right corner has wrong highlight of the current date (see attached image). And there is a big colour bar appears in the middle of the screen.

screen shot 2017-06-09 at 21 46 50

On the console, there are some errors that I don't understand because I am still new to HS.

The lua code of .hammerspoon is running off this commit unmodified: f4ba0d3

2017-06-09 21:42:07: Welcome to the Hammerspoon Console!
You can run any Lua code in here.

2017-06-09 21:42:14: -- Lazy extension loading enabled
2017-06-09 21:42:14: -- Loading ~/.hammerspoon/init.lua
2017-06-09 21:42:14: -- Loading extension: hotkey
2017-06-09 21:42:14: -- Loading extension: hints
2017-06-09 21:42:14: -- Loading extension: uielement
2017-06-09 21:42:14: -- Loading extension: window
2017-06-09 21:42:14: -- Loading extension: drawing
2017-06-09 21:42:14: -- Loading extension: fs
2017-06-09 21:42:14: 21:42:14     hotkey: Enabled hotkey ⌘⌃⇧R: Reload Configuration
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌃⇧L: Lock Screen
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌃⇧T: Show Digital Clock
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌃⇧SPACE: Toggle Hotkeys Cheatsheet
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌥LEFT: Lefthalf of Screen
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌥RIGHT: Righthalf of Screen
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌥UP: Fullscreen
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌥DOWN: Resize & Center
2017-06-09 21:42:14:              hotkey: Enabled hotkey ⌘⌥RETURN: Center Window
2017-06-09 21:42:14: -- Loading extension: eventtap
2017-06-09 21:42:14: -- Loading extension: network
2017-06-09 21:42:14: -- Loading extension: osascript
2017-06-09 21:42:16: -- Loading extension: menubar
2017-06-09 21:42:16: -- Loading extension: timer
2017-06-09 21:42:16: -- Loading extension: screen
2017-06-09 21:42:16: -- Loading extension: geometry
2017-06-09 21:42:17: -- Loading extension: styledtext
2017-06-09 21:42:17: -- Loading extension: canvas
2017-06-09 21:42:17: -- Loading extension: image
2017-06-09 21:42:17: 21:42:17 ** Warning:hs.keycode: key '=' not found in active keymap; using ANSI-standard US keyboard layout as fallback, returning '24'
2017-06-09 21:42:17: 21:42:17 ** Warning:hs.keycode: key '`' not found in active keymap; using ANSI-standard US keyboard layout as fallback, returning '50'
2017-06-09 21:42:17: 21:42:17 ** Warning:hs.keycode: key '[' not found in active keymap; using ANSI-standard US keyboard layout as fallback, returning '33'
2017-06-09 21:42:17: 21:42:17 ** Warning:hs.keycode: key ']' not found in active keymap; using ANSI-standard US keyboard layout as fallback, returning '30'
2017-06-09 21:42:17: -- Loading extension: application
2017-06-09 21:42:17:              hotkey: Enabled hotkey ⌘⌃⇧Q: Toggle Modal Supervisor
2017-06-09 21:42:17:              hotkey: Disabled hotkey ⌘⌃⇧Q: Toggle Modal Supervisor
2017-06-09 21:42:17: -- Done.
2017-06-09 21:42:18: ********
2017-06-09 21:42:18: 21:42:18 ERROR:   LuaSkin: hs.canvas:invalid percentage string specified for field w of frame for element 6
2017-06-09 21:42:18: ********
2017-06-09 21:42:18: ********
2017-06-09 21:42:18: 21:42:18 ERROR:   LuaSkin: hs.timer callback error: ...oon.app/Contents/Resources/extensions/hs/canvas/init.lua:525: bad argument #3 to 'elementAttribute' (invalid argument type for frame specified)
stack traceback:
	[C]: in method 'elementAttribute'
	...oon.app/Contents/Resources/extensions/hs/canvas/init.lua:525: in metamethod '__newindex'
	/Users/user/.hammerspoon/widgets/timelapsed.lua:116: in function 'updateElapsedCanvas'
	/Users/user/.hammerspoon/widgets/timelapsed.lua:122: in function </Users/hien/.hammerspoon/widgets/timelapsed.lua:122>
2017-06-09 21:42:18: ********
2017-06-09 21:42:22: -- Loading extension: http
2017-06-09 21:42:22: -- Loading extension: json
2017-06-09 21:42:22: -- Loading extension: task

BingDaily don't refresh every 3h

Hi ashfinal,
the BingDaily's init.lua has check if obj.last_pic ~= pic_name then , but bing response image url like /th?id=OHR.RainforestMoss_ROW3048000823_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp ,the lastPathComponent always return th
So, it does't refresh main screen.

使用报错

并不懂lua,所以问一下,报错内容如下:

*** ERROR: /Users//.hammerspoon/init.lua:42: attempt to concatenate a nil value
stack traceback:
	/Users//.hammerspoon/init.lua:42: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:481: in function 'hs._coresetup.setup'
	(...tail calls...)

第42行内容为:

 privatepath = hs.fs.pathToAbsolute(hs.fs.currentDir()..'/private')

Mode block is not displayed in multi monitor setup

The 'Mode block' is not properly displayed in multi monitor setup, when I unplug the external monitors I can see the mode block, would it be an idea to display the mode block on the 'active' screen (similar like in my pull request for cheatsheet #19)

问个问题

看了你的hammer配置, 特别受启发, 因为我不是特别懂lua, 我写了一个类似你的时钟的东西, 就是在桌面上实时显示时钟, 但是我在代码中用的是类似(local time = hs.drawing. ... ), 然后动态跟新时钟直接就是 hs.timer.doEvery(...) , 也就是说我没有像你一样将timer保存为一个全局变量, 我不是很清楚lua垃圾回收机制是怎么工作的, 我刚开始直接尝试的时候, 发现是可以. 但是最近发现有时候时钟会莫名其妙的停住(不再刷新, 尝试debug发现我doEvery里面的回调函数已经不再执行了, 本来我设置的是每秒刷新一下, 就达到时间在桌面动态显示的结果) 想问一下这个是lua的gc把我的timer回收导致的吗?

Can window be set to two-thirds and one-third of the screen?

Thank you for your work.
I want to set it to one window to the left of the third, and the other window to the right of two-thirds, I hope to help. Thank you!

能否设置窗口为屏幕的三分之二和三分之一?
多谢作者你的工作。
我希望设置为一个窗口占左边三分之一,另一个窗口占右边三分之二,希望帮助。谢谢!

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.