Allow customizing workspace indexes
* exwm-workspace.el (exwm-workspace-index-map): New variable for customizing workspace indexes. (exwm-workspace--update-switch-history): Use it.
This commit is contained in:
		
							parent
							
								
									19515dc074
								
							
						
					
					
						commit
						7d967e7361
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -35,6 +35,10 @@
 | 
			
		|||
(defvar exwm-workspace--list nil "List of all workspaces (Emacs frames).")
 | 
			
		||||
(defvar exwm-workspace--current nil "Current active workspace.")
 | 
			
		||||
(defvar exwm-workspace-current-index 0 "Index of current active workspace.")
 | 
			
		||||
(defvar exwm-workspace-index-map #'number-to-string
 | 
			
		||||
  "Function for mapping a workspace index to a string for display.
 | 
			
		||||
 | 
			
		||||
By default `number-to-string' is applied which yields 0 1 2 ... .")
 | 
			
		||||
 | 
			
		||||
(defsubst exwm-workspace--position (frame)
 | 
			
		||||
  "Retrieve index of given FRAME in workspace list.
 | 
			
		||||
| 
						 | 
				
			
			@ -168,7 +172,7 @@ Please manually run the hook `exwm-workspace-list-change-hook' afterwards.")
 | 
			
		|||
                (lambda (j)
 | 
			
		||||
                  (format (if (= i j) "[%s]" " %s ")
 | 
			
		||||
                          (propertize
 | 
			
		||||
                           (int-to-string j)
 | 
			
		||||
                           (apply exwm-workspace-index-map (list j))
 | 
			
		||||
                           'face
 | 
			
		||||
                           (cond ((frame-parameter (elt exwm-workspace--list j)
 | 
			
		||||
                                                   'exwm-urgency)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue