mirror of
https://github.com/ebeem/guile-swayer.git
synced 2024-11-16 07:47:32 +01:00
add a standard configure function to modules
This commit is contained in:
parent
03011cb6f1
commit
dcb4a7ef2c
2 changed files with 9 additions and 16 deletions
|
@ -20,9 +20,7 @@
|
|||
WORKSPACES
|
||||
COLUMNS
|
||||
ROWS
|
||||
configure-workspaces
|
||||
configure-rows
|
||||
configure-columns
|
||||
workspace-grid-configure
|
||||
get-active-workspace-index
|
||||
switch-workspace-up
|
||||
switch-workspace-right
|
||||
|
@ -46,14 +44,10 @@
|
|||
;; number of columns in the grid
|
||||
(define COLUMNS 1)
|
||||
|
||||
(define (configure-workspaces workspaces)
|
||||
(set! WORKSPACES workspaces))
|
||||
|
||||
(define (configure-rows rows)
|
||||
(set! ROWS rows))
|
||||
|
||||
(define (configure-columns columns)
|
||||
(set! COLUMNS columns))
|
||||
(define* (workspace-grid-configure #:key rows columns workspaces)
|
||||
(when rows (set! ROWS rows))
|
||||
(when columns (set! COLUMNS columns))
|
||||
(when workspaces (set! WORKSPACES workspaces)))
|
||||
|
||||
(define* (get-active-workspace-name #:optional (workspaces (sway-get-workspaces)))
|
||||
"get name of active workspace"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#:use-module (swayipc events)
|
||||
|
||||
#:export (workspace-groups-init
|
||||
workspace-groups-configure
|
||||
OUTPUTS
|
||||
GROUPS))
|
||||
|
||||
|
@ -40,11 +41,9 @@
|
|||
;; ("19" "29" "39")))
|
||||
(define GROUPS '())
|
||||
|
||||
(define (configure-outputs outputs)
|
||||
(set! OUTPUTS outputs))
|
||||
|
||||
(define (configure-groups groups)
|
||||
(set! GROUPS groups))
|
||||
(define* (workspace-groups-configure #:key outputs groups)
|
||||
(when outputs (set! OUTPUTS outputs))
|
||||
(when groups (set! GROUPS groups)))
|
||||
|
||||
(define last-switched-group '())
|
||||
|
||||
|
|
Loading…
Reference in a new issue