2019-11-13 03:59:12 +00:00
|
|
|
(in-package :stumpwm)
|
|
|
|
|
|
|
|
;; Start up a swank server for happy SLIME hacking
|
|
|
|
(require :swank)
|
|
|
|
(swank-loader:init)
|
|
|
|
(swank:create-server :port 4004
|
|
|
|
:style swank:*communication-style*
|
2019-12-04 13:20:43 +00:00
|
|
|
:dont-close t)
|
|
|
|
|
|
|
|
;; Commands
|
|
|
|
(defcommand firefox () ()
|
|
|
|
(run-or-raise "firefox" '(:class "firefox")))
|
2019-11-13 03:59:12 +00:00
|
|
|
|
2019-12-07 06:14:43 +00:00
|
|
|
(defcommand lock () ()
|
2019-12-07 14:49:07 +00:00
|
|
|
(run-shell-command
|
|
|
|
(concatenate 'string
|
|
|
|
"i3lockmore "
|
|
|
|
"--image-fill ~/Pictures/space-background.png "
|
|
|
|
"-n "
|
|
|
|
"--lock-icon ~/Pictures/lock.png")))
|
2019-12-07 06:14:43 +00:00
|
|
|
|
2020-01-03 01:20:22 +00:00
|
|
|
(defcommand battery () ()
|
|
|
|
(let ((capacity
|
|
|
|
(string-trim
|
|
|
|
'(#\newline)
|
|
|
|
(run-shell-command
|
|
|
|
"cat /sys/class/power_supply/BAT0/capacity"
|
|
|
|
t))))
|
|
|
|
(echo-string (current-screen)
|
|
|
|
(format nil "Battery: ~A%" capacity))))
|
|
|
|
|
2019-11-13 03:59:12 +00:00
|
|
|
;; Keybindings
|
2019-12-04 13:20:43 +00:00
|
|
|
(define-key stumpwm:*root-map* (kbd "C-f") "firefox")
|
2019-11-13 03:59:12 +00:00
|
|
|
(define-key stumpwm:*root-map* (kbd "d") "exec rofi -show run")
|
|
|
|
(define-key stumpwm:*root-map* (kbd "w") "exec rofi -show window")
|
|
|
|
(define-key stumpwm:*root-map* (kbd "P") "exec passmenu")
|
|
|
|
(define-key stumpwm:*root-map* (kbd "N") "exec networkmanager_dmenu")
|
2020-01-04 13:12:06 +00:00
|
|
|
(define-key stumpwm:*root-map* (kbd "M") "exec ~/bin/monitor_layout.sh")
|
2019-12-07 14:49:07 +00:00
|
|
|
(define-key stumpwm:*root-map* (kbd "L") "lock")
|
2020-01-03 01:20:22 +00:00
|
|
|
(define-key stumpwm:*root-map* (kbd "b") "battery")
|
2019-11-15 05:30:07 +00:00
|
|
|
(define-key *top-map* (kbd "XF86MonBrightnessDown") "exec light -U 5")
|
|
|
|
(define-key *top-map* (kbd "XF86MonBrightnessUp") "exec light -A 5")
|
|
|
|
(define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec pavolume volup")
|
|
|
|
(define-key *top-map* (kbd "XF86AudioLowerVolume") "exec pavolume voldown")
|
|
|
|
(define-key *top-map* (kbd "XF86AudioMute") "exec pavolume mutetoggle")
|
2019-11-13 03:59:12 +00:00
|
|
|
|
|
|
|
;; X Windows config
|
|
|
|
(run-shell-command "xsetroot -cursor_name left_ptr")
|
2019-12-28 16:45:37 +00:00
|
|
|
(run-shell-command "setxkbmap -option caps:escape")
|
2019-11-13 03:59:12 +00:00
|
|
|
|
|
|
|
;; UI
|
|
|
|
(ql:quickload "clx-truetype")
|
|
|
|
(load-module "ttf-fonts")
|
|
|
|
(set-font
|
|
|
|
(make-instance 'xft:font :family "Triplicate T4c" :subfamily "Regular" :size 12))
|
|
|
|
(set '*message-window-padding* 4)
|
|
|
|
|
|
|
|
;; Notifications via Dunst
|
|
|
|
(run-shell-command "/usr/bin/dunst")
|