40d807495e6e

Merge
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 28 Aug 2023 14:36:36 -0400
parents 40c68f5ac898 (current diff) 7990c9a826d3 (diff)
children dae3f0203507
branches/tags (none)
files

Changes

--- a/dunstrc	Mon Aug 28 14:36:09 2023 -0400
+++ b/dunstrc	Mon Aug 28 14:36:36 2023 -0400
@@ -7,6 +7,7 @@
     # geometry = "x5"
     idle_threshold = 60
     geometry = "300x5-15+30"
+    gap_size=4
     alignment = left
     show_age_threshold = 60
     sticky_history = yes
@@ -19,13 +20,8 @@
     startup_notification = true
     # dmenu = "/usr/bin/dmenu -p dunst: -nb #FFFFFF -nf #000000 -sb #94DBFF -sf #000000"
     browser = xdg-open
-
-[shortcuts]
-    close_all = ctrl+BackSpace
-
-[frame]
-    width = 3
-    color = "#000000"
+    frame_width = 1
+    frame_color = "#000000"
 
 [urgency_low]
     background = "#ffffff"
--- a/stumpwmrc	Mon Aug 28 14:36:09 2023 -0400
+++ b/stumpwmrc	Mon Aug 28 14:36:36 2023 -0400
@@ -302,7 +302,7 @@
 
 
 ;;;; Brightness ---------------------------------------------------------------
-(defparameter *brightness-values* #(0 1 5 10 25 50 75 100))
+(defparameter *brightness-values* #(0 1 5 10 20 30 40 55 70 85 100))
 (defvar *brightness-index* 5)
 
 (defun brightness ()
@@ -311,11 +311,9 @@
 (defun set-brightness (value)
   (run-and-echo-shell-command
     (hostcase
-      ((:mobius) (format nil "xbacklight -set ~D" value))
-      ((:papyrifera :alephnull) (format nil "xrandr --output ~A --brightness ~D"
-                                        (hostcase (:papyrifera "eDP")
-                                                  (:alephnull "eDP-1"))
-                                        (/ value 100.0)))
+      ((:gro) (format nil "xrandr --output ~A --brightness ~D"
+                      (hostcase (:gro "eDP"))
+                      (/ value 100.0)))
       (t (message "Not sure how to set brightness on this machine.")))))
 
 (defun rotate-brightness (delta)
@@ -428,7 +426,7 @@
 (defcommand sleep-machine ()
     ()
   (hostcase
-    ((:alephnull :mobius :papyrifera)
+    ((:gro)
      (run-shell-command "exec lock-screen")
      (run-shell-command "systemctl suspend"))
     (t (message "Not sleeping this machine for safety."))))
@@ -465,6 +463,10 @@
   (when-let-window (win "^Zoom -.*")
     (kill-window win)))
 
+(defcommand clear-notifications () ()
+  (run-shell-command "dunstctl close-all"))
+
+
 
 ;;;; Terminal Fonts -----------------------------------------------------------
 (defcommand reload-terminal-font-size ()
@@ -680,6 +682,7 @@
   ("H-V" "vlc")
   ("H-4" "budget")
   ("H-$" "spend")
+  ("C-BackSpace" "clear-notifications")
   )
 
 (define-top-keys ;; clipboard
@@ -713,6 +716,8 @@
   ("C-H-K" "exchange-direction up")
   ("C-H-L" "exchange-direction right")
 
+  ("H-`" "next")
+  ("H-~" "prev") ;; "
   ("H-n" "next-in-frame")
   ("H-p" "prev-in-frame")
   ("H-N" "pull-hidden-next")
@@ -846,6 +851,9 @@
                         (round (? sensors "amdgpu-pci-4500"  "edge"     "temp1_input"))
                         (round (? sensors "amdgpu-pci-4500"  "junction" "temp2_input"))
                         (round (? sensors "amdgpu-pci-4500"  "mem"      "temp3_input"))))
+    (:gro (format nil "[CPU ~D°C] [GPU ~D°C]"
+                        (round (? sensors "thinkpad-isa-0000" "CPU"  "temp1_input"))
+                        (round (? sensors "amdgpu-pci-0600"   "edge" "temp1_input"))))
     (t "?")))
 
 (defun sensors (&aux (now (get-internal-real-time)))
@@ -898,7 +906,7 @@
 
       ;; battery and brightness for laptops
       (hostcase
-        ((:mobius :alephnull :papyrifera)
+        ((:gro)
          '("(B %B)"
            " (BR "
            (:eval (princ-to-string (brightness)))
@@ -930,7 +938,7 @@
 ;; (defvar *dropbox*
   ;; (run-shell-command "~/.dropbox-dist/dropboxd"))
 
-(defvar *dunst*
+#+no(defvar *dunst*
   (run-shell-command "/usr/bin/dunst -conf ~/.dunstrc"))
 
 (when (probe-file "/home/sjl/.stumpwmrc.local")
--- a/vim/vimrc	Mon Aug 28 14:36:09 2023 -0400
+++ b/vim/vimrc	Mon Aug 28 14:36:36 2023 -0400
@@ -1649,8 +1649,10 @@
     au Filetype markdown vnoremap <buffer> <localleader>l <esc>`>a]<esc>`<i[<esc>`>lla()<esc>"+P
 
     " Use <localleader>1/2/3 to add headings.
-    au Filetype markdown nnoremap <buffer> <localleader>1 yypVr=:redraw<cr>
-    au Filetype markdown nnoremap <buffer> <localleader>2 yypVr-:redraw<cr>
+    " au Filetype markdown nnoremap <buffer> <localleader>1 yypVr=:redraw<cr>
+    " au Filetype markdown nnoremap <buffer> <localleader>2 yypVr-:redraw<cr>
+    au Filetype markdown nnoremap <buffer> <localleader>1 mzI#<space><esc>`zll
+    au Filetype markdown nnoremap <buffer> <localleader>2 mzI##<space><esc>`zlll
     au Filetype markdown nnoremap <buffer> <localleader>3 mzI###<space><esc>`zllll
     au Filetype markdown nnoremap <buffer> <localleader>4 mzI####<space><esc>`zlllll
 
--- a/xsessionrc	Mon Aug 28 14:36:09 2023 -0400
+++ b/xsessionrc	Mon Aug 28 14:36:36 2023 -0400
@@ -21,7 +21,10 @@
 xcape -t 200 -e 'Control_L=Escape;Shift_L=Shift_L|9;Shift_R=Shift_R|0'
 xautolock -time 30 -locker /home/sjl/src/dotfiles/bin/lock-screen &
 
-# /usr/bin/dunst -config $HOME/.dunstrc &
+# turn off heart-attack-inducing pc speaker beep
+xset -b
+
+/usr/bin/dunst -config $HOME/.dunstrc &
 
 # Fix the fucking GTK scrolling bullshit
 # God bless you https://mmk2410.org/2018/02/15/scrolling-doesnt-work-in-gtk-3-apps-in-stumpwm/