├── .asoundrc ├── .config ├── MangoHud │ └── MangoHud.conf ├── catgirl │ └── libera.chat ├── emacs │ ├── el │ │ ├── fl.el │ │ ├── fm.el │ │ └── kb.el │ └── init.el ├── fontconfig │ └── fonts.conf ├── foot │ ├── foot.ini │ └── theme.ini ├── git │ └── config ├── mpv │ └── scripts │ │ ├── config.lua │ │ ├── hachos.lua │ │ └── thrill.lua └── sway │ └── config ├── .profile ├── LICENSE ├── README.md └── bin ├── bb ├── cb ├── cg ├── fm ├── mf └── yi /.asoundrc: -------------------------------------------------------------------------------- 1 | #o:alsa 2 | 3 | @hooks [ 4 | { 5 | func load 6 | files [ 7 | "$HOME/.asoundrc" 8 | ] 9 | 10 | @func getenv 11 | vars [ 12 | rate_value 44100 13 | ] 14 | errors false 15 | } 16 | ] 17 | 18 | defaults.ctl.card 1 19 | defaults.pcm.card 1 20 | 21 | # playback alias 22 | pcm.plugj { 23 | type plug 24 | slave slavej 25 | } 26 | 27 | pcm_slave.slavej { 28 | pcm "hw:1,0" 29 | channels 2 30 | rate { 31 | @func refer 32 | name rate_value 33 | } 34 | } 35 | 36 | # change sampling rate 37 | pcm.!default { 38 | type plug 39 | slave.pcm "dmix" 40 | } 41 | 42 | pcm.!default { 43 | type dmix 44 | ipc_key 1024 45 | slave { 46 | pcm "plughw:1,0" 47 | periods 128 48 | period_time 0 49 | period_size 1024 50 | buffer_size 4096 51 | rate { 52 | @func refer 53 | name rate_value 54 | } 55 | } 56 | } 57 | 58 | # volume boost 59 | pcm.!default { 60 | type plug 61 | slave.pcm "softvol" 62 | } 63 | 64 | pcm.softvol { 65 | type softvol 66 | slave { 67 | pcm "dmix" 68 | } 69 | control { 70 | name "Pre-Amp" 71 | card 1 72 | } 73 | min_dB -5.0 74 | max_dB 20.0 75 | resolution 6 76 | } 77 | -------------------------------------------------------------------------------- /.config/MangoHud/MangoHud.conf: -------------------------------------------------------------------------------- 1 | vsync=1 2 | gl_vsync=0 3 | fps_limit=120 4 | 5 | font_size=22 6 | font_file=/home/irhl/.local/share/fonts/scientifica/scientifica.ttf 7 | no_small_font 8 | hud_compact 9 | legacy_layout=0 10 | 11 | width=300 12 | table_columns=4 13 | position=top-left 14 | background_alpha=0 15 | 16 | custom_text=AMD Ryzen 5 5600 17 | custom_text=Sapphire Pulse RX 6600 18 | custom_text= 19 | cpu_stats 20 | cpu_temp 21 | cpu_mhz 22 | gpu_stats 23 | gpu_temp 24 | gpu_power 25 | ram 26 | vram 27 | fps 28 | 29 | cpu_color= b5a192 30 | gpu_color= b5a192 31 | ram_color= cec2ab 32 | vram_color= cec2ab 33 | engine_color= dae5c9 34 | text_color= fbeedb 35 | -------------------------------------------------------------------------------- /.config/catgirl/libera.chat: -------------------------------------------------------------------------------- 1 | log 2 | restrict 3 | hash = 0,15 4 | 5 | nick = irhl 6 | host = irc.libera.chat 7 | port = 6697 8 | -------------------------------------------------------------------------------- /.config/emacs/el/fl.el: -------------------------------------------------------------------------------- 1 | ;;; fl.el -*- lexical-binding: t -*- 2 | ;; 3 | ;; INSTALL: 4 | ;; load the theme as any other .el file. 5 | ;; 6 | ;; ,-_,. 7 | ;; ,( _ )) 8 | ;; 7 (_) 77 9 | ;; (( :)) 10 | ;; ~__>~' 11 | ;; cY?' 12 | ;; `l,__ 13 | ;; l7-' 14 | ;; ;l 15 | ;; _i_, 16 | ;; l___l 17 | ;; \___/ fl.el (flowershop by irhl) 18 | 19 | (unless (>= emacs-major-version 29) 20 | (error 21 | "hola payaso fuck you no fudgee barr for you")) 22 | 23 | (defmacro ext (modes &rest customizations) 24 | `(dolist (mode ,modes) 25 | (font-lock-add-keywords 26 | mode 27 | (append '(,@customizations) 28 | (mapcar (lambda (substitution) 29 | `(,(car substitution) 30 | (0 (progn 31 | (put-text-property 32 | (match-beginning 0) (match-end 0) 33 | 'display , (cadr substitution)))))) 34 | ',customizations))))) 35 | (ext 36 | '(org-mode emacs-lisp-mode 37 | c-mode lua-mode sh-mode bash-mode ahk-mode powershell) 38 | 39 | ("\\" "λ") 40 | ("\\" "+") 41 | ("\\" "fn") 42 | ("\\" "macro") 43 | ("\\" "var") 44 | 45 | ("\\_<\\([+-]?[0-9]+\\.?[0-9]*\\)\\_>" 46 | 1 '(face (:foreground "#404040")))) 47 | 48 | (ext 49 | '(org-mode) 50 | 51 | ("\\(\\#\\)" " ") 52 | 53 | ("^\\([ \t]*\\*+[ \t]\\)" 54 | 1 '(face (:foreground "#f7f7f7")))) 55 | 56 | (defface icon '((t nil)) "header active icon") 57 | (defface icon-inactive '((t nil)) "header inactive icon.") 58 | 59 | (custom-set-faces 60 | '(rainbow-delimiters-depth-1-face ((t (:foreground "#c79d83")))) 61 | '(rainbow-delimiters-depth-2-face ((t (:foreground "#ebc3a9")))) 62 | '(rainbow-delimiters-depth-3-face ((t (:foreground "#84badd")))) 63 | '(rainbow-delimiters-depth-4-face ((t (:foreground "#e889c6")))) 64 | '(rainbow-delimiters-depth-5-face ((t (:foreground "#6ebb77")))) 65 | '(rainbow-delimiters-depth-6-face ((t (:foreground "#ebc3a9")))) 66 | '(rainbow-delimiters-depth-7-face ((t (:foreground "#a99de0")))) 67 | '(rainbow-delimiters-depth-8-face ((t (:foreground "#83cbb6")))) 68 | '(rainbow-delimiters-depth-9-face ((t (:foreground "#e9a498")))) 69 | '(rainbow-delimiters-depth-10-face ((t (:foreground "#c79d83")))) 70 | '(rainbow-delimiters-depth-11-face ((t (:foreground "#c79d83")))) 71 | '(rainbow-delimiters-depth-12-face ((t (:foreground "#c79d83")))) 72 | '(rainbow-delimiters-base-error-face ((t (:foreground "#e27294")))) 73 | 74 | '(font-lock-builtin-face ((t (:foreground "#918b8b")))) 75 | '(font-lock-comment-face ((t (:foreground "#d2cbc6")))) 76 | '(font-lock-comment-delimiter-face ((t (:foreground "#d2cbc6")))) 77 | '(font-lock-doc-face ((t (:foreground "#d2cbc6")))) 78 | '(font-lock-constant-face ((t (:foreground "#9cd2bb")))) 79 | '(font-lock-function-name-face ((t (:foreground "#bea292")))) 80 | '(font-lock-keyword-face ((t (:foreground "#cfbbb0")))) 81 | '(font-lock-doc-string-face ((t (:foreground "#d2cbc6")))) 82 | '(font-lock-string-face ((t (:foreground "#5e5958")))) 83 | '(font-lock-type-face ((t (:foreground "#5e5958")))) 84 | '(font-lock-variable-name-face ((t (:foreground "#b3a7a9")))) 85 | '(font-lock-preprocessor ((t (:foreground "#b3a7a9")))) 86 | '(font-lock-warning-face ((t (:foreground "#5e5958")))) 87 | '(vertical-border ((t (:foreground "#f3ebeb")))) 88 | '(window-divider ((t (:foreground "#f5efe8")))) 89 | '(window-divider-first-pixel ((t (:foreground "#f5efe8")))) 90 | '(window-divider-last-pixel ((t (:foreground "#f5efe8")))) 91 | '(warning ((t (:foreground "#5e5958" 92 | :weight bold)))) 93 | '(default ((t (:foreground "#5e5958" 94 | :background "#fcf5ee")))) 95 | ;; SECTION: menu 96 | '(minibuffer-prompt ((t (:foreground "#9a9392")))) 97 | '(help-key-binding ((t (:foreground "#d2cbc6")))) 98 | 99 | '(cursor ((t (:background "#9a9392")))) 100 | '(hl-line ((t (:background "#f5efe8")))) 101 | '(highlight ((t (:foreground "#f5cac3")))) 102 | '(show-paren-match ((t (:background "#faefea")))) 103 | '(show-paren-mismatch ((t (:background "#f5cac3")))) 104 | '(region ((t (:background "#dcd6d3")))) 105 | '(link ((t (:foreground "#9a9392")))) 106 | '(button ((t (:foreground "#d3c2bb")))) 107 | '(dired-directory ((t (:foreground "#9a9392")))) 108 | 109 | ;; SECIION: org-mode 110 | '(org-level-1 ((t (:height 1.5 :weight bold)))) 111 | '(org-level-2 ((t (:height 1.4 :weight bold)))) 112 | '(org-level-3 ((t (:height 1.3 :weight bold)))) 113 | '(org-level-4 ((t (:height 1.2 :weight bold)))) 114 | '(org-level-5 ((t (:height 1.1 :weight bold)))) 115 | '(org-level-6 ((t (:height 1.0 :weight bold)))) 116 | '(org-document-title ((t (:height 1.4 :weight bold)))) 117 | 118 | '(org-todo 119 | ((t (:foreground "#e9c8c3" 120 | :weight bold 121 | :family "Comic Code Medium")))) 122 | 123 | '(org-headline-todo 124 | ((t (:height 0.9 125 | :foreground "#918b8b" 126 | :weight bold)))) 127 | 128 | '(org-meta-line 129 | ((t (:foreground "#d2cbc6" 130 | :background "#f4ede6" )))) 131 | 132 | '(org-block ((t (:background "#f8f1ea" )))) 133 | '(org-table ((t (:foreground "#c9c6c3" )))) 134 | '(org-date ((t (:foreground "#ccbfc2" 135 | :underline nil)))) 136 | 137 | ;; SECTION: fudgee barr 138 | '(icon 139 | ((t (:family "FontAwesome" 140 | :weight bold 141 | :background "#f9dcce" 142 | :foreground "#bca59b" 143 | :overline "#f9dcce" 144 | :box (:color "#f9dcce" 145 | :line-width 3 146 | :style nil))))) 147 | '(icon-inactive 148 | ((t (:family "FontAwesome" 149 | :weight bold 150 | :background "#e6ddd7" 151 | :foreground "#acaeb1" 152 | :overline "#e6ddd7" 153 | :box (:color "#e6ddd7" 154 | :line-width 3 155 | :style nil))))) 156 | '(mode-line 157 | ((t :weight bold 158 | :foreground "#b6a7a0" 159 | :background "#fae7de" 160 | :overline "#fae7de" 161 | :box (:color "#fae7de" 162 | :line-width 2 163 | :style nil)))) 164 | '(mode-line-inactive 165 | ((t :weight bold 166 | :foreground "#acaeb1" 167 | :background "#f0e8e2" 168 | :overline "#f0e8e2" 169 | :box (:color "#f0e8e2" 170 | :line-width 2 171 | :style nil)))) 172 | '(header-line 173 | ((t nil ))) 174 | '(header-line-highlight 175 | ((t :box (:color nil)))) 176 | '(mode-line-highlight 177 | ((t :box (:color nil))))) 178 | -------------------------------------------------------------------------------- /.config/emacs/el/fm.el: -------------------------------------------------------------------------------- 1 | ;;; fm.el -*- lexical-binding: t -*- 2 | ;;; Commentary: me to her: 3 | ;;; https://www.youtube.com/watch?v=p7j9CYaqIlY&t=3m07s 4 | 5 | (defun save-current-directory () 6 | (setq saved-directory nil) 7 | (setq saved-directory default-directory) 8 | (message "saved directory: %s" saved-directory)) 9 | 10 | (defun visit-saved-directory () 11 | (if saved-directory 12 | (dired saved-directory) 13 | (message "no saved directory"))) 14 | 15 | (defun go-to-previous-directory () 16 | (dired "..")) 17 | 18 | (defmacro file-book (&rest binds) 19 | `(progn 20 | ,@(mapcar (lambda (bind) 21 | (let ((key (car bind)) 22 | (action (cadr bind))) 23 | `(define-key dired-mode-map (kbd ,key) 24 | (lambda () (interactive) 25 | (let ((arg 26 | ,(if (symbolp action) 27 | `(if (boundp ',action) 28 | (symbol-value ',action) 29 | ',action) 30 | action))) 31 | (if (functionp arg) 32 | (funcall arg) 33 | (dired arg))))))) binds))) 34 | 35 | (with-eval-after-load 'dired 36 | (file-book 37 | ("bs" save-current-directory) 38 | ("bv" visit-saved-directory) 39 | ("bb" go-to-previous-directory) 40 | ("be" user-emacs-directory) 41 | ("ba" "~/") 42 | ("bl" "~/.local/share/") 43 | ("bc" "~/.config/") 44 | ("bd" "~/Downloads/") 45 | ("bp" "~/Projects/") 46 | ("bg" "~/git/"))) 47 | 48 | (defun file-open () 49 | (interactive) 50 | (when (eq major-mode 'dired-mode) 51 | (let* ((file (dired-get-file-for-visit)) 52 | (extension (file-name-extension file)) 53 | (cmd (cond ((member extension '("docx" "pdf")) 54 | (list "firefox" file)) 55 | 56 | ((member extension '("jpg" "png" "webp" "gif")) 57 | (list "mpv" "--script=/home/irhl/.config/mpv/script-opts/o.lua" file)) 58 | 59 | ((member extension '("mp3" "flac")) 60 | (list "foot" "mpv" "--script=/home/irhl/.config/mpv/script-opts/piko.lua" file)) 61 | 62 | ((member extension '("mp4" "mkv" "webm" "wmv")) 63 | (list "mpv" file)) 64 | (t nil)))) 65 | (if cmd 66 | (apply #'start-process (car cmd) nil (car cmd) (cdr cmd)) 67 | (find-file file))))) 68 | 69 | (add-hook 'dired-mode-hook 70 | (lambda () 71 | (dired-hide-details-mode 0) 72 | (local-set-key (kbd "RET") 'file-open))) 73 | -------------------------------------------------------------------------------- /.config/emacs/el/kb.el: -------------------------------------------------------------------------------- 1 | ;;; kb.el -*- lexical-binding: t -*- 2 | ;;; Commentary: ^^ 3 | 4 | ;; i have tried evil and meow, unfortunately they 5 | ;; failed to satisfy me, did not taste like salad, 6 | ;; it wasn't the best memorable experience either. 7 | 8 | ;; i don't like it when things get out of scope and 9 | ;; try to be much more than a modal editing system, 10 | ;; haha they really remind me of emacs? 11 | 12 | ;; there is nothing special about kb.el, but having 13 | ;; the safety mode and insert mode should be enough 14 | ;; to fix this stupid editor. 15 | 16 | (defun incremental-search () 17 | (interactive) 18 | (if isearch-mode 19 | (isearch-repeat-forward) 20 | (isearch-forward))) 21 | 22 | (defun pull-line () 23 | (interactive) 24 | (delete-horizontal-space) 25 | (delete-blank-lines) 26 | (insert " ") 27 | (backward-char)) 28 | 29 | (defun kill-line-alt () 30 | (interactive) 31 | (if (region-active-p) 32 | (kill-region (region-beginning) (region-end)) 33 | (if (looking-at "^$") 34 | (kill-whole-line) 35 | (kill-line)))) 36 | 37 | (defun surround-region () 38 | (interactive) 39 | (let* ((choice (read-char-exclusive 40 | "() [] {} <> '' \"\" ")) 41 | (pairs (pcase choice 42 | (?\( "()") 43 | (?\[ "[]") 44 | (?\{ "{}") 45 | (?\< "<>") 46 | (?\' "''") 47 | (?\" "\"\"")))) 48 | (if (region-active-p) 49 | (progn 50 | (goto-char (region-end)) 51 | (insert (substring pairs 1)) 52 | (goto-char (region-beginning)) 53 | (insert (substring pairs 0 1)) 54 | (deactivate-mark)) 55 | (insert pairs) 56 | (backward-char)))) 57 | 58 | ;; compiler instructions 59 | (defun instructions () 60 | (interactive) 61 | (let* ((file-name (buffer-file-name)) 62 | (file-base-name (file-name-sans-extension (file-name-nondirectory file-name))) 63 | (default-directory (file-name-directory file-name))) 64 | (compile (format "make %s && ./%s" 65 | file-base-name file-base-name)))) 66 | 67 | ;; unset defaults 68 | (dolist (kb-df '("C-a" "C-b" "C-c" "C-d" "C-e" "C-f" "C-g" 69 | "C-k" "C-k" "C-l" "C-n" "C-o" "C-p" "C-q" 70 | "C-s" "C-t" "C-u" "C-v" "C-w" "C-y" "C-z" 71 | "C-/" "C-?" "" "" 72 | "" "" "\e")) 73 | 74 | (define-key global-map (kbd kb-df) nil) 75 | (define-key minibuffer-local-map (kbd kb-df) nil)) 76 | 77 | ;; modal editing base 78 | (defvar edit-state 'NORMAL) 79 | (defvar map-normal (make-sparse-keymap)) 80 | (defvar map-insert (make-sparse-keymap)) 81 | 82 | (setq eww-mode-map map-normal) 83 | (setq eww-link-keymap map-normal) 84 | ;(setq special-mode-map map-normal) 85 | 86 | (defun switch-to-insert-mode () 87 | (interactive) 88 | (if (and buffer-read-only 89 | (not (eq major-mode 'eww-mode))) 90 | (message "Error: buffer is read-only.") 91 | (use-local-map map-insert) 92 | (setq edit-state 'INSERT) 93 | (setq-local cursor-type 'hbar))) 94 | 95 | (defun switch-to-normal-mode () 96 | (interactive) 97 | (when (or (eq major-mode 'eww-mode) 98 | (not buffer-read-only)) 99 | (use-local-map map-normal) 100 | (setq edit-state 'NORMAL) 101 | (setq-local cursor-type 'box))) 102 | 103 | (defun abort () 104 | (interactive) 105 | (cond ((active-minibuffer-window) (abort-recursive-edit)) 106 | ((bound-and-true-p multiple-cursors-mode) (mc/keyboard-quit)) 107 | (t (switch-to-normal-mode))) 108 | (keyboard-quit)) 109 | 110 | (defun my-self-insert-command () 111 | (interactive) 112 | (if (and (eq edit-state 'NORMAL) 113 | (not (minibufferp))) 114 | (message "🧸 Press 'a' to switch to insert mode.") 115 | (call-interactively #'self-insert-command))) 116 | 117 | (add-hook 'after-change-major-mode-hook #'switch-to-normal-mode) 118 | (global-set-key [remap self-insert-command] #'my-self-insert-command) 119 | 120 | ;; editor bindings 121 | (defmacro kb (mode &rest bindings) 122 | `(dolist (binding ',bindings) 123 | (define-key (pcase ,mode 124 | (:normal map-normal) 125 | (:insert map-insert) 126 | (:any global-map) 127 | (:dired dired-mode-map)) 128 | (kbd (car binding)) (cdr binding)))) 129 | 130 | (kb :normal 131 | ("f" . forward-word) 132 | ("b" . backward-word) 133 | ("F" . forward-sentence) 134 | ("B" . backward-sentence) 135 | ("e" . move-end-of-line) 136 | ("E" . move-beginning-of-line) 137 | ("g" . beginning-of-buffer) 138 | ("G" . end-of-buffer) 139 | ("j" . pull-line) 140 | ("D" . open-line) 141 | ("d" . kill-line-alt) 142 | ("V" . kill-ring-save) 143 | ("v" . set-mark-command) 144 | ("a" . switch-to-insert-mode)) 145 | 146 | (with-eval-after-load 'eww 147 | (kb :normal 148 | ("C-h b" . eww-back-url) 149 | ("C-h r" . eww-reload) 150 | ("" . eww-follow-link))) 151 | 152 | (with-eval-after-load 'org 153 | (kb :normal 154 | ("C-o l" . org-toggle-link-display))) 155 | 156 | ;; depends on: https://github.com/jcfk/dired-nnn 157 | (with-eval-after-load 'dired 158 | (kb :dired 159 | ("SPC" . dired-nnn-toggle-mark) 160 | ("a" . dired-mark-subdir-files) 161 | ("A" . dired-toggle-marks) 162 | ("p" . dired-nnn-paste) 163 | ("v" . dired-nnn-move))) 164 | 165 | (kb :any 166 | ("" . abort) 167 | ("" . abort) 168 | ("" . report) 169 | ("M-`" . repeat) 170 | ("M-c" . instructions) 171 | ("M-x" . execute-extended-command) 172 | ("C-s" . incremental-search) 173 | ("C-z" . undo-only) 174 | ("C-r" . undo-redo) 175 | ("C-S-v" . clipboard-yank) 176 | ("C-h c" . describe-char) 177 | ("C-h k" . describe-key) 178 | ("C-h m" . describe-mode) 179 | ("C-h l" . list-faces-display) 180 | ("C-x f" . find-file) 181 | ("C-x b" . ibuffer) 182 | ("C-x k" . kill-buffer) 183 | ("C-x 0" . delete-window) 184 | ("C-x 1" . delete-other-windows) 185 | ("C-x 2" . split-window-below) 186 | ("C-x 3" . split-window-right) 187 | 188 | ("" . windmove-up) 189 | ("" . windmove-down) 190 | ("" . windmove-left) 191 | ("" . windmove-right) 192 | ("" . shrink-window) 193 | ("" . enlarge-window) 194 | ("" . shrink-window-horizontally) 195 | ("" . enlarge-window-horizontally) 196 | 197 | ("" . mc/edit-lines) 198 | ("" . mc/vertical-align-with-space) 199 | ("" . mc/unmark-previous-like-this) 200 | ("" . mc/unmark-next-like-this) 201 | ("" . mc/mark-previous-like-this) 202 | ("" . mc/mark-next-like-this)) 203 | -------------------------------------------------------------------------------- /.config/emacs/init.el: -------------------------------------------------------------------------------- 1 | ;;; init.el -*- lexical-binding: t -*- 2 | ;;; Commentary: my lisp machine configuration 3 | 4 | (defun report() 5 | (interactive) 6 | (let* ((buffers (seq-filter 7 | (lambda (name) (not (string-match "^ " name))) 8 | (mapcar 'buffer-name (buffer-list)))) 9 | (buffer (ido-completing-read "buffer: " buffers))) 10 | (save-excursion 11 | (with-current-buffer buffer 12 | (clipboard-kill-ring-save (point-min) (point-max)) 13 | (message "y+ %s" buffer))))) 14 | 15 | ;; Linux: $HOME/.emacs.d 16 | ;; Windows: C:\Users\User\AppData\Roaming\.emacs.d 17 | (setq default-directory user-emacs-directory 18 | custom-file "/dev/null") ; tu puta madre 19 | 20 | (defun reload () 21 | (interactive) 22 | (let ((config-dir (expand-file-name "el/" user-emacs-directory))) 23 | (mapc (lambda (file) 24 | (let ((file-path (expand-file-name file config-dir))) 25 | (when (file-readable-p file-path) 26 | (load-file file-path)))) '("fl.el" 27 | "fm.el" 28 | "kb.el" 29 | "dired-nnn.el")))) 30 | ;; package initialize isn't needed over v27 31 | (setq package-enable-at-startup nil) 32 | (setq package-archives 33 | '(("elpa" . "https://elpa.gnu.org/packages/") 34 | ("melpa" . "https://melpa.org/packages/"))) 35 | 36 | (unless (package-installed-p 'use-package) 37 | (package-refresh-contents) 38 | (package-install 'use-package) 39 | (require 'use-package)) 40 | 41 | (defmacro install-packages (&rest packages) 42 | `(progn 43 | ,@(mapcar (lambda (pkg) 44 | (if (consp pkg) 45 | `(use-package ,(car pkg) ,@(cdr pkg) 46 | :ensure t))) packages) 47 | ;; load files after checking packages 48 | (reload))) 49 | 50 | (install-packages 51 | (fontawesome) 52 | (svg-lib) 53 | (svg-tag-mode) 54 | (lua-mode) 55 | (ahk-mode) 56 | (powershell) 57 | (tree-sitter-langs) 58 | (tree-sitter :config (progn (global-tree-sitter-mode) 59 | (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))) 60 | (rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode)) 61 | (rainbow-mode :hook ((css-mode 62 | lua-mode 63 | emacs-lisp-mode) . rainbow-mode)) 64 | (multiple-cursors) 65 | (smartparens :hook ((prog-mode . smartparens-mode) 66 | (lisp-mode . smartparens-strict-mode))) 67 | (undo-fu) 68 | (undo-fu-session :after undo-fu 69 | :config (setq undo-fu-session-directory (expand-file-name "hist-undo" user-emacs-directory)) 70 | (setq undo-fu-session-file-limit nil) 71 | (setq undo-fu-session-linear t) 72 | (undo-fu-session-global-mode))) 73 | ;; conf downtown 74 | (setq make-backup-files nil 75 | create-lockfiles nil 76 | auto-save-default nil 77 | auto-save-list-file-prefix nil) 78 | 79 | (defun export () 80 | (interactive) 81 | (if-let ((file buffer-file-name)) 82 | (let* ((backup-dir (expand-file-name "hist-back/" user-emacs-directory)) 83 | (backup-name (read-string "file-name: " (file-name-nondirectory file))) 84 | (backup-path (expand-file-name backup-name backup-dir))) 85 | (make-directory backup-dir t) 86 | (copy-file file backup-path t) 87 | (message "file exported to %s" backup-path)) 88 | (message "buffer is not associated with a file"))) 89 | 90 | (prefer-coding-system 'utf-8) 91 | (defalias 'yes-or-no-p 'y-or-n-p) 92 | 93 | ;; editor greetings 94 | (defun display-startup-echo-area-message () 95 | (let ((user-name (getenv "USER"))) 96 | (message "hi %s, happy hacking!" user-name))) 97 | 98 | (setq inhibit-startup-screen t 99 | initial-scratch-message ";; new comment \n\n" 100 | initial-buffer-choice nil 101 | confirm-kill-processes nil 102 | confirm-nonexistent-file-or-buffer nil) 103 | 104 | ;; line by line scrolling 105 | (setq scroll-step 1 106 | scroll-margin 5 107 | scroll-conservatively 10000) 108 | 109 | (setq default-frame-alist 110 | '((font . "Iosevka Comfy Medium 10") 111 | (tool-bar-lines . 0) 112 | (menu-bar-lines . 0) 113 | (left-fringe . 0) 114 | (right-fringe . 0) 115 | (internal-border-width . 25) 116 | (vertical-scroll-bars . nil) 117 | (window-divider-default-right-width . 4) 118 | (window-divider-default-places . right-only))) 119 | 120 | (window-divider-mode 1) 121 | (global-hl-line-mode 1) 122 | (blink-cursor-mode 0) 123 | (show-paren-mode 1) 124 | (delete-selection-mode 1) 125 | 126 | ;; no exposed gui 127 | (tooltip-mode -1) 128 | (setq use-dialog-box nil 129 | use-file-dialog nil) 130 | 131 | ;; hide cursor on inactive windows 132 | (setq-default cursor-in-non-selected-windows nil) 133 | 134 | (setq-default truncate-lines t 135 | indent-tabs-mode nil) 136 | 137 | ;; remove dollar sign at the end of truncated lines 138 | (set-display-table-slot standard-display-table 0 ?\ ) 139 | (setq tab-width 4) 140 | 141 | ;; trim trailing whitespaces on save 142 | (add-hook 'before-save-hook 'delete-trailing-whitespace) 143 | 144 | ;; org-mode stuff 145 | (setq org-fontify-whole-block-delimiter-line t 146 | org-fontify-whole-heading-line t 147 | org-fontify-todo-headline t 148 | org-fontify-done-headline t 149 | org-cycle-level-faces nil 150 | org-adapt-indentation nil 151 | org-pretty-entities t 152 | org-use-sub-superscripts "^:{}" 153 | org-export-with-sub-superscripts nil) 154 | 155 | (setq svg-tag-tags 156 | '(("|[0-9a-zA-Z- ]+?|" . ((lambda (tag) (svg-tag-make tag 157 | :face 'font-lock-comment-face 158 | :font-family "Iosevka Mia Term Extended" 159 | :font-size 9 160 | :radius 2 161 | :inverse t :margin 0 162 | :beg 1 :end -1)))))) 163 | 164 | (add-hook 'org-mode-hook 'svg-tag-mode 1) 165 | 166 | ;; my fudgee barr 167 | (setq-default mode-line-format nil) 168 | 169 | (defun fudgee-barr () 170 | (dolist (window (window-list)) 171 | (with-current-buffer (window-buffer window) 172 | (let* ((str-right (format "Ln %d, Col %d " 173 | (line-number-at-pos) 174 | (current-column))) 175 | 176 | (file-name (if (eq major-mode 'eww-mode) 177 | (let ((url (plist-get eww-data :url))) 178 | (if url (concat "URL: " url) 179 | "EWW")) 180 | (file-name-nondirectory 181 | (or buffer-file-name "Untitled")))) 182 | 183 | (str-left (format " %s [%s] (#%s) (%s%s%s)" 184 | file-name 185 | (if (boundp 'edit-state) edit-state "OTHERS") 186 | (if vc-mode (substring vc-mode 5) "?") 187 | (format-mode-line mode-name) 188 | (if abbrev-mode " ABBREV" "") 189 | (if eldoc-mode " ELDOC" ""))) 190 | 191 | (fill-length (max 0 (- (window-width window) 192 | (length str-left) 193 | (length str-right) 0))) 194 | 195 | (face (if (eq window (selected-window)) 196 | 'mode-line 197 | 'mode-line-inactive)) 198 | 199 | (icon (if (eq window (selected-window)) 200 | (propertize "  " 'face 'icon) 201 | (propertize "  " 'face 'icon-inactive))) 202 | 203 | (str-left-p (propertize str-left 'face face)) 204 | (str-right-p (propertize str-right 'face face)) 205 | (str-cents-p (propertize (make-string fill-length ?\s) 'face face)) 206 | (x (concat icon 207 | str-left-p 208 | str-cents-p 209 | str-right-p))) 210 | (setq-local header-line-format x))))) 211 | 212 | (add-hook 'window-configuration-change-hook 'fudgee-barr) 213 | (add-hook 'post-command-hook 'fudgee-barr) 214 | -------------------------------------------------------------------------------- /.config/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | serif 8 | 9 | Maple Mono 10 | M PLUS 2 11 | 12 | 13 | 14 | sans-serif 15 | 16 | Maple Mono 17 | M PLUS 2 18 | 19 | 20 | 21 | mono 22 | 23 | monospace 24 | 25 | 26 | 27 | monospace 28 | 29 | Maple Mono 30 | M PLUS 2 31 | 32 | 33 | 34 | 35 | 36 | 37 | true 38 | 39 | 40 | true 41 | 42 | 43 | hintfull 44 | 45 | 46 | rgb 47 | 48 | 49 | lcddefault 50 | 51 | 52 | 53 | 54 | 55 | /usr/share/fonts/TTF/DejaVu/DejaVuSans* 56 | /usr/share/fonts/TTF/DejaVu/DejaVuSerif* 57 | /usr/share/fonts/TTF/DejaVu/DejaVuMath* 58 | /usr/share/fonts/TTF/Liberation/LiberationSans* 59 | /usr/share/fonts/TTF/Liberation/LiberationSerif* 60 | /usr/share/fonts/TTF/Liberation/LiberationMono* 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /.config/foot/foot.ini: -------------------------------------------------------------------------------- 1 | font = Comic Code:size=9:weight=medium 2 | font-bold = Comic Code:size=9:weight=bold 3 | pad = 34x34 4 | 5 | # https://linuxrocks.online/@dnkl/112297003721346327 6 | resize-by-cells=no 7 | 8 | [scrollback] 9 | lines = 10000 10 | 11 | [tweak] 12 | font-monospace-warn = no 13 | overflowing-glyphs = yes 14 | 15 | [cursor] 16 | blink = yes 17 | style = block 18 | unfocused-style = none 19 | 20 | [url] 21 | launch = xdg-open ${url} 22 | 23 | [main] 24 | shell = /bin/bash --rcfile /home/irhl/.profile 25 | include = /home/irhl/.config/foot/theme.ini 26 | 27 | [key-bindings] 28 | search-start = Control+Shift+f 29 | show-urls-copy = Control+Shift+l 30 | font-reset = Control+Shift+r 31 | clipboard-paste = Control+Shift+v 32 | -------------------------------------------------------------------------------- /.config/foot/theme.ini: -------------------------------------------------------------------------------- 1 | [cursor] 2 | color = fcf5ee 5e5958 3 | 4 | [colors] 5 | selection-foreground = fcf5ee 6 | selection-background = 5e5958 7 | 8 | foreground = 5e5958 9 | background = fcf5ee 10 | 11 | regular0 = 5e5958 12 | bright0 = 726e6a 13 | 14 | regular1 = eeaac1 15 | bright1 = eebece 16 | 17 | regular2 = b2d2bd 18 | bright2 = c2dcca 19 | 20 | regular3 = e7d3b0 21 | bright3 = f5e0bb 22 | 23 | regular4 = afb9b9 24 | bright4 = cdd7d7 25 | 26 | regular5 = c1d4d6 27 | bright5 = d3e9eb 28 | 29 | regular6 = b4a393 30 | bright6 = bdab9a 31 | 32 | regular7 = b0aaa4 33 | bright7 = bfb8b1 34 | -------------------------------------------------------------------------------- /.config/git/config: -------------------------------------------------------------------------------- 1 | [user] name = irhl 2 | email = irhl@users.noreply.github.com 3 | signingkey = ~/.ssh/id_ed25519 4 | 5 | [gpg] format = ssh 6 | [commit] gpgsign = true 7 | 8 | [core] compression = 0 9 | [http] postBuffer = 157286400 10 | -------------------------------------------------------------------------------- /.config/mpv/scripts/config.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.keymaps = { 4 | left = 'seek -10', 5 | right = 'seek 10', 6 | space = 'cycle pause', 7 | 8 | q = 'quit', 9 | z = 'playlist-next', 10 | Z = 'playlist-prev', 11 | x = 'add volume 5', 12 | X = 'add volume -10', 13 | m = 'cycle mute', 14 | s = 'cycle sub down', 15 | S = 'cycle sub visibility', 16 | 17 | h = 'add video-pan-x -0.01', 18 | j = 'add video-pan-y 0.01', 19 | k = 'add video-pan-y -0.01', 20 | l = 'add video-pan-x 0.01', 21 | f = 'add video-zoom 0.1', 22 | F = 'add video-zoom -0.1', 23 | r = 'set video-zoom 0.01 ; ' .. 24 | 'set video-pan-x 0 ; ' .. 25 | 'set video-pan-y 0 ; ' .. 26 | 'set video-rotate 0', 27 | 28 | ['/, MBTN_RIGHT'] = 'vf toggle hflip', 29 | e = 'cycle_values video-rotate 90 180 270 0', 30 | 31 | f1 = 'af toggle equalizer=w=1:t=o:f=55:g=16:r=f64,dynaudnorm=b=1:m=1', 32 | f2 = 'af toggle asetrate=44100*1.08', 33 | f3 = 'af toggle asetrate=44100*1.12', 34 | f4 = 'af toggle asetrate=44100*1.22', 35 | f5 = 'af toggle asetrate=44100*1.32', 36 | f6 = 'af toggle asetrate=44100*1.52', 37 | } 38 | 39 | M.options = { 40 | volume = '60', 41 | volume_max = '100', 42 | ao = 'alsa', 43 | audio_device = 'alsa/plug:dmix', 44 | 45 | vo = 'gpu', 46 | video_sync = 'audio', 47 | audio_display = 'no', 48 | 49 | scale = 'ewa_lanczos', 50 | cscale = 'ewa_lanczos', 51 | dscale = 'lanczos', 52 | dither_depth = 'auto', 53 | correct_downscaling = 'yes', 54 | linear_downscaling = 'yes', 55 | sigmoid_upscaling = 'yes', 56 | 57 | cache = 'yes', 58 | demuxer_max_bytes = '20M', 59 | demuxer_max_back_bytes = '20M', 60 | 61 | loop_file = 'yes', 62 | input_default_bindings = 'no', 63 | input_builtin_bindings = 'no', 64 | 65 | alpha = 'no', 66 | background_color = '#fcf5ee', 67 | geometry = '17%', 68 | ontop = 'yes', 69 | window_dragging = 'yes', 70 | video_zoom = '0.01', 71 | 72 | osc = 'no', 73 | osd_level = '0', 74 | osd_align_y = 'top', 75 | 76 | sub_font = 'Maple Mono', 77 | sub_color = '#fcf5ee', 78 | sub_shadow_offset = '2', 79 | sub_shadow_color = '#5b5958', 80 | sub_border_size = '0', 81 | sub_margin_x = '70', 82 | 83 | slang = 'nl,jp,jpn,en,eng', 84 | alang = 'nl,jp,jpn,en,eng', 85 | } 86 | 87 | return M 88 | -------------------------------------------------------------------------------- /.config/mpv/scripts/hachos.lua: -------------------------------------------------------------------------------- 1 | local script_directory = debug.getinfo(1, 'S').source:sub(2):match('(.*/)') 2 | package.path = script_directory .. '?.lua;' .. package.path 3 | 4 | local mp = require 'mp' 5 | local config = require('config') 6 | 7 | for pattern, action in pairs(config.keymaps) do 8 | local function keymatch(k) 9 | return k:match('[left|right|zZxXfF|hjkl]') and "repeatable" or nil 10 | end 11 | 12 | for k in pattern:gmatch('[^,]+') do 13 | local function action_handle() 14 | (type(action) == "function" and action or function() mp.command(action) end)() 15 | end 16 | mp.add_forced_key_binding(k, action_handle, keymatch(k)) 17 | end 18 | end 19 | 20 | for opt, arg in pairs(config.options) do 21 | mp.set_property('options/' .. opt:gsub('_', '-'), arg) 22 | end 23 | -------------------------------------------------------------------------------- /.config/mpv/scripts/thrill.lua: -------------------------------------------------------------------------------- 1 | local mp = require('mp') 2 | local has_ran = false 3 | 4 | local extensions = { 5 | audio = { 6 | ".mp3", ".opus", ".flac" 7 | }, 8 | 9 | image = { 10 | ".jpg", ".png", ".gif" 11 | }, 12 | } 13 | 14 | local source = { 15 | audio = { 16 | "/home/irhl/.config/mpv/script-opts/piko.lua", 17 | "/home/irhl/.config/mpv/script-opts/typewriter.lua" 18 | }, 19 | 20 | image = { 21 | "/home/irhl/.config/mpv/script-opts/imim.lua" 22 | }, 23 | 24 | misc = { 25 | "/home/irhl/.config/mpv/script-opts/autoload.lua" 26 | } 27 | } 28 | 29 | function main() 30 | if has_ran then 31 | return 32 | end 33 | 34 | for _, script in ipairs(source.misc) do 35 | dofile(script) 36 | end 37 | 38 | local filename = mp.get_property("filename") 39 | for type, exts in pairs(extensions) do 40 | for _, ext in ipairs(exts) do 41 | if filename:match(ext.."$") then 42 | 43 | for _, script in ipairs(source[type]) do 44 | mp.commandv("load-script", script) 45 | end 46 | 47 | has_ran = true 48 | return 49 | end 50 | end 51 | end 52 | end 53 | 54 | mp.register_event("start-file", main) 55 | -------------------------------------------------------------------------------- /.config/sway/config: -------------------------------------------------------------------------------- 1 | # Philips Consumer Electronics Company 2 | # Name: PHL24M1N3200Z 3 | # Mode: User Define 4 | # RGB: 100, 95, 92 5 | # 6 | # Brightness: 65 7 | # Contrast: 50 8 | # Sharpness: 50 9 | # Gamma: 2.2 10 | 11 | output DP-1 { 12 | adaptive_sync off 13 | pos 0,0 14 | mode 1920x1080@120.00Hz 15 | bg #baaba4 solid_color 16 | } 17 | 18 | input type:keyboard { 19 | repeat_delay 200 20 | repeat_rate 50 21 | } 22 | 23 | input type:pointer { 24 | accel_profile "flat" 25 | pointer_accel "0" 26 | } 27 | 28 | set $mod Mod4 29 | set $alt Mod1 30 | floating_modifier $mod normal 31 | 32 | bindsym $mod+0 exec amixer -c 1 -q sset Master 4%+ 33 | bindsym $mod+9 exec amixer -c 1 -q sset Master 4%- 34 | bindsym $mod+m exec chromium 35 | bindsym $mod+n exec firefox 36 | bindsym $mod+z exec foot 37 | bindsym $mod+e exec emacs --init-directory $HOME/.config/emacs.d/ 38 | bindsym $mod+s exec grim -g "$(slurp)" $HOME/$(date +%F-%H-%M-%S).jpg 39 | bindsym $mod+y exec grim -g "0,0 1920x1080" $HOME/$(date +%F-%H-%M-%S).jpg 40 | bindsym $mod+c kill 41 | bindsym $mod+a fullscreen 42 | bindsym $mod+f floating toggle 43 | bindsym $mod+1 workspace number 1 44 | bindsym $mod+2 workspace number 2 45 | bindsym $mod+3 workspace number 3 46 | bindsym $mod+4 workspace number 4 47 | bindsym $mod+5 workspace number 5 48 | bindsym $mod+6 workspace number 6 49 | 50 | bindsym $mod+shift+1 move container to workspace number 1 51 | bindsym $mod+shift+2 move container to workspace number 2 52 | bindsym $mod+shift+3 move container to workspace number 3 53 | bindsym $mod+shift+4 move container to workspace number 4 54 | bindsym $mod+shift+5 move container to workspace number 5 55 | bindsym $mod+shift+6 move container to workspace number 6 56 | bindsym $mod+shift+c reload 57 | bindsym $mod+shift+q exit 58 | 59 | default_border pixel 0 60 | hide_edge_borders both 61 | 62 | gaps left 172 63 | gaps right 388 64 | gaps top 158 65 | gaps bottom 98 66 | 67 | for_window [app_id=".*"] floating enable, titlebar hide 68 | for_window [app_id=foot] border pixel 1, resize set 440 340 69 | for_window [class=Emacs] border pixel 1 70 | for_window [app_id=mpv] border pixel none 71 | 72 | # (i) border, background, foreground, indicator, child 73 | set $ac #fbf6f6 74 | set $fg #fbf6f6 75 | 76 | client.focused $ac $ac $ac $ac $ac 77 | client.focused_inactive $ac $ac $ac $ac $ac 78 | client.unfocused $ac $ac $ac $ac $ac 79 | client.urgent $fg $fg $fg $fg $fg 80 | 81 | seat seat0 xcursor_theme \ 82 | "material_light_cursors" 24 83 | 84 | exec_always gsettings set org.gnome.desktop.interface cursor-theme \ 85 | "material_light_cursors" 24 86 | 87 | # disables the mouse middle click from 88 | # performing a primary selection paste. 89 | exec wl-paste -p --watch wl-copy -cp 90 | 91 | # sleep in 2 hours and 13 minutes idle. 92 | # turns off display in 40 minutes idle. 93 | # resume on mouse and keyboard input. 94 | exec swayidle -w \ 95 | timeout 8000 'sudo zzz' \ 96 | timeout 2400 'swaymsg "output * dpms off"' \ 97 | resume 'swaymsg "output * dpms on"' 98 | -------------------------------------------------------------------------------- /.profile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$TERM" = linux ]; then 4 | export PS1="-> " 5 | export CFLAGS="-O3 -pipe -march=native" 6 | export CXXFLAGS="$CFLAGS" 7 | export MAKEFLAGS="-j$(nproc)" 8 | export LANG="en_US.UTF-8" 9 | export HISTFILESIZE="" 10 | export HISTSIZE="" 11 | export PATH="$HOME/.local/share/bin:$PATH" 12 | export XDG_RUNTIME_DIR="/tmp/1000" 13 | mkdir -p "${XDG_RUNTIME_DIR}" 14 | fi 15 | 16 | make() { make CC=gcc ;} 17 | wget() { wget --no-hsts ;} 18 | wttr() { curl wttr.in/taguig?format=1 ;} 19 | send() { curl -F "file=@$1" 'https://x0.at' | wl-copy ;} 20 | croc() { wl-copy --clear ;} 21 | pick() { grim -g "$(slurp -p)" -t ppm - | 22 | convert - -format '%[pixel:p{0,0}]' txt:- ;} 23 | 24 | # view full command outputs with no hassle. 25 | qq() { eval "$@" | less -R ;} 26 | 27 | hh1() { du -bhd 1 ;} 28 | hh2() { xbps-query -l | wc -l ;} 29 | 30 | ds1() { df -Th ;} 31 | ds2() { df -h | grep 'nvme' ;} 32 | ds3() { ls -l /dev/disk/by-uuid/ ;} 33 | ds4() { lsusb ;} 34 | 35 | fcl() { fc-list ;} 36 | fcf() { fc-list : family | sort | uniq ;} 37 | fci() { fc-match -v | grep -E 'hint|rgb|lcd|dpi' ;} 38 | 39 | # aliases are prone to quote errors, 40 | # aliases are actually just functions, 41 | # aliases can replace binary calls, 42 | # but we can do the same thing 43 | # by putting command before sway. 44 | sway() { command sway -d > "$HOME/.cache/sway.log" 2>&1 ;} 45 | 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-2024 https://github.com/irhl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🍓🥮 2 | 3 | - Pantallazos
4 | [Sábado 22 de Junio 2024](https://github.com/user-attachments/assets/2cddb043-8883-459e-a9d1-69c21c9bc33a) 5 | -------------------------------------------------------------------------------- /bin/bb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -x "$(command -v "$1")" ]; then 4 | printf '%s\n' "$0 [executable]" 5 | exit 1 6 | fi 7 | 8 | # launch and detach process from the terminal 9 | setsid "$@" > /dev/null 2>&1 & 10 | exec true 11 | -------------------------------------------------------------------------------- /bin/cb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | palette() { 4 | cb='\033[48;5;%sm%s' 5 | printf "$cb$cb\n" \ 6 | $1 "$(width)" \ 7 | $2 "$(width)" 8 | } 9 | width() { printf '%*s' 4 ":" ;} 10 | 11 | for i in 0 1 2 3 4 5 6 7; do 12 | palette "$i" "$((i + 8))" 13 | done 14 | 15 | printf '\033[0m\n' 16 | -------------------------------------------------------------------------------- /bin/cg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -ne 0 ]; then 4 | printf '%s\n' "$0 [input] -> " 5 | exit 1 6 | fi 7 | 8 | while IFS= read -r line; do 9 | # prepend program into input 10 | line="git $line" 11 | 12 | # create the aliases structure 13 | for cmd in "cc: commit -m 'om undergång och de tretton järtekn'" \ 14 | "nc: commit -a --allow-empty-message -m \"\"" \ 15 | "s: status" \ 16 | "l: log" \ 17 | "ll: log --all --stat --decorate" \ 18 | "sl: shortlog --summary --numbered"; do 19 | 20 | # extract contents of aliases structure 21 | opt=${cmd%%:*} 22 | arg=${cmd#*:} 23 | 24 | # trimming stuff, do string replacements 25 | # direct methods are not possible: 26 | # https://www.shellcheck.net/wiki/SC3060 27 | str="" 28 | for pattern in $line; do 29 | [ $pattern = $opt ] && str=$str$arg || str="$str$pattern " 30 | done 31 | 32 | line=$str 33 | done 34 | 35 | eval $line || exit 1 36 | done 37 | -------------------------------------------------------------------------------- /bin/fm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export NNN_USE_EDITOR=0 4 | export NNN_COLORS=7777 5 | export NNN_FCOLORS=c1e20b02006005f7c6d6abc4 6 | export NNN_OPENER="$HOME/.local/share/bin/milf" 7 | 8 | export NNN_BMS="\ 9 | a:$HOME;\ 10 | l:$HOME/.local/share;\ 11 | c:$HOME/.config;\ 12 | d:$HOME/Downloads;\ 13 | b:$HOME/Projects;\ 14 | g:$HOME/git;\ 15 | v:$HOME/.config/nvim;\ 16 | e:$HOME/.config/emacs.d;\ 17 | m:/mnt" 18 | 19 | export NNN_PLUG="\ 20 | 1:empty_slot;\ 21 | 2:empty_slot;\ 22 | 3:empty_slot;\ 23 | y:-!echo \$PWD/\$nnn|wl-copy*" 24 | 25 | /usr/bin/nnn "$@" 26 | -------------------------------------------------------------------------------- /bin/mf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | TERM="foot -e" 4 | VIDEO="mpv" 5 | IMAGE="mpv" 6 | MUSIC="mpv" 7 | 8 | case "${1##*.}" in 9 | docx | doc | pdf) 10 | $BROWSER "$1" 11 | ;; 12 | png | jpe | jpg | jpeg | jfif | avif | webp | gifv | gif) 13 | $IMAGE "$1" 14 | ;; 15 | webm | wmv | mkv | mp4) 16 | $VIDEO "$1" 17 | ;; 18 | opus | mp3 | flac) 19 | $TERM $MUSIC "$1" 20 | ;; 21 | *) 22 | $TERM emacs -nw --init-directory="/home/irhl/.config/emacs.d" "$1" 23 | ;; 24 | esac 25 | -------------------------------------------------------------------------------- /bin/yi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -lt 2 ]; then 4 | printf '%s\n' "$0 " 5 | exit 1 6 | fi 7 | 8 | case $1 in 9 | mp3) 10 | yt-dlp $2 \ 11 | --extract-audio \ 12 | --audio-format mp3 \ 13 | --audio-quality 0 \ 14 | --add-metadata \ 15 | --embed-thumbnail \ 16 | --ppa "EmbedThumbnail+ffmpeg_o:-c:v mjpeg \ 17 | -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" \ 18 | -o "$HOME/Music/%(title)s.%(ext)s" 19 | ;; 20 | mp4) 21 | yt-dlp $2 \ 22 | --write-sub --sub-lang=en \ 23 | -f "bestvideo[ext=mp4][height<=1080]+bestaudio[ext=m4a]/best[height<=1080]" \ 24 | -o "$HOME/Videos/%(title)s.%(ext)s" 25 | ;; 26 | esac 27 | --------------------------------------------------------------------------------