guile
This commit is contained in:
		
							parent
							
								
									25f12159c4
								
							
						
					
					
						commit
						96f1027e62
					
				
					 3 changed files with 45 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -19,6 +19,9 @@ with lib;
 | 
			
		|||
        melpaPackages.dired-sidebar
 | 
			
		||||
        chatgpt-shell
 | 
			
		||||
        denote
 | 
			
		||||
        geiser-guile
 | 
			
		||||
        flymake-guile
 | 
			
		||||
        flycheck-guile
 | 
			
		||||
        denote-refs
 | 
			
		||||
        command-log-mode
 | 
			
		||||
        all-the-icons
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,6 +15,12 @@
 | 
			
		|||
    ollama
 | 
			
		||||
    ledger
 | 
			
		||||
    recutils
 | 
			
		||||
    guile
 | 
			
		||||
    guile-sqlite3
 | 
			
		||||
    guile-config
 | 
			
		||||
    guile-sjson
 | 
			
		||||
    guile-json
 | 
			
		||||
    guile-lib
 | 
			
		||||
    # unrar
 | 
			
		||||
    p7zip
 | 
			
		||||
    zip
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										36
									
								
								scripts/zoomg
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										36
									
								
								scripts/zoomg
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
#!/usr/bin/env -S guile -s
 | 
			
		||||
!#
 | 
			
		||||
(use-modules (ice-9 rdelim)
 | 
			
		||||
             (ice-9 string-fun))
 | 
			
		||||
 | 
			
		||||
(define hypr-sig (getenv "HYPRLAND_INSTANCE_SIGNATURE"))
 | 
			
		||||
(define sock (socket 1 1 0))
 | 
			
		||||
(connect sock AF_UNIX (string-concatenate `("/tmp/hypr/" ,hypr-sig "/.socket.sock")))
 | 
			
		||||
 | 
			
		||||
(define get-zoom-cmd "/getoption misc:cursor_zoom_factor")
 | 
			
		||||
 | 
			
		||||
(define (send msg)
 | 
			
		||||
  (display msg sock))
 | 
			
		||||
 | 
			
		||||
(define (set-zoom amount)
 | 
			
		||||
  (send (string-concatenate `("/keyword misc:cursor_zoom_factor " ,(number->string amount)))))
 | 
			
		||||
 | 
			
		||||
(send get-zoom-cmd)
 | 
			
		||||
 | 
			
		||||
(define zoom
 | 
			
		||||
  (do ((line (read-line sock) (read-line sock)))
 | 
			
		||||
      ((eof-object? line))
 | 
			
		||||
    (when (string-contains line "float")
 | 
			
		||||
      (+ (string->number
 | 
			
		||||
          (string-trim (string-replace-substring line "float: " " ")))
 | 
			
		||||
         0.1))))
 | 
			
		||||
 | 
			
		||||
(display zoom)
 | 
			
		||||
 | 
			
		||||
(do ((line (read-line sock) (read-line sock)))
 | 
			
		||||
    ((eof-object? line))
 | 
			
		||||
  (display line)
 | 
			
		||||
  (newline))
 | 
			
		||||
 | 
			
		||||
(close sock)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue