From 0646a214a6f7627ff8df4a847c74c548da8755f9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 5 Nov 2023 02:24:49 +0100 Subject: updated gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 11392b4..adf0262 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,8 @@ config/hyprland/waybar/colors.css config/old/vim/plugged/ config/old/vim/viminfo* config/theme/gtk-3.0/bookmarks +config/extra/emacs/auto-save-list/ +config/extra/emacs/config.el +config/extra/emacs/elpaca/ +config/extra/emacs/projectile-bookmarks.eld +config/extra/emacs/recentf -- cgit v1.2.3 From c9d1aa51bc0aa81cf4aa11808884c2625601367d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 5 Nov 2023 19:53:58 +0100 Subject: updated emacs config --- config/extra/emacs/config.org | 689 ++++++++++++++++++++++++++++-------------- config/extra/emacs/init.el | 11 +- 2 files changed, 479 insertions(+), 221 deletions(-) diff --git a/config/extra/emacs/config.org b/config/extra/emacs/config.org index 60c0812..50d6af6 100644 --- a/config/extra/emacs/config.org +++ b/config/extra/emacs/config.org @@ -4,38 +4,48 @@ #+OPTIONS: toc:3 * TABLE OF CONTENTS :toc: -- [[#startup-configuration][Startup Configuration]] +- [[#startup][Startup]] - [[#elpaca-package-manager][Elpaca (Package Manager)]] - [[#evil-mode][Evil Mode]] - [[#keybindings][Keybindings]] - [[#helper-functions][Helper functions]] - [[#buffer-move][buffer-move]] - [[#reload-emacs][Reload Emacs]] -- [[#graphical-configuration][Graphical configuration]] - - [[#disable-menubar-toolbars-and-scrollbars][Disable Menubar, Toolbars and Scrollbars]] +- [[#graphical-tweaks][Graphical tweaks]] + - [[#disable-ui-elements][Disable UI elements]] - [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]] + - [[#blinking-cursor][blinking cursor]] - [[#fonts][Fonts]] - [[#setting-the-font-face][Setting the Font Face]] - [[#theme][Theme]] + - [[#transparency][Transparency]] + - [[#highlight-todo][Highlight TODO]] +- [[#misc-options][Misc. options]] - [[#org-mode][ORG Mode]] - [[#enabling-table-of-contents][Enabling Table of Contents]] - [[#enabling-org-bullets][Enabling Org Bullets]] - - [[#source-code-block-tag-expansion][Source Code Block Tag Expansion]] +- [[#big-ass-header][Big ass header]] - [[#shell][Shell]] - [[#default-shell][Default shell]] - [[#eshell][Eshell]] +- [[#language-support][Language Support]] - [[#packages][Packages]] + - [[#dashboard][Dashboard]] + - [[#diminish][Diminish]] + - [[#dired][Dired]] + - [[#git][Git]] + - [[#ivy-counsel][Ivy (Counsel)]] + - [[#language-support-1][Language Support]] + - [[#modeline][Modeline]] + - [[#perspective][Perspective]] + - [[#projectile][Projectile]] + - [[#rainbow-mode][Rainbow Mode]] + - [[#rainbow-delimiters][Rainbow Delimiters]] - [[#sudo-edit][Sudo edit]] + - [[#tldr][TLDR]] - [[#which-key][Which-Key]] - - [[#all-the-icons][All The Icons]] - - [[#rainbow-mode][Rainbow Mode]] - - [[#ivy-counsel][IVY (Counsel)]] - - [[#projectile][Projectile]] - - [[#dashboard][Dashboard]] - - [[#flycheck][Flycheck]] - - [[#company][COMPANY]] -* Startup Configuration +* Startup ** Elpaca (Package Manager) #+begin_src emacs-lisp (defvar elpaca-installer-version 0.6) @@ -104,8 +114,8 @@ ** Evil Mode #+begin_src emacs-lisp -;; Expands to: (elpaca evil (use-package evil :demand t)) -(use-package evil + ;; Expands to: (elpaca evil (use-package evil :demand t)) + (use-package evil :init ;; tweak evil's configuration before loading it (setq evil-want-integration t) ;; This is optional since it's already set to t by default. (setq evil-want-keybinding nil) @@ -118,101 +128,221 @@ (setq evil-collection-mode-list '(dashboard dired ibuffer)) (evil-collection-init)) (use-package evil-tutor) + ;; Using RETURN to follow links in Org/Evil + ;; Unmap keys in 'evil-maps if not done, (setq org-return-follows-link t) will not work + (with-eval-after-load 'evil-maps + (define-key evil-motion-state-map (kbd "SPC") nil) + (define-key evil-motion-state-map (kbd "RET") nil) + (define-key evil-motion-state-map (kbd "TAB") nil)) + ;; Setting RETURN key in org-mode to follow links + (setq org-return-follows-link t) + #+end_src ** Keybindings #+begin_src emacs-lisp -(use-package general - :config - (general-evil-setup) - - ;; set up 'SPC' as the global leader key - (general-create-definer user/leader-keys - :states '(normal insert visual emacs) - :keymaps 'override - :prefix "SPC" ;; set leader - :global-prefix "M-SPC") ;; access leader in insert mode - - (user/leader-keys - "SPC" '(counsel-M-x :wk "Counsel M-x") - "." '(find-file :wk "Find file") - "f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config") - "f r" '(counsel-recentf :wk "Find recent files") - "f w" '(evil-write :wk "Write current buffer") - "f q" '(evil-quit :wk "Write current buffer") - "TAB TAB" '(comment-line :wk "Comment lines")) - - (user/leader-keys - "b" '(:ignore t :wk "buffer") - "b b" '(switch-to-buffer :wk "Switch buffer") - "b i" '(ibuffer :wk "Ibuffer") - "b k" '(kill-this-buffer :wk "Kill this buffer") - "b n" '(next-buffer :wk "Next buffer") - "b p" '(previous-buffer :wk "Previous buffer") - "b r" '(revert-buffer :wk "Reload buffer")) - - (user/leader-keys - "e" '(:ignore t :wk "Eshell/Evaluate") - "e b" '(eval-buffer :wk "Evaluate elisp in buffer") - "e d" '(eval-defun :wk "Evaluate defun containing or after point") - "e e" '(eval-expression :wk "Evaluate and elisp expression") - "e h" '(counsel-esh-history :which-key "Eshell history") - "e l" '(eval-last-sexp :wk "Evaluate elisp expression before point") - "e r" '(eval-region :wk "Evaluate elisp in region") - "e s" '(eshell :which-key "Eshell")) - - (user/leader-keys - "h" '(:ignore t :wk "Help") - "h f" '(describe-function :wk "Describe function") - "h v" '(describe-variable :wk "Describe variable") - ;;"h r r" '((lambda () (interactive) (load-file "~/.config/emacs/init.el")) :wk "Reload emacs config")) - "h r r" '(reload-init-file :wk "Reload emacs config")) - - (user/leader-keys - "t" '(:ignore t :wk "Toggle") - "t l" '(display-line-numbers-mode :wk "Toggle line numbers") - "t t" '(visual-line-mode :wk "Toggle truncated lines") - "t v" '(shell :wk "open shell")) - - (user/leader-keys - "w" '(:ignore t :wk "Windows") - ;; Window splits - "w c" '(evil-window-delete :wk "Close window") - "w n" '(evil-window-new :wk "New window") - "w s" '(evil-window-split :wk "Horizontal split window") - "w v" '(evil-window-vsplit :wk "Vertical split window") - ;; Window motions - "w h" '(evil-window-left :wk "Window left") - "w j" '(evil-window-down :wk "Window down") - "w k" '(evil-window-up :wk "Window up") - "w l" '(evil-window-right :wk "Window right") - "w w" '(evil-window-next :wk "Goto next window") - ;; Move Windows - "w H" '(buf-move-left :wk "Buffer move left") - "w J" '(buf-move-down :wk "Buffer move down") - "w K" '(buf-move-up :wk "Buffer move up") - "w L" '(buf-move-right :wk "Buffer move right")) - -;; org mode - (user/leader-keys - "m" '(:ignore t :wk "Org") - "m a" '(org-agenda :wk "Org agenda") - "m e" '(org-export-dispatch :wk "Org export dispatch") - "m i" '(org-toggle-item :wk "Org toggle item") - "m t" '(org-todo :wk "Org todo") - "m B" '(org-babel-tangle :wk "Org babel tangle") - "m T" '(org-todo-list :wk "Org todo list")) - (user/leader-keys - "m b" '(:ignore t :wk "Tables") - "m b -" '(org-table-insert-hline :wk "Insert hline in table")) - (user/leader-keys - "m d" '(:ignore t :wk "Date/deadline") - "m d t" '(org-time-stamp :wk "Org time stamp")) - (user/leader-keys - "p" '(projectile-command-map :wk "Projectile")) + (use-package general + :config + (general-evil-setup) + ;; set up 'SPC' as the global leader key + (general-create-definer user/leader-keys + :states '(normal insert visual emacs) + :keymaps 'override + :prefix "SPC" ;; set leader + :global-prefix "M-SPC") ;; access leader in insert mode -) + (user/leader-keys + "SPC" '(counsel-M-x :wk "Counsel M-x") + "." '(find-file :wk "Find file") + "=" '(perspective-map :wk "Perspective") ;; Lists all the perspective keybindings + "TAB TAB" '(comment-line :wk "Comment lines") + "u" '(universal-argument :wk "Univeral argument") + "s" '(universal-argument :wk "say I want to type somet") + "q" '(evil-quit :wk "quit emacs")) + + (user/leader-keys + "b" '(:ignore t :wk "Bookmarks/Buffers") + "b c" '(clone-indirect-buffer :wk "Create indirect buffer copy in a split") + "b C" '(clone-indirect-buffer-other-window :wk "Clone indirect buffer in new window") + "b d" '(bookmark-delete :wk "Delete bookmark") + "b i" '(ibuffer :wk "Ibuffer") + "b k" '(kill-this-buffer :wk "Kill this buffer") + "b K" '(kill-some-buffers :wk "Kill multiple buffers") + "b l" '(list-bookmarks :wk "List bookmarks") + "b m" '(bookmark-set :wk "Set bookmark") + "b n" '(next-buffer :wk "Next buffer") + "b p" '(previous-buffer :wk "Previous buffer") + "b r" '(revert-buffer :wk "Reload buffer") + "b R" '(rename-buffer :wk "Rename buffer") + "b s" '(basic-save-buffer :wk "Save buffer") + "b S" '(save-some-buffers :wk "Save multiple buffers") + "b w" '(bookmark-save :wk "Save current bookmarks to bookmark file")) + + (user/leader-keys + "d" '(:ignore t :wk "Dired") + "d d" '(dired :wk "Open dired") + "d j" '(dired-jump :wk "Dired jump to current") + "d p" '(peep-dired :wk "Peep-dired")) + + (user/leader-keys + "e" '(:ignore t :wk "Eshell/Evaluate/EWW") + "e b" '(eval-buffer :wk "Evaluate elisp in buffer") + "e d" '(eval-defun :wk "Evaluate defun containing or after point") + "e e" '(eval-expression :wk "Evaluate and elisp expression") + "e h" '(counsel-esh-history :which-key "Eshell history") + "e l" '(eval-last-sexp :wk "Evaluate elisp expression before point") + "e r" '(eval-region :wk "Evaluate elisp in region") + "e R" '(eww-reload :which-key "Reload current page in EWW") + "e s" '(eshell :which-key "Eshell") + "e w" '(eww :which-key "EWW emacs web wowser")) + + (user/leader-keys + "f" '(:ignore t :wk "Files") + "f c" '((lambda () (interactive) + (find-file (expand-file-name "config.org" user-emacs-directory))) + :wk "Open emacs config") + "f d" '(find-grep-dired :wk "Search for string in files in DIR") + "f e" '((lambda () (interactive) + (dired user-emacs-directory)) + :wk "Open user-emacs-directory in dired") + "f i" '((lambda () (interactive) + (find-file (expand-file-name "init.el" user-emacs-directory))) + :wk "Open emacs init.el") + "f g" '(counsel-grep-or-swiper :wk "Search for string current file") + "f j" '(counsel-file-jump :wk "Jump to a file below current directory") + "f l" '(counsel-locate :wk "Locate a file") + "f r" '(counsel-recentf :wk "Find recent files") + "f w" '(evil-write :wk "Write current buffer")) + + (user/leader-keys + "g" '(:ignore t :wk "Git") + "g /" '(magit-displatch :wk "Magit dispatch") + "g ." '(magit-file-displatch :wk "Magit file dispatch") + "g b" '(magit-branch-checkout :wk "Switch branch") + "g c" '(:ignore t :wk "Create") + "g c b" '(magit-branch-and-checkout :wk "Create branch and checkout") + "g c c" '(magit-commit-create :wk "Create commit") + "g c f" '(magit-commit-fixup :wk "Create fixup commit") + "g C" '(magit-clone :wk "Clone repo") + "g f" '(:ignore t :wk "Find") + "g f c" '(magit-show-commit :wk "Show commit") + "g f f" '(magit-find-file :wk "Magit find file") + "g f g" '(magit-find-git-config-file :wk "Find gitconfig file") + "g F" '(magit-fetch :wk "Git fetch") + "g g" '(magit-status :wk "Magit status") + "g i" '(magit-init :wk "Initialize git repo") + "g l" '(magit-log-buffer-file :wk "Magit buffer log") + "g r" '(vc-revert :wk "Git revert file") + "g s" '(magit-stage-file :wk "Git stage file") + "g t" '(git-timemachine :wk "Git time machine") + "g u" '(magit-stage-file :wk "Git unstage file")) + + (user/leader-keys + "h" '(:ignore t :wk "Help") + "h a" '(counsel-apropos :wk "Apropos") + "h b" '(describe-bindings :wk "Describe bindings") + "h c" '(describe-char :wk "Describe character under cursor") + "h d" '(:ignore t :wk "Emacs documentation") + "h d a" '(about-emacs :wk "About Emacs") + "h d d" '(view-emacs-debugging :wk "View Emacs debugging") + "h d f" '(view-emacs-FAQ :wk "View Emacs FAQ") + "h d m" '(info-emacs-manual :wk "The Emacs manual") + "h d n" '(view-emacs-news :wk "View Emacs news") + "h d o" '(describe-distribution :wk "How to obtain Emacs") + "h d p" '(view-emacs-problems :wk "View Emacs problems") + "h d t" '(view-emacs-todo :wk "View Emacs todo") + "h d w" '(describe-no-warranty :wk "Describe no warranty") + "h e" '(view-echo-area-messages :wk "View echo area messages") + "h f" '(describe-function :wk "Describe function") + "h F" '(describe-face :wk "Describe face") + "h g" '(describe-gnu-project :wk "Describe GNU Project") + "h i" '(info :wk "Info") + "h I" '(describe-input-method :wk "Describe input method") + "h k" '(describe-key :wk "Describe key") + "h l" '(view-lossage :wk "Display recent keystrokes and the commands run") + "h L" '(describe-language-environment :wk "Describe language environment") + "h m" '(describe-mode :wk "Describe mode") + "h r" '(:ignore t :wk "Reload") + "h r r" '((lambda () (interactive) + (load-file (expand-file-name "init.el" user-emacs-directory)) + (ignore (elpaca-process-queues))) + :wk "Reload emacs config") + "h t" '(load-theme :wk "Load theme") + "h v" '(describe-variable :wk "Describe variable") + "h w" '(where-is :wk "Prints keybinding for command if set") + "h x" '(describe-command :wk "Display full documentation for command")) + + (user/leader-keys + "l" '(:ignore t :wk "load") + "l t" '(load-theme :wk "load theme")) + + ;; org mode + (user/leader-keys + "m" '(:ignore t :wk "Org") + "m a" '(org-agenda :wk "Org agenda") + "m e" '(org-export-dispatch :wk "Org export dispatch") + "m i" '(org-toggle-item :wk "Org toggle item") + "m t" '(org-todo :wk "Org todo") + "m B" '(org-babel-tangle :wk "Org babel tangle") + "m T" '(org-todo-list :wk "Org todo list")) + (user/leader-keys + "m b" '(:ignore t :wk "Tables") + "m b -" '(org-table-insert-hline :wk "Insert hline in table")) + (user/leader-keys + "m d" '(:ignore t :wk "Date/deadline") + "m d t" '(org-time-stamp :wk "Org time stamp")) + + (user/leader-keys + "o" '(:ignore t :wk "Open") + "o d" '(dashboard-open :wk "Dashboard") + ;; "o e" '(elfeed :wk "Elfeed RSS") + "o f" '(make-frame :wk "Open buffer in new frame") + "o F" '(select-frame-by-name :wk "Select frame by name") + "o s" '(shell :wk "open shell")) + + (user/leader-keys + "p" '(projectile-command-map :wk "Projectile")) + + ;; FIXME: fix the error here + ;; (user/leader-keys + ;; "s" '(:ignore t :wk "Search") + ;; "s d" '(dictionary-search :wk "Search dictionary") + ;; "s m" '(man :wk "Man pages") + ;; "s t" '(tldr :wk "Lookup TLDR docs for a command") + ;; "s w" '(woman :wk "Similar to man but doesn't require man") + ;; ) + + (user/leader-keys + "t" '(:ignore t :wk "Toggle") + "t l" '(display-line-numbers-mode :wk "Toggle line numbers") + "t t" '(visual-line-mode :wk "Toggle truncated lines") + "t" '(:ignore t :wk "Toggle") + "t e" '(eshell-toggle :wk "Toggle eshell") + ;; "t f" '(flycheck-mode :wk "Toggle flycheck") + "t o" '(org-mode :wk "Toggle org mode") + "t r" '(rainbow-mode :wk "Toggle rainbow mode") + "t t" '(visual-line-mode :wk "Toggle truncated lines")) + + (user/leader-keys + "w" '(:ignore t :wk "Windows") + ;; Window splits + "w c" '(evil-window-delete :wk "Close window") + "w n" '(evil-window-new :wk "New window") + "w s" '(evil-window-split :wk "Horizontal split window") + "w v" '(evil-window-vsplit :wk "Vertical split window") + ;; Window motions + "w h" '(evil-window-left :wk "Window left") + "w j" '(evil-window-down :wk "Window down") + "w k" '(evil-window-up :wk "Window up") + "w l" '(evil-window-right :wk "Window right") + "w w" '(evil-window-next :wk "Goto next window") + ;; Move Windows + "w H" '(buf-move-left :wk "Buffer move left") + "w J" '(buf-move-down :wk "Buffer move down") + "w K" '(buf-move-up :wk "Buffer move up") + "w L" '(buf-move-right :wk "Buffer move right")) + ) #+end_src @@ -312,8 +442,8 @@ This is just an example of how to create a simple function in Emacs. Use this f #+end_src -* Graphical configuration -** Disable Menubar, Toolbars and Scrollbars +* Graphical tweaks +** Disable UI elements #+begin_src emacs-lisp (menu-bar-mode -1) (tool-bar-mode -1) @@ -325,6 +455,10 @@ This is just an example of how to create a simple function in Emacs. Use this f (global-display-line-numbers-mode 1) (global-visual-line-mode t) #+end_src +** blinking cursor +#+begin_src emacs-lisp + (setq blink-cursor-mode nil) +#+end_src ** Fonts Defining the various fonts that Emacs will use. @@ -364,36 +498,72 @@ Defining the various fonts that Emacs will use. ** Theme How to make thet theme work even in daemon mode: (https://stackoverflow.com/questions/18904529/after-emacs-deamon-i-can-not-see-new-theme-in-emacsclient-frame-it-works-fr) +#+begin_src emacs-lisp :noeval + (add-to-list 'custom-theme-load-path (expand-file-name "themes/" user-emacs-directory)) + (use-package doom-themes + :config + (setq doom-themes-enable-bold t + doom-themes-enable-italic t) + (load-theme 'doom-nord t) + (doom-themes-org-config)) +#+end_src + +** Transparency + #+begin_src emacs-lisp - (add-to-list 'custom-theme-load-path "~/.config/emacs/themes/") - (defvar my:theme 'nord) -(defvar my:theme-window-loaded nil) -(defvar my:theme-terminal-loaded nil) + (add-to-list 'default-frame-alist '(alpha-background . 96)) +#+end_src -(if (daemonp) - (add-hook 'after-make-frame-functions(lambda (frame) - (select-frame frame) - (if (window-system frame) - (unless my:theme-window-loaded - (if my:theme-terminal-loaded - (enable-theme my:theme) - (load-theme my:theme t)) - (setq my:theme-window-loaded t)) - (unless my:theme-terminal-loaded - (if my:theme-window-loaded - (enable-theme my:theme) - (load-theme my:theme t)) - (setq my:theme-terminal-loaded t))))) +** Highlight TODO +Adding highlights to TODO and related words. - (progn - (load-theme my:theme t) - (if (display-graphic-p) - (setq my:theme-window-loaded t) - (setq my:theme-terminal-loaded t)))) +#+begin_src emacs-lisp +(use-package hl-todo + :hook ((org-mode . hl-todo-mode) + (prog-mode . hl-todo-mode)) + :config + (setq hl-todo-highlight-punctuation ":" + hl-todo-keyword-faces + `(("TODO" warning bold) + ("FIXME" error bold) + ("HACK" font-lock-constant-face bold) + ("REVIEW" font-lock-keyword-face bold) + ("NOTE" success bold) + ("DEPRECATED" font-lock-doc-face bold)))) #+end_src +* Misc. options + +#+begin_src emacs-lisp + + ;; move backup files to trash instead of same directory + (setq backup-directory-alist '((".*" . "~/.local/share/Trash/files"))) + + ;; escape minibuffer with one [escape] + (global-set-key [escape] 'keyboard-escape-quit) + + + ;; Automatically show changes if the file has changed + (global-auto-revert-mode t) + + ;; You can select text and delete it by typing. + (delete-selection-mode 1) + + ;; Turns on automatic parens pairing + (electric-pair-mode 1) + ;; The following prevents <> from auto-pairing when electric-pair-mode is on. + ;; Otherwise, org-tempo is broken when you try to to complete or to complete the common part. +** Sudo edit +[[https://github.com/nflath/sudo-edit][sudo-edit]] gives us the ability to open files with sudo privileges or switch over to editing with sudo privileges if we initially opened the file without such privileges. #+begin_src emacs-lisp - (use-package company - :defer 2 - :diminish - :custom - (company-begin-commands '(self-insert-command)) - (company-idle-delay .1) - (company-minimum-prefix-length 2) - (company-show-numbers t) - (company-tooltip-align-annotations 't) - (global-company-mode t)) - - (use-package company-box - :after company - :diminish - :hook (company-mode . company-box-mode)) +(use-package sudo-edit + :config + (user/leader-keys + "fu" '(sudo-edit-find-file :wk "Sudo find file") + "fU" '(sudo-edit :wk "Sudo edit file"))) +#+end_src + +** TLDR + +#+begin_src emacs-lisp +(use-package tldr) + +#+end_src + +** Which-Key +#+begin_src emacs-lisp + (use-package which-key + :init + (which-key-mode 1) + :config + (setq which-key-side-window-location 'bottom + which-key-sort-order #'which-key-key-order-alpha + which-key-sort-uppercase-first nil + which-key-add-column-padding 1 + which-key-max-display-columns nil + which-key-min-display-lines 6 + which-key-side-window-slot -10 + which-key-side-window-max-height 0.25 + which-key-idle-delay 0.8 + which-key-max-description-length 25 + which-key-allow-imprecise-window-fit nil + which-key-separator " → " )) #+end_src diff --git a/config/extra/emacs/init.el b/config/extra/emacs/init.el index 19a2beb..537edcf 100644 --- a/config/extra/emacs/init.el +++ b/config/extra/emacs/init.el @@ -8,10 +8,17 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-safe-themes - '("4c7228157ba3a48c288ad8ef83c490b94cb29ef01236205e360c2c4db200bb18" default))) + '("88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e" "4c7228157ba3a48c288ad8ef83c490b94cb29ef01236205e360c2c4db200bb18" default)) + '(package-selected-packages '(doom-modeline))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - ) + '(org-level-1 ((t (:inherit outline-1 :height 1.25)))) + '(org-level-2 ((t (:inherit outline-2 :height 1.15)))) + '(org-level-3 ((t (:inherit outline-3 :height 1.1)))) + '(org-level-4 ((t (:inherit outline-4 :height 1.0)))) + '(org-level-5 ((t (:inherit outline-5 :height 1.0)))) + '(org-level-6 ((t (:inherit outline-5 :height 1.0)))) + '(org-level-7 ((t (:inherit outline-5 :height 1.0))))) -- cgit v1.2.3 From 694813e05187b5ccf144425c4bad6f5ab4f92234 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 6 Nov 2023 08:21:05 +0100 Subject: ERASE THIS --- config/X/x11/xinitrc | 1 + config/common/mpv/input.conf | 3 +++ config/essentials/zsh/aliases.sh | 3 ++- config/wayland/dwl/startup.sh | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index 4eb34ed..beb33f2 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -27,6 +27,7 @@ xmodmap -e "keycode 135 = Super_L" xautolock -time 5 -locker slock & gammastep -m randr & slstatus & +emacs --daemon & eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" unclutter --timeout 3 --jitter 50 -b exec startdwm diff --git a/config/common/mpv/input.conf b/config/common/mpv/input.conf index 295dd4d..dd2674f 100644 --- a/config/common/mpv/input.conf +++ b/config/common/mpv/input.conf @@ -204,3 +204,6 @@ Alt+c cycle sub-visibility # Toggle subtitles v cycle audio # switch audio track V cycle audio # switch audio track ctrl+l cycle-values loop-file "inf" "no" # toggle infinite looping + +# Keep open after exit +P cycle keep-open up diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 0da835a..10e6c23 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -265,6 +265,7 @@ alias czo='cd ~/zot/' alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}' alias cdng='cd /etc/nginx' alias cdrs='cd /srv/' +alias cdv='cd ~/vids' alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' # fzf aliases @@ -272,7 +273,6 @@ alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -t alias ppjs='cd ~/proj/personal/scripts/"$(find ~/proj/personal/scripts -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' alias scr='edit_in_dir ~/proj/personal/scripts/' alias fil='edit_in_dir ~/docs/filios/' -alias cfg='edit_in_dir ~/src/dotfiles' alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' alias asf='alias | fzf' alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" @@ -300,6 +300,7 @@ alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' # oh-my-zsh git aliases alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' +alias cfg='$EDITOR ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR' alias g='git' alias ga='git add' diff --git a/config/wayland/dwl/startup.sh b/config/wayland/dwl/startup.sh index d743f19..8817ad2 100755 --- a/config/wayland/dwl/startup.sh +++ b/config/wayland/dwl/startup.sh @@ -10,6 +10,7 @@ swaybg -i ~/pics/wallpaper & wl-paste --watch cliphist store & swayidle 300 locker & keyadd id_rsa & +emacs --daemon & pkill -f "tail -f $HOME/.config/wob/pipe" WOBCONFIG="$HOME"/.config/wob -- cgit v1.2.3 From af9608a3a98f0ab4217da80b8d478810505801bc Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 6 Nov 2023 09:29:16 +0100 Subject: specify bash --- bin/extra/cht.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/extra/cht.sh b/bin/extra/cht.sh index 681fc69..f373e55 100755 --- a/bin/extra/cht.sh +++ b/bin/extra/cht.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # shellcheck disable=SC1117,SC2001 # # [X] open section -- cgit v1.2.3 From e92fe2d61d3e01cbe2351166b8bf809362a5f72d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 6 Nov 2023 10:19:34 +0100 Subject: change back to packer and simplify treesitter config --- config/essentials/nvim/lua/user/init.lua | 2 +- config/essentials/nvim/lua/user/treesitter.lua | 31 ++------------------------ 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/config/essentials/nvim/lua/user/init.lua b/config/essentials/nvim/lua/user/init.lua index f195e4f..972cb67 100644 --- a/config/essentials/nvim/lua/user/init.lua +++ b/config/essentials/nvim/lua/user/init.lua @@ -1,4 +1,4 @@ -require("user.lazy") +require("user.packer") require("user.remap") require("user.treesitter") require("user.set") diff --git a/config/essentials/nvim/lua/user/treesitter.lua b/config/essentials/nvim/lua/user/treesitter.lua index 5b1fc5e..2355215 100644 --- a/config/essentials/nvim/lua/user/treesitter.lua +++ b/config/essentials/nvim/lua/user/treesitter.lua @@ -9,36 +9,9 @@ require'nvim-treesitter.configs'.setup { -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally auto_install = true, - -- List of parsers to ignore installing (or "all") - ignore_install = { "javascript" }, + indent = { enable = on }, - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - indent = { - enable = on - }, + highlight = { enable = true, }, - highlight = { - enable = true, - - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - disable = { "c", "rust" }, - -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files - disable = function(lang, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages additional_vim_regex_highlighting = false, - }, } -- cgit v1.2.3 From a931277d0c6f37ca8d1f0e33df25987a10f8665d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 6 Nov 2023 10:22:35 +0100 Subject: cleaned up org config --- config/extra/emacs/config.org | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/config/extra/emacs/config.org b/config/extra/emacs/config.org index 50d6af6..2725fa1 100644 --- a/config/extra/emacs/config.org +++ b/config/extra/emacs/config.org @@ -565,21 +565,6 @@ Adding highlights to TODO and related words. #+end_src * ORG Mode -** Enabling Table of Contents -#+begin_src emacs-lisp - (use-package toc-org - :commands toc-org-enable - :init (add-hook 'org-mode-hook 'toc-org-enable)) -#+end_src - -** Enabling Org Bullets -Org-bullets gives us attractive bullets rather than asterisks. - -#+begin_src emacs-lisp - (add-hook 'org-mode-hook 'org-indent-mode) - (use-package org-bullets) - (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) -#+end_src ** Org Level Headers #+begin_src emacs-lisp @@ -593,6 +578,10 @@ Org-bullets gives us attractive bullets rather than asterisks. '(org-level-7 ((t (:inherit outline-5 :height 1.00))))) #+end_src +** org-tempo +#+begin_src emacs-lisp +(require 'org-tempo) +#+end_src | Typing the below + TAB | Expands to ... | |------------------------+-----------------------------------------| | Date: Mon, 6 Nov 2023 19:08:48 +0100 Subject: removed emacs config --- .gitignore | 5 - config/extra/emacs/config.org | 856 ------------------------------- config/extra/emacs/early-init.el | 1 - config/extra/emacs/init.el | 24 - config/extra/emacs/themes/nord-theme.el | 727 -------------------------- config/extra/emacs/themes/tlast-theme.el | 306 ----------- 6 files changed, 1919 deletions(-) delete mode 100644 config/extra/emacs/config.org delete mode 100644 config/extra/emacs/early-init.el delete mode 100644 config/extra/emacs/init.el delete mode 100644 config/extra/emacs/themes/nord-theme.el delete mode 100644 config/extra/emacs/themes/tlast-theme.el diff --git a/.gitignore b/.gitignore index adf0262..11392b4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,3 @@ config/hyprland/waybar/colors.css config/old/vim/plugged/ config/old/vim/viminfo* config/theme/gtk-3.0/bookmarks -config/extra/emacs/auto-save-list/ -config/extra/emacs/config.el -config/extra/emacs/elpaca/ -config/extra/emacs/projectile-bookmarks.eld -config/extra/emacs/recentf diff --git a/config/extra/emacs/config.org b/config/extra/emacs/config.org deleted file mode 100644 index 2725fa1..0000000 --- a/config/extra/emacs/config.org +++ /dev/null @@ -1,856 +0,0 @@ -#+TITLE: Emacs Configuration -#+AUTHOR: TlasT -#+STARTUP: showeverything -#+OPTIONS: toc:3 - -* TABLE OF CONTENTS :toc: -- [[#startup][Startup]] - - [[#elpaca-package-manager][Elpaca (Package Manager)]] - - [[#evil-mode][Evil Mode]] - - [[#keybindings][Keybindings]] -- [[#helper-functions][Helper functions]] - - [[#buffer-move][buffer-move]] - - [[#reload-emacs][Reload Emacs]] -- [[#graphical-tweaks][Graphical tweaks]] - - [[#disable-ui-elements][Disable UI elements]] - - [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]] - - [[#blinking-cursor][blinking cursor]] - - [[#fonts][Fonts]] - - [[#setting-the-font-face][Setting the Font Face]] - - [[#theme][Theme]] - - [[#transparency][Transparency]] - - [[#highlight-todo][Highlight TODO]] -- [[#misc-options][Misc. options]] -- [[#org-mode][ORG Mode]] - - [[#enabling-table-of-contents][Enabling Table of Contents]] - - [[#enabling-org-bullets][Enabling Org Bullets]] -- [[#big-ass-header][Big ass header]] -- [[#shell][Shell]] - - [[#default-shell][Default shell]] - - [[#eshell][Eshell]] -- [[#language-support][Language Support]] -- [[#packages][Packages]] - - [[#dashboard][Dashboard]] - - [[#diminish][Diminish]] - - [[#dired][Dired]] - - [[#git][Git]] - - [[#ivy-counsel][Ivy (Counsel)]] - - [[#language-support-1][Language Support]] - - [[#modeline][Modeline]] - - [[#perspective][Perspective]] - - [[#projectile][Projectile]] - - [[#rainbow-mode][Rainbow Mode]] - - [[#rainbow-delimiters][Rainbow Delimiters]] - - [[#sudo-edit][Sudo edit]] - - [[#tldr][TLDR]] - - [[#which-key][Which-Key]] - -* Startup -** Elpaca (Package Manager) -#+begin_src emacs-lisp -(defvar elpaca-installer-version 0.6) -(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) -(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory)) -(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory)) -(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git" - :ref nil - :files (:defaults (:exclude "extensions")) - :build (:not elpaca--activate-package))) -(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory)) - (build (expand-file-name "elpaca/" elpaca-builds-directory)) - (order (cdr elpaca-order)) - (default-directory repo)) - (add-to-list 'load-path (if (file-exists-p build) build repo)) - (unless (file-exists-p repo) - (make-directory repo t) - (when (< emacs-major-version 28) (require 'subr-x)) - (condition-case-unless-debug err - (if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*")) - ((zerop (call-process "git" nil buffer t "clone" - (plist-get order :repo) repo))) - ((zerop (call-process "git" nil buffer t "checkout" - (or (plist-get order :ref) "--")))) - (emacs (concat invocation-directory invocation-name)) - ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch" - "--eval" "(byte-recompile-directory \".\" 0 'force)"))) - ((require 'elpaca)) - ((elpaca-generate-autoloads "elpaca" repo))) - (kill-buffer buffer) - (error "%s" (with-current-buffer buffer (buffer-string)))) -((error) (warn "%s" err) (delete-directory repo 'recursive)))) - (unless (require 'elpaca-autoloads nil t) - (require 'elpaca) - (elpaca-generate-autoloads "elpaca" repo) - (load "./elpaca-autoloads"))) -(add-hook 'after-init-hook #'elpaca-process-queues) -(elpaca `(,@elpaca-order)) - -;; Install use-package support -(elpaca elpaca-use-package - ;; Enable :elpaca use-package keyword. - (elpaca-use-package-mode) - ;; Assume :elpaca t unless otherwise specified. - (setq elpaca-use-package-by-default t)) - -;; Block until current queue processed. -(elpaca-wait) - -;;When installing a package which modifies a form used at the top-level -;;(e.g. a package which adds a use-package key word), -;;use `elpaca-wait' to block until that package has been installed/configured. -;;For example: -;;(use-package general :demand t) -;;(elpaca-wait) - -;;Turns off elpaca-use-package-mode current declartion -;;Note this will cause the declaration to be interpreted immediately (not deferred). -;;Useful for configuring built-in emacs features. -;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore)) - -;; Don't install anything. Defer execution of BODY -;;(elpaca nil (message "deferred")) -#+end_src - -** Evil Mode - -#+begin_src emacs-lisp - ;; Expands to: (elpaca evil (use-package evil :demand t)) - (use-package evil - :init ;; tweak evil's configuration before loading it - (setq evil-want-integration t) ;; This is optional since it's already set to t by default. - (setq evil-want-keybinding nil) - (setq evil-vsplit-window-right t) - (setq evil-split-window-below t) - (evil-mode)) - (use-package evil-collection - :after evil - :config - (setq evil-collection-mode-list '(dashboard dired ibuffer)) - (evil-collection-init)) - (use-package evil-tutor) - ;; Using RETURN to follow links in Org/Evil - ;; Unmap keys in 'evil-maps if not done, (setq org-return-follows-link t) will not work - (with-eval-after-load 'evil-maps - (define-key evil-motion-state-map (kbd "SPC") nil) - (define-key evil-motion-state-map (kbd "RET") nil) - (define-key evil-motion-state-map (kbd "TAB") nil)) - ;; Setting RETURN key in org-mode to follow links - (setq org-return-follows-link t) - -#+end_src - -** Keybindings -#+begin_src emacs-lisp - (use-package general - :config - (general-evil-setup) - - ;; set up 'SPC' as the global leader key - (general-create-definer user/leader-keys - :states '(normal insert visual emacs) - :keymaps 'override - :prefix "SPC" ;; set leader - :global-prefix "M-SPC") ;; access leader in insert mode - - (user/leader-keys - "SPC" '(counsel-M-x :wk "Counsel M-x") - "." '(find-file :wk "Find file") - "=" '(perspective-map :wk "Perspective") ;; Lists all the perspective keybindings - "TAB TAB" '(comment-line :wk "Comment lines") - "u" '(universal-argument :wk "Univeral argument") - "s" '(universal-argument :wk "say I want to type somet") - "q" '(evil-quit :wk "quit emacs")) - - (user/leader-keys - "b" '(:ignore t :wk "Bookmarks/Buffers") - "b c" '(clone-indirect-buffer :wk "Create indirect buffer copy in a split") - "b C" '(clone-indirect-buffer-other-window :wk "Clone indirect buffer in new window") - "b d" '(bookmark-delete :wk "Delete bookmark") - "b i" '(ibuffer :wk "Ibuffer") - "b k" '(kill-this-buffer :wk "Kill this buffer") - "b K" '(kill-some-buffers :wk "Kill multiple buffers") - "b l" '(list-bookmarks :wk "List bookmarks") - "b m" '(bookmark-set :wk "Set bookmark") - "b n" '(next-buffer :wk "Next buffer") - "b p" '(previous-buffer :wk "Previous buffer") - "b r" '(revert-buffer :wk "Reload buffer") - "b R" '(rename-buffer :wk "Rename buffer") - "b s" '(basic-save-buffer :wk "Save buffer") - "b S" '(save-some-buffers :wk "Save multiple buffers") - "b w" '(bookmark-save :wk "Save current bookmarks to bookmark file")) - - (user/leader-keys - "d" '(:ignore t :wk "Dired") - "d d" '(dired :wk "Open dired") - "d j" '(dired-jump :wk "Dired jump to current") - "d p" '(peep-dired :wk "Peep-dired")) - - (user/leader-keys - "e" '(:ignore t :wk "Eshell/Evaluate/EWW") - "e b" '(eval-buffer :wk "Evaluate elisp in buffer") - "e d" '(eval-defun :wk "Evaluate defun containing or after point") - "e e" '(eval-expression :wk "Evaluate and elisp expression") - "e h" '(counsel-esh-history :which-key "Eshell history") - "e l" '(eval-last-sexp :wk "Evaluate elisp expression before point") - "e r" '(eval-region :wk "Evaluate elisp in region") - "e R" '(eww-reload :which-key "Reload current page in EWW") - "e s" '(eshell :which-key "Eshell") - "e w" '(eww :which-key "EWW emacs web wowser")) - - (user/leader-keys - "f" '(:ignore t :wk "Files") - "f c" '((lambda () (interactive) - (find-file (expand-file-name "config.org" user-emacs-directory))) - :wk "Open emacs config") - "f d" '(find-grep-dired :wk "Search for string in files in DIR") - "f e" '((lambda () (interactive) - (dired user-emacs-directory)) - :wk "Open user-emacs-directory in dired") - "f i" '((lambda () (interactive) - (find-file (expand-file-name "init.el" user-emacs-directory))) - :wk "Open emacs init.el") - "f g" '(counsel-grep-or-swiper :wk "Search for string current file") - "f j" '(counsel-file-jump :wk "Jump to a file below current directory") - "f l" '(counsel-locate :wk "Locate a file") - "f r" '(counsel-recentf :wk "Find recent files") - "f w" '(evil-write :wk "Write current buffer")) - - (user/leader-keys - "g" '(:ignore t :wk "Git") - "g /" '(magit-displatch :wk "Magit dispatch") - "g ." '(magit-file-displatch :wk "Magit file dispatch") - "g b" '(magit-branch-checkout :wk "Switch branch") - "g c" '(:ignore t :wk "Create") - "g c b" '(magit-branch-and-checkout :wk "Create branch and checkout") - "g c c" '(magit-commit-create :wk "Create commit") - "g c f" '(magit-commit-fixup :wk "Create fixup commit") - "g C" '(magit-clone :wk "Clone repo") - "g f" '(:ignore t :wk "Find") - "g f c" '(magit-show-commit :wk "Show commit") - "g f f" '(magit-find-file :wk "Magit find file") - "g f g" '(magit-find-git-config-file :wk "Find gitconfig file") - "g F" '(magit-fetch :wk "Git fetch") - "g g" '(magit-status :wk "Magit status") - "g i" '(magit-init :wk "Initialize git repo") - "g l" '(magit-log-buffer-file :wk "Magit buffer log") - "g r" '(vc-revert :wk "Git revert file") - "g s" '(magit-stage-file :wk "Git stage file") - "g t" '(git-timemachine :wk "Git time machine") - "g u" '(magit-stage-file :wk "Git unstage file")) - - (user/leader-keys - "h" '(:ignore t :wk "Help") - "h a" '(counsel-apropos :wk "Apropos") - "h b" '(describe-bindings :wk "Describe bindings") - "h c" '(describe-char :wk "Describe character under cursor") - "h d" '(:ignore t :wk "Emacs documentation") - "h d a" '(about-emacs :wk "About Emacs") - "h d d" '(view-emacs-debugging :wk "View Emacs debugging") - "h d f" '(view-emacs-FAQ :wk "View Emacs FAQ") - "h d m" '(info-emacs-manual :wk "The Emacs manual") - "h d n" '(view-emacs-news :wk "View Emacs news") - "h d o" '(describe-distribution :wk "How to obtain Emacs") - "h d p" '(view-emacs-problems :wk "View Emacs problems") - "h d t" '(view-emacs-todo :wk "View Emacs todo") - "h d w" '(describe-no-warranty :wk "Describe no warranty") - "h e" '(view-echo-area-messages :wk "View echo area messages") - "h f" '(describe-function :wk "Describe function") - "h F" '(describe-face :wk "Describe face") - "h g" '(describe-gnu-project :wk "Describe GNU Project") - "h i" '(info :wk "Info") - "h I" '(describe-input-method :wk "Describe input method") - "h k" '(describe-key :wk "Describe key") - "h l" '(view-lossage :wk "Display recent keystrokes and the commands run") - "h L" '(describe-language-environment :wk "Describe language environment") - "h m" '(describe-mode :wk "Describe mode") - "h r" '(:ignore t :wk "Reload") - "h r r" '((lambda () (interactive) - (load-file (expand-file-name "init.el" user-emacs-directory)) - (ignore (elpaca-process-queues))) - :wk "Reload emacs config") - "h t" '(load-theme :wk "Load theme") - "h v" '(describe-variable :wk "Describe variable") - "h w" '(where-is :wk "Prints keybinding for command if set") - "h x" '(describe-command :wk "Display full documentation for command")) - - (user/leader-keys - "l" '(:ignore t :wk "load") - "l t" '(load-theme :wk "load theme")) - - ;; org mode - (user/leader-keys - "m" '(:ignore t :wk "Org") - "m a" '(org-agenda :wk "Org agenda") - "m e" '(org-export-dispatch :wk "Org export dispatch") - "m i" '(org-toggle-item :wk "Org toggle item") - "m t" '(org-todo :wk "Org todo") - "m B" '(org-babel-tangle :wk "Org babel tangle") - "m T" '(org-todo-list :wk "Org todo list")) - (user/leader-keys - "m b" '(:ignore t :wk "Tables") - "m b -" '(org-table-insert-hline :wk "Insert hline in table")) - (user/leader-keys - "m d" '(:ignore t :wk "Date/deadline") - "m d t" '(org-time-stamp :wk "Org time stamp")) - - (user/leader-keys - "o" '(:ignore t :wk "Open") - "o d" '(dashboard-open :wk "Dashboard") - ;; "o e" '(elfeed :wk "Elfeed RSS") - "o f" '(make-frame :wk "Open buffer in new frame") - "o F" '(select-frame-by-name :wk "Select frame by name") - "o s" '(shell :wk "open shell")) - - (user/leader-keys - "p" '(projectile-command-map :wk "Projectile")) - - ;; FIXME: fix the error here - ;; (user/leader-keys - ;; "s" '(:ignore t :wk "Search") - ;; "s d" '(dictionary-search :wk "Search dictionary") - ;; "s m" '(man :wk "Man pages") - ;; "s t" '(tldr :wk "Lookup TLDR docs for a command") - ;; "s w" '(woman :wk "Similar to man but doesn't require man") - ;; ) - - (user/leader-keys - "t" '(:ignore t :wk "Toggle") - "t l" '(display-line-numbers-mode :wk "Toggle line numbers") - "t t" '(visual-line-mode :wk "Toggle truncated lines") - "t" '(:ignore t :wk "Toggle") - "t e" '(eshell-toggle :wk "Toggle eshell") - ;; "t f" '(flycheck-mode :wk "Toggle flycheck") - "t o" '(org-mode :wk "Toggle org mode") - "t r" '(rainbow-mode :wk "Toggle rainbow mode") - "t t" '(visual-line-mode :wk "Toggle truncated lines")) - - (user/leader-keys - "w" '(:ignore t :wk "Windows") - ;; Window splits - "w c" '(evil-window-delete :wk "Close window") - "w n" '(evil-window-new :wk "New window") - "w s" '(evil-window-split :wk "Horizontal split window") - "w v" '(evil-window-vsplit :wk "Vertical split window") - ;; Window motions - "w h" '(evil-window-left :wk "Window left") - "w j" '(evil-window-down :wk "Window down") - "w k" '(evil-window-up :wk "Window up") - "w l" '(evil-window-right :wk "Window right") - "w w" '(evil-window-next :wk "Goto next window") - ;; Move Windows - "w H" '(buf-move-left :wk "Buffer move left") - "w J" '(buf-move-down :wk "Buffer move down") - "w K" '(buf-move-up :wk "Buffer move up") - "w L" '(buf-move-right :wk "Buffer move right")) - ) - -#+end_src - -Zooming in and out -#+begin_src emacs-lisp -(global-set-key (kbd "C-=") 'text-scale-increase) -(global-set-key (kbd "C--") 'text-scale-decrease) -(global-set-key (kbd "") 'text-scale-increase) -(global-set-key (kbd "") 'text-scale-decrease) -#+end_src - - -* Helper functions -** buffer-move -Creating some functions to allow us to easily move windows (splits) around. The following block of code was taken from buffer-move.el found on the EmacsWiki: -https://www.emacswiki.org/emacs/buffer-move.el - -#+begin_src emacs-lisp -(require 'windmove) - -;;;###autoload -(defun buf-move-up () - "Swap the current buffer and the buffer above the split. -If there is no split, ie now window above the current one, an -error is signaled." -;; "Switches between the current buffer, and the buffer above the -;; split, if possible." - (interactive) - (let* ((other-win (windmove-find-other-window 'up)) - (buf-this-buf (window-buffer (selected-window)))) - (if (null other-win) - (error "No window above this one") - ;; swap top with this one - (set-window-buffer (selected-window) (window-buffer other-win)) - ;; move this one to top - (set-window-buffer other-win buf-this-buf) - (select-window other-win)))) - -;;;###autoload -(defun buf-move-down () -"Swap the current buffer and the buffer under the split. -If there is no split, ie now window under the current one, an -error is signaled." - (interactive) - (let* ((other-win (windmove-find-other-window 'down)) - (buf-this-buf (window-buffer (selected-window)))) - (if (or (null other-win) - (string-match "^ \\*Minibuf" (buffer-name (window-buffer other-win)))) - (error "No window under this one") - ;; swap top with this one - (set-window-buffer (selected-window) (window-buffer other-win)) - ;; move this one to top - (set-window-buffer other-win buf-this-buf) - (select-window other-win)))) - -;;;###autoload -(defun buf-move-left () -"Swap the current buffer and the buffer on the left of the split. -If there is no split, ie now window on the left of the current -one, an error is signaled." - (interactive) - (let* ((other-win (windmove-find-other-window 'left)) - (buf-this-buf (window-buffer (selected-window)))) - (if (null other-win) - (error "No left split") - ;; swap top with this one - (set-window-buffer (selected-window) (window-buffer other-win)) - ;; move this one to top - (set-window-buffer other-win buf-this-buf) - (select-window other-win)))) - -;;;###autoload -(defun buf-move-right () -"Swap the current buffer and the buffer on the right of the split. -If there is no split, ie now window on the right of the current -one, an error is signaled." - (interactive) - (let* ((other-win (windmove-find-other-window 'right)) - (buf-this-buf (window-buffer (selected-window)))) - (if (null other-win) - (error "No right split") - ;; swap top with this one - (set-window-buffer (selected-window) (window-buffer other-win)) - ;; move this one to top - (set-window-buffer other-win buf-this-buf) - (select-window other-win)))) -#+end_src - -** Reload Emacs -This is just an example of how to create a simple function in Emacs. Use this function to reload Emacs after adding changes to the config. Yes, I am loading the user-init-file twice in this function, which is a hack because for some reason, just loading the user-init-file once does not work properly. - -#+begin_src emacs-lisp -(defun reload-init-file () - (interactive) - (load-file user-init-file) - (load-file user-init-file)) -#+end_src - - -* Graphical tweaks -** Disable UI elements -#+begin_src emacs-lisp -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) -#+end_src - -** Display Line Numbers and Truncated Lines -#+begin_src emacs-lisp -(global-display-line-numbers-mode 1) -(global-visual-line-mode t) -#+end_src -** blinking cursor -#+begin_src emacs-lisp - (setq blink-cursor-mode nil) -#+end_src - -** Fonts -Defining the various fonts that Emacs will use. - -** Setting the Font Face -#+begin_src emacs-lisp - (set-face-attribute 'default nil - :font "JetBrains Mono" - :height 105 - :weight 'medium) - (set-face-attribute 'variable-pitch nil - :font "Ubuntu" - :height 115 - :weight 'medium) - (set-face-attribute 'fixed-pitch nil - :font "JetBrains Mono" - :height 105 - :weight 'medium) - ;; Makes commented text and keywords italics. - ;; This is working in emacsclient but not emacs. - ;; Your font must have an italic face available. - (set-face-attribute 'font-lock-comment-face nil - :slant 'italic) - (set-face-attribute 'font-lock-keyword-face nil - :slant 'italic) - - ;; This sets the default font on all graphical frames created after restarting Emacs. - ;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts - ;; are not right unless I also add this method of setting the default font. - (add-to-list 'default-frame-alist '(font . "JetBrains Mono-11")) - - ;; Uncomment the following line if line spacing needs adjusting. - (setq-default line-spacing 0.12) - -#+end_src - -** Theme - -How to make thet theme work even in daemon mode: (https://stackoverflow.com/questions/18904529/after-emacs-deamon-i-can-not-see-new-theme-in-emacsclient-frame-it-works-fr) -#+begin_src emacs-lisp :noeval - (add-to-list 'custom-theme-load-path (expand-file-name "themes/" user-emacs-directory)) - (use-package doom-themes - :config - (setq doom-themes-enable-bold t - doom-themes-enable-italic t) - (load-theme 'doom-nord t) - (doom-themes-org-config)) -#+end_src - -** Transparency - -#+begin_src emacs-lisp - (add-to-list 'default-frame-alist '(alpha-background . 96)) -#+end_src - -** Highlight TODO -Adding highlights to TODO and related words. - -#+begin_src emacs-lisp -(use-package hl-todo - :hook ((org-mode . hl-todo-mode) - (prog-mode . hl-todo-mode)) - :config - (setq hl-todo-highlight-punctuation ":" - hl-todo-keyword-faces - `(("TODO" warning bold) - ("FIXME" error bold) - ("HACK" font-lock-constant-face bold) - ("REVIEW" font-lock-keyword-face bold) - ("NOTE" success bold) - ("DEPRECATED" font-lock-doc-face bold)))) - -#+end_src - - -* Misc. options - -#+begin_src emacs-lisp - - ;; move backup files to trash instead of same directory - (setq backup-directory-alist '((".*" . "~/.local/share/Trash/files"))) - - ;; escape minibuffer with one [escape] - (global-set-key [escape] 'keyboard-escape-quit) - - - ;; Automatically show changes if the file has changed - (global-auto-revert-mode t) - - ;; You can select text and delete it by typing. - (delete-selection-mode 1) - - ;; Turns on automatic parens pairing - (electric-pair-mode 1) - ;; The following prevents <> from auto-pairing when electric-pair-mode is on. - ;; Otherwise, org-tempo is broken when you try to (https://www.svengreb.de) - -;; Title: Nord Theme -;; Project: nord-emacs -;; Version: 0.5.0 -;; URL: https://github.com/nordtheme/emacs -;; Author: Sven Greb -;; Package-Requires: ((emacs "24")) -;; License: MIT - -;;; Commentary: - -;; Nord is a 16 colorspace theme build to run in GUI- and terminal -;; mode with support for many third-party syntax- and UI packages. - -;;; References: -;; Awesome Emacs -;; https://github.com/emacs-tw/awesome-emacs -;; GNU ELPA -;; https://elpa.gnu.org -;; GNU Emacs -;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Custom-Themes.html -;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Creating-Custom-Themes.html -;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Faces.html -;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Standard-Faces.html -;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Face-Customization.html -;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Attributes.html -;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html -;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Display-Feature-Testing.html -;; marmalade repo -;; https://marmalade-repo.org -;; MELPA -;; https://melpa.org -;; https://stable.melpa.org - -;;; Code: - -(unless (>= emacs-major-version 24) - (error "Nord theme requires Emacs 24 or later!")) - -(deftheme nord "An arctic, north-bluish clean and elegant theme") - -(defgroup nord nil - "Nord theme customizations. - The theme has to be reloaded after changing anything in this group." - :group 'faces) - -(defcustom nord-comment-brightness 10 - "Allows to define a custom comment color brightness with percentage adjustments from 0% - 20%. - As of version 0.4.0, this variable is obsolete/deprecated and has no effect anymore and will be removed in version 1.0.0! - The comment color brightness has been increased by 10% by default. - Please see https://github.com/nordtheme/emacs/issues/73 for more details." - :type 'integer - :group 'nord) - -(make-obsolete-variable - 'nord-comment-brightness - "The custom color brightness feature has been deprecated and will be removed in version 1.0.0! - The comment color brightness has been increased by 10% by default. - Please see https://github.com/nordtheme/emacs/issues/73 for more details." - "0.4.0") - -(defcustom nord-region-highlight nil - "Allows to set a region highlight style based on the Nord components. - Valid styles are - - 'snowstorm' - Uses 'nord0' as foreground- and 'nord4' as background color - - 'frost' - Uses 'nord0' as foreground- and 'nord8' as background color" - :type 'string - :group 'nord) - -(defcustom nord-uniform-mode-lines nil - "Enables uniform activate- and inactive mode lines using 'nord3' as background." - :type 'boolean - :group 'nord) - -(setq nord-theme--brightened-comments '("#4c566a" "#4e586d" "#505b70" "#525d73" "#556076" "#576279" "#59647c" "#5b677f" "#5d6982" "#5f6c85" "#616e88" "#63718b" "#66738e" "#687591" "#6a7894" "#6d7a96" "#6f7d98" "#72809a" "#75829c" "#78859e" "#7b88a1")) - -(defun nord-theme--brightened-comment-color (percent) - "Returns the brightened comment color for the given percent. - The value must be greater or equal to 0 and less or equal to 20, otherwise the default 'nord3' color is used. - As of version 0.4.0, this function is obsolete/deprecated and has no effect anymore and will be removed in version 1.0.0! - The comment color brightness has been increased by 10% by default. - Please see https://github.com/nordtheme/emacs/issues/73 for more details." - (nth 10 nord-theme--brightened-comments)) - -(make-obsolete - 'nord-theme--brightened-comment-color - "The custom color brightness feature has been deprecated and will be removed in version 1.0.0!\ - The comment color brightness has been increased by 10% by default.\ - Please see https://github.com/nordtheme/emacs/issues/73 for more details." - "0.4.0") - -(defun nord-display-truecolor-or-graphic-p () - "Returns whether the display can display nord colors" - (or (= (display-color-cells) 16777216) (display-graphic-p))) - -;;;; Color Constants -(let ((class '((class color) (min-colors 89))) - (nord0 (if (nord-display-truecolor-or-graphic-p) "#2E3440" nil)) - (nord1 (if (nord-display-truecolor-or-graphic-p) "#3B4252" "black")) - (nord2 (if (nord-display-truecolor-or-graphic-p) "#434C5E" "#434C5E")) - (nord3 (if (nord-display-truecolor-or-graphic-p) "#4C566A" "brightblack")) - (nord4 (if (nord-display-truecolor-or-graphic-p) "#D8DEE9" "#D8DEE9")) - (nord5 (if (nord-display-truecolor-or-graphic-p) "#E5E9F0" "white")) - (nord6 (if (nord-display-truecolor-or-graphic-p) "#ECEFF4" "brightwhite")) - (nord7 (if (nord-display-truecolor-or-graphic-p) "#8FBCBB" "cyan")) - (nord8 (if (nord-display-truecolor-or-graphic-p) "#88C0D0" "brightcyan")) - (nord9 (if (nord-display-truecolor-or-graphic-p) "#81A1C1" "blue")) - (nord10 (if (nord-display-truecolor-or-graphic-p) "#5E81AC" "brightblue")) - (nord11 (if (nord-display-truecolor-or-graphic-p) "#BF616A" "red")) - (nord12 (if (nord-display-truecolor-or-graphic-p) "#D08770" "brightyellow")) - (nord13 (if (nord-display-truecolor-or-graphic-p) "#EBCB8B" "yellow")) - (nord14 (if (nord-display-truecolor-or-graphic-p) "#A3BE8C" "green")) - (nord15 (if (nord-display-truecolor-or-graphic-p) "#B48EAD" "magenta")) - (nord-annotation (if (nord-display-truecolor-or-graphic-p) "#D08770" "brightyellow")) - (nord-attribute (if (nord-display-truecolor-or-graphic-p) "#8FBCBB" "cyan")) - (nord-class (if (nord-display-truecolor-or-graphic-p) "#8FBCBB" "cyan")) - (nord-comment (if (nord-display-truecolor-or-graphic-p) (nord-theme--brightened-comment-color nord-comment-brightness) "brightblack")) - (nord-escape (if (nord-display-truecolor-or-graphic-p) "#D08770" "brightyellow")) - (nord-method (if (nord-display-truecolor-or-graphic-p) "#88C0D0" "brightcyan")) - (nord-keyword (if (nord-display-truecolor-or-graphic-p) "#81A1C1" "blue")) - (nord-numeric (if (nord-display-truecolor-or-graphic-p) "#B48EAD" "magenta")) - (nord-operator (if (nord-display-truecolor-or-graphic-p) "#81A1C1" "blue")) - (nord-preprocessor (if (nord-display-truecolor-or-graphic-p) "#5E81AC" "brightblue")) - (nord-punctuation (if (nord-display-truecolor-or-graphic-p) "#D8DEE9" "#D8DEE9")) - (nord-regexp (if (nord-display-truecolor-or-graphic-p) "#EBCB8B" "yellow")) - (nord-string (if (nord-display-truecolor-or-graphic-p) "#A3BE8C" "green")) - (nord-tag (if (nord-display-truecolor-or-graphic-p) "#81A1C1" "blue")) - (nord-variable (if (nord-display-truecolor-or-graphic-p) "#D8DEE9" "#D8DEE9")) - (nord-region-highlight-foreground (if (or - (string= nord-region-highlight "frost") - (string= nord-region-highlight "snowstorm")) "#2E3440" nil)) - (nord-region-highlight-background (if - (string= nord-region-highlight "frost") "#88C0D0" - (if (string= nord-region-highlight "snowstorm") "#D8DEE9" "#434C5E"))) - (nord-uniform-mode-lines-background (if nord-uniform-mode-lines "#4C566A" "#3B4252"))) - -;;;; +------------+ -;;;; + Core Faces + -;;;; +------------+ - (custom-theme-set-faces - 'nord - ;; +--- Base ---+ - `(bold ((,class (:weight bold)))) - `(bold-italic ((,class (:weight bold :slant italic)))) - `(default ((,class (:foreground ,nord4 :background ,nord0)))) - `(error ((,class (:foreground ,nord11 :weight bold)))) - `(escape-glyph ((,class (:foreground ,nord12)))) - `(font-lock-builtin-face ((,class (:foreground ,nord9)))) - `(font-lock-comment-face ((,class (:foreground ,nord-comment)))) - `(font-lock-comment-delimiter-face ((,class (:foreground ,nord-comment)))) - `(font-lock-constant-face ((,class (:foreground ,nord9)))) - `(font-lock-doc-face ((,class (:foreground ,nord-comment)))) - `(font-lock-function-name-face ((,class (:foreground ,nord8)))) - `(font-lock-keyword-face ((,class (:foreground ,nord9)))) - `(font-lock-negation-char-face ((,class (:foreground ,nord9)))) - `(font-lock-preprocessor-face ((,class (:foreground ,nord10 :weight bold)))) - `(font-lock-reference-face ((,class (:foreground ,nord9)))) - `(font-lock-regexp-grouping-backslash ((,class (:foreground ,nord13)))) - `(font-lock-regexp-grouping-construct ((,class (:foreground ,nord13)))) - `(font-lock-string-face ((,class (:foreground ,nord14)))) - `(font-lock-type-face ((,class (:foreground ,nord7)))) - `(font-lock-variable-name-face ((,class (:foreground ,nord4)))) - `(font-lock-warning-face ((,class (:foreground ,nord13)))) - `(italic ((,class (:slant italic)))) - `(shadow ((,class (:foreground ,nord3)))) - `(underline ((,class (:underline t)))) - `(warning ((,class (:foreground ,nord13 :weight bold)))) - - ;; +--- Syntax ---+ - ;; > C - `(c-annotation-face ((,class (:foreground ,nord-annotation)))) - - ;; > diff - `(diff-added ((,class (:foreground ,nord14)))) - `(diff-changed ((,class (:foreground ,nord13)))) - `(diff-context ((,class (:inherit default)))) - `(diff-file-header ((,class (:foreground ,nord8)))) - `(diff-function ((,class (:foreground ,nord7)))) - `(diff-header ((,class (:foreground ,nord9 :weight bold)))) - `(diff-hunk-header ((,class (:foreground ,nord9 :background ,nord0)))) - `(diff-indicator-added ((,class (:foreground ,nord14)))) - `(diff-indicator-changed ((,class (:foreground ,nord13)))) - `(diff-indicator-removed ((,class (:foreground ,nord11)))) - `(diff-nonexistent ((,class (:foreground ,nord11)))) - `(diff-refine-added ((,class (:foreground ,nord14)))) - `(diff-refine-changed ((,class (:foreground ,nord13)))) - `(diff-refine-removed ((,class (:foreground ,nord11)))) - `(diff-removed ((,class (:foreground ,nord11)))) - - ;; +--- UI ---+ - `(border ((,class (:foreground ,nord4)))) - `(buffer-menu-buffer ((,class (:foreground ,nord4 :weight bold)))) - `(button ((,class (:background ,nord0 :foreground ,nord8 :box (:line-width 2 :color ,nord4 :style sunken-button))))) - `(completions-annotations ((,class (:foreground ,nord9)))) - `(completions-common-part ((,class (:foreground ,nord8 :weight bold)))) - `(completions-first-difference ((,class (:foreground ,nord11)))) - `(custom-button ((,class (:background ,nord0 :foreground ,nord8 :box (:line-width 2 :color ,nord4 :style sunken-button))))) - `(custom-button-mouse ((,class (:background ,nord4 :foreground ,nord0 :box (:line-width 2 :color ,nord4 :style sunken-button))))) - `(custom-button-pressed ((,class (:background ,nord6 :foreground ,nord0 :box (:line-width 2 :color ,nord4 :style sunken-button))))) - `(custom-button-pressed-unraised ((,class (:background ,nord4 :foreground ,nord0 :box (:line-width 2 :color ,nord4 :style sunken-button))))) - `(custom-button-unraised ((,class (:background ,nord0 :foreground ,nord8 :box (:line-width 2 :color ,nord4 :style sunken-button))))) - `(custom-changed ((,class (:foreground ,nord13)))) - `(custom-comment ((,class (:foreground ,nord-comment)))) - `(custom-comment-tag ((,class (:foreground ,nord7)))) - `(custom-documentation ((,class (:foreground ,nord4)))) - `(custom-group-tag ((,class (:foreground ,nord8 :weight bold)))) - `(custom-group-tag-1 ((,class (:foreground ,nord8 :weight bold)))) - `(custom-invalid ((,class (:foreground ,nord11)))) - `(custom-modified ((,class (:foreground ,nord13)))) - `(custom-rogue ((,class (:foreground ,nord12 :background ,nord2)))) - `(custom-saved ((,class (:foreground ,nord14)))) - `(custom-set ((,class (:foreground ,nord8)))) - `(custom-state ((,class (:foreground ,nord14)))) - `(custom-themed ((,class (:foreground ,nord8 :background ,nord2)))) - `(cursor ((,class (:background ,nord4)))) - `(fringe ((,class (:foreground ,nord4 :background ,nord0)))) - `(file-name-shadow ((,class (:inherit shadow)))) - `(header-line ((,class (:foreground ,nord4 :background ,nord2)))) - `(help-argument-name ((,class (:foreground ,nord8)))) - `(highlight ((,class (:foreground ,nord8 :background ,nord2)))) - `(hl-line ((,class (:background ,nord1)))) - `(info-menu-star ((,class (:foreground ,nord9)))) - `(isearch ((,class (:foreground ,nord0 :background ,nord8)))) - `(isearch-fail ((,class (:foreground ,nord11)))) - `(link ((,class (:underline t)))) - `(link-visited ((,class (:underline t)))) - `(linum ((,class (:foreground ,nord3 :background ,nord0)))) - `(linum-relative-current-face ((,class (:foreground ,nord3 :background ,nord0)))) - `(match ((,class (:inherit isearch)))) - `(message-cited-text ((,class (:foreground ,nord4)))) - `(message-header-cc ((,class (:foreground ,nord9)))) - `(message-header-name ((,class (:foreground ,nord7)))) - `(message-header-newsgroup ((,class (:foreground ,nord14)))) - `(message-header-other ((,class (:foreground ,nord4)))) - `(message-header-subject ((,class (:foreground ,nord8)))) - `(message-header-to ((,class (:foreground ,nord9)))) - `(message-header-xheader ((,class (:foreground ,nord13)))) - `(message-mml ((,class (:foreground ,nord10)))) - `(message-separator ((,class (:inherit shadow)))) - `(minibuffer-prompt ((,class (:foreground ,nord8 :weight bold)))) - `(mm-command-output ((,class (:foreground ,nord8)))) - `(mode-line ((,class (:foreground ,nord8 :background ,nord3)))) - `(mode-line-buffer-id ((,class (:weight bold)))) - `(mode-line-highlight ((,class (:inherit highlight)))) - `(mode-line-inactive ((,class (:foreground ,nord4 :background ,nord-uniform-mode-lines-background)))) - `(next-error ((,class (:inherit error)))) - `(nobreak-space ((,class (:foreground ,nord3)))) - `(outline-1 ((,class (:foreground ,nord8 :weight bold)))) - `(outline-2 ((,class (:inherit outline-1)))) - `(outline-3 ((,class (:inherit outline-1)))) - `(outline-4 ((,class (:inherit outline-1)))) - `(outline-5 ((,class (:inherit outline-1)))) - `(outline-6 ((,class (:inherit outline-1)))) - `(outline-7 ((,class (:inherit outline-1)))) - `(outline-8 ((,class (:inherit outline-1)))) - `(package-description ((,class (:foreground ,nord4)))) - `(package-help-section-name ((,class (:foreground ,nord8 :weight bold)))) - `(package-name ((,class (:foreground ,nord8)))) - `(package-status-available ((,class (:foreground ,nord7)))) - `(package-status-avail-obso ((,class (:foreground ,nord7 :slant italic)))) - `(package-status-built-in ((,class (:foreground ,nord9)))) - `(package-status-dependency ((,class (:foreground ,nord8 :slant italic)))) - `(package-status-disabled ((,class (:foreground ,nord3)))) - `(package-status-external ((,class (:foreground ,nord12 :slant italic)))) - `(package-status-held ((,class (:foreground ,nord4 :weight bold)))) - `(package-status-new ((,class (:foreground ,nord14)))) - `(package-status-incompat ((,class (:foreground ,nord11)))) - `(package-status-installed ((,class (:foreground ,nord7 :weight bold)))) - `(package-status-unsigned ((,class (:underline ,nord13)))) - `(query-replace ((,class (:foreground ,nord8 :background ,nord2)))) - `(region ((,class (:foreground ,nord-region-highlight-foreground :background ,nord-region-highlight-background)))) - `(scroll-bar ((,class (:background ,nord3)))) - `(secondary-selection ((,class (:background ,nord2)))) - - ;; `show-paren-match-face` and `show-paren-mismatch-face` are deprecated since Emacs version 22.1 and were - ;; removed in Emacs 25. - ;; https://github.com/nordtheme/emacs/issues/75 - ;; http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c430f7e23fc2c22f251ace4254e37dea1452dfc3 - ;; https://github.com/emacs-mirror/emacs/commit/c430f7e23fc2c22f251ace4254e37dea1452dfc3 - `(show-paren-match-face ((,class (:foreground ,nord0 :background ,nord8)))) - `(show-paren-mismatch-face ((,class (:background ,nord11)))) - - `(show-paren-match ((,class (:foreground ,nord0 :background ,nord8)))) - `(show-paren-mismatch ((,class (:background ,nord11)))) - `(success ((,class (:foreground ,nord14)))) - `(term ((,class (:foreground ,nord4 :background ,nord0)))) - `(term-color-black ((,class (:foreground ,nord1 :background ,nord1)))) - `(term-color-white ((,class (:foreground ,nord5 :background ,nord5)))) - `(term-color-cyan ((,class (:foreground ,nord7 :background ,nord7)))) - `(term-color-blue ((,class (:foreground ,nord8 :background ,nord8)))) - `(term-color-red ((,class (:foreground ,nord11 :background ,nord11)))) - `(term-color-yellow ((,class (:foreground ,nord13 :background ,nord13)))) - `(term-color-green ((,class (:foreground ,nord14 :background ,nord14)))) - `(term-color-magenta ((,class (:foreground ,nord15 :background ,nord15)))) - `(tool-bar ((,class (:foreground ,nord4 :background ,nord3)))) - `(tooltip ((,class (:foreground ,nord0 :background ,nord4)))) - `(trailing-whitespace ((,class (:foreground ,nord3)))) - `(tty-menu-disabled-face ((,class (:foreground ,nord1)))) - `(tty-menu-enabled-face ((,class (:background ,nord2 foreground ,nord4)))) - `(tty-menu-selected-face ((,class (:foreground ,nord8 :underline t)))) - `(undo-tree-visualizer-current-face ((,class (:foreground ,nord8)))) - `(undo-tree-visualizer-default-face ((,class (:foreground ,nord4)))) - `(undo-tree-visualizer-unmodified-face ((,class (:foreground ,nord4)))) - `(undo-tree-visualizer-register-face ((,class (:foreground ,nord9)))) - `(vc-conflict-state ((,class (:foreground ,nord12)))) - `(vc-edited-state ((,class (:foreground ,nord13)))) - `(vc-locally-added-state ((,class (:underline ,nord14)))) - `(vc-locked-state ((,class (:foreground ,nord10)))) - `(vc-missing-state ((,class (:foreground ,nord11)))) - `(vc-needs-update-state ((,class (:foreground ,nord12)))) - `(vc-removed-state ((,class (:foreground ,nord11)))) - `(vc-state-base ((,class (:foreground ,nord4)))) - `(vc-up-to-date-state ((,class (:foreground ,nord8)))) - `(vertical-border ((,class (:foreground ,nord2)))) - `(which-func ((,class (:foreground ,nord8)))) - `(whitespace-big-indent ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-empty ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-hspace ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-indentation ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-line ((,class (:background ,nord0)))) - `(whitespace-newline ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-space ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-space-after-tab ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-space-before-tab ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-tab ((,class (:foreground ,nord3 :background ,nord0)))) - `(whitespace-trailing ((,class (:inherit trailing-whitespace)))) - `(widget-button-pressed ((,class (:foreground ,nord9 :background ,nord1)))) - `(widget-documentation ((,class (:foreground ,nord4)))) - `(widget-field ((,class (:background ,nord2 :foreground ,nord4)))) - `(widget-single-line-field ((,class (:background ,nord2 :foreground ,nord4)))) - `(window-divider ((,class (:background ,nord3)))) - `(window-divider-first-pixel ((,class (:background ,nord3)))) - `(window-divider-last-pixel ((,class (:background ,nord3)))) - - ;;;; +-----------------+ - ;;;; + Package Support + - ;;;; +-----------------+ - ;; +--- Syntax ---+ - ;; > Auctex - `(font-latex-bold-face ((,class (:inherit bold)))) - `(font-latex-italic-face ((,class (:inherit italic)))) - `(font-latex-math-face ((,class (:foreground ,nord8)))) - `(font-latex-sectioning-0-face ((,class (:foreground ,nord8 :weight bold)))) - `(font-latex-sectioning-1-face ((,class (:inherit font-latex-sectioning-0-face)))) - `(font-latex-sectioning-2-face ((,class (:inherit font-latex-sectioning-0-face)))) - `(font-latex-sectioning-3-face ((,class (:inherit font-latex-sectioning-0-face)))) - `(font-latex-sectioning-4-face ((,class (:inherit font-latex-sectioning-0-face)))) - `(font-latex-sectioning-5-face ((,class (:inherit font-latex-sectioning-0-face)))) - `(font-latex-script-char-face ((,class (:inherit font-lock-warning-face)))) - `(font-latex-string-face ((,class (:inherit font-lock-string-face)))) - `(font-latex-warning-face ((,class (:inherit font-lock-warning-face)))) - - ;; > Elixir - `(elixir-attribute-face ((,class (:foreground ,nord-annotation)))) - `(elixir-atom-face ((,class (:foreground ,nord4 :weight bold)))) - - ;; > Enhanced Ruby - `(enh-ruby-heredoc-delimiter-face ((,class (:foreground ,nord14)))) - `(enh-ruby-op-face ((,class (:foreground ,nord9)))) - `(enh-ruby-regexp-delimiter-face ((,class (:foreground ,nord13)))) - `(enh-ruby-regexp-face ((,class (:foreground ,nord13)))) - `(enh-ruby-string-delimiter-face ((,class (:foreground ,nord14)))) - `(erm-syn-errline ((,class (:foreground ,nord11 :underline t)))) - `(erm-syn-warnline ((,class (:foreground ,nord13 :underline t)))) - - ;; > Java Development Environment for Emacs - `(jdee-db-active-breakpoint-face ((,class (:background ,nord2 :weight bold)))) - `(jdee-bug-breakpoint-cursor ((,class (:background ,nord2)))) - `(jdee-db-requested-breakpoint-face ((,class (:foreground ,nord13 :background ,nord2 :weight bold)))) - `(jdee-db-spec-breakpoint-face ((,class (:foreground ,nord14 :background ,nord2 :weight bold)))) - `(jdee-font-lock-api-face ((,class (:foreground ,nord4)))) - `(jdee-font-lock-code-face ((,class (:slant italic)))) - `(jdee-font-lock-constant-face ((,class (:foreground ,nord-keyword)))) - `(jdee-font-lock-constructor-face ((,class (:foreground ,nord-method)))) - `(jdee-font-lock-doc-tag-face ((,class (:foreground ,nord7)))) - `(jdee-font-lock-link-face ((,class (:underline t)))) - `(jdee-font-lock-modifier-face ((,class (:foreground ,nord-keyword)))) - `(jdee-font-lock-number-face ((,class (:foreground ,nord-numeric)))) - `(jdee-font-lock-operator-fac ((,class (:foreground ,nord-operator)))) - `(jdee-font-lock-package-face ((,class (:foreground ,nord-class)))) - `(jdee-font-lock-pre-face ((,class (:foreground ,nord-comment :slant italic)))) - `(jdee-font-lock-private-face ((,class (:foreground ,nord-keyword)))) - `(jdee-font-lock-public-face ((,class (:foreground ,nord-keyword)))) - `(jdee-font-lock-variable-face ((,class (:foreground ,nord-variable)))) - - ;; > JavaScript 2 - `(js2-function-call ((,class (:foreground ,nord8)))) - `(js2-private-function-call ((,class (:foreground ,nord8)))) - `(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,nord6)))) - `(js2-jsdoc-html-tag-name ((,class (:foreground ,nord9)))) - `(js2-external-variable ((,class (:foreground ,nord4)))) - `(js2-function-param ((,class (:foreground ,nord4)))) - `(js2-jsdoc-value ((,class (:foreground ,nord-comment)))) - `(js2-jsdoc-tag ((,class (:foreground ,nord7)))) - `(js2-jsdoc-type ((,class (:foreground ,nord7)))) - `(js2-private-member ((,class (:foreground ,nord4)))) - `(js2-object-property ((,class (:foreground ,nord4)))) - `(js2-error ((,class (:foreground ,nord11)))) - `(js2-warning ((,class (:foreground ,nord13)))) - `(js2-instance-member ((,class (:foreground ,nord4)))) - - ;; > JavaScript 3 - `(js3-error-face ((,class (:foreground ,nord11)))) - `(js3-external-variable-face ((,class (:foreground ,nord4)))) - `(js3-function-param-face ((,class (:foreground ,nord4)))) - `(js3-instance-member-face ((,class (:foreground ,nord4)))) - `(js3-jsdoc-html-tag-delimiter-face ((,class (:foreground ,nord6)))) - `(js3-jsdoc-html-tag-name-face ((,class (:foreground ,nord9)))) - `(js3-jsdoc-tag-face ((,class (:foreground ,nord9)))) - `(js3-jsdoc-type-face ((,class (:foreground ,nord7)))) - `(js3-jsdoc-value-face ((,class (:foreground ,nord4)))) - `(js3-magic-paren-face ((,class (:inherit show-paren-match-face)))) - `(js3-private-function-call-face ((,class (:foreground ,nord8)))) - `(js3-private-member-face ((,class (:foreground ,nord4)))) - `(js3-warning-face ((,class (:foreground ,nord13)))) - - ;; > Markdown - `(markdown-blockquote-face ((,class (:foreground ,nord-comment)))) - `(markdown-bold-face ((,class (:inherit bold)))) - `(markdown-header-face-1 ((,class (:foreground ,nord8)))) - `(markdown-header-face-2 ((,class (:foreground ,nord8)))) - `(markdown-header-face-3 ((,class (:foreground ,nord8)))) - `(markdown-header-face-4 ((,class (:foreground ,nord8)))) - `(markdown-header-face-5 ((,class (:foreground ,nord8)))) - `(markdown-header-face-6 ((,class (:foreground ,nord8)))) - `(markdown-inline-code-face ((,class (:foreground ,nord7)))) - `(markdown-italic-face ((,class (:inherit italic)))) - `(markdown-link-face ((,class (:foreground ,nord8)))) - `(markdown-markup-face ((,class (:foreground ,nord9)))) - `(markdown-reference-face ((,class (:inherit markdown-link-face)))) - `(markdown-url-face ((,class (:foreground ,nord4 :underline t)))) - - ;; > Rainbow Delimeters - `(rainbow-delimiters-depth-1-face ((,class :foreground ,nord7))) - `(rainbow-delimiters-depth-2-face ((,class :foreground ,nord8))) - `(rainbow-delimiters-depth-3-face ((,class :foreground ,nord9))) - `(rainbow-delimiters-depth-4-face ((,class :foreground ,nord10))) - `(rainbow-delimiters-depth-5-face ((,class :foreground ,nord12))) - `(rainbow-delimiters-depth-6-face ((,class :foreground ,nord13))) - `(rainbow-delimiters-depth-7-face ((,class :foreground ,nord14))) - `(rainbow-delimiters-depth-8-face ((,class :foreground ,nord15))) - `(rainbow-delimiters-unmatched-face ((,class :foreground ,nord11))) - - ;; > Web Mode - `(web-mode-attr-tag-custom-face ((,class (:foreground ,nord-attribute)))) - `(web-mode-builtin-face ((,class (:foreground ,nord-keyword)))) - `(web-mode-comment-face ((,class (:foreground ,nord-comment)))) - `(web-mode-comment-keyword-face ((,class (:foreground ,nord-comment)))) - `(web-mode-constant-face ((,class (:foreground ,nord-variable)))) - `(web-mode-css-at-rule-face ((,class (:foreground ,nord-annotation)))) - `(web-mode-css-function-face ((,class (:foreground ,nord-method)))) - `(web-mode-css-property-name-face ((,class (:foreground ,nord-keyword)))) - `(web-mode-css-pseudo-class-face ((,class (:foreground ,nord-class)))) - `(web-mode-css-selector-face ((,class (:foreground ,nord-keyword)))) - `(web-mode-css-string-face ((,class (:foreground ,nord-string)))) - `(web-mode-doctype-face ((,class (:foreground ,nord-preprocessor)))) - `(web-mode-function-call-face ((,class (:foreground ,nord-method)))) - `(web-mode-function-name-face ((,class (:foreground ,nord-method)))) - `(web-mode-html-attr-name-face ((,class (:foreground ,nord-attribute)))) - `(web-mode-html-attr-equal-face ((,class (:foreground ,nord-punctuation)))) - `(web-mode-html-attr-value-face ((,class (:foreground ,nord-string)))) - `(web-mode-html-entity-face ((,class (:foreground ,nord-keyword)))) - `(web-mode-html-tag-bracket-face ((,class (:foreground ,nord-punctuation)))) - `(web-mode-html-tag-custom-face ((,class (:foreground ,nord-tag)))) - `(web-mode-html-tag-face ((,class (:foreground ,nord-tag)))) - `(web-mode-html-tag-namespaced-face ((,class (:foreground ,nord-keyword)))) - `(web-mode-json-key-face ((,class (:foreground ,nord-class)))) - `(web-mode-json-string-face ((,class (:foreground ,nord-string)))) - `(web-mode-keyword-face ((,class (:foreground ,nord-keyword)))) - `(web-mode-preprocessor-face ((,class (:foreground ,nord-preprocessor)))) - `(web-mode-string-face ((,class (:foreground ,nord-string)))) - `(web-mode-symbol-face ((,class (:foreground ,nord-variable)))) - `(web-mode-type-face ((,class (:foreground ,nord-class)))) - `(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face)))) - `(web-mode-variable-name-face ((,class (:foreground ,nord-variable)))) - - ;; +--- UI ---+ - ;; > Anzu - `(anzu-mode-line ((,class (:foreground, nord8)))) - `(anzu-mode-line-no-match ((,class (:foreground, nord11)))) - - ;; > Avy - `(avy-lead-face ((,class (:background ,nord11 :foreground ,nord5)))) - `(avy-lead-face-0 ((,class (:background ,nord10 :foreground ,nord5)))) - `(avy-lead-face-1 ((,class (:background ,nord3 :foreground ,nord5)))) - `(avy-lead-face-2 ((,class (:background ,nord15 :foreground ,nord5)))) - - ;; > Company - `(company-echo-common ((,class (:foreground ,nord0 :background ,nord4)))) - `(company-preview ((,class (:foreground ,nord4 :background ,nord10)))) - `(company-preview-common ((,class (:foreground ,nord0 :background ,nord8)))) - `(company-preview-search ((,class (:foreground ,nord0 :background ,nord8)))) - `(company-scrollbar-bg ((,class (:foreground ,nord1 :background ,nord1)))) - `(company-scrollbar-fg ((,class (:foreground ,nord2 :background ,nord2)))) - `(company-template-field ((,class (:foreground ,nord0 :background ,nord7)))) - `(company-tooltip ((,class (:foreground ,nord4 :background ,nord2)))) - `(company-tooltip-annotation ((,class (:foreground ,nord12)))) - `(company-tooltip-annotation-selection ((,class (:foreground ,nord12 :weight bold)))) - `(company-tooltip-common ((,class (:foreground ,nord8)))) - `(company-tooltip-common-selection ((,class (:foreground ,nord8 :background ,nord3)))) - `(company-tooltip-mouse ((,class (:inherit highlight)))) - `(company-tooltip-selection ((,class (:background ,nord3 :weight bold)))) - - ;; > diff-hl - `(diff-hl-change ((,class (:background ,nord13)))) - `(diff-hl-insert ((,class (:background ,nord14)))) - `(diff-hl-delete ((,class (:background ,nord11)))) - - ;; > Evil - `(evil-ex-info ((,class (:foreground ,nord8)))) - `(evil-ex-substitute-replacement ((,class (:foreground ,nord9)))) - `(evil-ex-substitute-matches ((,class (:inherit isearch)))) - - ;; > Flycheck - `(flycheck-error ((,class (:underline (:style wave :color ,nord11))))) - `(flycheck-fringe-error ((,class (:foreground ,nord11 :weight bold)))) - `(flycheck-fringe-info ((,class (:foreground ,nord8 :weight bold)))) - `(flycheck-fringe-warning ((,class (:foreground ,nord13 :weight bold)))) - `(flycheck-info ((,class (:underline (:style wave :color ,nord8))))) - `(flycheck-warning ((,class (:underline (:style wave :color ,nord13))))) - - ;; > Git Gutter - `(git-gutter:modified ((,class (:foreground ,nord13)))) - `(git-gutter:added ((,class (:foreground ,nord14)))) - `(git-gutter:deleted ((,class (:foreground ,nord11)))) - - ;; > Git Gutter Plus - `(git-gutter+-modified ((,class (:foreground ,nord13)))) - `(git-gutter+-added ((,class (:foreground ,nord14)))) - `(git-gutter+-deleted ((,class (:foreground ,nord11)))) - - ;; > Helm - `(helm-bookmark-addressbook ((,class (:foreground ,nord7)))) - `(helm-bookmark-directory ((,class (:foreground ,nord9)))) - `(helm-bookmark-file ((,class (:foreground ,nord8)))) - `(helm-bookmark-gnus ((,class (:foreground ,nord10)))) - `(helm-bookmark-info ((,class (:foreground ,nord14)))) - `(helm-bookmark-man ((,class (:foreground ,nord4)))) - `(helm-bookmark-w3m ((,class (:foreground ,nord9)))) - `(helm-buffer-directory ((,class (:foreground ,nord9)))) - `(helm-buffer-file ((,class (:foreground ,nord8)))) - `(helm-buffer-not-saved ((,class (:foreground ,nord13)))) - `(helm-buffer-process ((,class (:foreground ,nord10)))) - `(helm-candidate-number ((,class (:foreground ,nord4 :weight bold)))) - `(helm-candidate-number-suspended ((,class (:foreground ,nord4)))) - `(helm-ff-directory ((,class (:foreground ,nord9 :weight bold)))) - `(helm-ff-dirs ((,class (:foreground ,nord9)))) - `(helm-ff-dotted-director ((,class (:foreground ,nord9 :underline t)))) - `(helm-ff-dotted-symlink-director ((,class (:foreground ,nord7 :weight bold)))) - `(helm-ff-executable ((,class (:foreground ,nord8)))) - `(helm-ff-file ((,class (:foreground ,nord4)))) - `(helm-ff-invalid-symlink ((,class (:foreground ,nord11 :weight bold)))) - `(helm-ff-prefix ((,class (:foreground ,nord0 :background ,nord9)))) - `(helm-ff-symlink ((,class (:foreground ,nord7)))) - `(helm-grep-cmd-line ((,class (:foreground ,nord4 :background ,nord0)))) - `(helm-grep-file ((,class (:foreground ,nord8)))) - `(helm-grep-finish ((,class (:foreground ,nord5)))) - `(helm-grep-lineno ((,class (:foreground ,nord4)))) - `(helm-grep-match ((,class (:inherit isearch)))) - `(helm-grep-running ((,class (:foreground ,nord8)))) - `(helm-header ((,class (:foreground ,nord9 :background ,nord2)))) - `(helm-header-line-left-margin ((,class (:foreground ,nord9 :background ,nord2)))) - `(helm-history-deleted ((,class (:foreground ,nord11)))) - `(helm-history-remote ((,class (:foreground ,nord4)))) - `(helm-lisp-completion-info ((,class (:foreground ,nord4 :weight bold)))) - `(helm-lisp-show-completion ((,class (:inherit isearch)))) - `(helm-locate-finish ((,class (:foreground ,nord14)))) - `(helm-match ((,class (:foreground ,nord8)))) - `(helm-match-item ((,class (:inherit isearch)))) - `(helm-moccur-buffer ((,class (:foreground ,nord8)))) - `(helm-resume-need-update ((,class (:foreground ,nord0 :background ,nord13)))) - `(helm-selection ((,class (:inherit highlight)))) - `(helm-selection-line ((,class (:background ,nord2)))) - `(helm-source-header ((,class (:height 1.44 :foreground ,nord8 :background ,nord2)))) - `(helm-swoop-line-number-face ((,class (:foreground ,nord4 :background ,nord0)))) - `(helm-swoop-target-word-face ((,class (:foreground ,nord0 :background ,nord7)))) - `(helm-swoop-target-line-face ((,class (:background ,nord13 :foreground ,nord3)))) - `(helm-swoop-target-line-block-face ((,class (:background ,nord13 :foreground ,nord3)))) - `(helm-separator ((,class (:background ,nord2)))) - `(helm-visible-mark ((,class (:background ,nord2)))) - - ;; > Magit - `(magit-branch ((,class (:foreground ,nord7 :weight bold)))) - `(magit-diff-context-highlight ((,class (:background ,nord2)))) - `(magit-diff-file-header ((,class (:foreground ,nord8 :box (:color ,nord8))))) - `(magit-diffstat-added ((,class (:foreground ,nord14)))) - `(magit-diffstat-removed ((,class (:foreground ,nord11)))) - `(magit-hash ((,class (:foreground ,nord8)))) - `(magit-hunk-heading ((,class (:foreground ,nord9)))) - `(magit-hunk-heading-highlight ((,class (:foreground ,nord9 :background ,nord2)))) - `(magit-item-highlight ((,class (:foreground ,nord8 :background ,nord2)))) - `(magit-log-author ((,class (:foreground ,nord7)))) - `(magit-process-ng ((,class (:foreground ,nord13 :weight bold)))) - `(magit-process-ok ((,class (:foreground ,nord14 :weight bold)))) - `(magit-section-heading ((,class (:foreground ,nord7 :weight bold)))) - `(magit-section-highlight ((,class (:background ,nord2)))) - - ;; > MU4E - `(mu4e-header-marks-face ((,class (:foreground ,nord9)))) - `(mu4e-title-face ((,class (:foreground ,nord8)))) - `(mu4e-header-key-face ((,class (:foreground ,nord8)))) - `(mu4e-highlight-face ((,class (:highlight)))) - `(mu4e-flagged-face ((,class (:foreground ,nord13)))) - `(mu4e-unread-face ((,class (:foreground ,nord13 :weight bold)))) - `(mu4e-link-face ((,class (:underline t)))) - - ;; > Powerline - `(powerline-active1 ((,class (:foreground ,nord4 :background ,nord1)))) - `(powerline-active2 ((,class (:foreground ,nord4 :background ,nord3)))) - `(powerline-inactive1 ((,class (:background ,nord2)))) - `(powerline-inactive2 ((,class (:background ,nord2)))) - - ;; > Powerline Evil - `(powerline-evil-base-face ((,class (:foreground ,nord4)))) - `(powerline-evil-normal-face ((,class (:background ,nord8)))) - `(powerline-evil-insert-face ((,class (:foreground ,nord0 :background ,nord4)))) - `(powerline-evil-visual-face ((,class (:foreground ,nord0 :background ,nord7)))) - `(powerline-evil-replace-face ((,class (:foreground ,nord0 :background ,nord9)))) - - ;; > NeoTree - `(neo-banner-face ((,class (:foreground ,nord10)))) - `(neo-dir-link-face ((,class (:foreground ,nord9)))) - `(neo-expand-btn-face ((,class (:foreground ,nord6 :bold t)))) - `(neo-file-link-face ((,class (:foreground ,nord4)))) - `(neo-root-dir-face ((,class (:foreground ,nord7 :weight bold)))) - `(neo-vc-added-face ((,class (:foreground ,nord14)))) - `(neo-vc-conflict-face ((,class (:foreground ,nord11)))) - `(neo-vc-default-face ((,class (:foreground ,nord4)))) - `(neo-vc-edited-face ((,class (:foreground ,nord13)))) - `(neo-vc-ignored-face ((,class (:foreground ,nord3)))) - `(neo-vc-missing-face ((,class (:foreground ,nord12)))) - `(neo-vc-needs-merge-face ((,class (:background ,nord12 :foreground ,nord4)))) - `(neo-vc-needs-update-face ((,class (:background ,nord10 :foreground ,nord4)))) - `(neo-vc-removed-face ((,class (:foreground ,nord11 :strike-through nil)))) - `(neo-vc-up-to-date-face ((,class (:foreground ,nord4)))) - `(neo-vc-user-face ((,class (:foreground ,nord4)))) - - ;; > Cider - `(cider-result-overlay-face ((t (:background unspecified)))) - - ;; > Org - `(org-level-1 ((,class (:foreground ,nord7 :weight extra-bold)))) - `(org-level-2 ((,class (:foreground ,nord8 :weight bold)))) - `(org-level-3 ((,class (:foreground ,nord9 :weight semi-bold)))) - `(org-level-4 ((,class (:foreground ,nord10 :weight normal)))) - `(org-level-5 ((,class (:inherit org-level-4)))) - `(org-level-6 ((,class (:inherit org-level-4)))) - `(org-level-7 ((,class (:inherit org-level-4)))) - `(org-level-8 ((,class (:inherit org-level-4)))) - `(org-agenda-structure ((,class (:foreground ,nord9)))) - `(org-agenda-date ((,class (:foreground ,nord8 :underline nil)))) - `(org-agenda-done ((,class (:foreground ,nord14)))) - `(org-agenda-dimmed-todo-face ((,class (:background ,nord13)))) - `(org-block ((,class (:foreground ,nord4)))) - `(org-block-background ((,class (:background ,nord0)))) - `(org-block-begin-line ((,class (:foreground ,nord7)))) - `(org-block-end-line ((,class (:foreground ,nord7)))) - `(org-checkbox ((,class (:foreground ,nord9)))) - `(org-checkbox-statistics-done ((,class (:foreground ,nord14)))) - `(org-checkbox-statistics-todo ((,class (:foreground ,nord13)))) - `(org-code ((,class (:foreground ,nord7)))) - `(org-column ((,class (:background ,nord2)))) - `(org-column-title ((,class (:inherit org-column :weight bold :underline t)))) - `(org-date ((,class (:foreground ,nord8)))) - `(org-document-info ((,class (:foreground ,nord4)))) - `(org-document-info-keyword ((,class (:foreground ,nord3 :weight bold)))) - `(org-document-title ((,class (:foreground ,nord8 :weight bold)))) - `(org-done ((,class (:foreground ,nord14 :weight bold)))) - `(org-ellipsis ((,class (:foreground ,nord3)))) - `(org-footnote ((,class (:foreground ,nord8)))) - `(org-formula ((,class (:foreground ,nord9)))) - `(org-hide ((,class (:foreground ,nord0 :background ,nord0)))) - `(org-link ((,class (:underline t)))) - `(org-scheduled ((,class (:foreground ,nord14)))) - `(org-scheduled-previously ((,class (:foreground ,nord13)))) - `(org-scheduled-today ((,class (:foreground ,nord8)))) - `(org-special-keyword ((,class (:foreground ,nord9)))) - `(org-table ((,class (:foreground ,nord9)))) - `(org-todo ((,class (:foreground ,nord13 :weight bold)))) - `(org-upcoming-deadline ((,class (:foreground ,nord12)))) - `(org-warning ((,class (:foreground ,nord13 :weight bold)))) - `(font-latex-bold-face ((,class (:inherit bold)))) - `(font-latex-italic-face ((,class (:slant italic)))) - `(font-latex-string-face ((,class (:foreground ,nord14)))) - `(font-latex-match-reference-keywords ((,class (:foreground ,nord9)))) - `(font-latex-match-variable-keywords ((,class (:foreground ,nord4)))) - `(ido-only-match ((,class (:foreground ,nord8)))) - `(org-sexp-date ((,class (:foreground ,nord7)))) - `(ido-first-match ((,class (:foreground ,nord8 :weight bold)))) - `(ido-subdir ((,class (:foreground ,nord9)))) - `(org-quote ((,class (:inherit org-block :slant italic)))) - `(org-verse ((,class (:inherit org-block :slant italic)))) - `(org-agenda-date-weekend ((,class (:foreground ,nord9)))) - `(org-agenda-date-today ((,class (:foreground ,nord8 :weight bold)))) - `(org-agenda-done ((,class (:foreground ,nord14)))) - `(org-verbatim ((,class (:foreground ,nord7)))) - - ;; > ivy-mode - `(ivy-current-match ((,class (:inherit region)))) - `(ivy-minibuffer-match-face-1 ((,class (:inherit default)))) - `(ivy-minibuffer-match-face-2 ((,class (:background ,nord7 :foreground ,nord0)))) - `(ivy-minibuffer-match-face-3 ((,class (:background ,nord8 :foreground ,nord0)))) - `(ivy-minibuffer-match-face-4 ((,class (:background ,nord9 :foreground ,nord0)))) - `(ivy-remote ((,class (:foreground ,nord14)))) - `(ivy-posframe ((,class (:background ,nord1)))) - `(ivy-posframe-border ((,class (:background ,nord1)))) - `(ivy-remote ((,class (:foreground ,nord14)))) - - ;; > perspective - `(persp-selected-face ((,class (:foreground ,nord8 :weight bold)))))) - -;;;###autoload -(when (and (boundp 'custom-theme-load-path) load-file-name) - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'nord) - -;; Local Variables: -;; no-byte-compile: t -;; indent-tabs-mode: nil -;; End: - -;;; nord-theme.el ends here diff --git a/config/extra/emacs/themes/tlast-theme.el b/config/extra/emacs/themes/tlast-theme.el deleted file mode 100644 index a6ed15f..0000000 --- a/config/extra/emacs/themes/tlast-theme.el +++ /dev/null @@ -1,306 +0,0 @@ -;;; tlast-theme.el --- Theme - -;; Copyright (C) 2023 , tlast - -;; Author: tlast -;; Version: 0.1 -;; Package-Requires: ((emacs "24.1")) -;; Created with ThemeCreator, https://github.com/mswift42/themecreator. - -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;; This file is not part of Emacs. - -;;; Commentary: -;;; tlast theme created by tlast in 2023 - -;;; Code: - -(deftheme tlast) -(let ((class '((class color) (min-colors 89))) - (fg1 "#62a0ea") - (fg2 "#5a93d7") - (fg3 "#5286c5") - (fg4 "#4a7ab2") - (fg6 "#88b7ef") - (bg1 "#3d3846") - (bg2 "#4d4855") - (bg3 "#5c5864") - (bg4 "#6c6872") - (builtin "#26a269") - (keyword "#3584e4") - (const "#ffffff") - (comment "#77767b") - (func "#99c1f1") - (str "#57e389") - (type "#f6d32d") - (var "#ff7800") - (selection "#dc8add") - (warning "#ff0000") - (warning2 "#ff8800") - (unspec (when (>= emacs-major-version 29) 'unspecified))) - (custom-theme-set-faces - 'tlast - `(default ((,class (:background ,bg1 :foreground ,fg1)))) - `(font-lock-builtin-face ((,class (:foreground ,builtin)))) - `(font-lock-comment-face ((,class (:foreground ,comment)))) - `(font-lock-negation-char-face ((,class (:foreground ,const)))) - `(font-lock-reference-face ((,class (:foreground ,const)))) - `(font-lock-constant-face ((,class (:foreground ,const)))) - `(font-lock-doc-face ((,class (:foreground ,comment)))) - `(font-lock-function-name-face ((,class (:foreground ,func )))) - `(font-lock-keyword-face ((,class (:bold ,class :foreground ,keyword)))) - `(font-lock-string-face ((,class (:foreground ,str)))) - `(font-lock-type-face ((,class (:foreground ,type )))) - `(font-lock-variable-name-face ((,class (:foreground ,var)))) - `(font-lock-warning-face ((,class (:foreground ,warning :background ,bg2)))) - `(term-color-black ((,class (:foreground ,fg2 :background ,unspec)))) - ;; `(region ((,class (:background ,fg1 :foreground ,bg1)))) - `(region ((,class (:background ,selection)))) - `(highlight ((,class (:foreground ,fg3 :background ,bg3)))) - `(hl-line ((,class (:background ,bg2)))) - `(fringe ((,class (:background ,bg2 :foreground ,fg4)))) - `(cursor ((,class (:background ,fg4)))) - `(isearch ((,class (:bold t :foreground ,warning :background ,bg3)))) - `(mode-line ((,class (:box (:line-width 1 :color nil) :bold t :foreground ,fg4 :background ,bg2)))) - `(mode-line-inactive ((,class (:box (:line-width 1 :color nil :style pressed-button) :foreground ,var :background ,bg1 :weight normal)))) - `(mode-line-buffer-id ((,class (:bold t :foreground ,func :background ,unspec)))) - `(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight bold)))) - `(mode-line-emphasis ((,class (:foreground ,fg1)))) - `(vertical-border ((,class (:foreground ,fg3)))) - `(minibuffer-prompt ((,class (:bold t :foreground ,keyword)))) - `(default-italic ((,class (:italic t)))) - `(link ((,class (:foreground ,const :underline t)))) - `(org-code ((,class (:foreground ,fg2)))) - `(org-hide ((,class (:foreground ,fg4)))) - `(org-level-1 ((,class (:bold t :foreground ,fg2 :height 1.1)))) - `(org-level-2 ((,class (:bold nil :foreground ,fg3)))) - `(org-level-3 ((,class (:bold t :foreground ,fg4)))) - `(org-level-4 ((,class (:bold nil :foreground ,bg4)))) - `(org-date ((,class (:underline t :foreground ,var) ))) - `(org-footnote ((,class (:underline t :foreground ,fg4)))) - `(org-link ((,class (:underline t :foreground ,type )))) - `(org-special-keyword ((,class (:foreground ,func)))) - `(org-block ((,class (:foreground ,fg3)))) - `(org-quote ((,class (:inherit org-block :slant italic)))) - `(org-verse ((,class (:inherit org-block :slant italic)))) - `(org-todo ((,class (:box (:line-width 1 :color ,fg3) :foreground ,keyword :bold t)))) - `(org-done ((,class (:box (:line-width 1 :color ,bg3) :bold t :foreground ,bg4)))) - `(org-warning ((,class (:underline t :foreground ,warning)))) - `(org-agenda-structure ((,class (:weight bold :foreground ,fg3 :box (:color ,fg4) :background ,bg3)))) - `(org-agenda-date ((,class (:foreground ,var :height 1.1 )))) - `(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4)))) - `(org-agenda-date-today ((,class (:weight bold :foreground ,keyword :height 1.4)))) - `(org-agenda-done ((,class (:foreground ,bg4)))) - `(org-scheduled ((,class (:foreground ,type)))) - `(org-scheduled-today ((,class (:foreground ,func :weight bold :height 1.2)))) - `(org-ellipsis ((,class (:foreground ,builtin)))) - `(org-verbatim ((,class (:foreground ,fg4)))) - `(org-document-info-keyword ((,class (:foreground ,func)))) - `(font-latex-bold-face ((,class (:foreground ,type)))) - `(font-latex-italic-face ((,class (:foreground ,var :italic t)))) - `(font-latex-string-face ((,class (:foreground ,str)))) - `(font-latex-match-reference-keywords ((,class (:foreground ,const)))) - `(font-latex-match-variable-keywords ((,class (:foreground ,var)))) - `(ido-only-match ((,class (:foreground ,warning)))) - `(org-sexp-date ((,class (:foreground ,fg4)))) - `(ido-first-match ((,class (:foreground ,keyword :bold t)))) - `(ivy-current-match ((,class (:foreground ,fg3 :inherit highlight :underline t)))) - `(gnus-header-content ((,class (:foreground ,keyword)))) - `(gnus-header-from ((,class (:foreground ,var)))) - `(gnus-header-name ((,class (:foreground ,type)))) - `(gnus-header-subject ((,class (:foreground ,func :bold t)))) - `(mu4e-view-url-number-face ((,class (:foreground ,type)))) - `(mu4e-cited-1-face ((,class (:foreground ,fg2)))) - `(mu4e-cited-7-face ((,class (:foreground ,fg3)))) - `(mu4e-header-marks-face ((,class (:foreground ,type)))) - `(ffap ((,class (:foreground ,fg4)))) - `(js2-private-function-call ((,class (:foreground ,const)))) - `(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str)))) - `(js2-jsdoc-html-tag-name ((,class (:foreground ,var)))) - `(js2-external-variable ((,class (:foreground ,type )))) - `(js2-function-param ((,class (:foreground ,const)))) - `(js2-jsdoc-value ((,class (:foreground ,str)))) - `(js2-private-member ((,class (:foreground ,fg3)))) - `(js3-warning-face ((,class (:underline ,keyword)))) - `(js3-error-face ((,class (:underline ,warning)))) - `(js3-external-variable-face ((,class (:foreground ,var)))) - `(js3-function-param-face ((,class (:foreground ,fg2)))) - `(js3-jsdoc-tag-face ((,class (:foreground ,keyword)))) - `(js3-instance-member-face ((,class (:foreground ,const)))) - `(warning ((,class (:foreground ,warning)))) - `(ac-completion-face ((,class (:underline t :foreground ,keyword)))) - `(info-quoted-name ((,class (:foreground ,builtin)))) - `(info-string ((,class (:foreground ,str)))) - `(icompletep-determined ((,class :foreground ,builtin))) - `(undo-tree-visualizer-current-face ((,class :foreground ,builtin))) - `(undo-tree-visualizer-default-face ((,class :foreground ,fg2))) - `(undo-tree-visualizer-unmodified-face ((,class :foreground ,var))) - `(undo-tree-visualizer-register-face ((,class :foreground ,type))) - `(slime-repl-inputed-output-face ((,class (:foreground ,type)))) - `(trailing-whitespace ((,class :foreground ,unspec :background ,warning))) - `(rainbow-delimiters-depth-1-face ((,class :foreground ,fg1))) - `(rainbow-delimiters-depth-2-face ((,class :foreground ,type))) - `(rainbow-delimiters-depth-3-face ((,class :foreground ,var))) - `(rainbow-delimiters-depth-4-face ((,class :foreground ,const))) - `(rainbow-delimiters-depth-5-face ((,class :foreground ,keyword))) - `(rainbow-delimiters-depth-6-face ((,class :foreground ,fg1))) - `(rainbow-delimiters-depth-7-face ((,class :foreground ,type))) - `(rainbow-delimiters-depth-8-face ((,class :foreground ,var))) - `(magit-item-highlight ((,class :background ,bg3))) - `(magit-section-heading ((,class (:foreground ,keyword :weight bold)))) - `(magit-hunk-heading ((,class (:background ,bg3)))) - `(magit-section-highlight ((,class (:background ,bg2)))) - `(magit-hunk-heading-highlight ((,class (:background ,bg3)))) - `(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3)))) - `(magit-diffstat-added ((,class (:foreground ,type)))) - `(magit-diffstat-removed ((,class (:foreground ,var)))) - `(magit-process-ok ((,class (:foreground ,func :weight bold)))) - `(magit-process-ng ((,class (:foreground ,warning :weight bold)))) - `(magit-branch ((,class (:foreground ,const :weight bold)))) - `(magit-log-author ((,class (:foreground ,fg3)))) - `(magit-hash ((,class (:foreground ,fg2)))) - `(magit-diff-file-header ((,class (:foreground ,fg2 :background ,bg3)))) - `(lazy-highlight ((,class (:foreground ,fg2 :background ,bg3)))) - `(term ((,class (:foreground ,fg1 :background ,bg1)))) - `(term-color-black ((,class (:foreground ,bg3 :background ,bg3)))) - `(term-color-blue ((,class (:foreground ,func :background ,func)))) - `(term-color-red ((,class (:foreground ,keyword :background ,bg3)))) - `(term-color-green ((,class (:foreground ,type :background ,bg3)))) - `(term-color-yellow ((,class (:foreground ,var :background ,var)))) - `(term-color-magenta ((,class (:foreground ,builtin :background ,builtin)))) - `(term-color-cyan ((,class (:foreground ,str :background ,str)))) - `(term-color-white ((,class (:foreground ,fg2 :background ,fg2)))) - `(rainbow-delimiters-unmatched-face ((,class :foreground ,warning))) - `(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil)))) - `(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight bold)))) - `(helm-selection ((,class (:background ,bg2 :underline nil)))) - `(helm-selection-line ((,class (:background ,bg2)))) - `(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3)))) - `(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1)))) - `(helm-separator ((,class (:foreground ,type :background ,bg1)))) - `(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1)))) - `(helm-time-zone-home ((,class (:foreground ,type :background ,bg1)))) - `(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1)))) - `(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1)))) - `(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1)))) - `(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1)))) - `(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight bold)))) - `(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal)))) - `(helm-ff-executable ((,class (:foreground ,var :background ,bg1 :weight normal)))) - `(helm-ff-invalid-symlink ((,class (:foreground ,warning2 :background ,bg1 :weight bold)))) - `(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight bold)))) - `(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal)))) - `(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1)))) - `(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1)))) - `(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1)))) - `(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1)))) - `(helm-grep-match ((,class (:foreground ,unspec :background ,unspec :inherit helm-match)))) - `(helm-grep-running ((,class (:foreground ,func :background ,bg1)))) - `(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1)))) - `(helm-source-go-package-godoc-description ((,class (:foreground ,str)))) - `(helm-bookmark-w3m ((,class (:foreground ,type)))) - `(company-echo-common ((,class (:foreground ,bg1 :background ,fg1)))) - `(company-preview ((,class (:background ,bg1 :foreground ,var)))) - `(company-preview-common ((,class (:foreground ,bg2 :foreground ,fg3)))) - `(company-preview-search ((,class (:foreground ,type :background ,bg1)))) - `(company-scrollbar-bg ((,class (:background ,bg3)))) - `(company-scrollbar-fg ((,class (:foreground ,keyword)))) - `(company-tooltip ((,class (:foreground ,fg2 :background ,bg2 :bold t)))) - `(company-tooltop-annotation ((,class (:foreground ,const)))) - `(company-tooltip-common ((,class ( :foreground ,fg3)))) - `(company-tooltip-common-selection ((,class (:foreground ,str)))) - `(company-tooltip-mouse ((,class (:inherit highlight)))) - `(company-tooltip-selection ((,class (:background ,bg3 :foreground ,fg3)))) - `(company-template-field ((,class (:inherit region)))) - `(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face)))) - `(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face)))) - `(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face)))) - `(web-mode-keyword-face ((,class (:foreground ,keyword)))) - `(web-mode-doctype-face ((,class (:inherit ,font-lock-comment-face)))) - `(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face)))) - `(web-mode-string-face ((,class (:foreground ,str)))) - `(web-mode-type-face ((,class (:inherit ,font-lock-type-face)))) - `(web-mode-html-attr-name-face ((,class (:foreground ,func)))) - `(web-mode-html-attr-value-face ((,class (:foreground ,keyword)))) - `(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face)))) - `(web-mode-html-tag-face ((,class (:foreground ,builtin)))) - `(jde-java-font-lock-package-face ((t (:foreground ,var)))) - `(jde-java-font-lock-public-face ((t (:foreground ,keyword)))) - `(jde-java-font-lock-private-face ((t (:foreground ,keyword)))) - `(jde-java-font-lock-constant-face ((t (:foreground ,const)))) - `(jde-java-font-lock-modifier-face ((t (:foreground ,fg2)))) - `(jde-jave-font-lock-protected-face ((t (:foreground ,keyword)))) - `(jde-java-font-lock-number-face ((t (:foreground ,var)))) - `(yas-field-highlight-face ((t (:background ,selection))))) - ;; Legacy - (if (< emacs-major-version 22) - (custom-theme-set-faces - 'tlast - `(show-paren-match-face ((,class (:background ,warning))))) ;; obsoleted in 22.1, removed 2016 - (custom-theme-set-faces - 'tlast - `(show-paren-match ((,class (:foreground ,bg1 :background ,str)))) - `(show-paren-mismatch ((,class (:foreground ,bg1 :background ,warning)))))) - ;; emacs >= 26.1 - (when (>= emacs-major-version 26) - (custom-theme-set-faces - 'tlast - `(line-number ((t (:inherit fringe)))) - `(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold)))))) - - ;; emacs >= 27.1 - (when (>= emacs-major-version 27) - (custom-theme-set-faces - 'tlast - `(tab-line ((,class (:background ,bg2 :foreground ,fg4)))) - `(tab-line-tab ((,class (:inherit tab-line)))) - `(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4)))) - `(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1)))) - `(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2)))))) - (when (>= emacs-major-version 28) - (custom-theme-set-faces - 'tlast - `(line-number ((t (:inherit fringe)))) - `(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold)))))) -;; emacs >= 27.1 -(when (>= emacs-major-version 27) - (custom-theme-set-faces - 'tlast - `(tab-line ((,class (:background ,bg2 :foreground ,fg4)))) - `(tab-line-tab ((,class (:inherit tab-line)))) - `(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4)))) - `(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1)))) - `(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2)))))) - (when (>= emacs-major-version 28) - (custom-theme-set-faces - 'tlast - `(tab-line-tab-modified ((,class (:foreground ,warning2 :weight bold)))))) - (when (boundp 'font-lock-regexp-face) - (custom-theme-set-faces - 'tlast - `(font-lock-regexp-face ((,class (:inherit font-lock-string-face :underline t))))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'tlast) - -;; Local Variables: -;; no-byte-compile: t -;; End: - -;;; tlast-theme.el ends here -- cgit v1.2.3 From 3f3fa5e5c9df7f43507a117b7cdbc2ddabb9d555 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 7 Nov 2023 01:24:40 +0100 Subject: concatenate dir name --- bin/guiscripts/dmfm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/guiscripts/dmfm b/bin/guiscripts/dmfm index d1dd8b8..9485469 100755 --- a/bin/guiscripts/dmfm +++ b/bin/guiscripts/dmfm @@ -2,9 +2,10 @@ while true do + dir="$(printf '%s' "$PWD" | sed "s#^$HOME#\~#;s#\([^/]\)[^/]*/#\1/#g")" file=$(find . -maxdepth 1 -mindepth 1 -not -name '.*' -printf '%y\t%f\n' | sort -k 1 -k 2 | cut -f 2- | - commander -xcd -p "$PWD>") + commander -xc -p "$dir") [ "$file" ] || break [ ! -e "$file" ] && continue -- cgit v1.2.3 From 5ad22dddaf672552cba44932f8d33860456907df Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 7 Nov 2023 01:25:21 +0100 Subject: disabled polyglot temporarily --- config/essentials/nvim/lua/user/packer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua index 8091d85..edb763d 100644 --- a/config/essentials/nvim/lua/user/packer.lua +++ b/config/essentials/nvim/lua/user/packer.lua @@ -42,7 +42,7 @@ return require('packer').startup(function(use) use('ojroques/vim-oscyank', { branch = "main" }) use("potamides/pantran.nvim") use('alx741/vinfo') - use('sheerun/vim-polyglot') + -- use('sheerun/vim-polyglot') TODO: fix error conflicting with telekasten -- use('github/copilot.vim') -- use { -- cgit v1.2.3 From 1f6c2afa699a7c30be8b538c4fa9dc32c61b3dd4 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 7 Nov 2023 01:25:37 +0100 Subject: removed symlinks --- config/wayland/waybar/config.jsonc | 79 +++++++++++++++++++- config/wayland/waybar/style.css | 143 ++++++++++++++++++++++++++++++++++++- 2 files changed, 220 insertions(+), 2 deletions(-) mode change 120000 => 100644 config/wayland/waybar/config.jsonc mode change 120000 => 100644 config/wayland/waybar/style.css diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc deleted file mode 120000 index 1d795fc..0000000 --- a/config/wayland/waybar/config.jsonc +++ /dev/null @@ -1 +0,0 @@ -configs/hyprland.jsonc \ No newline at end of file diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc new file mode 100644 index 0000000..9d60915 --- /dev/null +++ b/config/wayland/waybar/config.jsonc @@ -0,0 +1,78 @@ +{ + "layer": "top", + "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], + "modules-center": ["clock"], + "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], + "mpd": { + "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", + "artist-len": 24, + "format-disconnected": "s", + "format-stopped": "", + "state-icons": { + "playing": "", + "paused": "", + }, + "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", + "on-click": "mpc toggle", + "on-scroll-up": "mpc volume +5", + "on-scroll-down": "mpc volume -5", + }, + "battery": { + "format-charging": " {capacity}%", + "on-click": "mpower", + "interval": 10, + }, + "hyprland/window": { + "format": " {}", + "separate-outputs": true, + }, + "pulseaudio": { + "scroll-step": 1, + "format": "{icon} {volume:3}%", + "format-icons": { + "default": ["", "", ""] + }, + "on-click": "pavucontrol", + }, + "temperature": { + "interval": 3, + "format": "{icon} {temperatureC}°C", + "format-icons": { + "default":["", "", "", "", ""] + }, + }, + "custom/wireguard": { + "exec": "ip addr show dev wg0", + "format": "wg0", + "restart-interval": 3, + }, + "network": { + "format-wifi": " ", + "tooltip-format-wifi": "{ifname} {essid}", + "format-ethernet": "", + "tooltip-format-ethernet": "{ifname} {ipaddr}", + "format-disconnected": "", + }, + "cpu": { + "format": " {usage:2}%", + "interval": 3, + }, + "custom/memory": { + "exec": "free -h | awk '(NR==2){ print $3 }'", + "format": "{}", + "restart-interval": 3, + }, + "clock": { + "format": "{:%R}", + "format-alt": "{:(%T) %A %d %B}", + "interval": 1, + }, + "custom/bluetooth": { + "exec": "bluetoothctl info", + "format": "", + "interval": 3, + }, + "tray": { + "spacing": 5, + } +} diff --git a/config/wayland/waybar/style.css b/config/wayland/waybar/style.css deleted file mode 120000 index 76f49ff..0000000 --- a/config/wayland/waybar/style.css +++ /dev/null @@ -1 +0,0 @@ -styles/nord.css \ No newline at end of file diff --git a/config/wayland/waybar/style.css b/config/wayland/waybar/style.css new file mode 100644 index 0000000..3b7b7f6 --- /dev/null +++ b/config/wayland/waybar/style.css @@ -0,0 +1,142 @@ +/* + ******************************************** + *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* + *░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░* + *░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░* + *░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░* + *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* + ******************************************** + */ +/* https://github.com/jakehamilton/dotfiles */ +/* Amazing I love it :))) */ + +* { + border: none; + border-radius: 0; + font-family: JetBrains Mono; + font-weight: bold; + font-size: 14px; + min-height: 24px; +} + +window#waybar { + background: transparent; +} + +window#waybar.hidden { + opacity: 0.2; +} + +window#waybar.termite #window, +window#waybar.Firefox #window, +window#waybar.Navigator #window, +window#waybar.PCSX2 #window { + color: #2e3440; + background: #e6e6e6; +} + +#mpd, #battery, +#network, #pulseaudio, #temperature, #cpu, #custom-memory { + margin-left: 8px; + padding-left: 16px; + padding-right: 16px; +} + +#workspaces, #mpd, #battery, +#network, #pulseaudio, #temperature, #cpu, #custom-memory, #workspaces, #clock, #tray { + margin-top: 4px; + margin-bottom: 2px; + transition: none; + border-radius: 6px; +} + +#battery { + color: #b48ead; + background: #4c566a; +} + +#workspaces { + margin-left: 12px; + background: #2e3440; +} + +#workspaces button { + transition: none; + color: #d8dee9; + background: transparent; + font-size: 16px; +} + +#workspaces button.active { + color: #a3be8c; + text-shadow: 0px 0px 1px #a3be8c; +} + +#workspaces button:hover { + transition: none; + color: #d08770; +} + +#mpd { + color: #2e3440; + background: #88c0d0; +} + +#mpd.disconnected, +#mpd.stopped { + color: #d8dee9; + background: #2e3440; +} + +#window { + color: #88c0d0; +} + +#network { + color: #2e3440; + background: #5e81ac; +} + +#pulseaudio { + color: #2e3440; + background: #b48ead; +} + +#temperature { + color: #2e3440; + background: #d08770; +} + +#cpu { + color: #2e3440; + background: #ebcb8b; +} + +#custom-memory { + color: #2e3440; + background: #a3be8c; +} + +#clock { + margin-left: 8px; + margin-right: 12px; + padding-left: 16px; + padding-right: 16px; + color: #d8dee9; + background: #2e3440; +} + +#tray { + margin-right: 12px; + color: #d8dee9; + background: transparent; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #bf616a; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} -- cgit v1.2.3 From fed0fd249ef9d2c2a21bb5dfb98ce53b12040354 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 7 Nov 2023 22:38:02 +0100 Subject: added completion system configuration --- config/essentials/zsh/.zshrc | 52 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 76ff87f..45f98e4 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -15,13 +15,61 @@ autoload -U select-word-style autoload -z edit-command-line zle -N edit-command-line zstyle ':compinstall' filename '/home/aluc/.zshrc' + +### Completion +# cache +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path "$ZDOTDIR/zcompcache" + +# completers +zstyle ':completion:*' completer _extensions _complete _approximate + +# format +zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- (%e) -!%f' +zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D%d --%f' +zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f' +zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +# show a 'ls -a' like outptut when listing files +zstyle ':completion:*' file-list all +zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS} + +# Group completions by categories +zstyle ':completion:*' group-name '' +zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands + +zstyle ':completion:*' squeeze-slashes true + +# Prefer completing for an option (think cd -) +zstyle ':completion:*' complete-options true + +# See ZSHCOMPWID "completion matching control" +zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +# keep prefix when completing +zstyle ':completion:*' keep-prefix true + +# ui zstyle ':completion:*' menu select -autoload -Uz compinit +# Move around using h j k l in completion menu +zmodload zsh/complist +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect '^xg' clear-screen +# interactive mode +bindkey -M menuselect '^xi' vi-insert +bindkey -M menuselect '^xh' accept-and-hold # Hold +bindkey -M menuselect '^xn' accept-and-infer-next-history # Next +bindkey -M menuselect '^xu' undo # Undo + +autoload -Uz compinit; compinit + autoload -Uz surround zle -N delete-surround surround zle -N add-surround surround zle -N change-surround surround -compinit # Source files . $ZDOTDIR/functions.zsh -- cgit v1.2.3 From 020cd46cb03e5d7f0bee8cedc6ce0b666aaebe3e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 10 Nov 2023 00:45:19 +0100 Subject: removed approxiamte completer --- config/essentials/zsh/.zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 45f98e4..74bab34 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -22,10 +22,9 @@ zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path "$ZDOTDIR/zcompcache" # completers -zstyle ':completion:*' completer _extensions _complete _approximate +zstyle ':completion:*' completer _extensions _complete # format -zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- (%e) -!%f' zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D%d --%f' zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f' zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f' -- cgit v1.2.3 From 6a3577ba1635dfb6f19b66db9b1b75b06b355699 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 10 Nov 2023 11:36:56 +0100 Subject: added emacs to srcsupd --- config/essentials/zsh/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 10e6c23..2596285 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -180,7 +180,7 @@ alias gdate='date +%y_%m_%d-%T' alias tpid='tail -f /dev/null --pid' alias pwdcp='pwd | clipp' alias gw="grep -ri" -alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} | supd' +alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} ~/.config/emacs | supd' # systemctl aliases alias smc='systemctl' -- cgit v1.2.3 From f1bb5ec20fcc323ec50eff2d726c5027e18589f6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 10 Nov 2023 11:37:58 +0100 Subject: removed completion matching control --- config/essentials/zsh/.zshrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 74bab34..db93ac9 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -42,9 +42,6 @@ zstyle ':completion:*' squeeze-slashes true # Prefer completing for an option (think cd -) zstyle ':completion:*' complete-options true -# See ZSHCOMPWID "completion matching control" -zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' - # keep prefix when completing zstyle ':completion:*' keep-prefix true -- cgit v1.2.3 From 09e3e0945dd31005f10d7cc18ccd5b38fdb58f97 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 10 Nov 2023 11:44:35 +0100 Subject: refactor --- bin/common/targit | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/common/targit b/bin/common/targit index ae046ac..ca560b3 100755 --- a/bin/common/targit +++ b/bin/common/targit @@ -1,6 +1,5 @@ #!/bin/sh -pwd=$(pwd) root="$(git rev-parse --show-toplevel)" cd "$root" || exit 1 -file="$(basename "$root" | sed 's/^\.//').tar.gz" -tar czf "$pwd/$file" $(git ls-files) +file="${root##*/}".tar.gz +tar czf "$file" $(git ls-files) -- cgit v1.2.3 From b28306573004c1538eacc55328e672aa8d101230 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 11 Nov 2023 10:48:37 +0100 Subject: added choosing when no argument provided --- config/essentials/zsh/functions.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 4145813..8d464e3 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -242,7 +242,14 @@ pacsize() mime-default () { + local mime + [ "${mime:=$1}" ] || + mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' | + sed 's/\.desktop$//' | + fzf)" + logn "Setting '$1' as default for its mimetypes" + [ "$mime" ] || exit 1 grep "MimeType=" /usr/share/applications/"$1".desktop | cut -d '=' -f 2- | tr ';' '\0' | xargs -0I{} xdg-mime default "$1".desktop "{}" -- cgit v1.2.3 From 482d9efce8c3cf7139e7bd1fbfcd28595e7827f7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 11:59:36 +0100 Subject: added systemctl enable alias --- config/essentials/zsh/aliases.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 2596285..5de4803 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -191,15 +191,17 @@ alias smcr='systemctl restart' alias smcrl='systemctl reload' alias smcd='systemctl daemon-reload' alias smce='systemctl edit' +alias smcen='systemctl enable' #user alias smcu='systemctl --user' -alias smcus='systemctl status --user' -alias smcust='systemctl start --user' -alias smcuS='systemctl stop --user' -alias smcur='systemctl restart --user' -alias smcurl='systemctl reload --user' -alias smcud='systemctl daemon-reload --user' -alias smcue='systemctl edit --user' +alias smcus='systemctl --user status' +alias smcust='systemctl --user start' +alias smcuS='systemctl --user stop' +alias smcur='systemctl --user restart' +alias smcurl='systemctl --user reload' +alias smcud='systemctl --user daemon-reload' +alias smcue='systemctl --user edit' +alias smcuen='systemctl --user enable' #doas alias dsmc='doas systemctl' alias dsmcs='doas systemctl status' @@ -209,6 +211,7 @@ alias dsmcr='doas systemctl restart' alias dsmcrl='doas systemctl reload' alias dsmcd='doas systemctl daemon-reload' alias dsmce='doas systemctl edit' +alias dsmcen='doas systemctl enable' # virtualbox aliases alias vbm='vboxmanage' -- cgit v1.2.3 From 2f3909181e31fb443c4ad2048a1e886e877e4a5c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 12:30:38 +0100 Subject: put channels in a subfolder --- bin/common/ytclipo | 2 +- config/essentials/zsh/aliases.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 5d86c3f..8997539 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -23,5 +23,5 @@ yt-dlp "$inp" \ -f "b" \ -S "res:1080" \ -P "$HOME/vids/youtube/" \ - -o "%(channel)s - %(title)s.%(ext)s" + -o "%(channel)s/%(title)s.%(ext)s" notify-send "ytclipo" "finished downloading." || : diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 5de4803..a166513 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -282,7 +282,7 @@ alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' alias fzps='fzf --print0 | xargs -0I{}' -alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s - %(title)s.%(ext)s"' +alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' # docker aliases alias dcb='docker build' -- cgit v1.2.3 From cbfda49e578cf18e7f5e605ca5e073fe0a1c0c17 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 17:19:14 +0100 Subject: added appned2mpv --- bin/extra/append2mpv | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bin/extra/append2mpv diff --git a/bin/extra/append2mpv b/bin/extra/append2mpv new file mode 100755 index 0000000..28c3916 --- /dev/null +++ b/bin/extra/append2mpv @@ -0,0 +1,30 @@ +#!/bin/sh +IPC="/tmp/mpvsocket" + +die () { >&2 printf '%s\n' "$@"; exit 1; } +append_to_mpv() +{ + file="$(readlink -f "$1")" + if [ ! -r "$file" ] + then + >&2 printf '%s\n' "'$file' not found" + return + fi + + echo '{ "command": ["loadfile", "'"$file"'", "append"] }' | + socat - "$IPC" +} + +[ -S "$IPC" ] || die "$IPC is not a socket or doesn't exist" +which socat > /dev/null || exit 1 + + +if [ -t 0 ] +then + append_to_mpv "$1" +else + while read -r file + do + append_to_mpv "$file" + done +fi -- cgit v1.2.3 From 2fd5995ff81e0b1792b5eab3a723d7321dec78cb Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 17:19:48 +0100 Subject: added sgimg --- bin/extra/sgimg | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 bin/extra/sgimg diff --git a/bin/extra/sgimg b/bin/extra/sgimg new file mode 100755 index 0000000..7c1823c --- /dev/null +++ b/bin/extra/sgimg @@ -0,0 +1,6 @@ +#!/bin/sh + +imv "$(find ~/.local/share/gurk/ -type f -printf "%A@\t%p\n" | + sort -n | + tail -n 1 | + cut -f 2-)" -- cgit v1.2.3 From 3f704ee3e28f1448bc344400c2c6082157e7ee42 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 17:21:33 +0100 Subject: remove file list all on completion --- config/essentials/zsh/.zshrc | 1 - 1 file changed, 1 deletion(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index db93ac9..1de3e91 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -30,7 +30,6 @@ zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f' zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f' zstyle ':completion:*:default' list-prompt '%S%M matches%s' # show a 'ls -a' like outptut when listing files -zstyle ':completion:*' file-list all zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS} # Group completions by categories -- cgit v1.2.3 From d6d5aa0577e1cdf9ab924b8c3f0241e17831540e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 17:21:59 +0100 Subject: use an intermediate variable --- config/essentials/zsh/functions.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 8d464e3..da8bf12 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -248,11 +248,11 @@ mime-default () sed 's/\.desktop$//' | fzf)" - logn "Setting '$1' as default for its mimetypes" + logn "Setting '$mime' as default for its mimetypes" [ "$mime" ] || exit 1 - grep "MimeType=" /usr/share/applications/"$1".desktop | + grep "MimeType=" /usr/share/applications/"$mime".desktop | cut -d '=' -f 2- | tr ';' '\0' | - xargs -0I{} xdg-mime default "$1".desktop "{}" + xargs -0I{} xdg-mime default "$mime".desktop "{}" logn "Done." } -- cgit v1.2.3 From 846038a503ce1aba291f7cdd3f422ec9a4238afc Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 17:22:25 +0100 Subject: only notification on lolaa --- config/wayland/mako/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/wayland/mako/config b/config/wayland/mako/config index 4380506..06eed6e 100644 --- a/config/wayland/mako/config +++ b/config/wayland/mako/config @@ -24,6 +24,6 @@ default-timeout=0 default-timeout=2000 group-by=category -[app-name=gurk] +[summary=lolaa] # 45887 = 70% on-notify=exec paplay --volume=45887 ~/.local/share/sounds/ring1.ogg -- cgit v1.2.3 From b386965b95808a0ad78e6c1dedaefac4693aaad5 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 17:22:50 +0100 Subject: added ideas vault --- config/essentials/nvim/lua/user/zk.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua index 98476ca..3641025 100644 --- a/config/essentials/nvim/lua/user/zk.lua +++ b/config/essentials/nvim/lua/user/zk.lua @@ -41,6 +41,11 @@ require("telekasten").setup({ media_previewer = "telescope-media-files", follow_url_fallback = nil, vaults = { + Ideas = { + home = home .. "/" .. "Ideas", + template_new_note = home .. "/" .. "templates/new_note.md", + new_note_filename = "title", + }, Driving = { home = home .. "/" .. "Driving", template_new_note = home .. "/" .. "templates/new_note.md", -- cgit v1.2.3 From 45123e1dcd004cb5c312ad329dbbb8537f42f7aa Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 13 Nov 2023 14:07:15 +0100 Subject: config.jsonc --- config/wayland/waybar/config.jsonc | 79 +------------------------------------- 1 file changed, 1 insertion(+), 78 deletions(-) mode change 100644 => 120000 config/wayland/waybar/config.jsonc diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc deleted file mode 100644 index 9d60915..0000000 --- a/config/wayland/waybar/config.jsonc +++ /dev/null @@ -1,78 +0,0 @@ -{ - "layer": "top", - "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], - "modules-center": ["clock"], - "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], - "mpd": { - "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", - "artist-len": 24, - "format-disconnected": "s", - "format-stopped": "", - "state-icons": { - "playing": "", - "paused": "", - }, - "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", - "on-click": "mpc toggle", - "on-scroll-up": "mpc volume +5", - "on-scroll-down": "mpc volume -5", - }, - "battery": { - "format-charging": " {capacity}%", - "on-click": "mpower", - "interval": 10, - }, - "hyprland/window": { - "format": " {}", - "separate-outputs": true, - }, - "pulseaudio": { - "scroll-step": 1, - "format": "{icon} {volume:3}%", - "format-icons": { - "default": ["", "", ""] - }, - "on-click": "pavucontrol", - }, - "temperature": { - "interval": 3, - "format": "{icon} {temperatureC}°C", - "format-icons": { - "default":["", "", "", "", ""] - }, - }, - "custom/wireguard": { - "exec": "ip addr show dev wg0", - "format": "wg0", - "restart-interval": 3, - }, - "network": { - "format-wifi": " ", - "tooltip-format-wifi": "{ifname} {essid}", - "format-ethernet": "", - "tooltip-format-ethernet": "{ifname} {ipaddr}", - "format-disconnected": "", - }, - "cpu": { - "format": " {usage:2}%", - "interval": 3, - }, - "custom/memory": { - "exec": "free -h | awk '(NR==2){ print $3 }'", - "format": "{}", - "restart-interval": 3, - }, - "clock": { - "format": "{:%R}", - "format-alt": "{:(%T) %A %d %B}", - "interval": 1, - }, - "custom/bluetooth": { - "exec": "bluetoothctl info", - "format": "", - "interval": 3, - }, - "tray": { - "spacing": 5, - } -} diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc new file mode 120000 index 0000000..1d795fc --- /dev/null +++ b/config/wayland/waybar/config.jsonc @@ -0,0 +1 @@ +configs/hyprland.jsonc \ No newline at end of file -- cgit v1.2.3 From 5c6e9b64eef36b98f05b85673089c6d8ef6b140d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 14 Nov 2023 12:47:39 +0100 Subject: won two characters of screen! --- config/essentials/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 1de3e91..c590d54 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -153,7 +153,7 @@ command_not_found_handler () { } # prompt -PS1=' %B%(#.%F{1}.%F{13})[%n%b%f@%B%F{6}%m]%b%f %3~ ' +PS1=' %B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~ ' RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)' setopt prompt_subst -- cgit v1.2.3 From e47d5d440679e35c138a93b9543ebf6210d93570 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 15 Nov 2023 01:43:11 +0100 Subject: added gov alias --- config/essentials/zsh/aliases.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index a166513..4c2533f 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -270,6 +270,7 @@ alias cdng='cd /etc/nginx' alias cdrs='cd /srv/' alias cdv='cd ~/vids' alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' +alias gov='go ~/vids d' # fzf aliases alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' -- cgit v1.2.3 From 22b300743769a1f98771d4f63b49937aa32786f9 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 15 Nov 2023 01:43:43 +0100 Subject: added emacs aliases --- config/essentials/zsh/aliases.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 4c2533f..3d23cf4 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -285,6 +285,11 @@ alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed alias fzps='fzf --print0 | xargs -0I{}' alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' +# emacs aliases +alias emacsd='emacs --daemon' +alias emacsdbg='emacs --debug-init' +alias e='emacsclient -c -a "emacs"' + # docker aliases alias dcb='docker build' alias dcbt='docker build -t' -- cgit v1.2.3 From f09beaf5fd4d0d1912e25c7fadeaf2e7bc0d7137 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 15 Nov 2023 01:44:02 +0100 Subject: added to_webm function --- config/essentials/zsh/functions.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index da8bf12..8bf6c43 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -299,3 +299,8 @@ edit_in_dir() { [ -f "$file" ] || return 1 $EDITOR "$file" } + +to_webm() +{ + ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm +} -- cgit v1.2.3 From 6b06b850ff9e7d0e5972c6f9bd592043fe5867f8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 16 Nov 2023 21:47:26 +0100 Subject: open emacs on startup instead of tmux --- config/wayland/dwl/startup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/wayland/dwl/startup.sh b/config/wayland/dwl/startup.sh index 8817ad2..0f482fa 100755 --- a/config/wayland/dwl/startup.sh +++ b/config/wayland/dwl/startup.sh @@ -21,4 +21,5 @@ then fi (tail -f "$WOBCONFIG"/pipe | wob) & -$TERMINAL -e tmux a || $TERMINAL tmux & +# $TERMINAL -e tmux a || $TERMINAL tmux & +emacsclient -c -a 'emacs' & -- cgit v1.2.3 From 1dcdf0cdb769296c33737d285ba9008cff0d60ba Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 16 Nov 2023 21:56:12 +0100 Subject: improved compatibility for different frontends Introduces the use of parameter expansion for converting the link, also convert to youtube.com, because this fixes the bug where you couldn't download playlists/channels. --- bin/common/ytclipo | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 8997539..959ee21 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -11,9 +11,13 @@ fi inp="$1" [ "${inp:=$(paste)}" ] || inp="$(cat /dev/stdin)" -# take last link from clipboard -# works when link is from yt-local -inp="https://youtu.be/$(echo "$inp" | sed 's/.*\(.\{11\}\)$/\1/')" +# remove util scheme +inp="${inp#*//}" +# convert to youtube.com/path url +# works for: +# - 'youtu.be/watch?v=xxxxxx' +# - 'https://piped.video/watch?v=xxxxx' +inp="https://youtube.com/${inp#*/}" >&2 printf "inp: %s\n" "$inp" notify-send "ytclipo" "downloading $inp" || : -- cgit v1.2.3 From b5a47824c6bcdcc131be4b0b38516c2fd4c81838 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 01:10:11 +0100 Subject: removed fzf extension --- config/essentials/nvim/after/plugin/telescope.lua | 12 ++++++------ config/essentials/nvim/lua/user/init.lua | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/essentials/nvim/after/plugin/telescope.lua b/config/essentials/nvim/after/plugin/telescope.lua index 7a2ef34..54e81fd 100644 --- a/config/essentials/nvim/after/plugin/telescope.lua +++ b/config/essentials/nvim/after/plugin/telescope.lua @@ -11,12 +11,12 @@ require('telescope').setup({ dynamic_preview_title = true, }, extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - }, + -- fzf = { + -- fuzzy = true, + -- override_generic_sorter = true, + -- override_file_sorter = true, + -- case_mode = "smart_case", + -- }, media_files = { filetypes = {"png", "webp", "jpg", "jpeg"}, find_cmd = "rg" diff --git a/config/essentials/nvim/lua/user/init.lua b/config/essentials/nvim/lua/user/init.lua index 972cb67..de96b5c 100644 --- a/config/essentials/nvim/lua/user/init.lua +++ b/config/essentials/nvim/lua/user/init.lua @@ -2,7 +2,7 @@ require("user.packer") require("user.remap") require("user.treesitter") require("user.set") -require("user.cmp") +-- require("user.cmp") require("user.zk") require("user.live-server") vim.cmd.source(vim.fn.stdpath("config") .. "/lua/user/aucommands.vim") -- cgit v1.2.3 From 88f2a0e10e4995ff29e760f4751268f8ebc4705d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 01:11:14 +0100 Subject: disabled fzf extension --- config/essentials/nvim/after/plugin/telescope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/config/essentials/nvim/after/plugin/telescope.lua b/config/essentials/nvim/after/plugin/telescope.lua index 54e81fd..32a7fbf 100644 --- a/config/essentials/nvim/after/plugin/telescope.lua +++ b/config/essentials/nvim/after/plugin/telescope.lua @@ -1,3 +1,4 @@ +-- require('telescope').load_extension('fzf') require('telescope').load_extension('media_files') require('telescope').setup({ -- cgit v1.2.3 From 7f2e035fcec31435fb93cd9d8258a6034b8caa7a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 08:16:27 +0100 Subject: added keybind to list chapters --- config/common/mpv/input.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/common/mpv/input.conf b/config/common/mpv/input.conf index dd2674f..7e8c13c 100644 --- a/config/common/mpv/input.conf +++ b/config/common/mpv/input.conf @@ -207,3 +207,5 @@ ctrl+l cycle-values loop-file "inf" "no" # toggle infinite looping # Keep open after exit P cycle keep-open up + +K script-message osc-chapterlist \ No newline at end of file -- cgit v1.2.3 From e3d1c29a87482a323894866999ff094031406e44 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 23:20:36 +0100 Subject: use swapcaps instead of nocaps --- config/X/x11/xinitrc | 2 +- config/wayland/hypr/hyprland.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index beb33f2..2b2d5f1 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -22,7 +22,7 @@ export MENUCMD="dmenu" export IMAGE="feh" xcompmgr & feh --no-fehbg --bg-scale ~/pics/wallpaper -setxkbmap -option ctrl:nocaps +setxkbmap -option ctrl:swapcaps xmodmap -e "keycode 135 = Super_L" xautolock -time 5 -locker slock & gammastep -m randr & diff --git a/config/wayland/hypr/hyprland.conf b/config/wayland/hypr/hyprland.conf index 9eb0549..4278dd6 100644 --- a/config/wayland/hypr/hyprland.conf +++ b/config/wayland/hypr/hyprland.conf @@ -10,7 +10,7 @@ input { kb_layout = us kb_variant = kb_model = - kb_options = ctrl:nocaps + kb_options = ctrl:swapcaps kb_rules = follow_mouse = 2 -- cgit v1.2.3 From 0764ed36dfbd2abd2783e422ef6b097c16584741 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 23:21:16 +0100 Subject: map monitors to workspaces --- config/wayland/hypr/hyprland.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/wayland/hypr/hyprland.conf b/config/wayland/hypr/hyprland.conf index 4278dd6..302ae33 100644 --- a/config/wayland/hypr/hyprland.conf +++ b/config/wayland/hypr/hyprland.conf @@ -93,3 +93,16 @@ windowrulev2 = noanim, class:dmenu layerrule = noanim, launcher source = ./binds.conf + +# Even are for left monitor +workspace = 1,monitor:HDMI-A-4 +workspace = 3,monitor:HDMI-A-4 +workspace = 5,monitor:HDMI-A-4 +workspace = 7,monitor:HDMI-A-4 +workspace = 9,monitor:HDMI-A-4 + +# Odd are for right monitor +workspace = 2,monitor:DP-2 +workspace = 4,monitor:DP-2 +workspace = 6,monitor:DP-2 +workspace = 8,monitor:DP-2 -- cgit v1.2.3 From b11feb1758d79e762a8b86041123459aaa802cda Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 23:21:36 +0100 Subject: added mmpv and mpass-otp --- bin/menuscripts/mmpv | 8 ++++++++ bin/menuscripts/mpass-otp | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100755 bin/menuscripts/mmpv create mode 100755 bin/menuscripts/mpass-otp diff --git a/bin/menuscripts/mmpv b/bin/menuscripts/mmpv new file mode 100755 index 0000000..76c0d6a --- /dev/null +++ b/bin/menuscripts/mmpv @@ -0,0 +1,8 @@ +#!/bin/sh +# Have an mpv instance that works with a socket somewhat globally +socket="/tmp/mpvsocket" +# Start mpv in idle if socket is not getting listened to +nc -zvU "$socket" || setsid mpv --input-ipc-server=/tmp/mpvsocket --idle & +file="$(PLAYER='echo' mmedia video)" +[ "$file" ] || exit 1 +echo '{ "command": ["loadfile", "'"$file"'", "append-play"] }' | nc -U /tmp/mpvsocket diff --git a/bin/menuscripts/mpass-otp b/bin/menuscripts/mpass-otp new file mode 100755 index 0000000..b60f953 --- /dev/null +++ b/bin/menuscripts/mpass-otp @@ -0,0 +1,6 @@ +#!/bin/sh +pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -name "*.gpg" -printf '%f\n' | + sed 's/\.gpg$//' | + commander -c)" +[ "$pass" ] || exit 1 +pass otp -c keys/otp/"$pass" -- cgit v1.2.3 From f4337fb80c21701027ee5ccdc1ac76511479f8ae Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 21 Nov 2023 23:56:10 +0100 Subject: use mmpv instead of mmedia --- config/wayland/hypr/binds.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/wayland/hypr/binds.conf b/config/wayland/hypr/binds.conf index 251ce69..15af7dd 100644 --- a/config/wayland/hypr/binds.conf +++ b/config/wayland/hypr/binds.conf @@ -112,8 +112,8 @@ bind = $mainMod, L, exec, dmlang bind =, L, exec, dmlang bind = $mainMod, S, exec, mmedia schoolpdf bind =, S, exec, mmedia schoolpdf -bind = $mainMod, V, exec, mmedia video -bind =, V, exec, mmedia video +bind = $mainMod, V, exec, mmpv +bind =, V, exec, mmpv bind = $mainMod, U, exec, mmedia cursus bind =, U, exec, mmedia cursus bind = $mainMod, M, exec, mmedia -- cgit v1.2.3 From 1024bf9cb8f38ff9cdd6e58a7614d1de8a5bbb29 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 22 Nov 2023 01:22:59 +0100 Subject: make move command mroe uniform --- bin/guiscripts/torque | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/guiscripts/torque b/bin/guiscripts/torque index 51e2806..8f939e1 100755 --- a/bin/guiscripts/torque +++ b/bin/guiscripts/torque @@ -47,8 +47,8 @@ prompt() { r) read -rp "remove torrent: #"; send -t "$REPLY" -r; k=0 ;; o) read -rp "load magnet: "; send -a "$REPLY"; k=0 ;; m) - read -rp "move torrent: " torrent - read -rp "destination folder: " + read -rp "move torrent: #" torrent + read -rp "destination folder: /downloads/" send -t "$torrent" --move "/downloads/$REPLY" ;; j) ((j==${#t[@]}))||((k=k>=j?k:++k,j=j<${#t[@]}?++j:j)) ;; -- cgit v1.2.3 From 70959f9a31680ed1cfe684e9c5a33098334f2e4d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 24 Nov 2023 10:56:29 +0100 Subject: keep only hyprland config --- config/wayland/waybar/config.jsonc | 79 ++++++++++- config/wayland/waybar/configs/dwm.jsonc | 16 --- config/wayland/waybar/configs/hyprland.jsonc | 78 ---------- config/wayland/waybar/scripts/status.sh | 2 - config/wayland/waybar/styles/base16.css | 181 ------------------------ config/wayland/waybar/styles/colors/colors-nord | 29 ---- config/wayland/waybar/styles/colors/colors.css | 1 - config/wayland/waybar/styles/dwm.css | 20 --- config/wayland/waybar/styles/nord.css | 142 ------------------- 9 files changed, 78 insertions(+), 470 deletions(-) mode change 120000 => 100644 config/wayland/waybar/config.jsonc delete mode 100644 config/wayland/waybar/configs/dwm.jsonc delete mode 100644 config/wayland/waybar/configs/hyprland.jsonc delete mode 100755 config/wayland/waybar/scripts/status.sh delete mode 100644 config/wayland/waybar/styles/base16.css delete mode 100644 config/wayland/waybar/styles/colors/colors-nord delete mode 120000 config/wayland/waybar/styles/colors/colors.css delete mode 100644 config/wayland/waybar/styles/dwm.css delete mode 100644 config/wayland/waybar/styles/nord.css diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc deleted file mode 120000 index 1d795fc..0000000 --- a/config/wayland/waybar/config.jsonc +++ /dev/null @@ -1 +0,0 @@ -configs/hyprland.jsonc \ No newline at end of file diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc new file mode 100644 index 0000000..9d60915 --- /dev/null +++ b/config/wayland/waybar/config.jsonc @@ -0,0 +1,78 @@ +{ + "layer": "top", + "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], + "modules-center": ["clock"], + "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], + "mpd": { + "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", + "artist-len": 24, + "format-disconnected": "s", + "format-stopped": "", + "state-icons": { + "playing": "", + "paused": "", + }, + "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", + "on-click": "mpc toggle", + "on-scroll-up": "mpc volume +5", + "on-scroll-down": "mpc volume -5", + }, + "battery": { + "format-charging": " {capacity}%", + "on-click": "mpower", + "interval": 10, + }, + "hyprland/window": { + "format": " {}", + "separate-outputs": true, + }, + "pulseaudio": { + "scroll-step": 1, + "format": "{icon} {volume:3}%", + "format-icons": { + "default": ["", "", ""] + }, + "on-click": "pavucontrol", + }, + "temperature": { + "interval": 3, + "format": "{icon} {temperatureC}°C", + "format-icons": { + "default":["", "", "", "", ""] + }, + }, + "custom/wireguard": { + "exec": "ip addr show dev wg0", + "format": "wg0", + "restart-interval": 3, + }, + "network": { + "format-wifi": " ", + "tooltip-format-wifi": "{ifname} {essid}", + "format-ethernet": "", + "tooltip-format-ethernet": "{ifname} {ipaddr}", + "format-disconnected": "", + }, + "cpu": { + "format": " {usage:2}%", + "interval": 3, + }, + "custom/memory": { + "exec": "free -h | awk '(NR==2){ print $3 }'", + "format": "{}", + "restart-interval": 3, + }, + "clock": { + "format": "{:%R}", + "format-alt": "{:(%T) %A %d %B}", + "interval": 1, + }, + "custom/bluetooth": { + "exec": "bluetoothctl info", + "format": "", + "interval": 3, + }, + "tray": { + "spacing": 5, + } +} diff --git a/config/wayland/waybar/configs/dwm.jsonc b/config/wayland/waybar/configs/dwm.jsonc deleted file mode 100644 index 211f776..0000000 --- a/config/wayland/waybar/configs/dwm.jsonc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "modules-left": ["hyprland/workspaces", "custom/layout", "hyprland/window"], - "modules-right": ["custom/status"], - "hyprland/window": { - "format": " {} " - }, - "custom/layout": { - "format": " []= ", - "interval": "once", - }, - "custom/status": { - "exec": "~/.config/waybar/scripts/status.sh", - "format": " {} ", - "interval": 1 - } -} diff --git a/config/wayland/waybar/configs/hyprland.jsonc b/config/wayland/waybar/configs/hyprland.jsonc deleted file mode 100644 index 9d60915..0000000 --- a/config/wayland/waybar/configs/hyprland.jsonc +++ /dev/null @@ -1,78 +0,0 @@ -{ - "layer": "top", - "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], - "modules-center": ["clock"], - "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], - "mpd": { - "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", - "artist-len": 24, - "format-disconnected": "s", - "format-stopped": "", - "state-icons": { - "playing": "", - "paused": "", - }, - "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", - "on-click": "mpc toggle", - "on-scroll-up": "mpc volume +5", - "on-scroll-down": "mpc volume -5", - }, - "battery": { - "format-charging": " {capacity}%", - "on-click": "mpower", - "interval": 10, - }, - "hyprland/window": { - "format": " {}", - "separate-outputs": true, - }, - "pulseaudio": { - "scroll-step": 1, - "format": "{icon} {volume:3}%", - "format-icons": { - "default": ["", "", ""] - }, - "on-click": "pavucontrol", - }, - "temperature": { - "interval": 3, - "format": "{icon} {temperatureC}°C", - "format-icons": { - "default":["", "", "", "", ""] - }, - }, - "custom/wireguard": { - "exec": "ip addr show dev wg0", - "format": "wg0", - "restart-interval": 3, - }, - "network": { - "format-wifi": " ", - "tooltip-format-wifi": "{ifname} {essid}", - "format-ethernet": "", - "tooltip-format-ethernet": "{ifname} {ipaddr}", - "format-disconnected": "", - }, - "cpu": { - "format": " {usage:2}%", - "interval": 3, - }, - "custom/memory": { - "exec": "free -h | awk '(NR==2){ print $3 }'", - "format": "{}", - "restart-interval": 3, - }, - "clock": { - "format": "{:%R}", - "format-alt": "{:(%T) %A %d %B}", - "interval": 1, - }, - "custom/bluetooth": { - "exec": "bluetoothctl info", - "format": "", - "interval": 3, - }, - "tray": { - "spacing": 5, - } -} diff --git a/config/wayland/waybar/scripts/status.sh b/config/wayland/waybar/scripts/status.sh deleted file mode 100755 index 3b658e5..0000000 --- a/config/wayland/waybar/scripts/status.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -printf 'Hyprland %s' "$(expac %v hyprland)" diff --git a/config/wayland/waybar/styles/base16.css b/config/wayland/waybar/styles/base16.css deleted file mode 100644 index 639b590..0000000 --- a/config/wayland/waybar/styles/base16.css +++ /dev/null @@ -1,181 +0,0 @@ -/* - ******************************************** - *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* - *░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░* - *░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░* - *░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░* - *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* - ******************************************** - */ -/* https://github.com/jakehamilton/dotfiles */ -/* Amazing I love it :))) */ - -@import "styles/colors/colors.css"; - -* { - border: none; - border-radius: 0; - font-family: monospace; - font-weight: bold; - font-size: 12px; - min-height: 24px; -} - -window#waybar { - background: transparent; -} - -window#waybar.hidden { - opacity: 0.2; -} - -tooltip { - background: @background; - color: @foreground; - border: 2px solid @color0; -} - -window#waybar.termite #window, -window#waybar.Firefox #window, -window#waybar.Navigator #window, -window#waybar.PCSX2 #window { - color: @background; - background: @color7; -} - -.modules-right * { - padding: 0 16px; -} - -.modules-right { - margin-right: 2px; -} -.modules-left { - margin-left: 3px; -} - -#workspaces, #tags, #mpd, #battery, -#clock, -#custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #custom-bluetooth, #tray { - border: solid @background; - border-width: 2px 2px 2px 0; - margin-top: 4px; - margin-bottom: 2px; - transition: none; -} - -#battery { - color: @color6; - background: @background; - border-color: @color4; - border-width: 2px; - padding: 0 12px; - margin-right: 16px; -} - -#workspaces, #tags { - border: solid @background 2px; - background: @color3; -} - -#workspaces button, #tags button { - transition: none; - background: transparent; - color: @background; -} - -#tags button.occupied { - background: @color2; -} - -#workspaces button.active, #tags button.focused { - background-color: @color6; -} - -#workspaces button:hover, #tags button:hover { - transition: none; - color: @color8; -} - -#tags button { - margin: 0; - padding-left: 5px; - padding-right: 5px; -} - -#mpd { - color: @background; - padding: 0 16px; - background: @color6; -} - -#mpd.disconnected, -#mpd.stopped { - color: @foreground; - background: @background; - border-color: @color4; -} - -#clock { - border: solid @color4 2px; - padding: 0 16px; - color: @color3; - background: @background; -} - -#window { - margin-left: 16px; - padding: 0; - color: @color5; -} - -#custom-wireguard { - color: @color5; - border: 2px solid @color8; - background: @background; -} - -#network { - color: @background; - border-left: 2px solid @background; - background: @color5; -} - -#pulseaudio { - color: @background; - background: @color4; -} - -#temperature { - color: @background; - background: @color3; -} - -#cpu { - color: @background; - background: @color4; -} - -#custom-memory { - padding: 0 16px; - color: @background; - background: @color5; -} - -#custom-bluetooth { - color: @color6; - background: @color8; -} - -#tray * { - padding: unset; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: @color1; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} diff --git a/config/wayland/waybar/styles/colors/colors-nord b/config/wayland/waybar/styles/colors/colors-nord deleted file mode 100644 index 9622792..0000000 --- a/config/wayland/waybar/styles/colors/colors-nord +++ /dev/null @@ -1,29 +0,0 @@ -@define-color foreground #d8dee9; -@define-color background #2e3440; - -@define-color color0 #3b4252; -@define-color color1 #bf616a; -@define-color color2 #a3be8c; -@define-color color3 #ebcb8b; -@define-color color4 #81a1c1; -@define-color color5 #b48ead; -@define-color color6 #88c0d0; -@define-color color7 #e5e9f0; - -@define-color color8 #4c566a; -@define-color color9 #bf616a; -@define-color color10 #a3be8c; -@define-color color11 #ebcb8b; -@define-color color12 #81a1c1; -@define-color color13 #b48ead; -@define-color color14 #d08770; -@define-color color15 #eceff4; - -@define-color color16 #373e4d; -@define-color color17 #94545d; -@define-color color18 #809575; -@define-color color19 #b29e75; -@define-color color20 #68809a; -@define-color color21 #8c738c; -@define-color color22 #6d96a5; -@define-color color23 #aeb3bb; diff --git a/config/wayland/waybar/styles/colors/colors.css b/config/wayland/waybar/styles/colors/colors.css deleted file mode 120000 index 801cf92..0000000 --- a/config/wayland/waybar/styles/colors/colors.css +++ /dev/null @@ -1 +0,0 @@ -colors-nord \ No newline at end of file diff --git a/config/wayland/waybar/styles/dwm.css b/config/wayland/waybar/styles/dwm.css deleted file mode 100644 index 31eacf0..0000000 --- a/config/wayland/waybar/styles/dwm.css +++ /dev/null @@ -1,20 +0,0 @@ -* { - border: none; - border-radius: 0; - font-family: monospace; - font-size: 14px; - min-height: 16px; -} - -window#waybar, #workspaces button.active { - background-color: #4c566a; -} - -#workspaces button, #custom-layout, #custom-status { - background-color: #2e3440; -} - -#workspaces button { - padding: 0 2px; - margin: 0; -} diff --git a/config/wayland/waybar/styles/nord.css b/config/wayland/waybar/styles/nord.css deleted file mode 100644 index 3b7b7f6..0000000 --- a/config/wayland/waybar/styles/nord.css +++ /dev/null @@ -1,142 +0,0 @@ -/* - ******************************************** - *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* - *░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░* - *░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░* - *░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░* - *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* - ******************************************** - */ -/* https://github.com/jakehamilton/dotfiles */ -/* Amazing I love it :))) */ - -* { - border: none; - border-radius: 0; - font-family: JetBrains Mono; - font-weight: bold; - font-size: 14px; - min-height: 24px; -} - -window#waybar { - background: transparent; -} - -window#waybar.hidden { - opacity: 0.2; -} - -window#waybar.termite #window, -window#waybar.Firefox #window, -window#waybar.Navigator #window, -window#waybar.PCSX2 #window { - color: #2e3440; - background: #e6e6e6; -} - -#mpd, #battery, -#network, #pulseaudio, #temperature, #cpu, #custom-memory { - margin-left: 8px; - padding-left: 16px; - padding-right: 16px; -} - -#workspaces, #mpd, #battery, -#network, #pulseaudio, #temperature, #cpu, #custom-memory, #workspaces, #clock, #tray { - margin-top: 4px; - margin-bottom: 2px; - transition: none; - border-radius: 6px; -} - -#battery { - color: #b48ead; - background: #4c566a; -} - -#workspaces { - margin-left: 12px; - background: #2e3440; -} - -#workspaces button { - transition: none; - color: #d8dee9; - background: transparent; - font-size: 16px; -} - -#workspaces button.active { - color: #a3be8c; - text-shadow: 0px 0px 1px #a3be8c; -} - -#workspaces button:hover { - transition: none; - color: #d08770; -} - -#mpd { - color: #2e3440; - background: #88c0d0; -} - -#mpd.disconnected, -#mpd.stopped { - color: #d8dee9; - background: #2e3440; -} - -#window { - color: #88c0d0; -} - -#network { - color: #2e3440; - background: #5e81ac; -} - -#pulseaudio { - color: #2e3440; - background: #b48ead; -} - -#temperature { - color: #2e3440; - background: #d08770; -} - -#cpu { - color: #2e3440; - background: #ebcb8b; -} - -#custom-memory { - color: #2e3440; - background: #a3be8c; -} - -#clock { - margin-left: 8px; - margin-right: 12px; - padding-left: 16px; - padding-right: 16px; - color: #d8dee9; - background: #2e3440; -} - -#tray { - margin-right: 12px; - color: #d8dee9; - background: transparent; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #bf616a; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} -- cgit v1.2.3 From 78d0fc01dfea453d1c23649f6353bd4ee5a8f2a1 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 24 Nov 2023 10:57:52 +0100 Subject: udpated gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11392b4..6f3df81 100644 --- a/.gitignore +++ b/.gitignore @@ -5,11 +5,12 @@ config/common/mpd/pid config/common/mpv/playfile.txt config/common/mpv/watch_later/* config/essentials/gnupg/* +config/essentials/nvim/lazy-lock.json config/essentials/nvim/lua/.luarc.json config/essentials/nvim/plugin/ config/essentials/nvim/spell/ -config/essentials/zsh/.zcompdump config/essentials/zsh/histfile +config/essentials/zsh/zcompcache/ config/extra/jftui/settings config/extra/jftui/watch_later/* config/extra/mutt/muttrc -- cgit v1.2.3 From c637bf905bdaa5b3310f1eb293f40d785164fc3c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 26 Nov 2023 12:51:13 +0100 Subject: changed waybar theme to dwm --- config/wayland/waybar/config.jsonc | 82 +++------------------- config/wayland/waybar/status.sh | 2 + config/wayland/waybar/style.css | 138 +++---------------------------------- 3 files changed, 20 insertions(+), 202 deletions(-) create mode 100755 config/wayland/waybar/status.sh diff --git a/config/wayland/waybar/config.jsonc b/config/wayland/waybar/config.jsonc index 9d60915..aa93297 100644 --- a/config/wayland/waybar/config.jsonc +++ b/config/wayland/waybar/config.jsonc @@ -1,78 +1,16 @@ { - "layer": "top", - "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], - "modules-center": ["clock"], - "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], - "mpd": { - "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", - "artist-len": 24, - "format-disconnected": "s", - "format-stopped": "", - "state-icons": { - "playing": "", - "paused": "", - }, - "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", - "on-click": "mpc toggle", - "on-scroll-up": "mpc volume +5", - "on-scroll-down": "mpc volume -5", - }, - "battery": { - "format-charging": " {capacity}%", - "on-click": "mpower", - "interval": 10, - }, + "modules-left": ["hyprland/workspaces", "custom/layout", "hyprland/window"], + "modules-right": ["custom/status"], "hyprland/window": { - "format": " {}", - "separate-outputs": true, - }, - "pulseaudio": { - "scroll-step": 1, - "format": "{icon} {volume:3}%", - "format-icons": { - "default": ["", "", ""] - }, - "on-click": "pavucontrol", - }, - "temperature": { - "interval": 3, - "format": "{icon} {temperatureC}°C", - "format-icons": { - "default":["", "", "", "", ""] - }, - }, - "custom/wireguard": { - "exec": "ip addr show dev wg0", - "format": "wg0", - "restart-interval": 3, - }, - "network": { - "format-wifi": " ", - "tooltip-format-wifi": "{ifname} {essid}", - "format-ethernet": "", - "tooltip-format-ethernet": "{ifname} {ipaddr}", - "format-disconnected": "", - }, - "cpu": { - "format": " {usage:2}%", - "interval": 3, - }, - "custom/memory": { - "exec": "free -h | awk '(NR==2){ print $3 }'", - "format": "{}", - "restart-interval": 3, - }, - "clock": { - "format": "{:%R}", - "format-alt": "{:(%T) %A %d %B}", - "interval": 1, + "format": " {} " }, - "custom/bluetooth": { - "exec": "bluetoothctl info", - "format": "", - "interval": 3, + "custom/layout": { + "format": " []= ", + "interval": "once", }, - "tray": { - "spacing": 5, + "custom/status": { + "exec": "~/.config/waybar/status.sh", + "format": " {} ", + "interval": 1 } } diff --git a/config/wayland/waybar/status.sh b/config/wayland/waybar/status.sh new file mode 100755 index 0000000..6d5bd66 --- /dev/null +++ b/config/wayland/waybar/status.sh @@ -0,0 +1,2 @@ +#!/bin/sh +printf '%s' "$(date '+%-d %b %R')" diff --git a/config/wayland/waybar/style.css b/config/wayland/waybar/style.css index 3b7b7f6..31eacf0 100644 --- a/config/wayland/waybar/style.css +++ b/config/wayland/waybar/style.css @@ -1,142 +1,20 @@ -/* - ******************************************** - *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* - *░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░* - *░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░* - *░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░* - *░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░* - ******************************************** - */ -/* https://github.com/jakehamilton/dotfiles */ -/* Amazing I love it :))) */ - * { border: none; border-radius: 0; - font-family: JetBrains Mono; - font-weight: bold; + font-family: monospace; font-size: 14px; - min-height: 24px; -} - -window#waybar { - background: transparent; -} - -window#waybar.hidden { - opacity: 0.2; -} - -window#waybar.termite #window, -window#waybar.Firefox #window, -window#waybar.Navigator #window, -window#waybar.PCSX2 #window { - color: #2e3440; - background: #e6e6e6; -} - -#mpd, #battery, -#network, #pulseaudio, #temperature, #cpu, #custom-memory { - margin-left: 8px; - padding-left: 16px; - padding-right: 16px; -} - -#workspaces, #mpd, #battery, -#network, #pulseaudio, #temperature, #cpu, #custom-memory, #workspaces, #clock, #tray { - margin-top: 4px; - margin-bottom: 2px; - transition: none; - border-radius: 6px; + min-height: 16px; } -#battery { - color: #b48ead; - background: #4c566a; +window#waybar, #workspaces button.active { + background-color: #4c566a; } -#workspaces { - margin-left: 12px; - background: #2e3440; +#workspaces button, #custom-layout, #custom-status { + background-color: #2e3440; } #workspaces button { - transition: none; - color: #d8dee9; - background: transparent; - font-size: 16px; -} - -#workspaces button.active { - color: #a3be8c; - text-shadow: 0px 0px 1px #a3be8c; -} - -#workspaces button:hover { - transition: none; - color: #d08770; -} - -#mpd { - color: #2e3440; - background: #88c0d0; -} - -#mpd.disconnected, -#mpd.stopped { - color: #d8dee9; - background: #2e3440; -} - -#window { - color: #88c0d0; -} - -#network { - color: #2e3440; - background: #5e81ac; -} - -#pulseaudio { - color: #2e3440; - background: #b48ead; -} - -#temperature { - color: #2e3440; - background: #d08770; -} - -#cpu { - color: #2e3440; - background: #ebcb8b; -} - -#custom-memory { - color: #2e3440; - background: #a3be8c; -} - -#clock { - margin-left: 8px; - margin-right: 12px; - padding-left: 16px; - padding-right: 16px; - color: #d8dee9; - background: #2e3440; -} - -#tray { - margin-right: 12px; - color: #d8dee9; - background: transparent; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #bf616a; -} - -#tray > .passive { - -gtk-icon-effect: dim; + padding: 0 2px; + margin: 0; } -- cgit v1.2.3 From 78bced8de90cc65b897f7f9b7c7987bddc87f51c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 26 Nov 2023 12:54:31 +0100 Subject: use nvf from anywhere --- config/essentials/zsh/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 8bf6c43..98cca08 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -14,7 +14,7 @@ nvf() { if test ! -f "$match" then logn "resetting cache..." - match="$(goo | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)" + match="$(goo f "$HOME" | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)" # # Alternative: # match="$(goo | grep -m 1 "$1" 2> /dev/null | tee -a | "$cache")" fi -- cgit v1.2.3 From c4891479907e73bd667cd855c52a70f9acf7dc00 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 26 Nov 2023 12:55:25 +0100 Subject: changed hyprland to a more minimal config --- config/wayland/hypr/hyprland.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/wayland/hypr/hyprland.conf b/config/wayland/hypr/hyprland.conf index 302ae33..eb232c9 100644 --- a/config/wayland/hypr/hyprland.conf +++ b/config/wayland/hypr/hyprland.conf @@ -23,8 +23,8 @@ input { } general { - gaps_in = 1 - gaps_out = 3 + gaps_in = 0 + gaps_out = 0 border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) @@ -46,20 +46,20 @@ decoration { enabled = 1 size = 6 } - dim_inactive = true + dim_inactive = false dim_strength = 0.08 - active_opacity = 0.98 - inactive_opacity = 0.92 + active_opacity = 1.00 + inactive_opacity = 0.97 - drop_shadow = yes + drop_shadow = no shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { - enabled = yes + enabled = no bezier = myBezier, 0.05, 0.9, 0.1, 1.05 -- cgit v1.2.3 From f989900f49b186154db323797f8636d44f7d8c1f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 27 Nov 2023 23:46:10 +0100 Subject: added notification --- bin/menuscripts/mpass-otp | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/menuscripts/mpass-otp b/bin/menuscripts/mpass-otp index b60f953..e771f9f 100755 --- a/bin/menuscripts/mpass-otp +++ b/bin/menuscripts/mpass-otp @@ -4,3 +4,4 @@ pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -name "*.gpg" -printf '%f\n' | commander -c)" [ "$pass" ] || exit 1 pass otp -c keys/otp/"$pass" +notify-send -t 1000 "mpass" "copied $pass" -- cgit v1.2.3 From cd812215aa953ed95f14827eb420bdc654e71aa7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 27 Nov 2023 23:46:29 +0100 Subject: use fzf option instead of command --- config/essentials/zsh/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 3d23cf4..9c8f7f6 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -279,7 +279,7 @@ alias scr='edit_in_dir ~/proj/personal/scripts/' alias fil='edit_in_dir ~/docs/filios/' alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' alias asf='alias | fzf' -alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" +alias fzh="fzf --tac < $HISTFILE | tee /dev/stderr | clipp" alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' alias fzps='fzf --print0 | xargs -0I{}' -- cgit v1.2.3 From bd9fcf134b2140bbeeeaeedcf12aace729072197 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 5 Dec 2023 02:36:42 +0100 Subject: added getdisplays --- bin/guiscripts/getdisplays | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/guiscripts/getdisplays diff --git a/bin/guiscripts/getdisplays b/bin/guiscripts/getdisplays new file mode 100755 index 0000000..8712b30 --- /dev/null +++ b/bin/guiscripts/getdisplays @@ -0,0 +1,3 @@ +#!/bin/sh +grep -l '^connected$' /sys/class/drm/*/status | + sed 's@^/sys/class/drm/[^-]*-\(.*\)/status$@\1@' -- cgit v1.2.3 From 1c104322b6b682debfbcda8b1b84e3abb085048a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 5 Dec 2023 02:40:36 +0100 Subject: set searchengine to default --- config/extra/tridactyl/tridactylrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc index 977578b..1a96af5 100644 --- a/config/extra/tridactyl/tridactylrc +++ b/config/extra/tridactyl/tridactylrc @@ -1,5 +1,5 @@ set newtab http://localhost:28669 -set searchengine duckduckgo +set searchengine "" " Searchurls set searchurls.1x https://www.1377x.to/search/%s/1 -- cgit v1.2.3 From 4fed98c4cb8fc44867bb663ad060ccf426ab4c07 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 7 Dec 2023 23:48:00 +0100 Subject: cleanup --- bin/guiscripts/startdwl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/guiscripts/startdwl b/bin/guiscripts/startdwl index bb5fec0..039f506 100755 --- a/bin/guiscripts/startdwl +++ b/bin/guiscripts/startdwl @@ -39,6 +39,7 @@ export IMAGE="imv" # env = __GLX_VENDOR_LIBRARY_NAME,nvidia # env = WLR_NO_HARDWARE_CURSORS,1 -while true; -do dwl -s "$HOME"/.config/dwl/startup.sh +while true +do + dwl -s "$HOME"/.config/dwl/startup.sh done -- cgit v1.2.3 From aa203d82a7711650e48d297f65fe792b7314c534 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 7 Dec 2023 23:48:29 +0100 Subject: use emacs as EDITOR --- config/home/.zshenv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/home/.zshenv b/config/home/.zshenv index cfaef9c..d33fbd7 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -1,6 +1,6 @@ #!/bin/zsh -export EDITOR="nvim" -export VISUAL="nvim" +export EDITOR="emacsclient -t" +export VISUAL="emacsclient -t -c -a emacs" export BROWSER="librewolf" export VIEWER="zathura" -- cgit v1.2.3 From f4dc6e9489bd1274cba77aec04343dbec72f4a7d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 7 Dec 2023 23:48:41 +0100 Subject: use emacs as vi --- config/essentials/zsh/aliases.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 9c8f7f6..a7e14fb 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -1,6 +1,9 @@ #!/bin/zsh # s/alias \([^-]\)/alias -g \1 +# The most important one +alias vi='emacsclient -nw' + # Zsh specific aliases if [ $SHELL = "/bin/zsh" ] then -- cgit v1.2.3 From e2ee726c851eadeac489b3288f775af234ba4a7a Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 10 Dec 2023 15:23:29 +0100 Subject: fixed: only find images --- bin/extra/sgimg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/extra/sgimg b/bin/extra/sgimg index 7c1823c..acb8126 100755 --- a/bin/extra/sgimg +++ b/bin/extra/sgimg @@ -1,6 +1,6 @@ #!/bin/sh -imv "$(find ~/.local/share/gurk/ -type f -printf "%A@\t%p\n" | +imv "$(find ~/.local/share/gurk/ -type f \( -iname '*.png' -o -iname '*.jpg' \) -printf "%A@\t%p\n" | sort -n | tail -n 1 | cut -f 2-)" -- cgit v1.2.3 From a365e6c8dc75825c993f0bc7b14734032e57096e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 11 Dec 2023 21:50:05 +0100 Subject: Show select tag menu as home, and return to it from selected tag view --- config/common/newsboat/config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/common/newsboat/config b/config/common/newsboat/config index 5f93d68..88ec7ad 100644 --- a/config/common/newsboat/config +++ b/config/common/newsboat/config @@ -18,15 +18,19 @@ highlight article "\\[[0-9]+\\]" color10 default bold highlight article "\\[image\\ [0-9]+\\]" color10 default bold highlight feedlist "^─.*$" color6 color0 bold -bind-key j next all -bind-key k prev all +bind-key j next +bind-key k prev bind-key h quit +bind-key h set-tag feedlist # return back to tags from 'selected tag' view bind-key l open bind-key g home bind-key G end bind-key U show-urls bind-key a toggle-article-read +# Set home to tags +run-on-startup set-tag + show-keymap-hint no swap-title-and-hints yes -- cgit v1.2.3 From 94c9b362faa414e7068f60184e3d01a47b96b823 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:10:31 +0100 Subject: added handling file:// scheme --- bin/guiscripts/linkhandler | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/guiscripts/linkhandler b/bin/guiscripts/linkhandler index aeec202..fb5a3ea 100755 --- a/bin/guiscripts/linkhandler +++ b/bin/guiscripts/linkhandler @@ -11,6 +11,12 @@ test -z "${url:=$1}" && dunstify "linkhandler" "handling $url" case "$url" in + file://*) file="${url##file:/}" + case "$(file -bi "$file" | cut -f1 -d'/')" in + audio|video) mpv "$file" ;; + image) imv "$file" ;; + *) xdg-open "$file" ;; + esac ;; *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtube.com/shorts*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*) setsid -f mpv --quiet --ytdl --ytdl-raw-options="format-sort=res:720" "$url" > /dev/null 2>&1 ;; *png|*jpg|*jpe|*jpeg|*gif) -- cgit v1.2.3 From e04eb710bbd01c0f6f486c037815687081c21d4b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:12:10 +0100 Subject: added ytlink --- bin/common/ytclipo | 19 +------------------ bin/common/ytlink | 14 ++++++++++++++ config/essentials/zsh/aliases.sh | 1 + 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100755 bin/common/ytlink diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 959ee21..1a82df2 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -1,23 +1,6 @@ #!/bin/sh -# argument ($1) -> clipboard -> stdin -if [ "$WAYLAND_DISPLAY" ] -then paste() { wl-paste; } -elif [ "$TERMUX_VERSION" ] -then paste() { termux-clipboard-get; } -else paste() { xclip -o -sel c; } -fi - -inp="$1" -[ "${inp:=$(paste)}" ] || inp="$(cat /dev/stdin)" - -# remove util scheme -inp="${inp#*//}" -# convert to youtube.com/path url -# works for: -# - 'youtu.be/watch?v=xxxxxx' -# - 'https://piped.video/watch?v=xxxxx' -inp="https://youtube.com/${inp#*/}" +inp="$(ytlink)" >&2 printf "inp: %s\n" "$inp" notify-send "ytclipo" "downloading $inp" || : diff --git a/bin/common/ytlink b/bin/common/ytlink new file mode 100755 index 0000000..a5e9bf0 --- /dev/null +++ b/bin/common/ytlink @@ -0,0 +1,14 @@ +#!/bin/sh + +# convert to youtube.com/path url +# works for: +# - 'youtu.be/watch?v=xxxxxx' +# - 'https://piped.video/watch?v=xxxxx' + +inp="$1" +[ "${inp:=$(clipo)}" ] || inp="$(cat /dev/stdin)" + +# remove util scheme +inp="${inp#*//}" +inp="https://youtube.com/${inp#*/}" +printf "%s" "$inp" diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 9c8f7f6..ee7dfd8 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -284,6 +284,7 @@ alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl cl alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' alias fzps='fzf --print0 | xargs -0I{}' alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' +alias ytplay='mpv "$(ytlink)"' # emacs aliases alias emacsd='emacs --daemon' -- cgit v1.2.3 From 445de8fd7e76c986f796774179d3adb6721f2acf Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:12:17 +0100 Subject: use sh for aliases --- config/essentials/zsh/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index ee7dfd8..45d15e7 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/bin/sh # s/alias \([^-]\)/alias -g \1 # Zsh specific aliases -- cgit v1.2.3 From 9dbc981d781dac4ddd96e50f598fb0a267e8a299 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:13:46 +0100 Subject: renamed functions.zsh --- config/essentials/zsh/.zshrc | 2 +- config/essentials/zsh/functions.sh | 306 ++++++++++++++++++++++++++++++++++++ config/essentials/zsh/functions.zsh | 306 ------------------------------------ 3 files changed, 307 insertions(+), 307 deletions(-) create mode 100644 config/essentials/zsh/functions.sh delete mode 100644 config/essentials/zsh/functions.zsh diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index c590d54..7b1f7a0 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -67,7 +67,7 @@ zle -N add-surround surround zle -N change-surround surround # Source files -. $ZDOTDIR/functions.zsh +. $ZDOTDIR/functions.sh . $ZDOTDIR/aliases.sh for file in /{etc,usr/lib}/os-release diff --git a/config/essentials/zsh/functions.sh b/config/essentials/zsh/functions.sh new file mode 100644 index 0000000..b285e05 --- /dev/null +++ b/config/essentials/zsh/functions.sh @@ -0,0 +1,306 @@ +#!/bin/sh + +log() { >&2 printf '%s' "$@"; } +logn() { >&2 printf '%s\n' "$@"; } + +vmp() { + col -b | \ + vim -MR \ + -c 'set ft=man nolist nonu nornu' +} +nvf() { + cache="$HOME/.cache/nvf" + match="$(grep -m1 "$1$" "$cache" 2> /dev/null)" + if test ! -f "$match" + then + logn "resetting cache..." + match="$(goo f "$HOME" | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)" + # # Alternative: + # match="$(goo | grep -m 1 "$1" 2> /dev/null | tee -a | "$cache")" + fi + if test -f "$match" + then + $EDITOR "$match" && return + else + logn "no match." && return 1 + fi +} + +nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit; } +ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit; } + +# googoo aliases +_googoo_fzf_opt() +{ + unset dest opt + if [ "$1" ] + then + [ -d "$1" ] && dest="$1" || opt="-q $1" + fi +} +o() +{ + _googoo_fzf_opt "$1" + f="$(goo f "$dest" | fzf $opt)" + test "$1" && shift + test -f "$f" && $EDITOR $@ "$f" +} +go() +{ + _googoo_fzf_opt "$1" + cd "$(goo d "$dest" | fzf $opt)" +} +ogo() +{ + _googoo_fzf_opt "$1" + cd "$(dirname "$(goo f "$dest" | fzf $opt)")" +} + +# Onelineres +awnk() { awk "{print \$$1}"; } +vimh() { vi -c "help $1" -c 'call feedkeys("\o")'; } +dgo() { cd "$(goo d ~ | fzf --filter "$@" | head -n 1)"; } +open() { $EDITOR "$(goo f ~ | fzf --filter "$@" | head -n 1)"; } +pkbs() { doas pacman -Sy "$(pkgfile -b "$1" | tee /dev/stderr)"; } +oclip() { printf "\033]52;c;$(printf '%s' "$@" | base64)\a"; } +sms() { ssh -t phone sendmsg "$1" "'$2'"; } +trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; } +rln() { ln -s "$(readlink -f "$1")" "$2"; } +getgit() { git clone git@db:"$1"; } + +ipc() +{ + if [ "$(ip link show eno1 | awk -F, 'NR=1 {print $3}')" = "UP" ] + then + doas ip link set eno1 down + else + doas ip link set eno1 up + fi +} + +psgrep() +{ + [ $# -eq 0 ] && return 1 + pgrep "$@" | xargs ps +} + +unique() { + f="$(mktemp)" + awk '!x[$0]++' "$1" > "$f" + mv "$f" "$1" +} + +clip() { + if [ "$WAYLAND_DISPLAY" ] + then + echo -n "$@" | wl-copy + else + echo -n "$@" | xclip -selection clipboard -rmlastnl + fi +} + +unzipp() { + unzip -- "$(readlink -f -- "$1")" || return 1 + rm -- "$1" +} + +# fix long waiting time +__git_files() { + _wanted files expl 'local files' _files +} + +esc() { + $EDITOR "$(which $1)" +} + +delfile() { + curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}" +} +upfile() { + curl -F "file=@\"$1\"" ${2:-https://0x0.st} +} + +# git +sgd() { + d="$PWD" + find $HOME/src -maxdepth 1 -mindepth 1 -type d | + while read -r dir + do + cd "$dir" + git status > /dev/null 2>&1 || continue + git fetch > /dev/null 2>&1 + printf "$PWD" + test "$(git status --short 2>/dev/null | grep -v "??" | head -1)" && + printf " \e[1;31m*changes\e[0m" | sed "s#$HOME#~#" >&2 + test "$(parse_git_remote)" && + printf " \e[0;32m*push/pull\e[0m" | sed "s#$HOME#~#" >&2 + printf "\n" + done + cd "$d" + unset d +} + +ginit() +{ + [ "$1" ] || return 1 + ssh db /var/git/initdir.sh "$1" + git remote add origin git@db:"$1.git" + git push --set-upstream origin $(git_current_branch) +} + +# Returns current branch +git_current_branch() +{ + command git rev-parse --git-dir > /dev/null 2>&1 || return + git branch --show-current +} + +# Check if main exists and use instead of master +git_main_branch() +{ + command git rev-parse --git-dir > /dev/null 2>&1 || return + for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default} + do + if command git show-ref -q --verify $ref; then + echo ${ref:t} + return + fi + done + echo master +} + +# Check for develop and similarly named branches +function git_develop_branch() { + command git rev-parse --git-dir > /dev/null 2>&1 || return + for branch in dev devel development + do + if command git show-ref -q --verify refs/heads/$branch + then + echo $branch + return + fi + done + echo develop +} + +# gpg backup +gpg_backup() +{ + # $1: option + # $2: output file (without .asc) + gpg_command() {gpg "$1" --armor > "$2".asc ; } + gpg_command --export-secret-keys "private" + gpg_command --export "public" + gpg_command --export-ownertrust "trust" + tar -czvf gpg_backup.tar.gz public.asc private.asc trust.asc + shred -uz public.asc private.asc trust.asc +} + +gpg_import() +{ + tar xf $1 + shred -uz $1 + gpg --import public.asc + gpg --import-ownertrust trust.asc + gpg --import private.asc + shred -uz public.asc private.asc trust.asc +} + +ngenable() +{ + ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/ +} + +vbsr() +{ + vboxmanage snapshot "$1" restore "$2" && + vboxmanage startvm "$1" || + vboxmanage controlvm "$1" poweroff +} +vbsrr() +{ + vbsr "$1" "$2" + sleep 3 + vbsr "$1" "$2" +} +vbst() +{ + vboxmanage snapshot "$1" take "$2" +} + +pacsize() +{ + if test -n "$1"; then + packages="$@" + elif test ! -t 0; then + packages="$(cat)" + else + echo "No data provided..." + return 1 + fi + echo $packages | + expac '%m %n' - | + numfmt --to=iec-i --suffix=B --format="%.2f" +} + +mime-default () +{ + [ "${mime:=$1}" ] || + mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' | + sed 's/\.desktop$//' | + fzf)" + + logn "Setting '$mime' as default for its mimetypes" + [ "$mime" ] || exit 1 + grep "MimeType=" /usr/share/applications/"$mime".desktop | + cut -d '=' -f 2- | tr ';' '\0' | + xargs -0I{} xdg-mime default "$mime".desktop "{}" + logn "Done." +} + +addedkeys() { + find ~/.ssh -iname "*.pub" | while read key + do + fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)" + if ssh-add -l | grep -q "$fingerprint" + then + echo "$key" + fi + done | sed "s,$HOME/.ssh/,," +} + +fpass() { + find $HOME/.password-store -type f -not -path ".git" | + grep "\.gpg$" | + sed "s,$HOME/.password-store/,,;s,\.gpg$,," | + fzf | + xargs pass show -c +} + +muttmail() +{ + config="$HOME/.config/mutt" + mail="$(find "$config"/configs -type f -printf '%f\n' | fzf)" + [ "$mail" ] || return 1 + ln -sf "$config/configs/$mail" "$config"/muttrc + mutt +} + +resize() +{ + test $# -lt 2 && + printf "usage: %s [out]\n" "$0" >&2 && + return 1 + convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}" +} + +edit_in_dir() { + file="$1/$(goo f "$1" | sed "s@^$1@@" | fzf)" + [ -f "$file" ] || return 1 + $EDITOR "$file" +} + +to_webm() +{ + ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm +} diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh deleted file mode 100644 index 98cca08..0000000 --- a/config/essentials/zsh/functions.zsh +++ /dev/null @@ -1,306 +0,0 @@ -#!/bin/zsh - -log() { >&2 printf '%s' "$@"; } -logn() { >&2 printf '%s\n' "$@"; } - -vmp() { - col -b | \ - vim -MR \ - -c 'set ft=man nolist nonu nornu' -} -nvf() { - local cache="$HOME/.cache/nvf" - local match="$(grep -m1 "$1$" "$cache" 2> /dev/null)" - if test ! -f "$match" - then - logn "resetting cache..." - match="$(goo f "$HOME" | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)" - # # Alternative: - # match="$(goo | grep -m 1 "$1" 2> /dev/null | tee -a | "$cache")" - fi - if test -f "$match" - then - $EDITOR "$match" && return - else - logn "no match." && return 1 - fi -} - -nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit } -ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit } - -# googoo aliases -_googoo_fzf_opt() -{ - unset dest opt - if [ "$1" ] - then - [ -d "$1" ] && dest="$1" || opt="-q $1" - fi -} -o() -{ - _googoo_fzf_opt "$1" - f="$(goo f "$dest" | fzf $opt)" - test "$1" && shift - test -f "$f" && $EDITOR $@ "$f" -} -go() -{ - _googoo_fzf_opt "$1" - cd "$(goo d "$dest" | fzf $opt)" -} -ogo() -{ - _googoo_fzf_opt "$1" - cd "$(dirname "$(goo f "$dest" | fzf $opt)")" -} - -# Onelineres -awnk() { awk "{print \$$1}"; } -vimh() { vi -c "help $1" -c 'call feedkeys("\o")'; } -dgo() { cd "$(goo d ~ | fzf --filter "$@" | head -n 1)"; } -open() { $EDITOR "$(goo f ~ | fzf --filter "$@" | head -n 1)"; } -pkbs() { doas pacman -Sy "$(pkgfile -b "$1" | tee /dev/stderr)"; } -oclip() { printf "\033]52;c;$(echo -n "$@" | base64)\a"; } -sms() { ssh -t phone sendmsg "$1" "'$2'"; } -trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; } -rln() { ln -s "$(readlink -f "$1")" "$2"; } -getgit() { git clone git@db:"$1"; } - -ipc() -{ - if [[ "$(ip link show eno1 | awk -F, 'NR=1 {print $3}')" == "UP" ]] - then - doas ip link set eno1 down - else - doas ip link set eno1 up - fi -} - -psgrep() -{ - [ $# -eq 0 ] && return 1 - pgrep "$@" | xargs ps -} - -unique() { - local f - f="$(mktemp)" - awk '!x[$0]++' "$1" > "$f" - mv "$f" "$1" -} - -clip() { - if [ "$WAYLAND_DISPLAY" ] - then - echo -n "$@" | wl-copy - else - echo -n "$@" | xclip -selection clipboard -rmlastnl - fi -} - -unzipp() { - unzip -- "$(readlink -f -- "$1")" || return 1 - rm -- "$1" -} - -# fix long waiting time -__git_files() { - _wanted files expl 'local files' _files -} - -esc() { - $EDITOR "$(which $1)" -} - -delfile() { - curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}" -} -upfile() { - curl -F "file=@\"$1\"" ${2:-https://0x0.st} -} - -# git -sgd() { - d="$PWD" - find $HOME/src -maxdepth 1 -mindepth 1 -type d | - while read -r dir - do - cd "$dir" - git status > /dev/null 2>&1 || continue - git fetch > /dev/null 2>&1 - printf "$PWD" - test "$(git status --short 2>/dev/null | grep -v "??" | head -1)" && - printf " \e[1;31m*changes\e[0m" | sed "s#$HOME#~#" >&2 - test "$(parse_git_remote)" && - printf " \e[0;32m*push/pull\e[0m" | sed "s#$HOME#~#" >&2 - printf "\n" - done - cd "$d" - unset d -} - -ginit() -{ - [ "$1" ] || return 1 - ssh db /var/git/initdir.sh "$1" - git remote add origin git@db:"$1.git" - git push --set-upstream origin $(git_current_branch) -} - -# Returns current branch -git_current_branch() -{ - command git rev-parse --git-dir &>/dev/null || return - git branch --show-current -} - -# Check if main exists and use instead of master -git_main_branch() -{ - command git rev-parse --git-dir &>/dev/null || return - local ref - for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do - if command git show-ref -q --verify $ref; then - echo ${ref:t} - return - fi - done - echo master -} - -# Check for develop and similarly named branches -function git_develop_branch() { - command git rev-parse --git-dir &>/dev/null || return - local branch - for branch in dev devel development; do - if command git show-ref -q --verify refs/heads/$branch; then - echo $branch - return - fi - done - echo develop -} - -# gpg backup -gpg_backup() -{ - gpg --export-secret-keys --armor > private.asc - gpg --export --armor > public.asc - gpg --export-ownertrust --armor > trust.asc - tar czf gpg_backup.tar.gz {public,private,trust}.asc - shred -uz {public,private,trust}.asc -} - -gpg_import() -{ - tar xf $1 - shred -uz $1 - gpg --import public.asc - gpg --import-ownertrust trust.asc - gpg --import private.asc - shred -uz {public,private,trust}.asc -} - -ngenable() -{ - ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/ -} - -vbsr() -{ - vboxmanage snapshot "$1" restore "$2" && - vboxmanage startvm "$1" || - vboxmanage controlvm "$1" poweroff -} -vbsrr() -{ - vbsr "$1" "$2" - sleep 3 - vbsr "$1" "$2" -} -vbst() -{ - vboxmanage snapshot "$1" take "$2" -} - -pacsize() -{ - if test -n "$1"; then - packages="$@" - elif test ! -t 0; then - packages="$(cat)" - else - echo "No data provided..." - return 1 - fi - echo $packages | - expac '%m %n' - | - numfmt --to=iec-i --suffix=B --format="%.2f" -} - -mime-default () -{ - local mime - [ "${mime:=$1}" ] || - mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' | - sed 's/\.desktop$//' | - fzf)" - - logn "Setting '$mime' as default for its mimetypes" - [ "$mime" ] || exit 1 - grep "MimeType=" /usr/share/applications/"$mime".desktop | - cut -d '=' -f 2- | tr ';' '\0' | - xargs -0I{} xdg-mime default "$mime".desktop "{}" - logn "Done." -} - -addedkeys() { - find ~/.ssh -iname "*.pub" | while read key - do - local fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)" - if ssh-add -l | grep -q "$fingerprint" - then - echo "$key" - fi - done | sed "s,$HOME/.ssh/,," -} - -fpass() { - find $HOME/.password-store -type f -not -path ".git" | - grep "\.gpg$" | - sed "s,$HOME/.password-store/,,;s,\.gpg$,," | - fzf | - xargs pass show -c -} - -muttmail() -{ - local config - local mail - config="$HOME/.config/mutt" - mail="$(find "$config"/configs -type f -printf '%f\n' | fzf)" - [ "$mail" ] || return 1 - ln -sf "$config/configs/$mail" "$config"/muttrc - mutt -} - -resize() -{ - test $# -lt 2 && - printf "usage: %s [out]\n" "$0" >&2 && - return 1 - convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}" -} - -edit_in_dir() { - file="$1/$(goo f "$1" | sed "s@^$1@@" | fzf)" - [ -f "$file" ] || return 1 - $EDITOR "$file" -} - -to_webm() -{ - ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm -} -- cgit v1.2.3 From 797c829ac104ee480d4f46d091999d84d6f8c3bd Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:14:40 +0100 Subject: added file scheme --- bin/guiscripts/sturl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index c738c8e..17f2beb 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -1,7 +1,7 @@ #!/bin/sh -regex='(((https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' url="$(tr -d '\n' | grep -Eo "$regex" | dmenu -x -c -g 1 -l 10)" +regex='(((file|https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' [ -z "$url" ] && exit 1 case $1 in -- cgit v1.2.3 From 347d3e683e2194b4b59eac3e0343f28089587c10 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:14:59 +0100 Subject: cleanup sort results in reverse order so bottom results in terminal are shown first don't use echo --- bin/guiscripts/sturl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index 17f2beb..5b8b1e7 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -1,11 +1,11 @@ #!/bin/sh -url="$(tr -d '\n' | grep -Eo "$regex" | dmenu -x -c -g 1 -l 10)" regex='(((file|https?|gopher|gemini|ftps?|git)://|www\.)[a-zA-Z0-9.]*[:;a-zA-Z0-9./+@$&%?$\#=_~-]*)|(magnet:\?xt=urn:btih:[a-zA-Z0-9]*)' +url="$(tr -d '\n' | grep -Eo "$regex" | tac | commander -cl)" [ -z "$url" ] && exit 1 case $1 in - 'c') echo -n "$url" | xclip -sel c -r ;; + 'c') printf '%s' "$url" | xclip -sel c -r ;; 'o') linkhandler "$url" ;; *) echo "no option" ;; esac -- cgit v1.2.3 From c4bc59d1dc75f39114aa023d8f2b9945989a456d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:15:35 +0100 Subject: use mpv instead of qndl --- bin/guiscripts/linkhandler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/guiscripts/linkhandler b/bin/guiscripts/linkhandler index fb5a3ea..329e267 100755 --- a/bin/guiscripts/linkhandler +++ b/bin/guiscripts/linkhandler @@ -24,7 +24,7 @@ case "$url" in *pdf|*cbz|*cbr) curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && $VIEWER "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; *mp3|*flac|*opus|*mp3?source*) - qndl "$url" 'curl -LO' >/dev/null 2>&1 ;; + mpv "$url" 'curl -LO' >/dev/null 2>&1 ;; *) if [ -f "$url" ] then setsid -f "$TERMINAL" -e "$EDITOR" "$url" >/dev/null 2>&1 -- cgit v1.2.3 From f09fce4ff51ff3e26a4d77b23ca34950c9162fc0 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 17:21:11 +0100 Subject: use seperate shell folder that works cross shells --- config/essentials/shell/aliases.sh | 500 +++++++++++++++++++++++++++++++++++ config/essentials/shell/functions.sh | 306 +++++++++++++++++++++ config/essentials/zsh/.zshrc | 4 +- config/essentials/zsh/aliases.sh | 500 ----------------------------------- config/essentials/zsh/functions.sh | 306 --------------------- config/home/.bashrc | 3 +- 6 files changed, 810 insertions(+), 809 deletions(-) create mode 100644 config/essentials/shell/aliases.sh create mode 100644 config/essentials/shell/functions.sh delete mode 100644 config/essentials/zsh/aliases.sh delete mode 100644 config/essentials/zsh/functions.sh diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh new file mode 100644 index 0000000..157e7aa --- /dev/null +++ b/config/essentials/shell/aliases.sh @@ -0,0 +1,500 @@ +#!/bin/sh +# s/alias \([^-]\)/alias -g \1 + +# The most important one +alias vi='emacsclient -nw' + +# Zsh specific aliases +if [ $SHELL = "/bin/zsh" ] +then + # googoo aliases + alias o~='o $HOME' + alias o/='o /' + alias o/s='o /srv' + alias go~='go $HOME' + alias go/='go /' + alias go/s='go /srv' + alias ogo~='ogo $HOME' + alias ogo/='ogo /' + alias ogo/s='ogo /srv' + + alias calc='bc <<<' + + if [ -z "$WAYLAND_DISPLAY" ] + then + if which devour > /dev/null 2>&1 + then + alias mpv='devour mpv' + alias zathura='devour zathura' + fi + fi + alias clipic='clipo > /tmp/pic.png' + + alias -g '...'='../..' + alias -g '....'='../../..' + alias -g bg='&; disown' + alias -g hl='--help |& less -r' +fi + + +if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null +then + alias aptup='apt update && apt upgrade -y' + alias ufwd='while echo y | ufw delete "$(ufw status numbered | tail -n +5 | fzf | cut -f2 -d'\''['\'' | cut -f1 -d'\'']'\'')" > /dev/null 2>&1 && >&2 echo "deleted."; do :; done' +fi + +# Programs +alias nb='newsboat' +alias sr='surfraw' +alias ccu='calcurse' +alias pf='profanity' + +alias gurk='pgrep gurk > /dev/null && printf "Already Running.\n" || gurk' + +alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' + +if [ -x /usr/bin/dircolors ] || [ -x $HOME/../usr/bin/dircolors ] +then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + # alias ls='ls -h --color --group-directories-first' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + alias ip='ip -color=auto' + alias ipa='ip -br a' +fi + +alias l='ls -l' +alias l1='ls -1' +alias ll='ls -la' +alias la='ls -aF' +alias lst='ls --tree' +alias lst1='ls --tree -L1' +alias lst2='ls --tree -L2' +alias lst3='ls --tree -L3' +alias ls.='ls -dl .*' +which exa >/dev/null 2>&1 && + alias ls='exa --sort extension --group-directories-first' || + alias ls='ls --color --group-directories-first --sort=extension' + +# pacman aliases +alias pac='pacman' +alias pacsi='pac -Si' +alias pacs='pac -Ss' +alias pacq='pac -Q' +alias pacql='pac -Ql' +alias pacqs='pac -Qs' +alias paci='pac -Qi' + +alias pacup='dopac -Syu' +alias dopac='doas pacman' +alias orpac='pacman -Qtdq | dopac -Rns - 2> /dev/null || echo "No orphans."' +alias dopacs='dopac -S' +alias dopacc='dopac -Sc' +alias doprm='dopac -Rns' + +alias mpkg='makepkg -si' + +which pikaur > /dev/null 2>&1 && + alias yay='pikaur' +alias yup='yay -Syu' +alias ysi='yay -Si' +alias yss='yay -Ss' +alias yqs='yay -Qs' +alias yql='yay -Ql' +alias yays='yay -S' +alias yrm='yay -Rns' + +alias pkb='pkgfile -b' + +# transmission +alias trr='transmission-remote debuc.com' +alias trls='transmission-remote debuc.com -t all -l' +alias tradd='transmission-remote debuc.com -a' +alias trclipo='transmission-remote debuc.com -a "$(clipo)"' + +alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' + +# vim +alias vimp="vim '+PlugInstall'" +alias nvimp="nvim '+PackerSync'" +alias nvg='git status > /dev/null 2>&1 && nvim "+Git"' +alias nvn='nvim "+Telekasten panel"' + +alias xrandr-rpgmaker='xrandr --auto --output VGA-1 --mode 1024x768 --left-of HDMI-1 && ~/.fehbg' +alias xrandr-default='xrandr --auto --output VGA-1 --mode 1920x1080 --left-of HDMI-1 --output HDMI-1 --mode 1920x1080 && ~/.fehbg' + +alias d='du -d 0 -h' +alias dud='du .* * -d 0 -h 2>/dev/null | sort -h' +alias df='df -h' +alias diff='diff -u --color' +alias shred='shred -uz' +alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint' +alias sxt='sxiv -t' +alias wgsh='wget --quiet --show-progress' +alias wgc='wgsh "$(clipo)"' +alias ss4='ss -tln4p' +alias mdb='mariadb -u admin -ppass admindb' +alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' +alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' +alias tmux='tmux a || tmux' + +# ssh +alias sha='ssh-add' +alias sshs='eval "$(ssh-agent)" && ssh-add' +alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i' +alias whatsmyip='curl -s "ifconfig.co"' +alias icognito='unset HISTFILE' +alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' +alias capture='echo "Y" | wf-recorder -o "$(hyprctl -j monitors | jq -r '\''.[].name'\'' | fzf)" --codec=vp8_vaapi --device=/dev/dri/renderD128 -f output.webm -D' +alias qrclipo='qrencode -s 16 "$(clipo)" -o - | imv -w "imv - $(clipo)" -' +alias airpods='bluetoothctl connect 60:93:16:24:00:10' +alias hotpsot='nmcli dev wifi hotspot ifname wlan0 ssid wiefie password "peepeepoopoo"' +alias wtip='wt ip -c -brief addr' +alias fusephone='sshfs myphone: /media/phone' +alias ttyper='ttyper -l english1000 -w 100' + +alias wgup='doas wg-quick up wg0' +alias wgdown='doas wg-quick down wg0' + +# NPM +alias npi="npm init --yes" + +# Python +alias penv='python3 -m venv env' +alias phttp='python3 -m http.server' +alias pipreq='pip install -r requirements.txt' + +alias ch='chown ${USER}:${USER} -R' +alias kll='killall' +alias pi='ping 9.9.9.9 -c4' +alias sba='source env/bin/activate || source bin/activate' + +alias zsr='source ${ZDOTDIR:-~}/.zshrc && rehash' +alias rh='rehash' +alias wf='doas wipefs -a' +alias dmci="doas make clean install" +alias rmd='rm -f *.{orig,rej}' +alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite' +alias gdate='date +%y_%m_%d-%T' +alias tpid='tail -f /dev/null --pid' +alias pwdcp='pwd | clipp' +alias gw="grep -ri" +alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} ~/.config/emacs | supd' + +# systemctl aliases +alias smc='systemctl' +alias smcs='systemctl status' +alias smcst='systemctl start' +alias smcS='systemctl stop' +alias smcr='systemctl restart' +alias smcrl='systemctl reload' +alias smcd='systemctl daemon-reload' +alias smce='systemctl edit' +alias smcen='systemctl enable' +#user +alias smcu='systemctl --user' +alias smcus='systemctl --user status' +alias smcust='systemctl --user start' +alias smcuS='systemctl --user stop' +alias smcur='systemctl --user restart' +alias smcurl='systemctl --user reload' +alias smcud='systemctl --user daemon-reload' +alias smcue='systemctl --user edit' +alias smcuen='systemctl --user enable' +#doas +alias dsmc='doas systemctl' +alias dsmcs='doas systemctl status' +alias dsmcst='doas systemctl start' +alias dsmcS='doas systemctl stop' +alias dsmcr='doas systemctl restart' +alias dsmcrl='doas systemctl reload' +alias dsmcd='doas systemctl daemon-reload' +alias dsmce='doas systemctl edit' +alias dsmcen='doas systemctl enable' + +# virtualbox aliases +alias vbm='vboxmanage' +alias vbls='vbm list vms' +alias vblsr='vbm list runningvms' +alias vb='vbm startvm' + +# quick config +alias ez='$EDITOR ${ZDOTDIR:-~}/.zshrc' +alias eza='$EDITOR $HOME/.config/shell/aliases.sh' +alias ezf='$EDITOR $HOME/.config/shell/functions.sh' +alias eto='$EDITOR ~/sync/TODO' +alias edw='$EDITOR ~/proj/suckless/dwm/config.def.h' +alias edm='$EDITOR ~/proj/suckless/dmenu/config.def.h' +alias ehst='$EDITOR $ZDOTDIR/histfile' +alias ezh=' $EDITOR $HISTFILE' +alias est='$EDITOR ~/proj/suckless/st/config.def.h' +alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' +alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' +alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' +alias ehyb='$EDITOR ~/.config/hypr/binds.conf' +alias ewbj='$EDITOR ~/.config/waybar/config.jsonc' +alias ewbs='$EDITOR ~/.config/waybar/style.css' +alias cfd='$EDITOR config.def.h' +# /# quick cd jV}k:!sort -t "'" -k 2 +alias cdl='cd ~/dl' +alias cdoc='cd ~/docs' +alias czk='cd ~/docs/zk' +alias cda='cd ~/docs/android/projects' +alias csv='cd ~/docs/school/Vakken' +alias cdm='cd ~/music' +alias cdp='cd ~/pics' +alias cdpa='cd ~/pics/ai-outputs/' +alias cdpp='cd ~/proj/personal/' +alias chom='cd ~/proj/personal/homepage' +alias lov='cd ~/proj/personal/lola' +alias cdsh='~/proj/personal/scheduler' +alias cdsw='cd ~/proj/personal/WheelAdvisor' +alias cddm='cd ~/proj/suckless/dmenu' +alias cdw='cd ~/proj/suckless/dwm' +alias cdslo='cd ~/proj/suckless/slock' +alias cdsl='cd ~/proj/suckless/slstatus' +alias cdst='cd ~/proj/suckless/st' +alias cdsta='cd ~/proj/suckless/stable-diffusion-webui' +alias cdsu='cd ~/proj/suckless/surf' +alias cds='cd ~/src/' +alias cdsb='cd ~/src/build' +alias cdsc='cd ~/src/comfyui/' +alias cdo='cd ~/src/dotfiles' +alias cdi='cd ~/src/installdrier' +alias cdia='cd ~/src/installdrier/arch' +alias cdib='cd ~/src/installdrier/deb' +alias czo='cd ~/zot/' +alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}' +alias cdng='cd /etc/nginx' +alias cdrs='cd /srv/' +alias cdv='cd ~/vids' +alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' +alias gov='go ~/vids d' + +# fzf aliases +alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' +alias ppjs='cd ~/proj/personal/scripts/"$(find ~/proj/personal/scripts -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' +alias scr='edit_in_dir ~/proj/personal/scripts/' +alias fil='edit_in_dir ~/docs/filios/' +alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' +alias asf='alias | fzf' +alias fzh="fzf --tac < $HISTFILE | tee /dev/stderr | clipp" +alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' +alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' +alias fzps='fzf --print0 | xargs -0I{}' +alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' +alias ytplay='mpv "$(ytlink)"' + +# emacs aliases +alias emacsd='emacs --daemon' +alias emacsdbg='emacs --debug-init' +alias e='emacsclient -c -a "emacs"' + +# docker aliases +alias dcb='docker build' +alias dcbt='docker build -t' +alias dce='docker exec' +alias dcet='docker exec -it' +alias dcmp='docker compose up -d' + +# dotnet aliases +alias dncns='dotnet new console --use-program-main -o' + +# debuc aliases +alias dbadd='ssh db dladd "'\''$(clipo)'\''"' +alias dbcons='ssh -t db dlcons' +alias dbinf='ssh db dlinfo' +alias sshdb='ssh -t db "tmux a || tmux"' +alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' + +# oh-my-zsh git aliases +alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' +alias cfg='$EDITOR ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' +alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR' +alias g='git' +alias ga='git add' +alias gaa='git add --all' +alias gapa='git add --patch' +alias gau='git add --update' +alias gav='git add --verbose' +alias gap='git apply' +alias gapt='git apply --3way' +alias gb='git branch' +alias gba='git branch --all' +alias gbd='git branch --delete' +alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null' +alias gbD='git branch --delete --force' +alias gbg='git branch -vv | grep ": gone\]"' +alias gbgd='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -d' +alias gbgD='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -D' +alias gbl='git blame -b -w' +alias gbnm='git branch --no-merged' +alias gbr='git branch --remote' +alias gbs='git bisect' +alias gbsb='git bisect bad' +alias gbsg='git bisect good' +alias gbsr='git bisect reset' +alias gbss='git bisect start' +alias gc='git commit --verbose' +alias gc!='git commit --verbose --amend' +alias gcn!='git commit --verbose --no-edit --amend' +alias gca='git commit --verbose --all' +alias gca!='git commit --verbose --all --amend' +alias gcan!='git commit --verbose --all --no-edit --amend' +alias gcans!='git commit --verbose --all --signoff --no-edit --amend' +alias gcam='git commit --all --message' +alias gcsm='git commit --signoff --message' +alias gcas='git commit --all --signoff' +alias gcasm='git commit --all --signoff --message' +alias gcb='git checkout -b' +alias gcf='git config --list' +alias gcl='git clone' +alias gclc='git clone "$(clipo)"' +alias gclr='git clone --recurse-submodules' +alias gc1='git clone --depth 1' +alias gclean='git clean --interactive -d' +alias gpristine='git reset --hard && git clean --force -dfx' +alias grsf='git reset --soft HEAD~' +alias gcm='git checkout $(git_main_branch)' +alias gcd='git checkout $(git_develop_branch)' +alias gcmsg='git commit --message' +alias gco='git checkout' +alias gcor='git checkout --recurse-submodules' +alias gcount='git shortlog --summary --numbered' +alias gcp='git cherry-pick' +alias gcpa='git cherry-pick --abort' +alias gcpc='git cherry-pick --continue' +alias gcs='git commit --gpg-sign' +alias gcss='git commit --gpg-sign --signoff' +alias gcssm='git commit --gpg-sign --signoff --message' +alias gd='git diff' +alias gdca='git diff --cached' +alias gdcw='git diff --cached --word-diff' +alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' +alias gds='git diff --staged' +alias gdt='git diff-tree --no-commit-id --name-only -r' +alias gdup='git diff @{upstream}' +alias gdw='git diff --word-diff' +alias gdl='git diff HEAD^ HEAD' +alias gf='git fetch' +alias gfo='git fetch origin' +alias gfg='git ls-files | grep' +alias gg='git gui citool' +alias gga='git gui citool --amend' +alias ggpur='ggu' +alias ggpull='git pull origin "$(git_current_branch)"' +alias ggpush='git push origin "$(git_current_branch)"' +alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' +alias gpsup='git push --set-upstream origin $(git_current_branch)' +alias ghh='git help' +alias gignore='git update-index --assume-unchanged' +alias gignored='git ls-files -v | grep "^[[:lower:]]"' +alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk' +alias gk='\gitk --all --branches &!' +alias gke='\gitk --all $(git log --walk-reflogs --pretty=%h) &!' +alias gl='git pull' +alias glg='git log --stat' +alias glgp='git log --stat --patch' +alias glgg='git log --graph' +alias glgga='git log --graph --decorate --all' +alias glgm='git log --graph --max-count=10' +alias glo='git log --oneline --decorate' +alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'" +alias glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat" +alias glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'" +alias glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short" +alias glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all" +alias glog='git log --oneline --decorate --graph' +alias gloga='git log --oneline --decorate --graph --all' +alias glp="_git_log_prettily" +alias gm='git merge' +alias gmom='git merge origin/$(git_main_branch)' +alias gmtl='git mergetool --no-prompt' +alias gmtlvim='git mergetool --no-prompt --tool=vimdiff' +alias gmum='git merge upstream/$(git_main_branch)' +alias gma='git merge --abort' +alias gp='git push' +alias gpd='git push --dry-run' +alias gpf!='git push --force' +alias gpoat='git push origin --all && git push origin --tags' +alias gpod='git push origin --delete' +alias gpr='git pull --rebase' +alias gpu='git push upstream' +alias gpv='git push --verbose' +alias gr='git remote' +alias gra='git remote add' +alias grb='git rebase' +alias grba='git rebase --abort' +alias grbc='git rebase --continue' +alias grbd='git rebase $(git_develop_branch)' +alias grbi='git rebase --interactive' +alias grbm='git rebase $(git_main_branch)' +alias grbom='git rebase origin/$(git_main_branch)' +alias grbo='git rebase --onto' +alias grbs='git rebase --skip' +alias grev='git revert' +alias grh='git reset' +alias grhh='git reset --hard' +alias groh='git reset origin/$(git_current_branch) --hard' +alias grm='git rm' +alias grmc='git rm --cached' +alias grmv='git remote rename' +alias grrm='git remote remove' +alias grs='git restore' +alias grset='git remote set-url' +alias grss='git restore --source' +alias grst='git restore --staged' +alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' +alias gru='git reset --' +alias grup='git remote update' +alias grv='git remote --verbose' +alias gsb='git status --short --branch' +alias gsd='git svn dcommit' +alias gsh='git show' +alias gsi='git submodule init' +alias gsps='git show --pretty=short --show-signature' +alias gsr='git svn rebase' +alias gss='git status --short' +alias gst='git status' +alias gstaa='git stash apply' +alias gstc='git stash clear' +alias gstd='git stash drop' +alias gstl='git stash list' +alias gstp='git stash pop' +alias gsts='git stash show --text' +alias gstu='gsta --include-untracked' +alias gstall='git stash --all' +alias gsu='git submodule update' +alias gsw='git switch' +alias gswc='git switch --create' +alias gswm='git switch $(git_main_branch)' +alias gswd='git switch $(git_develop_branch)' +alias gts='git tag --sign' +alias gtv='git tag | sort -V' +alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' +alias gunignore='git update-index --no-assume-unchanged' +alias gunwip='git log --max-count=1 | grep -q -c "\--wip--" && git reset HEAD~1' +alias gup='git pull --rebase' +alias gupv='git pull --rebase --verbose' +alias gupa='git pull --rebase --autostash' +alias gupav='git pull --rebase --autostash --verbose' +alias gupom='git pull --rebase origin $(git_main_branch)' +alias gupomi='git pull --rebase=interactive origin $(git_main_branch)' +alias glum='git pull upstream $(git_main_branch)' +alias gluc='git pull upstream $(git_current_branch)' +alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' +alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"' +alias gwt='git worktree' +alias gwta='git worktree add' +alias gwtls='git worktree list' +alias gwtmv='git worktree move' +alias gwtrm='git worktree remove' +alias gam='git am' +alias gamc='git am --continue' +alias gams='git am --skip' +alias gama='git am --abort' +alias gamscp='git am --show-current-patch' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh new file mode 100644 index 0000000..37e471c --- /dev/null +++ b/config/essentials/shell/functions.sh @@ -0,0 +1,306 @@ +#!/bin/sh + +log() { >&2 printf '%s' "$@"; } +logn() { >&2 printf '%s\n' "$@"; } + +vmp() { + col -b | \ + vim -MR \ + -c 'set ft=man nolist nonu nornu' +} +nvf() { + cache="$HOME/.cache/nvf" + match="$(grep -m1 "$1$" "$cache" 2> /dev/null)" + if test ! -f "$match" + then + logn "resetting cache..." + match="$(goo f "$HOME" | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)" + # # Alternative: + # match="$(goo | grep -m 1 "$1" 2> /dev/null | tee -a | "$cache")" + fi + if test -f "$match" + then + $EDITOR "$match" && return + else + logn "no match." && return 1 + fi +} + +nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit; } +ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit; } + +# googoo aliases +_googoo_fzf_opt() +{ + unset dest opt + if [ "$1" ] + then + [ -d "$1" ] && dest="$1" || opt="-q $1" + fi +} +o() +{ + _googoo_fzf_opt "$1" + f="$(goo f "$dest" | fzf $opt)" + test "$1" && shift + test -f "$f" && $EDITOR $@ "$f" +} +go() +{ + _googoo_fzf_opt "$1" + cd "$(goo d "$dest" | fzf $opt)" +} +ogo() +{ + _googoo_fzf_opt "$1" + cd "$(dirname "$(goo f "$dest" | fzf $opt)")" +} + +# Onelineres +awnk() { awk "{print \$$1}"; } +vimh() { vi -c "help $1" -c 'call feedkeys("\o")'; } +dgo() { cd "$(goo d ~ | fzf --filter "$@" | head -n 1)"; } +open() { $EDITOR "$(goo f ~ | fzf --filter "$@" | head -n 1)"; } +pkbs() { doas pacman -Sy "$(pkgfile -b "$1" | tee /dev/stderr)"; } +oclip() { printf "\033]52;c;$(printf '%s' "$@" | base64)\a"; } +sms() { ssh -t phone sendmsg "$1" "'$2'"; } +trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; } +rln() { ln -s "$(readlink -f "$1")" "$2"; } +getgit() { git clone git@db:"$1"; } + +ipc() +{ + if [ "$(ip link show eno1 | awk -F, 'NR=1 {print $3}')" = "UP" ] + then + doas ip link set eno1 down + else + doas ip link set eno1 up + fi +} + +psgrep() +{ + [ $# -eq 0 ] && return 1 + pgrep "$@" | xargs ps +} + +unique() { + f="$(mktemp)" + awk '!x[$0]++' "$1" > "$f" + mv "$f" "$1" +} + +clip() { + if [ "$WAYLAND_DISPLAY" ] + then + echo -n "$@" | wl-copy + else + echo -n "$@" | xclip -selection clipboard -rmlastnl + fi +} + +unzipp() { + unzip -- "$(readlink -f -- "$1")" || return 1 + rm -- "$1" +} + +# fix long waiting time +__git_files() { + _wanted files expl 'local files' _files +} + +esc() { + $EDITOR "$(which $1)" +} + +delfile() { + curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}" +} +upfile() { + curl -F "file=@\"$1\"" ${2:-https://0x0.st} +} + +# git +sgd() { + d="$PWD" + find $HOME/src -maxdepth 1 -mindepth 1 -type d | + while read -r dir + do + cd "$dir" + git status > /dev/null 2>&1 || continue + git fetch > /dev/null 2>&1 + printf "$PWD" + test "$(git status --short 2>/dev/null | grep -v "??" | head -1)" && + printf " \e[1;31m*changes\e[0m" | sed "s#$HOME#~#" >&2 + test "$(parse_git_remote)" && + printf " \e[0;32m*push/pull\e[0m" | sed "s#$HOME#~#" >&2 + printf "\n" + done + cd "$d" + unset d +} + +ginit() +{ + [ "$1" ] || return 1 + ssh db /var/git/initdir.sh "$1" + git remote add origin git@db:"$1.git" + git push --set-upstream origin $(git_current_branch) +} + +# Returns current branch +git_current_branch() +{ + command git rev-parse --git-dir > /dev/null 2>&1 || return + git branch --show-current +} + +# Check if main exists and use instead of master +git_main_branch() +{ + command git rev-parse --git-dir > /dev/null 2>&1 || return + for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default} + do + if command git show-ref -q --verify $ref; then + echo ${ref:t} + return + fi + done + echo master +} + +# Check for develop and similarly named branches +function git_develop_branch() { + command git rev-parse --git-dir > /dev/null 2>&1 || return + for branch in dev devel development + do + if command git show-ref -q --verify refs/heads/$branch + then + echo $branch + return + fi + done + echo develop +} + +# gpg backup +gpg_backup() +{ + # $1: option + # $2: output file (without .asc) + gpg_command() { gpg "$1" --armor > "$2".asc; } + gpg_command --export-secret-keys "private" + gpg_command --export "public" + gpg_command --export-ownertrust "trust" + tar -czvf gpg_backup.tar.gz public.asc private.asc trust.asc + shred -uz public.asc private.asc trust.asc +} + +gpg_import() +{ + tar xf $1 + shred -uz $1 + gpg --import public.asc + gpg --import-ownertrust trust.asc + gpg --import private.asc + shred -uz public.asc private.asc trust.asc +} + +ngenable() +{ + ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/ +} + +vbsr() +{ + vboxmanage snapshot "$1" restore "$2" && + vboxmanage startvm "$1" || + vboxmanage controlvm "$1" poweroff +} +vbsrr() +{ + vbsr "$1" "$2" + sleep 3 + vbsr "$1" "$2" +} +vbst() +{ + vboxmanage snapshot "$1" take "$2" +} + +pacsize() +{ + if test -n "$1"; then + packages="$@" + elif test ! -t 0; then + packages="$(cat)" + else + echo "No data provided..." + return 1 + fi + echo $packages | + expac '%m %n' - | + numfmt --to=iec-i --suffix=B --format="%.2f" +} + +mime-default () +{ + [ "${mime:=$1}" ] || + mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' | + sed 's/\.desktop$//' | + fzf)" + + logn "Setting '$mime' as default for its mimetypes" + [ "$mime" ] || exit 1 + grep "MimeType=" /usr/share/applications/"$mime".desktop | + cut -d '=' -f 2- | tr ';' '\0' | + xargs -0I{} xdg-mime default "$mime".desktop "{}" + logn "Done." +} + +addedkeys() { + find ~/.ssh -iname "*.pub" | while read key + do + fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)" + if ssh-add -l | grep -q "$fingerprint" + then + echo "$key" + fi + done | sed "s,$HOME/.ssh/,," +} + +fpass() { + find $HOME/.password-store -type f -not -path ".git" | + grep "\.gpg$" | + sed "s,$HOME/.password-store/,,;s,\.gpg$,," | + fzf | + xargs pass show -c +} + +muttmail() +{ + config="$HOME/.config/mutt" + mail="$(find "$config"/configs -type f -printf '%f\n' | fzf)" + [ "$mail" ] || return 1 + ln -sf "$config/configs/$mail" "$config"/muttrc + mutt +} + +resize() +{ + test $# -lt 2 && + printf "usage: %s [out]\n" "$0" >&2 && + return 1 + convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}" +} + +edit_in_dir() { + file="$1/$(goo f "$1" | sed "s@^$1@@" | fzf)" + [ -f "$file" ] || return 1 + $EDITOR "$file" +} + +to_webm() +{ + ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm +} diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 7b1f7a0..230de24 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -67,8 +67,8 @@ zle -N add-surround surround zle -N change-surround surround # Source files -. $ZDOTDIR/functions.sh -. $ZDOTDIR/aliases.sh +. $XDG_CONFIG_HOME/shell/functions.sh +. $XDG_CONFIG_HOME/shell/aliases.sh for file in /{etc,usr/lib}/os-release do [ -f "$file" ] && . "$file" && break diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh deleted file mode 100644 index 2e23010..0000000 --- a/config/essentials/zsh/aliases.sh +++ /dev/null @@ -1,500 +0,0 @@ -#!/bin/sh -# s/alias \([^-]\)/alias -g \1 - -# The most important one -alias vi='emacsclient -nw' - -# Zsh specific aliases -if [ $SHELL = "/bin/zsh" ] -then - # googoo aliases - alias o~='o $HOME' - alias o/='o /' - alias o/s='o /srv' - alias go~='go $HOME' - alias go/='go /' - alias go/s='go /srv' - alias ogo~='ogo $HOME' - alias ogo/='ogo /' - alias ogo/s='ogo /srv' - - alias calc='bc <<<' - - if [ -z "$WAYLAND_DISPLAY" ] - then - if which devour > /dev/null 2>&1 - then - alias mpv='devour mpv' - alias zathura='devour zathura' - fi - fi - alias clipic='clipo > /tmp/pic.png' - - alias -g '...'='../..' - alias -g '....'='../../..' - alias -g bg='&; disown' - alias -g hl='--help |& less -r' -fi - - -if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null -then - alias aptup='apt update && apt upgrade -y' - alias ufwd='while echo y | ufw delete "$(ufw status numbered | tail -n +5 | fzf | cut -f2 -d'\''['\'' | cut -f1 -d'\'']'\'')" > /dev/null 2>&1 && >&2 echo "deleted."; do :; done' -fi - -# Programs -alias nb='newsboat' -alias sr='surfraw' -alias ccu='calcurse' -alias pf='profanity' - -alias gurk='pgrep gurk > /dev/null && printf "Already Running.\n" || gurk' - -alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' - -if [ -x /usr/bin/dircolors ] || [ -x $HOME/../usr/bin/dircolors ] -then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - # alias ls='ls -h --color --group-directories-first' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' - alias ip='ip -color=auto' - alias ipa='ip -br a' -fi - -alias l='ls -l' -alias l1='ls -1' -alias ll='ls -la' -alias la='ls -aF' -alias lst='ls --tree' -alias lst1='ls --tree -L1' -alias lst2='ls --tree -L2' -alias lst3='ls --tree -L3' -alias ls.='ls -dl .*' -which exa >/dev/null 2>&1 && - alias ls='exa --sort extension --group-directories-first' || - alias ls='ls --color --group-directories-first --sort=extension' - -# pacman aliases -alias pac='pacman' -alias pacsi='pac -Si' -alias pacs='pac -Ss' -alias pacq='pac -Q' -alias pacql='pac -Ql' -alias pacqs='pac -Qs' -alias paci='pac -Qi' - -alias pacup='dopac -Syu' -alias dopac='doas pacman' -alias orpac='pacman -Qtdq | dopac -Rns - 2> /dev/null || echo "No orphans."' -alias dopacs='dopac -S' -alias dopacc='dopac -Sc' -alias doprm='dopac -Rns' - -alias mpkg='makepkg -si' - -which pikaur > /dev/null 2>&1 && - alias yay='pikaur' -alias yup='yay -Syu' -alias ysi='yay -Si' -alias yss='yay -Ss' -alias yqs='yay -Qs' -alias yql='yay -Ql' -alias yays='yay -S' -alias yrm='yay -Rns' - -alias pkb='pkgfile -b' - -# transmission -alias trr='transmission-remote debuc.com' -alias trls='transmission-remote debuc.com -t all -l' -alias tradd='transmission-remote debuc.com -a' -alias trclipo='transmission-remote debuc.com -a "$(clipo)"' - -alias grub-update='doas grub-mkconfig -o /boot/grub/grub.cfg' - -# vim -alias vimp="vim '+PlugInstall'" -alias nvimp="nvim '+PackerSync'" -alias nvg='git status > /dev/null 2>&1 && nvim "+Git"' -alias nvn='nvim "+Telekasten panel"' - -alias xrandr-rpgmaker='xrandr --auto --output VGA-1 --mode 1024x768 --left-of HDMI-1 && ~/.fehbg' -alias xrandr-default='xrandr --auto --output VGA-1 --mode 1920x1080 --left-of HDMI-1 --output HDMI-1 --mode 1920x1080 && ~/.fehbg' - -alias d='du -d 0 -h' -alias dud='du .* * -d 0 -h 2>/dev/null | sort -h' -alias df='df -h' -alias diff='diff -u --color' -alias shred='shred -uz' -alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint' -alias sxt='sxiv -t' -alias wgsh='wget --quiet --show-progress' -alias wgc='wgsh "$(clipo)"' -alias ss4='ss -tln4p' -alias mdb='mariadb -u admin -ppass admindb' -alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' -alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' -alias tmux='tmux a || tmux' - -# ssh -alias sha='ssh-add' -alias sshs='eval "$(ssh-agent)" && ssh-add' -alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i' -alias whatsmyip='curl -s "ifconfig.co"' -alias icognito='unset HISTFILE' -alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' -alias capture='echo "Y" | wf-recorder -o "$(hyprctl -j monitors | jq -r '\''.[].name'\'' | fzf)" --codec=vp8_vaapi --device=/dev/dri/renderD128 -f output.webm -D' -alias qrclipo='qrencode -s 16 "$(clipo)" -o - | imv -w "imv - $(clipo)" -' -alias airpods='bluetoothctl connect 60:93:16:24:00:10' -alias hotpsot='nmcli dev wifi hotspot ifname wlan0 ssid wiefie password "peepeepoopoo"' -alias wtip='wt ip -c -brief addr' -alias fusephone='sshfs myphone: /media/phone' -alias ttyper='ttyper -l english1000 -w 100' - -alias wgup='doas wg-quick up wg0' -alias wgdown='doas wg-quick down wg0' - -# NPM -alias npi="npm init --yes" - -# Python -alias penv='python3 -m venv env' -alias phttp='python3 -m http.server' -alias pipreq='pip install -r requirements.txt' - -alias ch='chown ${USER}:${USER} -R' -alias kll='killall' -alias pi='ping 9.9.9.9 -c4' -alias sba='source env/bin/activate || source bin/activate' - -alias zsr='source ${ZDOTDIR:-~}/.zshrc && rehash' -alias rh='rehash' -alias wf='doas wipefs -a' -alias dmci="doas make clean install" -alias rmd='rm -f *.{orig,rej}' -alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite' -alias gdate='date +%y_%m_%d-%T' -alias tpid='tail -f /dev/null --pid' -alias pwdcp='pwd | clipp' -alias gw="grep -ri" -alias srcsupd='echo ~/src/{installdrier,dotfiles,password-store} ~/.config/emacs | supd' - -# systemctl aliases -alias smc='systemctl' -alias smcs='systemctl status' -alias smcst='systemctl start' -alias smcS='systemctl stop' -alias smcr='systemctl restart' -alias smcrl='systemctl reload' -alias smcd='systemctl daemon-reload' -alias smce='systemctl edit' -alias smcen='systemctl enable' -#user -alias smcu='systemctl --user' -alias smcus='systemctl --user status' -alias smcust='systemctl --user start' -alias smcuS='systemctl --user stop' -alias smcur='systemctl --user restart' -alias smcurl='systemctl --user reload' -alias smcud='systemctl --user daemon-reload' -alias smcue='systemctl --user edit' -alias smcuen='systemctl --user enable' -#doas -alias dsmc='doas systemctl' -alias dsmcs='doas systemctl status' -alias dsmcst='doas systemctl start' -alias dsmcS='doas systemctl stop' -alias dsmcr='doas systemctl restart' -alias dsmcrl='doas systemctl reload' -alias dsmcd='doas systemctl daemon-reload' -alias dsmce='doas systemctl edit' -alias dsmcen='doas systemctl enable' - -# virtualbox aliases -alias vbm='vboxmanage' -alias vbls='vbm list vms' -alias vblsr='vbm list runningvms' -alias vb='vbm startvm' - -# quick config -alias ez='$EDITOR ${ZDOTDIR:-~}/.zshrc' -alias eza='$EDITOR ${ZDOTDIR}/aliases.sh' -alias ezf='$EDITOR ${ZDOTDIR}/functions.zsh' -alias eto='$EDITOR ~/sync/TODO' -alias edw='$EDITOR ~/proj/suckless/dwm/config.def.h' -alias edm='$EDITOR ~/proj/suckless/dmenu/config.def.h' -alias ehst='$EDITOR $ZDOTDIR/histfile' -alias ezh=' $EDITOR $HISTFILE' -alias est='$EDITOR ~/proj/suckless/st/config.def.h' -alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' -alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' -alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' -alias ehyb='$EDITOR ~/.config/hypr/binds.conf' -alias ewbj='$EDITOR ~/.config/waybar/config.jsonc' -alias ewbs='$EDITOR ~/.config/waybar/style.css' -alias cfd='$EDITOR config.def.h' -# /# quick cd jV}k:!sort -t "'" -k 2 -alias cdl='cd ~/dl' -alias cdoc='cd ~/docs' -alias czk='cd ~/docs/zk' -alias cda='cd ~/docs/android/projects' -alias csv='cd ~/docs/school/Vakken' -alias cdm='cd ~/music' -alias cdp='cd ~/pics' -alias cdpa='cd ~/pics/ai-outputs/' -alias cdpp='cd ~/proj/personal/' -alias chom='cd ~/proj/personal/homepage' -alias lov='cd ~/proj/personal/lola' -alias cdsh='~/proj/personal/scheduler' -alias cdsw='cd ~/proj/personal/WheelAdvisor' -alias cddm='cd ~/proj/suckless/dmenu' -alias cdw='cd ~/proj/suckless/dwm' -alias cdslo='cd ~/proj/suckless/slock' -alias cdsl='cd ~/proj/suckless/slstatus' -alias cdst='cd ~/proj/suckless/st' -alias cdsta='cd ~/proj/suckless/stable-diffusion-webui' -alias cdsu='cd ~/proj/suckless/surf' -alias cds='cd ~/src/' -alias cdsb='cd ~/src/build' -alias cdsc='cd ~/src/comfyui/' -alias cdo='cd ~/src/dotfiles' -alias cdi='cd ~/src/installdrier' -alias cdia='cd ~/src/installdrier/arch' -alias cdib='cd ~/src/installdrier/deb' -alias czo='cd ~/zot/' -alias cdpw='cd ${PASSWORD_STORE_DIR:-~/.password-store}' -alias cdng='cd /etc/nginx' -alias cdrs='cd /srv/' -alias cdv='cd ~/vids' -alias god='cd "$(find . -mindepth 1 -maxdepth 1 -type d | fzf)"' -alias gov='go ~/vids d' - -# fzf aliases -alias ppj='cd ~/proj/personal/"$(find ~/proj/personal -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' -alias ppjs='cd ~/proj/personal/scripts/"$(find ~/proj/personal/scripts -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | fzf)"' -alias scr='edit_in_dir ~/proj/personal/scripts/' -alias fil='edit_in_dir ~/docs/filios/' -alias fzps='ps aux | tail +2 | fzf | tee /dev/stderr | awk '\''{print $2}'\'' | clipp' -alias asf='alias | fzf' -alias fzh="fzf --tac < $HISTFILE | tee /dev/stderr | clipp" -alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl clients -j | jq '\''.[] | select(.pid == {}) | {class, title, workspace, xwayland}'\''"' -alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' -alias fzps='fzf --print0 | xargs -0I{}' -alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' -alias ytplay='mpv "$(ytlink)"' - -# emacs aliases -alias emacsd='emacs --daemon' -alias emacsdbg='emacs --debug-init' -alias e='emacsclient -c -a "emacs"' - -# docker aliases -alias dcb='docker build' -alias dcbt='docker build -t' -alias dce='docker exec' -alias dcet='docker exec -it' -alias dcmp='docker compose up -d' - -# dotnet aliases -alias dncns='dotnet new console --use-program-main -o' - -# debuc aliases -alias dbadd='ssh db dladd "'\''$(clipo)'\''"' -alias dbcons='ssh -t db dlcons' -alias dbinf='ssh db dlinfo' -alias sshdb='ssh -t db "tmux a || tmux"' -alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' - -# oh-my-zsh git aliases -alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' -alias cfg='$EDITOR ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' -alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR' -alias g='git' -alias ga='git add' -alias gaa='git add --all' -alias gapa='git add --patch' -alias gau='git add --update' -alias gav='git add --verbose' -alias gap='git apply' -alias gapt='git apply --3way' -alias gb='git branch' -alias gba='git branch --all' -alias gbd='git branch --delete' -alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null' -alias gbD='git branch --delete --force' -alias gbg='git branch -vv | grep ": gone\]"' -alias gbgd='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -d' -alias gbgD='local res=$(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -D' -alias gbl='git blame -b -w' -alias gbnm='git branch --no-merged' -alias gbr='git branch --remote' -alias gbs='git bisect' -alias gbsb='git bisect bad' -alias gbsg='git bisect good' -alias gbsr='git bisect reset' -alias gbss='git bisect start' -alias gc='git commit --verbose' -alias gc!='git commit --verbose --amend' -alias gcn!='git commit --verbose --no-edit --amend' -alias gca='git commit --verbose --all' -alias gca!='git commit --verbose --all --amend' -alias gcan!='git commit --verbose --all --no-edit --amend' -alias gcans!='git commit --verbose --all --signoff --no-edit --amend' -alias gcam='git commit --all --message' -alias gcsm='git commit --signoff --message' -alias gcas='git commit --all --signoff' -alias gcasm='git commit --all --signoff --message' -alias gcb='git checkout -b' -alias gcf='git config --list' -alias gcl='git clone' -alias gclc='git clone "$(clipo)"' -alias gclr='git clone --recurse-submodules' -alias gc1='git clone --depth 1' -alias gclean='git clean --interactive -d' -alias gpristine='git reset --hard && git clean --force -dfx' -alias grsf='git reset --soft HEAD~' -alias gcm='git checkout $(git_main_branch)' -alias gcd='git checkout $(git_develop_branch)' -alias gcmsg='git commit --message' -alias gco='git checkout' -alias gcor='git checkout --recurse-submodules' -alias gcount='git shortlog --summary --numbered' -alias gcp='git cherry-pick' -alias gcpa='git cherry-pick --abort' -alias gcpc='git cherry-pick --continue' -alias gcs='git commit --gpg-sign' -alias gcss='git commit --gpg-sign --signoff' -alias gcssm='git commit --gpg-sign --signoff --message' -alias gd='git diff' -alias gdca='git diff --cached' -alias gdcw='git diff --cached --word-diff' -alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' -alias gds='git diff --staged' -alias gdt='git diff-tree --no-commit-id --name-only -r' -alias gdup='git diff @{upstream}' -alias gdw='git diff --word-diff' -alias gdl='git diff HEAD^ HEAD' -alias gf='git fetch' -alias gfo='git fetch origin' -alias gfg='git ls-files | grep' -alias gg='git gui citool' -alias gga='git gui citool --amend' -alias ggpur='ggu' -alias ggpull='git pull origin "$(git_current_branch)"' -alias ggpush='git push origin "$(git_current_branch)"' -alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' -alias gpsup='git push --set-upstream origin $(git_current_branch)' -alias ghh='git help' -alias gignore='git update-index --assume-unchanged' -alias gignored='git ls-files -v | grep "^[[:lower:]]"' -alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk' -alias gk='\gitk --all --branches &!' -alias gke='\gitk --all $(git log --walk-reflogs --pretty=%h) &!' -alias gl='git pull' -alias glg='git log --stat' -alias glgp='git log --stat --patch' -alias glgg='git log --graph' -alias glgga='git log --graph --decorate --all' -alias glgm='git log --graph --max-count=10' -alias glo='git log --oneline --decorate' -alias glol="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'" -alias glols="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat" -alias glod="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'" -alias glods="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short" -alias glola="git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all" -alias glog='git log --oneline --decorate --graph' -alias gloga='git log --oneline --decorate --graph --all' -alias glp="_git_log_prettily" -alias gm='git merge' -alias gmom='git merge origin/$(git_main_branch)' -alias gmtl='git mergetool --no-prompt' -alias gmtlvim='git mergetool --no-prompt --tool=vimdiff' -alias gmum='git merge upstream/$(git_main_branch)' -alias gma='git merge --abort' -alias gp='git push' -alias gpd='git push --dry-run' -alias gpf!='git push --force' -alias gpoat='git push origin --all && git push origin --tags' -alias gpod='git push origin --delete' -alias gpr='git pull --rebase' -alias gpu='git push upstream' -alias gpv='git push --verbose' -alias gr='git remote' -alias gra='git remote add' -alias grb='git rebase' -alias grba='git rebase --abort' -alias grbc='git rebase --continue' -alias grbd='git rebase $(git_develop_branch)' -alias grbi='git rebase --interactive' -alias grbm='git rebase $(git_main_branch)' -alias grbom='git rebase origin/$(git_main_branch)' -alias grbo='git rebase --onto' -alias grbs='git rebase --skip' -alias grev='git revert' -alias grh='git reset' -alias grhh='git reset --hard' -alias groh='git reset origin/$(git_current_branch) --hard' -alias grm='git rm' -alias grmc='git rm --cached' -alias grmv='git remote rename' -alias grrm='git remote remove' -alias grs='git restore' -alias grset='git remote set-url' -alias grss='git restore --source' -alias grst='git restore --staged' -alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' -alias gru='git reset --' -alias grup='git remote update' -alias grv='git remote --verbose' -alias gsb='git status --short --branch' -alias gsd='git svn dcommit' -alias gsh='git show' -alias gsi='git submodule init' -alias gsps='git show --pretty=short --show-signature' -alias gsr='git svn rebase' -alias gss='git status --short' -alias gst='git status' -alias gstaa='git stash apply' -alias gstc='git stash clear' -alias gstd='git stash drop' -alias gstl='git stash list' -alias gstp='git stash pop' -alias gsts='git stash show --text' -alias gstu='gsta --include-untracked' -alias gstall='git stash --all' -alias gsu='git submodule update' -alias gsw='git switch' -alias gswc='git switch --create' -alias gswm='git switch $(git_main_branch)' -alias gswd='git switch $(git_develop_branch)' -alias gts='git tag --sign' -alias gtv='git tag | sort -V' -alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' -alias gunignore='git update-index --no-assume-unchanged' -alias gunwip='git log --max-count=1 | grep -q -c "\--wip--" && git reset HEAD~1' -alias gup='git pull --rebase' -alias gupv='git pull --rebase --verbose' -alias gupa='git pull --rebase --autostash' -alias gupav='git pull --rebase --autostash --verbose' -alias gupom='git pull --rebase origin $(git_main_branch)' -alias gupomi='git pull --rebase=interactive origin $(git_main_branch)' -alias glum='git pull upstream $(git_main_branch)' -alias gluc='git pull upstream $(git_current_branch)' -alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' -alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"' -alias gwt='git worktree' -alias gwta='git worktree add' -alias gwtls='git worktree list' -alias gwtmv='git worktree move' -alias gwtrm='git worktree remove' -alias gam='git am' -alias gamc='git am --continue' -alias gams='git am --skip' -alias gama='git am --abort' -alias gamscp='git am --show-current-patch' diff --git a/config/essentials/zsh/functions.sh b/config/essentials/zsh/functions.sh deleted file mode 100644 index b285e05..0000000 --- a/config/essentials/zsh/functions.sh +++ /dev/null @@ -1,306 +0,0 @@ -#!/bin/sh - -log() { >&2 printf '%s' "$@"; } -logn() { >&2 printf '%s\n' "$@"; } - -vmp() { - col -b | \ - vim -MR \ - -c 'set ft=man nolist nonu nornu' -} -nvf() { - cache="$HOME/.cache/nvf" - match="$(grep -m1 "$1$" "$cache" 2> /dev/null)" - if test ! -f "$match" - then - logn "resetting cache..." - match="$(goo f "$HOME" | tee "$cache" | grep -m 1 "$1$" 2> /dev/null)" - # # Alternative: - # match="$(goo | grep -m 1 "$1" 2> /dev/null | tee -a | "$cache")" - fi - if test -f "$match" - then - $EDITOR "$match" && return - else - logn "no match." && return 1 - fi -} - -nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit; } -ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit; } - -# googoo aliases -_googoo_fzf_opt() -{ - unset dest opt - if [ "$1" ] - then - [ -d "$1" ] && dest="$1" || opt="-q $1" - fi -} -o() -{ - _googoo_fzf_opt "$1" - f="$(goo f "$dest" | fzf $opt)" - test "$1" && shift - test -f "$f" && $EDITOR $@ "$f" -} -go() -{ - _googoo_fzf_opt "$1" - cd "$(goo d "$dest" | fzf $opt)" -} -ogo() -{ - _googoo_fzf_opt "$1" - cd "$(dirname "$(goo f "$dest" | fzf $opt)")" -} - -# Onelineres -awnk() { awk "{print \$$1}"; } -vimh() { vi -c "help $1" -c 'call feedkeys("\o")'; } -dgo() { cd "$(goo d ~ | fzf --filter "$@" | head -n 1)"; } -open() { $EDITOR "$(goo f ~ | fzf --filter "$@" | head -n 1)"; } -pkbs() { doas pacman -Sy "$(pkgfile -b "$1" | tee /dev/stderr)"; } -oclip() { printf "\033]52;c;$(printf '%s' "$@" | base64)\a"; } -sms() { ssh -t phone sendmsg "$1" "'$2'"; } -trcp() { scp "$1" db:/media/basilisk/downloads/transmission/torrents/; } -rln() { ln -s "$(readlink -f "$1")" "$2"; } -getgit() { git clone git@db:"$1"; } - -ipc() -{ - if [ "$(ip link show eno1 | awk -F, 'NR=1 {print $3}')" = "UP" ] - then - doas ip link set eno1 down - else - doas ip link set eno1 up - fi -} - -psgrep() -{ - [ $# -eq 0 ] && return 1 - pgrep "$@" | xargs ps -} - -unique() { - f="$(mktemp)" - awk '!x[$0]++' "$1" > "$f" - mv "$f" "$1" -} - -clip() { - if [ "$WAYLAND_DISPLAY" ] - then - echo -n "$@" | wl-copy - else - echo -n "$@" | xclip -selection clipboard -rmlastnl - fi -} - -unzipp() { - unzip -- "$(readlink -f -- "$1")" || return 1 - rm -- "$1" -} - -# fix long waiting time -__git_files() { - _wanted files expl 'local files' _files -} - -esc() { - $EDITOR "$(which $1)" -} - -delfile() { - curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}" -} -upfile() { - curl -F "file=@\"$1\"" ${2:-https://0x0.st} -} - -# git -sgd() { - d="$PWD" - find $HOME/src -maxdepth 1 -mindepth 1 -type d | - while read -r dir - do - cd "$dir" - git status > /dev/null 2>&1 || continue - git fetch > /dev/null 2>&1 - printf "$PWD" - test "$(git status --short 2>/dev/null | grep -v "??" | head -1)" && - printf " \e[1;31m*changes\e[0m" | sed "s#$HOME#~#" >&2 - test "$(parse_git_remote)" && - printf " \e[0;32m*push/pull\e[0m" | sed "s#$HOME#~#" >&2 - printf "\n" - done - cd "$d" - unset d -} - -ginit() -{ - [ "$1" ] || return 1 - ssh db /var/git/initdir.sh "$1" - git remote add origin git@db:"$1.git" - git push --set-upstream origin $(git_current_branch) -} - -# Returns current branch -git_current_branch() -{ - command git rev-parse --git-dir > /dev/null 2>&1 || return - git branch --show-current -} - -# Check if main exists and use instead of master -git_main_branch() -{ - command git rev-parse --git-dir > /dev/null 2>&1 || return - for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default} - do - if command git show-ref -q --verify $ref; then - echo ${ref:t} - return - fi - done - echo master -} - -# Check for develop and similarly named branches -function git_develop_branch() { - command git rev-parse --git-dir > /dev/null 2>&1 || return - for branch in dev devel development - do - if command git show-ref -q --verify refs/heads/$branch - then - echo $branch - return - fi - done - echo develop -} - -# gpg backup -gpg_backup() -{ - # $1: option - # $2: output file (without .asc) - gpg_command() {gpg "$1" --armor > "$2".asc ; } - gpg_command --export-secret-keys "private" - gpg_command --export "public" - gpg_command --export-ownertrust "trust" - tar -czvf gpg_backup.tar.gz public.asc private.asc trust.asc - shred -uz public.asc private.asc trust.asc -} - -gpg_import() -{ - tar xf $1 - shred -uz $1 - gpg --import public.asc - gpg --import-ownertrust trust.asc - gpg --import private.asc - shred -uz public.asc private.asc trust.asc -} - -ngenable() -{ - ln -sf /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/ -} - -vbsr() -{ - vboxmanage snapshot "$1" restore "$2" && - vboxmanage startvm "$1" || - vboxmanage controlvm "$1" poweroff -} -vbsrr() -{ - vbsr "$1" "$2" - sleep 3 - vbsr "$1" "$2" -} -vbst() -{ - vboxmanage snapshot "$1" take "$2" -} - -pacsize() -{ - if test -n "$1"; then - packages="$@" - elif test ! -t 0; then - packages="$(cat)" - else - echo "No data provided..." - return 1 - fi - echo $packages | - expac '%m %n' - | - numfmt --to=iec-i --suffix=B --format="%.2f" -} - -mime-default () -{ - [ "${mime:=$1}" ] || - mime="$(find /usr/share/applications/ -iname '*.desktop' -printf '%f\n' | - sed 's/\.desktop$//' | - fzf)" - - logn "Setting '$mime' as default for its mimetypes" - [ "$mime" ] || exit 1 - grep "MimeType=" /usr/share/applications/"$mime".desktop | - cut -d '=' -f 2- | tr ';' '\0' | - xargs -0I{} xdg-mime default "$mime".desktop "{}" - logn "Done." -} - -addedkeys() { - find ~/.ssh -iname "*.pub" | while read key - do - fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)" - if ssh-add -l | grep -q "$fingerprint" - then - echo "$key" - fi - done | sed "s,$HOME/.ssh/,," -} - -fpass() { - find $HOME/.password-store -type f -not -path ".git" | - grep "\.gpg$" | - sed "s,$HOME/.password-store/,,;s,\.gpg$,," | - fzf | - xargs pass show -c -} - -muttmail() -{ - config="$HOME/.config/mutt" - mail="$(find "$config"/configs -type f -printf '%f\n' | fzf)" - [ "$mail" ] || return 1 - ln -sf "$config/configs/$mail" "$config"/muttrc - mutt -} - -resize() -{ - test $# -lt 2 && - printf "usage: %s [out]\n" "$0" >&2 && - return 1 - convert -resize $1^ -gravity center -crop $1+0+0 -- "$2" "${3:-$1}" -} - -edit_in_dir() { - file="$1/$(goo f "$1" | sed "s@^$1@@" | fzf)" - [ -f "$file" ] || return 1 - $EDITOR "$file" -} - -to_webm() -{ - ffmpeg -y -i "$1" -vcodec libvpx -cpu-used -12 -deadline realtime "${1%.*}".webm -} diff --git a/config/home/.bashrc b/config/home/.bashrc index 33dbba4..de7659a 100644 --- a/config/home/.bashrc +++ b/config/home/.bashrc @@ -6,4 +6,5 @@ bold="\[\033[1m\]" reset="\[\033[0m\]" PS1="${color1}${bold} [\\u${reset}@${color2}${bold}\\h]${reset} \\w " HISTFILE= -. $HOME/.config/zsh/aliases.sh +. $HOME/.config/shell/aliases.sh +. $HOME/.config/shell/functions.sh -- cgit v1.2.3 From d29b1ce8dded4f19bcbd6b667b8ac2eb454a315d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 13 Dec 2023 01:28:52 +0100 Subject: stop screensaver in mpv --- config/common/mpv/mpv.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/common/mpv/mpv.conf b/config/common/mpv/mpv.conf index 7d9d1fe..25f4cd2 100755 --- a/config/common/mpv/mpv.conf +++ b/config/common/mpv/mpv.conf @@ -24,6 +24,8 @@ demuxer-max-back-bytes=75000000 # Force stream to be seekable even if disabled. force-seekable=yes +stop-screensaver=yes + slang=eng, en, english alang=jpn -- cgit v1.2.3 From 1ff4fb9bfec25b33e25976a58aa5c87bede4a642 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 13 Dec 2023 01:29:05 +0100 Subject: use 10 minutes cautolock --- config/X/x11/xinitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index 2b2d5f1..3924917 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -24,7 +24,7 @@ xcompmgr & feh --no-fehbg --bg-scale ~/pics/wallpaper setxkbmap -option ctrl:swapcaps xmodmap -e "keycode 135 = Super_L" -xautolock -time 5 -locker slock & +# xautolock -locker slock & gammastep -m randr & slstatus & emacs --daemon & -- cgit v1.2.3 From fc8e63e77a77b716738fe11be1c7d761051afbd7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 13 Dec 2023 09:11:43 +0100 Subject: cleanup --- .gitignore | 1 + config/essentials/zsh/.zshrc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6f3df81..596f575 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ config/hyprland/waybar/colors.css config/old/vim/plugged/ config/old/vim/viminfo* config/theme/gtk-3.0/bookmarks +/config/essentials/zsh/.zcompdump diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 230de24..2223c67 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -75,7 +75,7 @@ do [ -f "$file" ] && . "$file" && break done case "${ID:=unknown}" in debian|ubuntu) PLUGPATH=/usr/share/ ;; - unknown) PLUGPATH=$HOME/.config/zsh/plugins ;; + unknown) PLUGPATH=$ZDOTDIR/plugins ;; *) PLUGPATH=/usr/share/zsh/plugins ;; esac . $PLUGPATH/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -- cgit v1.2.3 From a2819f2316fa14d87506fc77e973e03197bf7ce2 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 15 Dec 2023 12:18:39 +0100 Subject: Added aliases --- config/essentials/shell/aliases.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 157e7aa..eed3fa0 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -223,28 +223,29 @@ alias vblsr='vbm list runningvms' alias vb='vbm startvm' # quick config -alias ez='$EDITOR ${ZDOTDIR:-~}/.zshrc' -alias eza='$EDITOR $HOME/.config/shell/aliases.sh' -alias ezf='$EDITOR $HOME/.config/shell/functions.sh' -alias eto='$EDITOR ~/sync/TODO' -alias edw='$EDITOR ~/proj/suckless/dwm/config.def.h' -alias edm='$EDITOR ~/proj/suckless/dmenu/config.def.h' -alias ehst='$EDITOR $ZDOTDIR/histfile' -alias ezh=' $EDITOR $HISTFILE' -alias est='$EDITOR ~/proj/suckless/st/config.def.h' -alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' -alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' -alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' -alias ehyb='$EDITOR ~/.config/hypr/binds.conf' -alias ewbj='$EDITOR ~/.config/waybar/config.jsonc' -alias ewbs='$EDITOR ~/.config/waybar/style.css' -alias cfd='$EDITOR config.def.h' +alias ez='vi ${ZDOTDIR:-~}/.zshrc' +alias eza='vi $HOME/.config/shell/aliases.sh' +alias ezf='vi $HOME/.config/shell/functions.sh' +alias eto='vi ~/sync/TODO' +alias edw='vi ~/proj/suckless/dwm/config.def.h' +alias edm='vi ~/proj/suckless/dmenu/config.def.h' +alias ehst='vi $ZDOTDIR/histfile' +alias ezh=' vi $HISTFILE' +alias est='vi ~/proj/suckless/st/config.def.h' +alias esl='vi ~/proj/suckless/slock/config.def.h' +alias esls='vi ~/proj/suckless/slstatus/config.def.h' +alias ehy='vi ~/.config/hypr/hyprland.conf' +alias ehyb='vi ~/.config/hypr/binds.conf' +alias ewbj='vi ~/.config/waybar/config.jsonc' +alias ewbs='vi ~/.config/waybar/style.css' +alias cfd='vi config.def.h' # /# quick cd jV}k:!sort -t "'" -k 2 alias cdl='cd ~/dl' alias cdoc='cd ~/docs' alias czk='cd ~/docs/zk' alias cda='cd ~/docs/android/projects' alias csv='cd ~/docs/school/Vakken' +alias cdpj='cd ~/docs/school/Vakken/ITProj' alias cdm='cd ~/music' alias cdp='cd ~/pics' alias cdpa='cd ~/pics/ai-outputs/' @@ -313,8 +314,8 @@ alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' # oh-my-zsh git aliases alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' -alias cfg='$EDITOR ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' -alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR' +alias cfg='vi ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' +alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs vi' alias g='git' alias ga='git add' alias gaa='git add --all' -- cgit v1.2.3 From d75c2e1af43b44950dbb210da9fcc94a9b9656e8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 16 Dec 2023 20:44:06 +0100 Subject: rebase must exist --- config/essentials/git/config | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/essentials/git/config b/config/essentials/git/config index 66ed53e..92bd6e5 100644 --- a/config/essentials/git/config +++ b/config/essentials/git/config @@ -3,7 +3,3 @@ [user] email = raymaekers.luca@gmail.com name = Raymaekers Luca -[pull] - rebase = false -[merge] - ff = false -- cgit v1.2.3 From 2601dc4b2e0eb8785fda7196c2f8d42799ddd668 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sat, 16 Dec 2023 20:44:14 +0100 Subject: added autosetupremote --- config/essentials/git/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/essentials/git/config b/config/essentials/git/config index 92bd6e5..90bab4f 100644 --- a/config/essentials/git/config +++ b/config/essentials/git/config @@ -3,3 +3,5 @@ [user] email = raymaekers.luca@gmail.com name = Raymaekers Luca +[push] + autoSetupRemote = true -- cgit v1.2.3 From 5c02201e73b5f95ead515219913c2fcbeb1ecb1f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 19 Dec 2023 07:24:52 +0100 Subject: added aliases --- config/essentials/shell/aliases.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 157e7aa..eed3fa0 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -223,28 +223,29 @@ alias vblsr='vbm list runningvms' alias vb='vbm startvm' # quick config -alias ez='$EDITOR ${ZDOTDIR:-~}/.zshrc' -alias eza='$EDITOR $HOME/.config/shell/aliases.sh' -alias ezf='$EDITOR $HOME/.config/shell/functions.sh' -alias eto='$EDITOR ~/sync/TODO' -alias edw='$EDITOR ~/proj/suckless/dwm/config.def.h' -alias edm='$EDITOR ~/proj/suckless/dmenu/config.def.h' -alias ehst='$EDITOR $ZDOTDIR/histfile' -alias ezh=' $EDITOR $HISTFILE' -alias est='$EDITOR ~/proj/suckless/st/config.def.h' -alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' -alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' -alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' -alias ehyb='$EDITOR ~/.config/hypr/binds.conf' -alias ewbj='$EDITOR ~/.config/waybar/config.jsonc' -alias ewbs='$EDITOR ~/.config/waybar/style.css' -alias cfd='$EDITOR config.def.h' +alias ez='vi ${ZDOTDIR:-~}/.zshrc' +alias eza='vi $HOME/.config/shell/aliases.sh' +alias ezf='vi $HOME/.config/shell/functions.sh' +alias eto='vi ~/sync/TODO' +alias edw='vi ~/proj/suckless/dwm/config.def.h' +alias edm='vi ~/proj/suckless/dmenu/config.def.h' +alias ehst='vi $ZDOTDIR/histfile' +alias ezh=' vi $HISTFILE' +alias est='vi ~/proj/suckless/st/config.def.h' +alias esl='vi ~/proj/suckless/slock/config.def.h' +alias esls='vi ~/proj/suckless/slstatus/config.def.h' +alias ehy='vi ~/.config/hypr/hyprland.conf' +alias ehyb='vi ~/.config/hypr/binds.conf' +alias ewbj='vi ~/.config/waybar/config.jsonc' +alias ewbs='vi ~/.config/waybar/style.css' +alias cfd='vi config.def.h' # /# quick cd jV}k:!sort -t "'" -k 2 alias cdl='cd ~/dl' alias cdoc='cd ~/docs' alias czk='cd ~/docs/zk' alias cda='cd ~/docs/android/projects' alias csv='cd ~/docs/school/Vakken' +alias cdpj='cd ~/docs/school/Vakken/ITProj' alias cdm='cd ~/music' alias cdp='cd ~/pics' alias cdpa='cd ~/pics/ai-outputs/' @@ -313,8 +314,8 @@ alias dbsmu='rsync -aPz db:/media/basilisk/music/ /media/kilimanjaro/music' # oh-my-zsh git aliases alias config='GIT_WORK_TREE=~/src/dotfiles/ GIT_DIR=~/src/dotfiles/.git' -alias cfg='$EDITOR ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' -alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs $EDITOR' +alias cfg='vi ~/src/dotfiles/"$(config git ls-files | fzf || exit)"' +alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs vi' alias g='git' alias ga='git add' alias gaa='git add --all' -- cgit v1.2.3 From 82fe753f3dd60d358ee399ff7ac5740f849a1741 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 3 Jan 2024 16:07:17 +0100 Subject: update --- bin/common/ytclipo | 4 ++-- config/essentials/git/config | 7 ++++++- config/essentials/shell/aliases.sh | 2 +- config/essentials/shell/functions.sh | 2 +- config/essentials/zsh/.zshrc | 2 +- config/home/.bashrc | 4 +++- config/home/.zshenv | 4 ++-- config/theme/fontconfig/fonts.conf | 3 ++- 8 files changed, 18 insertions(+), 10 deletions(-) diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 1a82df2..6416a15 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -2,7 +2,7 @@ inp="$(ytlink)" >&2 printf "inp: %s\n" "$inp" -notify-send "ytclipo" "downloading $inp" || : +# notify-send "ytclipo" "downloading $inp" || : yt-dlp "$inp" \ --restrict-filenames \ @@ -11,4 +11,4 @@ yt-dlp "$inp" \ -S "res:1080" \ -P "$HOME/vids/youtube/" \ -o "%(channel)s/%(title)s.%(ext)s" -notify-send "ytclipo" "finished downloading." || : +# notify-send "ytclipo" "finished downloading." || : diff --git a/config/essentials/git/config b/config/essentials/git/config index 90bab4f..fcf80db 100644 --- a/config/essentials/git/config +++ b/config/essentials/git/config @@ -3,5 +3,10 @@ [user] email = raymaekers.luca@gmail.com name = Raymaekers Luca + signingkey = 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D [push] - autoSetupRemote = true + autosetupremote = true +[pull] + rebase = false +[commit] + gpgsign = true diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index eed3fa0..99c49d8 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -140,7 +140,7 @@ alias ss4='ss -tln4p' alias mdb='mariadb -u admin -ppass admindb' alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' -alias tmux='tmux a || tmux' +alias tmux='pgrep tmux && tmux attach || tmux new-session' # ssh alias sha='ssh-add' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 37e471c..b699a86 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -110,7 +110,7 @@ __git_files() { } esc() { - $EDITOR "$(which $1)" + eval "$EDITOR '$(which $1)'" } delfile() { diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 2223c67..99c65d7 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -153,7 +153,7 @@ command_not_found_handler () { } # prompt -PS1=' %B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~ ' +PS1=' %K{16}%B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~%k ' RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)' setopt prompt_subst diff --git a/config/home/.bashrc b/config/home/.bashrc index de7659a..312500d 100644 --- a/config/home/.bashrc +++ b/config/home/.bashrc @@ -2,9 +2,11 @@ SHELL=/bin/bash PATH=$HOME/bin:$PATH color1="\[\033[35m\]" color2="\[\033[36m\]" +color3="\[\033[40m\]" +color4="\[\033[38m\]" bold="\[\033[1m\]" reset="\[\033[0m\]" -PS1="${color1}${bold} [\\u${reset}@${color2}${bold}\\h]${reset} \\w " +PS1="${color1}${bold} ${color3}\\u${reset}${color3}${color4}@${color2}${bold}\\h${reset}${color3} \\w${reset} " HISTFILE= . $HOME/.config/shell/aliases.sh . $HOME/.config/shell/functions.sh diff --git a/config/home/.zshenv b/config/home/.zshenv index d33fbd7..e8021ec 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -1,6 +1,6 @@ #!/bin/zsh -export EDITOR="emacsclient -t" -export VISUAL="emacsclient -t -c -a emacs" +export EDITOR="emacsclient -nw -q" +export VISUAL="emacsclient -nw -q" export BROWSER="librewolf" export VIEWER="zathura" diff --git a/config/theme/fontconfig/fonts.conf b/config/theme/fontconfig/fonts.conf index 8681e4e..625dd34 100644 --- a/config/theme/fontconfig/fonts.conf +++ b/config/theme/fontconfig/fonts.conf @@ -16,7 +16,8 @@ monospace - JetBrains Mono + JetBrains Mono + JetBrains Mono NerdFont Joy Pixels -- cgit v1.2.3 From 28fbc218f45b35527ea5e25d5f62c388fc02b5e1 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 4 Jan 2024 19:30:21 +0100 Subject: add ls after cd --- config/essentials/zsh/.zshrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 99c65d7..90f4b14 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -145,13 +145,14 @@ function osc7 { add-zsh-hook -Uz chpwd osc7 command_not_found_handler () { if [[ -o interactive ]] && isTextFile "$1" - then - "$EDITOR" "$1" - else - echo "zsh: command not found: $1" >&2 + then "$EDITOR" "$1" + else echo "zsh: command not found: $1" >&2 fi } +# automatic ls after cd +add-zsh-hook -Uz chpwd (){[ "$PWD" != "$HOME" ] && ls -a; } + # prompt PS1=' %K{16}%B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~%k ' RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)' -- cgit v1.2.3 From 0d10205772b2745356969176de6f52510527e5a6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 4 Jan 2024 20:45:39 +0100 Subject: Add more scripts --- bin/extra/mariadb-adduser | 25 +++++++++++++++++++++++++ bin/extra/oclipp | 2 ++ 2 files changed, 27 insertions(+) create mode 100755 bin/extra/mariadb-adduser create mode 100755 bin/extra/oclipp diff --git a/bin/extra/mariadb-adduser b/bin/extra/mariadb-adduser new file mode 100755 index 0000000..d4e1b45 --- /dev/null +++ b/bin/extra/mariadb-adduser @@ -0,0 +1,25 @@ +#!/bin/sh +if [ "$(id -u)" -ne 0 ] +then + >&2 printf "Not root.\n" + exit 1 +fi + +printf 'name? ' +name="$(head -n 1)" +printf 'password? ' +password="$(head -n 1)" +printf 'database? ' +database="$(head -n 1)" + +( + cat <