Comments (5)
Showing/hiding a widget is good, but all widgets is too much.
And also there may be more widgets coming, which makes the thing complicated.
I suggest you add some lines in ~/.hammerspoon/private/awesomeconfig.lua
to do what you want.
Thus, you can continue to benefit from this repo, meanwhile by pressing a shortcut bring up the widgets to the front, as you intended to.
If you need some help, feel free to let me know. :)
from awesome-hammerspoon.
For now, timelapsed
widget can be easily brought up by calling timelapsed_canvas:bringToFront()
, sent to back by timelapsed_canvas:sendToBack()
.
But the early created widgets, i.e. calendar
, analogclock
, hcalendar
, are not easy to do so. Because they consist of some parts of hs.drawing
.
I'm planing to refactor these widgets with hs.canvas
, the work will be done at tomorrow morning at the latest, I suggest you hold on before then.
from awesome-hammerspoon.
@ashfinal thanks, actually i've already tried.
The screenshot shows my work. Code is on the right half.
I don't think I am the only one who need this feature.
So I think maybe you will have an interest in supporting it officially.(maybe in a different way)
from awesome-hammerspoon.
Aha, I didn't notice your code. Glad you worked it out. :)
Still, I'll rewrite these widgets with hs.canvas
. I'm encounting some problem, but I will finish the work eventually. We can expect the code to be clean, extensible, and most important, respond to user interaction.
I'll leave this issue open until I make some progress.
from awesome-hammerspoon.
Sorry for the delay. The work is done, eventually.
Now you can use the code below to toggle its visibility.
function toggleVisibility()
if not calendarCanvas:isVisible() then calendarCanvas:bringToFront() else calendarCanvas:sendToBack() end
end
analogclockCanvas
, hcalendarCanvas
, timelapsed_canvas
… can also be called like that.
from awesome-hammerspoon.
Related Issues (20)
- 当我关闭 shortcut 显示后,窗口模式下,如何让那个红点居中呢? HOT 8
- Unable to disable window hints HOT 1
- Calendar date is not correct HOT 1
- CountDown spoon causes switching spaces to focus on Hammerspoon rather than currently visible application HOT 5
- interacting with workspaces? HOT 1
- A alternative window mover approach? HOT 5
- Can I only use left alt with hammerspoon? HOT 1
- How to disable the cheatsheet when I press "alt + A"
- Can window be set to two-thirds and one-third of the screen? HOT 1
- how to open Terminal? HOT 1
- WinWin Spoon is newer than this in Hammerspoon website
- Some Window Manipulations don't work
- git warning HOT 1
- BingDaily don't refresh every 3h
- 老哥,HCalendar被Dock栏遮挡如何解决 HOT 2
- WinWin doesn't split windows equal size
- Hsearch call chooser:hide() block me 3 seconds HOT 1
- Slow windows hints HOT 1
- 大佬,如果只想要cheatsheet和aria2c这两个功能的话,我应该怎么编辑配置文件呢
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-hammerspoon.