diff --git a/.config/doom/config.el b/.config/doom/config.el index b16076c3..ec16c503 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -119,6 +119,19 @@ user-mail-address "yigit@yigitcolakoglu.com") (use-package! calfw-org :after calfw) +(use-package! org-download + :defer + :init + ;; Org download + (setq-default org-download-image-dir "~/Pictures/org/") + (setq-default org-download-method 'directory) + (setq-default org-download-screenshot-method "scrot") + :config + (org-download-enable) + ) + +(add-hook! 'dired-mode-hook 'org-download-enable) + (use-package! org-agenda :defer :init @@ -285,6 +298,9 @@ user-mail-address "yigit@yigitcolakoglu.com") nand-hdl-directory "~/Projects/nand2tetris" css-indent-offset 2) +(org-babel-do-load-languages + 'org-babel-load-languages + '((dot . t))) ; (setq auth-sources '((:source "~/.config/emacs/.authinfo.gpg"))) @@ -292,6 +308,13 @@ user-mail-address "yigit@yigitcolakoglu.com") (defun insert-current-date () (interactive) (insert (shell-command-to-string "echo -n $(date +%Y-%m-%d)"))) +(defun org-insert-clipboard-image () (interactive) + (setq name (read-from-minibuffer "Enter image description: ")) + (setq file (concat "./static/" (subst-char-in-string ? ?_ (nth 0 (org-get-outline-path t))) "/" (format-time-string "%Y-%m-%dT%T") "_" (subst-char-in-string ? ?_ name) ".png")) + (setq return (shell-command-to-string (concat "saveclipimg " file))) + (insert (concat "[[file:" return"][" name "]]")) + (org-display-inline-images)) + ;; We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case (defun doom-modeline-conditional-buffer-encoding () (setq-local doom-modeline-buffer-encoding diff --git a/.config/doom/init.el b/.config/doom/init.el index c8f3eff8..b9346bb3 100644 --- a/.config/doom/init.el +++ b/.config/doom/init.el @@ -9,7 +9,6 @@ +childframe) ; a nicer company UI. Emacs +26 only! (ivy +icons - +childframe +prescient +fuzzy) ; a search engine for love and life @@ -78,7 +77,7 @@ :lang assembly ; assembly for fun or debugging - cc ; C/C++/Obj-C madness + (cc +lsp) ; C/C++/Obj-C madness ;; crystal ; ruby at the speed of c ;; clojure ; java with a lisp ;; csharp ; unity, .NET, and mono shenanigans @@ -117,7 +116,7 @@ +capture ; org-capture in and outside of Emacs +export ; Exporting org to whatever you want +present) ; Emacs for presentations - ;; +publish ; Emacs+Org as a static site generator + +publish ; Emacs+Org as a static site generator ;; perl ; write code no one else can comprehend php ; perl's insecure younger brother @@ -128,7 +127,7 @@ ;; ruby ; 1.step do {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;; rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;; scala ; java, but good - sh ; she sells (ba|z)sh shells on the C xor + (sh +lsp) ; she sells (ba|z)sh shells on the C xor ;; swift ; who asked for emoji variables? web ; the tubes diff --git a/.config/doom/org-conf.el b/.config/doom/org-conf.el new file mode 100644 index 00000000..c1930b13 --- /dev/null +++ b/.config/doom/org-conf.el @@ -0,0 +1,290 @@ +;;; $DOOMDIR/org-conf.el -*- lexical-binding: t; -*- +;;; org-conf.el<2> --- Description + +;; Author: Yigit Colakoglu yigit@yigitcolakoglu.com + +;; Copyright (C) Symbol’s value as variable is void: %Y, Yigit Colakoglu, all rights reserved. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: +;; This file contains the org-mode specific configuration for my emacs config +;; + +;;; Code: +(setq org-export-with-section-numbers nil) + +(setq org-agenda-files (directory-files org-directory t "\\.org$" t)) + +(setq org-display-remote-inline-images 'download) +(setq org-agenda-include-deadlines t) +(setq org-agenda-dim-blocked-tasks 'invisible) +(setq org-latex-packages-alist '(("margin=1in" "geometry" nil))) ;; adjusting the margins of latex output +(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.5)) ;; making latex previews larger +(setq org-bullets-bullet-list '("·")) +(setq org-log-done 'time) +(setq org-tags-column -80) +(setq org-refile-targets (quote ((nil :maxlevel . 1)))) +(setq org-hugo-base-dir "~/Projects/fr1nge.xyz") +(setq org-hugo-default-section-directory "~/Projects/fr1nge.xyz") + +(setq org-todo-keywords '((sequence + "TODO" + "PROJ" + "NEXT(n)" + "PROG(p!)" + "WAIT(w@/!)" + "SOMEDAY" + "|" + "DONE(d)" + "CANCEL(c@)" + "DELEGATED(@)" + ) + (sequence + "IDEA" + "GOAL" + "|" + "DUD(@)") + (sequence + "RD" + "RDING" + "RDNOTE" + "TMPDROP" + "|" + "DROP" + "FNSHED" + ) + )) + +(setq org-fancy-priorities-list '("⚡" "⬆" "⬇" "☕")) + +(setq org-caldav-url "https://drive.yigitcolakoglu.com/remote.php/dav/calendars/yigitcolakoglu") +(setq org-icalendar-timezone "Europe/Istanbul") +(setq org-caldav-calendars + '((:calendar-id "pcalendar" :files ("~/Documents/org/pcalendar.org") + :inbox "~/.local/share/pcalendar.org"))) + +;; Mappings + +(map! :ne "SPC m a c" #'org-insert-clipboard-image) + +(map! :map calc-mode-map + :after calc + :localleader + :desc "Embedded calc (toggle)" "e" #'calc-embedded) +(map! :map org-mode-map + :after org + :localleader + :desc "Embedded calc (toggle)" "E" #'calc-embedded) +(map! :map latex-mode-map + :after latex + :localleader + :desc "Embedded calc (toggle)" "e" #'calc-embedded) +(map! :map org-mode-map + :after org + :localleader + :desc "Outline" "O" #'org-ol-tree) + + +;; Org Superstar +;; +(setq org-superstar-remove-leading-stars t) + +(setq org-capture-templates + `( + ("t" "Todo" entry (file ,(concat org-directory "personal.org")) + "* TODO %? \n%U" :empty-lines 1) + ("d" "Todo deadline" entry (file ,(concat org-directory "personal.org")) + "* TODO %? \nDEADLINE: %^T\n%U" :empty-lines 1) + ("w" "Wait deadline" entry (file ,(concat org-directory "personal.org")) + "* WAIT %? \nDEADLINE: %^T\n%U" :empty-lines 1) + ("r" "Reading List" entry (file+olp ,(concat org-directory "reading_list.org") "Catchall") + "* RD %? \n%U" :empty-lines 1) + ("i" "Idea" entry (file ,(concat org-directory "personal.org")) + "* IDEA %? \n%U" :empty-lines 1) + ("s" "Someday" entry (file+olp ,(concat org-directory "someday.org") "Catchall") + "* SOMEDAY %? \n%U" :empty-lines 1) + ("e" "Event" entry (file ,(concat org-directory "personal.org")) + "* %? \nSCHEDULED: %^T\n%U" :empty-lines 1) + ("c" "Cookbook" entry (file ,(concat org-directory "cookbook.org")) + "%(org-chef-get-recipe-from-url)" :empty-lines 1) + ("C" "Manual Cookbook" entry (file ,(concat org-directory "cookbook.org")) + "* %^{Recipe title: }\n :PROPERTIES:\n :source-url:\n :servings:\n :prep-time:\n :cook-time:\n :ready-in:\n :END:\n** Ingredients\n %?\n** Directions\n\n") + ("j" "Journal entry" entry (function org-journal-find-location) + "* NEXT %?\n%U" :empty-lines 1) + ("k" "Journal sched entry" entry (function org-journal-find-location) + "* %? %^T\n%U" :empty-lines 1) + ("m" "Morning Journal entry" entry (function org-journal-find-location) + "* Morning Entry +** Checklist + + - [ ] Make bed + - [ ] Brush Teeth + - [ ] Cook something nice + - [ ] Read for 20 pages + - [ ] Take note of things I am looking forward to in journal + - [ ] Wash face + - plan tips: + - don't put mentally straining todos after working out or eating. + - mentally chill stuff includes: + - relaxing reading + - article reading +** Looking Forward To %? +** Day Plan +** Determinations :determ:" :empty-lines 1) + ("n" "Night Journal entry" entry (function org-journal-find-location) + "* Today's Learnings\n* My Day\n%U") + )) + + +;; Org Journal +(defun org-journal-find-location () + ;; Open today's journal, but specify a non-nil prefix argument in order to + ;; inhibit inserting the heading; org-capture will insert the heading. + (org-journal-new-entry t) + ;; Position point on the journal's top-level heading so that org-capture + ;; will add the new entry as a child entry. + (goto-char (point-min))) + + +(set-face-attribute 'org-table nil :inherit 'fixed-pitch) + +(set-face-attribute 'org-block nil :inherit 'fixed-pitch) + +;; Refile taken from here: https://www.reddit.com/r/emacs/comments/4366f9/how_do_orgrefiletargets_work/ +(setq org-refile-targets '((nil :maxlevel . 9) + (org-agenda-files :maxlevel . 9))) +(setq org-outline-path-complete-in-steps nil) ; Refile in a single go +(setq org-refile-use-outline-path t) ; Show full paths for refiling +(setq org-refile-allow-creating-parent-nodes (quote confirm)) +(setq org-pretty-entities t) + +(setq org-hide-emphasis-markers t) +(setq org-fontify-whole-heading-line t) +(setq org-fontify-done-headline t) +(setq org-fontify-quote-and-verse-blocks t) +(setq org-tags-column 0) +(setq org-src-fontify-natively t) +(setq org-edit-src-content-indentation 0) +(setq org-src-tab-acts-natively t) +(setq org-src-preserve-indentation t) + +(setq org-list-demote-modify-bullet '(("+" . "-") ("-" . "+") ("*" . "+") ("1." . "a."))) + +(setq org-log-done 'time) + +(provide 'org-conf.el) + +;; Embedded Calc +(defvar calc-embedded-trail-window nil) +(defvar calc-embedded-calculator-window nil) + +(defadvice! calc-embedded-with-side-pannel (&rest _) + :after #'calc-do-embedded + (when calc-embedded-trail-window + (ignore-errors + (delete-window calc-embedded-trail-window)) + (setq calc-embedded-trail-window nil)) + (when calc-embedded-calculator-window + (ignore-errors + (delete-window calc-embedded-calculator-window)) + (setq calc-embedded-calculator-window nil)) + (when (and calc-embedded-info + (> (* (window-width) (window-height)) 1200)) + (let ((main-window (selected-window)) + (vertical-p (> (window-width) 80))) + (select-window + (setq calc-embedded-trail-window + (if vertical-p + (split-window-horizontally (- (max 30 (/ (window-width) 3)))) + (split-window-vertically (- (max 8 (/ (window-height) 4))))))) + (switch-to-buffer "*Calc Trail*") + (select-window + (setq calc-embedded-calculator-window + (if vertical-p + (split-window-vertically -6) + (split-window-horizontally (- (/ (window-width) 2)))))) + (switch-to-buffer "*Calculator*") + (select-window main-window)))) + +(require 'ox-publish) +(setq org-publish-project-alist + '( + ("roam-notes" + :base-directory "~/Documents/org/roam" + :base-extension "org" + :publishing-directory "~/Projects/wiki" + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 ; Just the default for this project. + :auto-preamble t + ) + ("roam-static" + :base-directory "~/Documents/org/roam/static" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" + :publishing-directory "~/Projects/wiki/static" + :recursive t + :publishing-function org-publish-attachment + ) + ("roam" :components ("roam-notes" "roam-static")) + )) + +;;; ol-man.el - Support for links to man pages in Org mode +;;; https://www.gnu.org/software/emacs/manual/html_node/org/Adding-Hyperlink-Types.html +(org-link-set-parameters "man" + :follow #'org-man-open + :export #'org-man-export + :store #'org-man-store-link) + +(defcustom org-man-command 'man + "The Emacs command to be used to display a man page." + :group 'org-link + :type '(choice (const man) (const woman))) + +(defun org-man-open (path _) + "Visit the manpage on PATH. +PATH should be a topic that can be thrown at the man command." + (funcall org-man-command path)) + +(defun org-man-store-link () + "Store a link to a man page." + (when (memq major-mode '(Man-mode woman-mode)) + ;; This is a man page, we do make this link. + (let* ((page (org-man-get-page-name)) + (link (concat "man:" page)) + (description (format "Man page for %s" page))) + (org-link-store-props + :type "man" + :link link + :description description)))) + +(defun org-man-get-page-name () + "Extract the page name from the buffer name." + ;; This works for both `Man-mode' and `woman-mode'. + (if (string-match " \\(\\S-+\\)\\*" (buffer-name)) + (match-string 1 (buffer-name)) + (error "Cannot create link to this man page"))) + +(defun org-man-export (link description format _) + "Export a man page link from Org files." + (let ((path (format "http://man.he.net/?topic=%s§ion=all" link)) + (desc (or description link))) + (pcase format + (`html (format "%s" path desc)) + (`latex (format "\\href{%s}{%s}" path desc)) + (`texinfo (format "@uref{%s,%s}" path desc)) + (`ascii (format "%s (%s)" desc path)) + (t path)))) + +;;; org-conf.el<2> ends here. diff --git a/.config/doom/packages.el b/.config/doom/packages.el index f54cde9e..db4b7083 100644 --- a/.config/doom/packages.el +++ b/.config/doom/packages.el @@ -41,9 +41,13 @@ (package! nand-hdl-mode :recipe (:host github :repo "nverno/nand-hdl-mode")) +(package! org-download) (package! browse-kill-ring) (package! olivetti) (package! ox-hugo) (package! polymode) (package! counsel-org-clock) (package! mathpix.el :recipe (:host github :repo "jethrokuan/mathpix.el")) +(package! python-django) +(package! org-super-links) +(package! xclip) diff --git a/.config/doom/snippets/nand-hdl-mode/ALU b/.config/doom/snippets/nand-hdl-mode/ALU new file mode 100644 index 00000000..502a1167 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/ALU @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: ALU(x= ,y= ,zx= ,nx= ,zy= ,ny= ,f= ,no= ,out= ,zr= ,ng= ); +# key: ALU +# -- +ALU(x=$1,y=$2,zx=$3,nx=$4,zy=$5,ny=$6,f=$7,no=$8,out=$9,zr=$10,ng=$11);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/ARegister b/.config/doom/snippets/nand-hdl-mode/ARegister new file mode 100644 index 00000000..9532768e --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/ARegister @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: ARegister(in= ,load= ,out= ); +# key: ARegister +# -- +ARegister(in=$1,load=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Add16 b/.config/doom/snippets/nand-hdl-mode/Add16 new file mode 100644 index 00000000..9cf555da --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Add16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Add16(a= ,b= ,out= ); +# key: Add16 +# -- +Add16(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/And b/.config/doom/snippets/nand-hdl-mode/And new file mode 100644 index 00000000..5dd2923f --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/And @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: And(a= ,b= ,out= ); +# key: And +# -- +And(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/And16 b/.config/doom/snippets/nand-hdl-mode/And16 new file mode 100644 index 00000000..85376b2f --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/And16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: And16(a= ,b= ,out= ); +# key: And16 +# -- +And16(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Bit b/.config/doom/snippets/nand-hdl-mode/Bit new file mode 100644 index 00000000..1253f43a --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Bit @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Bit(in= ,load= ,out= ); +# key: Bit +# -- +Bit(in=$1,load=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/CPU b/.config/doom/snippets/nand-hdl-mode/CPU new file mode 100644 index 00000000..49bc6a0c --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/CPU @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: CPU(inM= ,instruction= ,reset= ,outM= ,writeM= ,addressM= ,pc= ); +# key: CPU +# -- +CPU(inM=$1,instruction=$2,reset=$3,outM=$4,writeM=$5,addressM=$6,pc=$7);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/DFF b/.config/doom/snippets/nand-hdl-mode/DFF new file mode 100644 index 00000000..6253d476 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/DFF @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: DFF(in= ,out= ); +# key: DFF +# -- +DFF(in=$1,out=$2);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/DMux b/.config/doom/snippets/nand-hdl-mode/DMux new file mode 100644 index 00000000..3ca0548f --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/DMux @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: DMux(in= ,sel= ,a= ,b= ); +# key: DMux +# -- +DMux(in=$1,sel=$2,a=$3,b=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/DMux4Way b/.config/doom/snippets/nand-hdl-mode/DMux4Way new file mode 100644 index 00000000..4c8c0a18 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/DMux4Way @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: DMux4Way(in= ,sel= ,a= ,b= ,c= ,d= ); +# key: DMux4Way +# -- +DMux4Way(in=$1,sel=$2,a=$3,b=$4,c=$5,d=$6);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/DMux8Way b/.config/doom/snippets/nand-hdl-mode/DMux8Way new file mode 100644 index 00000000..f291442e --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/DMux8Way @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: DMux8Way(in= ,sel= ,a= ,b= ,c= ,d= ,e= ,f= ,g= ,h= ); +# key: DMux8Way +# -- +DMux8Way(in=$1,sel=$2,a=$3,b=$4,c=$5,d=$6,e=$7,f=$8,g=$9,h=$10);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/DRegister b/.config/doom/snippets/nand-hdl-mode/DRegister new file mode 100644 index 00000000..da36acf1 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/DRegister @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: DRegister(in= ,load= ,out= ); +# key: DRegister +# -- +DRegister(in=$1,load=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/FullAdder b/.config/doom/snippets/nand-hdl-mode/FullAdder new file mode 100644 index 00000000..04cdae53 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/FullAdder @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: FullAdder(a= ,b= ,c= ,sum= ,carry= ); +# key: FullAdder +# -- +FullAdder(a=$1,b=$2,c=$3,sum=$4,carry=$5);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/HalfAdder b/.config/doom/snippets/nand-hdl-mode/HalfAdder new file mode 100644 index 00000000..e251f42d --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/HalfAdder @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: HalfAdder(a= ,b= ,sum= , carry= ); +# key: HalfAdder +# -- +HalfAdder(a=$1,b=$2,sum=$3,$4carry=$5);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Inc16 b/.config/doom/snippets/nand-hdl-mode/Inc16 new file mode 100644 index 00000000..c9957f27 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Inc16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Inc16(in= ,out= ); +# key: Inc16 +# -- +Inc16(in=$1,out=$2);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Keyboard b/.config/doom/snippets/nand-hdl-mode/Keyboard new file mode 100644 index 00000000..1ebac7a4 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Keyboard @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Keyboard(out= ); +# key: Keyboard +# -- +Keyboard(out=$1);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Memory b/.config/doom/snippets/nand-hdl-mode/Memory new file mode 100644 index 00000000..4980162e --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Memory @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Memory(in= ,load= ,address= ,out= ); +# key: Memory +# -- +Memory(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Mux b/.config/doom/snippets/nand-hdl-mode/Mux new file mode 100644 index 00000000..e6d138b4 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Mux @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Mux(a= ,b= ,sel= ,out= ); +# key: Mux +# -- +Mux(a=$1,b=$2,sel=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Mux16 b/.config/doom/snippets/nand-hdl-mode/Mux16 new file mode 100644 index 00000000..f2884c45 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Mux16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Mux16(a= ,b= ,sel= ,out= ); +# key: Mux16 +# -- +Mux16(a=$1,b=$2,sel=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Mux4Way16 b/.config/doom/snippets/nand-hdl-mode/Mux4Way16 new file mode 100644 index 00000000..d5c5dba5 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Mux4Way16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Mux4Way16(a= ,b= ,c= ,d= ,sel= ,out= ); +# key: Mux4Way16 +# -- +Mux4Way16(a=$1,b=$2,c=$3,d=$4,sel=$5,out=$6);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Mux8Way16 b/.config/doom/snippets/nand-hdl-mode/Mux8Way16 new file mode 100644 index 00000000..edc48360 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Mux8Way16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Mux8Way16(a= ,b= ,c= ,d= ,e= ,f= ,g= ,h= ,sel= ,out= ); +# key: Mux8Way16 +# -- +Mux8Way16(a=$1,b=$2,c=$3,d=$4,e=$5,f=$6,g=$7,h=$8,sel=$9,out=$10);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Nand b/.config/doom/snippets/nand-hdl-mode/Nand new file mode 100644 index 00000000..181f87f3 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Nand @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Nand(a= ,b= ,out= ); +# key: Nand +# -- +Nand(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Not b/.config/doom/snippets/nand-hdl-mode/Not new file mode 100644 index 00000000..7e3de1a9 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Not @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Not(in= ,out= ); +# key: Not +# -- +Not(in=$1,out=$2);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Not16 b/.config/doom/snippets/nand-hdl-mode/Not16 new file mode 100644 index 00000000..71cc697a --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Not16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Not16(in= ,out= ); +# key: Not16 +# -- +Not16(in=$1,out=$2);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Or b/.config/doom/snippets/nand-hdl-mode/Or new file mode 100644 index 00000000..e61a50f8 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Or @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Or(a= ,b= ,out= ); +# key: Or +# -- +Or(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Or16 b/.config/doom/snippets/nand-hdl-mode/Or16 new file mode 100644 index 00000000..df7e2d38 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Or16 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Or16(a= ,b= ,out= ); +# key: Or16 +# -- +Or16(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Or8Way b/.config/doom/snippets/nand-hdl-mode/Or8Way new file mode 100644 index 00000000..6250640d --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Or8Way @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Or8Way(in= ,out= ); +# key: Or8Way +# -- +Or8Way(in=$1,out=$2);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/PC b/.config/doom/snippets/nand-hdl-mode/PC new file mode 100644 index 00000000..1fdd89d1 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/PC @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: PC(in= ,load= ,inc= ,reset= ,out= ); +# key: PC +# -- +PC(in=$1,load=$2,inc=$3,reset=$4,out=$5);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/RAM16K b/.config/doom/snippets/nand-hdl-mode/RAM16K new file mode 100644 index 00000000..2462f915 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/RAM16K @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: RAM16K(in= ,load= ,address= ,out= ); +# key: RAM16K +# -- +RAM16K(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/RAM4K b/.config/doom/snippets/nand-hdl-mode/RAM4K new file mode 100644 index 00000000..4fcd8de2 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/RAM4K @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: RAM4K(in= ,load= ,address= ,out= ); +# key: RAM4K +# -- +RAM4K(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/RAM512 b/.config/doom/snippets/nand-hdl-mode/RAM512 new file mode 100644 index 00000000..d3043fbf --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/RAM512 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: RAM512(in= ,load= ,address= ,out= ); +# key: RAM512 +# -- +RAM512(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/RAM64 b/.config/doom/snippets/nand-hdl-mode/RAM64 new file mode 100644 index 00000000..427799aa --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/RAM64 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: RAM64(in= ,load= ,address= ,out= ); +# key: RAM64 +# -- +RAM64(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/RAM8 b/.config/doom/snippets/nand-hdl-mode/RAM8 new file mode 100644 index 00000000..2612368d --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/RAM8 @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: RAM8(in= ,load= ,address= ,out= ); +# key: RAM8 +# -- +RAM8(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/ROM32K b/.config/doom/snippets/nand-hdl-mode/ROM32K new file mode 100644 index 00000000..32297200 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/ROM32K @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: ROM32K(address= ,out= ); +# key: ROM32K +# -- +ROM32K(address=$1,out=$2);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Register b/.config/doom/snippets/nand-hdl-mode/Register new file mode 100644 index 00000000..b93b1cb8 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Register @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Register(in= ,load= ,out= ); +# key: Register +# -- +Register(in=$1,load=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Screen b/.config/doom/snippets/nand-hdl-mode/Screen new file mode 100644 index 00000000..290a8817 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Screen @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Screen(in= ,load= ,address= ,out= ); +# key: Screen +# -- +Screen(in=$1,load=$2,address=$3,out=$4);$0 \ No newline at end of file diff --git a/.config/doom/snippets/nand-hdl-mode/Xor b/.config/doom/snippets/nand-hdl-mode/Xor new file mode 100644 index 00000000..c32570c4 --- /dev/null +++ b/.config/doom/snippets/nand-hdl-mode/Xor @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: Xor(a= ,b= ,out= ); +# key: Xor +# -- +Xor(a=$1,b=$2,out=$3);$0 \ No newline at end of file diff --git a/.config/doom/templates/template.org b/.config/doom/templates/template.org index a0390125..b2150384 100644 --- a/.config/doom/templates/template.org +++ b/.config/doom/templates/template.org @@ -1,13 +1,5 @@ -# -*- coding:utf-8 -*- #+LANGUAGE: en #+TITLE: ${1:`(file-name-nondirectory (buffer-file-name))`} #+AUTHOR: `user-full-name` #+EMAIL: `user-mail-address` #+DATE: `(format-time-string "%Y-%m-%d %a" )` -#+DESCRIPTION:$1 -#+KEYWORDS: $2 -#+TAGS:$3 -#+FILETAGS: $4 -#+OPTIONS: H:2 num:nil toc:t \n:t @:t ::t |:t ^:nil -:t f:t *:t <:t -#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil -#+LATEX_HEADER: \usepackage{fontspec} diff --git a/.config/htop/htoprc b/.config/htop/htoprc index 07494ad5..f762c111 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -1,7 +1,7 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=47 +sort_key=46 sort_direction=1 tree_sort_key=0 tree_sort_direction=1 diff --git a/.config/imapfilter/config.lua b/.config/imapfilter/config.lua index 7bfa5669..bf114f62 100644 --- a/.config/imapfilter/config.lua +++ b/.config/imapfilter/config.lua @@ -57,5 +57,19 @@ function blockUni(blacklist) end end +-- Block e-mails that I'm too lazy to opt out of or can't figure out how +function blockSubject(blacklist) + mailboxes, folders = domain:list_all("/") + for _, v in pairs(mailboxes) do + for _, u in pairs(blacklist) do + m1 = domain[v]:contain_from(u) + m2 = hotmail[v]:contain_from(u) + m1:delete_messages() + m2:delete_messages() + end + end +end + fuckAleksandr {} blockUni {"Hult", "hult"} +blockSubject {"Coralogix", "Whereby", "Manuel Tarin", "Starbucks", "TIDAL", "Fahim from Educative", "Lancaster University Leipzig", "New York Institute of Technology"} diff --git a/.config/nextcloud/nextcloud b/.config/nextcloud/nextcloud index e1973a41..ec61339a 100755 --- a/.config/nextcloud/nextcloud +++ b/.config/nextcloud/nextcloud @@ -1,5 +1,6 @@ #!/bin/bash +source ~/.profile eval "$(grep -h -- \ "^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\|XDG_DATA_HOME\|XDG_CONFIG_HOME\|XDG_RUNTIME_DIR\)=" \ diff --git a/.config/zsh/aliases b/.config/zsh/aliases index b0affd75..2a0fa09a 100755 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -52,6 +52,7 @@ alias dpall="dots remote | xargs -I R git --git-dir=$HOME/.dotfiles.git/ --work- alias dignore="dots update-index --assume-unchanged {pkg.list,install.sh,README.md}" alias da="dots add -u" alias dcm="dots commit" +alias pwndbg="gdb -nh -x \"$XDG_CONFIG_HOME\"/gdb/init" alias bon="sudo bash -c 'rc-service bluetooth start && rfkill unblock bluetooth'" diff --git a/.local/bin/dmenu-logout b/.local/bin/dmenu-logout index b66807a9..213cf15f 100755 --- a/.local/bin/dmenu-logout +++ b/.local/bin/dmenu-logout @@ -43,13 +43,13 @@ case $selection in loginctl hibernate ;; suspend) - sudo /sbin/sleep + sudo sleep ;; reboot) - sudo /sbin/reboot + sudo reboot ;; halt|poweroff|shutdown) - sudo /sbin/shutdown + sudo shutdown -h now ;; esac diff --git a/.local/bin/saveclipimg b/.local/bin/saveclipimg new file mode 100755 index 00000000..1d6ce24b --- /dev/null +++ b/.local/bin/saveclipimg @@ -0,0 +1,15 @@ +#!/bin/bash + +location="$1" + +mkdir -p "$(echo "$location" | sed 's|/[^/]*$||g')" +xclip -selection clipboard -t image/png -o 2> /dev/null > $location + +if [ ! "$?" = "0" ]; then + printf "An error occured" + rm -f "$location" + exit 1 +fi + +printf "%s" "$location" + diff --git a/.local/share/dwm/autostart.sh b/.local/share/dwm/autostart.sh index 69d4ad4a..1cad54db 100755 --- a/.local/share/dwm/autostart.sh +++ b/.local/share/dwm/autostart.sh @@ -31,7 +31,7 @@ touch ~/.cache/nextcloud-track restart_if_fails "xss-lock -- slock" restart_if_fails "picom --no-fading-openclose" -restart_if_fails "xbanish -s" +restart_if_fails "xbanish" # Start emacs restart_if_fails "emacs --daemon && emacsclient -c --eval \"(delete-frame)\"" diff --git a/.profile b/.profile index 5c1554b0..e76ee1c3 100755 --- a/.profile +++ b/.profile @@ -34,6 +34,7 @@ export BORG_KEYS_DIR="$XDG_DATA_HOME"/keys/borg export CARGO_HOME="$XDG_DATA_HOME"/cargo export DOOMDIR="$XDG_CONFIG_HOME"/doom export GOPATH="$XDG_DATA_HOME"/go +export GDBHISTFILE="$XDG_DATA_HOME"/gdb/history, export ANDROID_HOME="$XDG_DATA_HOME"/Sdk export FLUTTER_HOME="$XDG_DATA_HOME"/flutter export LEIN_HOME="$XDG_DATA_HOME"/lein