dotfiles

shared miscellaneous configuration files between my systems
git clone git://git.eonn.xyz/dotfiles.git
Log | Files | Refs

commit e8b5f392548d4e24dae761666d4cd8c7331757aa
parent 936cb45f86f269aaa259d24adeaf6396c12260b3
Author: iressa <ian@eonn.xyz>
Date:   Thu, 20 Jan 2022 01:04:12 -0500

add stumpwm's init.lisp

Diffstat:
A.stumpwm.d/init.lisp | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/.stumpwm.d/init.lisp b/.stumpwm.d/init.lisp @@ -0,0 +1,33 @@ +;; -*-lisp-*- + +(in-package :stumpwm) + +(defun battery-mode-line-string () + (concatenate 'string + (with-open-file (stream "/sys/class/power_supply/BAT0/capacity" :if-does-not-exist nil) + (read-line stream nil)) + "% battery")) + +(defcommand toggle-my-mode-line () () + (stumpwm:toggle-mode-line (stumpwm:current-screen) + (stumpwm:current-head) + (list "%v " "^> | " "%d"))) + +(defcommand toggle-float () () + (if (typep (current-window) 'float-window) (unfloat-this) (float-this))) + +;; scrolling in GTK3+ applications +(setf (getenv "GDK_CORE_DEVICE_EVENTS") "1") + +(toggle-my-mode-line) + +(run-shell-command "xsetroot -cursor_name left_ptr") + +(setf *mouse-focus-policy* :click) + +(define-key *root-map* (kbd "c") "exec st") +(define-key *root-map* (kbd "l") "toggle-my-mode-line") +(define-key *root-map* (kbd "C-space") "toggle-float") +(define-key *root-map* (kbd "SunPrint_Screen") "exec scrot -s ~/Pictures/screenshots/%Y-%m-%d$s.png") +(define-key *top-map* (kbd "XF86MonBrightnessUp") "exec light -A 10") +(define-key *top-map* (kbd "XF86MonBrightnessDown") "exec light -U 10")