Update stumpwm/init.lisp

main
千住柱間 2024-02-03 04:37:46 +00:00
parent 752a47283e
commit 010eaf71ac
1 changed files with 45 additions and 53 deletions

View File

@ -1,16 +1,8 @@
(in-package :stumpwm)
(init-load-path #p"~/.config/stumpwm/modules/")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-cpu")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-mem")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-disk")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-net")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-screenshot")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-swm-gaps")
;;(stumpwm:add-to-load-path "/home/hashirama/.guix-profile/share/common-lisp/source/cl-clx-truetype")
(stumpwm:add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-ttf-fonts")
(add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-ttf-fonts/")
(add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-swm-gaps/")
;;(add-to-list )
;;;; gaps
;;(load-module "swm-gaps")
@ -27,8 +19,23 @@
(run-shell-command "exec feh --bg-fill ~/wallpaper.jpg & picom -b")
(run-shell-command "xrandr --output HDMI-A-0 --mode 1366x768")
(define-key *top-map* (kbd "M-p") "exec nyxt")
(define-key *top-map* (kbd "M-l") "exec kitty")
(defcommand nyxt () ()
(run-or-raise "nyxt" '(:class "Nyxt")))
(define-key *top-map* (kbd "M-p") "nyxt")
;; in the case i want a new terminal
(define-key *top-map* (kbd "M-l") "exec alacritty")
;; for reusing a open terminal
(defcommand terminal () ()
(run-or-raise "alacritty" '(:class "Alacritty")))
(define-key *top-map* (kbd "M-v") "terminal")
(define-key *top-map* (kbd "M-d") "exec rofi -show run")
(define-key *root-map* (kbd "R") "restart-hard")
@ -53,32 +60,13 @@
(setf *mouse-focus-policy* :click)
(setf *mode-line-pad-x* 2) ; Adjust the value as needed
(setf *mode-line-pad-y* 2) ; Adjust the value as needed
;; Set modeline colors
(setf *mode-line-background-color* "black")
(setf *mode-line-foreground-color* "white") ; Adjust the value as needed
(setf *mode-line-border-color* "black")
;; ----------
(setf *message-window-gravity* :center
*input-window-gravity* :center
*window-border-style* :thin
*message-window-padding* 10
*maxsize-border-width* 2
*normal-border-width* 2
*transient-border-width* 2
stumpwm::*float-window-border* 4
stumpwm::*float-window-title-height* 20
*mouse-focus-policy* :click)
(define-key *top-map* (kbd "M-n") "exec xmodmap -e 'clear mod4' && exec xmodmap -e 'keycode 133 = F20'")
(run-shell-command "xrdb /home/hashirama/.Xresources")
(run-shell-command "export GTK_IM_MODULE=fcitx")
(run-shell-command "export QT_IM_MODULE=fcitx")
(run-shell-command "export export XMODIFIERS=@im=fcitx")
(define-key *top-map* (kbd "M-e") "exec ~/.local/bin/goldendict")
(defun pretty-time ()
"日付を '17:19:51 2014年4月27日、日曜日' の形式で返します。"
@ -102,9 +90,8 @@
;;---
(defvar *senju/workspaces*
;; (list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強"))
;; (list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強"))
(list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強"))
(stumpwm:grename (nth 0 *senju/workspaces*))
@ -126,9 +113,18 @@
'(" " (:eval (workspace-number-to-character (current-group))) " " mode-line-misc-info mode-line-client
mode-line-modified mode-line-frame-identification " " mode-line-buffer-identification))
;--
(load-module "ttf-fonts")
(setf xft:*font-dirs* '("~/.local/share/fonts/"))
(xft:cache-fonts)
(set-font (make-instance 'xft:font :family "Iosevka Comfy,Iosevka Comfy SemiLight" :subfamily "SemiLight" :size 10))
(setf *startup-message* "fonts loaded")
(setf *screen-mode-line-format* (list "[^B%n^b] %W^>%d"))
(setf *mode-line-timeout* 2)
@ -136,7 +132,7 @@
(list "[^B%n^b] %W " ; groups/windows
"^>" ; right align
(list '(:eval (concat "| "
(run-shell-command "top -bn 1 | grep '%Cpu' | awk '{printf \"%.0f%%\", $2 + $4}'" :output)
" |")))
@ -144,21 +140,17 @@
))
(load-module "ttf-fonts")
(xft:cache-fonts)
(set-font (make-instance 'xft:font :family "HanaMinA" :subfamily "Regular" :size 10))
(setf *startup-message* "fonts loaded")
;; gaps
(load-module "swm-gaps")
(setf swm-gaps:*inner-gaps-size* 10
swm-gaps:*outer-gaps-size* 5
swm-gaps:*head-gaps-size* 5)
(setf *inner-gaps-size* 10
:*outer-gaps-size* 5
*head-gaps-size* 5)
;;
(when *initializing*
(swm-gaps:toggle-gaps))