e6e13bf8dad4

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 20 Mar 2024 12:05:34 -0400
parents ea681bd9c52d
children c0175626e056
branches/tags (none)
files stumpwm/key-mapping.lisp stumpwm/sensors.lisp stumpwm/terminal-fonts.lisp stumpwm/utils.lisp

Changes

--- a/stumpwm/key-mapping.lisp	Tue Mar 19 16:09:11 2024 -0400
+++ b/stumpwm/key-mapping.lisp	Wed Mar 20 12:05:34 2024 -0400
@@ -181,10 +181,10 @@
 ;;;                                                 |         |
 ;;;                                                 +---------+
 (define-top-keys ;; GAMER MOUSE
-  ("s-$" "move-focus* left")
-  ("s-*" "move-focus down")
-  ("s-@" "move-focus up")
-  ("s-^" "move-focus* right")
+  ("s-$" "move-window left")
+  ("s-*" "move-window down")
+  ("s-@" "move-window up")
+  ("s-^" "move-window right")
   ("M-s-Left"  "gprev")
   ("M-s-Right" "gnext")
   ("s-Home" "next-in-frame")
--- a/stumpwm/sensors.lisp	Tue Mar 19 16:09:11 2024 -0400
+++ b/stumpwm/sensors.lisp	Wed Mar 20 12:05:34 2024 -0400
@@ -35,7 +35,7 @@
                         (round (? sensors "amdgpu-pci-0400"   "edge" "temp1_input"))))
     (t "?")))
 
-(defcached (sensors :seconds 5.0)
+(defcached (sensors :seconds 10.0)
   (sensors%))
 
 (defun sensors-modeline (ml)
--- a/stumpwm/terminal-fonts.lisp	Tue Mar 19 16:09:11 2024 -0400
+++ b/stumpwm/terminal-fonts.lisp	Wed Mar 20 12:05:34 2024 -0400
@@ -1,27 +1,26 @@
 (in-package :stumpwm-user)
 
-(defcommand reload-terminal-font-size ()
-    ()
-  (setf *terminal-font-size*
-        (if (probe-file "/home/sjl/.terminal-font")
-          (with-open-file (f "/home/sjl/.terminal-font")
-            (read f))
-          11)))
+(defun read-terminal-font-size-from-config ()
+  (if (probe-file "/home/sjl/.terminal-font")
+    (with-open-file (f "/home/sjl/.terminal-font")
+      (read f))
+    11))
 
-(defparameter *terminal-font-size* (if (probe-file "/home/sjl/.terminal-font")
-                                     (with-open-file (f "/home/sjl/.terminal-font")
-                                       (read f))
-                                     11))
+(defvar *terminal-font-size* (read-terminal-font-size-from-config))
 
-(defcommand st-font-up ()
-    ()
+(defcommand reload-terminal-font-size () ()
+  (setf *terminal-font-size* (read-terminal-font-size-from-config)))
+
+(defcommand st-font-up () ()
   (loop :repeat 7 :do (meta (kbd "C-S-SunPageUp"))))
 
-(defcommand st-font-down ()
-    ()
+(defcommand st-font-down () ()
   (loop :repeat 7 :do (meta (kbd "C-S-SunPageDown"))))
 
-(defcommand st-font-reset ()
-    ()
+(defcommand st-font-reset () ()
   (meta (kbd "C-S-Home")))
 
+(defcommand tfont (size)
+    ((:integer "Size: "))
+  (setf *terminal-font-size* size))
+
--- a/stumpwm/utils.lisp	Tue Mar 19 16:09:11 2024 -0400
+++ b/stumpwm/utils.lisp	Wed Mar 20 12:05:34 2024 -0400
@@ -25,9 +25,9 @@
 
 
 (defmacro defcached ((name &key seconds) &body body)
-  (with-gensyms (ttl next value)
-    `(progn
-       (let ((,ttl ,seconds)
+  (let ((seconds (coerce seconds 'double-float)))
+    (with-gensyms (ttl next value)
+      `(let ((,ttl ,seconds)
              (,next nil)
              (,value nil))
          (defun ,name ()