source: dotfiles/wm/.stumpwmrc@ bec93c6

Last change on this file since bec93c6 was bec93c6, checked in by Mikhail Kirillov <w96k@…>, on Dec 6, 2021 at 4:40:08 AM

Changes

  • Property mode set to 100644
File size: 3.1 KB
Line 
1;; -*- mode: common-lisp -*-
2
3(in-package :stumpwm)
4
5(setq *startup-message* "Welcome to your lovely LISP-machine")
6(set-prefix-key (kbd "C-t"))
7
8;; (require "ttf-fonts")
9;; (setf xft:*font-dirs* '("/run/current-system/profile/share/fonts/"))
10;; (setf
11;; clx-truetype:+font-cache-filename+
12;; (concat (getenv "HOME") "/.fonts/font-cache.sexp"))
13;; (xft:cache-fonts)
14;; (set-font (make-instance 'xft:font :family "Fira Sans"
15;; :subfamily "Regular" :size 10.5))
16
17;; Not available in guix yet
18;;(require "battery-portable")
19
20(require "cpu")
21(require "mem")
22
23;; Most of this settings are stumpwm defaults
24(setf *mode-line-pad-x* 0
25 *mode-line-pad-y* 0
26 *mouse-focus-policy* :click
27 *window-border-style* :thin
28 *message-window-gravity* :center
29 *normal-border-width* 0
30 *mode-line-border-width* 0
31
32 *transient-border-width* 0
33 *mode-line-position* :top
34 *time-modeline-string* "%d.%m.%y %k:%M"
35 *window-format* "%m%n%s%t "
36 *hidden-window-color* ""
37 *cpu-modeline-fmt* "%C"
38 *mode-line-background-color* "#f2f2f2"
39 *startup-mode-line* t
40
41 ;; Fix long windows names
42 *window-name-source* :class
43
44 ;; Delimiter in mode-line
45 *delim* " ^7|^0 "
46
47 ;; Mode-line customization
48 *screen-mode-line-format*
49 (list
50 ;; Windows
51 "^07%v^>^0"
52 ;; CPU
53 "%C" *delim*
54 ;; RAM
55 "%M" *delim*
56 ;; Battery
57 "%B" *delim*
58 ;; Date
59 "%d"
60 ))
61
62(set-normal-gravity :top)
63(set-win-bg-color "#f2f2f2")
64
65(defcommand icecat () ()
66 (run-or-raise "icecat" '(:class "IceCat")))
67
68(defcommand nyxt () ()
69 "Start Next or switch to it, if it is already running."
70 (run-or-raise "nyxt" '(:class "nyxt")))
71
72(define-key *root-map* (kbd "b") "nyxt")
73
74;; launch terminal
75(defcommand xterm () ()
76 "Start Urxvt or switch to it, if it is already running."
77 (run-or-raise "xterm" '(:class "xterm")))
78
79(define-key *root-map* (kbd "c") "xterm")
80(define-key *root-map* (kbd "C") "xterm")
81
82;; Change emacs to emacsclient
83(defcommand emacsclient () ()
84 (run-or-raise "emacsclient -c -a emaces" '(:class "Emacs")))
85(defcommand emacs () ()
86 (run-or-raise "emacs" '(:class "Emacs")))
87 (define-key *root-map* (kbd "e") "emacs")
88
89;; Volume Management in thinkpad
90(progn
91 (define-key *top-map* (kbd "XF86AudioLowerVolume") "exec amixer -q sset Master 3%-")
92 (define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec amixer -q sset Master 3%+")
93 (define-key *top-map* (kbd "XF86AudioMute") "amixer -q sset Master toggle"))
94
95;; Printscreen
96(defcommand printscreen () ()
97 "Works in X11 only"
98 (message "Print screen region")
99 (run-shell-command "import screenshot.png"))
100
101(define-key *top-map* (kbd "SunPrint_Screen") "printscreen")
102
103;; Enable Mode-line
104;;(enable-mode-line (current-screen) (current-head) t)
105
106;; Gaps: useless concept to be honest
107;; (load-module "swm-gaps")
108;; (setf swm-gaps:*inner-gaps-size* 0)
109;; (setf swm-gaps:*outer-gaps-size* 2)
110;; (swm-gaps:toggle-gaps)
111
112;; Show / Hide mode-line
113(define-key *root-map* (kbd "M") "mode-line")
114
115;; Old fix for scrolling gtk issue
116(setf (getenv "GDK_CORE_DEVICE_EVENTS") "1")
Note: See TracBrowser for help on using the repository browser.