refactor: remove duplicate code from decoration module
This commit is contained in:
parent
3a51bab1c8
commit
dea630bf1e
@ -10,25 +10,9 @@
|
|||||||
(local gears (require :gears))
|
(local gears (require :gears))
|
||||||
(local wibox (require :wibox))
|
(local wibox (require :wibox))
|
||||||
|
|
||||||
(local std (require :lib.std))
|
|
||||||
|
|
||||||
;; TODO Properly abstract these into a library
|
|
||||||
|
|
||||||
(local fun (require :lib.fun))
|
(local fun (require :lib.fun))
|
||||||
(local modifiers
|
(local std (require :lib.std))
|
||||||
{:mod "Mod4"
|
(local button (. (require :lib.keys) :button))
|
||||||
:alt "Mod1"
|
|
||||||
:super "Mod4"
|
|
||||||
:shift "Shift"
|
|
||||||
:ctrl "Control"})
|
|
||||||
|
|
||||||
(fn map-mods [mods]
|
|
||||||
(->> mods
|
|
||||||
(fun.map (partial . modifiers))
|
|
||||||
(fun.totable)))
|
|
||||||
|
|
||||||
(fn button [mods bc fun]
|
|
||||||
(awful.button (map-mods mods) bc fun))
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;; Functions
|
;; Functions
|
||||||
|
Loading…
Reference in New Issue
Block a user