awesome/lib/keys.fnl

36 lines
576 B
Fennel

;;; lib/keys.fnl --- Key configuration utilities
;;; Commentary:
;; Comments
;;; Code:
(var keys {})
(local awful (require :awful))
(local fun (require :lib.fun))
(local modifiers
{:mod "Mod4"
:alt "Mod1"
:super "Mod4"
:shift "Shift"
:ctrl "Control"})
;;;
;; Functions
(fn map-mods [mods]
(->> mods
(fun.map (partial . modifiers))
(fun.totable)))
(fn keys.key [mods kc fun]
(awful.key (map-mods mods) kc fun))
(fn keys.button [mods bc fun]
(awful.button (map-mods mods) bc fun))
keys
;;; lib/keys.fnl ends here