Git Product home page Git Product logo

dot-hammerspoon's Introduction

Table of Contents

  1. My Hammerspoon configuration
    1. How to use it

My Hammerspoon configuration

Hammerspoon is one of the most-used utilities on my Mac. This repository contains my personal configuration, which you can use as a starting point and modify to suit your needs and preferences.

How to use it

  1. Install Hammerspoon (minimum version required: 0.9.55, which introduced the hs.spoons module)

  2. Clone this repository into your ~/.hammerspoon directory:

    git clone https://github.com/zzamboni/oh-my-hammerspoon.git ~/.hammerspoon
    
  3. Review init.lua and change or disable any Spoons as needed. Note that this file is generated from init.org, where you can read also a full description of the code. If you are an Emacs org-mode user, you can edit init.org and generate init.lua by tangling the file (M-x org-babel-tangle).

  4. Run Hammerspoon.

  5. All the necessary Spoons will be downloaded, installed and configured.

  6. Have fun!

dot-hammerspoon's People

Contributors

zzamboni 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

dot-hammerspoon's Issues

Clean install fails

Hi,

When I follow the install instructions hammerspoon throws an error when loading the configuration:

2017-05-31 11:58:03: -- Loading Spoon: SpoonInstall
2017-05-31 11:58:03: *** ERROR: /Users/rob/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:381: attempt to index a nil value (field 'spoons')
stack traceback:
/Users/rob/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:381: in function 'SpoonInstall.andUse'
/Users/rob/.hammerspoon/init.lua:35: in main chunk
[C]: in function 'xpcall'
...app/Contents/Resources/extensions/hs/_coresetup/init.lua:561: in function 'hs._coresetup.setup'
(...tail calls...)

Specify pasteboard/clipboard item?

Is there a way to specify a particular pasteboard/clipboard item?

Sorry if this has already been asked, been browsing around for a few hours and can't seem to put together a solution!

The plan is to create a key bind using the num keys to denote each clipboard item (see image)

What I have so far:
#####################

hs.hotkey.bind({"cmd", "alt", "ctrl"}, "5", function()
hs.eventtap.keyStrokes(hs.pasteboard.getContents())
hs.alert.show("Paste test done")
end)

#####################
Default returns the first item on the pasteboard - Returns/pastes 'A'

Ideally "5" would return/paste 'E' ( "6"='F' , "7"='G' etc)

Noticed you incorporated VFS's clipboard.lua and expanded upon it within OMH (PS, Seems well documented, Thanks!)

Note: Currently using VFS's code within my init.lua. (Haven't gone beyond init.lua, only discovered hs last night!) so I'm not using OMH, or it's /plugins/misc/clipboard.lua just yet.
An uneducated (I'm not a programmer!) look at the differences between VFS + OHM suggested the majority of the additional code included within OMH (minus a few extra features) allows the code to sit within its own .lua / so it can be called by OMH as required.

Another reason I'm not using OMH just yet is that I'm unaware if there would be a key bind conflict.

Hopefully my suggestion won't be to difficult to achieve, maybe others may find it useful if included in OMH?

Any help is really appreciated!

clipboard: copy / pasting image not working

When I copy an image file and try to paste it somewhere from the hammerspoon clipboard it does not work. It seems that it actually only copies the title as as string.


17:01:05                 current_clipboard (text) = mountains.jpg
                         Adding mountains.jpg to clipboard history
17:01:18                 current_clipboard (text) = ocean_view.jpg
                         Adding ocean_view.jpg to clipboard history
17:03:02                 Refreshing chooser choices
                         Storing currently focused window
                         Calling mod.selectorobj:show()
17:04:10                 Refreshing chooser choices
                         Storing currently focused window
                         Calling mod.selectorobj:show()

screen shot 2016-04-29 at 5 04 14 pm

Default configuration not working on Mac OS X Sierra

When going through the 3 steps and not modifying anything, Hammerspoon reports an error on OSX. It says that the first plugin listed in init.lua cannot be found. Uncommenting that plugin and reloading the configuration will cause the error to be reported for the second (now first) plugin in the list.

What does the following mean? The sample code is commented out. I have copied it over and also uncommented it but the results are the same.

Copy init-local-sample.lua to init-local.lua and modify to change plugin configuration parameters or add your own arbitrary code.

KSheet has no bind_hotkeys and no toggle

I get an error with the KSheet config because that spoon has no bind_hotkeys method and no toggle method. I looked through the git history and it doesn't seem to ever have had those methods. Is the fix to just rewrite the plugin in my spoons repo, or is there something automatic that should be inferring how to toggle and bind?

Notify and execute updates

I'm not sure if this is feasible but it would be nice:

  • when there's a newer version available, there should be an indicator in the menu or wherever
  • the indicator should let the user update directly from there, instead of dropping to the command line

Installer doesn't work as advertised

2017-06-09 11:19:40: -- Lazy extension loading enabled
2017-06-09 11:19:40: -- Loading ~/.hammerspoon/init.lua
2017-06-09 11:19:40: -- Loading extension: logger
2017-06-09 11:19:40: -- Loading extension: drawing
2017-06-09 11:19:40: -- Loading Spoon: SpoonInstall
2017-06-09 11:19:40: -- Loading extension: inspect
2017-06-09 11:19:40: -- Loading extension: fs
2017-06-09 11:19:40: -- Loading extension: http
2017-06-09 11:19:40: -- Loading extension: json
2017-06-09 11:19:40: *** ERROR: ...tinkroes/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:230: bad argument #1 to 'write' (string expected, got nil)
stack traceback:
[C]: in method 'write'
...tinkroes/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:230: in function 'SpoonInstall._installSpoonFromZipURLgetCallback'
(...tail calls...)
...tinkroes/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:396: in function 'SpoonInstall.andUse'
...tinkroes/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:403: in function <...tinkroes/.hammerspoon/Spoons/SpoonInstall.spoon/init.lua:401>
(...tail calls...)
/Users/justinkroes/.hammerspoon/init.lua:57: in main chunk
[C]: in function 'xpcall'
...app/Contents/Resources/extensions/hs/_coresetup/init.lua:561: in function 'hs._coresetup.setup'
(...tail calls...)

URLDispatcher + Epichrome not working

Hi @zzamboni ,

URLDispatcher + Epichrome does not work for me. I am trying to use it in basically the same way as at https://github.com/zzamboni/dot-hammerspoon/blob/master/init.org#url-dispatching-to-site-specific-browsers. When I open a url that matches the url_pattern, the epichrome app is activated, but the url does not open. Does URLDispatcher + Epichrome work for you?

I saw in https://freenode.logbot.info/hammerspoon/20200311 that it was not working for anyone 6 months ago. Is that still the case or has the issue from https://freenode.logbot.info/hammerspoon/20200311 been fixed?

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.