refactor: remove duplicate code from decoration module

This commit is contained in:
xeals 2019-01-15 22:17:06 +11:00
parent 3a51bab1c8
commit dea630bf1e

View File

@ -10,25 +10,9 @@
(local gears (require :gears))
(local wibox (require :wibox))
(local std (require :lib.std))
;; TODO Properly abstract these into a library
(local fun (require :lib.fun))
(local modifiers
{:mod "Mod4"
: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))
(local std (require :lib.std))
(local button (. (require :lib.keys) :button))
;;;
;; Functions