separate into files

This commit is contained in:
Your Name 2025-12-06 06:09:42 -05:00
parent 8f94aee2bc
commit 8cb86a87a3
8 changed files with 168 additions and 110 deletions

View file

@ -0,0 +1,16 @@
(menu-bar-mode -1)
(tool-bar-mode -1)
(display-time-mode)
(defun my-display-numbers-hook ()
(display-line-numbers-mode 1)
)
(defun my-spotlight-mode-hook ()
(hl-line-mode 1)
)
(add-hook 'prog-mode-hook 'my-display-numbers-hook)
(add-hook 'text-mode-hook 'my-display-numbers-hook)
(add-hook 'prog-mode-hook 'my-spotlight-mode-hook)
(add-hook 'text-mode-hook 'my-spotlight-mode-hook)
(add-hook 'dired-mode-hook 'my-spotlight-mode-hook)
(setq-default cursor-type 'box)
(provide 'appearance-settings)

24
elisp/blog-settings.el Normal file
View file

@ -0,0 +1,24 @@
(defun open-site () (interactive)(dired "/ssh:admin@feelinblue.wiki#9051:/usr/local/www/nanachi/"))
(defun insert-html-keybind (keybind)
(interactive "sKeybind:")
(insert "<span class=\"keybind\">" keybind "</span>")
)
(defun insert-html-blogpost-tag (tag)
(interactive "sTag:")
(insert "<span class=\"tag-" tag "\"><a href=\"blog/" tag ".html\">" tag"</a></span>")
)
(defun insert-html-template ()
(interactive)
(insert "<!DOCTYPE html>
<head>
<link rel=\"stylesheet\" href=\"/css/style.css\">
<meta charset=\"utf-8\">
</head>
<body>
<a href=".."> Back</a>
</body>
</html>
")
)
(provide 'blog-settings)

54
elisp/exwm-settings.el Normal file
View file

@ -0,0 +1,54 @@
(use-package exwm
:config
;; Set the default number of workspaces
(setq exwm-workspace-number 5)
;; When window "class" updates, use it to set the buffer name
;; (add-hook 'exwm-update-class-hook #'efs/exwm-update-class)
;; These keys should always pass through to Emacs
(setq exwm-input-prefix-keys
'(?\C-x
?\C-u
?\C-h
?\M-x
?\M-`
?\M-&
?\M-:
?\C-\M-j ;; Buffer list
?\C-\ )) ;; Ctrl+Space
;; Ctrl+Q will enable the next key to be sent directly
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
;; Set up global key bindings. These always work, no matter the input state!
;; Keep in mind that changing this list after EXWM initializes has no effect.
(setq exwm-input-global-keys
`(
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
([?\s-r] . exwm-reset)
;; Move between windows
([s-left] . windmove-left)
([s-right] . windmove-right)
([s-up] . windmove-up)
([s-down] . windmove-down)
;; Launch applications via shell command
([?\s-&] . (lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))
;; Switch workspace
([?\s-w] . exwm-workspace-switch)
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
(exwm-wm-mode))
(provide 'exwm-settings)

28
elisp/irc-settings.el Normal file
View file

@ -0,0 +1,28 @@
(setq circe-network-options
'(("Libera Chat"
:tls t
:tls-keylist (("/home/tate/.config/weechat/libera.pem"
"/home/tate/.config/weechat/libera.pem"))
:host "irc.libera.chat"
:sasl-external t
:nick "nanach1"
:channels ("#emacs" "##japanese" "#openbsd" "##")
)))
(setq circe-reduce-lurker-spam t)
(enable-circe-color-nicks)
(add-hook 'circe-chat-mode-hook 'my-circe-prompt)
(defun my-circe-prompt ()
(lui-set-prompt
(concat (propertize (concat (buffer-name) ">")
'face 'circe-prompt-face)
" ")))
(setq
lui-time-stamp-position 'left-margin
lui-time-stamp-format "%H:%M")
(add-hook 'lui-mode-hook 'my-circe-set-margin)
(defun my-circe-set-margin ()
(setq left-margin-width 5))
(setq circe-format-say "{nick:-16s} {body}")
(setq circe-format-self-say "<{nick}> {body}")
(provide 'irc-settings)

View file

@ -0,0 +1,8 @@
(keymap-global-set "C-c d" (lambda () (interactive)
(call-process-shell-command "firefox &")
))
(keymap-global-set "C-c s" (lambda () (interactive) (term "/bin/ksh")
))
(keymap-global-set "C-c e" 'eshell)
(keymap-global-set "C-c f" 'elfeed)
(provide 'keybind-settings)

3
elisp/laptop-settings.el Normal file
View file

@ -0,0 +1,3 @@
(keymap-global-set "C-c b u" (lambda () (interactive) (call-process-shell-command "xbacklight -inc 10 &")))
(keymap-global-set "C-c b d" (lambda () (interactive) (call-process-shell-command "xbacklight -dec 10 &")))
(provide 'laptop-settings)