bunch of stuff

This commit is contained in:
opal
2021-12-24 20:29:45 -08:00
parent a3c2b64294
commit d9ed862089
6 changed files with 422 additions and 94 deletions

View File

@@ -75,15 +75,7 @@
(use-package helpful
:straight t
:commands (helpful-callable helpful-variable helpful-command helpful-key)
:custom
(counsel-describe-function-function #'helpful-callable)
(counsel-describe-variable-function #'helpful-variable)
:bind
([remap describe-function] . counsel-describe-function)
([remap describe-command] . helpful-command)
([remap describe-variable] . counsel-describe-variable)
([remap describe-key] . helpful-key))
:commands (helpful-callable helpful-variable helpful-command helpful-key))
(use-package super-save
:straight t
@@ -127,7 +119,7 @@
(global-set-key (kbd "<escape>") 'keyboard-escape-quit) ;; Escape exits out of prompts
;; Define Leader Key
;; Define Leader Key
(use-package general
:straight t
:config
@@ -136,9 +128,9 @@
:keymaps '(normal insert visual emacs)
:prefix "SPC"
:global-prefix "C-SPC")
;; Define Keybindings (potentially move into own file)
;; Define Keybindings (potentially move into own file)
(opal/leader-keys
;; Leader-map
;; Leader-map
";" #'pp-eval-expression ;; Eval expression
":" #'execute-extended-command ;; Eq to M-x
"u" #'universal-argument ;; Universal argument
@@ -152,21 +144,25 @@
"gg" #'magit-status
"gi" #'magit-init
"gc" #'magit-clone
;; Buffers
"bd" #'kill-buffer
;; Workspaces
"bi" #'persp-ibuffer
"bl" #'persp-next
"bh" #'persp-prev
"br" #'persp-rename
"bd" #'persp-remove-buffer
;; Terminal/Shell
"tt" #'vterm
"te" #'eshell
;; Org
; Babel
;; Babel
"obt" #'org-babel-tangle
; Gen
;; Gen
"ol" #'org-insert-link
"or" #'org-reload
; Agenda
;; Agenda
"oa" #'org-agenda
;; Eval
@@ -284,11 +280,53 @@
:init
(marginalia-mode))
(use-package company
:straight t
:commands (company-complete-common
company-complete-common-or-cycle
company-manual-begin
company-grab-line)
:init
(setq company-minimum-prefix-length 2
company-tooltip-limit 14
company-tooltip-align-annotations t
company-require-match 'never
company-global-modes
'(not erc-mode
message-mode
help-mode
vterm-mode)
company-frontends
'(company-pseudo-tooltip-frontend ; always show candidates in overlay tooltip
company-echo-metadata-frontend) ; show selected candidate docs in echo area
company-backends '(company-capf)
company-auto-commit nil
company-dabbrev-other-buffers nil
company-dabbrev-ignore-case nil
company-dabbrev-downcase nil))
(use-package perspective
:straight t
:config
(persp-mode))
(use-package bufler :straight t)
(use-package winner
:straight t)
(use-package dired
:init
(setq dired-auto-revert-buffer t
dired-dwim-target t
dired-hide-details-hide-symlink-targets nil
dired-recursive-copies 'always
dired-recursive-deletes 'top
dired-create-destination-dirs 'ask))
(use-package dired-rsync
:straight t
:general (dired-mode-map "C-c C-r" #'dired-rsync))
(use-package all-the-icons-dired :straight t)
(use-package dired-single :straight t)
(use-package dired-collapse :straight t)
@@ -319,16 +357,6 @@
(dired-rainbow-define vc "#0074d9" ("git" "gitignore" "gitattributes" "gitmodules"))
(dired-rainbow-define-chmod executable-unix "#38c172" "-.*x.*"))
;; Set org agenda dir
(setq org-directory "~/Org/")
;; Tell Org to stop indenting inside of org source blocks.
(setq org-edit-src-content-indentation 0)
;; Open links in browser
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox")
(defun opal/org-font-setup ()
;; Replace list hyphen with dot
(font-lock-add-keywords 'org-mode
@@ -439,6 +467,16 @@
("pp" "Project File" entry (file+olp "~/org/projects/auto-infra-overview.org" "Inbox")
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)))
;; Tell Org to stop indenting inside of org source blocks.
(setq org-edit-src-content-indentation 0)
;; Set org agenda dir
(setq org-directory "~/Org/")
;; Open links in browser
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "firefox")
;; Init org font setup
(opal/org-font-setup))
@@ -449,6 +487,8 @@
:custom
(org-bullets-bullet-list '("" "" "" "" "" "" "")))
(use-package org-make-toc :straight t)
(defun opal/org-mode-visual-fill ()
(setq visual-fill-column-width 100
visual-fill-column-center-text t)
@@ -462,7 +502,8 @@
(with-eval-after-load 'org
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)))
'((emacs-lisp . t)
(lisp . t)))
(push '("conf-unix" . conf-unix) org-src-lang-modes))
@@ -474,12 +515,7 @@
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(add-to-list 'org-structure-template-alist '("py" . "src python"))
(add-to-list 'org-structure-template-alist '("yml" . "src yaml"))
(add-to-list 'org-structure-template-alist '("scm" . "src scheme"))
(add-to-list 'org-structure-template-alist '("js" . "src javascript"))
(add-to-list 'org-structure-template-alist '("html" . "src html"))
(add-to-list 'org-structure-template-alist '("css" . "src css"))
(add-to-list 'org-structure-template-alist '("cl" . "src lisp")))
(use-package flycheck :straight t)
@@ -509,6 +545,7 @@
evil))
(add-hook 'prog-mode-hook #'parinfer-mode)))
(defvar inferior-lisp-program "sbcl")
(use-package sly :straight t)
(use-package magit
@@ -517,7 +554,6 @@
(use-package eshell-git-prompt :straight t)
(use-package eshell
:hook (eshell-first-time-mode . eshell-config)
:config
;; Save command history when commands are entered
(add-hook 'eshell-pre-command-hook 'eshell-save-some-history)
@@ -529,16 +565,28 @@
(evil-define-key '(normal insert visual) eshell-mode-map (kbd "<home>") 'eshell-bol)
(evil-normalize-keymaps)
(setq eshell-history-size 10000
eshell-buffer-maximum-lines 10000
eshell-hist-ignoredups t
eshell-scroll-to-bottom-on-input t)
(with-eval-after-load 'esh-opt
(setq eshell-destroy-buffer-when-process-dies t)
(setq eshell-visual-commands '("htop" "zsh" "vim")))
(eshell-git-prompt-use-theme 'powerline))
(eshell-git-prompt-use-theme 'powerline)
(setq eshell-banner-message
'(format "%s %s\n"
(propertize (format " %s " (string-trim (buffer-name)))
'face 'mode-line-highlight)
(propertize (current-time-string)
'face 'font-lock-keyword-face))
eshell-scroll-to-bottom-on-input 'all
eshell-scroll-to-bottom-on-output 'all
eshell-kill-processes-on-exit t
eshell-hist-ignoredups t
;; em-prompt
eshell-prompt-regexp "^.* λ "
;; em-glob
eshell-history-size 10000
eshell-buffer-maximum-lines 10000
eshell-scroll-to-bottom-on-input t))
(use-package vterm
:straight t
@@ -601,3 +649,64 @@
;; erc-interpret-mirc-color t
;; erc-rename-buffers t
;; erc-track-exclude-server-buffer t))
;; (defun efs/exwm-update-class ()
;; (exwm-workspace-rename-buffer exwm-class-name))
;; (use-package exwm
;; :config
;; (setq exwm-workspace-number 5)
;; ;; These keys will 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
;; ;; This will allow 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-h] . windmove-left)
;; ([s-l] . windmove-right)
;; ([s-k] . windmove-up)
;; ([s-j] . 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))))
;; (start-process-shell-command "xrandr" nil "")
;; (start-process-shell-command "xmodmap" nil "xmodmap ~/.config/exwm/Xmodmap")
;; (require 'exwm-randr)
;; (exwm-randr-enable)
;; (require 'exwm-systemtray)
;; (exwm-systemtray-enable)
;; (exwm-enable))