Upload files to "stumpwm"
parent
b91342dbc4
commit
bcd3ced038
|
@ -0,0 +1,164 @@
|
|||
(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")
|
||||
|
||||
;;;; gaps
|
||||
;;(load-module "swm-gaps")
|
||||
;;
|
||||
(when *initializing*
|
||||
(mode-line))
|
||||
|
||||
|
||||
(run-shell-command "xmodmap -e 'clear mod4'" t) ;; clears windowskey/mod4
|
||||
|
||||
(run-shell-command "xmodmap -e 'keycode 133 = F20'" t) ;;assigns F20 to keycode 133
|
||||
|
||||
(set-prefix-key (kbd "F20")) ;; sets prefix to F20 which was just assigned to windows key
|
||||
|
||||
(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")
|
||||
(define-key *top-map* (kbd "M-d") "exec rofi -show run")
|
||||
(define-key *root-map* (kbd "R") "restart-hard")
|
||||
|
||||
;; Frames
|
||||
(define-key *root-map* (kbd "x") "hsplit")
|
||||
(define-key *root-map* (kbd "z") "vsplit")
|
||||
(define-key *root-map* (kbd "n") "remove-split")
|
||||
(define-key *root-map* (kbd "Q") "quit")
|
||||
|
||||
(define-key *root-map* (kbd "q") "delete")
|
||||
(define-key *root-map* (kbd "r") "remove")
|
||||
|
||||
(define-key *root-map* (kbd "h") "move-focus left")
|
||||
(define-key *root-map* (kbd "j") "move-focus down")
|
||||
(define-key *root-map* (kbd "k") "move-focus up")
|
||||
(define-key *root-map* (kbd "l") "move-focus right")
|
||||
(define-key *top-map* (kbd "H") "move-window left")
|
||||
(define-key *top-map* (kbd "J") "move-window down")
|
||||
(define-key *top-map* (kbd "K") "move-window up")
|
||||
(define-key *top-map* (kbd "L") "move-window right")
|
||||
|
||||
(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)
|
||||
|
||||
|
||||
|
||||
|
||||
(defun pretty-time ()
|
||||
"日付を '17:19:51 2014年4月27日、日曜日' の形式で返します。"
|
||||
(defun stringify-dow (dow)
|
||||
(nth dow '("月曜日" "火曜日" "水曜日" "木曜日" "金曜日" "土曜日" "日曜日")))
|
||||
(defun stringify-mon (mon)
|
||||
(nth (- mon 1) '("1月" "2月" "3月" "4月"
|
||||
"5月" "6月" "7月" "8月"
|
||||
"9月" "10月" "11月" "12月")))
|
||||
(multiple-value-bind (sec min hr date mon yr dow dst-p tz)
|
||||
(get-decoded-time)
|
||||
(format NIL "~2,'0d:~2,'0d:~2,'0d ~d年~a時 ~d分、~a秒"
|
||||
yr (stringify-mon mon)
|
||||
date (stringify-dow dow)
|
||||
hr min sec)))
|
||||
|
||||
;; ----
|
||||
|
||||
(setf *mode-line-timeout* 2)
|
||||
|
||||
|
||||
;;---
|
||||
|
||||
|
||||
(defvar *senju/workspaces*
|
||||
;; (list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強"))
|
||||
|
||||
(list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強"))
|
||||
(stumpwm:grename (nth 0 *senju/workspaces*))
|
||||
(dolist (workspace (cdr *senju/workspaces*))
|
||||
(stumpwm:gnewbg workspace))
|
||||
|
||||
(defvar *move-to-keybinds*
|
||||
(list "!" "@" "#" "$" "%" "^" "&" "*" "(" "[" "]"))
|
||||
(dotimes (y (length *senju/workspaces*))
|
||||
(let ((workspace (write-to-string (+ y 1))))
|
||||
(define-key *root-map* (kbd workspace) (concat "gselect " workspace))
|
||||
(define-key *root-map* (kbd (nth y *move-to-keybinds*)) (concat "gmove-and-follow " workspace))))
|
||||
|
||||
(defun workspace-number-to-character (index)
|
||||
(elt '("一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強") index))
|
||||
|
||||
;; Modify the modeline format to display group numbers as characters
|
||||
(defvar *modeline-format*
|
||||
'(" " (: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))
|
||||
|
||||
|
||||
|
||||
;--
|
||||
|
||||
(setf *screen-mode-line-format* (list "[^B%n^b] %W^>%d"))
|
||||
(setf *mode-line-timeout* 2)
|
||||
(setf *screen-mode-line-format*
|
||||
(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)
|
||||
" |")))
|
||||
|
||||
|
||||
" ^7* " '(:eval (pretty-time)); date
|
||||
))
|
||||
|
||||
|
||||
(load-module "ttf-fonts")
|
||||
|
||||
(xft:cache-fonts)
|
||||
|
||||
(set-font (make-instance 'xft:font :family "HanaMinA" :subfamily "Regular" :size 10))
|
||||
(setf *startup-message* "fonts loaded")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(setf *inner-gaps-size* 10
|
||||
:*outer-gaps-size* 5
|
||||
*head-gaps-size* 5)
|
||||
;;
|
||||
(when *initializing*
|
||||
(swm-gaps:toggle-gaps))
|
||||
|
Loading…
Reference in New Issue