about summary refs log tree commit diff
path: root/configs/shared/.emacs.d/wpc/screen-brightness.el
diff options
context:
space:
mode:
Diffstat (limited to 'configs/shared/.emacs.d/wpc/screen-brightness.el')
-rw-r--r--configs/shared/.emacs.d/wpc/screen-brightness.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/configs/shared/.emacs.d/wpc/screen-brightness.el b/configs/shared/.emacs.d/wpc/screen-brightness.el
index 8183196cccbc..715fc7baee35 100644
--- a/configs/shared/.emacs.d/wpc/screen-brightness.el
+++ b/configs/shared/.emacs.d/wpc/screen-brightness.el
@@ -9,6 +9,12 @@
 ;; TODO: Define some isomorphisms. E.g. int->string, string->int.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'prelude)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Constants
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -25,23 +31,17 @@
 (defun screen-brightness/increase ()
   "Increase the screen brightness."
   (interactive)
-  (start-process
-   "*xbacklight<screen-brightness/increase>*"
-   nil
-   "xbacklight"
-   "-inc"
-   (int-to-string screen-brightness/step-size))
+  (prelude/start-process
+   :name "screen-brightness/increase"
+   :command (string/format "xbacklight -inc %s" screen-brightness/step-size))
   (message "[screen-brightness.el] Increased screen brightness."))
 
 (defun screen-brightness/decrease ()
   "Decrease the screen brightness."
   (interactive)
-  (start-process
-   "*xbacklight<screen-brightness/decrease>*"
-   nil
-   "xbacklight"
-   "-dec"
-   (int-to-string screen-brightness/step-size))
+  (prelude/start-process
+   :name "screen-brightness/decrease"
+   :command (string/format "xbacklight -dec %s" screen-brightness/step-size))
   (message "[screen-brightness.el] Decreased screen brightness."))
 
 (when screen-brightness/install-kbds?