mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 09:16:36 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			861 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			861 B
		
	
	
	
		
			Text
		
	
	
	
	
	
(deflisten workspaces
 | 
						|
  :initial `[{"id": 1,"name": "N/A","monitor": "N/A","windows": 1,"hasfullscreen": false,"lastwindow": "N/A","lastwindowtitle": "N/A","format_name": "N/A","active": true}]`
 | 
						|
  `scripts/workspaces --loop`)
 | 
						|
 | 
						|
 | 
						|
; (defwidget sep []
 | 
						|
;   (label :class "separ module" :text "|"))
 | 
						|
 | 
						|
 | 
						|
; Consider making the window name clickable, opening up a full window that's showing
 | 
						|
; the selected window details (class, unformatted name, and perhaps even more, like
 | 
						|
; xwayland status, ...)
 | 
						|
(defwidget workspaces_module []
 | 
						|
  (box
 | 
						|
    :class "module workspaces"
 | 
						|
 | 
						|
    (for workspace in workspaces
 | 
						|
      (eventbox
 | 
						|
        :class {workspace.active ? 'focused' : workspace.windows > 0 ? 'active' : 'inactive'}
 | 
						|
        :onclick `scripts/workspaces --switch ${workspace.id}`
 | 
						|
 | 
						|
        (label
 | 
						|
          :class "value"
 | 
						|
          :text {workspace.format_name}))
 | 
						|
      )
 | 
						|
  ))
 |