diff --git a/.Xmodmap b/.Xmodmap new file mode 100644 index 0000000..41b04f4 --- /dev/null +++ b/.Xmodmap @@ -0,0 +1,3 @@ +clear Lock +keycode 66 = Control_R +add Control = Control_R \ No newline at end of file diff --git a/.bashrc b/.bashrc index 723f39d..0e711c6 100644 --- a/.bashrc +++ b/.bashrc @@ -26,6 +26,7 @@ if [ -d "$HOME/go" ] ; then fi # export PATH="$HOME/.gem/ruby/2.7.0/bin/:$PATH" +[ -f "/home/pavel/.ghcup/env" ] && source "/home/pavel/.ghcup/env" # ghcup-env if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" && ${use_fish} ]] then @@ -136,4 +137,3 @@ alias ll="exa -lah --icons" alias q="exit" alias c="clear" - diff --git a/.config/i3/config b/.config/i3/config index ac10ead..230d1a8 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -288,7 +288,7 @@ mode "apps" { bindsym c exec "copyq toggle"; mode default bindsym k exec "keepassxc"; mode default bindsym e exec mailspring; mode default - bindsym a exec emacs; mode default + bindsym a exec "bash /home/pavel/bin/emacs.sh"; mode default # bindsym a exec emacsclient -c; mode default # bindsym Shift+a exec emacs; mode default } diff --git a/.config/polybar/config b/.config/polybar/config index 9a23a03..21a8af5 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -97,6 +97,7 @@ content = "|" content-foreground = ${colors.magenta} content-padding = 0 content-margin = 0 +interval = 0 [module/TSEP] type = custom/script diff --git a/.emacs.d/emacs.org b/.emacs.d/emacs.org index f9e924f..6322b25 100644 --- a/.emacs.d/emacs.org +++ b/.emacs.d/emacs.org @@ -45,9 +45,12 @@ #+begin_src emacs-lisp (setenv "IS_EMACS" "true") #+end_src -*** Add rust stuff to =exec-path= -#+begin_src emacs-lisp -(add-to-list 'exec-path (expand-file-name "~/.cargo/bin")) +*** OFF Add stuff to PATH and =exec-path= +#+begin_src emacs-lisp :tangle no +(setq my/extra-paths '("~/.cargo/bin" "~/.cabal/bin" "~/.ghcup/bin")) + +(dolist (path my/extra-paths) (add-to-list 'exec-path (expand-file-name path))) +(setenv "PATH" (concat (string-join my/extra-paths ":") ":" (getenv "PATH"))) #+end_src *** Custom file location #+begin_src emacs-lisp @@ -167,7 +170,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package evil-collection :straight t :config - (evil-collection-init '(eww dired company vterm flycheck profiler))) + (evil-collection-init '(eww dired company vterm flycheck profiler cider))) (use-package evil-quickscope :straight t @@ -502,10 +505,20 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (add-hook 'visual-fill-column-mode-hook (lambda () (setq visual-fill-column-center-text t)))) #+end_src -*** Electric pair -#+begin_src emacs-lisp +*** OFF Electric pair +#+begin_src emacs-lisp :tangle no (electric-pair-mode) #+end_src +*** Smart Parens +#+begin_src emacs-lisp +(use-package smartparens + :straight t) +#+end_src +*** Aggressive Indent +#+begin_src emacs-lisp +(use-package aggressive-indent + :straight t) +#+end_src *** Tabs #+begin_src emacs-lisp (setq tab-always-indent nil) @@ -721,7 +734,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." ** Installation #+begin_src emacs-lisp (straight-override-recipe - '(org :type git :host github :repo "emacsmirror/org" :no-build t)) + '(org :repo "emacsmirror/org" :no-build t)) (use-package org :straight t) @@ -733,6 +746,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." :after (org evil-collection) :config (add-hook 'org-mode-hook 'evil-org-mode) + (add-hook 'org-mode-hook #'smartparens-mode) (add-hook 'evil-org-mode-hook (lambda () (evil-org-set-key-theme '(navigation insert textobjects additional calendar todo)))) @@ -781,7 +795,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." #+begin_src emacs-lisp (use-package org-latex-impatient :straight ( - :repo "https://github.com/yangsheng6810/org-latex-impatient.git", + :repo "yangsheng6810/org-latex-impatient" :branch "master") :hook (org-mode . org-latex-impatient-mode) :init @@ -1097,6 +1111,8 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (setq lsp-eslint-server-command '("node" "/home/pavel/.emacs.d/.cache/lsp/eslint/unzipped/extension/server/out/eslintServer.js" "--stdio")) (setq lsp-eslint-run "onSave") (setq lsp-signature-render-documentation nil) + ; (lsp-headerline-breadcrumb-mode nil) + (setq lsp-headerline-breadcrumb-enable nil) (add-to-list 'lsp-language-id-configuration '(svelte-mode . "svelte")) ) @@ -1163,6 +1179,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." #+begin_src emacs-lisp (use-package dap-mode :straight t + :defer t :init (setq lsp-enable-dap-auto-configure nil) :config @@ -1222,7 +1239,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." #+begin_src emacs-lisp :tangle no (use-package code-compass :straight ( - :repo "https://github.com/ag91/code-compass" + :repo "ag91/code-compass" :files ("code-compass.el") :branch "main" )) @@ -1232,6 +1249,8 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." #+begin_src emacs-lisp (use-package typescript-mode :straight t) + +(add-hook 'typescript-mode-hook #'smartparens-mode) #+end_src *** Override flycheck checker with eslint #+begin_src emacs-lisp @@ -1253,6 +1272,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." ;; #'set-flycheck-eslint) (add-hook 'vue-mode-hook #'hs-minor-mode) +(add-hook 'vue-mode-hook #'smartparens-mode) (with-eval-after-load 'editorconfig (add-to-list 'editorconfig-indentation-alist @@ -1265,12 +1285,15 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (add-hook 'vue-mode-hook (lambda () (set-face-background 'mmm-default-submode-face nil))) #+end_src -** Haskell +** Clojure #+begin_src emacs-lisp -(use-package haskell-mode +(use-package clojure-mode :straight t) -(use-package lsp-haskell +(add-hook 'clojure-mode-hook #'smartparens-strict-mode) +(add-hook 'clojure-mode-hook #'aggressive-indent-mode) + +(use-package cider :straight t) #+end_src ** Svelte @@ -1431,6 +1454,14 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package clips-mode :straight t) #+end_src +** Haskell +#+begin_src emacs-lisp +(use-package haskell-mode + :straight t) + +(use-package lsp-haskell + :straight t) +#+end_src ** Docker #+begin_src emacs-lisp (use-package dockerfile-mode @@ -1483,7 +1514,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." ** Snow #+begin_src emacs-lisp (use-package snow - :straight (:repo "https://github.com/alphapapa/snow.el")) + :straight (:repo "alphapapa/snow.el")) #+end_src ** OFF Buku #+begin_src emacs-lisp :tangle no diff --git a/.emacs.d/init.el b/.emacs.d/init.el index df0535a..055014e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -30,8 +30,6 @@ (setenv "IS_EMACS" "true") -(add-to-list 'exec-path (expand-file-name "~/.cargo/bin")) - (setq custom-file (concat user-emacs-directory "custom.el")) (load custom-file 'noerror) @@ -128,7 +126,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package evil-collection :straight t :config - (evil-collection-init '(eww dired company vterm flycheck profiler))) + (evil-collection-init '(eww dired company vterm flycheck profiler cider))) (use-package evil-quickscope :straight t @@ -433,7 +431,11 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (add-hook 'visual-fill-column-mode-hook (lambda () (setq visual-fill-column-center-text t)))) -(electric-pair-mode) +(use-package smartparens + :straight t) + +(use-package aggressive-indent + :straight t) (setq tab-always-indent nil) @@ -624,7 +626,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." "M-h" 'vterm-send-left) (straight-override-recipe - '(org :type git :host github :repo "emacsmirror/org" :no-build t)) + '(org :repo "emacsmirror/org" :no-build t)) (use-package org :straight t) @@ -634,6 +636,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." :after (org evil-collection) :config (add-hook 'org-mode-hook 'evil-org-mode) + (add-hook 'org-mode-hook #'smartparens-mode) (add-hook 'evil-org-mode-hook (lambda () (evil-org-set-key-theme '(navigation insert textobjects additional calendar todo)))) @@ -673,7 +676,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package org-latex-impatient :straight ( - :repo "https://github.com/yangsheng6810/org-latex-impatient.git", + :repo "yangsheng6810/org-latex-impatient" :branch "master") :hook (org-mode . org-latex-impatient-mode) :init @@ -936,6 +939,8 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (setq lsp-eslint-server-command '("node" "/home/pavel/.emacs.d/.cache/lsp/eslint/unzipped/extension/server/out/eslintServer.js" "--stdio")) (setq lsp-eslint-run "onSave") (setq lsp-signature-render-documentation nil) + ; (lsp-headerline-breadcrumb-mode nil) + (setq lsp-headerline-breadcrumb-enable nil) (add-to-list 'lsp-language-id-configuration '(svelte-mode . "svelte")) ) @@ -993,6 +998,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package dap-mode :straight t + :defer t :init (setq lsp-enable-dap-auto-configure nil) :config @@ -1036,6 +1042,8 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package typescript-mode :straight t) + +(add-hook 'typescript-mode-hook #'smartparens-mode) (defun set-flycheck-eslint() "Override flycheck checker with eslint." @@ -1052,6 +1060,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." ;; #'set-flycheck-eslint) (add-hook 'vue-mode-hook #'hs-minor-mode) +(add-hook 'vue-mode-hook #'smartparens-mode) (with-eval-after-load 'editorconfig (add-to-list 'editorconfig-indentation-alist @@ -1064,10 +1073,13 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (add-hook 'vue-mode-hook (lambda () (set-face-background 'mmm-default-submode-face nil))) -(use-package haskell-mode +(use-package clojure-mode :straight t) -(use-package lsp-haskell +(add-hook 'clojure-mode-hook #'smartparens-strict-mode) +(add-hook 'clojure-mode-hook #'aggressive-indent-mode) + +(use-package cider :straight t) (use-package svelte-mode @@ -1205,6 +1217,12 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package clips-mode :straight t) +(use-package haskell-mode + :straight t) + +(use-package lsp-haskell + :straight t) + (use-package dockerfile-mode :straight t) @@ -1243,4 +1261,4 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." "-" 'text-scale-decrease) (use-package snow - :straight (:repo "https://github.com/alphapapa/snow.el")) + :straight (:repo "alphapapa/snow.el")) diff --git a/bin/emacs.sh b/bin/emacs.sh new file mode 100755 index 0000000..c4314ef --- /dev/null +++ b/bin/emacs.sh @@ -0,0 +1,12 @@ +if [ -d "$HOME/.cargo" ] ; then + export PATH="$HOME/.cargo/bin:$PATH" +fi +if [ -d "$HOME/.rvm" ] ; then + export PATH="$PATH:$HOME/.rvm/bin" +fi +if [ -d "$HOME/go" ] ; then + export PATH="$HOME/go/bin:$PATH" +fi + +[ -f "/home/pavel/.ghcup/env" ] && source "/home/pavel/.ghcup/env" # ghcup-env +emacs diff --git a/bin/polybar.sh b/bin/polybar.sh index 9bd3386..4f0459b 100755 --- a/bin/polybar.sh +++ b/bin/polybar.sh @@ -44,5 +44,5 @@ for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do export FONT3="JetBrains Mono Nerd Font:monospace:size=$SIZE;1" export HEIGHT=${BAR_HEIGHT[$MONITOR]} export RIGHT_BLOCKS=${BLOCKS[$MONITOR]} - polybar --reload mybar & + polybar mybar & done