Put Macbook display to sleep with keybinding
This commit is contained in:
parent
ddd0dc9d0c
commit
4e7d759e25
2 changed files with 12 additions and 2 deletions
|
|
@ -122,7 +122,9 @@ Now we can load, instantiate it, as well as create a callback loop to call =upda
|
||||||
And bind a key to the mute ability that works good for both keyboards:
|
And bind a key to the mute ability that works good for both keyboards:
|
||||||
|
|
||||||
#+BEGIN_SRC lua
|
#+BEGIN_SRC lua
|
||||||
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "M", spoon.Zoom:toggleMute)
|
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "M", function()
|
||||||
|
spoon.Zoom:toggleMute()
|
||||||
|
end)
|
||||||
|
|
||||||
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "M", function()
|
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "M", function()
|
||||||
spoon.Zoom:toggleMute()
|
spoon.Zoom:toggleMute()
|
||||||
|
|
@ -190,6 +192,14 @@ Not that we could also do something for Wake:
|
||||||
end
|
end
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
Oh, and here is a helper for [[file:laptop_keyboard.kbd][kanata]] to put the display to sleep:
|
||||||
|
|
||||||
|
#+BEGIN_SRC lua
|
||||||
|
hs.hotkey.bind({}, "F16", function()
|
||||||
|
hs.execute("pmset displaysleepnow")
|
||||||
|
end)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* Monitors
|
* Monitors
|
||||||
My company gave me a nice monitor … maybe a little too nice, as I don’t care to shift my neck to the extreme sides (serious first-world problem), so here I can /center/ a window Keeping it my field of view:
|
My company gave me a nice monitor … maybe a little too nice, as I don’t care to shift my neck to the extreme sides (serious first-world problem), so here I can /center/ a window Keeping it my field of view:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
(deflayer SYMBOLS
|
(deflayer SYMBOLS
|
||||||
esc 🔅 🔆 F3 F4 f5 f6 ◀◀ ▶⏸ ▶▶ 🔇 🔉 🔊
|
esc 🔅 🔆 F3 F4 f5 f16 ◀◀ ▶⏸ ▶▶ 🔇 🔉 🔊
|
||||||
_ f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 _ _ _
|
_ f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 _ _ _
|
||||||
_ S-1 S-2 { } S-\ F16 F17 F18 F19 pgup _ _ _
|
_ S-1 S-2 { } S-\ F16 F17 F18 F19 pgup _ _ _
|
||||||
_ S-3 S-4 S-9 S-0 ` left down up right pgdn _ _
|
_ S-3 S-4 S-9 S-0 ` left down up right pgdn _ _
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue