From ad40c3d1271554edcba26845a2015d3555c63c37 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Fri, 4 Nov 2022 15:45:55 +0100 Subject: [PATCH] resync with my files. --- .bashrc | 19 ++++++++++++++++++- .emacs.d/init.el | 25 ++++++++++++++++++++----- README.md | 2 +- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/.bashrc b/.bashrc index df8b7bd..0a6966f 100644 --- a/.bashrc +++ b/.bashrc @@ -12,6 +12,8 @@ shopt -s autocd shopt -s globstar shopt -s nocaseglob +PATH="$PATH:$HOME/.local/bin" +CDPATH="~/clones/" if [ -n "$DISPLAY" ] then xset b off @@ -208,5 +210,20 @@ venv() pip-common() { - pip install --upgrade mypy black flake8 jedi-language-server pylint build twine grip tox + python3 -m pip install --upgrade --upgrade-strategy eager mypy black flake8 jedi-language-server pylint build twine grip tox pip +} + +github-gpg() +{ + curl https://github.com/$1.gpg | gpg --import-options show-only --import - +} + +download-random-pypi-proj() +{ + PKG_URL="$(curl -s https://pypi.org/rss/packages.xml | grep -o 'https://pypi.org/project/[^ <]*' | shuf | head -n 1 | sed 's/project/simple/g')" + ARCHIVE_URL="$(curl -s "$PKG_URL" | grep -o 'https://[^ "#]*' | tail -n 1)" + TMP=pypi_$RANDOM$RANDOM + mkdir /tmp/$TMP/ + cd /tmp/$TMP + wget "$ARCHIVE_URL" } diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d786936..c069350 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -16,8 +16,15 @@ (require 'package) (package-initialize) (server-mode) + (setq exec-path (append exec-path '("/home/mdk/.local/bin"))) +(setenv "PATH" ; This is so blacken-mode can find black in ~/.local/bin/ + (concat + (getenv "PATH") path-separator + (getenv "HOME") "/.local/bin/" + )) + (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ("org" . "https://orgmode.org/elpa/") ("melpa" . "https://melpa.org/packages/"))) @@ -38,7 +45,10 @@ (use-package flycheck-grammalecte :ensure t - :config (flycheck-grammalecte-setup)) + :config + (flycheck-grammalecte-setup) + (setq flycheck-global-modes '(not org-mode)) + ) (use-package diminish :ensure t) @@ -92,7 +102,9 @@ (use-package blacken :ensure t :commands (blacken-mode) - :hook (python-mode . blacken-mode)) + :hook (python-mode . blacken-mode) + :config + (setq blacken-only-if-project-is-blackened t)) (use-package org-fancy-priorities :ensure t @@ -155,6 +167,9 @@ ;; Save all backup file in this directory. (setq-default delete-old-versions t) +(auto-save-visited-mode t) +(setq auto-save-visited-interval 1) + (fset 'yes-or-no-p 'y-or-n-p) (setq-default truncate-partial-width-windows nil) @@ -209,7 +224,7 @@ '(c-basic-offset 4) '(frame-background-mode 'dark) '(package-selected-packages - '(flycheck-grammalecte blacken spacemacs-theme company yasnippet-snippets use-package zenburn-theme markdown-mode org po-mode yaml-mode))) + '(rust-mode flycheck-grammalecte blacken spacemacs-theme company yasnippet-snippets use-package zenburn-theme markdown-mode org po-mode yaml-mode))) (load-theme 'spacemacs-light t) (custom-set-faces @@ -219,5 +234,5 @@ ;; If there is more than one, they won't work right. ) -(add-to-list 'default-frame-alist '(font . "LiberationMono:size=18")) -(set-face-attribute 'default t :font "LiberationMono:size=18") +(add-to-list 'default-frame-alist '(font . "DejaVuSansMono:size=18")) +(set-face-attribute 'default t :font "DejaVuSansMono:size=18") diff --git a/README.md b/README.md index d907745..81fbf44 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ apt install \ keepassxc \ libpq-dev \ python-openssl \ - python3-venv \ + python3-full \ tk-dev \ unifont ```