mirror of
https://github.com/ebeem/guile-swayer.git
synced 2024-11-16 07:47:32 +01:00
[wip] initial example of alternating layout
This commit is contained in:
parent
a9f4e26432
commit
81ec835929
1 changed files with 34 additions and 0 deletions
34
examples/layout-alternating/layout-alternating.scm
Executable file
34
examples/layout-alternating/layout-alternating.scm
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/guile
|
||||||
|
!#
|
||||||
|
|
||||||
|
;; assuming your are running from a path relative to swaypic & modules
|
||||||
|
;; you can hardcode the load path here if that assumption isn't valid.
|
||||||
|
;; you have to add to load path the directory the contains modules and swayipc
|
||||||
|
;; these 2 directories exist in the root directory of the repostiry and are
|
||||||
|
;; supposed to be 2 parent levels away from this init file.
|
||||||
|
(let ((path (dirname
|
||||||
|
(dirname
|
||||||
|
(dirname (current-filename))))))
|
||||||
|
(format #t "adding folder to load path ~a\n" path)
|
||||||
|
(add-to-load-path path))
|
||||||
|
|
||||||
|
;; you can simply uncomment the above section and hardcode the path as below
|
||||||
|
;; (add-to-load-path "/home/YOUR_USER_HERE/git/guile-swayer")
|
||||||
|
|
||||||
|
;; if you would like to be relative to home, do as below
|
||||||
|
;; (string-append (getenv "HOME") "/.config/sway/init.scm")
|
||||||
|
|
||||||
|
(use-modules (oop goops)
|
||||||
|
(srfi srfi-18)
|
||||||
|
(modules layout-alternating)
|
||||||
|
(ice-9 pretty-print)
|
||||||
|
(swayipc))
|
||||||
|
|
||||||
|
(layout-alternating-configure)
|
||||||
|
(layout-alternating-init)
|
||||||
|
|
||||||
|
;; subscribe to all events
|
||||||
|
(sway-subscribe-all)
|
||||||
|
|
||||||
|
(sway-start-event-listener-thread)
|
||||||
|
(thread-join! SWAY-LISTENER-THREAD)
|
Loading…
Reference in a new issue