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 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
|
||||
|
Loading…
Reference in New Issue
Block a user