From a61c0e86051197a748d756ebc345b41abeaba3b6 Mon Sep 17 00:00:00 2001 From: Clay Gomera Date: Mon, 4 Sep 2023 13:36:18 -0400 Subject: [PATCH] updated --- system/etc/mkinitcpio.conf | 2 +- user/.bash_profile | 6 +- user/.bashrc | 7 +- .../gruvbox-fallnn/gruvbox-fallnn.kvconfig | 2 +- user/.config/doom/config.el | 593 -------- user/.config/doom/config.org | 1155 --------------- user/.config/doom/emacs-dash.txt | 19 - user/.config/doom/eshell/aliases | 26 - user/.config/doom/eshell/profile | 1 - user/.config/doom/init.el | 191 --- user/.config/doom/packages.el | 91 -- user/.config/lvim/config.lua | 129 ++ user/.config/qutebrowser/bookmarks/urls | 21 + user/.config/qutebrowser/config.py | 252 ++++ user/.config/qutebrowser/gruvbox.py | 333 +++++ .../.config/suckless/dmenu/scripts/dmenu_drun | 5 +- .../.config/suckless/dmenu/scripts/dmenu_edit | 8 +- .../suckless/dmenu/scripts/dmenu_power | 71 +- .../suckless/dmenu/scripts/dmenu_scrot | 137 +- .../.config/suckless/dmenu/scripts/dmenu_wall | 55 +- .../.config/suckless/dmenu/scripts/dmenu_wifi | 143 +- user/.config/suckless/dwm/config.h | 26 +- .../suckless/dwmblocks/scripts/block_battery | 89 +- .../dwmblocks/scripts/block_brightness | 10 +- .../suckless/dwmblocks/scripts/block_clock | 21 +- .../suckless/dwmblocks/scripts/block_layout | 10 +- .../suckless/dwmblocks/scripts/block_volume | 15 +- .../suckless/dwmblocks/scripts/block_wifi | 24 +- user/.config/tut/config.toml | 1284 +++++++++++++++++ user/.xinitrc | 8 +- 30 files changed, 2433 insertions(+), 2301 deletions(-) delete mode 100644 user/.config/doom/config.el delete mode 100644 user/.config/doom/config.org delete mode 100644 user/.config/doom/emacs-dash.txt delete mode 100644 user/.config/doom/eshell/aliases delete mode 100644 user/.config/doom/eshell/profile delete mode 100644 user/.config/doom/init.el delete mode 100644 user/.config/doom/packages.el create mode 100644 user/.config/lvim/config.lua create mode 100644 user/.config/qutebrowser/bookmarks/urls create mode 100644 user/.config/qutebrowser/config.py create mode 100644 user/.config/qutebrowser/gruvbox.py create mode 100644 user/.config/tut/config.toml diff --git a/system/etc/mkinitcpio.conf b/system/etc/mkinitcpio.conf index a1d069516..f5832b51b 100644 --- a/system/etc/mkinitcpio.conf +++ b/system/etc/mkinitcpio.conf @@ -49,7 +49,7 @@ FILES=() # ## NOTE: If you have /usr on a separate partition, you MUST include the # usr and fsck hooks. -HOOKS=(base systemd autodetect keyboard modconf block sd-encrypt kms sd-vconsole block lvm2 filesystems fsck) +HOOKS=(base systemd autodetect keyboard modconf block sd-encrypt kms keymap consolefont lvm2 filesystems fsck) # COMPRESSION # Use this to compress the initramfs image. By default, zstd compression diff --git a/user/.bash_profile b/user/.bash_profile index 8b2aafa8d..9053cd26b 100644 --- a/user/.bash_profile +++ b/user/.bash_profile @@ -1,4 +1,4 @@ - #!/bin/bash +#!/bin/bash ## ____ __ ## / __ \_________ _/ /_____ ## / / / / ___/ __ `/ //_/ _ \ @@ -14,8 +14,8 @@ then fi # environment variables -export EDITOR="emacsclient -t -a ''" -export VISUAL="emacsclient -c -a 'emacs'" +export EDITOR="~/.local/bin/lvim" +export VISUAL="neovide --neovim-bin ~/.local/bin/lvim" export MEDIA_DIR="$HOME/Media" export TEMP_DIR="$HOME/Temporal" diff --git a/user/.bashrc b/user/.bashrc index cf4d8ef49..f7a44beea 100644 --- a/user/.bashrc +++ b/user/.bashrc @@ -19,9 +19,6 @@ export MANPAGER="sh -c 'col -bx | bat -l man -p'" # if not running interactively, don't do anything [[ $- != *i* ]] && return -# use emasc for vim if present. -[ -x "$(command -v emacs)" ] && alias vim="emacsclient -t -a ''" - ### SET VI MODE ### # Comment this line out to enable default emacs-like bindings set -o vi @@ -125,8 +122,8 @@ alias \ # bat as cat [ -x "$(command -v bat)" ] && alias cat="bat" -# pfetch as neofetch -[ -x "$(command -v pfetch)" ] && alias neofetch="pfetch" +# use emasc for vim if present. +[ -x "$(command -v nvim)" ] && alias vim="nvim" # Changing "ls" to "exa" alias \ diff --git a/user/.config/Kvantum/gruvbox-fallnn/gruvbox-fallnn.kvconfig b/user/.config/Kvantum/gruvbox-fallnn/gruvbox-fallnn.kvconfig index 8d416a03b..beaf6b56e 100644 --- a/user/.config/Kvantum/gruvbox-fallnn/gruvbox-fallnn.kvconfig +++ b/user/.config/Kvantum/gruvbox-fallnn/gruvbox-fallnn.kvconfig @@ -58,7 +58,7 @@ tooltip_delay=-1 tree_branch_line=true dark_titlebar=true opaque=QMPlay2,kaffeine,kmplayer,subtitlecomposer,kdenlive,vlc,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,trojita,dragon,digikam -reduce_window_opacity=18 +reduce_window_opacity=0 scrollable_menu=false submenu_delay=250 no_inactiveness=false diff --git a/user/.config/doom/config.el b/user/.config/doom/config.el deleted file mode 100644 index 84d28f5e8..000000000 --- a/user/.config/doom/config.el +++ /dev/null @@ -1,593 +0,0 @@ -(beacon-mode 1) - -(map! :leader - (:prefix ("b". "buffer") - :desc "List bookmarks" "L" #'list-bookmarks - :desc "Save current bookmarks to bookmark file" "w" #'bookmark-save)) - -(global-auto-revert-mode 1) -(setq global-auto-revert-non-file-buffers t) - -(evil-define-key 'normal ibuffer-mode-map - (kbd "f c") 'ibuffer-filter-by-content - (kbd "f d") 'ibuffer-filter-by-directory - (kbd "f f") 'ibuffer-filter-by-filename - (kbd "f m") 'ibuffer-filter-by-mode - (kbd "f n") 'ibuffer-filter-by-name - (kbd "f x") 'ibuffer-filter-disable - (kbd "g h") 'ibuffer-do-kill-lines - (kbd "g H") 'ibuffer-update) - -;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months -(defun dt/year-calendar (&optional year) - (interactive) - (require 'calendar) - (let* ( - (current-year (number-to-string (nth 5 (decode-time (current-time))))) - (month 0) - (year (if year year (string-to-number (format-time-string "%Y" (current-time)))))) - (switch-to-buffer (get-buffer-create calendar-buffer)) - (when (not (eq major-mode 'calendar-mode)) - (calendar-mode)) - (setq displayed-month month) - (setq displayed-year year) - (setq buffer-read-only nil) - (erase-buffer) - ;; horizontal rows - (dotimes (j 4) - ;; vertical columns - (dotimes (i 3) - (calendar-generate-month - (setq month (+ month 1)) - year - ;; indentation / spacing between months - (+ 5 (* 25 i)))) - (goto-char (point-max)) - (insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n)) - (widen) - (goto-char (point-max)) - (narrow-to-region (point-max) (point-max))) - (widen) - (goto-char (point-min)) - (setq buffer-read-only t))) - -(defun dt/scroll-year-calendar-forward (&optional arg event) - "Scroll the yearly calendar by year in a forward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (unless arg (setq arg 0)) - (save-selected-window - (if (setq event (event-start event)) (select-window (posn-window event))) - (unless (zerop arg) - (let* ( - (year (+ displayed-year arg))) - (dt/year-calendar year))) - (goto-char (point-min)) - (run-hooks 'calendar-move-hook))) - -(defun dt/scroll-year-calendar-backward (&optional arg event) - "Scroll the yearly calendar by year in a backward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (dt/scroll-year-calendar-forward (- (or arg 1)) event)) - -(map! :leader - :desc "Scroll year calendar backward" "" #'dt/scroll-year-calendar-backward - :desc "Scroll year calendar forward" "" #'dt/scroll-year-calendar-forward) - -(defalias 'year-calendar 'dt/year-calendar) - -(use-package! calfw) -(use-package! calfw-org) - -(use-package dashboard - :init ;; tweak dashboard config before loading it - (setq dashboard-set-heading-icons t) - (setq dashboard-set-file-icons t) - (setq dashboard-banner-logo-title "\nKEYBINDINGS:\ -\nFind file (SPC .) \ -Open buffer list (SPC b i)\ -\nFind recent files (SPC f r) \ -Open the eshell (SPC e s)\ -\nOpen dired file manager (SPC d d) \ -List of keybindings (SPC h b b)") - ;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner - (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) - (setq dashboard-startup-banner "~/.config/doom/emacs-dash.txt") ;; use custom image as banner - (setq dashboard-center-content nil) ;; set to 't' for centered content - (setq dashboard-items '((recents . 5) - (agenda . 5 ) - (bookmarks . 5) - (projects . 5) - (registers . 5))) - :config - (dashboard-setup-startup-hook) - (dashboard-modify-heading-icons '((recents . "file-text") - (bookmarks . "book")))) - -(setq doom-fallback-buffer "*dashboard*") - -(map! :leader - (:prefix ("d" . "dired") - :desc "Open dired" "d" #'dired - :desc "Dired jump to current" "j" #'dired-jump) - (:after dired - (:map dired-mode-map - :desc "Peep-dired image previews" "d p" #'peep-dired - :desc "Dired view file" "d v" #'dired-view-file))) - -(evil-define-key 'normal dired-mode-map - (kbd "M-RET") 'dired-display-file - (kbd "h") 'dired-up-directory - (kbd "l") 'dired-open-file ; use dired-find-file instead of dired-open. - (kbd "m") 'dired-mark - (kbd "t") 'dired-toggle-marks - (kbd "u") 'dired-unmark - (kbd "C") 'dired-do-copy - (kbd "D") 'dired-do-delete - (kbd "J") 'dired-goto-file - (kbd "M") 'dired-do-chmod - (kbd "O") 'dired-do-chown - (kbd "P") 'dired-do-print - (kbd "R") 'dired-do-rename - (kbd "T") 'dired-do-touch - (kbd "Y") 'dired-copy-filenamecopy-filename-as-kill ; copies filename to kill ring. - (kbd "+") 'dired-create-directory - (kbd "-") 'dired-up-directory - (kbd "% l") 'dired-downcase - (kbd "% u") 'dired-upcase - (kbd "; d") 'epa-dired-do-decrypt - (kbd "; e") 'epa-dired-do-encrypt) -;; Get file icons in dired -(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) -;; With dired-open plugin, you can launch external programs for certain extensions -;; For example, I set all .png files to open in 'sxiv' and all .mp4 files to open in 'mpv' -(setq dired-open-extensions '(("gif" . "sxiv") - ("jpg" . "sxiv") - ("png" . "sxiv") - ("mkv" . "mpv") - ("mp4" . "mpv"))) - -(evil-define-key 'normal peep-dired-mode-map - (kbd "j") 'peep-dired-next-file - (kbd "k") 'peep-dired-prev-file) -(add-hook 'peep-dired-hook 'evil-normalize-keymaps) - -(setq delete-by-moving-to-trash t - trash-directory "~/.local/share/Trash/files/") - -(setq doom-theme 'doom-gruvbox) -(map! :leader - :desc "Load new theme" "h t" #'counsel-load-theme) - -(use-package emojify - :hook (after-init . global-emojify-mode)) - -(map! :leader - (:prefix ("e". "evaluate/EWW") - :desc "Evaluate elisp in buffer" "b" #'eval-buffer - :desc "Evaluate defun" "d" #'eval-defun - :desc "Evaluate elisp expression" "e" #'eval-expression - :desc "Evaluate last sexpression" "l" #'eval-last-sexp - :desc "Evaluate elisp in region" "r" #'eval-region)) - -(setq browse-url-browser-function 'eww-browse-url) -(map! :leader - :desc "Search web for text between BEG/END" - "s w" #'eww-search-words - (:prefix ("e" . "evaluate/EWW") - :desc "Eww web browser" "w" #'eww - :desc "Eww reload page" "R" #'eww-reload)) - -(setq doom-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-variable-pitch-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-big-font (font-spec :family "mononoki Nerd Font" :size 20)) -(after! doom-themes - (setq doom-themes-enable-bold t - doom-themes-enable-italic t)) -(custom-set-faces! - '(font-lock-comment-face :slant italic) - '(font-lock-keyword-face :slant italic)) - -(setq imenu-list-focus-after-activation t) - -(map! :leader - (:prefix ("s" . "Search") - :desc "Menu to jump to places in buffer" "i" #'counsel-imenu)) - -(map! :leader - (:prefix ("t" . "Toggle") - :desc "Toggle imenu shown in a sidebar" "i" #'imenu-list-smart-toggle)) - -(defun dt/insert-todays-date (prefix) - (interactive "P") - (let ((format (cond - ((not prefix) "%A, %B %d, %Y") - ((equal prefix '(4)) "%m-%d-%Y") - ((equal prefix '(16)) "%Y-%m-%d")))) - (insert (format-time-string format)))) - -(require 'calendar) -(defun dt/insert-any-date (date) - "Insert DATE using the current locale." - (interactive (list (calendar-read-date))) - (insert (calendar-date-string date))) - -(map! :leader - (:prefix ("i d" . "Insert date") - :desc "Insert any date" "a" #'dt/insert-any-date - :desc "Insert todays date" "t" #'dt/insert-todays-date)) - -(setq ivy-posframe-display-functions-alist - '((swiper . ivy-posframe-display-at-point) - (complete-symbol . ivy-posframe-display-at-point) - (counsel-M-x . ivy-display-function-fallback) - (counsel-esh-history . ivy-posframe-display-at-window-center) - (counsel-describe-function . ivy-display-function-fallback) - (counsel-describe-variable . ivy-display-function-fallback) - (counsel-find-file . ivy-display-function-fallback) - (counsel-recentf . ivy-display-function-fallback) - (counsel-register . ivy-posframe-display-at-frame-bottom-window-center) - (dmenu . ivy-posframe-display-at-frame-top-center) - (nil . ivy-posframe-display)) - ivy-posframe-height-alist - '((swiper . 20) - (dmenu . 20) - (t . 10))) -(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it. - -(map! :leader - (:prefix ("v" . "Ivy") - :desc "Ivy push view" "v p" #'ivy-push-view - :desc "Ivy switch view" "v s" #'ivy-switch-view)) - -(setq display-line-numbers-type t) -(map! :leader - :desc "Comment or uncomment lines" "TAB TAB" #'comment-line - (:prefix ("t" . "toggle") - :desc "Toggle line numbers" "l" #'doom/toggle-line-numbers - :desc "Toggle line highlight in frame" "h" #'hl-line-mode - :desc "Toggle line highlight globally" "H" #'global-hl-line-mode - :desc "Toggle truncate lines" "t" #'toggle-truncate-lines)) - -(custom-set-faces - '(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch")))) - '(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7)))) - '(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6)))) - '(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5)))) - '(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4)))) - '(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3)))) - '(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2))))) - -(setq minimap-window-location 'right) -(map! :leader - (:prefix ("t" . "toggle") - :desc "Toggle minimap-mode" "m" #'minimap-mode)) - -(set-face-attribute 'mode-line nil :font "mononoki Nerd Font-13") -(setq doom-modeline-height 30 ;; sets modeline height - doom-modeline-bar-width 5 ;; sets right bar width - doom-modeline-persp-name t ;; adds perspective name to modeline - doom-modeline-persp-icon t) ;; adds folder icon next to persp name - -(xterm-mouse-mode 1) - -(after! neotree - (setq neo-smart-open t - neo-window-fixed-size nil)) -(after! doom-themes - (setq doom-neotree-enable-variable-pitch t)) -(map! :leader - :desc "Toggle neotree file viewer" "t n" #'neotree-toggle - :desc "Open directory in neotree" "d n" #'neotree-dir) - -(map! :leader - (:prefix ("=" . "open file") - :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")) - :desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org")) - :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) - :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) -(map! :leader - (:prefix ("= e" . "open eshell files") - :desc "Edit eshell aliases" "a" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/aliases")) - :desc "Edit eshell profile" "p" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/profile")))) - -(map! :leader - :desc "Org babel tangle" "m B" #'org-babel-tangle) -(after! org - (setq org-directory "~/Documents/Notes" - org-agenda-files '("~/Documents/Agenda/agenda.org") - org-default-notes-file (expand-file-name "notes.org" org-directory) - org-ellipsis " ▼ " - org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆") - org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists - org-log-done 'time - org-hide-emphasis-markers t - ;; ex. of org-link-abbrev-alist in action - ;; [[arch-wiki:Name_of_Page][Description]] - org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list - '(("google" . "http://www.google.com/search?q=") - ("arch-wiki" . "https://wiki.archlinux.org/index.php/") - ("ddg" . "https://duckduckgo.com/?q=") - ("wiki" . "https://en.wikipedia.org/wiki/")) - org-todo-keywords ; This overwrites the default Doom org-todo-keywords - '((sequence - "TODO(t)" ; A task that is ready to be tackled - "BLOG(b)" ; Blog writing assignments - "GYM(g)" ; Things to accomplish at the gym - "GAME(j)" ; Things to accomplish at the gym - "PROJ(p)" ; A project that contains other tasks - "VIDEO(v)" ; Video assignments - "WAIT(w)" ; Something is holding up this task - "|" ; The pipe necessary to separate "active" states and "inactive" states - "DONE(d)" ; Task has been completed - "CANCELLED(c)" )))) ; Task has been cancelled - (setq org-agenda-custom-commands - '(("p" "Priority view" - ((tags "PRIORITY=\"A\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "High priority unfinished tasks:"))) - (tags "PRIORITY=\"B\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Medium priority unfinished tasks:"))) - (tags "PRIORITY=\"C\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Low priority unfinished tasks:"))))) - ("i" "INTEC view" - ((tags "tareas" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Tareas por hacer:"))) - (tags "estudios" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Estudios por realizar:"))) - (tags "examen" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Examenes pendientes:"))))) - )) - - (setq - org-agenda-block-separator 985827 - org-fancy-priorities-list '("󰈼" "󰈻" "󰈽") - org-priority-faces - '((?A :foreground "#fb4934" :weight bold) - (?B :foreground "#fabd2f" :weight bold) - (?C :foreground "#83a598" :weight bold))) - -(defun dt/org-colors-doom-one () - "Enable Doom One colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#51afef" ultra-bold) - (org-level-2 1.6 "#c678dd" extra-bold) - (org-level-3 1.5 "#98be65" bold) - (org-level-4 1.4 "#da8548" semi-bold) - (org-level-5 1.3 "#5699af" normal) - (org-level-6 1.2 "#a9a1e1" normal) - (org-level-7 1.1 "#46d9ff" normal) - (org-level-8 1.0 "#ff6c6b" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-dracula () - "Enable Dracula colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#8be9fd" ultra-bold) - (org-level-2 1.6 "#bd93f9" extra-bold) - (org-level-3 1.5 "#50fa7b" bold) - (org-level-4 1.4 "#ff79c6" semi-bold) - (org-level-5 1.3 "#9aedfe" normal) - (org-level-6 1.2 "#caa9fa" normal) - (org-level-7 1.1 "#5af78e" normal) - (org-level-8 1.0 "#ff92d0" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-gruvbox-dark () - "Enable Gruvbox Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#458588" ultra-bold) - (org-level-2 1.6 "#b16286" extra-bold) - (org-level-3 1.5 "#98971a" bold) - (org-level-4 1.4 "#fb4934" semi-bold) - (org-level-5 1.3 "#83a598" normal) - (org-level-6 1.2 "#d3869b" normal) - (org-level-7 1.1 "#d79921" normal) - (org-level-8 1.0 "#8ec07c" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-monokai-pro () - "Enable Monokai Pro colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#78dce8" ultra-bold) - (org-level-2 1.6 "#ab9df2" extra-bold) - (org-level-3 1.5 "#a9dc76" bold) - (org-level-4 1.4 "#fc9867" semi-bold) - (org-level-5 1.3 "#ff6188" normal) - (org-level-6 1.2 "#ffd866" normal) - (org-level-7 1.1 "#78dce8" normal) - (org-level-8 1.0 "#ab9df2" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-nord () - "Enable Nord colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a1c1" ultra-bold) - (org-level-2 1.6 "#b48ead" extra-bold) - (org-level-3 1.5 "#a3be8c" bold) - (org-level-4 1.4 "#ebcb8b" semi-bold) - (org-level-5 1.3 "#bf616a" normal) - (org-level-6 1.2 "#88c0d0" normal) - (org-level-7 1.1 "#81a1c1" normal) - (org-level-8 1.0 "#b48ead" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-oceanic-next () - "Enable Oceanic Next colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#6699cc" ultra-bold) - (org-level-2 1.6 "#c594c5" extra-bold) - (org-level-3 1.5 "#99c794" bold) - (org-level-4 1.4 "#fac863" semi-bold) - (org-level-5 1.3 "#5fb3b3" normal) - (org-level-6 1.2 "#ec5f67" normal) - (org-level-7 1.1 "#6699cc" normal) - (org-level-8 1.0 "#c594c5" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-palenight () - "Enable Palenight colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#82aaff" ultra-bold) - (org-level-2 1.6 "#c792ea" extra-bold) - (org-level-3 1.5 "#c3e88d" bold) - (org-level-4 1.4 "#ffcb6b" semi-bold) - (org-level-5 1.3 "#a3f7ff" normal) - (org-level-6 1.2 "#e1acff" normal) - (org-level-7 1.1 "#f07178" normal) - (org-level-8 1.0 "#ddffa7" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-dark () - "Enable Solarized Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-light () - "Enable Solarized Light colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-tomorrow-night () - "Enable Tomorrow Night colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a2be" ultra-bold) - (org-level-2 1.6 "#b294bb" extra-bold) - (org-level-3 1.5 "#b5bd68" bold) - (org-level-4 1.4 "#e6c547" semi-bold) - (org-level-5 1.3 "#cc6666" normal) - (org-level-6 1.2 "#70c0ba" normal) - (org-level-7 1.1 "#b77ee0" normal) - (org-level-8 1.0 "#9ec400" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -;; Load our desired dt/org-colors-* theme on startup -(dt/org-colors-tomorrow-night) - -(use-package ox-man) -(use-package ox-gemini) - -(setq org-journal-dir "~/nc/Org/journal/" - org-journal-date-prefix "* " - org-journal-time-prefix "** " - org-journal-date-format "%B %d, %Y (%A) " - org-journal-file-format "%Y-%m-%d.org") - -(setq org-publish-use-timestamps-flag nil) -(setq org-export-with-broken-links t) - -(use-package! org-auto-tangle - :defer t - :hook (org-mode . org-auto-tangle-mode) - :config - (setq org-auto-tangle-default t)) - -(map! :leader - :desc "Switch to perspective NAME" "DEL" #'persp-switch - :desc "Switch to buffer in perspective" "," #'persp-switch-to-buffer - :desc "Switch to next perspective" "]" #'persp-next - :desc "Switch to previous perspective" "[" #'persp-prev - :desc "Add a buffer current perspective" "+" #'persp-add-buffer - :desc "Remove perspective by name" "-" #'persp-remove-by-name) - -(define-globalized-minor-mode global-rainbow-mode rainbow-mode - (lambda () (rainbow-mode 1))) -(global-rainbow-mode 1 ) - -(map! :leader - (:prefix ("r" . "registers") - :desc "Copy to register" "c" #'copy-to-register - :desc "Frameset to register" "f" #'frameset-to-register - :desc "Insert contents of register" "i" #'insert-register - :desc "Jump to register" "j" #'jump-to-register - :desc "List registers" "l" #'list-registers - :desc "Number to register" "n" #'number-to-register - :desc "Interactively choose a register" "r" #'counsel-register - :desc "View a register" "v" #'view-register - :desc "Window configuration to register" "w" #'window-configuration-to-register - :desc "Increment register" "+" #'increment-register - :desc "Point to register" "SPC" #'point-to-register)) - -(setq shell-file-name "/bin/bash" - vterm-max-scrollback 5000) -(setq eshell-rc-script "~/.config/doom/eshell/profile" - eshell-aliases-file "~/.config/doom/eshell/aliases" - eshell-history-size 5000 - eshell-buffer-maximum-lines 5000 - eshell-hist-ignoredups t - eshell-scroll-to-bottom-on-input t - eshell-destroy-buffer-when-process-dies t - eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh")) -(map! :leader - :desc "Eshell" "e s" #'eshell - :desc "Eshell popup toggle" "e t" #'+eshell/toggle - :desc "Counsel eshell history" "e h" #'counsel-esh-history - :desc "Vterm popup toggle" "v t" #'+vterm/toggle) - -(defun prefer-horizontal-split () - (set-variable 'split-height-threshold nil t) - (set-variable 'split-width-threshold 40 t)) ; make this as low as needed -(add-hook 'markdown-mode-hook 'prefer-horizontal-split) -(map! :leader - :desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window) - -(map! :leader - (:prefix ("w" . "window") - :desc "Winner redo" "" #'winner-redo - :desc "Winner undo" "" #'winner-undo)) - -(map! :leader - :desc "Zap to char" "z" #'zap-to-char - :desc "Zap up to char" "Z" #'zap-up-to-char) diff --git a/user/.config/doom/config.org b/user/.config/doom/config.org deleted file mode 100644 index c29e6d66f..000000000 --- a/user/.config/doom/config.org +++ /dev/null @@ -1,1155 +0,0 @@ -#+TITLE: DRK's Doom Emacs Config -#+AUTHOR: Clay Gomera (Drake) -#+DESCRIPTION: DRK's personal Doom Emacs config. -#+STARTUP: showeverything -#+PROPERTY: header-args :tangle config.el - -* TABLE OF CONTENTS :toc: -- [[#about-this-config][About this config]] -- [[#beacon][Beacon]] -- [[#bookmarks-and-buffers][Bookmarks and buffers]] - - [[#bookmarks][Bookmarks]] - - [[#buffers][Buffers]] - - [[#global-auto-revert][Global Auto Revert]] - - [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]] -- [[#calendar][Calendar]] -- [[#dashboard][Dashboard]] - - [[#configuring-dashboard][Configuring Dashboard]] - - [[#dashboard-in-emacsclient][Dashboard in Emacsclient]] -- [[#dired][Dired]] - - [[#keybindings-to-open-dired][Keybindings To Open Dired]] - - [[#keybindings-within-dired][Keybindings Within Dired]] - - [[#keybindings-within-dired-with-peep-dired-mode-enabled][Keybindings Within Dired With Peep-Dired-Mode Enabled]] - - [[#making-deleted-files-go-to-trash-can][Making deleted files go to trash can]] -- [[#doom-theme][Doom theme]] -- [[#emojis][Emojis]] -- [[#evaluate-elisp-expressions][Evaluate elisp expressions]] -- [[#eww][Eww]] -- [[#fonts][Fonts]] -- [[#imenu][Imenu]] -- [[#insert-date][Insert date]] -- [[#ivy][Ivy]] - - [[#ivy-posframe][Ivy-posframe]] - - [[#ivy-keybindings][Ivy keybindings]] -- [[#line-settings][Line settings]] -- [[#markdown][Markdown]] -- [[#minimap][Minimap]] -- [[#modeline][Modeline]] -- [[#mouse-support][Mouse support]] -- [[#neotree][Neotree]] -- [[#open-specific-files][Open specific files]] -- [[#org-mode][Org mode]] - - [[#org-fonts][Org fonts]] - - [[#org-export][Org-export]] - - [[#org-journal][Org-journal]] - - [[#org-publish][Org-publish]] - - [[#org-auto-tangle][Org-auto-tangle]] -- [[#perspective][Perspective]] -- [[#rainbow-mode][Rainbow mode]] -- [[#registers][Registers]] -- [[#shells][Shells]] -- [[#splits][Splits]] -- [[#winner-mode][Winner mode]] -- [[#zap-to-char][Zap to char]] - -* About this config -This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs -that uses the "evil" keybindings (Vim keybindings) and includes a number of nice -extensions and a bit of configuration out of the box. I am maintaining this -config not just for myself, but also for those that want to explore some of what -is possible with Emacs. I will add a lot of examples of plugins and settings, -some of them I may not even use personally. This config is a fork of -DistroTube's config. - -* Beacon -Never lose your cursor. When you scroll, your cursor will shine! This is a -global minor-mode. Turn it on everywhere with: - -#+begin_src emacs-lisp -(beacon-mode 1) -#+end_src - -* Bookmarks and buffers -Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers. - -** Bookmarks -Bookmarks are somewhat like registers in that they record positions you can jump -to. Unlike registers, they have long names, and they persist automatically from -one Emacs session to the next. The prototypical use of bookmarks is to record -where you were reading in various files. - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("b". "buffer") - :desc "List bookmarks" "L" #'list-bookmarks - :desc "Save current bookmarks to bookmark file" "w" #'bookmark-save)) -#+END_SRC - -** Buffers -Regarding /buffers/, the text you are editing in Emacs resides in an object called -a /buffer/. Each time you visit a file, a buffer is used to hold the file’s text. -Each time you invoke Dired, a buffer is used to hold the directory listing. -/Ibuffer/ is a program that lists all of your Emacs /buffers/, allowing you to -navigate between them and filter them. - -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------+----------------------+------------| -| ibuffer | Launch ibuffer | SPC b i | -| kill-buffer | Kill current buffer | SPC b k | -| next-buffer | Goto next buffer | SPC b n | -| previous-buffer | Goto previous buffer | SPC b p | -| save-buffer | Save current buffer | SPC b s | - -** Global Auto Revert -A buffer can get out of sync with respect to its visited file on disk if that -file is changed by another program. To keep it up to date, you can enable Auto -Revert mode by typing M-x auto-revert-mode, or you can set it to be turned on -globally with 'global-auto-revert-mode'. I have also turned on Global Auto -Revert on non-file buffers, which is especially useful for 'dired' buffers. - -#+begin_src emacs-lisp -(global-auto-revert-mode 1) -(setq global-auto-revert-non-file-buffers t) -#+end_src - -** Keybindings within ibuffer mode -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------------------------+----------------------------------------+------------| -| ibuffer-mark-forward | Mark the buffer | m | -| ibuffer-unmark-forward | Unmark the buffer | u | -| ibuffer-do-kill-on-deletion-marks | Kill the marked buffers | x | -| ibuffer-filter-by-content | Ibuffer filter by content | f c | -| ibuffer-filter-by-directory | Ibuffer filter by directory | f d | -| ibuffer-filter-by-filename | Ibuffer filter by filename (full path) | f f | -| ibuffer-filter-by-mode | Ibuffer filter by mode | f m | -| ibuffer-filter-by-name | Ibuffer filter by name | f n | -| ibuffer-filter-disable | Disable ibuffer filter | f x | -| ibuffer-do-kill-lines | Hide marked buffers | g h | -| ibuffer-update | Restore hidden buffers | g H | - -#+begin_src emacs-lisp -(evil-define-key 'normal ibuffer-mode-map - (kbd "f c") 'ibuffer-filter-by-content - (kbd "f d") 'ibuffer-filter-by-directory - (kbd "f f") 'ibuffer-filter-by-filename - (kbd "f m") 'ibuffer-filter-by-mode - (kbd "f n") 'ibuffer-filter-by-name - (kbd "f x") 'ibuffer-filter-disable - (kbd "g h") 'ibuffer-do-kill-lines - (kbd "g H") 'ibuffer-update) -#+end_src - -* Calendar -Let's make a 12-month calendar available so we can have a calendar app that, -when we click on time/date in xmobar, we get a nice 12-month calendar to view. - -This is a modification of: http://homepage3.nifty.com/oatu/emacs/calendar.html -See also: https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months - -#+begin_src emacs-lisp -;; https://stackoverflow.com/questions/9547912/emacs-calendar-show-more-than-3-months -(defun dt/year-calendar (&optional year) - (interactive) - (require 'calendar) - (let* ( - (current-year (number-to-string (nth 5 (decode-time (current-time))))) - (month 0) - (year (if year year (string-to-number (format-time-string "%Y" (current-time)))))) - (switch-to-buffer (get-buffer-create calendar-buffer)) - (when (not (eq major-mode 'calendar-mode)) - (calendar-mode)) - (setq displayed-month month) - (setq displayed-year year) - (setq buffer-read-only nil) - (erase-buffer) - ;; horizontal rows - (dotimes (j 4) - ;; vertical columns - (dotimes (i 3) - (calendar-generate-month - (setq month (+ month 1)) - year - ;; indentation / spacing between months - (+ 5 (* 25 i)))) - (goto-char (point-max)) - (insert (make-string (- 10 (count-lines (point-min) (point-max))) ?\n)) - (widen) - (goto-char (point-max)) - (narrow-to-region (point-max) (point-max))) - (widen) - (goto-char (point-min)) - (setq buffer-read-only t))) - -(defun dt/scroll-year-calendar-forward (&optional arg event) - "Scroll the yearly calendar by year in a forward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (unless arg (setq arg 0)) - (save-selected-window - (if (setq event (event-start event)) (select-window (posn-window event))) - (unless (zerop arg) - (let* ( - (year (+ displayed-year arg))) - (dt/year-calendar year))) - (goto-char (point-min)) - (run-hooks 'calendar-move-hook))) - -(defun dt/scroll-year-calendar-backward (&optional arg event) - "Scroll the yearly calendar by year in a backward direction." - (interactive (list (prefix-numeric-value current-prefix-arg) - last-nonmenu-event)) - (dt/scroll-year-calendar-forward (- (or arg 1)) event)) - -(map! :leader - :desc "Scroll year calendar backward" "" #'dt/scroll-year-calendar-backward - :desc "Scroll year calendar forward" "" #'dt/scroll-year-calendar-forward) - -(defalias 'year-calendar 'dt/year-calendar) -#+end_src - -Let's also play around with calfw. -#+begin_src emacs-lisp -(use-package! calfw) -(use-package! calfw-org) -#+end_src - -* Dashboard -Emacs Dashboard is an extensible startup screen showing you recent files, -bookmarks, agenda items and an Emacs banner. - -** Configuring Dashboard -#+begin_src emacs-lisp -(use-package dashboard - :init ;; tweak dashboard config before loading it - (setq dashboard-set-heading-icons t) - (setq dashboard-set-file-icons t) - (setq dashboard-banner-logo-title "\nKEYBINDINGS:\ -\nFind file (SPC .) \ -Open buffer list (SPC b i)\ -\nFind recent files (SPC f r) \ -Open the eshell (SPC e s)\ -\nOpen dired file manager (SPC d d) \ -List of keybindings (SPC h b b)") - ;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner - (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) - (setq dashboard-startup-banner "~/.config/doom/emacs-dash.txt") ;; use custom image as banner - (setq dashboard-center-content nil) ;; set to 't' for centered content - (setq dashboard-items '((recents . 5) - (agenda . 5 ) - (bookmarks . 5) - (projects . 5) - (registers . 5))) - :config - (dashboard-setup-startup-hook) - (dashboard-modify-heading-icons '((recents . "file-text") - (bookmarks . "book")))) -#+end_src - -** Dashboard in Emacsclient -This setting ensures that emacsclient always opens on *dashboard* rather than *scratch*. -#+begin_src emacs-lisp -(setq doom-fallback-buffer "*dashboard*") -#+end_src - -* Dired -Dired is the file manager within Emacs. Below, I setup keybindings for image -previews (peep-dired). Doom Emacs does not use 'SPC d' for any of its -keybindings, so I've chosen the format of 'SPC d' plus 'key'. - -** Keybindings To Open Dired - -| COMMAND | DESCRIPTION | KEYBINDING | -|------------+------------------------------------+------------| -| dired | /Open dired file manager/ | SPC d d | -| dired-jump | /Jump to current directory in dired/ | SPC d j | - -** Keybindings Within Dired -*** Basic dired commands - -| COMMAND | DESCRIPTION | KEYBINDING | -|-------------------------+---------------------------------------------+------------| -| dired-view-file | /View file in dired/ | SPC d v | -| dired-up-directory | /Go up in directory tree/ | h | -| dired-find-file | /Go down in directory tree (or open if file)/ | l | -| dired-next-line | Move down to next line | j | -| dired-previous-line | Move up to previous line | k | -| dired-mark | Mark file at point | m | -| dired-unmark | Unmark file at point | u | -| dired-do-copy | Copy current file or marked files | C | -| dired-do-rename | Rename current file or marked files | R | -| dired-hide-details | Toggle detailed listings on/off | ( | -| dired-git-info-mode | Toggle git information on/off | ) | -| dired-create-directory | Create new empty directory | + | -| dired-diff | Compare file at point with another | = | -| dired-subtree-toggle | Toggle viewing subtree at point | TAB | - -*** Dired commands using regex - -| COMMAND | DESCRIPTION | KEYBINDING | -|-------------------------+----------------------------+------------| -| dired-mark-files-regexp | Mark files using regex | % m | -| dired-do-copy-regexp | Copy files using regex | % C | -| dired-do-rename-regexp | Rename files using regex | % R | -| dired-mark-files-regexp | Mark all files using regex | * % | - -*** File permissions and ownership - -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------+----------------------------------+------------| -| dired-do-chgrp | Change the group of marked files | g G | -| dired-do-chmod | Change the mode of marked files | M | -| dired-do-chown | Change the owner of marked files | O | -| dired-do-rename | Rename file or all marked files | R | - -#+begin_src emacs-lisp -(map! :leader - (:prefix ("d" . "dired") - :desc "Open dired" "d" #'dired - :desc "Dired jump to current" "j" #'dired-jump) - (:after dired - (:map dired-mode-map - :desc "Peep-dired image previews" "d p" #'peep-dired - :desc "Dired view file" "d v" #'dired-view-file))) - -(evil-define-key 'normal dired-mode-map - (kbd "M-RET") 'dired-display-file - (kbd "h") 'dired-up-directory - (kbd "l") 'dired-open-file ; use dired-find-file instead of dired-open. - (kbd "m") 'dired-mark - (kbd "t") 'dired-toggle-marks - (kbd "u") 'dired-unmark - (kbd "C") 'dired-do-copy - (kbd "D") 'dired-do-delete - (kbd "J") 'dired-goto-file - (kbd "M") 'dired-do-chmod - (kbd "O") 'dired-do-chown - (kbd "P") 'dired-do-print - (kbd "R") 'dired-do-rename - (kbd "T") 'dired-do-touch - (kbd "Y") 'dired-copy-filenamecopy-filename-as-kill ; copies filename to kill ring. - (kbd "+") 'dired-create-directory - (kbd "-") 'dired-up-directory - (kbd "% l") 'dired-downcase - (kbd "% u") 'dired-upcase - (kbd "; d") 'epa-dired-do-decrypt - (kbd "; e") 'epa-dired-do-encrypt) -;; Get file icons in dired -(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) -;; With dired-open plugin, you can launch external programs for certain extensions -;; For example, I set all .png files to open in 'sxiv' and all .mp4 files to open in 'mpv' -(setq dired-open-extensions '(("gif" . "sxiv") - ("jpg" . "sxiv") - ("png" . "sxiv") - ("mkv" . "mpv") - ("mp4" . "mpv"))) -#+end_src - -** Keybindings Within Dired With Peep-Dired-Mode Enabled -If peep-dired is enabled, you will get image previews as you go up/down with 'j' -and 'k' - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------------+------------------------------------------+------------| -| peep-dired | /Toggle previews within dired/ | SPC d p | -| peep-dired-next-file | /Move to next file in peep-dired-mode/ | j | -| peep-dired-prev-file | /Move to previous file in peep-dired-mode/ | k | - -#+BEGIN_SRC emacs-lisp -(evil-define-key 'normal peep-dired-mode-map - (kbd "j") 'peep-dired-next-file - (kbd "k") 'peep-dired-prev-file) -(add-hook 'peep-dired-hook 'evil-normalize-keymaps) -#+END_SRC - -** Making deleted files go to trash can -#+begin_src emacs-lisp -(setq delete-by-moving-to-trash t - trash-directory "~/.local/share/Trash/files/") -#+end_src - -* Doom theme -Setting the theme to doom-gruvbox. To try out new themes, I set a keybinding for -counsel-load-theme with 'SPC h t'. - -#+BEGIN_SRC emacs-lisp -(setq doom-theme 'doom-gruvbox) -(map! :leader - :desc "Load new theme" "h t" #'counsel-load-theme) -#+END_SRC - -* Emojis -Emojify is an Emacs extension to display emojis. It can display github style -emojis like :smile: or plain ascii ones like :). - -#+begin_src emacs-lisp -(use-package emojify - :hook (after-init . global-emojify-mode)) -#+end_src - -* Evaluate elisp expressions -Changing some keybindings from their defaults to better fit with Doom Emacs, and -to avoid conflicts with my window managers which sometimes use the control key -in their keybindings. By default, Doom Emacs does not use 'SPC e' for anything, -so I choose to use the format 'SPC e' plus 'key' for these (I also use 'SPC e' -for 'eww' keybindings). - -| COMMAND | DESCRIPTION | KEYBINDING | -|-----------------+----------------------------------------------+------------| -| eval-buffer | /Evaluate elisp in buffer/ | SPC e b | -| eval-defun | /Evaluate the defun containing or after point/ | SPC e d | -| eval-expression | /Evaluate an elisp expression/ | SPC e e | -| eval-last-sexp | /Evaluate elisp expression before point/ | SPC e l | -| eval-region | /Evaluate elisp in region/ | SPC e r | - -#+Begin_src emacs-lisp -(map! :leader - (:prefix ("e". "evaluate/EWW") - :desc "Evaluate elisp in buffer" "b" #'eval-buffer - :desc "Evaluate defun" "d" #'eval-defun - :desc "Evaluate elisp expression" "e" #'eval-expression - :desc "Evaluate last sexpression" "l" #'eval-last-sexp - :desc "Evaluate elisp in region" "r" #'eval-region)) -#+END_SRC - -* Eww -EWW is the Emacs Web Wowser, the builtin browser in Emacs. Below I set urls to -open in a specific browser (eww) with browse-url-browser-function. By default, -Doom Emacs does not use 'SPC e' for anything, so I choose to use the format 'SPC -e' plus 'key' for these (I also use 'SPC e' for 'eval' keybindings). I chose to -use 'SPC s w' for eww-search-words because Doom Emacs uses 'SPC s' for 'search' -commands. - -#+BEGIN_SRC emacs-lisp -(setq browse-url-browser-function 'eww-browse-url) -(map! :leader - :desc "Search web for text between BEG/END" - "s w" #'eww-search-words - (:prefix ("e" . "evaluate/EWW") - :desc "Eww web browser" "w" #'eww - :desc "Eww reload page" "R" #'eww-reload)) -#+END_SRC - -* Fonts -Settings related to fonts within Doom Emacs: -+ 'doom-font' -- standard monospace font that is used for most things in Emacs. -+ 'doom-variable-pitch-font' -- variable font which is useful in some Emacs plugins. -+ 'doom-big-font' -- used in doom-big-font-mode; useful for presentations. -+ 'font-lock-comment-face' -- for comments. -+ 'font-lock-keyword-face' -- for keywords with special significanclike 'setq' in elisp. - -#+BEGIN_SRC emacs-lisp -(setq doom-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-variable-pitch-font (font-spec :family "mononoki Nerd Font" :size 15) - doom-big-font (font-spec :family "mononoki Nerd Font" :size 20)) -(after! doom-themes - (setq doom-themes-enable-bold t - doom-themes-enable-italic t)) -(custom-set-faces! - '(font-lock-comment-face :slant italic) - '(font-lock-keyword-face :slant italic)) -#+END_SRC - -* Imenu -Imenu produces menus for accessing locations in documents, typically in the -current buffer. You can access the locations using an ordinary menu (menu bar or -other) or using minibuffer completion, or you can install 'imenu-list' and have -the imenu displayed as a vertical split that you can toggle show/hide. - -| COMMAND | DESCRIPTION | KEYBINDING | -|-------------------------+----------------------------------+------------| -| counsel-imenu | /Menu to jump to places in buffer/ | SPC s i | -| imenu-list-smart-toggle | /Toggle imenu shown in a sidebar/ | SPC t i | - -#+BEGIN_SRC emacs-lisp -(setq imenu-list-focus-after-activation t) - -(map! :leader - (:prefix ("s" . "Search") - :desc "Menu to jump to places in buffer" "i" #'counsel-imenu)) - -(map! :leader - (:prefix ("t" . "Toggle") - :desc "Toggle imenu shown in a sidebar" "i" #'imenu-list-smart-toggle)) - -#+END_SRC - -* Insert date -Some custom functions to insert the date. The function 'insert-todays-date' can -be used one of three different ways: (1) just the keybinding without the -universal argument prefix, (2) with one universal argument prefix, or (3) with -two universal argument prefixes. The universal argument prefix is 'SPC-u' in -Doom Emacs (C-u in standard GNU Emacs). The function 'insert-any-date' only -outputs to one format, which is the same format as 'insert-todays-date' without -a prefix. - -| COMMAND | EXAMPLE OUTPUT | KEYBINDING | -|-----------------------+---------------------------+-----------------------| -| dt/insert-todays-date | Friday, November 19, 2021 | SPC i d t | -| dt/insert-todays-date | 11-19-2021 | SPC u SPC i d t | -| dt/insert-todays-date | 2021-11-19 | SPC u SPC u SPC i d t | -| dt/insert-any-date | Friday, November 19, 2021 | SPC i d a | - -#+begin_src emacs-lisp -(defun dt/insert-todays-date (prefix) - (interactive "P") - (let ((format (cond - ((not prefix) "%A, %B %d, %Y") - ((equal prefix '(4)) "%m-%d-%Y") - ((equal prefix '(16)) "%Y-%m-%d")))) - (insert (format-time-string format)))) - -(require 'calendar) -(defun dt/insert-any-date (date) - "Insert DATE using the current locale." - (interactive (list (calendar-read-date))) - (insert (calendar-date-string date))) - -(map! :leader - (:prefix ("i d" . "Insert date") - :desc "Insert any date" "a" #'dt/insert-any-date - :desc "Insert todays date" "t" #'dt/insert-todays-date)) -#+end_src - -* Ivy -Ivy is a generic completion mechanism for Emacs. - -** Ivy-posframe -Ivy-posframe is an ivy extension, which lets ivy use posframe to show its -candidate menu. Some of the settings below involve: -+ ivy-posframe-display-functions-alist -- sets the display position for specific - programs -+ ivy-posframe-height-alist -- sets the height of the list displayed for - specific programs - -# Available functions (positions) for 'ivy-posframe-display-functions-alist' -+ ivy-posframe-display-at-frame-center -+ ivy-posframe-display-at-window-center -+ ivy-posframe-display-at-frame-bottom-left -+ ivy-posframe-display-at-window-bottom-left -+ ivy-posframe-display-at-frame-bottom-window-center -+ ivy-posframe-display-at-point -+ ivy-posframe-display-at-frame-top-center - -=NOTE:= If the setting for 'ivy-posframe-display' is set to 'nil' (false), -anything that is set to 'ivy-display-function-fallback' will just default to -their normal position in Doom Emacs (usually a bottom split). However, if this -is set to 't' (true), then the fallback position will be centered in the window. - -#+BEGIN_SRC emacs-lisp -(setq ivy-posframe-display-functions-alist - '((swiper . ivy-posframe-display-at-point) - (complete-symbol . ivy-posframe-display-at-point) - (counsel-M-x . ivy-display-function-fallback) - (counsel-esh-history . ivy-posframe-display-at-window-center) - (counsel-describe-function . ivy-display-function-fallback) - (counsel-describe-variable . ivy-display-function-fallback) - (counsel-find-file . ivy-display-function-fallback) - (counsel-recentf . ivy-display-function-fallback) - (counsel-register . ivy-posframe-display-at-frame-bottom-window-center) - (dmenu . ivy-posframe-display-at-frame-top-center) - (nil . ivy-posframe-display)) - ivy-posframe-height-alist - '((swiper . 20) - (dmenu . 20) - (t . 10))) -(ivy-posframe-mode 1) ; 1 enables posframe-mode, 0 disables it. -#+END_SRC - -** Ivy keybindings -By default, Doom Emacs does not use 'SPC v', so the format I use for these -bindings is 'SPC v' plus 'key'. - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("v" . "Ivy") - :desc "Ivy push view" "v p" #'ivy-push-view - :desc "Ivy switch view" "v s" #'ivy-switch-view)) -#+END_SRC - -* Line settings -I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for -me on my ZSA Moonlander keyboard. The standard Emacs keybinding for -comment-line is 'C-x C-;'. The other keybindings are for commands that toggle -on/off various line-related settings. Doom Emacs uses 'SPC t' for "toggle" -commands, so I choose 'SPC t' plus 'key' for those bindings. - -| COMMAND | DESCRIPTION | KEYBINDING | -|--------------------------+-------------------------------------------+-------------| -| comment-line | /Comment or uncomment lines/ | SPC TAB TAB | -| hl-line-mode | /Toggle line highlighting in current frame/ | SPC t h | -| global-hl-line-mode | /Toggle line highlighting globally/ | SPC t H | -| doom/toggle-line-numbers | /Toggle line numbers/ | SPC t l | -| toggle-truncate-lines | /Toggle truncate lines/ | SPC t t | - -#+BEGIN_SRC emacs-lisp -(setq display-line-numbers-type t) -(map! :leader - :desc "Comment or uncomment lines" "TAB TAB" #'comment-line - (:prefix ("t" . "toggle") - :desc "Toggle line numbers" "l" #'doom/toggle-line-numbers - :desc "Toggle line highlight in frame" "h" #'hl-line-mode - :desc "Toggle line highlight globally" "H" #'global-hl-line-mode - :desc "Toggle truncate lines" "t" #'toggle-truncate-lines)) -#+END_SRC - -* Markdown - -#+begin_src emacs-lisp -(custom-set-faces - '(markdown-header-face ((t (:inherit font-lock-function-name-face :weight bold :family "variable-pitch")))) - '(markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.7)))) - '(markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.6)))) - '(markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.5)))) - '(markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.4)))) - '(markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.3)))) - '(markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.2))))) -#+end_src - -* Minimap -A minimap sidebar displaying a smaller version of the current buffer on either -the left or right side. It highlights the currently shown region and updates its -position automatically. Be aware that this minimap program does not work in Org -documents. This is not unusual though because I have tried several minimap -programs and none of them can handle Org. - -| COMMAND | DESCRIPTION | KEYBINDING | -|--------------+-------------------------------------------+------------| -| minimap-mode | /Toggle minimap-mode/ | SPC t m | - -#+begin_src emacs-lisp -(setq minimap-window-location 'right) -(map! :leader - (:prefix ("t" . "toggle") - :desc "Toggle minimap-mode" "m" #'minimap-mode)) -#+end_src - -* Modeline -The modeline is the bottom status bar that appears in Emacs windows. For more -information on what is available to configure in the Doom modeline, check out: -https://github.com/seagle0128/doom-modeline - -#+begin_src emacs-lisp -(set-face-attribute 'mode-line nil :font "mononoki Nerd Font-13") -(setq doom-modeline-height 30 ;; sets modeline height - doom-modeline-bar-width 5 ;; sets right bar width - doom-modeline-persp-name t ;; adds perspective name to modeline - doom-modeline-persp-icon t) ;; adds folder icon next to persp name -#+end_src - -* Mouse support -Adding mouse support in the terminal version of Emacs. - -#+begin_src emacs-lisp -(xterm-mouse-mode 1) -#+end_src - -* Neotree -Neotree is a file tree viewer. When you open neotree, it jumps to the current -file thanks to neo-smart-open. The neo-window-fixed-size setting makes the -neotree width be adjustable. Doom Emacs had no keybindings set for neotree. -Since Doom Emacs uses 'SPC t' for 'toggle' keybindings, I used 'SPC t n' for -toggle-neotree. - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------+---------------------------+------------| -| neotree-toggle | /Toggle neotree/ | SPC t n | -| neotree- dir | /Open directory in neotree/ | SPC d n | - -#+BEGIN_SRC emacs-lisp -(after! neotree - (setq neo-smart-open t - neo-window-fixed-size nil)) -(after! doom-themes - (setq doom-neotree-enable-variable-pitch t)) -(map! :leader - :desc "Toggle neotree file viewer" "t n" #'neotree-toggle - :desc "Open directory in neotree" "d n" #'neotree-dir) -#+END_SRC - -* Open specific files -Keybindings to open files that I work with all the time using the find-file -command, which is the interactive file search that opens with 'C-x C-f' in GNU -Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file -non-interactively since we specify exactly what file to open. The format I use -for these bindings is 'SPC =' plus 'key' since Doom Emacs does not use 'SPC ='. - -| PATH TO FILE | DESCRIPTION | KEYBINDING | -|--------------------------------+-----------------------+------------| -| ~/Org/agenda.org | /Edit agenda file/ | SPC = a | -| ~/.config/doom/config.org" | /Edit doom config.org/ | SPC = c | -| ~/.config/doom/init.el" | /Edit doom init.el/ | SPC = i | -| ~/.config/doom/packages.el" | /Edit doom packages.el/ | SPC = p | -| ~/.config/doom/eshell/aliases" | /Edit eshell aliases/ | SPC = e a | -| ~/.config/doom/eshell/profile" | /Edit eshell profile/ | SPC = e p | - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("=" . "open file") - :desc "Edit agenda file" "a" #'(lambda () (interactive) (find-file "~/Org/agenda.org")) - :desc "Edit doom config.org" "c" #'(lambda () (interactive) (find-file "~/.config/doom/config.org")) - :desc "Edit doom init.el" "i" #'(lambda () (interactive) (find-file "~/.config/doom/init.el")) - :desc "Edit doom packages.el" "p" #'(lambda () (interactive) (find-file "~/.config/doom/packages.el")))) -(map! :leader - (:prefix ("= e" . "open eshell files") - :desc "Edit eshell aliases" "a" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/aliases")) - :desc "Edit eshell profile" "p" #'(lambda () (interactive) (find-file "~/.config/doom/eshell/profile")))) -#+END_SRC - -* Org mode -I wrapped most of this block in (after! org). Without this, my settings might -be evaluated too early, which will result in my settings being overwritten by -Doom's defaults. I have also enabled org-journal, org-superstar and org-roam by -adding (+journal +pretty +roam2) to the org section of my Doom Emacs init.el. - -=NOTE:= I have the location of my Org directory and Roam directory in $HOME/nc/ -which is a Nextcloud folder that allows me to instantly sync all of my Org work -between my home computer and my office computer. - -#+BEGIN_SRC emacs-lisp -(map! :leader - :desc "Org babel tangle" "m B" #'org-babel-tangle) -(after! org - (setq org-directory "~/Documents/Notes" - org-agenda-files '("~/Documents/Agenda/agenda.org") - org-default-notes-file (expand-file-name "notes.org" org-directory) - org-ellipsis " ▼ " - org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆") - org-superstar-item-bullet-alist '((?+ . ?➤) (?- . ?✦)) ; changes +/- symbols in item lists - org-log-done 'time - org-hide-emphasis-markers t - ;; ex. of org-link-abbrev-alist in action - ;; [[arch-wiki:Name_of_Page][Description]] - org-link-abbrev-alist ; This overwrites the default Doom org-link-abbrev-list - '(("google" . "http://www.google.com/search?q=") - ("arch-wiki" . "https://wiki.archlinux.org/index.php/") - ("ddg" . "https://duckduckgo.com/?q=") - ("wiki" . "https://en.wikipedia.org/wiki/")) - org-todo-keywords ; This overwrites the default Doom org-todo-keywords - '((sequence - "TODO(t)" ; A task that is ready to be tackled - "BLOG(b)" ; Blog writing assignments - "GYM(g)" ; Things to accomplish at the gym - "GAME(j)" ; Things to accomplish at the gym - "PROJ(p)" ; A project that contains other tasks - "VIDEO(v)" ; Video assignments - "WAIT(w)" ; Something is holding up this task - "|" ; The pipe necessary to separate "active" states and "inactive" states - "DONE(d)" ; Task has been completed - "CANCELLED(c)" )))) ; Task has been cancelled - (setq org-agenda-custom-commands - '(("p" "Priority view" - ((tags "PRIORITY=\"A\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "High priority unfinished tasks:"))) - (tags "PRIORITY=\"B\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Medium priority unfinished tasks:"))) - (tags "PRIORITY=\"C\"" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Low priority unfinished tasks:"))))) - ("i" "INTEC view" - ((tags "tareas" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Tareas por hacer:"))) - (tags "estudios" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Estudios por realizar:"))) - (tags "examen" - ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) - (org-agenda-overriding-header "Examenes pendientes:"))))) - )) - - (setq - org-agenda-block-separator 985827 - org-fancy-priorities-list '("󰈼" "󰈻" "󰈽") - org-priority-faces - '((?A :foreground "#fb4934" :weight bold) - (?B :foreground "#fabd2f" :weight bold) - (?C :foreground "#83a598" :weight bold))) - -#+END_SRC - -** Org fonts -I have created an interactive function for each color scheme (M-x -dt/org-colors-*). These functions will set appropriate colors and font -attributes for org-level fonts and the org-table font. - -#+begin_src emacs-lisp - -(defun dt/org-colors-doom-one () - "Enable Doom One colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#51afef" ultra-bold) - (org-level-2 1.6 "#c678dd" extra-bold) - (org-level-3 1.5 "#98be65" bold) - (org-level-4 1.4 "#da8548" semi-bold) - (org-level-5 1.3 "#5699af" normal) - (org-level-6 1.2 "#a9a1e1" normal) - (org-level-7 1.1 "#46d9ff" normal) - (org-level-8 1.0 "#ff6c6b" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-dracula () - "Enable Dracula colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#8be9fd" ultra-bold) - (org-level-2 1.6 "#bd93f9" extra-bold) - (org-level-3 1.5 "#50fa7b" bold) - (org-level-4 1.4 "#ff79c6" semi-bold) - (org-level-5 1.3 "#9aedfe" normal) - (org-level-6 1.2 "#caa9fa" normal) - (org-level-7 1.1 "#5af78e" normal) - (org-level-8 1.0 "#ff92d0" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-gruvbox-dark () - "Enable Gruvbox Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#458588" ultra-bold) - (org-level-2 1.6 "#b16286" extra-bold) - (org-level-3 1.5 "#98971a" bold) - (org-level-4 1.4 "#fb4934" semi-bold) - (org-level-5 1.3 "#83a598" normal) - (org-level-6 1.2 "#d3869b" normal) - (org-level-7 1.1 "#d79921" normal) - (org-level-8 1.0 "#8ec07c" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-monokai-pro () - "Enable Monokai Pro colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#78dce8" ultra-bold) - (org-level-2 1.6 "#ab9df2" extra-bold) - (org-level-3 1.5 "#a9dc76" bold) - (org-level-4 1.4 "#fc9867" semi-bold) - (org-level-5 1.3 "#ff6188" normal) - (org-level-6 1.2 "#ffd866" normal) - (org-level-7 1.1 "#78dce8" normal) - (org-level-8 1.0 "#ab9df2" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-nord () - "Enable Nord colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a1c1" ultra-bold) - (org-level-2 1.6 "#b48ead" extra-bold) - (org-level-3 1.5 "#a3be8c" bold) - (org-level-4 1.4 "#ebcb8b" semi-bold) - (org-level-5 1.3 "#bf616a" normal) - (org-level-6 1.2 "#88c0d0" normal) - (org-level-7 1.1 "#81a1c1" normal) - (org-level-8 1.0 "#b48ead" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-oceanic-next () - "Enable Oceanic Next colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#6699cc" ultra-bold) - (org-level-2 1.6 "#c594c5" extra-bold) - (org-level-3 1.5 "#99c794" bold) - (org-level-4 1.4 "#fac863" semi-bold) - (org-level-5 1.3 "#5fb3b3" normal) - (org-level-6 1.2 "#ec5f67" normal) - (org-level-7 1.1 "#6699cc" normal) - (org-level-8 1.0 "#c594c5" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-palenight () - "Enable Palenight colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#82aaff" ultra-bold) - (org-level-2 1.6 "#c792ea" extra-bold) - (org-level-3 1.5 "#c3e88d" bold) - (org-level-4 1.4 "#ffcb6b" semi-bold) - (org-level-5 1.3 "#a3f7ff" normal) - (org-level-6 1.2 "#e1acff" normal) - (org-level-7 1.1 "#f07178" normal) - (org-level-8 1.0 "#ddffa7" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-dark () - "Enable Solarized Dark colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-solarized-light () - "Enable Solarized Light colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#268bd2" ultra-bold) - (org-level-2 1.6 "#d33682" extra-bold) - (org-level-3 1.5 "#859900" bold) - (org-level-4 1.4 "#b58900" semi-bold) - (org-level-5 1.3 "#cb4b16" normal) - (org-level-6 1.2 "#6c71c4" normal) - (org-level-7 1.1 "#2aa198" normal) - (org-level-8 1.0 "#657b83" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -(defun dt/org-colors-tomorrow-night () - "Enable Tomorrow Night colors for Org headers." - (interactive) - (dolist - (face - '((org-level-1 1.7 "#81a2be" ultra-bold) - (org-level-2 1.6 "#b294bb" extra-bold) - (org-level-3 1.5 "#b5bd68" bold) - (org-level-4 1.4 "#e6c547" semi-bold) - (org-level-5 1.3 "#cc6666" normal) - (org-level-6 1.2 "#70c0ba" normal) - (org-level-7 1.1 "#b77ee0" normal) - (org-level-8 1.0 "#9ec400" normal))) - (set-face-attribute (nth 0 face) nil :font doom-variable-pitch-font :weight (nth 3 face) :height (nth 1 face) :foreground (nth 2 face))) - (set-face-attribute 'org-table nil :font doom-font :weight 'normal :height 1.0 :foreground "#bfafdf")) - -;; Load our desired dt/org-colors-* theme on startup -(dt/org-colors-tomorrow-night) - -#+end_src - -** Org-export -We need ox-man for "Org eXporting" to manpage format and ox-gemini for exporting -to gemtext (for the gemini protocol). - -=NOTE:= I also enable ox-publish for converting an Org site into an HTML site, -but that is done in init.el (org +publish). - -#+BEGIN_SRC emacs-lisp -(use-package ox-man) -(use-package ox-gemini) -#+END_SRC - -** Org-journal -#+begin_src emacs-lisp -(setq org-journal-dir "~/nc/Org/journal/" - org-journal-date-prefix "* " - org-journal-time-prefix "** " - org-journal-date-format "%B %d, %Y (%A) " - org-journal-file-format "%Y-%m-%d.org") -#+end_src - -** Org-publish -#+begin_src emacs-lisp -(setq org-publish-use-timestamps-flag nil) -(setq org-export-with-broken-links t) -#+end_src - -** Org-auto-tangle -=org-auto-tangle= allows you to add the option =#+auto_tangle: t= in your Org file so that it automatically tangles when you save the document. - -#+begin_src emacs-lisp -(use-package! org-auto-tangle - :defer t - :hook (org-mode . org-auto-tangle-mode) - :config - (setq org-auto-tangle-default t)) - -#+end_src - -* Perspective -Perspective provides multiple named workspaces (or "perspectives") in Emacs, -similar to having multiple desktops in window managers like Awesome and XMonad. -Each perspective has its own buffer list and its own window layout, making it -easy to work on many separate projects without getting lost in all the buffers. -Switching to a perspective activates its window configuration, and when in a -perspective, only its buffers are available (by default). Doom Emacs uses 'SPC -some_key' for binding some of the perspective commands, so I used this binging -format for the perspective bindings that I created.. - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------------------+-------------------------------------+------------| -| persp-switch | Switch to perspective NAME | SPC DEL | -| persp-switch-to-buffer | Switch to buffer in perspective | SPC , | -| persp-next | Switch to next perspective | SPC ] | -| persp-prev | Switch to previous perspective | SPC [ | -| persp-add-buffer | Add a buffer to current perspective | SPC + | -| persp-remove-by-name | Remove perspective by name | SPC - | -| +workspace/switch-to-{0-9} | Switch to workspace /n/ | SPC 0-9 | - -#+begin_src emacs-lisp -(map! :leader - :desc "Switch to perspective NAME" "DEL" #'persp-switch - :desc "Switch to buffer in perspective" "," #'persp-switch-to-buffer - :desc "Switch to next perspective" "]" #'persp-next - :desc "Switch to previous perspective" "[" #'persp-prev - :desc "Add a buffer current perspective" "+" #'persp-add-buffer - :desc "Remove perspective by name" "-" #'persp-remove-by-name) -#+end_src - -* Rainbow mode -Rainbox mode displays the actual color for any hex value color. It's such a -nice feature that I wanted it turned on all the time, regardless of what mode I -am in. The following creates a global minor mode for rainbow-mode and enables -it. - -#+begin_src emacs-lisp -(define-globalized-minor-mode global-rainbow-mode rainbow-mode - (lambda () (rainbow-mode 1))) -(global-rainbow-mode 1 ) -#+end_src - -* Registers -Emacs registers are compartments where you can save text, rectangles and -positions for later use. Once you save text or a rectangle in a register, you -can copy it into the buffer once or many times; once you save a position in a -register, you can jump back to that position once or many times. The default -GNU Emacs keybindings for these commands (with the exception of -counsel-register) involves 'C-x r' followed by one or more other keys. I wanted -to make this a little more user friendly, and since I am using Doom Emacs, I -choose to replace the 'C-x r' part of the key chords with 'SPC r'. - -| COMMAND | DESCRIPTION | KEYBINDING | -|----------------------------------+----------------------------------+------------| -| copy-to-register | /Copy to register/ | SPC r c | -| frameset-to-register | /Frameset to register/ | SPC r f | -| insert-register | /Insert contents of register/ | SPC r i | -| jump-to-register | /Jump to register/ | SPC r j | -| list-registers | /List registers/ | SPC r l | -| number-to-register | /Number to register/ | SPC r n | -| counsel-register | /Interactively choose a register/ | SPC r r | -| view-register | /View a register/ | SPC r v | -| window-configuration-to-register | /Window configuration to register/ | SPC r w | -| increment-register | /Increment register/ | SPC r + | -| point-to-register | /Point to register/ | SPC r SPC | - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("r" . "registers") - :desc "Copy to register" "c" #'copy-to-register - :desc "Frameset to register" "f" #'frameset-to-register - :desc "Insert contents of register" "i" #'insert-register - :desc "Jump to register" "j" #'jump-to-register - :desc "List registers" "l" #'list-registers - :desc "Number to register" "n" #'number-to-register - :desc "Interactively choose a register" "r" #'counsel-register - :desc "View a register" "v" #'view-register - :desc "Window configuration to register" "w" #'window-configuration-to-register - :desc "Increment register" "+" #'increment-register - :desc "Point to register" "SPC" #'point-to-register)) -#+END_SRC - -* Shells -Settings for the various shells and terminal emulators within Emacs. -+ 'shell-file-name' -- sets the shell to be used in M-x shell, M-x term, M-x - ansi-term and M-x vterm. -+ 'eshell-aliases-file' -- sets an aliases file for the eshell. - -#+BEGIN_SRC emacs-lisp -(setq shell-file-name "/bin/bash" - vterm-max-scrollback 5000) -(setq eshell-rc-script "~/.config/doom/eshell/profile" - eshell-aliases-file "~/.config/doom/eshell/aliases" - eshell-history-size 5000 - eshell-buffer-maximum-lines 5000 - eshell-hist-ignoredups t - eshell-scroll-to-bottom-on-input t - eshell-destroy-buffer-when-process-dies t - eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh")) -(map! :leader - :desc "Eshell" "e s" #'eshell - :desc "Eshell popup toggle" "e t" #'+eshell/toggle - :desc "Counsel eshell history" "e h" #'counsel-esh-history - :desc "Vterm popup toggle" "v t" #'+vterm/toggle) -#+END_SRC - -* Splits -I set splits to default to opening on the right using 'prefer-horizontal-split'. -I set a keybinding for 'clone-indirect-buffer-other-window' for when I want to -have the same document in two splits. The text of the indirect buffer is always -identical to the text of its base buffer; changes made by editing either one are -visible immediately in the other. But in all other respects, the indirect -buffer and its base buffer are completely separate. For example, I can fold one -split but other will be unfolded. - -#+BEGIN_SRC emacs-lisp -(defun prefer-horizontal-split () - (set-variable 'split-height-threshold nil t) - (set-variable 'split-width-threshold 40 t)) ; make this as low as needed -(add-hook 'markdown-mode-hook 'prefer-horizontal-split) -(map! :leader - :desc "Clone indirect buffer other window" "b c" #'clone-indirect-buffer-other-window) -#+END_SRC - -* Winner mode -Winner mode has been included with GNU Emacs since version 20. This is a global -minor mode and, when activated, it allows you to “undo” (and “redo”) changes in -the window configuration with the key commands 'SCP w ' and 'SPC w -'. - -#+BEGIN_SRC emacs-lisp -(map! :leader - (:prefix ("w" . "window") - :desc "Winner redo" "" #'winner-redo - :desc "Winner undo" "" #'winner-undo)) -#+END_SRC - -* Zap to char -Emacs provides a 'zap-to-char' command that kills from the current point to a -character. It is bound to 'M-z' in standard GNU Emacs but since Doom Emacs uses -'SPC' as its leader key and does not have 'SPC z' binded to anything, it just -makes since to use it for 'zap-to-char'. Note that 'zap-to-char' can be used -with the universal argument 'SPC u' to modify its behavior. Examples of -'zap-to-char' usage are listed in the table below: - -| KEYBINDING | WHAT IS DOES | -|---------------------------+------------------------------------------------------------| -| SPC z e | deletes all chars to the next occurrence of 'e' | -| SPC u 2 SPC z e | deletes all chars to the second occurrence of 'e' | -| SPC u - SPC z e | deletes all chars to the previous occurrence of 'e' | -| SPC u -2 SPC z e | deletes all chars to the fourth previous occurrence of 'e' | -| SPC u 1 0 0 SPC u SPC z e | deletes all chars to the 100th occurrence of 'e' | - -=TIP:= The universal argument (SPC u) can only take a single integer by default. -If you need to use a multi-digit number (like 100 in the last example in the -table above), then you must terminate the universal argument with another 'SPC -u' after typing the number. - -'zap-up-to-char' is an alternative command that does not zap the char specified. -It is binded to 'SPC Z'. It can also be used in conjunction with the universal -argument 'SPC u' in similar fashion to the the 'zap-to-char' examples above. - -=NOTE:= Vim (evil mode) has similar functionality builtin. You can delete to -the next occurrence of 'e' by using 'dte' in normal. To delete to the next -occurrence of 'e' including the 'e', then you would use 'dfe'. And you can -modify 'dt' and 'df' by prefixing them with numbers, so '2dte' would delete to -the second occurrence of 'e'. - -#+BEGIN_SRC emacs-lisp -(map! :leader - :desc "Zap to char" "z" #'zap-to-char - :desc "Zap up to char" "Z" #'zap-up-to-char) -#+END_SRC diff --git a/user/.config/doom/emacs-dash.txt b/user/.config/doom/emacs-dash.txt deleted file mode 100644 index 5d5f70293..000000000 --- a/user/.config/doom/emacs-dash.txt +++ /dev/null @@ -1,19 +0,0 @@ - ================= =============== =============== ======== ======== - \\ . . . . . . .\\ //. . . . . . .\\ //. . . . . . .\\ \\. . .\\// . . // - ||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\/ . . .|| - || . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . || - ||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .|| - || . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\ . . . . || - ||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\_ . .|. .|| - || . _|| || || || || ||_ . || || . _|| || || || |\ `-_/| . || - ||_-' || .|/ || || \|. || `-_|| ||_-' || .|/ || || | \ / |-_.|| - || ||_-' || || `-_|| || || ||_-' || || | \ / | `|| - || `' || || `' || || `' || || | \ / | || - || .===' `===. .==='.`===. .===' /==. | \/ | || - || .==' \_|-_ `===. .===' _|_ `===. .===' _-|/ `== \/ | || - || .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \/ | || - || .==' _-' '-__\._-' '-_./__-' `' |. /| | || - ||.==' _-' `' | /==.|| - ==' _-' EMACS \/ `== - \ _-' `-_ / - `'' ``' diff --git a/user/.config/doom/eshell/aliases b/user/.config/doom/eshell/aliases deleted file mode 100644 index ef5aa3a9e..000000000 --- a/user/.config/doom/eshell/aliases +++ /dev/null @@ -1,26 +0,0 @@ -# Aliases for emacs commands -alias ff find-file $1 - -# Changing "ls" to "exa" -alias ls exa -al --color=always --group-directories-first $* # my preferred listing -alias la exa -a --color=always --group-directories-first $* # all files and dirs -alias ll exa -l --color=always --group-directories-first $* # long format -alias lt exa -aT --color=always --group-directories-first $* # tree listing -alias l. exa -a1 $* | grep "^\." # list hidden files - -# Merge Xresources -alias merge xrdb -merge ~/.Xresources - -# Aliases for doom emacs utilties -alias doomsync ~/.emacs.d/bin/doom sync -alias doomdoctor ~/.emacs.d/bin/doom doctor -alias doomupgrade ~/.emacs.d/bin/doom upgrade -alias doompurge ~/.emacs.d/bin/doom purge - -# Confirm before overwriting something -alias cp cp -i $1 -alias mv mv -i $1 -alias rm rm -i $1 - -# bare git repo alias for dotfiles -alias config /usr/bin/git --git-dir=$HOME/dotfiles --work-tree=$HOME $* diff --git a/user/.config/doom/eshell/profile b/user/.config/doom/eshell/profile deleted file mode 100644 index 3c871d69c..000000000 --- a/user/.config/doom/eshell/profile +++ /dev/null @@ -1 +0,0 @@ -colorscript random \ No newline at end of file diff --git a/user/.config/doom/init.el b/user/.config/doom/init.el deleted file mode 100644 index 07422364e..000000000 --- a/user/.config/doom/init.el +++ /dev/null @@ -1,191 +0,0 @@ -;;; init.el -*- lexical-binding: t; -*- - -;; This file controls what Doom modules are enabled and what order they load -;; in. Remember to run 'doom sync' after modifying it! - -;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find a "Module Index" link where you'll find -;; a comprehensive list of Doom's modules and what flags they support. - -;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or -;; 'C-c c k' for non-vim users) to view its documentation. This works on -;; flags as well (those symbols that start with a plus). -;; -;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its -;; directory (for easy access to its source code). - -(doom! :input - ;;chinese - ;;japanese - ;;layout ; auie,ctsrnm is the superior home row - - :completion - company ; the ultimate code completion backend - ;;helm ; the *other* search engine for love and life - ;;ido ; the other *other* search engine... - (ivy +fonts +childframe) ; a search engine for love and life - - :ui - ;;deft ; notational velocity for Emacs - doom ; what makes DOOM look the way it does - ;;doom-dashboard ; a nifty splash screen for Emacs - doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode) ; 🙂 - ;;fill-column ; a `fill-column' indicator - hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra - ;;indent-guides ; highlighted indent columns - (ligatures +extras) ; ligatures and symbols to make your code pretty again - ;;minimap ; show a map of the code on the side - modeline ; snazzy, Atom-inspired modeline, plus API - ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on - (popup +defaults) ; tame sudden yet inevitable temporary windows - ;;tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler - ;;unicode ; extended unicode support for various languages - vc-gutter ; vcs diff in the fringe - vi-tilde-fringe ; fringe tildes to mark beyond EOB - window-select ; visually switch windows - workspaces ; tab emulation, persistence & separate workspaces - zen ; distraction-free coding or writing - - :editor - (evil +everywhere) ; come to the dark side, we have cookies - file-templates ; auto-snippets for empty files - fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness - ;;god ; run Emacs commands without modifier keys - lispy ; vim for lisp, for people who don't like vim - ;;multiple-cursors ; editing in many places at once - ;;objed ; text object editing for the innocent - ;;parinfer ; turn lisp into python, sort of - ;;rotate-text ; cycle region at point between text candidates - snippets ; my elves. They type so I don't have to - ;;word-wrap ; soft wrapping with language-aware indent - - :emacs - (dired +icons) ; making dired pretty [functional] - electric ; smarter, keyword-based electric-indent - (ibuffer +icons) ; interactive buffer management - undo ; persistent, smarter undo for your inevitable mistakes - vc ; version-control and Emacs, sitting in a tree - - :term - eshell ; the elisp shell that works everywhere - shell ; simple shell REPL for Emacs - ;;term ; basic terminal emulator for Emacs - vterm ; the best terminal emulation in Emacs - - :checkers - syntax ; tasing you for every semicolon you forget - ;;(spell +aspell) ; tasing you for misspelling mispelling - ;;grammar ; tasing grammar mistake every you make - - :tools - ;;ansible - ;;debugger ; FIXME stepping through code, to help you add bugs - ;;direnv - ;;docker - ;;editorconfig ; let someone else argue about tabs vs spaces - ;;ein ; tame Jupyter notebooks with emacs - (eval +overlay) ; run code, run (also, repls) - ;;gist ; interacting with github gists - lookup ; navigate your code and its documentation - lsp - magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs - ;;pass ; password manager for nerds - pdf ; pdf enhancements - ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings - ;;taskrunner ; taskrunner for all your projects - ;;terraform ; infrastructure as code - ;;tmux ; an API for interacting with tmux - ;;upload ; map local to remote projects via ssh/ftp - - :os - (:if IS-MAC macos) ; improve compatibility with macOS - ;;tty ; improve the terminal Emacs experience - - :lang - ;;agda ; types of types of types of types... - cc ; C/C++/Obj-C madness - ;;clojure ; java with a lisp - common-lisp ; if you've seen one lisp, you've seen them all - ;;coq ; proofs-as-programs - ;;crystal ; ruby at the speed of c - csharp ; unity, .NET, and mono shenanigans - ;;data ; config/data formats - ;;(dart +flutter) ; paint ui and not much else - ;;elixir ; erlang done right - ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses - ;;erlang ; an elegant language for a more civilized age - ;;ess ; emacs speaks statistics - ;;faust ; dsp, but you get to keep your soul - ;;fsharp ; ML stands for Microsoft's Language - ;;fstar ; (dependent) types and (monadic) effects and Z3 - ;;gdscript ; the language you waited for - ;;(go +lsp) ; the hipster dialect - ;;(haskell +dante) ; a language that's lazier than I am - ;;hy ; readability of scheme w/ speed of python - ;;idris ; a language you can depend on - json ; At least it ain't XML - ;;(java +meghanada) ; the poster child for carpal tunnel syndrome - javascript ; all(hope(abandon(ye(who(enter(here)))))) - ;;julia ; a better, faster MATLAB - ;;kotlin ; a better, slicker Java(Script) - latex ; writing papers in Emacs has never been so fun - ;;lean - ;;factor - ;;ledger ; an accounting system in Emacs - lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore - ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" - ;;ocaml ; an objective camel - (org - +journal ; enable org journal - +pretty ; replace asterisks with pretty org bullets - +publish ; create static websites with org - +roam2) ; org roam v2 - php ; perl's insecure younger brother - ;;plantuml ; diagrams for confusing people more - ;;purescript ; javascript, but functional - python ; beautiful is better than ugly - ;;qt ; the 'cutest' gui framework ever - ;;racket ; a DSL for DSLs - ;;raku ; the artist formerly known as perl6 - ;;rest ; Emacs as a REST client - ;;rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - ;;scala ; java, but good - scheme ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor - ;;sml - ;;solidity ; do you need a blockchain? No. - ;;swift ; who asked for emoji variables? - ;;terra ; Earth and Moon in alignment for performance. - web ; the tubes - yaml ; JSON, but readable - - :email - ;;mu4e - ;;smtpmail - ;;notmuch - ;;(wanderlust +gmail) - - :app - ;;calendar - ;; emms - ;;everywhere ; *leave* Emacs!? You must be joking - ;;irc ; how neckbeards socialize - ;;rss ; emacs as an RSS reader - ;;twitter ; twitter client https://twitter.com/vnought - - :config - literate - (default +bindings +smartparens)) diff --git a/user/.config/doom/packages.el b/user/.config/doom/packages.el deleted file mode 100644 index c0a615b95..000000000 --- a/user/.config/doom/packages.el +++ /dev/null @@ -1,91 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; $DOOMDIR/packages.el - -;; To install a package with Doom you must declare them here and run 'doom sync' -;; on the command line, then restart Emacs for the changes to take effect -- or -;; use 'M-x doom/reload'. - - -;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: -;(package! some-package) - -;; To install a package directly from a remote git repo, you must specify a -;; `:recipe'. You'll find documentation on what `:recipe' accepts here: -;; https://github.com/raxod502/straight.el#the-recipe-format -;(package! another-package -; :recipe (:host github :repo "username/repo")) - -;; If the package you are trying to install does not contain a PACKAGENAME.el -;; file, or is located in a subdirectory of the repo, you'll need to specify -;; `:files' in the `:recipe': -;(package! this-package -; :recipe (:host github :repo "username/repo" -; :files ("some-file.el" "src/lisp/*.el"))) - -;; If you'd like to disable a package included with Doom, you can do so here -;; with the `:disable' property: -;(package! builtin-package :disable t) - -;; You can override the recipe of a built in package without having to specify -;; all the properties for `:recipe'. These will inherit the rest of its recipe -;; from Doom or MELPA/ELPA/Emacsmirror: -;(package! builtin-package :recipe (:nonrecursive t)) -;(package! builtin-package-2 :recipe (:repo "myfork/package")) - -;; Specify a `:branch' to install a package from a particular branch or tag. -;; This is required for some packages whose default branch isn't 'master' (which -;; our package manager can't deal with; see raxod502/straight.el#279) -;(package! builtin-package :recipe (:branch "develop")) - -;; Use `:pin' to specify a particular commit to install. -;(package! builtin-package :pin "1a2b3c4d5e") - - -;; Doom's packages are pinned to a specific commit and updated from release to -;; release. The `unpin!' macro allows you to unpin single packages... -;(unpin! pinned-package) -;; ...or multiple packages -;(unpin! pinned-package another-pinned-package) -;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) -;(unpin! t) - -(package! gitconfig-mode - :recipe (:host github :repo "magit/git-modes" - :files ("gitconfig-mode.el"))) -(package! gitignore-mode - :recipe (:host github :repo "magit/git-modes" - :files ("gitignore-mode.el"))) -(package! flycheck-aspell) -(package! async) -(package! calfw) -(package! calfw-org) -(package! dashboard) -(package! dired-open) -(package! dired-subtree) -(package! dmenu) -(package! elpher) -(package! emojify) -(package! esxml) -(package! evil-tutor) -(package! imenu-list) -(package! ivy-posframe) -(package! mw-thesaurus) -(package! org-board) -(package! org-web-tools) -(package! org-auto-tangle) -(package! ox-gemini) -(package! pacmacs) -(package! peep-dired) -(package! rainbow-mode) -(package! request) -(package! resize-window) -(package! s) -(package! tldr) -(package! wc-mode) -(package! beacon) -(package! minimap) -(package! olivetti) -(package! sharper) -(package! csproj-mode) -(package! dap-mode) -(package! vimrc-mode) diff --git a/user/.config/lvim/config.lua b/user/.config/lvim/config.lua new file mode 100644 index 000000000..8a208125b --- /dev/null +++ b/user/.config/lvim/config.lua @@ -0,0 +1,129 @@ +-- neovide options +vim.o.guifont = "mononoki Nerd Font:h08" +vim.g.neovide_hide_mouse_when_typing = true +vim.g.neovide_input_macos_alt_is_meta = true +vim.g.neovide_hide_mouse_when_typing = false +vim.g.neovide_refresh_rate = 60 +vim.g.neovide_refresh_rate_idle = 5 +vim.g.neovide_no_idle = true +vim.g.neovide_confirm_quit = true +vim.g.neovide_input_use_logo = true + +vim.g.neovide_cursor_antialiasing = true +vim.g.neovide_cursor_animate_in_insert_mode = true +vim.g.neovide_cursor_vfx_mode = "pixiedust" +vim.g.neovide_cursor_vfx_particle_speed = 20.0 + +vim.g.neovide_padding_top = 0 +vim.g.neovide_padding_bottom = 0 +vim.g.neovide_padding_right = 0 +vim.g.neovide_padding_left = 0 + +-- Helper function for transparency formatting +local alpha = function() + return string.format("%x", math.floor(255 * (vim.g.transparency or 0.9))) +end +vim.g.neovide_transparency = 0.9 +vim.g.transparency = 0.9 +vim.g.neovide_background_color = "#1d2021" .. alpha() + +-- nvim options +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +vim.opt.relativenumber = true +vim.cmd('autocmd FileType markdown setlocal nospell') +vim.opt.wrap = true -- wrap lines +vim.opt.spell = false +vim.o.shell = '/usr/bin/bash' +vim.o.autochdir = true +vim.cmd('autocmd BufEnter * lcd %:p:h') + +-- general +lvim.use_icons = false +lvim.log.level = "info" +lvim.format_on_save = { + enabled = true, + pattern = "*.lua", + timeout = 1000, +} + +-- change theme settings +lvim.colorscheme = "gruvbox" +lvim.transparent_window = false +lvim.builtin.alpha.active = true +lvim.builtin.alpha.mode = "dashboard" +lvim.builtin.terminal.active = true +lvim.builtin.nvimtree.setup.view.side = "left" +lvim.builtin.nvimtree.setup.renderer.icons.show.git = false + +-- automatically install missing parsers when entering buffer +lvim.builtin.treesitter.auto_install = true + +-- additional Plugins +lvim.plugins = { + { "lunarvim/colorschemes" }, + { "ellisonleao/gruvbox.nvim" }, + { "puremourning/vimspector" }, + { "SirVer/ultisnips" }, + { "CRAG666/code_runner.nvim" }, +} + +-- configuring colorscheme +require("gruvbox").setup({ + undercurl = true, + underline = true, + bold = false, + italic = { + strings = true, + comments = true, + operators = false, + folds = true, + }, + strikethrough = true, + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = "hard", -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = {}, + dim_inactive = false, + transparent_mode = false, +}) + +-- vimspector options +vim.g.vimspector_enable_mappings = 'HUMAN' +vim.g.vimspector_enable_mappings_for_mode = { + [''] = { 'n', 'v' }, +} + +-- code runner options +require('code_runner').setup({ + filetype = { + java = { + "cd $dir &&", + "javac $fileName &&", + "java $fileNameWithoutExt" + }, + python = "python3 -u", + typescript = "deno run", + rust = { + "cd $dir &&", + "rustc $fileName &&", + "$dir/$fileNameWithoutExt" + }, + cs = { + "cd '$dir' &&", + "dotnet run" + } + }, +}) + +lvim.keys.normal_mode["r"] = ":RunCode" +lvim.keys.normal_mode["rf"] = ":RunFile" +lvim.keys.normal_mode["rft"] = ":RunFile tab" +lvim.keys.normal_mode["rp"] = ":RunProject" +lvim.keys.normal_mode["rc"] = ":RunClose" +lvim.keys.normal_mode["crf"] = ":CRFiletype" +lvim.keys.normal_mode["crp"] = ":CRProjects" diff --git a/user/.config/qutebrowser/bookmarks/urls b/user/.config/qutebrowser/bookmarks/urls new file mode 100644 index 000000000..728019a0f --- /dev/null +++ b/user/.config/qutebrowser/bookmarks/urls @@ -0,0 +1,21 @@ +https://mail.google.com/ gmail +https://mail.tutanota.com/ tutanota +https://mail.proton.me/ proton-mail +https://outlook.live.com/mail outlook +https://odysee.com/ odysee +https://inv.vern.cc/ youtube +https://https://beatbump.io/ youtube-music +https://fosstodon.org/ mastodon +https://beehaw.org/ beehaw +https://pixelfed.social/ pixelfed +https://github.com/ github +https://codeberg.org/ codeberg +https://app.element.io/ element +https://app.revolt.chat/ revolt +https://web.whatsapp.com/ whatsapp +https://outlook.office.com/ intec-correo +https://campusvirtual.intec.edu.do/ intec-aula-virtual +https://procesos.intec.edu.do/ intec-procesos +https://amazon.com/ amazon +https://mega.nz/ mega +https://drive.google.com/drive/my-drive google-drive diff --git a/user/.config/qutebrowser/config.py b/user/.config/qutebrowser/config.py new file mode 100644 index 000000000..711b6c8d3 --- /dev/null +++ b/user/.config/qutebrowser/config.py @@ -0,0 +1,252 @@ +## ____ __ +## / __ \_________ _/ /_____ +## / / / / ___/ __ `/ //_/ _ \ +## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake) +## /_____/_/ \__,_/_/|_|\___/ My custom qutebrowser config +## + +# Autogenerated config.py +# +# NOTE: config.py is intended for advanced users who are comfortable +# with manually migrating the config file on qutebrowser upgrades. If +# you prefer, you can also configure qutebrowser using the +# :set/:bind/:config-* commands without having to write a config.py +# file. +# +# Documentation: +# qute://help/configuring.html +# qute://help/settings.html + +# Uncomment this to still load settings configured via autoconfig.yml +# config.load_autoconfig() +# Or uncomment this line to load settings from config.py +config.load_autoconfig(False) + +# Aliases for commands. The keys of the given dictionary are the +# aliases, while the values are the commands they map to. +# Type: Dict +c.aliases = {'q': 'quit', 'w': 'session-save', 'wq': 'quit --save'} + +# Setting dark mode +#config.set("colors.webpage.darkmode.enabled", True) + + +# Which cookies to accept. With QtWebEngine, this setting also controls +# other features with tracking capabilities similar to those of cookies; +# including IndexedDB, DOM storage, filesystem API, service workers, and +# AppCache. Note that with QtWebKit, only `all` and `never` are +# supported as per-domain values. Setting `no-3rdparty` or `no- +# unknown-3rdparty` per-domain on QtWebKit will have the same effect as +# `all`. +# Type: String +# Valid values: +# - all: Accept all cookies. +# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail. +# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty. +# - never: Don't accept cookies at all. +config.set('content.cookies.accept', 'all', 'chrome-devtools://*') + +# Which cookies to accept. With QtWebEngine, this setting also controls +# other features with tracking capabilities similar to those of cookies; +# including IndexedDB, DOM storage, filesystem API, service workers, and +# AppCache. Note that with QtWebKit, only `all` and `never` are +# supported as per-domain values. Setting `no-3rdparty` or `no- +# unknown-3rdparty` per-domain on QtWebKit will have the same effect as +# `all`. +# Type: String +# Valid values: +# - all: Accept all cookies. +# - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail. +# - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty. +# - never: Don't accept cookies at all. +config.set('content.cookies.accept', 'all', 'devtools://*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}', 'https://web.whatsapp.com/') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://accounts.google.com/*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36', 'https://*.slack.com/*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://docs.google.com/*') + +# User agent to send. The following placeholders are defined: * +# `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`: +# The underlying WebKit version (set to a fixed value with +# QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for +# QtWebEngine. * `{qt_version}`: The underlying Qt version. * +# `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for +# QtWebEngine. * `{upstream_browser_version}`: The corresponding +# Safari/Chrome version. * `{qutebrowser_version}`: The currently +# running qutebrowser version. The default value is equal to the +# unchanged user agent of QtWebKit/QtWebEngine. Note that the value +# read from JavaScript is always the global value. With QtWebEngine +# between 5.12 and 5.14 (inclusive), changing the value exposed to +# JavaScript requires a restart. +# Type: FormatString +config.set('content.headers.user_agent', 'Mozilla/5.0 ({os_info}; rv:71.0) Gecko/20100101 Firefox/71.0', 'https://drive.google.com/*') + +# Load images automatically in web pages. +# Type: Bool +config.set('content.images', True, 'chrome-devtools://*') + +# Load images automatically in web pages. +# Type: Bool +config.set('content.images', True, 'devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'chrome-devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'devtools://*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'chrome://*/*') + +# Enable JavaScript. +# Type: Bool +config.set('content.javascript.enabled', True, 'qute://*/*') + +# Type: BoolAsk +# Valid values: +# - true +# - false +# - ask +# config.set('content.notifications.enabled', True, 'https://www.youtube.com') + +# Directory to save downloads to. If unset, a sensible OS-specific +# default is used. +# Type: Directory +c.downloads.location.directory = '~/Temporal/Downloads' + +# When to show the tab bar. +# Type: String +# Valid values: +# - always: Always show the tab bar. +# - never: Always hide the tab bar. +# - multiple: Hide the tab bar if only one tab is open. +# - switching: Show the tab bar when switching tabs. +c.tabs.show = 'always' + +# Setting default page for when opening new tabs or new windows with +# commands like :open -t and :open -w . +c.url.default_page = 'https://start.duckduckgo.com' +c.url.start_pages = 'https://start.duckduckgo.com' + +# Search engines which can be used via the address bar. Maps a search +# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}` +# placeholder. The placeholder will be replaced by the search term, use +# `{{` and `}}` for literal `{`/`}` braces. The following further +# placeholds are defined to configure how special characters in the +# search terms are replaced by safe characters (called 'quoting'): * +# `{}` and `{semiquoted}` quote everything except slashes; this is the +# most sensible choice for almost all search engines (for the search +# term `slash/and&` this placeholder expands to `slash/and%26amp`). +# * `{quoted}` quotes all characters (for `slash/and&` this +# placeholder expands to `slash%2Fand%26amp`). * `{unquoted}` quotes +# nothing (for `slash/and&` this placeholder expands to +# `slash/and&`). The search engine named `DEFAULT` is used when +# `url.auto_search` is turned on and something else than a URL was +# entered to be opened. Other search engines can be used by prepending +# the search engine name to the search term, e.g. `:open google +# qutebrowser`. +# Type: Dict +c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}', 'aw': 'https://wiki.archlinux.org/?search={}', 'ub': 'https://www.urbandictionary.com/define.php?term={}', 'wiki': 'https://en.wikipedia.org/wiki/{}'} + +# Default font families to use. Whenever "default_family" is used in a +# font setting, it's replaced with the fonts listed here. If set to an +# empty value, a system-specific monospace default is used. +# Type: List of Font, or Font +c.fonts.default_family = '"mononoki Nerd Font"' + +# Default font size to use. Whenever "default_size" is used in a font +# setting, it's replaced with the size listed here. Valid values are +# either a float value with a "pt" suffix, or an integer value with a +# "px" suffix. +# Type: String +c.fonts.default_size = '10pt' + +# Font used in the completion widget. +# Type: Font +c.fonts.completion.entry = '10pt "mononoki Nerd Font"' + +# Font used for the debugging console. +# Type: Font +c.fonts.debug_console = '10pt "mononoki Nerd Font"' + +# Font used for prompts. +# Type: Font +c.fonts.prompts = 'default_size sans-serif' + +# Font used in the statusbar. +# Type: Font +c.fonts.statusbar = '10pt "mononoki Nerd Font"' + +config.source('gruvbox.py') + +# Bindings for normal mode +config.bind('M', 'hint links spawn mpv {hint-url}') +config.bind('Z', 'hint links spawn st -e youtube-dl {hint-url}') +config.bind('t', 'set-cmd-text -s :open -t') +config.bind('xb', 'config-cycle statusbar.show always never') +config.bind('xt', 'config-cycle tabs.show always never') +config.bind('xx', 'config-cycle statusbar.show always never;; config-cycle tabs.show always never') + diff --git a/user/.config/qutebrowser/gruvbox.py b/user/.config/qutebrowser/gruvbox.py new file mode 100644 index 000000000..e800f689f --- /dev/null +++ b/user/.config/qutebrowser/gruvbox.py @@ -0,0 +1,333 @@ +# gruvbox dark hard qutebrowser theme by Florian Bruhin +# +# Originally based on: +# base16-qutebrowser (https://github.com/theova/base16-qutebrowser) +# Base16 qutebrowser template by theova and Daniel Mulford +# Gruvbox dark, hard scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) + +bg0_hard = "#1d2021" +bg0_soft = '#32302f' +bg0_normal = '#282828' + +bg0 = bg0_normal +bg1 = "#3c3836" +bg2 = "#504945" +bg3 = "#665c54" +bg4 = "#7c6f64" + +fg0 = "#fbf1c7" +fg1 = "#ebdbb2" +fg2 = "#d5c4a1" +fg3 = "#bdae93" +fg4 = "#a89984" + +bright_red = "#fb4934" +bright_green = "#b8bb26" +bright_yellow = "#fabd2f" +bright_blue = "#83a598" +bright_purple = "#d3869b" +bright_aqua = "#8ec07c" +bright_gray = "#928374" +bright_orange = "#fe8019" + +dark_red = "#cc241d" +dark_green = "#98971a" +dark_yellow = "#d79921" +dark_blue = "#458588" +dark_purple = "#b16286" +dark_aqua = "#689d6a" +dark_gray = "#a89984" +dark_orange = "#d65d0e" + +### Completion + +# Text color of the completion widget. May be a single color to use for +# all columns or a list of three colors, one for each column. +c.colors.completion.fg = [fg1, bright_aqua, bright_yellow] + +# Background color of the completion widget for odd rows. +c.colors.completion.odd.bg = bg0 + +# Background color of the completion widget for even rows. +c.colors.completion.even.bg = c.colors.completion.odd.bg + +# Foreground color of completion widget category headers. +c.colors.completion.category.fg = bright_blue + +# Background color of the completion widget category headers. +c.colors.completion.category.bg = bg1 + +# Top border color of the completion widget category headers. +c.colors.completion.category.border.top = c.colors.completion.category.bg + +# Bottom border color of the completion widget category headers. +c.colors.completion.category.border.bottom = c.colors.completion.category.bg + +# Foreground color of the selected completion item. +c.colors.completion.item.selected.fg = fg0 + +# Background color of the selected completion item. +c.colors.completion.item.selected.bg = bg4 + +# Top border color of the selected completion item. +c.colors.completion.item.selected.border.top = bg2 + +# Bottom border color of the selected completion item. +c.colors.completion.item.selected.border.bottom = c.colors.completion.item.selected.border.top + +# Foreground color of the matched text in the selected completion item. +c.colors.completion.item.selected.match.fg = bright_orange + +# Foreground color of the matched text in the completion. +c.colors.completion.match.fg = c.colors.completion.item.selected.match.fg + +# Color of the scrollbar handle in the completion view. +c.colors.completion.scrollbar.fg = c.colors.completion.item.selected.fg + +# Color of the scrollbar in the completion view. +c.colors.completion.scrollbar.bg = c.colors.completion.category.bg + +### Context menu + +# Background color of disabled items in the context menu. +c.colors.contextmenu.disabled.bg = bg3 + +# Foreground color of disabled items in the context menu. +c.colors.contextmenu.disabled.fg = fg3 + +# Background color of the context menu. If set to null, the Qt default is used. +c.colors.contextmenu.menu.bg = bg0 + +# Foreground color of the context menu. If set to null, the Qt default is used. +c.colors.contextmenu.menu.fg = fg2 + +# Background color of the context menu's selected item. If set to null, the Qt default is used. +c.colors.contextmenu.selected.bg = bg2 + +#Foreground color of the context menu's selected item. If set to null, the Qt default is used. +c.colors.contextmenu.selected.fg = c.colors.contextmenu.menu.fg + +### Downloads + +# Background color for the download bar. +c.colors.downloads.bar.bg = bg0 + +# Color gradient start for download text. +c.colors.downloads.start.fg = bg0 + +# Color gradient start for download backgrounds. +c.colors.downloads.start.bg = bright_blue + +# Color gradient end for download text. +c.colors.downloads.stop.fg = c.colors.downloads.start.fg + +# Color gradient stop for download backgrounds. +c.colors.downloads.stop.bg = bright_aqua + +# Foreground color for downloads with errors. +c.colors.downloads.error.fg = bright_red + +### Hints + +# Font color for hints. +c.colors.hints.fg = bg0 + +# Background color for hints. +c.colors.hints.bg = 'rgba(250, 191, 47, 200)' # bright_yellow + +# Font color for the matched part of hints. +c.colors.hints.match.fg = bg4 + +### Keyhint widget + +# Text color for the keyhint widget. +c.colors.keyhint.fg = fg4 + +# Highlight color for keys to complete the current keychain. +c.colors.keyhint.suffix.fg = fg0 + +# Background color of the keyhint widget. +c.colors.keyhint.bg = bg0 + +### Messages + +# Foreground color of an error message. +c.colors.messages.error.fg = bg0 + +# Background color of an error message. +c.colors.messages.error.bg = bright_red + +# Border color of an error message. +c.colors.messages.error.border = c.colors.messages.error.bg + +# Foreground color of a warning message. +c.colors.messages.warning.fg = bg0 + +# Background color of a warning message. +c.colors.messages.warning.bg = bright_purple + +# Border color of a warning message. +c.colors.messages.warning.border = c.colors.messages.warning.bg + +# Foreground color of an info message. +c.colors.messages.info.fg = fg2 + +# Background color of an info message. +c.colors.messages.info.bg = bg0 + +# Border color of an info message. +c.colors.messages.info.border = c.colors.messages.info.bg + +### Prompts + +# Foreground color for prompts. +c.colors.prompts.fg = fg2 + +# Border used around UI elements in prompts. +c.colors.prompts.border = f'1px solid {bg1}' + +# Background color for prompts. +c.colors.prompts.bg = bg3 + +# Background color for the selected item in filename prompts. +c.colors.prompts.selected.bg = bg2 + +### Statusbar + +# Foreground color of the statusbar. +c.colors.statusbar.normal.fg = fg2 + +# Background color of the statusbar. +c.colors.statusbar.normal.bg = bg0 + +# Foreground color of the statusbar in insert mode. +c.colors.statusbar.insert.fg = bg0 + +# Background color of the statusbar in insert mode. +c.colors.statusbar.insert.bg = dark_aqua + +# Foreground color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.fg = bg0 + +# Background color of the statusbar in passthrough mode. +c.colors.statusbar.passthrough.bg = dark_blue + +# Foreground color of the statusbar in private browsing mode. +c.colors.statusbar.private.fg = bright_purple + +# Background color of the statusbar in private browsing mode. +c.colors.statusbar.private.bg = bg0 + +# Foreground color of the statusbar in command mode. +c.colors.statusbar.command.fg = fg3 + +# Background color of the statusbar in command mode. +c.colors.statusbar.command.bg = bg1 + +# Foreground color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.fg = c.colors.statusbar.private.fg + +# Background color of the statusbar in private browsing + command mode. +c.colors.statusbar.command.private.bg = c.colors.statusbar.command.bg + +# Foreground color of the statusbar in caret mode. +c.colors.statusbar.caret.fg = bg0 + +# Background color of the statusbar in caret mode. +c.colors.statusbar.caret.bg = dark_purple + +# Foreground color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.fg = c.colors.statusbar.caret.fg + +# Background color of the statusbar in caret mode with a selection. +c.colors.statusbar.caret.selection.bg = bright_purple + +# Background color of the progress bar. +c.colors.statusbar.progress.bg = bright_blue + +# Default foreground color of the URL in the statusbar. +c.colors.statusbar.url.fg = fg4 + +# Foreground color of the URL in the statusbar on error. +c.colors.statusbar.url.error.fg = dark_red + +# Foreground color of the URL in the statusbar for hovered links. +c.colors.statusbar.url.hover.fg = bright_orange + +# Foreground color of the URL in the statusbar on successful load +# (http). +c.colors.statusbar.url.success.http.fg = bright_red + +# Foreground color of the URL in the statusbar on successful load +# (https). +c.colors.statusbar.url.success.https.fg = fg0 + +# Foreground color of the URL in the statusbar when there's a warning. +c.colors.statusbar.url.warn.fg = bright_purple + +### tabs + +# Background color of the tab bar. +c.colors.tabs.bar.bg = bg0 + +# Color gradient start for the tab indicator. +c.colors.tabs.indicator.start = bright_blue + +# Color gradient end for the tab indicator. +c.colors.tabs.indicator.stop = bright_aqua + +# Color for the tab indicator on errors. +c.colors.tabs.indicator.error = bright_red + +# Foreground color of unselected odd tabs. +c.colors.tabs.odd.fg = fg2 + +# Background color of unselected odd tabs. +c.colors.tabs.odd.bg = bg2 + +# Foreground color of unselected even tabs. +c.colors.tabs.even.fg = c.colors.tabs.odd.fg + +# Background color of unselected even tabs. +c.colors.tabs.even.bg = bg3 + +# Foreground color of selected odd tabs. +c.colors.tabs.selected.odd.fg = fg2 + +# Background color of selected odd tabs. +c.colors.tabs.selected.odd.bg = bg0 + +# Foreground color of selected even tabs. +c.colors.tabs.selected.even.fg = c.colors.tabs.selected.odd.fg + +# Background color of selected even tabs. +c.colors.tabs.selected.even.bg = bg0 + +# Background color of pinned unselected even tabs. +c.colors.tabs.pinned.even.bg = bright_green + +# Foreground color of pinned unselected even tabs. +c.colors.tabs.pinned.even.fg = bg2 + +# Background color of pinned unselected odd tabs. +c.colors.tabs.pinned.odd.bg = bright_green + +# Foreground color of pinned unselected odd tabs. +c.colors.tabs.pinned.odd.fg = c.colors.tabs.pinned.even.fg + +# Background color of pinned selected even tabs. +c.colors.tabs.pinned.selected.even.bg = bg0 + +# Foreground color of pinned selected even tabs. +c.colors.tabs.pinned.selected.even.fg = c.colors.tabs.selected.odd.fg + +# Background color of pinned selected odd tabs. +c.colors.tabs.pinned.selected.odd.bg = c.colors.tabs.pinned.selected.even.bg + +# Foreground color of pinned selected odd tabs. +c.colors.tabs.pinned.selected.odd.fg = c.colors.tabs.selected.odd.fg + +# Background color for webpages if unset (or empty to use the theme's +# color). +c.colors.webpage.bg = bg4 + diff --git a/user/.config/suckless/dmenu/scripts/dmenu_drun b/user/.config/suckless/dmenu/scripts/dmenu_drun index 2eb1af114..2f8904eeb 100755 --- a/user/.config/suckless/dmenu/scripts/dmenu_drun +++ b/user/.config/suckless/dmenu/scripts/dmenu_drun @@ -3,5 +3,6 @@ # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple desktop dmenu script # - Dependencies: dmenu, j4-dmenu-desktop -# -j4-dmenu-desktop --dmenu "dmenu -i -l 10 -p launch:" --no-generic + +# uses j4-dmenu-desktop to launch programs by it's desktop entry +j4-dmenu-desktop --dmenu "dmenu -i -l 10 -p '󱓞 Launch:'" --no-generic diff --git a/user/.config/suckless/dmenu/scripts/dmenu_edit b/user/.config/suckless/dmenu/scripts/dmenu_edit index 82a2b2cb5..30a6327f4 100755 --- a/user/.config/suckless/dmenu/scripts/dmenu_edit +++ b/user/.config/suckless/dmenu/scripts/dmenu_edit @@ -2,9 +2,11 @@ # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple script for file editing in dmenu -# - Dependencies: dmenu (Everything else can be changed) +# - Dependencies: dmenu, fd -# Show list of options +########## +## main ## +########## cd "$HOME" || exit 0 file=1 while [ "$file" ]; do @@ -15,7 +17,7 @@ while [ "$file" ]; do cd "$file" || exit 0 else [ -f "$file" ] if [ "$file" ]; then - $VISUAL "$owd/$file" & + $VISUAL "$owd/$file" & # $VISUAL reffers to a global variable set in .xinitrc/.bash_profile exit 0 else exit 0 diff --git a/user/.config/suckless/dmenu/scripts/dmenu_power b/user/.config/suckless/dmenu/scripts/dmenu_power index 223243f0a..dbcbe8f1b 100755 --- a/user/.config/suckless/dmenu/scripts/dmenu_power +++ b/user/.config/suckless/dmenu/scripts/dmenu_power @@ -2,9 +2,11 @@ # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple power menu dmenu script -# - Dependencies: dmenu, power-profiles-daemon +# - Dependencies: dmenu, power-profiles-daemon, slock -## OPTIONS ## +####################### +## Main menu options ## +####################### option1=" Logout" option2=" Reboot" option3=" Power off" @@ -14,46 +16,59 @@ option6=" Change power profile" option7=" Cancel" options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6\n$option7" -## POWER PROFILE OPTIONS ## +############################ +## Power profiles submenu ## +############################ pwr1="󰓅 Performance" pwr2="󰾅 Balanced" pwr3="󰾆 Power Saver" pwr4=" Cancel" pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4" -## MAIN ACTION COMMAND ## -action=$(echo -e "$options" | dmenu -i -p " Power Options") +########## +## main ## +########## +action=$(echo -e "$options" | dmenu -i -p " Power Options"); # main menu prompt case "$action" in - $option1*) - pkill X;; - $option2*) - systemctl reboot;; - $option3*) - systemctl poweroff;; - $option4*) - slock systemctl suspend;; - $option5*) - slock;; - $option6*) - currentpwr=$(powerprofilesctl get) - if [ "$currentpwr" = "performance" ]; then + "$option1") + pkill X; # killing X will result in a logout + ;; + "$option2") + systemctl reboot || loginctl reboot; + ;; + "$option3") + systemctl poweroff || loginctl poweroff; + ;; + "$option4") + slock systemctl suspend || slock loginctl suspend; + ;; + "$option5") + slock; + ;; + "$option6") + currentpwr=$(powerprofilesctl get); # this variable will store the current power profile + if [ "$currentpwr" = "performance" ]; then # this if statement is used for the power profiles prompt currentpwr="$pwr1" elif [ "$currentpwr" = "balanced" ]; then currentpwr="$pwr2" elif [ "$currentpwr" = "power-saver" ]; then currentpwr="$pwr3" fi - pwraction=$(echo -e "$pwrs" | dmenu -i -p " Power Profile Menu - Currently set to: ${currentpwr}") + pwraction=$(echo -e "$pwrs" | dmenu -i -p " Power Profile Menu - Currently set to: ${currentpwr}"); # power profiles submenu prompt case "$pwraction" in - $pwr1*) - powerprofilesctl set performance && notify-send "Power profile switched to performance";; - $pwr2*) - powerprofilesctl set balanced && notify-send "Power profile switched to balanced";; - $pwr3*) - powerprofilesctl set power-saver && notify-send "Power profile switched to power saver";; - $pwr4*) + "$pwr1") + powerprofilesctl set performance && notify-send "Power profile switched to performance"; + ;; + "$pwr2") + powerprofilesctl set balanced && notify-send "Power profile switched to balanced"; + ;; + "$pwr3") + powerprofilesctl set power-saver && notify-send "Power profile switched to power saver"; + ;; + "$pwr4") exit 0 - esac;; - $option7*) + esac + ;; + "$option7") exit 0 esac diff --git a/user/.config/suckless/dmenu/scripts/dmenu_scrot b/user/.config/suckless/dmenu/scripts/dmenu_scrot index 6ced699d9..9435e73fc 100755 --- a/user/.config/suckless/dmenu/scripts/dmenu_scrot +++ b/user/.config/suckless/dmenu/scripts/dmenu_scrot @@ -4,16 +4,22 @@ # - Description: A simple screenshot/screencast dmenu script # - Dependencies: maim, splop, ffmpeg, dmenu, libnotify -## Screenshots Folder ## -mkdir -p "$MEDIA_DIR/Pictures/Screenshots" -cd "$MEDIA_DIR/Pictures/Screenshots" || exit 0 +########################### +## Screenshots Directory ## +########################### +SHOTDIR="$MEDIA_DIR/Pictures/Screenshots" # $MEDIA_DIR reffers to a global variable in .xinitrc/.bash_profile +mkdir -p "$SHOTDIR" +####################### ## Main menu choices ## -mcho1="Take an screenshot" -mcho2="Record the screen" +####################### +mcho1="󰹑 Take an screenshot" +mcho2="󰻃 Record the screen" mchos="$mcho1\n$mcho2" +############################# ## Screenshot menu choices ## +############################# scho1="󱣴 Entire screen" scho2="󱎫 Entire screen with delay" scho3="󱕻 Select area" @@ -21,113 +27,180 @@ scho4="󰖯 Active window" scho5="󱎘 Exit" schos="$scho1\n$scho2\n$scho3\n$scho4\n$scho5" +######################## ## Screenshot submenu ## -sscho1="Copy to clipboard" -sscho2="Save to Media/Pictures/Screenshots" +######################## +sscho1="󰆏 Copy to clipboard" +sscho2="󰠘 Save to ~/Media/Pictures/Screenshots" sschos="$sscho1\n$sscho2" -## Screenshot delay choices ## +################################# +## Screenshot delay subsubmenu ## +################################# del1="󱑀 3 sec delay" del2="󱑂 5 sec delay" del3="󱑇 10 sec delay" dels="$del1\n$del2\n$del3" +##### +## This function uses the sschos variable +## to ask the user what to do with the +## screenshot +##### +## param: none +## return: string +##### fsschos() { sschoice=$(echo -e "$sschos" | dmenu -i -l 2 -p " What do you want to do with this screenshot?") } +##### +## This function uses the dels variable +## to ask the user which delay option to +## choose +##### +## param: none +## return: string +##### fdel() { del=$(echo -e "$dels" | dmenu -i -p " Select Delay") } +##### +## This function does a full screen +## screenshot without delay, depending on +## what the user chooses on the fsschos +## function, the screenshot will be saved +## to the clipboard or to $SHOTDIR +##### +## param: none +## return: void +##### shot_screen() { fsschos if [ "$sschoice" = "$sscho1" ]; then maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard" elif [ "$sschoice" = "$sscho2" ]; then - maim -f jpg $(date +%s).jpg && notify-send "Screenshot saved" + maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved" else exit 0 fi } +##### +## This function does a full screen +## screenshot with delay, depending on +## what the user chooses on the fsschos +## function, the screenshot will be saved +## to the clipboard or to $SHOTDIR. And +## depending on what the user chooses on +## the fdel function, the delay will be +## between 3 and 10 seconds +##### +## param: none +## return: void +##### shot_screen_delay() { - fsschos + fsschos; if [ "$sschoice" = "$sscho1" ]; then - fdel + fdel; case $del in "$del1") - sleep 3 && maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard" + sleep 3 && maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard"; ;; "$del2") - sleep 5 && maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard" + sleep 5 && maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard"; ;; "$del3") - sleep 10 && maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard" + sleep 10 && maim | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard"; esac elif [ "$sschoice" = "$sscho2" ]; then - fdel + fdel; case $del in "$del1") - sleep 3 && maim -f jpg $(date +%s).jpg && notify-send "Screenshot saved" + sleep 3 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/"; ;; "$del2") - sleep 5 && maim -f jpg $(date +%s).jpg && notify-send "Screenshot saved" + sleep 5 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/"; ;; "$del3") - sleep 10 && maim -f jpg $(date +%s).jpg && notify-send "Screenshot saved" + sleep 10 && maim -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/"; esac else exit 0 fi } +##### +## This function allows the user to select +## the area on screen to screenshot +## depending on what the user chooses on +## the fsschos function, the screenshot +## will be saved to the clipboard or to +## $SHOTDIR +##### +## param: none +## return: void +##### shot_area() { - fsschos + fsschos; if [ "$sschoice" = "$sscho1" ]; then - maim -s | xclip -selection clipboard -t image/png && notify-send "Screenshot saved" + maim -s | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard"; elif [ "$sschoice" = "$sscho2" ]; then - maim -s -f jpg $(date +%s).jpg && notify-send "Screenshot saved" + maim -s -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/"; else exit 0 fi } +##### +## This function does an screnshot of the +## currently active window, depending on +## what the user chooses on the fsschos +## function, the screenshot will be saved +## to the clipboard or to $SHOTDIR +##### +## param: none +## return: void +##### shot_window() { - fsschos + fsschos; if [ "$sschoice" = "$sscho1" ]; then - maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png && notify-send "Screenshot saved" + maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png && notify-send "Screenshot saved to clipboard"; elif [ "$sschoice" = "$sscho2" ]; then - maim -i $(xdotool getactivewindow) -f jpg $(date +%s).jpg && notify-send "Screenshot saved" + maim -i "$(xdotool getactivewindow)" -f jpg "$SHOTDIR/$(date +%s).jpg" && notify-send "Screenshot saved to ~/Media/Pictures/Screenshots/"; else exit 0 fi } -## Main action ## -mchoice=$(echo -e "$mchos" | dmenu -i -l 2 -p " Screen Capture Menu") +########## +## main ## +########## +mchoice=$(echo -e "$mchos" | dmenu -i -l 2 -p " Screen Capture Menu") # main menu prompt case $mchoice in "$mcho1") - schoice=$(echo -e "$schos" | dmenu -i -l 9 -p " Sreenshot Menu") + schoice=$(echo -e "$schos" | dmenu -i -l 9 -p " Sreenshot Menu") # screenshot menu prompt case $schoice in "$scho1") - shot_screen + shot_screen; ;; "$scho2") - shot_screen_delay + shot_screen_delay; ;; "$scho3") - shot_area + shot_area; ;; "$scho4") - shot_window + shot_window; ;; "$scho5") exit 0 esac ;; "$mcho2") - notify-send "It worked" + # TODO Implement screencast functionality with ffmpeg + notify-send "Bro you need to implement screen recording with ffmpeg" exit 0 ;; esac diff --git a/user/.config/suckless/dmenu/scripts/dmenu_wall b/user/.config/suckless/dmenu/scripts/dmenu_wall index acce613fd..1e71198db 100755 --- a/user/.config/suckless/dmenu/scripts/dmenu_wall +++ b/user/.config/suckless/dmenu/scripts/dmenu_wall @@ -1,25 +1,18 @@ #!/usr/bin/env bash # ***This script was made by Clay Gomera (Drake)*** -# - Description: A simple wallpaper changer script -# - Dependencies: rofi, fd, feh +# - Description: A simple dmenu script to set the wallpaper on X +# - Dependencies: dmenu, fd, feh -## MAIN VARIABLES AND COMMANDS ## -walldir="$MEDIA_DIR/Pictures/Wallpapers" -cd "$walldir" || exit +########################## +## Wallpapers Directory ## +########################## +walldir="$MEDIA_DIR/Pictures/Wallpapers" # $MEDIA_DIR reffers to a global variable in .xinitrc/.bash_profile +cd "$walldir" || exit # we cd into $walldir in order to get only the file name on the main prompt -## SELECT PICTURE FUNCTION ## -selectpic() { - wallpaper=$(fdfind -p "$walldir" | dmenu -i -p " 󰋩 Select a wallpaper ") - if [ "$wallpaper" ]; then - chosenwall=$wallpaper - else - exit 0 - fi -} -selectpic - -## WALLPAPER SETTING OPTIONS ## +####################### +## Wallpaper options ## +####################### option1="Fill" option2="Center" option3="Tile" @@ -27,18 +20,30 @@ option4="Max" option5="Scale" options="$option1\n$option2\n$option3\n$option4\n$option5" -## MAIN ACTION ## -action=$(echo -e "$options" | dmenu -i -p "  Chose the format ") +########## +## main ## +########## +wallpaper=$(fd -p ./ | dmenu -i -p " 󰋩 Select a wallpaper ") # main prompt +if [ "$wallpaper" ]; then # if the user made a choice + chosenwall=$wallpaper # reassign $wallpaper to $chosenwall +else + exit 0 +fi +action=$(echo -e "$options" | dmenu -i -p "  Chose the format ") # options prompt case "$action" in $option1*) - feh --bg-fill "$chosenwall";; + feh --bg-fill "$chosenwall"; + ;; $option2*) - feh --bg-center "$chosenwall";; + feh --bg-center "$chosenwall"; + ;; $option3*) - feh --bg-tile "$chosenwall";; + feh --bg-tile "$chosenwall"; + ;; $option4*) - feh --bg-max "$chosenwall";; + feh --bg-max "$chosenwall"; + ;; $option5*) - feh --bg-scale "$chosenwall";; + feh --bg-scale "$chosenwall"; + ;; esac -exit 0 diff --git a/user/.config/suckless/dmenu/scripts/dmenu_wifi b/user/.config/suckless/dmenu/scripts/dmenu_wifi index e93733ecc..b9acb51e5 100755 --- a/user/.config/suckless/dmenu/scripts/dmenu_wifi +++ b/user/.config/suckless/dmenu/scripts/dmenu_wifi @@ -4,7 +4,9 @@ # - Description: A simple wifi dmenu script # - Dependencies: dmenu, NetworkManager -## MAIN OPTIONS ## +####################### +## Main manu options ## +####################### option1=" Turn on WiFi" option2=" Turn off WiFi" option3="󱛅 Disconnect WiFi" @@ -13,47 +15,106 @@ option5="󱛆 Setup captive portal" option6=" Exit" options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6" +##### +## This variable will grab the wireless +## interface name +##### wlan=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f1 | head -1) -## TURN OFF WIFI FUNCTION ## + +##### +## This function uses nmcli to turn +## off wifi and then sends a +## notification +##### +## param: none +## return: void +##### turnoff() { nmcli radio wifi off notify-send "WiFi has been turned off" } -## TURN ON WIFI FUNCTION ## +##### +## This function uses nmcli to turn +## on wifi and then sends a +## notification +##### +## param: none +## return: void +##### turnon() { nmcli radio wifi on notify-send "WiFi has been turned on" } -## DISCONNECT WIFI FUNCTION ## +##### +## This function uses nmcli and the +## $wlan variable to disconnect +## from the wifi network and +## then sends a notification +##### +## param: none +## return: void +##### disconnect() { nmcli device disconnect "$wlan" - sleep 1 - constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -1) - if [ "$constate" = "disconnected" ]; then - notify-send "WiFi has been disconnected" - fi + notify-send "WiFi has been disconnected" } -## CONNECT FUNCTION ## +##### +## This function uses nmcli to first scan +## for available networks and then the +## $bssid variable will store the SSID +## of the network that the user chooses +##### +## param: none +## return: string +##### connect() { - notify-send "Scannig networks, please wait" + notify-send "Scannig WiFi networks, please wait" + nmcli dev wifi rescan sleep 1 bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -i -l 10 -p "Select a Wifi Network  " | cut -d' ' -f1) } -## SELECT PASSWORD FUNCTION ## +##### +## This function will store the WiFi +## password in the $pass variable +##### +## param: none +## return: string +##### password() { + # TODO Create a condition to check if the chosen network is open or not, that + # way this will be skipped of it's open + # TODO What if the network is already saved? The user doesn't need to type the + # password again pass=$(echo " " | dmenu -P -i -p "Enter Password ") } -## MAIN CONNECTION COMMAND ## +##### +## This function will actually connect +## to the chosen WiFi network using the +## $bssid and $pass variables +##### +## param: none +## return: void +##### action() { + # TODO Create a condition to check if the chosen network is open or not (check + # password funcion) + # TODO What if the network is already saved? The user doesn't need to type the + # password again nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid" } -## CHECKING IF WIFI IS WORKING +##### +## This function will check if the +## connection works +##### +## param: none +## return: void +##### check() { notify-send "Checking if connection was successful" sleep 1 @@ -65,31 +126,29 @@ check() { fi } -## MAIN ACTION COMMANDS ## -cases=$(echo -e "$options" | dmenu -i -p " Wifi Settings" ) -if [ -n "$cases" ]; then - case "$cases" in - $option1) - turnon;; - $option2) - turnoff;; - $option3) - disconnect;; - $option4) - connect; - if [ -n "$bssid" ]; then - password; - action; - sleep 5; - check; - else - exit 0; - fi;; - $option5) - "$BROWSER" http://networkcheck.kde.org;; - $option6) - exit 0; - esac -else - exit 0; -fi +########## +## main ## +########## +cases=$(echo -e "$options" | dmenu -l 6 -i -p " Wifi Settings" ) # main menu prompt +case "$cases" in + "$option1") + turnon;; + "$option2") + turnoff;; + "$option3") + disconnect;; + "$option4") + connect; + if [ -n "$bssid" ]; then # if the user chooses a network + password; + action; + sleep 5; + check; + else + exit 0; # if not, exit the script + fi;; + "$option5") + "$BROWSER" http://networkcheck.kde.org;; # $BROWSER reffers to a global variable set in .xinitrc/.bash_profile + "$option6") + exit 0; +esac diff --git a/user/.config/suckless/dwm/config.h b/user/.config/suckless/dwm/config.h index 046cd6630..4995ca8df 100644 --- a/user/.config/suckless/dwm/config.h +++ b/user/.config/suckless/dwm/config.h @@ -62,15 +62,15 @@ static Sp scratchpads[] = { /* tagging */ static const char *tags[] = { - "", // EDITOR - "󰙨", // TESTING - "󰖟", // WEB BROWSER - "󰭹", // CHAT - "󱡭", // AUDIO TOOLS - "󰕧", // VIDEO - "󰏘", // IMAGE/EDIT TOOLS - "󰈙", // OFFICE - "󰊖" // GAMES + "", // EDITOR + "󰙨", // TESTING + "󰖟", // WEB BROWSER + "󰭹", // CHAT + "󱡭", // AUDIO TOOLS + "󰕧", // VIDEO + "󰏘", // IMAGE/EDIT TOOLS + "󰈙", // OFFICE + "󰊖" // GAMES }; // rules @@ -89,6 +89,7 @@ static const Rule rules[] = { { "neovide", NULL, NULL, 1, 0, -1 }, // test tag { "Virt-manager", NULL, NULL, 1 << 1, 0, -1 }, + { "Gnome-boxes", NULL, NULL, 1 << 1, 0, -1 }, // web tag { "LibreWolf", NULL, NULL, 1 << 2, 0, -1 }, { "librewolf-default", NULL, NULL, 1 << 2, 0, -1 }, @@ -109,6 +110,7 @@ static const Rule rules[] = { { "lsp-plugins", NULL, NULL, 1 << 4, 1, -1 }, { "qpwgraph", NULL, NULL, 1 << 4, 0, -1 }, { "Cadence", NULL, NULL, 1 << 4, 0, -1 }, + { "easyeffects", NULL, NULL, 1 << 4, 0, -1 }, // video tag { "kdenlive", NULL, NULL, 1 << 5, 0, -1 }, { "Pitivi", NULL, NULL, 1 << 5, 0, -1 }, @@ -194,9 +196,9 @@ static const Key keys[] = { // terminal { MODKEY, XK_Return, spawn, {.v = termcmd } }, // text editor - { MODKEY, XK_e, spawn, SHCMD("emacsclient -c -a 'emacs'")}, + { MODKEY, XK_e, spawn, SHCMD("neovide --neovim-bin ~/.local/bin/lvim")}, // web browser - { MODKEY, XK_w, spawn, SHCMD("librewolf")}, + { MODKEY, XK_w, spawn, SHCMD("firefox")}, // chat { MODKEY, XK_s, spawn, SHCMD("signal-desktop")}, @@ -242,7 +244,7 @@ static const Key keys[] = { // wifi config { MODKEY|ShiftMask, XK_i, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wifi") }, // screenshots - { MODKEY|ShiftMask, XK_s, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") }, + { MODKEY, XK_Print, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") }, // wallpapers { MODKEY|ShiftMask, XK_w, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wall") }, // edit diff --git a/user/.config/suckless/dwmblocks/scripts/block_battery b/user/.config/suckless/dwmblocks/scripts/block_battery index 9730e84fc..60c8ab6b0 100755 --- a/user/.config/suckless/dwmblocks/scripts/block_battery +++ b/user/.config/suckless/dwmblocks/scripts/block_battery @@ -1,5 +1,10 @@ -#!/bin/bash -# Loop through all attached batteries and format the info +#!/usr/bin/env bash + +# ***This script was made by Clay Gomera (Drake)*** +# - Description: A dwmblocks script to print the current power profile and battery status +# - Dependencies: dwm, dwmblocks, power-profiles-daemon + +# this variable will store the current power profile currntpwr=$(powerprofilesctl get) if [ "${currntpwr}" = "performance" ]; then pwr=" | 󰓅 Performance " @@ -9,94 +14,78 @@ elif [ "${currntpwr}" = "power-saver" ]; then pwr=" | 󰾆 PowerSaver " fi +# loop through all the available batteries and get it's current capacity for battery in /sys/class/power_supply/BAT?*; do - # If non-first battery, print a space separator. + # if non-first battery, print a space separator. [ -n "${capacity+x}" ] && printf " " - # Sets up the status and capacity + # sets up the status and capacity case "$(cat "$battery/status" 2>&1)" in "Full") status=" 󰁹" ;; "Discharging") - # Calculates the percentage of remaining charge + # this variable will store the percentage of remaining charge percentage="$(cat "$battery/capacity" 2>&1)" - # Updates the status icon based on the battery percentage - if [ "$percentage" -le 20 ] - then + # updates the status icon based on the battery percentage + if [ "$percentage" -le 20 ]; then status=" 󰁻" - elif [ "$percentage" -le 30 ] - then + elif [ "$percentage" -le 30 ]; then status=" 󰁼" - elif [ "$percentage" -le 40 ] - then + elif [ "$percentage" -le 40 ]; then status=" 󰁽" - elif [ "$percentage" -le 50 ] - then + elif [ "$percentage" -le 50 ]; then status=" 󰁾" - elif [ "$percentage" -le 60 ] - then + elif [ "$percentage" -le 60 ]; then status=" 󰁿" - elif [ "$percentage" -le 70 ] - then + elif [ "$percentage" -le 70 ]; then status=" 󰂀" - elif [ "$percentage" -le 80 ] - then + elif [ "$percentage" -le 80 ]; then status=" 󰂁" - elif [ "$percentage" -le 90 ] - then + elif [ "$percentage" -le 90 ]; then status=" 󰂂" - else - status=" 󰁹" + else + status=" 󰁹" fi ;; - "Charging") - # Calculates the percentage of remaining charge + "Charging") + # this variable will store the percentage of remaining charge percentage="$(cat "$battery/capacity" 2>&1)" - # Updates the status icon based on the battery percentage while charging - if [ "$percentage" -le 10 ] - then + # updates the status icon based on the battery percentage while charging + if [ "$percentage" -le 10 ]; then status=" 󰢜" - elif [ "$percentage" -le 20 ] - then + elif [ "$percentage" -le 20 ]; then status=" 󰂆" - elif [ "$percentage" -le 30 ] - then + elif [ "$percentage" -le 30 ]; then status=" 󰂇" - elif [ "$percentage" -le 40 ] - then + elif [ "$percentage" -le 40 ]; then status=" 󰂈" - elif [ "$percentage" -le 50 ] - then + elif [ "$percentage" -le 50 ]; then status=" 󰢝" - elif [ "$percentage" -le 60 ] - then + elif [ "$percentage" -le 60 ]; then status=" 󰂉" - elif [ "$percentage" -le 70 ] - then + elif [ "$percentage" -le 70 ]; then status=" 󰢞" - elif [ "$percentage" -le 80 ] - then + elif [ "$percentage" -le 80 ]; then status=" 󰂊" - elif [ "$percentage" -le 90 ] - then + elif [ "$percentage" -le 90 ]; then status=" 󰂋" else status=" 󰂅" fi ;; "Not charging") - echo " 󰂃 " && exit 0 + echo " 󰂃 " && exit 0 # just in case ;; "Unknown") - echo " 󰂃 " && exit 0 + echo " 󰂃 " && exit 0 # just in case ;; - *) exit 1 ;; + *) exit 1 ;; # just exit if there isn't a battery on the system esac - # Will make a warn variable if discharging and low + # will make a warning variable if discharging and low [ "$status" = " 󰁺" ] && [ "$percentage" -le 10 ] && warn="󱈸" - # Prints the info + # print everything printf "%s%s%d%%%s" "$status" "$warn " "$percentage" "$pwr"; unset warn done && printf "\\n" diff --git a/user/.config/suckless/dwmblocks/scripts/block_brightness b/user/.config/suckless/dwmblocks/scripts/block_brightness index 1c60532f9..4ff3c8988 100755 --- a/user/.config/suckless/dwmblocks/scripts/block_brightness +++ b/user/.config/suckless/dwmblocks/scripts/block_brightness @@ -1,4 +1,10 @@ -#!/bin/bash +#!/usr/bin/env bash + +# ***This script was made by Clay Gomera (Drake)*** +# - Description: A dwmblocks script to print the current brightness level +# - Dependencies: dwm, dwmblocks, power-profiles-daemon + +# this variable will store the current brightness level percentage brt=$(brightnessctl -m | cut -d, -f4 | tr -d %) if [ "${brt%.*}" -eq 100 ]; then icon="󰛨" @@ -21,4 +27,4 @@ elif [ "${brt%.*}" -ge 20 ]; then else icon="󱩎" fi -echo " $icon ${brt%.*}% " +echo " $icon ${brt%.*}% " # print the icon and brightness level diff --git a/user/.config/suckless/dwmblocks/scripts/block_clock b/user/.config/suckless/dwmblocks/scripts/block_clock index a7661a1c1..a87192c14 100755 --- a/user/.config/suckless/dwmblocks/scripts/block_clock +++ b/user/.config/suckless/dwmblocks/scripts/block_clock @@ -1,8 +1,14 @@ -#!/bin/bash -date="$(date +%d/%m/%y)" +#!/usr/bin/env bash + +# ***This script was made by Clay Gomera (Drake)*** +# - Description: A dwmblocks script to print the date and time +# - Dependencies: dwm, dwmblocks, date + +# this variable will store the current hour of the clock hour="$(date +%I)" -clock_icon="" -case $hour in + +# for every hour, the clock icon will change +case "$hour" in "01") clock_icon="󱐿";; "02") clock_icon="󱑀";; "03") clock_icon="󱑁";; @@ -16,5 +22,10 @@ case $hour in "11") clock_icon="󱑉";; "12") clock_icon="󱑊";; esac + +# this variable will store the clock in the desired format clock="$(date +%I:%M%p | sed 's/^0//')" -echo " $clock_icon $clock | 󰸗 $date " +# this variable will store the date in the desired format +ddate="$(date +%d/%m/%y)" + +echo " $clock_icon $clock | 󰸗 $ddate " # print the clock icon, the current time and then date diff --git a/user/.config/suckless/dwmblocks/scripts/block_layout b/user/.config/suckless/dwmblocks/scripts/block_layout index dc32b4e5e..ab657de9c 100755 --- a/user/.config/suckless/dwmblocks/scripts/block_layout +++ b/user/.config/suckless/dwmblocks/scripts/block_layout @@ -1,3 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash + +# ***This script was made by Clay Gomera (Drake)*** +# - Description: A dwmblocks script to print the keyboard layout +# - Dependencies: dwm, dwmblocks, setxkbmap + +# this variable will store the current keyboard layout in X layout=$(setxkbmap -query | grep -oP 'layout:\s*\K\w+'); + +# print the current keyboard layout in all caps echo "󰥻 $layout " | tr '[:lower:]' '[:upper:]'; diff --git a/user/.config/suckless/dwmblocks/scripts/block_volume b/user/.config/suckless/dwmblocks/scripts/block_volume index a7c3a8993..9d705ed91 100755 --- a/user/.config/suckless/dwmblocks/scripts/block_volume +++ b/user/.config/suckless/dwmblocks/scripts/block_volume @@ -1,7 +1,12 @@ -#!/bin/bash -# Prints the current volume or 🔇 if muted. +#!/usr/bin/env bash + +# ***This script was made by Clay Gomera (Drake)*** +# - Description: A dwmblocks script to print the volume level +# - Dependencies: dwm, dwmblocks, pamixer + +# if the volume is muted, just print 󰖁 and exit [ "$(pamixer --get-mute)" = true ] && echo " 󰖁 " && exit -vol="$(pamixer --get-volume)" +vol="$(pamixer --get-volume)" # if not, this variable will store the current volume level if [ "$vol" -gt "50" ]; then icon="󰕾" elif [ "$vol" -gt "10" ]; then @@ -9,6 +14,6 @@ elif [ "$vol" -gt "10" ]; then elif [ "$vol" -gt "0" ]; then icon="󰕿" else - echo " 󰖁 " && exit + echo " 󰖁 " && exit # just in case if pamixer or the audio isn't available fi -echo -e " $icon $vol% " +echo -e " $icon $vol% " # print the volume icon and level diff --git a/user/.config/suckless/dwmblocks/scripts/block_wifi b/user/.config/suckless/dwmblocks/scripts/block_wifi index 6f50564ce..140cebeb6 100755 --- a/user/.config/suckless/dwmblocks/scripts/block_wifi +++ b/user/.config/suckless/dwmblocks/scripts/block_wifi @@ -1,5 +1,18 @@ -#!/bin/bash +#!/usr/bin/env bash +# ***This script was made by Clay Gomera (Drake)*** +# - Description: A dwmblocks script to print the wifi status +# - Dependencies: dwm, dwmblocks, nmcli + +##### +## This function gets the wifi +## signal strength from nmcli and +## then converts it from dBm to +## values from 1 to 4 +##### +## param: none +## return: string +##### get_wifi_strength() { # Retrieves the wifi signal strength in dBm strength=$(nmcli -t -f active,ssid,signal dev wifi | grep yes | cut -d ":" -f3) @@ -15,12 +28,15 @@ get_wifi_strength() { fi } +# this variable will store the current state of the connection (connected or disconnected) constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -1) + +# this variable will store the name of the wifi network that the computer is currently connected to currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1) -if [ "$constate" = "disconnected" ]; then +if [ "$constate" = "disconnected" ]; then # if the computer is disconnected echo " 󰤮 " -elif [ "$constate" = "connected" ]; then +elif [ "$constate" = "connected" ]; then # if it's connected strength=$(get_wifi_strength) case "$strength" in "1") icon=" 󰤟 " ;; @@ -30,5 +46,5 @@ elif [ "$constate" = "connected" ]; then esac echo "$icon$currentwfi" else - echo " 󰤮 " + echo " 󰤮 " # just in case if nmcli isn't available or something weird is happening fi diff --git a/user/.config/tut/config.toml b/user/.config/tut/config.toml new file mode 100644 index 000000000..fe4d71dda --- /dev/null +++ b/user/.config/tut/config.toml @@ -0,0 +1,1284 @@ +# Configuration file for tut + +[general] +# What editor to use. TUT_USE_INTERNAL will use the editor that comes with tut. +# If you want you can set this to $EDITOR to use your environment variable or +# vim if you want to specify the program directly. +# default="TUT_USE_INTERNAL" +editor="emacsclient -t -a ''" + +# You need to press yes in a confirmation dialog before favoriting, boosting, +# etc. +# default=true +confirmation=true + +# Enable mouse support in tut. +# default=false +mouse-support=false + +# The date format to be used. See https://pkg.go.dev/time#pkg-constants +# default="2006-01-02 15:04" +date-format="2006-01-02 15:04" + +# Format for dates the same day. See date-format for more info. +# default="15:04" +date-tody-format="15:04" + +# This displays relative dates instead for statuses that are one day or older +# the output is 1y2m1d (1 year 2 months and 1 day) +# +# The value is an integer +# -1 = don't use relative dates +# 0 = always use relative dates, except for dates < 1 day +# 1 - ∞ = number of days to use relative dates +# +# Value: 28 will display a relative date for toots that are between 1-28 days +# old. Otherwise it will use the short or long format. +# default=-1 +date-relative=-1 + +# The max with of text before it wraps when displaying a toot. +# default=0 +max-width=0 + +# The placement of your panes. +# valid: left, right, top, bottom +# default="left" +list-placement="left" + +# How should panes be split? +# valid: row, column +# default="row" +list-split="row" + +# The proportion of panes vs. content. 1 on this and 3 on content below results +# in content taking up 3 times more space. +# default=1 +list-proportion=1 + +# See previous. +# default=2 +content-proportion=2 + +# Hide notifications of this type in your notification timelines. +# valid: mention, status, boost, follow, follow_request, favorite, poll, edit +# default=[] +notifications-to-hide=[] + +# Always include a quote of the message you're replying to. +# default=false +quote-reply=false + +# If you want to show icons in timelines. +# default=true +show-icons=true + +# If you only want to you the letter of keys instead of the full hint. +# default=false +short-hints=false + +# If you want to display the filter that filtered a toot. +# default=true +show-filter-phrase=true + +# Display a message in the commandbar on how to access the help text. +# default=true +show-help=true + +# Always jump to the newest post. May ruin your reading experience. +# default=false +stick-to-top=false + +# Display the username of the person being boosted instead of the person that +# boosted. +# default=false +show-boosted-user=false + +# Open a new pane when you run a command like :timeline home. +# default=true +commands-in-new-pane=true + +# Set a default name for the timeline if the name is empty. So if you run :tag +# linux the title of the pane will be set to #linux +# default=true +dynamic-timeline-name=true + +# 0 = No terminal title +# 1 = Show title in terminal and top bar +# 2 = Only show terminal title, and no top bar in tut +# 3 = No terminal title and no top bar in tut. +# valid: 0, 1, 2, 3 +# default=0 +terminal-title=0 + +# If you don't want the whole UI to update, and only update the text content you +# can disable this. This will lead to some artifacts being left on the screen +# when emojis are present. +# default=true +redraw-ui=true + +# The leader is used as a shortcut to run commands as you can do in Vim. By +# default this is disabled and you enable it by setting a key here. It can only +# consist of one char, so set it to something like a comma. +# default="" +leader-key="" + +# Number of milliseconds before the leader command resets. So if you tap the +# leader-key by mistake or are to slow it empties all the input after X +# milliseconds. +# default=1000 +leader-timeout=1000 + +# [[general.timelines]] +# Timelines adds panes of feeds. You can customize the number of feeds, what +# they should show and the key to activate them. + +# --- START OF EXAMPLE --- +# [[general.timelines]] +# name="home" +# type="home" +# hide-boosts=false +# hide-replies=false +# +# [[general.timelines]] +# name="Notifications" +# type="notifications" +# keys=["n", "N"] +# closed=true +# on-creation-closed="new-pane" +# on-focus="focus-self" +# --- END OF EXAMPLE --- + +# The name to display above the timeline +# default="" +# name="" + +# The type of the timeline +# valid: home, direct, local, federated, bookmarks, saved, favorited, notifications, +# lists, mentions, tag +# default="" +# type="" + +# Used for the tag type, so here you set the tag. If you have multiple you +# separate them with a space. +# default="" +# data="" + +# A list of keys to give this timeline focus. See under the input section to +# learn more about keys. +# default=[] +# keys=[] + +# A list of special-keys to give this timeline focus. See under the input +# section to learn more about special-keys. +# default=[] +# special-keys=[] + +# A shortcut to give this timeline focus with your leader-key + this shortcut. +# default="" +# shortcut="" + +# Hide boosts in this timeline. +# default="false" +# hide-boosts="false" + +# Hide replies in this timeline. +# default="false" +# hide-replies="false" + +# Don't open this timeline when you start tut. Use your keys or shortcut to open +# it. +# default="false" +# closed="false" + +# Don't open this timeline when you start tut. Use your keys or shortcut to open +# it. +# valid: new-pane, current-pane +# default="new-pane" +# on-creation-closed="new-pane" + +# Don't open this timeline when you start tut. Use your keys or shortcut to open +# it. +# valid: focus-pane, focus-self +# default="focus-pane" +# on-focus="focus-pane" + +# [[general.leader-actions]] +# You set actions leader-key with one or more leader-actions. +# +# The shortcuts are up to you, but keep them quite short and make sure they +# don't collide. If you have one shortcut that is "f" and an other one that is +# "fav", the one with "f" will always run and "fav" will never run. +# +# Some special actions that requires data to be set: +# pane is special as it's a shortcut for switching between the panes you've set +# under general and they are zero indexed. pane 0 = your first timeline, pane 1 +# = your second and so on. +# list-placement as it takes the argument top, right, bottom or left +# list-split as it takes the argument column or row +# proportions takes the arguments [int] [int], where the first integer is the +# list and the other content, e.g. proportions 1 3. See list-proportion above +# for more information. + +# --- START OF EXAMPLE --- +# [[general.leader-actions]] +# type="close-pane" +# shortcut="q" +# +# [[general.leader-actions]] +# type="list-split" +# data="row" +# shortcut="r" +# +# [[general.leader-actions]] +# type="list-split" +# data="column" +# shortcut="c" +# --- END OF EXAMPLE --- + +# The action you want to run. +# valid: blocking, boosts, clear-notifications, close-pane, compose, edit, favorited, +# favorites, followers, following, history, list-placement, list-split, lists, +# move-pane-left, move-pane-right, move-pane-up, move-pane-down, move-pane-home, +# move-pane-end, muting, newer, pane, preferences, profile, proportions, +# refetch, stick-to-top, tags +# default="" +# type="" + +# Data to pass to the action. +# default="" +# data="" + +# A shortcut to run this action with your leader-key + this shortcut. +# default="" +# shortcut="" + +[media] +# Media files will be removed directly after they've been opened. Some programs +# doesn't like this, so if your media doesn't open, try set this to false. Tut +# will remove all files once you close the program. +# default=true +delete-temp-files=true + +[media.image] +# The program to open images. TUT_OS_DEFAULT equals xdg-open on Linux, open on +# MacOS and start on Windows. +# default="TUT_OS_DEFAULT" +program="nsxiv" + +# Arguments to pass to the program. +# default="" +args="" + +# If the program runs in the terminal set this to true. +# default=false +terminal=false + +# If the program should be called multiple times when there is multiple files. +# If set to false all files will be passed as an argument, but not all programs +# support this. +# default=true +single=true + +# If the files should be passed in reverse order. This will make some programs +# display the files in the correct order. +# default=false +reverse=false + +[media.video] +# The program to open videos. TUT_OS_DEFAULT equals xdg-open on Linux, open on +# MacOS and start on Windows. +# default="TUT_OS_DEFAULT" +program="mpv" + +# Arguments to pass to the program. +# default="" +args="" + +# If the program runs in the terminal set this to true. +# default=false +terminal=false + +# If the program should be called multiple times when there is multiple files. +# If set to false all files will be passed as an argument, but not all programs +# support this. +# default=true +single=true + +# If the files should be passed in reverse order. This will make some programs +# display the files in the correct order. +# default=false +reverse=false + +[media.audio] +# The program to open audio. TUT_OS_DEFAULT equals xdg-open on Linux, open on +# MacOS and start on Windows. +# default="TUT_OS_DEFAULT" +program="TUT_OS_DEFAULT" + +# Arguments to pass to the program. +# default="" +args="" + +# If the program runs in the terminal set this to true. +# default=false +terminal=false + +# If the program should be called multiple times when there is multiple files. +# If set to false all files will be passed as an argument, but not all programs +# support this. +# default=true +single=true + +# If the files should be passed in reverse order. This will make some programs +# display the files in the correct order. +# default=false +reverse=false + +[media.link] +# The program to open links. TUT_OS_DEFAULT equals xdg-open on Linux, open on +# MacOS and start on Windows. +# default="TUT_OS_DEFAULT" +program="TUT_OS_DEFAULT" + +# Arguments to pass to the program. +# default="" +args="" + +# If the program runs in the terminal set this to true. +# default=false +terminal=false + +[desktop-notification] +# Enable notifications when someone follows you. +# default=false +followers=false + +# Enable notifications when one of your toots gets favorited. +# default=false +favorite=false + +# Enable notifications when someone mentions you. +# default=false +mention=false + +# Enable notifications when a post you have interacted with gets edited. +# default=false +update=false + +# Enable notifications when one of your toots gets boosted. +# default=false +boost=false + +# Enable notifications when a poll ends. +# default=false +poll=false + +# Enable notifications for new posts. +# default=false +posts=false + +[open-custom] +# --- START OF EXAMPLE --- +# [[open-custom.programs]] +# program = 'chromium' +# terminal = false +# hint = "[C]hrome" +# keys = ["c", "C"] +# +# [[open-custom.programs]] +# program = 'imv' +# terminal = false +# hint = "[I]mv" +# keys = ["i", "I"]" +# --- END OF EXAMPLE --- + +# [[open-custom.programs]] +# The program to open the file with. +# default="" +# program="" + +# Arguments to pass to the program. +# default="" +# args="" + +# If the program runs in the terminal set this to true. +# default=false +# terminal=false + +# What should the key hint in tut be for this program. See under the input +# section to learn more about hint. +# default="" +# hint="" + +# A list of keys to to open files with this program. See under the input section +# to learn more about keys. +# default=[] +# keys=[] + +# A list of special-keys to open files with this program. See under the input +# section to learn more about special-keys. +# default=[] +# special-keys=[] + +[open-pattern] +# [[open-pattern.programs]] +# Here you can set your own glob patterns for opening matching URLs in the +# program you want them to open up in. You could for example open Youtube videos +# in your video player instead of your default browser. To see the syntax for +# glob pattern you can follow this URL https://github.com/gobwas/glob#syntax. +# default="" +# matching="" + +# The program to open the file with. +# default="" +# program="" + +# Arguments to pass to the program. +# default="" +# args="" + +# If the program runs in the terminal set this to true. +# default=false +# terminal=false + +[style] +# All styles can be represented in their HEX value like #ffffff or with their +# name, so in this case white. The only special value is "default" which equals +# to transparent, so it will be the same color as your terminal. +# You can also use xrdb colors like this xrdb:color1 The program will use colors +# prefixed with an * first then look for URxvt or XTerm if it can't find any +# color prefixed with an asterisk. If you don't want tut to guess the prefix you +# can set the prefix yourself. If the xrdb color can't be found a preset color +# will be used. You'll have to set theme="none" for this to work. + +# The theme to use. You can use some themes that comes bundled with tut. Check +# out the themes available on the URL below. If a theme is named nord.toml you +# just write theme="nord". +# +# https://github.com/RasmusLindroth/tut/tree/master/config/themes +# +# You can also create a theme file in your config directory e.g. +# ~/.config/tut/themes/foo.toml and then set theme=foo. +# +# If you want to use your own theme but don't want to create a new file, set +# theme="none" and then you can create your own theme below. +# +# default="default" +theme="none" + +# The xrdb prefix used for colors in .Xresources. +# default="guess" +xrdb-prefix="guess" + +# The background color used on most elements. +# default="" +background="" + +# The text color used on most of the text. +# default="" +text="" + +# The color to display subtle elements or subtle text. Like lines and help text. +# default="" +subtle="" + +# The color for errors or warnings +# default="" +warning-text="" + +# This color is used to display username. +# default="" +text-special-one="" + +# This color is used to display username and key hints. +# default="" +text-special-two="" + +# The color of the bar at the top +# default="" +top-bar-background="" + +# The color of the text in the bar at the top. +# default="" +top-bar-text="" + +# The color of the bar at the bottom +# default="" +status-bar-background="" + +# The color of the text in the bar at the bottom. +# default="" +status-bar-text="" + +# The color of the bar at the bottom in view mode. +# default="" +status-bar-view-background="" + +# The color of the text in the bar at the bottom in view mode. +# default="" +status-bar-view-text="" + +# The color of the text in the command bar at the bottom. +# default="" +command-text="" + +# Background of selected list items. +# default="" +list-selected-background="" + +# The text color of selected list items. +# default="" +list-selected-text="" + +# The background color of selected list items that are out of focus. +# default="" +list-selected-inactive-background="" + +# The text color of selected list items that are out of focus. +# default="" +list-selected-inactive-text="" + +# The main color of the text for key hints +# default="" +controls-text="" + +# The highlight color of for key hints +# default="" +controls-highlight="" + +# The background color in drop-downs and autocompletions +# default="" +autocomplete-background="" + +# The text color in drop-downs at autocompletions +# default="" +autocomplete-text="" + +# The background color for selected value in drop-downs and autocompletions +# default="" +autocomplete-selected-background="" + +# The text color for selected value in drop-downs and autocompletions +# default="" +autocomplete-selected-text="" + +# The background color on selected button and the text color of unselected +# buttons +# default="" +button-color-one="" + +# The text color on selected button and the background color of unselected +# buttons +# default="" +button-color-two="" + +# The background on named timelines. +# default="" +timeline-name-background="" + +# The text color on named timelines +# default="" +timeline-name-text="" + +[input] +# In this section you set the keys to be used in tut. +# +# The hint option lets you set which part of the hint that will be highlighted +# in tut. E.g. [F]avorite results in a highlighted F and the rest of the text is +# displayed normally. +# Some of the options can be in two states, like favorites, so there you can set +# the hint-alt option to something like Un[F]avorite. +# +# Examples: +# "[D]elete" = Delete with a highlighted D +# "Un[F]ollow" = UnFollow with a highlighted F +# "[Enter]" = Enter where everything is highlighted +# "Yan[K]" = YanK with a highlighted K +# +# The keys option lets you define what key that should be pressed. This is +# limited to on character only and they are case sensitive. +# Example: +# keys=["j","J"] +# +# You can also set special-keys and they're for keys like Escape and Enter. To +# find the names of special keys you have to go to the following site and look +# for "var KeyNames = map[Key]string{" +# +# https://github.com/gdamore/tcell/blob/master/key.go + +[input.global-down] +# Keys for moving down + +# default=["j", "J"] +keys=["j","J"] + +# default=["Down"] +special-keys=["Down"] + +[input.global-up] +# Keys for moving down + +# default=["k", "K"] +keys=["k","K"] + +# default=["Up"] +special-keys=["Up"] + +[input.global-enter] +# To select items + +# default=["Enter"] +special-keys=["Enter"] + +[input.global-back] +# To go back + +# default="[Esc]" +hint="[Esc]" + +# default=["Esc"] +special-keys=["Esc"] + +[input.global-exit] +# To go back or exit + +# default="[Q]uit" +hint="[Q]uit" + +# default=["q", "Q"] +keys=["q","Q"] + +[input.main-home] +# Move to the top + +# default=["g"] +keys=["g"] + +# default=["Home"] +special-keys=["Home"] + +[input.main-end] +# Move to the bottom + +# default=["G"] +keys=["G"] + +# default=["End"] +special-keys=["End"] + +[input.main-prev-feed] +# Go to previous feed + +# default=["h", "H"] +keys=["h","H"] + +# default=["Left"] +special-keys=["Left"] + +[input.main-next-feed] +# Go to next feed + +# default=["l", "L"] +keys=["l","L"] + +# default=["Right"] +special-keys=["Right"] + +[input.main-prev-pane] +# Focus on the previous feed pane + +# default=["Backtab"] +special-keys=["Backtab"] + +[input.main-next-pane] +# Focus on the next feed pane + +# default=["Tab"] +special-keys=["Tab"] + +[input.main-next-account] +# Focus on the next account + +# default=["Ctrl-N"] +special-keys=["Ctrl-N"] + +[input.main-prev-account] +# Focus on the previous account + +# default=["Ctrl-P"] +special-keys=["Ctrl-P"] + +[input.main-compose] +# Compose a new toot + +# default=["c", "C"] +keys=["c","C"] + +[input.status-avatar] +# Open avatar + +# default="[A]vatar" +hint="[A]vatar" + +# default=["a", "A"] +keys=["a","A"] + +[input.status-boost] +# Boost a toot + +# default="[B]oost" +hint="[B]oost" + +# default=["b", "B"] +keys=["b","B"] + +[input.status-edit] +# Edit a toot + +# default="[E]dit" +hint="[E]dit" + +# default=["e", "E"] +keys=["e","E"] + +[input.status-delete] +# Delete a toot + +# default="[D]elete" +hint="[D]elete" + +# default=["d", "D"] +keys=["d","D"] + +[input.status-favorite] +# Favorite a toot + +# default="[F]avorite" +hint="[F]avorite" + +# default=["f", "F"] +keys=["f","F"] + +[input.status-media] +# Open toots media files + +# default="[M]edia" +hint="[M]edia" + +# default=["m", "M"] +keys=["m","M"] + +[input.status-links] +# Open links + +# default="[O]pen" +hint="[O]pen" + +# default=["o", "O"] +keys=["o","O"] + +[input.status-poll] +# Open poll + +# default="[P]oll" +hint="[P]oll" + +# default=["p", "P"] +keys=["p","P"] + +[input.status-reply] +# Reply to toot + +# default="[R]eply" +hint="[R]eply" + +# default=["r", "R"] +keys=["r","R"] + +[input.status-bookmark] +# Save/bookmark a toot + +# default="[S]ave" +hint="[S]ave" + +# default="Un[S]ave" +hint-alt="Un[S]ave" + +# default=["s", "S"] +keys=["s","S"] + +[input.status-thread] +# View thread + +# default="[T]hread" +hint="[T]hread" + +# default=["t", "T"] +keys=["t","T"] + +[input.status-user] +# Open user profile + +# default="[U]ser" +hint="[U]ser" + +# default=["u", "U"] +keys=["u","U"] + +[input.status-view-focus] +# Open the view mode + +# default="[V]iew" +hint="[V]iew" + +# default=["v", "V"] +keys=["v","V"] + +[input.status-yank] +# Yank the url of the toot + +# default="[Y]ank" +hint="[Y]ank" + +# default=["y", "Y"] +keys=["y","Y"] + +[input.status-toggle-cw] +# Show the content in a content warning + +# default="Press [Z] to toggle cw" +hint="Press [Z] to toggle cw" + +# default=["z", "Z"] +keys=["z","Z"] + +[input.status-show-filtered] +# Show the content of a filtered toot + +# default="Press [Z] to view filtered toot" +hint="Press [Z] to view filtered toot" + +# default=["z", "Z"] +keys=["z","Z"] + +[input.user-avatar] +# View avatar + +# default="[A]vatar" +hint="[A]vatar" + +# default=["a", "A"] +keys=["a","A"] + +[input.user-block] +# Block the user + +# default="[B]lock" +hint="[B]lock" + +# default="Un[B]lock" +hint-alt="Un[B]lock" + +# default=["b", "B"] +keys=["b","B"] + +[input.user-follow] +# Follow user + +# default="[F]ollow" +hint="[F]ollow" + +# default="Un[F]ollow" +hint-alt="Un[F]ollow" + +# default=["f", "F"] +keys=["f","F"] + +[input.user-follow-request-decide] +# Follow user + +# default="Follow [R]equest" +hint="Follow [R]equest" + +# default="Follow [R]equest" +hint-alt="Follow [R]equest" + +# default=["r", "R"] +keys=["r","R"] + +[input.user-mute] +# Mute user + +# default="[M]ute" +hint="[M]ute" + +# default="Un[M]ute" +hint-alt="Un[M]ute" + +# default=["m", "M"] +keys=["m","M"] + +[input.user-links] +# Open links + +# default="[O]pen" +hint="[O]pen" + +# default=["o", "O"] +keys=["o","O"] + +[input.user-user] +# View user profile + +# default="[U]ser" +hint="[U]ser" + +# default=["u", "U"] +keys=["u","U"] + +[input.user-view-focus] +# Open view mode + +# default="[V]iew" +hint="[V]iew" + +# default=["v", "V"] +keys=["v","V"] + +[input.user-yank] +# Yank the user URL + +# default="[Y]ank" +hint="[Y]ank" + +# default=["y", "Y"] +keys=["y","Y"] + +[input.list-open-feed] +# Open list + +# default="[O]pen" +hint="[O]pen" + +# default=["o", "O"] +keys=["o","O"] + +[input.list-user-list] +# List all users in a list + +# default="[U]sers" +hint="[U]sers" + +# default=["u", "U"] +keys=["u","U"] + +[input.list-user-add] +# Add user to list + +# default="[A]dd" +hint="[A]dd" + +# default=["a", "A"] +keys=["a","A"] + +[input.list-user-delete] +# Delete user from list + +# default="[D]elete" +hint="[D]elete" + +# default=["d", "D"] +keys=["d","D"] + +[input.link-open] +# Open URL + +# default="[O]pen" +hint="[O]pen" + +# default=["o", "O"] +keys=["o","O"] + +[input.link-yank] +# Yank the URL + +# default="[Y]ank" +hint="[Y]ank" + +# default=["y", "Y"] +keys=["y","Y"] + +[input.tag-open-feed] +# Open tag feed + +# default="[O]pen" +hint="[O]pen" + +# default=["o", "O"] +keys=["o","O"] + +[input.tag-follow] +# Toggle follow on tag + +# default="[F]ollow" +hint="[F]ollow" + +# default="Un[F]ollow" +hint-alt="Un[F]ollow" + +# default=["f", "F"] +keys=["f","F"] + +[input.compose-edit-cw] +# Edit content warning text on new toot + +# default="[C]W text" +hint="[C]W text" + +# default=["c", "C"] +keys=["c","C"] + +[input.compose-edit-text] +# Edit the text on new toot + +# default="[E]dit text" +hint="[E]dit text" + +# default=["e", "E"] +keys=["e","E"] + +[input.compose-include-quote] +# Include a quote when replying + +# default="[I]nclude quote" +hint="[I]nclude quote" + +# default=["i", "I"] +keys=["i","I"] + +[input.compose-media-focus] +# Focus on adding media to toot + +# default="[M]edia" +hint="[M]edia" + +# default=["m", "M"] +keys=["m","M"] + +[input.compose-post] +# Post the new toot + +# default="[P]ost" +hint="[P]ost" + +# default=["p", "P"] +keys=["p","P"] + +[input.compose-toggle-content-warning] +# Toggle content warning on toot + +# default="[T]oggle CW" +hint="[T]oggle CW" + +# default=["t", "T"] +keys=["t","T"] + +[input.compose-visibility] +# Edit the visibility on new toot + +# default="[V]isibility" +hint="[V]isibility" + +# default=["v", "V"] +keys=["v","V"] + +[input.compose-language] +# Edit the language of a toot + +# default="[L]ang" +hint="[L]ang" + +# default=["l", "L"] +keys=["l","L"] + +[input.compose-poll] +# Switch to creating a poll + +# default="P[O]ll" +hint="P[O]ll" + +# default=["o", "O"] +keys=["o","O"] + +[input.media-delete] +# Delete media file + +# default="[D]elete" +hint="[D]elete" + +# default=["d", "D"] +keys=["d","D"] + +[input.media-edit-desc] +# Edit the description on media file + +# default="[E]dit desc" +hint="[E]dit desc" + +# default=["e", "E"] +keys=["e","E"] + +[input.media-add] +# Add a new media file + +# default="[A]dd" +hint="[A]dd" + +# default=["a", "A"] +keys=["a","A"] + +[input.vote-vote] +# Vote on poll + +# default="[V]ote" +hint="[V]ote" + +# default=["v", "V"] +keys=["v","V"] + +[input.vote-select] +# Select item to vote on + +# default="[Enter] to select" +hint="[Enter] to select" + +# default=["Enter"] +special-keys=["Enter"] + +[input.poll-add] +# Add a new poll option + +# default="[A]dd" +hint="[A]dd" + +# default=["a", "A"] +keys=["a","A"] + +[input.poll-edit] +# Edit a poll option + +# default="[E]dit" +hint="[E]dit" + +# default=["e", "E"] +keys=["e","E"] + +[input.poll-delete] +# Delete a poll option + +# default="[D]elete" +hint="[D]elete" + +# default=["d", "D"] +keys=["d","D"] + +[input.poll-multi-toggle] +# Toggle voting on multiple options + +# default="Toggle [M]ultiple" +hint="Toggle [M]ultiple" + +# default=["m", "M"] +keys=["m","M"] + +[input.poll-expiration] +# Change the expiration of poll + +# default="E[X]pires" +hint="E[X]pires" + +# default=["x", "X"] +keys=["x","X"] + +[input.preference-name] +# Change display name + +# default="[N]ame" +hint="[N]ame" + +# default=["n", "N"] +keys=["n","N"] + +[input.preference-visibility] +# Change default visibility of toots + +# default="[V]isibility" +hint="[V]isibility" + +# default=["v", "V"] +keys=["v","V"] + +[input.preference-bio] +# Change bio in profile + +# default="[B]io" +hint="[B]io" + +# default=["b", "B"] +keys=["b","B"] + +[input.preference-save] +# Save your preferences + +# default="[S]ave" +hint="[S]ave" + +# default=["s", "S"] +keys=["s","S"] + +[input.preference-fields] +# Edit profile fields + +# default="[F]ields" +hint="[F]ields" + +# default=["f", "F"] +keys=["f","F"] + +[input.preference-fields-add] +# Add new field + +# default="[A]dd" +hint="[A]dd" + +# default=["a", "A"] +keys=["a","A"] + +[input.preference-fields-edit] +# Edit current field + +# default="[E]dit" +hint="[E]dit" + +# default=["e", "E"] +keys=["e","E"] + +[input.preference-fields-delete] +# Delete current field + +# default="[D]elete" +hint="[D]elete" + +# default=["d", "D"] +keys=["d","D"] + +[input.editor-exit] +# Exit the editor + +# default="[Esc] when done" +hint="[Esc] when done" + +# default=["Esc"] +special-keys=["Esc"] + diff --git a/user/.xinitrc b/user/.xinitrc index f7993f2e7..77a220b40 100755 --- a/user/.xinitrc +++ b/user/.xinitrc @@ -46,10 +46,10 @@ export GNUPGHOME="$HOME/.local/share/gnupg" export LESSHISTFILE="-" # default apps -export EDITOR="emacsclient -t -a ''" -export VISUAL="emacsclient -c -a 'emacs'" -export BROWSER="librewolf" +export EDITOR="~/.local/bin/lvim" +export VISUAL="neovide --neovim-bin ~/.local/bin/lvim" +export BROWSER="firefox" export VIEWER="zathura" # start window manager / desktop environment -dbus-launch --exit-with-session dwm +exec dwm