74e54dee9e41

Merge
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 09 Jul 2018 11:16:08 -0400
parents 4b486c5a8a54 (diff) c27fb01fc92f (current diff)
children 8b037f76f4c0
branches/tags (none)
files DefaultKeyBinding.dict ackrc grc/conf.gamecontroller grc/conf.maven karabiner/assets/complex_modifications/1505240117.json karabiner/karabiner.json keyremap4macbook/cadet.py keyremap4macbook/private.xml launchagents/com.stevelosh.dammitkeymando.plist launchagents/com.stevelosh.mailsync.plist osx.sh screen-256color.ti sjl.keylayout stumpwmrc terminal/tmux-256color.terminfo terminal/tmux.terminfo terminal/xterm-256color-italic.terminfo

Changes

--- a/mutt/offlineimaplinux.py	Sat Jul 07 20:27:24 2018 +0000
+++ b/mutt/offlineimaplinux.py	Mon Jul 09 11:16:08 2018 -0400
@@ -2,8 +2,8 @@
 
 import subprocess
 
-def get_keychain_pass(account=None):
-    command = "pass-work '%s'" % account
-    output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)
+def get_keychain_pass(account=None, command='pass'):
+    full_command = "%s '%s'" % (command, account)
+    output = subprocess.check_output(full_command, shell=True, stderr=subprocess.STDOUT)
     return output.splitlines()[0]
 
--- a/stumpwmrc	Sat Jul 07 20:27:24 2018 +0000
+++ b/stumpwmrc	Mon Jul 09 11:16:08 2018 -0400
@@ -37,6 +37,10 @@
                                          (find ch bag :test #'char=))))
 
 
+(defun mod+ (n increment modulo)
+  (mod (+ n increment) modulo))
+
+
 (defun volume ()
   (-<> (run-shell-command "amixer sget Master" t)
     (string-grep "Front Left:" <> :first-only t)
@@ -78,7 +82,7 @@
   `(case *host* ,@clauses))
 
 
-;;;; Regroup -------------------------------------------------------------------
+;;;; Regroup ------------------------------------------------------------------
 (defparameter *class-groups*
   '(("zoom" . "zoom")
     ("jetbrains-idea-ce" . "ij"))
@@ -101,6 +105,19 @@
 ;;;; Load ---------------------------------------------------------------------
 (load-module "pass")
 
+;;;; Brightness ---------------------------------------------------------------
+(defparameter *brightness-values* #(0 1 25 50 75 100))
+(defparameter *brightness-index* 2)
+
+(defun brightness ()
+  (aref *brightness-values* *brightness-index*))
+
+(defcommand rotate-brightness () ()
+  (setf *brightness-index*
+        (mod+ *brightness-index* 1 (length *brightness-values*)))
+  (run-shell-command (format nil "xbacklight -set ~D" (brightness))))
+
+
 ;;;; Commands -----------------------------------------------------------------
 (defcommand sane-hsplit () ()
   (hsplit)
@@ -241,7 +258,7 @@
 
 (define-top-keys ;; screen
   ("H-F5" "exec xbacklight -dec 10")
-  ("H-F6" "exec xbacklight -inc 10")
+  ("H-F6" "rotate-brightness")
   ("H-F7" "screen-single")
   ("H-F8" "screen-multi"))