Bläddra i källkod

Truncating History

Vinicius Teshima 1 år sedan
incheckning
d98582c7d2

+ 19 - 0
.bash_profile

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+BASH_COMPLETION="/usr/share/bash-completion/completions"
+
+files=(
+    "$HOME/.bashrc"
+    "$HOME/.profile"
+    "$BASH_COMPLETION/pass"
+    "$BASH_COMPLETION/pass-otp"
+    "$BASH_COMPLETION/git"
+)
+
+for file in "${files[@]}"; do
+    if [ -e "$file" ]; then
+        source "$file"
+    fi
+done
+
+unset -v BASH_COMPLETION files

+ 3 - 0
.bashrc

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+. ~/.config/shell_cfg.sh

+ 76 - 0
.config/X11/Xresources

@@ -0,0 +1,76 @@
+URxvt.foreground: #F8F8F2
+URxvt.background: #282A36
+
+! Black
+URxvt.color0:     #000000
+
+! Red
+URxvt.color1:     #FF5555
+
+! Green
+URxvt.color2:     #50FA7B
+
+! Yellow
+URxvt.color3:     #F1FA8C
+
+! Blue
+URxvt.color4:     #BD93F9
+
+! Magenta
+URxvt.color5:     #FF79C6
+
+! Cyan
+URxvt.color6:     #8BE9FD
+
+! Gray
+URxvt.color7:     #BFBFBF
+
+! Grey
+URxvt.color8:     #4D4D4D
+
+! Red
+URxvt.color9:     #FF6E67
+
+! Green
+URxvt.color10:    #5AF78E
+
+! Yellow
+URxvt.color11:    #F4F99D
+
+! Blue
+URxvt.color12:    #CAA9FA
+
+! Magenta
+URxvt.color13:    #FF92D0
+
+! Cyan
+URxvt.color14:    #9AEDFE
+
+! White
+URxvt.color15:    #E6E6E6
+
+!URxvt.font: xft:Fantasque Sans Mono:size=11,xft:Fira Code:size=12:antialias=true,xft:3270 Nerd Font,xft:Symbola
+!URxvt.font: xft:Fira Code Nerd Font Mono:pixelsize=14
+URxvt.font:xft:Unifont:pixelsize=14
+!URxvt.font: xft:Monospace:pixelsize=14
+URxvt.letterSpace: 0
+URxvt.lineSpace: 0
+URxvt.geometry: 80x24
+URxvt.internalBorde: 4
+URxvt.cursorBlink: true
+URxvt.cursorUnderline: false
+URxvt.saveline: 8192
+URxvt.scrollBar: false
+URxvt.urgentOnBell: true
+URxvt.depth: 32
+URxvt.iso14755: false
+
+urxvt.perl-ext-common: default,-searchable-scrollback
+URxvt.copyCommand: xclip -i -selection clipboard
+URxvt.pasteCommand: xclip -o -selection clipboard
+
+URxvt.keysym.Shift-Control-V: eval:paste_clipboard
+URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
+URxvt.keysym.Control-Meta-C: builtin-string:
+URxvt.keysym.Control-Meta-V: builtin-string:
+URxvt.keysym.Meta-S: builtin-string:

+ 29 - 0
.config/emacs/.gitignore

@@ -0,0 +1,29 @@
+.cache/
+.dap-breakpoints
+.lsp-session-v1
+auto-save-list/
+desktop/
+eclipse.jdt.ls
+eln-cache/
+elpa/
+eshell/
+geben/
+history
+projectile-bookmarks.eld
+recentf
+request/
+straight/
+tmp/
+tramp/
+transient/
+url/
+var/
+vimish-fold/
+workspace/
+.extension/
+.mc-lists.el
+bookmarks
+projectile.cache
+projects
+tabsession.el
+tramp

+ 1 - 0
.config/emacs/gitrepos/emacs-reformatter

@@ -0,0 +1 @@
+Subproject commit a0d4ce721942c801e39e8620d92f2d537778d460

+ 1 - 0
.config/emacs/gitrepos/fasm-mode

@@ -0,0 +1 @@
+Subproject commit cb4b9bf48c7f05530e140456eb1f4a54716470f9

+ 1 - 0
.config/emacs/gitrepos/go-mode.el

@@ -0,0 +1 @@
+Subproject commit 6f4ff9ef874d151ed8d297a80f1bf27db5d9dbf0

+ 1 - 0
.config/emacs/gitrepos/zig-mode

@@ -0,0 +1 @@
+Subproject commit b4170b747ae4c45d145ff8bcb7fafe095e17b4c6

+ 38 - 0
.config/emacs/init.el

@@ -0,0 +1,38 @@
+;;; init.el --- Personal configuration file -*- lexical-binding: t -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This is the main that will pull all other files.
+
+;;; Code:
+
+(defgroup kkk-emacs nil
+  "Main Group for my config."
+  :group 'file)
+
+(defconst kkk-lisp-dir
+  (locate-user-emacs-file "kkk-lisp")
+  "Location of my LISP files.")
+
+(add-to-list 'load-path kkk-lisp-dir)
+
+(require 'kkk-initial)
+
+(provide 'init)

+ 51 - 0
.config/emacs/kkk-lisp/kkk-abbrev.el

@@ -0,0 +1,51 @@
+;;; kkk-abbrev.el -*-                                -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+;; (abbrev-table-put global-abbrev-table
+;; 		  :regexp "\\(?:^\\|[\t\s]+\\)\\(?1:[:_].*\\)")
+
+;; (defun kkk-abbrev--setup-python ()
+;;   (let ((_tbl python-mode-abbrev-table))
+;;     (abbrev-table-put _tbl
+;; 		      :regexp "\\(?:^\\|[\t\s]+\\)\\(?1:[:_].*\\)")
+;;     (dolist (_item '(("_fordict" . "for k, v in")
+;; 		     ("o" . "")
+;; 		     ) )
+;;       (define-abbrev _tbl (car _item) (cdr _item))
+;;       )
+;;     )
+
+;;   (abbre-mode 1)
+;;   (remove-hook 'python-mode-hook #'kkk-abbrev--setup-python)
+;;   )
+
+;; (add-hook 'python-mode-hook #'kkk-abbrev--setup-python)
+(add-hook 'prog-mode-hook #'abbrev-mode)
+(add-hook 'text-mode-hook #'abbrev-mode)
+(add-hook 'conf-mode-hook #'abbrev-mode)
+
+
+(provide 'kkk-abbrev)
+;;; kkk-abbrev.el ends here

+ 42 - 0
.config/emacs/kkk-lisp/kkk-eshell.el

@@ -0,0 +1,42 @@
+;;; kkk-eshell.el --- Eshell Config                  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Eshell Config
+
+;;; Code:
+
+(defvar eshell-ls-initial-args '("-lahg" "--group-directories-first"
+				 "--color=no"))
+
+(defvar kkk-eshell--ls-highlights
+      '(("^drwx.* \\(.*\\)" . (1 'font-lock-string-face))
+	("^lrwxrwxrwx\\( *.*? \\)\\{6\\}\\(.*?\\) " . (2 'font-lock-constant-face))
+	("^.rwxrwxrwx\\( *.*? \\)\\{6\\}\\(.*\\)" . (2 'font-lock-type-face)))
+      )
+
+(defun kkk-eshell--set-font-lock-default ()
+  "Set `font-lock-defaults' to `kkk-eshell--ls-highlights'."
+  (setq font-lock-defaults kkk-eshell--ls-highlights))
+
+(add-hook 'eshell-mode-hook #'kkk-eshell--set-font-lock-default)
+
+(provide 'kkk-eshell)
+;;; kkk-eshell.el ends here

+ 100 - 0
.config/emacs/kkk-lisp/kkk-evil.el

@@ -0,0 +1,100 @@
+;; kkk-evil.el --- Evil config                      -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Evil Config
+
+;;; Code:
+
+(defun kkk-evil--yank-pop ()
+  "A wrapper on `yank-pop' because evil fucks with it."
+  (interactive)
+  (yank-pop))
+
+(use-package evil
+  :demand t
+  :functions (evil-mode evil-set-initial-state evil-define-key
+	      evil-beginning-of-line evil-end-of-line evil-normal-state)
+  :defines (evil-want-integration evil-want-keybinding evil-want-Y-yank-to-eol
+	    evil-want-C-d-scroll evil-move-beyond-eol evil-split-window-below
+	    evil-vsplit-window-below evil-want-fine-undo evil-want-C-i-jump
+	    evil-emacs-state-modes)
+  :init
+  (setq evil-want-integration t
+	evil-want-Y-yank-to-eol t
+	evil-want-keybinding nil)
+  (evil-mode t)
+  :config
+  (dolist (mode '(custom-mode eshell-mode vterm-mode dired-mode
+		  notmuch-search-mode notmuch-hello-mode xref--xref-buffer-mode
+		  notmuch-show-mode term-mode Info-mode))
+    (add-to-list 'evil-emacs-state-modes mode))
+
+  (setq evil-move-beyond-eol t
+	evil-want-fine-undo t)
+
+  (evil-set-initial-state 'messages-buffer-mode 'normal)
+  (evil-set-initial-state 'dashboard-mode 'normal)
+
+  (evil-define-key '(normal insert visual)
+    'global (kbd "C-a") #'evil-beginning-of-line)
+  (evil-define-key '(normal insert visual)
+    'global (kbd "C-e") #'evil-end-of-line)
+
+  (evil-define-key 'insert 'global (kbd "C-g") #'evil-normal-state)
+
+  (evil-define-key '(emacs normal insert visual)
+    'global (kbd "C-w") #'kill-region)
+  (evil-define-key '(emacs normal insert visual)
+    'global (kbd "C-y") #'yank)
+  (evil-define-key '(emacs normal insert visual)
+    'global (kbd "M-y") #'kkk-evil--yank-pop)
+  )
+
+(use-package evil-surround
+  :defer 5
+  :after (evil)
+  :functions (global-evil-surround-mode)
+  :init (global-evil-surround-mode t))
+
+(use-package evil-numbers
+  :defer 6
+  :after evil
+  :functions (evil-numbers/inc-at-pt evil-numbers/dec-at-pt
+	      evil-numbers/inc-at-pt-incremental
+	      evil-numbers/dec-at-pt-incremental)
+  :config
+  (let ((modes '(normal visual)))
+    (evil-define-key modes 'global (kbd "C-c +") #'evil-numbers/inc-at-pt)
+    (evil-define-key modes 'global (kbd "C-c -") #'evil-numbers/dec-at-pt))
+
+  (evil-define-key
+    'visual 'global (kbd "g C-a") #'evil-numbers/inc-at-pt-incremental)
+  (evil-define-key
+    'visual 'global (kbd "g C-x") #'evil-numbers/dec-at-pt-incremental))
+
+(use-package evil-exchange
+  :defer 7
+  :after (evil)
+  :functions (evil-exchange-cx-install)
+  :init (evil-exchange-cx-install))
+
+(provide 'kkk-evil)
+;;; kkk-evil.el ends here

+ 66 - 0
.config/emacs/kkk-lisp/kkk-exwm.el

@@ -0,0 +1,66 @@
+;;; kkk-exwm.el --- Exwm Config                      -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Exwm Configs
+
+;;; Code:
+
+(when (string-empty-p (shell-command-to-string "pgrep i3"))
+  (defun kkk-exwm-run-shell-async (CMD)
+    "Run CMD with `start-process-shell-command'."
+    (interactive (list (read-shell-command "$ ")))
+    (start-process-shell-command CMD nil CMD))
+
+  (defun kkk-exwm-update-class ()
+    "Change th buffer name to the name of app."
+    (exwm-workspace-rename-buffer exwm-class-name))
+
+  (use-package exwm
+    :functions (exwm-enable exwm-workspace-rename-buffer)
+    :defines (exwm-workspace-number exwm-input-prefix-keys exwm-mode-map
+              exwm-class-name)
+    :config
+    (add-hook 'exwm-update-class-hook #'kkk-exwm-update-class)
+
+    (setq exwm-workspace-number 10)
+
+    ;; These keys should always pass through to Emacs
+    (setq exwm-input-prefix-keys
+          '(?\C-x
+            ?\C-h
+            ?\M-x
+            ?\M-`
+            ?\M-&
+            ?\M-:
+            ?\C-\M-j  ;; Buffer list
+            ))
+
+    (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
+
+    (exwm-enable))
+
+  (use-package exwm-edit
+    :after (exwm))
+  )
+
+
+(provide 'kkk-exwm)
+;;; kkk-exwm.el ends here

+ 75 - 0
.config/emacs/kkk-lisp/kkk-font.el

@@ -0,0 +1,75 @@
+;;; kkk-font.el --- Setting Fonts                    -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Setting My Fonts Config
+
+;;; Code:
+
+(defconst kkk-font-default-font
+  "Fantasque Sans Mono"
+  "Default Font.")
+
+(defconst kkk-font-default-font-size
+  100
+  "Default Font.")
+
+(defconst kkk-font-fixed-font
+  "Fantasque Sans Mono"
+  "Monospaced Font.")
+
+(defconst kkk-font-fixed-font-size
+  100
+  "Monospaced Font.")
+
+(defconst kkk-font-variable-font
+  "Cantarell"
+  "Variable spaced Font.")
+
+(defconst kkk-font-variable-font-size
+  100
+  "Variable spaced Font Size.")
+
+(defun kkk-font-set ()
+  "Set my prefered fonts."
+  (interactive)
+  ;; Set default Font
+  (set-face-attribute 'default nil
+                      :font kkk-font-default-font
+                      :height kkk-font-default-font-size)
+  ;; (set-face-attribute 'default nil :font "Fira Code" :height 150)
+
+  ;; Set monospaced Font
+  (set-face-attribute 'fixed-pitch nil
+                      :font kkk-font-fixed-font
+                      :height kkk-font-fixed-font-size)
+  ;; (set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 120)
+
+  ;; Set variable Font
+  (set-face-attribute 'variable-pitch nil
+                      :font kkk-font-variable-font
+                      :weight 'bold
+                      :height kkk-font-variable-font-size)
+
+  (set-face-attribute 'mode-line nil :height 80)
+  (set-face-attribute 'mode-line-inactive nil :height 60 :slant 'oblique))
+
+(provide 'kkk-font)
+;;; kkk-font.el ends here

+ 233 - 0
.config/emacs/kkk-lisp/kkk-generate.el

@@ -0,0 +1,233 @@
+;;; kkk-generate.el --- Generate Function            -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Function to generate things
+
+;;; Code:
+
+(defgroup kkk-generate nil
+  "Group of generate function."
+  :group 'files)
+
+(defun kkk-generate-java-getter nil
+  "Generate Getters from attribute definition.
+
+It will parse until it finds an empty line."
+  (interactive)
+    (while (not (string-empty-p (thing-at-point 'line 't)))
+      (let* ((parsed_line (cdr (split-string (thing-at-point 'line 't))))
+             (type (pop parsed_line))
+             (name (car (split-string (pop parsed_line) ";") ))
+             (beg (point)))
+        (progn
+          (kill-whole-line 0)
+          (insert "public " type " get" (upcase-initials name) "() {\n"
+                  "return this." name ";\n"
+                  "}\n")
+          (indent-region beg (point))
+          (line-move 1)))))
+
+(defun kkk-generate-java-setter nil
+  "Generate Setters from attribute definition.
+
+It will parse until it finds an empty line."
+  (interactive)
+    (while (not (string-empty-p (thing-at-point 'line 't)))
+      (let* ((parsed_line (cdr (split-string (thing-at-point 'line 't))))
+             (type (pop parsed_line))
+             (name (car (split-string (pop parsed_line) ";") ))
+             (beg (point)))
+        (progn
+          (kill-whole-line 0)
+          (insert "public void set" (upcase-initials name) "(" type " " name ") {\n"
+                  "this." name " = " name ";\n"
+                  "}\n")
+          (indent-region beg (point))
+          (line-move 1)))))
+
+(defun list-get-odd (LIST)
+  "Return all the odd index items from LIST."
+  (if (listp LIST)
+      (let ((ret '()))
+        (while (not (null LIST))
+          (push 'ret (car LIST))
+          (setq LIST (cddr LIST))
+          )
+        ret)))
+
+(defun list-get-even (LIST)
+  "Return all the even index items from LIST."
+  (if (listp LIST)
+      (list-get-odd (cdr LIST))))
+
+(defun list-str-rm-last-chr (LIST)
+  "LIST is a list."
+  (let ((ret '()))
+    (while (not (null LIST))
+      (push 'ret (substring (car LIST) 0 -1))
+      (setq LIST (cdr LIST)))
+    ret))
+
+(defun kkk-generate-java-constructor (BEG END)
+  "Generate Constructor from attribute definition.
+
+BEG is the beginning of the region.
+END is the end of the region.
+
+It will parse until it finds an empty line."
+  (interactive "r")
+  (let* ((tmp_args  (split-string (buffer-substring-no-properties BEG END)))
+         (args (remove "protected" (remove "public" (remove "private" tmp_args))))
+         (types (list-get-odd args))
+         (names (list-str-rm-last-chr (list-get-even args))))
+    (if (= (cl-list-length types) (cl-list-length names))
+        (progn
+          (kill-region BEG END)
+          (insert "public TMP(")
+          (let ((i 0) (limit (cl-list-length types)))
+            (while (< i limit)
+              (if (= i (1- limit))
+                  (insert (format "%s %s" (nth i types) (nth i names)))
+                (insert (format "%s %s, " (nth i types) (nth i names))))
+              (setq i (1+ i))))
+          (insert ") {\n")
+          (let ((i 0) (limit (cl-list-length types)))
+            (while (< i limit)
+              (insert (format "this.%s = %s;\n" (nth i names) (nth i names)))
+              (setq i (1+ i))))
+          (insert "}\n"))))
+  (indent-region BEG (point)))
+
+(defun kkk-generate-java-mode-keys ()
+  "Define my keybinds on java mode."
+  (define-key java-mode-map (kbd "C-c g g") 'java-generate-getter)
+  (define-key java-mode-map (kbd "C-c g s") 'java-generate-setter)
+  (define-key java-mode-map (kbd "C-c g c") 'java-generate-constructor))
+
+;; (add-hook 'java-mode-hook #'define-my-java-mode-keys)
+
+(defun kkk-generate-cpp-getter-definition ()
+  "Generate Getters Definition from attribute definition.
+
+It will parse until it finds an empty line."
+  (interactive)
+  (while (not (string= "\n" (thing-at-point 'line 't)))
+    (let* ((parsed_line (split-string
+                         (string-replace ";" "" (thing-at-point 'line 't))))
+           (type (car parsed_line))
+           (name (string-remove-prefix "m_" (cadr parsed_line)))
+           (beg (point)))
+      (progn
+        (kill-whole-line 0)
+        (insert type " get" (upcase-initials name) "();")
+        (indent-region beg (point))
+        (line-move 1)))))
+
+(defun kkk-generate-cpp-setter-definition ()
+  "Generate Getters Definition from attribute definition.
+
+It will parse until it finds an empty line."
+  (interactive)
+  (while (not (string= "\n" (thing-at-point 'line 't)))
+    (let* ((parsed_line (split-string
+                         (string-replace ";" "" (thing-at-point 'line 't))))
+           (type (car parsed_line))
+           (name (string-remove-prefix "m_" (cadr parsed_line)))
+           (beg (point)))
+      (progn
+        (kill-whole-line 0)
+        (insert "void set" (upcase-initials name) "(" type " " name ");")
+        (indent-region beg (point))
+        (line-move 1)))))
+
+(defun kkk-generate-cpp-getter-implementation ()
+  "Generate Getters Definition from attribute definition.
+
+class type name;
+
+It will parse until it finds an empty line."
+  (interactive)
+  (while (not (string= "\n" (thing-at-point 'line 't)))
+    (let* ((parsed_line (split-string
+                         (string-replace ";" "" (thing-at-point 'line 't))))
+           (class (car parsed_line))
+           (type (cadr parsed_line))
+           (name (string-remove-prefix "m_" (caddr parsed_line)))
+           (beg (point)))
+      (progn
+        (kill-whole-line 0)
+        (insert type " " class "::get" (upcase-initials name)
+                "() {\nreturn this->m_" name ";\n}")
+        (indent-region beg (point))
+        (line-move 1)))))
+
+(defun kkk-generate-cpp-setter-implementation ()
+  "Generate Getters Definition from attribute definition.
+
+class type name;
+
+It will parse until it finds an empty line."
+  (interactive)
+  (while (not (string= "\n" (thing-at-point 'line 't)))
+    (let* ((parsed_line (split-string
+                         (string-replace ";" "" (thing-at-point 'line 't))))
+           (class (car parsed_line))
+           (type (cadr parsed_line))
+           (name (string-remove-prefix "m_" (caddr parsed_line)))
+           (beg (point)))
+      (progn
+        (kill-whole-line 0)
+        (insert "void " class "::set" (upcase-initials name)
+                "(" type " " name ") {\nthis->m_" name " = " name ";\n}")
+        (indent-region beg (point))
+        (line-move 1)))))
+
+(defun kkk-generate-cpp-contructor-definition ()
+  "Generate Constructor from attribute definition.
+
+TODO: IMPLEMENT;"
+  (interactive) (message "TODO: IMPLEMENT"))
+
+(defun kkk-generate-cpp-contructor-implementation ()
+  "Generate Constructor from attribute definition.
+
+TODO: IMPLEMENT;"
+  (interactive) (message "TODO: IMPLEMENT"))
+
+(defun kkk-generate-cpp-mode-keys ()
+  "Define my keybinds on c++ mode"
+  (define-key c++-mode-map (kbd "C-c g i g")
+	      #'kkk-generate-cpp-getter-implementation)
+  (define-key c++-mode-map (kbd "C-c g i s")
+	      #'kkk-generate-cpp-setter-implementation)
+  (define-key c++-mode-map (kbd "C-c g i c")
+	      #'kkk-generate-cpp-contrutor-implementation)
+  (define-key c++-mode-map (kbd "C-c g d g")
+	      #'kkk-generate-cpp-getter-definition)
+  (define-key c++-mode-map (kbd "C-c g d s")
+	      #'kkk-generate-cpp-setter-definition)
+  (define-key c++-mode-map (kbd "C-c g i c")
+	      #'kkk-generate-cpp-contrutor-definition))
+
+;; (add-hook 'c++-mode-hook #'kkk/keybinds/cpp/generators)
+
+(provide 'kkk-generate)
+;;; kkk-generate.el ends here

+ 355 - 0
.config/emacs/kkk-lisp/kkk-initial.el

@@ -0,0 +1,355 @@
+;;; kkk-initial.el --- Initial config of Emacs       -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This will set the basic config of Emacs
+
+;;; Code:
+(defgroup kkk-initial nil
+  "Initial Tweaks to Emacs."
+  :group 'kkk-emacs)
+
+(defun kkk--display-startup-time()
+  "Display the time it took for Emacs to start."
+  (message "Emacs loaded in %s with %d garbage collection."
+	   (format "%.2f seconds"
+		   (float-time
+		    (time-subtract after-init-time before-init-time)))
+	   gcs-done))
+
+(add-hook 'emacs-startup-hook #'kkk--display-startup-time)
+
+;; This is the default
+;; (setq-default indent-tabs-mode t)	; Use Tabs as indentation
+;; (setq-default tab-width 8)		; Setting the size of Tabs
+
+(setq inhibit-startup-message t)	; Disable Startup Message
+(setq visible-bell t)			; Use Visible Bell instead of Audible
+(setq use-dialog-box nil)		; Don't use gtk dialog box
+
+(menu-bar-mode -1)			; Disable Menu Bar
+
+;; Disable various things if is in an Graphical Environment
+(when (display-graphic-p)
+  (scroll-bar-mode -1)			; Removing scrollbar
+  (tool-bar-mode -1)
+  (tooltip-mode -1)
+  (set-fringe-mode 10)			; Sets the fringe size to 10px
+  )
+
+(global-display-fill-column-indicator-mode 't)
+(setq-default fill-column 80)
+
+;; Auto Revert Mode:
+(require 'autorevert)
+(global-auto-revert-mode t)
+(setq global-auto-revert-non-file-buffers 't)
+
+;; Numbered Lines:
+(require 'kkk-linenumbers)
+(setq kkk-linenumbers-global-modes '(not
+				     term-mode eshell-mode vterm-mode
+				     magit-status-mode magit-revision-mode
+				     magit-diff-mode magit-log-mode
+				     magit-blob-mode magit-refs-mode
+				     magit-blame-mode eww-mode
+				     help-mode helpful-mode))
+(setq kkk-linenumbers-type 'visual)
+(global-kkk-linenumbers-mode t)
+
+;; Whitespace Mode:
+(require 'kkk-whitespace)
+(setq kkk-whitespace-global-modes '(not
+				    term-mode shell-mode eshell-mode vterm-mode
+				    magit-status-mode magit-revision-mode
+				    magit-diff-mode magit-log-mode
+				    magit-blob-mode magit-refs-mode
+				    magit-log-select-mode Man-mode
+				    magit-blame-mode eww-mode Custom-Mode
+				    help-mode helpful-mode Buffer-menu-mode
+				    compilation-mode vc-mode vc-dir-mode
+				    notmuch-search-mode notmuch-hello-mode
+				    notmuch-show-mode gud-mode grep-mode
+				    flycheck-error-list-mode dired-mode
+				    xref--xref-buffer-mode))
+(setq whitespace-style '(face tabs spaces trailing lines-tail space-before-tab
+			      newline indentation empty space-after-tab
+			      space-mark tab-mark newline-mark
+			      missing-newline-at-eof))
+
+;;; To be only ascii
+;; (setq whitespace-display-mappings
+;;       '((space-mark ?\s [?.] [183]) (space-mark 160 [164] [95])
+;;	(newline-mark ?\n [?$ ?\n]) (tab-mark ?\t [?> ?\t])))
+
+(global-kkk-whitespace-mode t)
+
+(setq tab-bar-close-button nil)
+(setq tab-bar-new-button-show nil)
+
+;; (setq max-lisp-eval-depth (* 1024 8))	; Increase the eval depth
+
+(electric-pair-mode t)
+
+(show-paren-mode t)
+(setq show-paren-style 'mixed)
+
+(column-number-mode t)
+
+(display-battery-mode t)
+(savehist-mode t)
+
+(add-hook 'find-file-hook #'auto-insert)
+
+(add-hook 'prog-mode #'glasses-mode)
+
+(setq auth-source-save-behavior nil)
+
+(when (display-graphic-p)
+  (require 'kkk-font)
+  ;; (setq kkk-font-default-font "Comic Mono")
+  (setq kkk-font-default-font "Unifont")
+  (setq kkk-font-fixed-font "Unifont")
+  (setq kkk-font-variable-font "Unifont")
+  (when (string= (system-name) "i7.dp.lat")
+    (setq kkk-font-default-font-size 105))
+  (add-hook 'emacs-startup-hook       #'kkk-font-set)
+  (add-hook 'ef-themes-post-load-hook #'kkk-font-set)
+  )
+
+(load-theme 'modus-vivendi)
+
+(require 'kkk-eshell)
+(require 'kkk-keepclean)
+;; (require 'kkk-package)
+;; (require 'kkk-exwm)
+;; (require 'kkk-killbuffer)
+(require 'kkk-windowsize)
+(require 'kkk-abbrev)
+
+;; Setting up to use tree-sitter by default. Stolen from:
+;;   https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
+;; (setq major-mode-remap-alist
+;;  '((yaml-mode . yaml-ts-mode)
+;;    (bash-mode . bash-ts-mode)
+;;    (js2-mode . js-ts-mode)
+;;    (typescript-mode . typescript-ts-mode)
+;;    (json-mode . json-ts-mode)
+;;    (css-mode . css-ts-mode)
+;;   (python-mode . python-ts-mode)))
+
+(require 'kkk-scratch)
+(global-unset-key (kbd "C-x s"))
+(global-set-key (kbd "C-x s b")   #'kkk-scratch-buffer-dwim)
+(global-set-key (kbd "C-x s x v") #'kkk-scratch-vterm-dwim)
+(global-set-key (kbd "C-x s x e") #'kkk-scratch-eshell-dwim)
+
+(global-set-key (kbd "<escape>") #'keyboard-escape-quit)
+
+(global-set-key (kbd "C-x m") #'man)
+
+(global-set-key (kbd "M-p") #'isearch-ring-retreat)
+(global-set-key (kbd "M-n") #'isearch-ring-advance)
+
+(global-set-key (kbd "C-t") #'transpose-chars)
+
+(defun kkk--pre-angle-brackets (base extra-string)
+  "Generate an uniquify name.  <EXTRA-STRING> BASE."
+  (setq tmp extra-string)
+  (concat "<" (mapconcat #'identity extra-string "/") ">" base))
+
+(setq uniquify-buffer-name-style #'kkk--pre-angle-brackets)
+
+(setq reb-re-syntax 'rx)
+
+;; (defconst kkk-gomode-dir
+;;   (locate-user-emacs-file "gitrepos/go-mode.el")
+;;   ".")
+;; (add-to-list 'load-path kkk-gomode-dir)
+;; (autoload 'go-mode "go-mode" nil t)
+;; (add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
+
+;; (defconst kkk-reformatter-dir
+;;   (locate-user-emacs-file "gitrepos/emacs-reformatter")
+;;   ".")
+;; (add-to-list 'load-path kkk-reformatter-dir)
+;; (require 'reformatter)
+
+;; (defconst kkk-zigmode-dir
+;;   (locate-user-emacs-file "gitrepos/zig-mode")
+;;   ".")
+;; (add-to-list 'load-path kkk-zigmode-dir)
+;; (autoload 'zig-mode "zig-mode" nil t)
+;; (add-to-list 'auto-mode-alist '("\\.zig\\'" . zig-mode))
+
+;; (defconst kkk-fasmmode-dir
+;;   (locate-user-emacs-file "gitrepos/fasm-mode")
+;;   ".")
+;; (add-to-list 'load-path kkk-fasmmode-dir)
+;; (autoload 'fasm-mode "fasm-mode" nil t)
+
+(require 'package)
+(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
+
+(setq package-selected-packages '(helpful ##))
+
+(global-set-key (kbd "C-h f") #'helpful-callable)
+(global-set-key (kbd "C-h v") #'helpful-variable)
+(global-set-key (kbd "C-h k") #'helpful-key)
+(global-set-key (kbd "C-h x") #'helpful-command)
+
+(fido-mode 1)
+
+(require 'ispell)
+(setq ispell-program-name "aspell")
+
+(require 'flyspell)
+(setq flyspell-issue-message-flag nil)
+
+(global-set-key (kbd "M-o") #'complete-tag)
+;;(global-set-key (kbd "M-/") #'hippie-expand)
+(global-set-key (kbd "M-/") #'dabbrev-expand)
+(global-set-key (kbd "C-j") #'join-line)
+(global-set-key (kbd "C-%") #'xref-find-references-and-replace)
+
+(setq c-default-style
+      '((java-mode . "java") (awk-mode . "awk") (other . "linux")))
+
+(global-subword-mode +1)
+
+;; (hs-minor-mode +1)
+
+(defun narrow-clone(&optional DISPLAY-FLAG)
+  (interactive)
+  (let ((name "Unknown")
+	(line_str (thing-at-point 'line))
+	(call_start (point))
+	(start (point-min))
+	(end (point-max))
+	(new_buf nil))
+    (save-excursion
+      ;; DoWhile
+      (while
+	  (progn
+	    (forward-line -1)
+	    (setq line_str (thing-at-point 'line))
+
+	    (and (not (string-prefix-p "//== " line_str))
+		 (/= (point-min) (point)))
+	    )
+	)
+      (forward-line 1)
+      (setq start (point))
+      )
+
+    (when (string-prefix-p "//== " line_str)
+      (setq name (string-trim (cadr (string-split line_str " "))))
+      )
+
+    (save-excursion
+      (forward-line 1)
+      (setq line_str (thing-at-point 'line))
+      (while (and (not (string-prefix-p "//== " line_str))
+		  (/= (point-max) (point)))
+	(forward-line 1)
+	(setq line_str (thing-at-point 'line))
+	)
+      (setq end (point))
+      )
+
+    (setq new_buf (clone-indirect-buffer name nil))
+    (save-excursion
+      (set-buffer new_buf)
+      (narrow-to-region start end)
+     )
+    (when (not DISPLAY-FLAG)
+      (switch-to-buffer new_buf))
+    end
+    )
+  )
+
+(defun narrow-clone-buffer()
+  (interactive)
+  (goto-char (point-min))
+  (let ((end (narrow-clone t)))
+    (while (/= (point-max) end)
+      (forward-line 1)
+      (setq end (narrow-clone t))
+      )
+    )
+  )
+
+;; Stolen from (http://endlessparentheses.com/ansi-colors-in-the-compilation-buffer-output.html)
+(require 'ansi-color)
+(defun endless/colorize-compilation ()
+  "Colorize from `compilation-filter-start' to `point'."
+  (let ((inhibit-read-only t))
+    (ansi-color-apply-on-region
+     compilation-filter-start (point))))
+
+(add-hook 'compilation-filter-hook
+          #'endless/colorize-compilation)
+
+;; Stolen from (https://oleksandrmanzyuk.wordpress.com/2011/11/05/better-emacs-shell-part-i/)
+(defun regexp-alternatives (regexps)
+  "Return the alternation of a list of regexps."
+  (mapconcat (lambda (regexp)
+               (concat "\\(?:" regexp "\\)"))
+             regexps "\\|"))
+
+(defvar non-sgr-control-sequence-regexp nil
+  "Regexp that matches non-SGR control sequences.")
+
+(setq non-sgr-control-sequence-regexp
+      (regexp-alternatives
+       '(;; icon name escape sequences
+         "\033\\][0-2];.*?\007"
+         ;; non-SGR CSI escape sequences
+         "\033\\[\\??[0-9;]*[^0-9;m]"
+         ;; noop
+         "\012\033\\[2K\033\\[1F"
+         )))
+
+(defun filter-non-sgr-control-sequences-in-region (begin end)
+  (save-excursion
+    (goto-char begin)
+    (while (re-search-forward
+            non-sgr-control-sequence-regexp end t)
+      (replace-match ""))))
+
+(defun filter-non-sgr-control-sequences-in-output (ignored)
+  (let ((start-marker
+         (or comint-last-output-start
+             (point-min-marker)))
+        (end-marker
+         (process-mark
+          (get-buffer-process (current-buffer)))))
+    (filter-non-sgr-control-sequences-in-region
+     start-marker
+     end-marker)))
+
+(add-hook 'comint-output-filter-functions
+          'filter-non-sgr-control-sequences-in-output)
+
+
+(require 'hare-mode)
+
+(provide 'kkk-initial)
+;;; kkk-initial.el ends here

+ 40 - 0
.config/emacs/kkk-lisp/kkk-keepclean.el

@@ -0,0 +1,40 @@
+;;; kkk-keepclean.el --- Keep my dirs clean          -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This is some code that will keep my directories clean.
+
+;;; Code:
+
+;; Moving backup files(files ending with ~) to tmp/backup on emacs home
+(setq backup-directory-alist
+      `(("." . ,(expand-file-name "tmp/backup" user-emacs-directory))))
+
+;; Moving auto saves(files surounded by #) to tmp/auto-saves on emacs home
+(make-directory (expand-file-name "tmp/auto-saves/" user-emacs-directory) t)
+
+(setq auto-save-list-file-prefix
+      (expand-file-name "tmp/auto-saves/sessions/" user-emacs-directory))
+
+(setq auto-save-file-name-transforms
+      `((".*" ,(expand-file-name "tmp/auto-saves/" user-emacs-directory) t)))
+
+(provide 'kkk-keepclean)
+;;; kkk-keepclean.el ends here

+ 35 - 0
.config/emacs/kkk-lisp/kkk-killbuffer.el

@@ -0,0 +1,35 @@
+;;; kkk-killbuffer.el --- Kill Buffers               -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Kill Buffer functions
+
+;;; Code:
+
+(defun kkk-killbuffer-str (STRING)
+  "Kill all buffers containing STRING."
+  (interactive "sBuffer name to be Killed: ")
+  (let ((buffers (buffer-list)))
+    (dolist (buffer buffers)
+      (when (string-search STRING (buffer-name buffer))
+        (kill-buffer-ask buffer)))))
+
+(provide 'kkk-killbuffer)
+;;; kkk-killbuffer.el ends here

+ 58 - 0
.config/emacs/kkk-lisp/kkk-linenumbers.el

@@ -0,0 +1,58 @@
+;;; kkk-linenumbers.el --- Line Numbers              -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Custom global display line number
+
+;;; Code:
+(require 'display-line-numbers)
+
+(defgroup kkk-linenumbers nil
+  "Custom config for line numbers."
+  :group 'info)
+
+(defcustom kkk-linenumbers-global-modes t
+  "This is a copy of `company-global-modes` for `whitespace-mode`."
+  :type '(choice (const :tag "none" nil)
+		 (const :tag "all" t)
+		 (set :menu-tag "mode specific" :tag "modes"
+		      :value (not)
+		      (const :tag "Except" not)
+		      (repeat :inline t (symbol :tag "mode"))))
+  :group 'kkk-linenumbers)
+
+(defun kkk-linenumbers-mode--turn-on ()
+  "Turn on `display-line-numbers-mode'."
+  (when (and (not (or noninteractive (eq (aref (buffer-name) 0) ?\s)))
+	     (cond ((eq kkk-linenumbers-global-modes t) t)
+		   ((eq (car-safe kkk-linenumbers-global-modes) 'not)
+		    (not (memq major-mode kkk-linenumbers-global-modes)))
+		   (t (memq major-mode kkk-linenumbers-global-modes))))
+    (display-line-numbers-mode t)))
+
+(defvaralias 'kkk-linenumbers-type 'display-line-numbers-type)
+
+(define-globalized-minor-mode
+  global-kkk-linenumbers-mode
+  display-line-numbers-mode
+  kkk-linenumbers-mode--turn-on)
+
+(provide 'kkk-linenumbers)
+;;; kkk-linenumbers.el ends here

+ 56 - 0
.config/emacs/kkk-lisp/kkk-modes.el

@@ -0,0 +1,56 @@
+;;; kkk-modes.el --- Config for various modes        -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Configure various modes
+
+;;; Code:
+
+(defgroup kkk-modes nil
+  "A group for all my modes."
+  :group 'kkk-package)
+
+(use-package json-mode
+  :mode "\\.json\\'")
+
+(use-package fasm-mode
+  :mode ("\\.fasm\\'"))
+
+;; Maybe not pull if not needed
+(use-package lua-mode
+  :mode "\\.lua\\'")
+
+(use-package php-mode
+  :mode "\\.php\\'")
+
+(use-package web-mode
+  :mode ("\\.handlebars\\'"))
+
+(use-package yaml-mode
+  :mode ("\\.yaml\\'" "\\.yml\\'"))
+
+;; Git-Mode
+(use-package git-modes)
+
+;; Gitolite Conf Mode
+(use-package gl-conf-mode)
+
+(provide 'kkk-modes)
+;;; kkk-modes.el ends here

+ 166 - 0
.config/emacs/kkk-lisp/kkk-org.el

@@ -0,0 +1,166 @@
+;;; kkk-org.el --- Org Mode Configuration            -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Org Config
+
+;;; Code:
+
+(require 'kkk-utils)
+
+(defvar kkk-org--capture-folder "~/Sync/Documents/Emacs/Captures/")
+(defvar kkk-org--agenda-folder "~/Sync/Documents/Emacs/Agenda/")
+
+(kkk-utils-mkdir kkk-org--capture-folder)
+(kkk-utils-mkdir kkk-org--agenda-folder)
+
+(defun kkk-org--capture-folder+file (FILE)
+  "Will concat `kkk-org--capture-folder' with FILE."
+  (concat kkk-org--capture-folder FILE))
+
+(defun kkk-org--agenda-folder+file (FILE)
+  "Will concat `kkk-org--agenda-folder' with FILE."
+  (concat kkk-org--agenda-folder FILE))
+
+(defconst kkk-org--capture-work-task-template
+  "** %^{Task Number} :task:
+:PROPERTIES:
+:DATE_CREATE: %^U
+:DESC: %^{Enter the Description}
+:SECS: 0
+:MERGED: N
+:END:
+
+*** COMMENT Links
+**** Task
+**** PR
+***** QA
+****** Description
+#+begin_src markdown
+#+end_src
+***** PROD
+****** Description
+#+begin_src markdown
+#+end_src
+
+%i
+%?")
+
+
+(use-package org-agenda
+  :straight nil
+  :bind (("C-c a" . org-agenda))
+  :config
+  (setq org-agenda-span 'day
+	org-agenda-start-with-log-mode t)
+  (setq org-agenda-files (list (kkk-org--agenda-folder+file "Agenda.org")))
+  )
+
+(defun kkk-org--make-work-capture-template (keys what)
+  "KEYS WHAT."
+  (list keys what 'entry
+	(list 'file+headline "~/Sync/Work/BRANCHES.org" what)
+	kkk-org--capture-work-task-template))
+
+(defun kkk-org--make-work-templates (prefix list)
+  "PREFIX LIST."
+  (unless (symbolp list)
+    (error "LIST *MUST* be a SYMBOL"))
+  (unless (stringp prefix)
+    (error "PREFIX *MUST* be a STRING"))
+
+  (let ((s_ (shell-command-to-string
+	     "grep '^* ' ~/Sync/Work/BRANCHES.org | tr -d '* '")))
+    (let* ((i_ 0)
+	   (t_ (string-lines s_))
+	   (l_ (length t_)))
+      (while (< i_ l_)
+	(let ((it_ (nth i_ t_)))
+	  (unless (string-empty-p it_)
+	    (add-to-list list (kkk-org--make-work-capture-template
+			       (concat prefix (int-to-string i_)) it_)
+			 t)
+	    )
+	  )
+	(setq i_ (1+ i_))
+	)
+      )
+    )
+  )
+
+(use-package org-capture
+  :straight nil
+  :bind (("C-c c" . org-capture))
+  :init
+  (setq org-capture-templates
+	(list
+	 (list "t" "Todo"
+	       'entry
+	       (list 'file+headline
+		     (kkk-org--capture-folder+file "Todo.org")
+		     "Tasks")
+	       "* TODO %?\n%i\n%a")
+
+	 (list "j" "Journal"
+	       'entry
+	       (list 'file+headline
+		     (kkk-org--capture-folder+file "Journal.org")
+		     "Journal")
+	       "* %?\nEntered on %U\n%i\n%a")
+
+	 (list "i" "Idea"
+	       'entry
+	       (list 'file+headline
+		     (kkk-org--capture-folder+file "Ideas.org")
+		     "Ideas")
+	       "* %?\n%i\n%a")
+
+	 '("w" "Work")
+	 '("wt" "Task")
+	 )
+	)
+  (kkk-org--make-work-templates "wt" 'org-capture-templates)
+  )
+
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((emacs-lisp . t)
+   (python . t)
+   (shell . t)))
+
+(require 'org-tempo)
+
+(dolist (it '(("sh" . "src shell") ("el" . "src emacs-lisp")
+	      ("py" . "src python") ("c" . "src C") ("lu" . "src lua")
+	      ("md" . "src markdown") ("sql" . "src sql")))
+  (add-to-list 'org-structure-template-alist it))
+
+(use-package org
+  :config
+  (setq org-ellipsis " ▼"
+	org-src-preserve-indentation t
+	org-return-follows-link t
+	;; Org-Agenda
+	org-log-done 'time
+	org-log-into-drawer t)
+  (setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)"))))
+
+(provide 'kkk-org)
+;;; kkk-org.el ends here

+ 310 - 0
.config/emacs/kkk-lisp/kkk-package.el

@@ -0,0 +1,310 @@
+;;; kkk-package.el --- Package Config                -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This are my package config
+
+;;; Code:
+
+(defgroup kkk-package nil
+  "A group for all my modes."
+  :group 'kkk-emacs)
+
+(defvar bootstrap-version)
+(let ((bootstrap-file
+       (expand-file-name
+	"straight/repos/straight.el/bootstrap.el" user-emacs-directory))
+      (bootstrap-version 5))
+  (unless (file-exists-p bootstrap-file)
+    (with-current-buffer
+	(url-retrieve-synchronously
+	 "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
+	 'silent 'inhibit-cookies)
+      (goto-char (point-max))
+      (eval-print-last-sexp)))
+  (load bootstrap-file nil 'nomessage))
+
+(straight-use-package 'use-package)
+(setq straight-use-package-by-default t)
+
+;; (setq use-package-verbose t)
+(setq use-package-always-defer t)
+
+;; GCMH:
+(when (> (/ (car (memory-info)) 1024.0 1024.0) 4.0)
+  (use-package gcmh
+    :demand t
+    :delight
+    :functions (gcmh-mode gcmh-set-high-threshold)
+    :defines gcmh-verbose
+    :init (gcmh-mode t)
+    :config
+    (setq gcmh-verbose t)
+    (gcmh-set-high-threshold)))
+
+(straight-use-package 'org)
+
+;; Evil:
+(require 'kkk-evil)
+
+;; Modes:
+(require 'kkk-modes)
+
+;; Delight:
+(use-package delight
+  :demand t
+  :functions delight
+  :config
+  (delight '((abbrev-mode " Ab" emacs)
+	     (eldoc-mode " Edc" emacs)
+	     (glasses-mode nil emacs)
+	     (whitespace-mode nil emacs)
+	     (global-whitespace-mode nil emacs)
+	     (evil-collection-unimpaired-mode nil evil-collection-unimpaired)
+	     (org-indent-mode nil emacs)
+	     (org-src-mode nil emacs)
+	     (gcmh-mode nil gcmh))))
+
+;; ;; Company:
+;; (use-package company
+;;   :delight " Cp"
+;;   :hook (after-init . global-company-mode)
+;;   :bind (:map company-active-map
+;; 	      ("<tab>" . company-complete-selection))
+;;   :config
+;;   (setq company-minimum-prefix-length 1
+;; 	company-idle-delay 1)
+
+;;   (setq company-global-modes '(not
+;; 			       eshell-mode vterm-mode shell-mode term-mode)))
+
+
+;; FlyCheck:
+(defun load-flycheck ()
+  "Load FlyCheck using `use-package'."
+  (use-package flycheck
+    :demand t
+    :delight
+    :functions global-flycheck-mode
+    :defines flycheck-mode-line-prefix
+    :init (global-flycheck-mode)
+    :config (setq flycheck-mode-line-prefix "FC"))
+  (remove-hook 'prog-mode #'load-flycheck)
+  )
+(add-hook 'prog-mode #'load-flycheck)
+
+;; Helpful
+(use-package helpful
+  :bind (([remap describe-function] . helpful-function)
+	 ([remap describe-command] . helpful-command)
+	 ([remap describe-variable] . helpful-variable)
+	 ([remap describe-key] . helpful-key)
+	 ("C-h M" . helpful-macro)))
+
+;; IEdit:
+(use-package iedit
+  :bind ("M-E" . iedit-mode))
+
+;; ;; Logos
+;; (use-package logos
+;;   :bind (([remap narrow-to-region] . logos-narrow-dwim)
+;; 	 ([remap forward-page]     . logos-forward-page-dwim)
+;; 	 ([remap backward-page]    . logos-backward-page-dwim)))
+
+(use-package fancy-compilation
+  :defer 5
+  :functions fancy-compilation-mode
+  :defines (fancy-compilation-quiet-prelude fancy-compilation-quiet-prolog)
+  :init (fancy-compilation-mode)
+  :config
+  (setq fancy-compilation-quiet-prelude nil
+	fancy-compilation-quiet-prolog nil))
+
+(defun load-magit ()
+  "Load Magit using `use-package'."
+
+  ;; Magit
+  (use-package magit
+    :demand t
+    :functions (define-package)
+    :custom
+    (magit-display-buffer-function
+     #'magit-display-buffer-same-window-except-diff-v1))
+
+  ;; Magit-Todo
+  (use-package magit-todos
+    :functions magit-todos-mode
+    :after magit
+    :init (magit-todos-mode t))
+  )
+
+;; Vertigo:
+(use-package vertico
+  :demand t
+  :functions (vertico-mode vertico-exit-input)
+  :defines vertico-map
+  :bind (:map vertico-map
+	   ("C-x RET" . vertico-exit-input))
+  :init (vertico-mode))
+
+;; Marginalia
+(use-package marginalia
+  :functions marginalia-mode
+  ;; :bind (("M-A" . marginalia-cycle)
+  ;; 	 :map minibuffer-local-map
+  ;; 	 ("M-A" . marginalia-cycle))
+  :init (marginalia-mode))
+
+;; Ordeless:
+(use-package orderless
+  :init
+  (setq completion-styles '(orderless basic))
+  (setq completion-category-defaults nil)
+  (setq completion-category-overrides '((file (styles partial-completion)))))
+
+(defun load-popper ()
+  "Load Popper using `use-package'."
+  ;; Popper
+  (use-package popper
+    :demand t
+    :functions (popper-mode popper-echo-mode)
+    :defines popper-referende-buffers
+    :bind (("C-c p l" . popper-toggle-latest)
+	   ("C-c p c" . popper-cycle)
+	   ("C-c p k" . popper-kill-latest-popup)
+	   ("C-c p t" . popper-toggle-type))
+    :init
+    (popper-mode t)
+    (popper-echo-mode -1)
+    :custom
+    (setq popper-reference-buffers
+	  '(Custom-mode
+	    compilation-mode
+	    message-mode
+	    messages-buffer-mode "^\\*Messages\\*"
+	    help-mode "^\\*Help\\*"
+	    helpful-mode "^\\*helpful"
+	    occur-mode
+	    "^\\*Warning\\*"
+	    "^\\*Compile-Log\\*"
+	    "^\\*Backtrace\\*"
+	    "^\\*evil-registers\\*"
+	    "^\\*Apropos"
+	    "^Calc:"
+	    "^\\*ielm\\*"
+	    "^\\*Tex Help\\*"
+	    "^\\*Shell Command Output\\*"
+	    "^\\*Async Shell Command\\*"
+	    "^\\*Completions\\*"
+	    "[Oo]utput\\*"))
+    )
+  )
+
+;; ;; Projectile
+(defun load-projectile()
+  "Load Projectile using `use-package'."
+  (use-package projectile
+    :demand t
+    :functions projectile-mode
+    :defines (projectile-command-map projectile-mode-line-prefix
+				     projectile-mode-line-lighter)
+    :bind (("C-x p" . projectile-command-map))
+    :init (projectile-mode t)
+    :config
+    (setq projectile-mode-line-prefix " Pj")
+    (setq projectile-mode-line-lighter " Pj"))
+  )
+
+;; ;; Rainbow Delimiter
+(use-package rainbow-delimiters
+  :functions rainbow-delimiters-mode
+  :hook (prog-mode . rainbow-delimiters-mode))
+
+;; ;; Vterm
+(use-package vterm
+  :defines (vterm-max-scrollback vterm-clear-scrollback-when-clearing)
+  :config
+  (setq vterm-max-scrollback 100000
+	vterm-clear-scrollback-when-clearing t))
+
+;; Which Key
+(use-package which-key
+  :delight
+  :functions which-key-mode
+  :defines which-key-idle-delay
+  :init (which-key-mode t)
+  :config (setq which-key-idle-delay 1))
+
+(use-package dired
+  :straight nil
+  :bind (("C-x C-j" . dired-jump))
+  :config
+  (setq dired-listing-switches "-lagho --group-directories-first")
+  (setq dired-kill-when-opening-new-dired-buffer t))
+
+;; Diredfl
+(defun load-diredfl()
+  "Load Diredfl using `use-package'."
+  (use-package diredfl
+    :demand t
+    :functions diredfl-global-mode
+    :init (diredfl-global-mode)
+    )
+  (remove-hook 'dired-mode-hook #'load-diredfl)
+  )
+
+(add-hook 'dired-mode-hook #'load-diredfl)
+
+(unless (display-graphic-p)
+  (use-package xclip
+    :demand t
+    :functions xclip-mode
+    :defines xclip-method
+    :init (xclip-mode 1)
+    :config (setq xclip-method 'emacs))
+  )
+
+;; (require 'kkk-org)
+
+(use-package tempel
+  :defer 5
+  :custom
+  (tempel-trigger-prefix "<")
+  (setq tempel-path (concat user-emacs-directory "tempel.eld"))
+  :init
+  (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
+  (global-tempel-abbrev-mode)
+  )
+
+;; (use-package combobulate
+;;   :straight '(combobulate :type git :host github :repo "mickeynp/combobulate")
+;;   :preface (setq combobulate-key-prefix "C-c o")
+;;   :functions combobulate-mode
+;;   :hook ((python-ts-mode . combobulate-mode)
+;; 	 (js-ts-mode . combobulate-mode)
+;; 	 (css-ts-mode . combobulate-mode)
+;; 	 (yaml-ts-mode . combobulate-mode)
+;; 	 (json-ts-mode . combobulate-mode)
+;; 	 (typescript-ts-mode . combobulate-mode)
+;; 	 (tsx-ts-mode . combobulate-mode))
+;;   )
+
+(provide 'kkk-package)
+;;; kkk-package.el ends here

+ 57 - 0
.config/emacs/kkk-lisp/kkk-pass.el

@@ -0,0 +1,57 @@
+;;; kkk-pass.el --- Pass Related Code                -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; pass Related Code
+
+;;; Code:
+(defgroup kkk-pass nil
+  "Initial Tweaks to Emacs."
+  :group 'info)
+
+(defconst kkk-pass--pass-cmd "pass"
+  "The `pass` binary to be run.")
+
+(defun kkk-pass-get (NAME &optional LINE)
+  "Gets the password NAME.
+Optionaly returns the line LINE.
+
+NAME is a string.
+LINE is a non zero positive integer."
+  (catch 'early-return
+
+    (unless (stringp NAME)
+      (throw 'early-return "NAME has to be a string"))
+
+    (when LINE
+      (unless (integerp LINE)
+	(throw 'early-return "LINE has to be an integer"))
+      (when (= LINE 0)
+	(throw 'early-return "LINE can't be zero"))
+      (when (< LINE 0)
+	(throw 'early-return "LINE can't be less than zero")))
+
+    (let ((raw (shell-command-to-string
+		 (format "%s %s" kkk-pass--pass-cmd NAME))))
+      (if LINE
+	  (nth (1- LINE) (string-lines raw t nil))
+	raw))))
+
+(provide 'kkk-pass)
+;;; kkk-pass.el ends here

+ 54 - 0
.config/emacs/kkk-lisp/kkk-random.el

@@ -0,0 +1,54 @@
+;;; kkk-random.el --- Function randomize things      -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Random Things
+
+;;; Code:
+
+
+(defun kkk-list-get-random (list)
+  "Get a random item from LIST."
+  (elt list (random (length list))))
+
+(defun kkk-random-char ()
+  "Return a random char."
+  (char-to-string (+ 33 (random 94))))
+
+(defun kkk-random-string (length)
+  "Create a random string with LENGTH chars."
+  (let ((x ""))
+    (dolist (_ (make-list length 0))
+      (setq x (concat x (kkk-random-char)))
+      )
+    x
+    )
+  )
+
+(defun kkk-random-date (year)
+  "Return a random date string on iso format (YYYY-MM-DD) using YEAR as year."
+  (when (stringp year)
+    (concat year "-" (int-to-string (+ (cl-random 12) 1))
+		 "-" (int-to-string (+ (cl-random 30) 1)))
+    )
+  )
+
+(provide 'kkk-random)
+;;; kkk-random.el ends here

+ 85 - 0
.config/emacs/kkk-lisp/kkk-scratch.el

@@ -0,0 +1,85 @@
+;;; kkk-scratch.el --- Scratch Function              -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  
+
+;; Author:  <pikuinha@t60-gentoo_musl>
+;; Keywords: 
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Scratch everything
+
+;;; Code:
+
+(defgroup kkk-scratch nil
+  "Group of scratch things."
+  :group 'file)
+
+(defun kkk-scratch-helper-dwim (BUFFER BUFFER_BACK)
+  "This is a helper to all to-scratch dwim functions.
+
+BUFFER is the scratch buffer to change to.
+BUFFER_BACK is the scratch buffer to change back to when is called again."
+  (let ((cb (buffer-name)))
+    (if (string= cb BUFFER)
+	(progn
+	  (switch-to-buffer (eval BUFFER_BACK))
+	  (bury-buffer BUFFER))
+      (progn
+	(set BUFFER_BACK cb)
+	(switch-to-buffer BUFFER)))))
+
+(defvar kkk-scratch--buffer-last-buffer)
+(defun kkk-scratch-buffer-dwim ()
+  "Change to the scratch buffern and back."
+  (interactive)
+  (kkk-scratch-helper-dwim "*scratch*"
+			   'kkk-scratch--bufer-last-buffer))
+
+(defvar kkk-scratch--vterm-last-buffer)
+(defun kkk-scratch-vterm-dwim ()
+  "Change to a scratch vterm and back."
+  (interactive)
+  (let ((buffer_name "*vterm-scratch*")
+	(last_buffer 'kkk-scratch--vterm-last-buffer))
+    (if (get-buffer buffer_name)
+	(kkk-scratch-helper-dwim buffer_name last_buffer)
+      (progn
+	(set last_buffer (current-buffer))
+	(vterm buffer_name)))))
+
+(defvar kkk-scratch--eshell-last-buffer)
+(defun kkk-scratch-eshell-dwim ()
+  "Change to a scratch vterm and back."
+  (interactive)
+  (let ((buffer_name "*eshell-scratch*")
+	(last_buffer 'kkk-scratch--eshell-last-buffer))
+    (if (get-buffer buffer_name)
+	(kkk-scratch-helper-dwim buffer_name last_buffer)
+      (progn
+	(set last_buffer (current-buffer))
+	(eshell)
+	(rename-buffer buffer_name)))))
+
+;; (defconst kkk-scratch-command-map
+;;   (let ((map (make-sparse-keymap)))
+;;     (define-key map (kbd "b")   #'kkk-scratch-buffer-dwim)
+;;     (define-key map (kbd "x v") #'kkk-scratch-vterm-dwim)
+;;     (define-key map (kbd "x e") #'kkk-scratch-eshell-dwim))
+;;   "Keymap for scratch comands.")
+
+(provide 'kkk-scratch)
+;;; kkk-scratch.el ends here

+ 33 - 0
.config/emacs/kkk-lisp/kkk-utils.el

@@ -0,0 +1,33 @@
+;;; kkk-utils.el --- Utils Functions                 -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Various Misc Functions
+
+;;; Code:
+
+(defun kkk-utils-mkdir (FOLDER)
+  "Will Create FOLDER if it does not exist."
+  (when (and (stringp FOLDER)
+	     (not (file-exists-p FOLDER)))
+    (make-directory FOLDER t)))
+
+(provide 'kkk-utils)
+;;; kkk-utils.el ends here

+ 56 - 0
.config/emacs/kkk-lisp/kkk-whitespace.el

@@ -0,0 +1,56 @@
+;;; kkk-whitespace.el --- Custom Whitespace Mode  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Adding custom global mode for whitespace mode
+
+;;; Code:
+
+(defgroup kkk-whitespace nil
+  "Custom config for whitespace."
+  :group 'info)
+
+(defcustom kkk-whitespace-global-modes t
+  "This is a copy of `company-global-modes` for `whitespace-mode`."
+  :type '(choice (const :tag "none" nil)
+                 (const :tag "all" t)
+                 (set :menu-tag "mode specific" :tag "modes"
+                      :value (not)
+                      (const :tag "Except" not)
+                      (repeat :inline t (symbol :tag "mode"))))
+  :group 'kkk-whitespace)
+
+(defun kkk-whitespace-mode--turn-on ()
+  "Turn on `whitespace-mode` on the current buffer.
+Using `whitespace-global-modes` as a filter."
+  (when (and (not (or noninteractive (eq (aref (buffer-name) 0) ?\s)))
+             (cond ((eq kkk-whitespace-global-modes t) t)
+                   ((eq (car-safe kkk-whitespace-global-modes) 'not)
+                    (not (memq major-mode kkk-whitespace-global-modes)))
+                   (t (memq major-mode kkk-whitespace-global-modes))))
+    (whitespace-mode t)))
+
+(define-globalized-minor-mode
+  global-kkk-whitespace-mode
+  whitespace-mode
+  kkk-whitespace-mode--turn-on)
+
+(provide 'kkk-whitespace)
+;;; kkk-whitespace.el ends here

+ 57 - 0
.config/emacs/kkk-lisp/kkk-windowsize.el

@@ -0,0 +1,57 @@
+;;; kkk-windowsize.el --- Window Size                -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2023  Vinicius Teshima <vini.tes@pm.me>
+
+;; Author: Vinicius Teshima <vini.tes@pm.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Window Size
+
+;;; Code:
+
+(defgroup kkk-window nil
+  "Group for the window group."
+  :group 'info)
+
+(defcustom kkk-window-size
+  80
+  "Size of window."
+  :type 'natnum
+  :group 'kkk-window)
+
+(defun kkk-window-resize (&optional ignored)
+  "This function change the size of the current window to 80 char wide.
+
+IGNORED is there to be complient with the 'window-state-change-functions' docs."
+  (interactive)
+  (let ((win (selected-window)))
+    (unless (or (frame-root-window-p win) (minibufferp (current-buffer)))
+      (let* ((width (window-text-width))
+             (delta (+ 6 (- kkk-window-size width))))
+        (if (> delta 0)
+            (enlarge-window-horizontally delta)
+          (shrink-window-horizontally (* delta -1))
+          )
+        )
+      )
+    )
+  )
+
+(add-to-list 'window-state-change-functions #'kkk-window-resize)
+
+(provide 'kkk-windowsize)
+;;; kkk-windowsize.el ends here

+ 64 - 0
.config/htop/htoprc

@@ -0,0 +1,64 @@
+# Beware! This file is rewritten by htop when settings are changed in the interface.
+# The parser is also very primitive, and not human-friendly.
+htop_version=3.3.0
+config_reader_min_version=3
+fields=0 48 17 18 38 39 40 2 46 47 49 1
+hide_kernel_threads=1
+hide_userland_threads=1
+hide_running_in_container=0
+shadow_other_users=1
+show_thread_names=0
+show_program_path=1
+highlight_base_name=1
+highlight_deleted_exe=0
+shadow_distribution_path_prefix=0
+highlight_megabytes=1
+highlight_threads=0
+highlight_changes=0
+highlight_changes_delay_secs=5
+find_comm_in_cmdline=0
+strip_exe_from_cmdline=0
+show_merged_command=0
+header_margin=1
+screen_tabs=1
+detailed_cpu_time=0
+cpu_count_from_one=0
+show_cpu_usage=1
+show_cpu_frequency=1
+show_cpu_temperature=1
+degree_fahrenheit=0
+update_process_names=0
+account_guest_in_cpu_meter=0
+color_scheme=0
+enable_mouse=0
+delay=15
+hide_function_bar=0
+topology_affinity=0
+header_layout=two_50_50
+column_meters_0=LeftCPUs Memory Swap Zram DiskIO NetworkIO
+column_meter_modes_0=2 2 2 2 2 2
+column_meters_1=RightCPUs Tasks LoadAverage Uptime FileDescriptors
+column_meter_modes_1=2 2 2 2 2
+tree_view=0
+sort_key=46
+tree_sort_key=46
+sort_direction=-1
+tree_sort_direction=-1
+tree_view_always_by_pid=0
+all_branches_collapsed=1
+screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
+.sort_key=PERCENT_CPU
+.tree_sort_key=PERCENT_CPU
+.tree_view_always_by_pid=0
+.tree_view=0
+.sort_direction=-1
+.tree_sort_direction=-1
+.all_branches_collapsed=1
+screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
+.sort_key=IO_RATE
+.tree_sort_key=PID
+.tree_view_always_by_pid=0
+.tree_view=0
+.sort_direction=-1
+.tree_sort_direction=1
+.all_branches_collapsed=0

+ 23 - 0
.gitconfig

@@ -0,0 +1,23 @@
+[core]
+	excludesFile = /home/snth/.gitignore
+[user]
+	name = Vinicius Teshima
+	email = main@japa.boo
+	signingkey = E5DB24899BF48DB40FB38FED15B38C26B128ACDB
+[safe]
+	directory = /etc/portage
+[init]
+	defaultBranch = master
+[push]
+	autoSetupRemote = true
+[gpg]
+	format = openpgp
+	program = gpg
+[commit]
+	gpgSign = true
+
+[includeIf "gitdir:~/Work/"]
+	path = ~/Work/.gitconfig
+
+[includeIf "gitdir:~/Sync/Work/"]
+	path = ~/Sync/Work/.gitconfig

+ 12 - 0
.gitmodules

@@ -0,0 +1,12 @@
+[submodule ".config/emacs/gitrepos/go-mode.el"]
+	path = .config/emacs/gitrepos/go-mode.el
+	url = https://github.com/dominikh/go-mode.el
+[submodule ".config/emacs/gitrepos/zig-mode"]
+	path = .config/emacs/gitrepos/zig-mode
+	url = https://github.com/ziglang/zig-mode.git
+[submodule ".config/emacs/gitrepos/emacs-reformatter"]
+	path = .config/emacs/gitrepos/emacs-reformatter
+	url = https://github.com/purcell/emacs-reformatter.git
+[submodule ".config/emacs/gitrepos/fasm-mode"]
+	path = .config/emacs/gitrepos/fasm-mode
+	url = https://github.com/emacsattic/fasm-mode

+ 68 - 0
.profile

@@ -0,0 +1,68 @@
+#!/bin/sh
+
+export XDG_CONFIG_HOME="$HOME"/.config
+[ -d "$XDG_CONFIG_HOME" ] || mkdir -pv "$XDG_CONFIG_HOME"
+
+export XDG_CACHE_HOME="$HOME"/.local/cache
+[ -d "$XDG_CACHE_HOME" ] || mkdir -pv "$XDG_CACHE_HOME"
+
+export XDG_DATA_HOME="$HOME"/.local/share
+[ -d "$XDG_DATA_HOME" ] || mkdir -pv "$XDG_DATA_HOME"
+
+export XDG_STATE_HOME="$HOME"/.local/state
+[ -d "$XDG_STATE_HOME" ] || mkdir -pv "$XDG_STATE_HOME"
+
+export XDG_BIN_HOME="$HOME"/.local/bin
+[ -d "$XDG_BIN_HOME" ] || mkdir -pv "$XDG_BIN_HOME"
+
+export PATH="$XDG_BIN_HOME":"$PATH"
+
+# XDG_CONFIG_HOME
+export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
+export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
+export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
+export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="${XDG_CONFIG_HOME}/java"
+export ENV="$XDG_CONFIG_HOME"/shell_cfg.sh
+
+# XDG_DATA_HOME
+export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
+export GNUPGHOME="$XDG_DATA_HOME"/gnupg
+export WINEPREFIX="$XDG_DATA_HOME"/wine
+export ANDROID_HOME="$XDG_DATA_HOME"/android
+export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
+export PSQL_HISTORY="$XDG_DATA_HOME"/psql_history
+export JULIA_DEPOT_PATH="$XDG_DATA_HOME"/julia:"$JULIA_DEPOT_PATH"
+export PYENV_ROOT="$XDG_DATA_HOME"/pyenv
+
+# XDG_STATE_HOME
+export LESSHISTFILE="$XDG_STATE_HOME"/less/history
+[ -d "$XDG_STATE_HOME"/less ] || mkdir -pv "$XDG_STATE_HOME"/less
+
+export SQLITE_HISTORY="$XDG_STATE_HOME"/sqlite/history
+[ -d "$XDG_STATE_HOME"/sqlite ] || mkdir -pv "$XDG_STATE_HOME"/sqlite
+
+export MYSQL_HISTFILE="$XDG_STATE_HOME"/mysql/history
+[ -d "$XDG_STATE_HOME"/mysql ] || mkdir -pv "$XDG_STATE_HOME"/mysql
+
+export HISTFILE="$XDG_STATE_HOME"/bash/history
+[ -d "$XDG_STATE_HOME"/bash ] || mkdir -pv "$XDG_STATE_HOME"/bash
+
+if [ -z "$XDG_RUNTIME_DIR" ]
+then
+	export XDG_RUNTIME_DIR="/run/user/$(id -u)"
+	mkdir -pv "$XDG_RUNTIME_DIR"
+fi
+
+
+# XDG_RUNTIME_DIR
+export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
+export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd
+
+export HISTCONTROL=ignorespace
+export HISTSIZE=-1
+export HISTFILESIZE=-1
+
+if [ -e "/usr/bin/ssh-agent" ]
+then
+    pgrep ssh-agent >/dev/null || eval "$(/usr/bin/ssh-agent)"
+fi

+ 15 - 0
.ratpoisonrc

@@ -0,0 +1,15 @@
+escape C-w
+
+set bargravity c
+set font Fantasque Sans Mono
+set border 0
+set onlyborder 0
+set fgcolor #FFFFFF
+set bgcolor #000000
+set barpadding 0 0
+set framesels 0123456789abcde
+
+bind C-k focusup
+bind C-l focusleft
+bind C-j focusdown
+bind C-h focusright

+ 2 - 0
.tmux.conf

@@ -0,0 +1,2 @@
+set -g default-command "${SHELL}"
+set escape-time 0