diff --git a/README.md b/README.md index f33d1d95..a93a5230 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ - + # M-EMACS - + # About @@ -19,14 +19,14 @@ This configuration is designed and tested for **GNU Emacs 25.1 and above only**. ``` - + ## About README This README is originated from init.org that is generated using `M-x org-gfm-export-to-markdown`. Every block of code is generated through this function - it exports the section of code from the `elisp/` directory. You will not see their presence in init.org. - + ## Installation @@ -50,7 +50,7 @@ I will be updating M-EMACS from time to time, it is best to `git pull` once a wh Please also execute `git submodule update --recursive --remote` to sync with all the submodules. - + ## Modification @@ -66,14 +66,14 @@ You have the permission to use, modify, distribute in any way you want. However, 6. Call `M-x org-gfm-export-to-markdown` to update this README. - + ## Spotted a Bug? Suggestions? Please fill in Issues. - + ## Special Thanks @@ -86,94 +86,94 @@ Everyone starts somewhere, and I started here. # Table of Contents :TOC_2_ORG: -- [M-EMACS](#org817296a) -- [About](#orgb377019) - - [About README](#org64ba428) - - [Installation](#orgc9c4058) - - [Modification](#org72eb46f) - - [Spotted a Bug? Suggestions?](#org3f9940b) - - [Special Thanks](#org6713aeb) -- [Startup](#orgc74f562) - - [Lexical-binding](#org4e59b1e) - - [Disable Unnecessary Interface](#org45079b3) - - [Optimization](#orgc481b29) - - [Load-Path](#org1d72f3d) - - [Define Constants](#org158394b) -- [Package Management](#org90bffd2) - - [Melpa Packages](#org093e5f9) - - [Non-Melpa Packages](#org8d42f21) - - [Configure Package Management](#orgaa7923f) - - [Use-Package Wrapper](#org6c69583) - - [Auto Package Update](#org095bac5) -- [Global Functionalities](#org77ea5d7) - - [User Information](#org6c4d7ac) - - [Bindings](#orgac3d5e6) - - [Directory and File Management](#org8712b13) - - [Search](#org2531057) - - [Avy](#org7c5bc19) - - [Ivy](#org76fc911) - - [Shell](#orgc87901f) - - [Winner](#orgf663774) - - [Which Key](#org02fd389) - - [Popup Kill Ring](#org58afae0) - - [Undo Tree](#org596d8c5) - - [Discover My Major](#org161402b) - - [Ace Window](#org1e8cba4) - - [Configs](#org3886aa8) - - [More Functions](#org096652f) -- [User Interface Enhancements](#org469c7cc) - - [Title Bar](#orgec7c7d1) - - [All The Icons](#orga84c880) - - [Doom Theme](#orga343198) - - [Doom Modeline](#org4ee988b) - - [Dashboard](#org425b4cb) - - [Fonts](#org61fe0ad) - - [Zone](#org3bda80b) - - [Diminish](#org0ff7d93) - - [Smooth Scroll](#org710a9c7) - - [Pretty Symbols](#org771aaa3) - - [UI Configs](#org869a89d) -- [General Programming](#org317784b) - - [Magit](#orgd3d45f2) - - [Projectile](#orgfe6a037) - - [Treemacs](#orgac76476) - - [Company](#org4a3c16f) - - [YASnippet](#org1e87241) - - [Flycheck](#org829b965) - - [Dumb Jump](#org4cd0589) - - [Line Numbers](#org87f4522) - - [Parenthesis](#org81d4114) - - [Indentation](#org636f1c1) - - [Format All](#org9d62f29) - - [Evil-Nerd-Commenter](#org86e94a3) - - [Iedit](#orgd6272fe) - - [Header](#org795e103) -- [Programming](#org2b7460c) - - [Language Server Protocol](#org9453fc4) - - [Java](#org3d50085) - - [C/C++](#org9fee201) - - [Python](#org4aed3a2) - - [Arduino](#org17871d0) - - [Jupyter Notebook](#orgcb4d677) -- [Web Development](#orgaa967bf) - - [Web Mode](#org1421a0b) - - [Emmet](#org7b8812d) - - [JavaScript/TypeScript](#orgdc7c4e3) -- [Miscellaneous](#org94456f6) - - [Org](#org78db576) - - [Emacs Web Wowser](#orgc9f41b8) - - [LeetCode](#orga2b52d2) - - [Tetris](#org138212f) - - [Speed Type](#org056d07d) - - [2048 Game](#org1d16f06) - - - +- [M-EMACS](#orgaff5a80) +- [About](#org26dedc0) + - [About README](#orgcee967c) + - [Installation](#org4f6006a) + - [Modification](#org004c218) + - [Spotted a Bug? Suggestions?](#org43672a4) + - [Special Thanks](#org3c785de) +- [Startup](#org8f91f02) + - [Lexical-binding](#org1ac173b) + - [Disable Unnecessary Interface](#org87ed3cc) + - [Optimization](#orgd38b240) + - [Load-Path](#orgb49b473) + - [Define Constants](#org15ba380) +- [Package Management](#orgcda074d) + - [Melpa Packages](#org010a75a) + - [Non-Melpa Packages](#org56e0a62) + - [Configure Package Management](#orgad417ff) + - [Use-Package Wrapper](#org42467d8) + - [Auto Package Update](#orgd53b71a) +- [Global Functionalities](#orga0ce393) + - [User Information](#orgf4af4f0) + - [Bindings](#org62f72ce) + - [Directory and File Management](#org0c143d6) + - [Search](#org520f953) + - [Avy](#org0862c7b) + - [Ivy](#orgcaa1058) + - [Shell](#org7c2d0e3) + - [Winner](#org245f11c) + - [Which Key](#orgaeecdf9) + - [Popup Kill Ring](#orgb9662b6) + - [Undo Tree](#orgea432c6) + - [Discover My Major](#org0ae2ab0) + - [Ace Window](#org4f6eaaa) + - [Configs](#org71f5305) + - [More Functions](#orga01110d) +- [User Interface Enhancements](#org23840b6) + - [Title Bar](#org79f4b99) + - [All The Icons](#org1a95e03) + - [Doom Theme](#orgae13cb7) + - [Doom Modeline](#orgbf259ac) + - [Dashboard](#org003602a) + - [Fonts](#org733886e) + - [Diminish](#org0f2d36e) + - [Smooth Scroll](#orgefb60b4) + - [Pretty Symbols](#orgbd7dcee) + - [UI Configs](#org48a20c1) +- [General Programming](#orgf41db91) + - [Magit](#orgdcecc57) + - [Projectile](#org48101f4) + - [Treemacs](#org90b562d) + - [Company](#orge4e9795) + - [YASnippet](#org1acdb39) + - [Flycheck](#org4cd47ca) + - [Dumb Jump](#org7283eb5) + - [Line Numbers](#orgb9cf42b) + - [Parenthesis](#org62a5ae1) + - [Indentation](#orgb980e93) + - [Format All](#orge2a3977) + - [Evil-Nerd-Commenter](#orgf5e0bfe) + - [Iedit](#org39cb52b) + - [Header](#org65f3718) +- [Programming](#org7e2e8a4) + - [Language Server Protocol](#orgeb3c748) + - [Java](#orga2575d9) + - [C/C++](#orge4c887e) + - [Python](#org7581457) + - [Arduino](#org12f4f8e) + - [Jupyter Notebook](#org89c123a) +- [Web Development](#orgd99c37c) + - [Web Mode](#org5e69fac) + - [Emmet](#orga772f5a) + - [JavaScript/TypeScript](#orgd0a57cb) +- [Miscellaneous](#orgb63ebc1) + - [Org](#org538f299) + - [Emacs Web Wowser](#org2c2bcfa) + - [LeetCode](#org6777e34) + - [Tetris](#org8631c71) + - [Speed Type](#org0f27872) + - [2048 Game](#org58173f3) + - [Zone](#org77f4eea) + + + # Startup - + ## Lexical-binding @@ -186,7 +186,7 @@ Use lexical-binding. [Why?](https://nullprogram.com/blog/2016/12/22/) ``` - + ## Disable Unnecessary Interface @@ -200,7 +200,7 @@ This need to be in the beginning of initialization to smooth the experience. ``` - + ## Optimization @@ -232,7 +232,7 @@ Unset file name handler alist. ``` - + ## Load-Path @@ -254,7 +254,7 @@ Since all the configuration files are stored in `elisp/` folder, they need to be ``` - + ## Define Constants @@ -276,14 +276,14 @@ Since all the configuration files are stored in `elisp/` folder, they need to be ``` - + # Package Management Some packages are turned off because I don't use them very often. Please verify them in `init.el`. - + ## Melpa Packages @@ -302,7 +302,7 @@ Some packages are turned off because I don't use them very often. Please verify Load all Melpa packages in `elisp/` to `load-path` directly to reduce startup time. - + ## Non-Melpa Packages @@ -327,7 +327,7 @@ git submodule update ``` - + ## Configure Package Management @@ -347,7 +347,7 @@ git submodule update ``` - + ## Use-Package Wrapper @@ -401,7 +401,7 @@ The `use-package` wrapper. ``` - + ## Auto Package Update @@ -418,12 +418,12 @@ The `use-package` wrapper. ``` - + # Global Functionalities - + ## User Information @@ -435,7 +435,7 @@ The `use-package` wrapper. ``` - + ## Bindings @@ -460,7 +460,7 @@ The `use-package` wrapper. ``` - + ## Directory and File Management @@ -557,7 +557,7 @@ Create directory where Emacs stores backups files. ``` - + ## Search @@ -591,7 +591,7 @@ Create directory where Emacs stores backups files. ``` - + ## Avy @@ -609,7 +609,7 @@ Create directory where Emacs stores backups files. ``` - + ## Ivy @@ -666,7 +666,7 @@ Create directory where Emacs stores backups files. ``` - + ## Shell @@ -693,7 +693,7 @@ Create directory where Emacs stores backups files. ``` - + ## Winner @@ -715,7 +715,7 @@ Winner mode restores old window layout. ``` - + ## Which Key @@ -732,7 +732,7 @@ Winner mode restores old window layout. ``` - + ## Popup Kill Ring @@ -744,7 +744,7 @@ Winner mode restores old window layout. ``` - + ## Undo Tree @@ -758,7 +758,7 @@ Winner mode restores old window layout. ``` - + ## Discover My Major @@ -770,7 +770,7 @@ Winner mode restores old window layout. ``` - + ## Ace Window @@ -782,7 +782,7 @@ Winner mode restores old window layout. ``` - + ## Configs @@ -893,7 +893,7 @@ Better compilation configurations. ``` - + ## More Functions @@ -1069,12 +1069,12 @@ BEGIN and END are regexps which define the line range to use." ``` - + # User Interface Enhancements - + ## Title Bar @@ -1083,7 +1083,7 @@ BEGIN and END are regexps which define the line range to use." ``` - + ## All The Icons @@ -1127,7 +1127,7 @@ BEGIN and END are regexps which define the line range to use." ``` - + ## Doom Theme @@ -1145,7 +1145,7 @@ BEGIN and END are regexps which define the line range to use." ``` - + ## Doom Modeline @@ -1166,7 +1166,7 @@ BEGIN and END are regexps which define the line range to use." ``` - + ## Dashboard @@ -1246,7 +1246,7 @@ Open Dashboard Function ``` - + ## Fonts @@ -1286,31 +1286,7 @@ Change Font Function. ``` - - -## Zone - -[Zone mode](https://www.emacswiki.org/emacs/ZoneMode), a minor-mode 'zones' Emacs out, choosing one of its random modes to obfuscate the current buffer, which is used as my Emacs screensaver. - -```emacs-lisp -(def-package zone - :ensure nil - :config - (zone-when-idle 600) ;; in seconds - - (defun zone-choose (pgm) - "Choose a PGM to run for `zone'." - (interactive - (list - (completing-read - "Program: " - (mapcar 'symbol-name zone-programs)))) - (let ((zone-programs (list (intern pgm)))) - (zone)))) -``` - - - + ## Diminish @@ -1321,7 +1297,7 @@ Change Font Function. ``` - + ## Smooth Scroll @@ -1344,7 +1320,7 @@ Smoothens Scrolling. ``` - + ## Pretty Symbols @@ -1368,7 +1344,7 @@ Pretty the Symbols. ``` - + ## UI Configs @@ -1396,12 +1372,12 @@ Pretty the Symbols. ``` - + # General Programming - + ## Magit @@ -1413,7 +1389,7 @@ Pretty the Symbols. ``` - + ## Projectile @@ -1439,7 +1415,7 @@ Pretty the Symbols. ``` - + ## Treemacs @@ -1524,7 +1500,7 @@ Pretty the Symbols. ``` - + ## Company @@ -1551,7 +1527,7 @@ Pretty the Symbols. ``` - + ## YASnippet @@ -1582,7 +1558,7 @@ Pretty the Symbols. ``` - + ## Flycheck @@ -1599,7 +1575,7 @@ Pretty the Symbols. ``` - + ## Dumb Jump @@ -1616,7 +1592,7 @@ Pretty the Symbols. ``` - + ## Line Numbers @@ -1635,7 +1611,7 @@ Display line numbers, and column numbers in modeline. ``` - + ## Parenthesis @@ -1715,7 +1691,7 @@ Match and automatically pair parenthesis. ``` - + ## Indentation @@ -1745,7 +1721,7 @@ Indentation Config ``` - + ## Format All @@ -1759,7 +1735,7 @@ Indentation Config ``` - + ## Evil-Nerd-Commenter @@ -1774,7 +1750,7 @@ Indentation Config ``` - + ## Iedit @@ -1787,7 +1763,7 @@ Indentation Config ``` - + ## Header @@ -1805,12 +1781,12 @@ Indentation Config ``` - + # Programming - + ## Language Server Protocol @@ -1897,7 +1873,7 @@ Indentation Config ``` - + ## Java @@ -1921,7 +1897,7 @@ Indentation Config ``` - + ## C/C++ @@ -1935,7 +1911,7 @@ Indentation Config Note: If Displaying `No LSP server for c-mode`, execute `M-x ielm` and verify clangd is installed using `(describe-variable *clangd*)` or `(executable-find lsp-clients-clangd-executable)`. - + ## Python @@ -1970,7 +1946,7 @@ Now, put `~/.emacs.d\python-language-server\output\bin\Release\win10-x64\publish ``` - + ## Arduino @@ -2007,7 +1983,7 @@ Now, put `~/.emacs.d\python-language-server\output\bin\Release\win10-x64\publish ``` - + ## Jupyter Notebook @@ -2028,7 +2004,7 @@ Now, put `~/.emacs.d\python-language-server\output\bin\Release\win10-x64\publish ``` - + # Web Development @@ -2041,7 +2017,7 @@ npm install -g vscode-html-languageserver-bin ``` - + ## Web Mode @@ -2055,7 +2031,7 @@ npm install -g vscode-html-languageserver-bin ``` - + ## Emmet @@ -2069,7 +2045,7 @@ npm install -g vscode-html-languageserver-bin ``` - + ## JavaScript/TypeScript @@ -2122,12 +2098,12 @@ Tip: enter `M-.` to jump to definition. ``` - + # Miscellaneous - + ## Org @@ -2183,7 +2159,7 @@ Tip: enter `M-.` to jump to definition. ``` - + ## Emacs Web Wowser @@ -2219,7 +2195,7 @@ In Eww, hit & to browse this url system browser ``` - + ## LeetCode @@ -2242,7 +2218,7 @@ In Eww, hit & to browse this url system browser ``` - + ## Tetris @@ -2261,7 +2237,7 @@ Although [Tetris](https://www.emacswiki.org/emacs/TetrisMode) is part of Emacs, ``` - + ## Speed Type @@ -2273,7 +2249,7 @@ Although [Tetris](https://www.emacswiki.org/emacs/TetrisMode) is part of Emacs, ``` - + ## 2048 Game @@ -2283,3 +2259,26 @@ Although [Tetris](https://www.emacswiki.org/emacs/TetrisMode) is part of Emacs, (def-package 2048-game :defer t) ``` + + + + +## Zone + +[Zone](https://www.emacswiki.org/emacs/ZoneMode), a minor-mode 'zones' Emacs out, choosing one of its random modes to obfuscate the current buffer. + +```emacs-lisp +(def-package zone + :ensure nil + :config + ;; (zone-when-idle 600) ; in seconds + (defun zone-choose (pgm) + "Choose a PGM to run for `zone'." + (interactive + (list + (completing-read + "Program: " + (mapcar 'symbol-name zone-programs)))) + (let ((zone-programs (list (intern pgm)))) + (zone)))) +``` diff --git a/elisp/init-zone.el b/elisp/init-zone.el index 9d18a484..6d405064 100644 --- a/elisp/init-zone.el +++ b/elisp/init-zone.el @@ -47,8 +47,7 @@ (def-package zone :ensure nil :config - (zone-when-idle 600) ;; in seconds - + ;; (zone-when-idle 600) ; in seconds (defun zone-choose (pgm) "Choose a PGM to run for `zone'." (interactive diff --git a/init.el b/init.el index 3b4ebadf..d776d475 100644 --- a/init.el +++ b/init.el @@ -137,8 +137,6 @@ (require 'init-fonts) -(require 'init-zone) - (require 'init-diminish) (require 'init-scroll) @@ -193,6 +191,8 @@ (require 'init-games) +(require 'init-zone) + (provide 'init) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; init.el ends here diff --git a/init.org b/init.org index bd645cad..96a8b2f7 100644 --- a/init.org +++ b/init.org @@ -85,7 +85,6 @@ - [[Doom Modeline][Doom Modeline]] - [[Dashboard][Dashboard]] - [[Fonts][Fonts]] - - [[Zone][Zone]] - [[Diminish][Diminish]] - [[Smooth Scroll][Smooth Scroll]] - [[Pretty Symbols][Pretty Symbols]] @@ -123,6 +122,7 @@ - [[Tetris][Tetris]] - [[Speed Type][Speed Type]] - [[2048 Game][2048 Game]] + - [[Zone][Zone]] * Startup ** Lexical-binding @@ -324,9 +324,6 @@ #+INCLUDE: "~/.emacs.d/elisp/init-fonts.el" src emacs-lisp :range-begin "FontsList" :range-end "-FontsList" :lines "45-48" Change Font Function. #+INCLUDE: "~/.emacs.d/elisp/init-fonts.el" src emacs-lisp :range-begin "FontFun" :range-end "-FontFun" :lines "51-71" -** Zone - [[https://www.emacswiki.org/emacs/ZoneMode][Zone mode]], a minor-mode 'zones' Emacs out, choosing one of its random modes to obfuscate the current buffer, which is used as my Emacs screensaver. - #+INCLUDE: "~/.emacs.d/elisp/init-zone.el" src emacs-lisp :range-begin "ZonePac" :range-end "-ZonePac" :lines "47-61" ** Diminish [[https://github.com/emacsmirror/diminish][Diminish]], a feature that removes certain minor modes from mode-line. #+INCLUDE: "~/.emacs.d/elisp/init-diminish.el" src emacs-lisp :range-begin "DimPac" :range-end "-DimPac" :lines "46-47" @@ -531,3 +528,6 @@ ** 2048 Game [[https://bitbucket.org/zck/2048.el][2048 Game]], an implementation of 2048 in Emacs. #+INCLUDE: "~/.emacs.d/elisp/init-games.el" src emacs-lisp :range-begin "2048Pac" :range-end "-2048Pac" :lines "64-66" +** Zone + [[https://www.emacswiki.org/emacs/ZoneMode][Zone]], a minor-mode 'zones' Emacs out, choosing one of its random modes to obfuscate the current buffer. + #+INCLUDE: "~/.emacs.d/elisp/init-zone.el" src emacs-lisp :range-begin "ZonePac" :range-end "-ZonePac" :lines "47-60"