This commit is contained in:
Chris Cochrun 2023-12-19 15:24:12 -06:00
parent 25f12159c4
commit 96f1027e62
3 changed files with 45 additions and 0 deletions

View file

@ -19,6 +19,9 @@ with lib;
melpaPackages.dired-sidebar melpaPackages.dired-sidebar
chatgpt-shell chatgpt-shell
denote denote
geiser-guile
flymake-guile
flycheck-guile
denote-refs denote-refs
command-log-mode command-log-mode
all-the-icons all-the-icons

View file

@ -15,6 +15,12 @@
ollama ollama
ledger ledger
recutils recutils
guile
guile-sqlite3
guile-config
guile-sjson
guile-json
guile-lib
# unrar # unrar
p7zip p7zip
zip zip

36
scripts/zoomg Executable file
View 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)