Compare commits

..

No commits in common. "67a17078a8487b7bfc06bc83cf104c4d1a4d2db7" and "ba5680253d204cb40e841d35e2b5f459b50a2901" have entirely different histories.

3 changed files with 119 additions and 340 deletions

View File

@ -3,7 +3,7 @@ import sys
def eprint(*args, **kwargs):
# uncomment to enable debug...
# print(*args, file=sys.stderr, **kwargs)
print(*args, file=sys.stderr, **kwargs)
pass
def bash_it(cmd):
@ -43,7 +43,7 @@ def send_notif(title, message):
import subprocess
commands = ['isbn to bibtex',
'emoji',
'b',
'c']
@ -62,13 +62,11 @@ if selected_command:
res = bash_it('echo ' + isbn + '| isbn_to_bibtex.py')
write_to_clipboard(res)
send_notif("status", "done!: "+ res)
elif selected_command == 'emoji':
bash_it("rofi -show emoji")
else:
send_notif("Failure", "Unkown Command")
exit(1)
else:
eprint('No command selected')
print('No command selected')
exit(0)

View File

@ -34,13 +34,11 @@ Initialize Package sources
(package-install 'use-package))
#+end_src
#+RESULTS:
Make sure to download packages if not present
#+begin_src emacs-lisp
(require 'use-package)
(setq package-native-compile t)
(setq use-package-always-ensure t)
(setq use-package-always-ensure t)
#+end_src
straight
#+begin_src emacs-lisp
@ -88,10 +86,10 @@ remove warning by use-package
#+end_src
Emacs Backups trashing local dir!
#+begin_src emacs-lisp
(use-package no-littering)
(setq auto-save-file-name-transforms
`((".*" ,(no-littering-expand-var-file-name "auto-save/") t)))
(setq backup-directory-alist `((".*" . "~/.local/share/emacs-backups")))
(use-package no-littering
(setq auto-save-file-name-transforms
`((".*" ,(no-littering-expand-var-file-name "auto-save/") t))))
(setq backup-directory-alist `(("." . "~/.local/share/emacs-backups")))
(setq make-backup-files t ; backup of a file the first time it is saved.
backup-by-copying t ; don't clobber symlinks
version-control t ; version numbers for backup files
@ -110,8 +108,8 @@ Better Scrolling
#+begin_src emacs-lisp
(setq scroll-conservatively 10)
(setq scroll-margin 3)
;; (use-package smooth-scrolling
;; :custom (smooth-scrolling-mode 1))
(use-package smooth-scrolling
:custom (smooth-scrolling-mode 1))
#+end_src
** Fonts
@ -119,7 +117,7 @@ Setting fonts here as vars to stay sane
#+begin_src emacs-lisp
(setq my/ui/monofont "FiraCode Nerd Font")
(setq my/ui/varfont "Noto Serif")
(setq my/ui/arabicfont "Noto Sans Arabic")
(setq my/ui/arabicfont "Noto Kufi Arabic")
#+end_src
#+begin_src emacs-lisp
@ -206,10 +204,10 @@ Actuall Theme:
Transparency!
#+begin_src emacs-lisp
;; for the first frame
(set-frame-parameter nil 'alpha-background 0.9)
(set-frame-parameter nil 'alpha-background 0.8)
;; for other frames
(add-hook 'server-after-make-frame-hook
(lambda nil (set-frame-parameter nil 'alpha-background 0.9)))
(lambda nil (set-frame-parameter nil 'alpha-background 0.8)))
#+end_src
Center text in the frame, looks nice ;)
@ -265,14 +263,8 @@ Self explanatory
** Tab Width
*8* Spaces for a single tab is too much
#+begin_src emacs-lisp
(setq-default tab-width 4)
(setq-default tab-width 4)
#+end_src
Spaces > Tabs
#+begin_src emacs-lisp
(setq-default indent-tabs-mode nil)
#+end_src
#+RESULTS:
* Auth!
should i really be commiting this? :>
@ -471,7 +463,6 @@ Capture
"om" '(mu4e :which-key "mu4e")
"ot" '(telega :which-key "Telega")
"oc" '(circe :which-key "Circe")
"os" '(easy-hugo :which-key "site")
"oe" '(elfeed-dashboard :which-key "Elfeed Dashboard")
#+end_src
@ -533,11 +524,9 @@ Capture
"ci" '(lsp-ui-imenu :which-key "lsp imenu")
"cr" '(lsp-rename :which-key "rename")
;"cs" '(lsp-find-refernces :which-key "find refernces")
"cd" '(lsp-find-definition :which-key "goto defintion")
"cD" '(lsp-ui-peek-find-definitions :which-key "goto defintion")
;"cd" '(lsp-find-definition :which-key "goto defintion")
"cd" '(lsp-ui-peek-find-definitions :which-key "goto defintion")
"cs" '(lsp-ui-peek-find-refernces :which-key "find refernces")
"cc" '(recompile :which-key "find refernces")
"cC" '(compile :which-key "find refernces")
#+end_src
**** Git (g)
@ -577,8 +566,8 @@ Capture
evil-emacs-state-cursor '(box +evil-emacs-cursor-fn); TODO: fix
evil-insert-state-cursor 'bar
evil-visual-state-cursor 'hollow
evil-undo-system 'undo-redo)
evil-undo-system 'undo-redo
)
:config
(evil-mode 1)
@ -618,7 +607,7 @@ Capture
;(define-key evil-normal-state-map "K" 'lsp-ui-doc-glance); moved to lsp-ui
(define-key evil-visual-state-map "\C-y" 'yank)
(define-key evil-insert-state-map "\C-k" 'kill-line)
;(define-key evil-insert-state-map "\C-k" 'kill-line)
(define-key evil-normal-state-map "Q" 'call-last-kbd-macro)
(define-key evil-visual-state-map "Q" 'call-last-kbd-macro)
;; (define-key evil-normal-state-map (kbd "TAB") 'evil-undefine)
@ -642,15 +631,30 @@ Capture
#+begin_src emacs-lisp
(use-package evil-collection
:after evil
; :custom
; (evil-collection-outline-bind-tab-p t)
:custom
(evil-collection-outline-bind-tab-p t)
:config
(evil-collection-init))
#+end_src
*** Evil Escape
#+begin_src emacs-lisp
;; ; https://emacs.stackexchange.com/questions/19961/using-jk-to-exit-insert-mode-with-key-chord-or-anything-else
(use-package key-chord
:config
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
(key-chord-define evil-replace-state-map "jk" 'evil-normal-state)
:init
(key-chord-mode 1))
;; (use-package evil-escape
;; :after evil
;; :init
;; (setq 'evil-escape-excluded-major-modes '(magit-status-mode))
;; (evil-escape-mode)
;; :config
;; (setq evil-escape-key-sequence "jk")
;; (setq evil-escape-delay 0.2)
;; (setq evil-escape-unordered-key-sequence t))
;; (defun my-jk ()
;; (interactive)
;; (let* ((initial-key ?j)
@ -665,30 +669,9 @@ Capture
;; (push event unread-command-events))
;; ;; timeout exceeded
;; (insert initial-key))))
;; (define-key evil-insert-state-map (kbd "j") 'my-jk)
(use-package key-chord
:after evil
:custom
(key-chord-two-keys-delay 0.05)
(key-chord-safety-interval-forward 0.1)
:config
(key-chord-mode 1)
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
(key-chord-define evil-replace-state-map "jk" 'evil-normal-state))
;; (use-package evil-escape
;; :after evil
;; :init
;; (setq 'evil-escape-excluded-major-modes '(magit-status-mode))
;; (evil-escape-mode)
;; :config
;; (setq evil-escape-key-sequence "jk")
;; (setq evil-escape-delay 0.2)
;; (setq evil-escape-unordered-key-sequence t))
#+end_src
*** Evil args
@ -829,20 +812,22 @@ slow loading! defer it
:custom
(company-tooltip-minimum-width 40) ;reduce flicker due to changing width
(global-company-mode t)
(company-idle-delay 0.1) ;; how long to wait until popup
(company-idle-delay 0.3) ;; how long to wait until popup
(company-minimum-prefix-length 1) ;; The minimum prefix length for idle completion.
(company-selection-wrap-around t)
;; (company-begin-commands nil) ;; uncomment to disable popup
:bind
(:map company-active-map
;; ("C-n". company-select-next)
("C-n". company-select-next)
("C-w". evil-delete-backward-word)
("<tab>" . company-complete-common-or-cycle)
("RET" . company-complete-selection)
;; ("C-p". company-select-previous)
("C-p". company-select-previous)
("M-<". company-select-first)
("M->". company-select-last)))
;; (use-package company-lsp)
(use-package company-box
:after company
:hook (company-mode . company-box-mode))
@ -903,16 +888,15 @@ better sorting for ivy, company..
** Set directories
#+begin_src emacs-lisp
(setq org-directory "~/Documents/gtd/"
org-roam-directory "~/Documents/roam/"
;; org-s-file (car (org-roam-id-find "34f6b040-ea49-421c-ade6-3834a9c86e0f"))
;; org-books-file (concat org-roam-directory "book_list.org")
org-agenda-files (list org-directory ); org-s-file)
rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org")
elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org"
org-preview-latex-image-directory "~/.cache/ltx/ltximg"
org-my-anki-file (concat org-roam-directory "anki.org")
org-refile-targets '((org-agenda-files . (:level . 1))))
org-roam-directory "~/Documents/roam/"
org-books-file (concat org-roam-directory "book_list.org")
org-agenda-files (list org-directory org-books-file)
rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org")
elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org"
org-preview-latex-image-directory "~/.cache/ltx/ltximg"
org-my-anki-file (concat org-roam-directory "anki.org")
org-refile-targets '((org-agenda-files . (:level . 1)))
)
#+end_src
** use-package
@ -1157,8 +1141,8 @@ From: https://yiufung.net/post/anki-org/
*** T/ODOs
#+begin_src emacs-lisp
(setq org-todo-keywords '((sequence "TODO(t!)" "NOW(o)" "NEXT(n)" "|" "DONE(d!)")
(sequence "|" "CANCELED(c!)")))
(setq org-todo-keywords '((sequence "TODO(t)" "NOW(o)" "NEXT(n)" "|" "DONE(d)")
(sequence "|" "CANCELED(c)")))
#+end_src
*** start on sunday!
@ -1261,7 +1245,7 @@ From: https://yiufung.net/post/anki-org/
*** habits
#+begin_src emacs-lisp
(setq org-habit-graph-column 80 ; prevent overwriting title
org-habit-show-all-today nil) ; show even if DONE
org-habit-show-all-today t) ; show even if DONE
#+end_src
*** org SUPER agenda
@ -1272,12 +1256,6 @@ From: https://yiufung.net/post/anki-org/
(setq org-agenda-span 'day); a week is too much
(setq org-super-agenda-groups
'((:log t :order 99); logs at bottom
(:name "S"
:order 97
:tag ("S"))
(:name "Habits"
:order 98
:habit t)
(:name "Today" ; today is what
:time-grid t ; Items that appear on the time grid
:scheduled today)
@ -1307,7 +1285,7 @@ From: https://yiufung.net/post/anki-org/
("l" . evil-forward-char)))
#+end_src
*** COMMENT org-ql
*** org-ql
#+begin_src emacs-lisp
(use-package helm-org-ql :after org-ql)
#+end_src
@ -1372,27 +1350,6 @@ From: https://yiufung.net/post/anki-org/
#+end_src
*** COMMENT org-timeblock
#+begin_src emacs-lisp
(use-package org-timeblock
:straight (org-timeblock :type git
:host github
:repo "ichernyshovvv/org-timeblock"))
#+end_src
*** org-hyperscheduler
#+begin_src emacs-lisp
(use-package org-hyperscheduler
:straight
( :repo "dmitrym0/org-hyperscheduler"
:host github
:type git
:files ("*"))
:custom
(org-hyperscheduler-readonly-mode nil))
#+end_src
*** Helper functions
Stolen from: [[https://blog.jethro.dev/posts/processing_inbox/][Org-mode Workflow Part 2: Processing the Inbox · Jethro Kuan]]
#+begin_src emacs-lisp
@ -1500,6 +1457,8 @@ Stolen from: [[https://blog.jethro.dev/posts/processing_inbox/][Org-mode Workflo
(setq deft-recursive t)
(setq deft-strip-summary-regexp ":PROPERTIES:\n\\(.+\n\\)+:END:\n")
(setq deft-use-filename-as-title 't)
#+end_src
** org-download and clip-link
@ -1551,7 +1510,7 @@ Stopped using this, I just use Anki like a normal person
#+end_src
#+begin_src emacs-lisp
(use-package parinfer-rust-mode ;
(use-package parinfer-rust-mode
:hook
(emacs-lisp-mode . parinfer-rust-mode)
(scheme-mode . parinfer-rust-mode)
@ -1563,11 +1522,6 @@ Stopped using this, I just use Anki like a normal person
; this variable is only available on my fork
parinfer-rust-disable-troublesome-modes t))
#+end_src
*** Compilation output
When running =M-x compile= the output is colored!
#+begin_src emacs-lisp
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
#+end_src
*** Projectile
#+begin_src emacs-lisp
@ -1618,10 +1572,8 @@ Counsel Projectile
(lsp-eldoc-render-all t)
(lsp-eldoc-enable-hover nil)
(lsp-ui-doc-show-with-mouse nil)
(lsp-keep-workspace-alive nil)
(lsp-idle-delay 0.6)
(lsp-completion-provider :capf)
(lsp-prefer-flymake nil)
(lsp-completion-provider :none)
(lsp-idle-delay 0.6)
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-parameter-hints t)
@ -1629,7 +1581,7 @@ Counsel Projectile
:config
(lsp-enable-which-key-integration t)
(setq lsp-headerline-breadcrumb-enable nil); anonying tabs
(setq lsp-log-io nil) ; if set to true can cause a performance hit
(lsp-log-io nil) ; if set to true can cause a performance hit
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(lsp-headerline-breadcrumb-mode -1)
(flycheck-mode 1)
@ -1643,6 +1595,7 @@ Counsel Projectile
Lsp UI
#+begin_src emacs-lisp
(use-package lsp-ui
:ensure
:commands lsp-ui-mode
:custom
(lsp-ui-peek-always-show t)
@ -1676,32 +1629,12 @@ Lsp UI
(flycheck-info ((t (:underline (:color "#83a598" :style line :position line))))))
#+end_src
*** Hide Show
*** Origami Mode (Folding)
#+begin_src emacs-lisp
(use-package origami
:hook (prog-mode . origami-mode))
#+end_src
*** Formatting
#+begin_src emacs-lisp
(use-package format-all
;; :commands (format-all-mode)
:defer
:config
(setq my/format-all-formatters '(("Verilog" verible)))
:hook (prog-mode . format-all-mode)
(format-all-mode . (lambda () (setq format-all-formatters my/format-all-formatters)))
(format-all-mode . format-all-ensure-formatter))
#+end_src
*** Debug
Use the Debug Adapter Protocol for running tests and debugging
#+begin_src emacs-lisp
(use-package dap-mode
:hook
(lsp-mode . dap-mode)
(lsp-mode . dap-ui-mode))
#+end_src
** Git
#+begin_src emacs-lisp
(setq vc-handled-backends '(Git))
@ -1796,7 +1729,7 @@ Get treemacs-lsp
:config (require 'flycheck-clj-kondo)
:hook (clojure-mode . zprint-format-on-save-mode)
(clojure-mode . flycheck-mode)
; (clojure-mode . electric-pair-local-mode)
(clojure-mode . electric-pair-local-mode)
:bind (:map cider-mode-map
([remap lsp-find-definition] . cider-find-var)
([remap eval-defun] . cider-eval-list-at-point)
@ -1814,7 +1747,7 @@ Auto format
:after cider)
#+end_src
*** COMMENT Rust
*** Rust
#+begin_src emacs-lisp
(use-package rustic
:defer t
@ -1888,7 +1821,7 @@ Auto format
#+end_src
*** COMMENT Haskell
*** Haskell
#+begin_src emacs-lisp
(use-package haskell-mode :defer t)
#+end_src
@ -1913,7 +1846,7 @@ Auto format
)
#+end_src
*** COMMENT yaml
*** yaml
#+begin_src emacs-lisp
(use-package yaml-mode
:hook (yaml-mode . lsp))
@ -1921,15 +1854,6 @@ Auto format
*** Web
#+begin_src emacs-lisp
(use-package typescript-mode
:defer t
:hook (typescript-mode . electric-pair-mode)
:hook (typescript-mode . setup-tide-mode)
:hook (typescript-mode . prettier-mode)
:hook (typescript-mode . lsp)
:config (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)))
(use-package tide
:defer t
:preface
@ -1951,7 +1875,11 @@ Auto format
;; formats the buffer before saving
;; (add-hook 'before-save-hook 'tide-format-before-save)
(add-hook 'before-save-hook 'prettier-js))
(add-hook 'before-save-hook 'prettier-js)
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . js-jsx-mode))
:hook(typescript-mode . setup-tide-mode)
:hook(typescript-mode . prettier-mode)
:hook(typescript-mode . lsp))
#+end_src
svelte
@ -1976,7 +1904,7 @@ lsp hooks setups
(add-hook 'js-jsx-mode-hook 'lsp)
#+end_src
*** COMMENT Lua
*** Lua
#+begin_src emacs-lisp
(use-package lua-mode
:hook (lua-mode . lsp))
@ -2015,56 +1943,15 @@ Better Diff in header sizes
(use-package geiser-guile)
#+end_src
*** Scala
Scala mode for highlighting, indents and motion commands
#+begin_src emacs-lisp
(use-package scala-mode
:hook
(scala-mode . flycheck-mode)
(scala-mode . lsp)
(scala-mode . electric-pair-mode)
(scala-mode . (lambda ()
(add-hook 'before-save-hook 'lsp-format-buffer nil t)))
:interpreter
("scala" . scala-mode))
#+end_src
Sbt for sbt commands...
#+begin_src emacs-lisp
(use-package sbt-mode
:commands sbt-start sbt-command
:config
;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31
;; allows using SPACE when in the minibuffer
(substitute-key-definition
'minibuffer-complete-word
'self-insert-command
minibuffer-local-completion-map)
;; sbt-supershell kills sbt-mode: https://github.com/hvesalai/emacs-sbt-mode/issues/152
(setq sbt:program-options '("-Dsbt.supershell=false")))
#+end_src
#+begin_src emacs-lisp
; for scala
(use-package lsp-metals)
#+end_src
*** C and cpp
#+begin_src emacs-lisp
;; (use-package ccls
;; :hook ((c-mode c++-mode) . (lambda () (require 'ccls) (lsp)))
;; ((c-mode c++-mode) . (lambda () (add-hook 'before-save-hook 'lsp-format-buffer nil t)))
;; ((c-mode c++-mode) . electric-pair-local-mode)
;; ((c-mode c++-mode) . yas-minor-mode))
(use-package cc-mode
:defer t
:hook ((c++-mode cc-mode c-mode) . lsp)
((c++-mode cc-mode c-mode) . lsp)
((c++-mode cc-mode c-mode) . electric-pair-local-mode)
((c++-mode cc-mode c-mode) . yas-minor-mode)
((c++-mode cc-mode c-mode) . (lambda ()
(add-hook 'before-save-hook 'lsp-format-buffer nil t))))
:hook (cc-mode . lsp)
:hook (c-mode . lsp)
(c-mode . (lambda ()
(add-hook 'before-save-hook 'lsp-format-buffer nil t)))
:hook (c++-mode . lsp))
#+end_src
*** COMMENT Ruby
@ -2130,7 +2017,6 @@ AucTex
(LaTeX-mode . flycheck-mode)
(LaTeX-mode . turn-on-reftex)
(LaTeX-mode . auto-fill-mode)
(LaTeX-mode . format-all-mode)
(LaTeX-mode . TeX-source-correlate-mode)
(LaTeX-mode . try/latex-mode-setup)
(LaTeX-mode . turn-on-cdlatex)
@ -2176,13 +2062,6 @@ AucTex
(add-to-list 'LaTeX-clean-intermediate-suffixes '"-figure[0-9]*\\.\\(pdf\\|md5\\|log\\|dpth\\|dep\\|run\\.xml\\)")
(add-to-list 'LaTeX-clean-intermediate-suffixes '".auxlock")
; (eval-after-load 'latex
; `(dolist (face '((font-latex-sectioning-0-face . 3.0) ; \part
; (font-latex-sectioning-1-face . 2.5) ; \chapter
; (font-latex-sectioning-2-face . 2.0) ; \section
; (font-latex-sectioning-3-face . 1.5) ; \subsection
; (font-latex-sectioning-4-face . 1.5))) ; \subsubsection
; (set-face-attribute (car face) nil :font my/ui/varfont :weight 'bold :height (cdr face))))
;; to have the buffer refresh after compilation,
;; very important so that PDFView refesh itself after comilation
@ -2213,90 +2092,43 @@ Custom functions
company-ispell)
company-backends)))
#+end_src
Insert from clip
[[https://hershsingh.net/blog/emacs-latex-screenshot/#:~:text=Clipboard%20to%20TeX,-Finally%2C%20I%20have&text=Once%20I%20have%20captured%20the,file%20img%2F.][Quickly insert hand-drawn figures in a LaTeX document in Emacs]]
#+begin_src emacs-lisp
(defvar latex/insert-image-format "\\begin{center}\\includegraphics[width=\\linewidth]{%s}\\end{center}")
(defvar latex/insert-figure-format
" \\begin{figure}[h]
\\centering
\\includegraphics[width=\\linewidth]{%s}
\\caption{\\label{fig:TODO} TODO}
\\end{figure}
\\FloatBarrier")
(defun latex/insert-image-from-clipboard ()
(interactive)
(let*
;; Ask for a filename
((image-name (read-string "image-name: "))
;; This is getting uply...
(image-file-location (concat "\"" (expand-file-name (concat (TeX-master-directory) "img/" image-name ".png" )) "\"")))
;; Make the "img" directory if it does not exist
(make-directory (concat (TeX-master-directory) "img") t)
;; Copy the image in clipboard to "img/" directory
(shell-command (concat "xclip -selection clipboard -t image/png -o > " image-file-location))
;; Insert the latex snippet to include the figure
(insert (format latex/insert-image-format (concat "img/" (file-name-nondirectory image-file-location) )))))
(defun latex/insert-figure-from-clipboard ()
(interactive)
(let*
;; Ask for a filename
((image-name (read-string "image-name: "))
;; This is getting uply...
(image-file-location (concat "\"" (expand-file-name (concat (TeX-master-directory) "img/" image-name ".png" )) "\"")))
;; Make the "img" directory if it does not exist
(make-directory (concat (TeX-master-directory) "img") t)
;; Copy the image in clipboard to "img/" directory
(message (concat "xclip -selection clipboard -t image/png -o > " image-file-location))
(shell-command (concat "xclip -selection clipboard -t image/png -o > " image-file-location))
;; Insert the latex snippet to include the figure
(insert (format latex/insert-figure-format (concat "img/" (file-name-nondirectory (concat image-name ".png")))))))
#+end_src
Folding
#+begin_src emacs-lisp :tangle no
(use-package outshine ;
#+begin_src emacs-lisp
(use-package outshine
:defer t
:config
(setq LaTeX-section-list '(
("part" 0)
("chapter" 1)
("section" 2)
("subsection" 3)
("subsubsection" 4)
("paragraph" 5)
("subparagraph" 6)
("begin" 7)))
(add-hook 'LaTeX-mode-hook #'(lambda ()
(outshine-mode 1)
(setq outline-level #'LaTeX-outline-level)
(setq outline-regexp (LaTeX-outline-regexp t))
(setq outline-heading-alist
(mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 x)))
LaTeX-section-list)))))
(setq LaTeX-section-list '(
("part" 0)
("chapter" 1)
("section" 2)
("subsection" 3)
("subsubsection" 4)
("paragraph" 5)
("subparagraph" 6)
("begin" 7)
)
)
(add-hook 'LaTeX-mode-hook #'(lambda ()
(outshine-mode 1)
(setq outline-level #'LaTeX-outline-level)
(setq outline-regexp (LaTeX-outline-regexp t))
(setq outline-heading-alist
(mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 x)))
LaTeX-section-list))))
)
(general-define-key
:states '(normal visual)
:keymaps 'LaTeX-mode-map
"TAB" '(outshine-cycle :which-key "outshine-cycle"))
(general-define-key
:states '(normal visual)
:keymaps 'LaTeX-mode-map
"TAB" '(outshine-cycle :which-key "outshine-cycle")
)
#+end_src
@ -2316,35 +2148,7 @@ ivy bibtex
*** Verilog
#+begin_src emacs-lisp
(setq verilog-linter "verilator --lint-only")
(setq verilog-auto-newline nil
verilog-auto-arg-sort t
verilog-case-fold nil)
; (setq verilog-indent-level 1)
(add-hook 'verilog-mode-hook 'electric-pair-mode)
(add-hook 'verilog-mode-hook 'lsp)
(add-hook 'verilog-mode-hook 'flycheck-mode)
;; (add-hook 'verilog-mode-hook (lambda ()
;; (add-hook 'before-save-hook 'verilog-indent-buffer nil t)))
(with-eval-after-load 'lsp-mode
(add-to-list 'lsp-language-id-configuration '(verilog-mode . "verilog"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "verible-verilog-ls")
:major-modes '(verilog-mode)
:server-id 'verible-ls)))
#+end_src
*** VHDL
#+begin_src emacs-lisp
(setq lsp-vhdl-server 'vhdl-ls)
(add-hook 'vhdl-mode-hook 'vhdl-electric-mode)
(add-hook 'vhdl-mode-hook 'flycheck-mode)
(add-hook 'vhdl-mode-hook (lambda ()
(add-hook 'before-save-hook 'vhdl-beautify-buffer nil t)))
(setq verilog-linter "verilator --lint-only")
#+end_src
*** Bash
@ -2479,7 +2283,7 @@ ivy bibtex
(icon-color nil))
(if (org-clock-is-active)
(setq message (substring-no-properties (org-clock-get-clock-string))
icon ""; there is an icon here, in case it isn't rendered...
icon ""
icon-color "#BA68C8")
(setq message ""
icon ""; "";; I want it to be empty
@ -2495,21 +2299,6 @@ ivy bibtex
:hook (elpher-mode . olivetti-mode) )
#+end_src
** Easy hugo
#+begin_src emacs-lisp
(use-package easy-hugo
:init
(easy-hugo-enable-menu)
(setq easy-hugo-basedir "~/code/sites/ammar.engineer/")
(setq easy-hugo-postdir "content/posts")
(setq easy-hugo-url "https://ammar.engineer")
;; (setq easy-hugo-sshdomain "blogdomain")
;; (setq easy-hugo-root "")
(setq easy-hugo-previewtime "300"))
;:bind
;("C-c C-e" . easy-hugo))
#+end_src
* Elfeed org
=;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))=
** Elfeed-org
@ -2749,10 +2538,6 @@ I wrote that, neat isn't it? :P
;; this line is for nixos
;; until here
;;:ensure-system-package mu
:init
(defun mu4e--main-action-str (str &optional func-or-shortcut))
(defun evil-collection-mu4e-update-main-view@override())
(advice-add 'evil-collection-mu4e-update-main-view :override #'evil-collection-mu4e-update-main-view@override)
:commands (mu4e)
:bind (:map mu4e-main-mode-map
([remap revert-buffer] . mu4e-update-index))
@ -2805,8 +2590,7 @@ I wrote that, neat isn't it? :P
`(
(mu4e-bookmarks .
,`(
;(:name "All Unread messages" :query ,"flag:unread AND NOT flag:trashed AND NOT flag:list" :key ?a)
(:name "All Unread messages" :query ,"flag:unread AND NOT flag:trashed" :key ?a)
(:name "All Unread messages" :query ,"flag:unread AND NOT flag:trashed AND NOT flag:list" :key ?a)
(:name "Unread messages" :query ,(concat "flag:unread AND NOT flag:trashed" context-filter) :key ?u)
(:name "Inbox" :query ,(concat "maildir:/Inbox/" context-filter) :key ?i)
(:name "Today's messages" :query ,(concat "date:today..now" context-filter) :key ?t)
@ -2899,11 +2683,11 @@ I prefer text/plain, over everything >:)
** Send email (msmtp)
#+begin_src emacs-lisp
(setq sendmail-program (executable-find "msmtp") ;"/usr/bin/msmtp"
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
send-mail-function 'smtpmail-send-it
message-send-mail-function 'message-send-mail-with-sendmail)
(setq sendmail-program (executable-find "msmtp") ;"/usr/bin/msmtp"
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
send-mail-function 'smtpmail-send-it
message-send-mail-function 'message-send-mail-with-sendmail)
#+end_src
* Telega
@ -2933,7 +2717,7 @@ I prefer text/plain, over everything >:)
#+end_src
* COMMENT Matrix Ement
* Matrix Ement
#+begin_src emacs-lisp
(use-package ement
:straight (ement
@ -2981,3 +2765,5 @@ I prefer text/plain, over everything >:)
(setq dashboard-projects-switch-function 'counsel-projectile-switch-project-by-name))
#+end_src

View File

@ -33,10 +33,6 @@ XF86AudioPlay
# wm independent hotkeys
#
Pause
transformers_ocr recognize
# terminal emulator
super + Return
alacritty
@ -133,11 +129,10 @@ super + r
# program launcher
super + shift + r
rofi -show run || dmenu_run
super + v
rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
# program launcher
super + bracketleft
~/bin/rofi_bin_launcher.py
rofi -show emoji
#