From b03afc5c0775197c598fb9ae8abfa373a53088fa Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 20 Mar 2022 14:23:26 +0000 Subject: [PATCH] tidy includes --- saturn/main.fnl | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/saturn/main.fnl b/saturn/main.fnl index 37ddf91..ede96cb 100644 --- a/saturn/main.fnl +++ b/saturn/main.fnl @@ -1,7 +1,23 @@ -(local lgi (require :lgi)) -(local Gio lgi.Gio) +(local {: Gio + : GLib + : GObject + : Gtk + : GdkPixbuf + : Gdk + : Pango} + (require :lgi)) + +(local {: List + : stringx + : tablex + } + ((require :pl.import_into))) + (local dbus (require :dbus_proxy)) (local inspect (require :inspect)) +(local lfs (require :lfs)) +(local inifile (require :inifile)) +(local posix (require :posix)) (local ICON_SIZE 64) (local CSS " @@ -87,14 +103,6 @@ (os.exit 0)))) -(local lfs (require :lfs)) -(local inifile (require :inifile)) -(local List (require "pl.List")) -(local stringx (require "pl.stringx")) -(local tablex (require "pl.tablex")) -(local inspect (require :inspect)) -(local posix (require :posix)) - (local path { :absolute? (fn [str] (= (str:sub 1 1) "/")) :concat (fn [...] (table.concat [...] "/")) @@ -103,14 +111,6 @@ :concat (fn [...] (table.concat [...] ":")) }) -(local Gtk lgi.Gtk) - -(local GdkPixbuf lgi.GdkPixbuf) - -(local Gdk lgi.Gdk) - -(local Pango lgi.Pango) - (local icon-theme (Gtk.IconTheme.get_default)) ;; Use the declared CSS for this app @@ -122,7 +122,6 @@ Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION )) - (local window (Gtk.Window { :title "Saturn V" :name "toplevel" @@ -257,15 +256,15 @@ (when (and (= path dbus-service-attrs.path) (= interface dbus-service-attrs.interface) (= name "Visible")) - (lgi.GLib.Variant "b" window.visible))) + (GLib.Variant "b" window.visible))) (Gio.DBusConnection.register_object bus.connection dbus-service-attrs.path interface-info - (lgi.GObject.Closure handle-dbus-method-call) - (lgi.GObject.Closure handle-dbus-get) - (lgi.GObject.Closure (fn [a] (print "set")))) + (GObject.Closure handle-dbus-method-call) + (GObject.Closure handle-dbus-get) + (GObject.Closure (fn [a] (print "set")))) (let [grid (Gtk.FlowBox { :orientation Gtk.Orientation.HORIZONTAL