From dea630bf1ebf60170041b47b2cea84f0e192f48c Mon Sep 17 00:00:00 2001 From: xeals Date: Tue, 15 Jan 2019 22:17:06 +1100 Subject: [PATCH] refactor: remove duplicate code from decoration module --- module/decorate.fnl | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/module/decorate.fnl b/module/decorate.fnl index 898b7d2..93a25cf 100644 --- a/module/decorate.fnl +++ b/module/decorate.fnl @@ -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