tidy includes

phoen
Daniel Barlow 2022-03-20 14:23:26 +00:00
parent 05b8cc77e8
commit b03afc5c07
1 changed files with 22 additions and 23 deletions

View File

@ -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