From 970ffdd161485cf32b0acf31a1804df3f57983f5 Mon Sep 17 00:00:00 2001 From: ThanosApollo Date: Mon, 31 Oct 2022 10:09:14 +0200 Subject: Update UI, disable evil-mode, add elfeed --- .emacs.d/init.el | 178 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 123 insertions(+), 55 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 787443d..61da89c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1,9 +1,12 @@ +;; init.el ;; + (require 'package) +(add-to-list 'load-path "~/.emacs.d/lisp/") (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/") ("elpa" . "https://elpa.gnu.org/packages/"))) - + (package-initialize) (unless package-archive-contents (package-refresh-contents)) @@ -16,43 +19,49 @@ (setq inhibit-startup-message nil) -(defvar apollo/default-font-size 130) + (defvar apollo/default-font-size 130) + + (set-face-attribute 'default nil :font "JetBrains Mono" :height 130) -(set-face-attribute 'default nil :font "JetBrains Mono" :height 130) + (scroll-bar-mode -1) + (tool-bar-mode -1) + (tooltip-mode -1) + (set-fringe-mode 10) + (menu-bar-mode -1) + (blink-cursor-mode -1) + (menu-bar--visual-line-mode-enable) + ;Visible bell + (setq visible-bell t) +;;Transparency +;;(set-frame-parameter (selected-frame) 'alpha '(90 80)) +;;(add-to-list 'default-frame-alist '(alpha 90 50)) -(scroll-bar-mode -1) -(tool-bar-mode -1) -(tooltip-mode -1) -(set-fringe-mode 10) -(menu-bar-mode -1) -(blink-cursor-mode -1) -(menu-bar--visual-line-mode-enable) -;Visible bell -(setq visible-bell t) -(column-number-mode) -(global-display-line-numbers-mode t) -(menu-bar--display-line-numbers-mode-relative) -;;Disable line numbers for some modes -(dolist (mode '(pdf-view-mode-hook - org-mode-hook - term-mode-hook - shell-mode-hook - eshell-mode-hook)) - (add-hook mode (lambda () (display-line-numbers-mode 0)))) + (column-number-mode) + (global-display-line-numbers-mode t) + (menu-bar--display-line-numbers-mode-relative) + ;;Disable line numbers for some modes + (dolist (mode '(pdf-view-mode-hook + org-mode-hook + term-mode-hook + shell-mode-hook + eshell-mode-hook + vterm-mode-hook + elfeed)) + (add-hook mode (lambda () (display-line-numbers-mode 0)))) (set-face-attribute 'default nil :font "JetBrains Mono" :height apollo/default-font-size) (set-face-attribute 'fixed-pitch nil - :font "Arial" - :height 260) + :font "JetBrains Mono" + :height apollo/default-font-size) (set-face-attribute 'variable-pitch nil - :font "Cantarell" - :height 295 + :font "JetBrains Mono" + :height apollo/default-font-size :weight 'regular) (use-package doom-themes @@ -132,39 +141,53 @@ "tt" '(counsel-load-theme :which-key "choose theme"))) - (use-package evil - :init - (setq evil-want-integration t) - (setq evil-want-keybinding nil) - (setq evil-want-C-u-scroll t) - (setq evil-want-C-i-jump nil) - ;;:hook (evil-mode . apollo/evil-hook) - :config - (evil-mode 1) - (define-key evil-insert-state-map (kbd "C-f") 'evil-normal-state) - - (evil-global-set-key 'motion "j" 'evil-next-visual-line) - (evil-global-set-key 'motion "k" 'evil-previous-visual-line) - - (evil-set-initial-state 'messages-buffer-mode 'normal) - (evil-set-initial-state 'dashboard-mode 'normal) - (evil-define-key 'normal dired-mode-map - (kbd "h") 'dired-up-directory - (kbd "l") 'dired-find-file - (kbd "m") 'dired-mark - (kbd "R") 'dired-do-rename - (kbd "D") 'dired-do-delete) - ) - - (use-package evil-collection - :after evil - :config - (evil-collection-init)) + ;; (use-package evil + ;; :init + ;; (setq evil-want-integration t) + ;; (setq evil-want-keybinding nil) + ;; (setq evil-want-C-u-scroll t) + ;; (setq evil-want-C-i-jump nil) + ;; ;;:hook (evil-mode . apollo/evil-hook) + ;; :config + ;; (evil-mode 1) + ;; (define-key evil-insert-state-map (kbd "C-f") 'evil-normal-state) + + ;; (evil-global-set-key 'motion "j" 'evil-next-visual-line) + ;; (evil-global-set-key 'motion "k" 'evil-previous-visual-line) + + ;; (evil-set-initial-state 'messages-buffer-mode 'normal) + ;; (evil-set-initial-state 'dashboard-mode 'normal) + ;; (evil-define-key 'normal dired-mode-map + ;; (kbd "h") 'dired-up-directory + ;; (kbd "l") 'dired-find-file + ;; (kbd "m") 'dired-mark + ;; (kbd "R") 'dired-do-rename + ;; (kbd "D") 'dired-do-delete) + ;; ) + + ;; (use-package evil-collection + ;; :after evil + ;; :config + ;; (evil-collection-init)) ;;Ibuffer (global-set-key (kbd "C-x C-b") 'ibuffer) ;;Counsel (global-set-key (kbd "M-;") 'counsel-M-x) (global-set-key (kbd "C-;") 'counsel-find-file) +(global-set-key (kbd "C-e") 'move-end-of-line) +(define-prefix-command 'window) +(global-set-key (kbd "C-w") 'window) +(global-set-key (kbd "C-w C-l") 'windmove-right) +(global-set-key (kbd "C-w C-h") 'windmove-left) +(global-set-key (kbd "C-w C-v") 'split-window-right) +(global-set-key (kbd "C-w C-c") 'delete-window) + +;; (use-package god-mode +;; :init +;; (god-mode) +;; :config +;; (global-set-key (kbd "C-f") #'god-mode-all)) + (apollo/leader-keys "g" '(:ignore t :which-key "Git") @@ -300,7 +323,10 @@ (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'apollo/org-babel-tangle-config))) ;;instal flyckeck -(use-package flyckeck) +(use-package flycheck) +;;Enable globally +(global-flycheck-mode) + ;;setup lsp-mode (defun apollo/lsp-mode-setup () (setq lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols)) @@ -338,8 +364,18 @@ :prefix lsp-keymap-prefix "d" '(dap-hydra t :wk "debugger"))) +;;; init-javascript.el --- Support for Javascript and derivatives -*- lexical-binding: t -*- + ;;; Commentary: + ;;; Code: +;; (use-package json-mode +;; :mode "\\.json\\" +;; :hook (json-mode . lsp-deferred)) +;; (use-package js2-mode +;; :mode "\\.js\\'") + ;;(provide 'init-javascript) + (use-package typescript-mode :mode "\\.ts\\'" :hook (typescript-mode .lsp-deferred) @@ -381,3 +417,35 @@ (use-package magit :custom (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) + +;;terminals +(use-package vterm) + + +;;elfeed +(use-package elfeed + :config + (setq elfeed-search-feed-face ":foreground #fff :weight bold" + elfeed-feeds (quote + ( + ("https://hackaday.com/blog/feed/" hackaday linux) + ("https://opensource.com/feed" opensource linux) + ("https://linux.softpedia.com/backend.xml" softpedia linux) + ("https://www.thelancet.com/rssfeed/ebiom_current.xml" Lancet ebiom) + ("https://www.thelancet.com/rssfeed/lancet_current.xml" Lancet lancet) + ("https://www.thelancet.com/rssfeed/ebiom_online.xml" LancetOnline ebiom) + ("https://www.thelancet.com/rssfeed/lancet_online.xml" LancetOnline lancet) + ("https://www.thelancet.com/rssfeed/lanmic_online.xml" LancetOnline Microbiology) + ("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linu) + ))) + + ) + +(use-package elfeed-goodies + :init + (elfeed-goodies/setup) + :config + (setq elfeed-goodies/entry-pane-size 0.5)) + + +;;init.el ends here -- cgit v1.2.3