52daeac2d624

New laptop
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 21 Oct 2020 23:33:40 -0400
parents 0ad0176a5755
children a025b0d30da4
branches/tags (none)
files fish/config.fish stumpwmrc xsessionrc

Changes

--- a/fish/config.fish	Wed Sep 23 12:34:48 2020 -0400
+++ b/fish/config.fish	Wed Oct 21 23:33:40 2020 -0400
@@ -40,8 +40,8 @@
 # }}}
 # Abbreviations {{{
 
-abbr ai="sudo apt install"
-abbr sc="sudo systemctl"
+abbr --add ai "sudo apt install"
+abbr --add sc "sudo systemctl"
 
 # }}}
 # Completions {{{
--- a/stumpwmrc	Wed Sep 23 12:34:48 2020 -0400
+++ b/stumpwmrc	Wed Oct 21 23:33:40 2020 -0400
@@ -250,10 +250,17 @@
 (defun brightness ()
   (aref *brightness-values* *brightness-index*))
 
+(defun set-brightness (value)
+  (run-shell-command
+    (hostcase
+      ((:mobius :alephnull) (format nil "xbacklight -set ~D" value))
+      ((:papyrifera) (format nil "xrandr --output eDP --brightness ~D" (/ value 100.0)))
+      (t (message "Not sure how to set brightness on this machine.")))))
+
 (defun rotate-brightness (delta)
   (setf *brightness-index*
         (mod+ *brightness-index* delta (length *brightness-values*)))
-  (run-shell-command (format nil "xbacklight -set ~D" (brightness))))
+  (set-brightness (brightness)))
 
 (defcommand rotate-brightness-up () ()
   (rotate-brightness 1))
@@ -359,7 +366,7 @@
 (defcommand sleep-machine ()
     ()
   (hostcase
-    ((:alephnull :mobius)
+    ((:alephnull :mobius :papyrifera)
      (run-shell-command "exec lock-screen")
      (run-shell-command "systemctl suspend"))
     (t (message "Not sleeping this machine for safety.."))))
@@ -686,7 +693,7 @@
                             " ")
 
       (hostcase
-        ((:mobius :alephnull)
+        ((:mobius :alephnull :papyrifera)
          '("(B "
            (:eval (princ-to-string (battery)))
            ")"
--- a/xsessionrc	Wed Sep 23 12:34:48 2020 -0400
+++ b/xsessionrc	Wed Oct 21 23:33:40 2020 -0400
@@ -24,5 +24,4 @@
 # /usr/bin/dunst -config $HOME/.dunstrc &
 
 # exec gpg-agent --daemon --enable-ssh-support /usr/local/bin/stumpwm
-exec /usr/local/bin/stumpwm
-
+exec /usr/local/bin/stumpwm > .stump-xsession-log.out 2> .stump-xsession-log.err