Changeset 9bc0481 in dotfiles
- Timestamp:
- Dec 12, 2024, 4:57:35 PM (5 weeks ago)
- Branches:
- master
- Children:
- eb58262
- Parents:
- f30e1cd
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
X/.Xdefaults
rf30e1cd r9bc0481 47 47 xterm*locale: true 48 48 xterm*vt100.locale: true 49 ! xterm*font: x:-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-150 ! xterm*font: x:-misc-fixed-bold-r-normal--15-*-75-75-c-90-iso10646-151 49 xterm*font: x:-adobe-courier-bold-r-normal--14-*-75-75-m-90-iso10646-1 52 50 xterm*boldMode: false 53 ! xterm*font: x:-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-154 ! xterm*boldFont: x:-adobe-courier-medium-r-bold--14-140-75-75-m-90-iso8859-155 51 xterm*vt100.allowBoldFonts: True 56 52 xterm*renderFont: True -
emacs/.emacs.d/nil
rf30e1cd r9bc0481 2 2 3 3 (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") 4 ("melpa" . "http://melpa.org/packages/")))4 ("melpa" . "http://melpa.org/packages/"))) 5 5 6 6 (when (< emacs-major-version 27) … … 8 8 9 9 (require 'gnutls) 10 11 (progn12 (package-refresh-contents)13 (package-install 'avy)14 (package-install 'php-mode)15 (package-install 'phps-mode)16 ;; (package-install 'anzu)17 (package-install 'anaconda-mode)18 (package-install 'auctex)19 ;; (package-install 'rmsbolt)20 ;; (package-install 'beginend)21 ;; (package-install 'composer)22 (package-install 'cinspect)23 (package-install 'debian-el)24 (package-install 'dpkg-dev-el)25 (package-install 'edebug-inline-result)26 ;;(package-install 'haskell-mode)27 ;;(package-install 'idris-mode)28 (package-install 'magit)29 (package-install 'git-timemachine)30 (package-install 'git-dwim)31 (package-install 'gitpatch)32 (package-install 'goto-chg)33 (package-install 'debbugs)34 ;;(package-install 'deft)35 ;; (package-install 'direnv)36 (package-install 'dumb-jump)37 (package-install 'docker)38 (package-install 'docker-cli)39 (package-install 'docker-tramp)40 (package-install 'docker-compose-mode)41 (package-install 'org-sql)42 ;;(package-install 'eglot)43 ;; (package-install 'eglot-java)44 ;; (package-install 'mastodon)45 ;; (package-install 'exec-path-from-shell)46 (package-install 'expand-region)47 ;; (package-install 'flymake-php)48 (package-install 'flycheck)49 (package-install 'flycheck-phpstan)50 (package-install 'phpactor)51 ;;(package-install 'robe)52 (package-install 'geiser)53 (package-install 'geiser-guile)54 (package-install 'guix)55 ;; (package-install 'git-gutter)56 ;; (package-install 'gnuplot)57 ;;(package-install 'swiper)58 ;;(package-install 'sqlite3)59 (package-install 'org-roam)60 ;; (package-install 'org-roam-ui)61 ;; (package-install 'org-download)62 ;; (package-install 'org-babel-eval-in-repl)63 ;;(package-install 'ob-php)64 ;; (package-install 'on-screen)65 ;;(package-install 'nix-mode)66 (package-install 'pdf-tools)67 ;;(package-install 'phpactor)68 ;; (package-install 'company-quickhelp)69 ;;(package-install 'ac-php)70 (package-install 'php-mode)71 (package-install 'php-quickhelp)72 (package-install 'phan)73 ;;(package-install 'php-cs-fixer)74 ;; (package-install 'company-php)75 ;;(package-install 'php-eldoc)76 ;;(package-install 'phps-mode)77 (package-install 'realgud)78 ;; (package-install 'realgud-xdebug)79 ;; (package-install 'kiwix)80 ;;(package-install 'sml-mode)81 (package-install 'sly)82 (package-install 'simple-httpd)83 (package-install 'sudo-edit)84 ;;(package-install 'treemacs)85 (package-install 'undo-tree)86 ;; (package-install 'yasnippet)87 ;; (package-install 'yasnippet-snippets)88 ;; (package-install 'vimrc-mode)89 ;; (package-install 'flymake-phpcs)90 ;; (package-install 'flymake-phpstan)91 ;; (package-install 'no-littering)92 (package-install 'web-mode)93 ;; (package-install 'which-key)94 ;; (package-install 'reverse-im)95 (package-install 'imenu-list)96 ;; (package-install 'isearch-mb)97 (package-install 'visual-fill-column)98 ;; (package-install 'browse-kill-ring)99 (package-install 'corfu)100 ;; (package-install 'inf-ruby)101 (package-install 'yaml-mode)102 ;; (package-install 'geben)103 (package-install 'link-hint)104 (package-install 'whole-line-or-region)105 (package-install 'quickrun)106 ;; (package-install 'psysh)107 ;; (package-install 'restclient)108 )109 110 (when (eq window-system 'pgtk)111 (pgtk-use-im-context t))112 113 (when (fboundp 'native-compile-async)114 (setq comp-async-compilation t115 package-native-compile t116 117 native-comp-speed 2118 native-comp-async-jobs-number 1119 comp-num-cpus 2120 ;; JIT Compilation121 native-comp-deferred-compilation t122 ;; AOT Compilation123 package-native-compile t124 comp-async-report-warnings-errors nil))125 126 ;; (native-compile-async "~/.emacs.d/elpa/" 'recursively)127 (native-compile-async "~/.guix-profile/share/emacs/site-lisp" 'recursively)128 129 ;; block until native compilation has finished130 (while (or comp-files-queue131 (> (comp-async-runnings) 0))132 133 ;; Disable guix autoloading and x resources loading134 (setq site-run-file nil)135 10 136 11 (require 'exwm) … … 138 13 (exwm-config-example) 139 14 140 ;; Change mode-line-modes to show only major mode 141 (defvar mode-line-major-mode 142 (let ((recursive-edit-help-echo "Recursive edit, type C-M-c to get out")) 143 (list (propertize "%[" 'help-echo recursive-edit-help-echo) 144 `(:propertize ("" mode-name) 145 help-echo "Major mode\n\ 146 mouse-1: Display major mode menu\n\ 147 mouse-2: Show help for major mode\n\ 148 mouse-3: Toggle minor modes" 149 mouse-face mode-line-highlight 150 local-map ,mode-line-major-mode-keymap) 151 '("" mode-line-process) 152 (propertize "%n" 'help-echo "mouse-2: Remove narrowing from buffer" 153 'mouse-face 'mode-line-highlight 154 'local-map (make-mode-line-mouse-map 155 'mouse-2 #'mode-line-widen)) 156 (propertize "%]" 'help-echo recursive-edit-help-echo) 157 " ")) 158 "Mode line construct for displaying major and minor modes.") 159 160 (put 'mode-line-major-mode 'risky-local-variable t) 161 162 ;; Change mode-line-format 163 (setq-default mode-line-format 164 '("%e" 165 mode-line-front-space 166 mode-line-mule-info 167 168 mode-line-client 169 mode-line-modified 170 mode-line-remote 171 mode-line-frame-identification 172 ;; long-path 173 mode-line-buffer-identification 174 mode-line-misc-info 175 " " 176 mode-line-major-mode 177 " " 178 vc-mode 179 " " 180 181 mode-line-position 182 mode-line-end-spaces 183 )) 184 185 ;; Do not resize the frame at this early stage. 186 (setq frame-inhibit-implied-resize t) 187 (setq use-dialog-box nil) 188 189 ;;; Disable some gui 190 (scroll-bar-mode -1) 191 (tool-bar-mode -1) 192 (menu-bar-mode -1) 193 ;;(tooltip-mode -1) 194 195 ;;; Changing emacs default setting through customize 196 (custom-set-variables 197 '(fill-column 72) 198 '(git-gutter:added-sign " ") 199 '(git-gutter:deleted-sign " ") 200 '(git-gutter:modified-sign " ") 201 '(git-gutter:unchanged-sign " ") 202 '(lsp-headerline-breadcrumb-enable nil) 203 '(scroll-bar-mode 'nil) 204 '(scroll-bar-adjust-thumb-portion nil) 205 '(tool-bar-position 'bottom) 206 '(tool-bar-style 'both-horiz)) 207 208 (custom-set-faces 209 '(default ((t (:height 140 :family "Jetbrains Mono" :embolden t)))) 210 '(region ((t (:background "gray85")))) 211 '(mode-line ((t (:background "grey70" :foreground "grey10")))) 212 '(mode-line-inactive ((t (:inherit mode-line :background "grey90" :foreground "grey20" :box (:line-width (-2 . -2) :color "grey85") :weight light)))) 213 '(mode-line-buffer-id ((t (:weight bold)))) 214 '(mode-line-emphasis ((t (:weight bold)))) 215 '(lsp-modeline-code-actions-face ((t :inherit mode-line :height 100))) 216 '(tool-bar ((t (:background "grey80" :foreground "grey10")))) 217 '(fill-column-indicator ((t (:foreground "grey95")))) 218 '(hl-line ((t (:background "gray95")))) 219 '(fringe ((t (:background "grey87")))) 220 '(header-line ((t (:inherit mode-line :background "grey90")))) 221 '(vertical-border ((t (:foreground "grey90")))) 222 '(window-divider ((t (:foreground "gray90"))))) 223 224 (set-fringe-style (cons 7 7)) 225 226 (defun switch-gui () 227 "Disable/enable menu-bar and tool-bar." 228 (interactive) 229 (if menu-bar-mode 230 (progn 231 (menu-bar-mode -1) 232 (tool-bar-mode -1) 233 (scroll-bar-mode -1)) 234 (progn 235 (menu-bar-mode 1) 236 (tool-bar-mode 1) 237 (scroll-bar-mode 1)))) 238 239 (defun switch-scroll-bar () 240 "Disable/enable scroll-bar." 241 (interactive) 242 (if scroll-bar-mode 243 (scroll-bar-mode -1) 244 (scroll-bar-mode))) 245 246 (define-key global-map (kbd "<f5>") 'switch-gui) 247 (define-key global-map (kbd "<f8>") 'switch-scroll-bar) 248 249 (provide 'early-init) 250 ;;; early-init.el ends here 251 252 ;;(add-hook 'prog-mode-hook 'flymake-mode) 15 (add-hook 'prog-mode-hook 'flymake-mode) 253 16 254 17 (require 'psalm) … … 269 32 (interactive) 270 33 (let* ((default-directory (php-project-get-root-dir)) 271 (phan-executable (or flycheck-phanclient--phan-executable272 (if (file-exists-p "vendor/bin/phan")273 (concat default-directory "vendor/bin/phan")274 (executable-find "phan"))))275 (cmd (list phan-executable "--daemonize-tcp-port" "4846" "--quick")))276 34 (phan-executable (or flycheck-phanclient--phan-executable 35 (if (file-exists-p "vendor/bin/phan") 36 (concat default-directory "vendor/bin/phan") 37 (executable-find "phan")))) 38 (cmd (list phan-executable "--daemonize-tcp-port" "4846" "--quick"))) 39 (apply #'start-process "PhanDaemon" "*phan daemon*" cmd))) 277 40 278 41 (flycheck-define-checker php-phanclient … … 289 52 (add-hook 'prog-mode-hook 'flycheck-mode)) 290 53 291 (when (package-loaded? "treemacs")292 (progn293 (setq treemacs-width 50294 treemacs-show-cursor t295 treemacs-position 'right296 treemacs-indentation 1297 treemacs-tag-follow-mode t298 treemacs-fringe-indicator-mode nil)299 300 (define-key global-map301 (kbd "C-x C-d") 'treemacs)))302 303 (when (package-loaded? "isearch-mb")304 (progn305 (isearch-mb-mode t)306 (global-set-key (kbd "C-s") 'isearch-forward-regexp)307 (global-set-key (kbd "C-r") 'isearch-backward-regexp)))308 309 (when (package-loaded? "browse-kill-ring")310 (define-key global-map (kbd "C-M-y") 'browse-kill-ring))311 312 (setq path-to-ctags "~/.guix-profile/bin/ctags")313 314 (defun tags-create (dir-name)315 "Create tags file."316 (interactive "DDirectory: ")317 (shell-command318 (format "%s -f TAGS -e -R %s" path-to-ctags319 (directory-file-name dir-name))))320 321 (defun tags-create-python (dir-name)322 "Create tags with python interpreter"323 (interactive "DDirectory: ")324 (shell-command325 (format "%s -f TAGS -e -R --fields=+l --languages=python --python-kinds=-iv $(python -c \"import os, sys; print(' '.join('{}'.format(d) for d in sys.path if os.path.isdir(d)))\") %s" path-to-ctags326 (directory-file-name dir-name))))327 328 54 (when (package-loaded? "realgud") 329 55 (load "~/.emacs.d/site-lisp/realgud-xdebug/realgud-xdebug.el")) … … 335 61 (progn 336 62 (setq corfu-preview-current 'nil 337 corfu-popupinfo-delay t)63 corfu-popupinfo-delay t) 338 64 (corfu-mode 1) 339 65 (corfu-popupinfo-mode 1) 340 66 (defun show-default-completion-buffer () 341 342 343 344 345 346 67 (interactive) 68 (corfu-quit) 69 (corfu-mode -1) 70 (completion-at-point) 71 (corfu-mode 1) 72 (corfu-popupinfo-mode 1)) 347 73 (define-key corfu-map (kbd "M-TAB") 'show-default-completion-buffer) 348 74 (define-key corfu-map (kbd "TAB") 'show-default-completion-buffer) … … 352 78 353 79 (defun corfu-send-shell (&rest _) 354 355 356 357 (eshell-send-input))358 359 (comint-send-input))))80 "Send completion candidate when inside comint/eshell." 81 (cond 82 ((and (derived-mode-p 'eshell-mode) (fboundp 'eshell-send-input)) 83 (eshell-send-input)) 84 ((and (derived-mode-p 'comint-mode) (fboundp 'comint-send-input)) 85 (comint-send-input)))) 360 86 361 87 (advice-add #'corfu-insert :after #'corfu-send-shell) 362 88 363 89 (add-hook 'eshell-mode-hook 'corfu-mode))) 364 365 (setq completion-styles '(basic partial-completion substring flex emacs22)366 completion-ignore-case t367 read-buffer-completion-ignore-case t368 read-file-name-completion-ignore-case t)369 90 370 91 (setq aggressive-completion-delay 0.5) … … 377 98 378 99 (setq deft-recursive t 379 380 381 100 deft-use-filter-string-for-filename t 101 deft-default-extension "org md" 102 deft-directory "~/projects/at-w96k/content/digarden") 382 103 383 104 (when (package-loaded? "yasnippet") … … 405 126 ;; (setq phps-mode-async-process-using-async-el t) 406 127 407 (desktop-save-mode 1)408 409 (global-anzu-mode t)410 411 128 (load "swiper-autoloads") 412 129 (global-set-key (kbd "C-s") 'swiper) 413 130 414 131 (setq swiper-include-line-number-in-search t 415 416 132 swiper-use-visual-line t 133 swiper-stay-on-quit t) 417 134 418 135 (load "which-key-autoloads") … … 421 138 422 139 (setq which-key-side-window-max-width 0.5 423 which-key-show-remaining-keys t 424 which-key-max-display-columns 50 425 which-key-max-description-length 35 426 which-key-sort-order 'which-key-local-then-key-order 427 which-key-idle-delay 0.25) 428 429 (add-hook 'prog-mode-hook 'rmsbolt-mode) 140 which-key-show-remaining-keys t 141 which-key-max-display-columns 50 142 which-key-max-description-length 35 143 which-key-sort-order 'which-key-local-then-key-order 144 which-key-idle-delay 0.25) 430 145 431 146 ;; (when (package-loaded? "quickrun") … … 435 150 436 151 (setq sly-lisp-implementations 437 '((clisp ("clisp")) 438 (cmucl ("cmucl" "-quiet")) 439 (sbcl ("/opt/sbcl/bin/sbcl") :coding-system utf-8-unix))) 440 441 (load "erlang-autoloads") 152 '((clisp ("clisp")) 153 (cmucl ("cmucl" "-quiet")) 154 (sbcl ("/opt/sbcl/bin/sbcl") :coding-system utf-8-unix))) 442 155 443 156 (when (package-loaded? "inf-ruby") … … 474 187 ;; (eglot-ensure)) 475 188 476 (with-eval-after-load 'php-mode 477 478 ;; (add-hook 'php-mode-hook #'init-php-mode) 479 ) 480 481 (when (package-loaded? "php-mode") 482 (progn 483 (add-hook 'php-mode-hook 'php-enable-symfony2-coding-style) 484 (setq lsp-intelephense-php-version "8.1.16") 485 (defvar phpactor-executable "~/.bin/phpactor") 486 (custom-set-variables '(lsp-phpactor-path "~/usr/local/bin/phpactor")) 487 488 (add-hook 'php-mode-hook 489 '(lambda () 490 ;; (require 'yasnippet) 491 ;; (require 'yasnippet-snippets) 492 493 (set-fill-column 120) 494 495 ;; (make-local-variable 'eldoc-documentation-function) 496 ;; (setq eldoc-documentation-function 497 ;; 'phpactor-hover) 498 ;; (yas-minor-mode t) 499 (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point))) 500 501 (setq php-manual-path 502 "~/php/php-manual/" 503 php-quickhelp-dir "~/php/php-manual/" 504 php-quickhelp--dest "~/.emacs.d/php-manual/php_manual_en.json") 505 506 507 ;; (add-hook 'php-mode-hook 508 ;; '(lambda () 509 ;; ;; (auto-complete-mode t) 510 511 ;; ;; (require 'ac-php) 512 ;; (require 'php-quickhelp) 513 ;; (require 'company) 514 ;; (company-mode t) 515 ;; (require 'company-php) 516 ;; (require 'company-quickhelp) 517 518 ;; (require 'yasnippet) 519 ;; (require 'yasnippet-snippets) 520 521 ;; (set (make-local-variable 'company-backends) 522 ;; '((company-ac-php-backend company-dabbrev-code) 523 ;; php-quickhelp-company-php 524 ;; company-capf company-files)) 525 526 ;; (company-quickhelp-mode t) 527 528 ;; (define-key php-mode-map (kbd "C-M-i") 'company-complete) 529 ;; (define-key company-mode-map (kbd "M-TAB") 'company-complete) 530 531 ;; ;; (setq ac-sources '(ac-source-php php-quickhelp-company-php)) 532 ;; ;; (setq eldoc-documentation-function 533 ;; ;; 'php-quickhelp-eldoc-func) 534 535 ;; (yas-minor-mode t) 536 537 ;; ;; (define-key php-mode-map (kbd "C-M-i") 'auto-complete) 538 ;; ;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete) 539 540 ;; (define-key php-mode-map (kbd "C-c H") 541 ;; 'php-local-manual-search) 542 543 ;; (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 544 ;; (define-key company-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 545 546 ;; ;; (define-key php-mode-map (kbd "C-c t") 'ac-php-show-tip) 547 548 ;; ;; Jump to definition (optional) 549 ;; (define-key php-mode-map 550 ;; (kbd "M-.") 'ac-php-find-symbol-at-point) 551 552 ;; ;; Return back (optional) 553 ;; (define-key php-mode-map 554 ;; (kbd "M-,") 'ac-php-location-stack-back))) 555 )) 189 (use-package php-mode 190 :bind ("C-c h" . 'php-quickhelp-at-point) 191 :config 192 193 (setq php-manual-path 194 "~/projects/php-manual/" 195 php-quickhelp-dir "~/projects/php-manual/" 196 php-quickhelp--dest "~/projects/php-manual/php_manual_en.json")) 197 198 199 ;; (add-hook 'php-mode-hook 200 ;; '(lambda () 201 ;; ;; (auto-complete-mode t) 202 203 ;; ;; (require 'ac-php) 204 ;; (require 'php-quickhelp) 205 ;; (require 'company) 206 ;; (company-mode t) 207 ;; (require 'company-php) 208 ;; (require 'company-quickhelp) 209 210 ;; (require 'yasnippet) 211 ;; (require 'yasnippet-snippets) 212 213 ;; (set (make-local-variable 'company-backends) 214 ;; '((company-ac-php-backend company-dabbrev-code) 215 ;; php-quickhelp-company-php 216 ;; company-capf company-files)) 217 218 ;; (company-quickhelp-mode t) 219 220 ;; (define-key php-mode-map (kbd "C-M-i") 'company-complete) 221 ;; (define-key company-mode-map (kbd "M-TAB") 'company-complete) 222 223 ;; ;; (setq ac-sources '(ac-source-php php-quickhelp-company-php)) 224 ;; ;; (setq eldoc-documentation-function 225 ;; ;; 'php-quickhelp-eldoc-func) 226 227 ;; (yas-minor-mode t) 228 229 ;; ;; (define-key php-mode-map (kbd "C-M-i") 'auto-complete) 230 ;; ;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete) 231 232 ;; (define-key php-mode-map (kbd "C-c H") 233 ;; 'php-local-manual-search) 234 235 ;; (define-key php-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 236 ;; (define-key company-mode-map (kbd "C-c h") 'php-quickhelp-at-point) 237 238 ;; ;; (define-key php-mode-map (kbd "C-c t") 'ac-php-show-tip) 239 240 ;; ;; Jump to definition (optional) 241 ;; (define-key php-mode-map 242 ;; (kbd "M-.") 'ac-php-find-symbol-at-point) 243 244 ;; ;; Return back (optional) 245 ;; (define-key php-mode-map 246 ;; (kbd "M-,") 'ac-php-location-stack-back))) 247 )) 556 248 557 249 (setq phpactor-executable "~/.bin/phpactor") … … 603 295 604 296 (setq lsp-sqls-connections 605 297 '(((driver . "mysql") (dataSourceName . "dbuser:mangoworms@tcp(localhost:3306)/profile24")))) 606 298 607 299 (when (package-loaded? "org-sql") … … 609 301 610 302 (add-hook 'sql-interactive-mode-hook 611 (lambda ()612 (sql-connect "profile24")613 (toggle-truncate-lines t)))303 (lambda () 304 (sql-connect "profile24") 305 (toggle-truncate-lines t))) 614 306 615 307 (setq sql-connection-alist 616 308 '((profile24 617 618 619 620 621 622 309 (sql-product 'mysql) 310 (sql-server "localhost") 311 (sql-user "dbuser") 312 (sql-password "123456") 313 (sql-database "testdb") 314 (sql-port 3306)))) 623 315 624 316 (load "org-ref-autoloads") … … 628 320 ;; see org-ref for use of these variables 629 321 (setq org-ref-bibliography-notes "~/Documents/bibliography/notes.org" 630 org-ref-default-bibliography '("~/Documents/Bibliography/references.bib") 631 org-ref-pdf-directory "~/Documents/bibliography/bibtex-pdfs/") 632 633 (when (package-loaded? "mastodon") 634 (setq mastodon-active-user "w96k" 635 mastodon-instance-url "https://fosstodon.org/")) 636 637 (global-hl-line-mode 1) 638 639 (add-to-list 'special-display-buffer-names "*Buffer List*") 640 (setq Buffer-menu-files-only t) 322 org-ref-default-bibliography '("~/Documents/Bibliography/references.bib") 323 org-ref-pdf-directory "~/Documents/bibliography/bibtex-pdfs/") 324 325 (global-hl-line-mode t) 641 326 642 327 (setq exec-path-from-shell-variables 643 328 '("PATH" "MANPATH")) 644 329 645 330 (when (and (memq window-system '(mac ns x)) 646 (not (eq system-type 'berkeley-unix)))331 (not (eq system-type 'berkeley-unix))) 647 332 (exec-path-from-shell-initialize)) 648 333 … … 656 341 657 342 (add-hook 'eww-mode-hook 658 (lambda ()659 (set-fill-column 80)660 (display-fill-column-indicator-mode)661 (visual-fill-column-mode)))343 (lambda () 344 (set-fill-column 80) 345 (display-fill-column-indicator-mode) 346 (visual-fill-column-mode))) 662 347 663 348 (add-to-list 'tramp-remote-path 'tramp-own-remote-path) … … 665 350 (load "debian-el-autoloads") 666 351 (load "dpkg-dev-el-autoloads") 667 668 (package-loaded? "nix")669 352 670 353 (when (package-loaded? "direnv") … … 674 357 (interactive) 675 358 (let ((x (+ (face-attribute 'default :height) 676 359 10))) 677 360 (set-face-attribute 'default nil :height x) 678 361 (set-face-attribute 'mode-line nil :height x) … … 683 366 (interactive) 684 367 (let ((x (- (face-attribute 'default :height) 685 368 10))) 686 369 (set-face-attribute 'default nil :height x) 687 370 (set-face-attribute 'mode-line nil :height x) … … 700 383 (interactive) 701 384 (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 702 703 385 ;; if first parameter is '1', can't toggle fullscreen status 386 '(1 "_NET_WM_STATE_FULLSCREEN" 0))) 704 387 705 388 ;; Better support for files with long lines -
guix/.dotfiles/.bash_profile
rf30e1cd r9bc0481 11 11 12 12 # export https_proxy=https://localhost:9250 13 export http_proxy=https://localhost:925013 # export http_proxy=https://localhost:9250 14 14 export SOCKS_SERVER=localhost:9050 15 15 … … 21 21 # Honor per-interactive-shell startup file 22 22 if [ -f ~/.bashrc ]; then source ~/.bashrc; fi 23 24 gpg-connect-agent updatestartuptty /bye -
guix/.dotfiles/.bashrc
rf30e1cd r9bc0481 2 2 export GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles 3 3 4 draw_line() 5 { 6 local COLUMNS="$COLUMNS" 7 while ((COLUMNS-- > 0)); do 8 printf '\u2500' 9 done 10 } 4 export PS1="\e[32m\u\e[0m@\e[36m\h \e[1m\e[30m\w\${GUIX_ENVIRONMENT:+ [env]}\e[0m\e[30m\e(B\e[m \n" 11 5 12 export PS1="\e[37m$(draw_line)\e[32m\u\e[0m@\e[36m\h \e[1m\e[30m\w\${GUIX_ENVIRONMENT:+ [env]} \n\033[31m>>>\033[0m " 13 6 unset SSH_AGENT_PID 7 if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then 8 export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" 9 fi -
guix/.dotfiles/home-configuration.scm
rf30e1cd r9bc0481 33 33 "python-wrapper" 34 34 "php" 35 "xdebug-php-8.1"36 "composer"37 "openjdk"38 "maven"35 ;; "xdebug-php-8.1" 36 ;; "composer" 37 ;; "openjdk" 38 ;; "maven" 39 39 "sqls" 40 40 "go" … … 46 46 "python-debugpy" 47 47 "ruby-solargraph" 48 "zig-zls"49 "rust-analyzer"50 "racket"48 ;; "zig-zls" 49 ;; "rust-analyzer" 50 ;; "racket" 51 51 "gcc-toolchain" 52 52 "clang-toolchain" 53 53 "gdb" 54 54 "valgrind" 55 "frama-c"55 ;; "frama-c" 56 56 "kcachegrind" 57 57 "dwarves" … … 63 63 ;;"darktable" 64 64 "global" 65 "emacs-vterm" 66 "emacs-vimrc-mode" 65 67 "emacs-eldoc" 66 68 "emacs-eldoc-box" … … 70 72 "emacs-dumb-jump" 71 73 "emacs-goto-chg" 74 "emacs-go-mode" 72 75 "emacs-repology" 73 76 "emacs-syslog-mode" … … 126 129 "git" 127 130 ;; "wkz-emacs" 131 "vim-full" 128 132 "emacs-no-x-toolkit" 129 133 "emacs-gptel" 130 134 "emacs-nix-mode" 131 135 "lm-sensors" 136 "hddtemp" 132 137 "htop" 133 138 "make" … … 154 159 "pinentry" 155 160 "pinentry-emacs" 161 "pinentry-gtk2" 156 162 ;;"texlive" 157 163 "fetchmail" … … 169 175 "font-gnu-unifont" 170 176 171 "proxychains-ng"177 ;; "proxychains-ng" 172 178 "ungoogled-chromium" 173 179 "torbrowser" 174 180 "icecat" 181 "icedove" 175 182 "librewolf" 176 183 "nyxt" … … 179 186 "ublock-origin-chromium" 180 187 "noscript-icecat" 181 "browserpass-native"182 188 183 189 "keepassxc-browser-icecat" 184 190 "keepassxc" 185 191 192 "cryptsetup" 186 193 "restic" 194 "borg" 195 "borgmatic" 196 "vorta" 187 197 "btrbk" 188 198 … … 191 201 "password-store" 192 202 193 "musescore"203 ;; "musescore" 194 204 "schismtracker" 195 205 "workrave" … … 207 217 "yt-dlp" 208 218 "emacs-ytdl" 219 220 "virt-manager" 209 221 210 222 ;; "wkz-php" … … 233 245 234 246 ;; (service home-x11-display-service-type) 235 (service home-gpg-agent-service-type) 247 ;; (service home-gpg-agent-service-type) 248 (service home-gpg-agent-service-type 249 (home-gpg-agent-configuration 250 (pinentry-program 251 (file-append pinentry-emacs "/bin/pinentry-emacs")) 252 (extra-content "enable-ssh-support") 253 (ssh-support? #t))) 254 236 255 237 256 ;; (service home-unclutter-service-type … … 245 264 (service home-startx-command-service-type 246 265 (xorg-configuration (keyboard-layout (keyboard-layout "us,ru" 247 #:options '("grp:shifts_toggle" "ctrl:nocaps" )))))266 #:options '("grp:shifts_toggle" "ctrl:nocaps" "ctrl:escape"))))) 248 267 249 268 (service home-dotfiles-service-type … … 256 275 "/home/w96k/projects/dotfiles/cvs" 257 276 "/home/w96k/projects/dotfiles/guix" 258 "/home/w96k/projects/dotfiles/ssh" 277 "/home/w96k/projects/dotfiles/vim" 278 ;; "/home/w96k/projects/dotfiles/ssh" 259 279 )))) 260 280 … … 270 290 ("nano/nanorc" ,%default-nanorc))) 271 291 272 (simple-service 'nonguix-service273 home-channels-service-type274 (list275 (channel276 (name 'nonguix)277 (url "https://gitlab.com/nonguix/nonguix")278 (introduction279 (make-channel-introduction280 "897c1a470da759236cc11798f4e0a5f7d4d59fbc"281 (openpgp-fingerprint282 "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))))283 284 (simple-service 'phps-service285 home-channels-service-type286 (list287 (channel288 (name 'guix-phps)289 (url "https://github.com/Nazar65/guix-phps-channel")290 (introduction291 (make-channel-introduction292 "4e547cbb9391b5fe1b2a9fbc5efa4d5bec2d646f"293 (openpgp-fingerprint294 "4441 0743 6E32 EE9F F20A 753F B510 AA5B 74EA F294"))))))292 ;; (simple-service 'nonguix-service 293 ;; home-channels-service-type 294 ;; (list 295 ;; (channel 296 ;; (name 'nonguix) 297 ;; (url "https://gitlab.com/nonguix/nonguix") 298 ;; (introduction 299 ;; (make-channel-introduction 300 ;; "897c1a470da759236cc11798f4e0a5f7d4d59fbc" 301 ;; (openpgp-fingerprint 302 ;; "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))) 303 304 ;; (simple-service 'phps-service 305 ;; home-channels-service-type 306 ;; (list 307 ;; (channel 308 ;; (name 'guix-phps) 309 ;; (url "https://github.com/Nazar65/guix-phps-channel") 310 ;; (introduction 311 ;; (make-channel-introduction 312 ;; "4e547cbb9391b5fe1b2a9fbc5efa4d5bec2d646f" 313 ;; (openpgp-fingerprint 314 ;; "4441 0743 6E32 EE9F F20A 753F B510 AA5B 74EA F294")))))) 295 315 )))) 296 316 -
guix/config-desktop.scm
rf30e1cd r9bc0481 1 ;; This is an operating system configuration template 2 ;; for a "desktop" setup with GNOME and Xfce where the 3 ;; root partition is encrypted with LUKS, and a swap file. 4 1 5 (use-modules (gnu) 2 6 (guix transformations) 3 7 (gnu home) 8 (gnu system privilege) 4 9 (guix gexp) 5 (nongnu packages linux)6 (nongnu system linux-initrd)7 10 (gnu home services shells)) 8 11 9 (use-service-modules guix cups desktop networking ssh xorg docker nix admin vnc lightdm syncthing virtualization databases linux web backup telephony file-sharing )10 (use-package-modules gnome xdisorg vnc databases )12 (use-service-modules guix cups desktop networking ssh xorg docker nix admin vnc lightdm syncthing virtualization databases linux web backup telephony file-sharing spice security-token) 13 (use-package-modules gnome xdisorg vnc databases virtualization firmware security-token) 11 14 12 15 (load "/home/w96k/projects/dotfiles/guix/.dotfiles/home-configuration.scm") 13 16 14 (define wkz-transform15 ;; The package transformation procedure.16 (options->transformation17 '((tune . "skylake"))))18 19 17 (operating-system 20 (locale "en_US.utf8") 21 (timezone "Asia/Tbilisi") 22 (kernel linux) 23 (kernel-arguments '("video=HDMI-A-1:1920x1080@240")) 24 (initrd microcode-initrd) 25 (firmware (list linux-firmware)) 26 (keyboard-layout (keyboard-layout "us,ru" 27 #:options '("grp:shifts_toggle" "ctrl:nocaps"))) 28 (host-name "wkz-guix") 29 30 ;; The list of user accounts ('root' is implicit). 31 (users (cons* (user-account 32 (name "w96k") 33 (comment "W96K") 34 (group "users") 35 (home-directory "/home/w96k") 36 (supplementary-groups '("wheel" "netdev" "audio" "video" "kvm" "httpd"))) 18 (host-name "wkz") 19 (timezone "Asia/Tbilisi") 20 (locale "en_US.utf8") 21 (kernel-arguments '("quiet" "intel_iommu=on" "amd_iommu=on" "iommu=on" "video=HDMI-1:1920x1080@240")) 22 (initrd-modules (append '("raid1" "br_netfilter" "vfio_iommu_type1" "vfio_pci" "vfio") %base-initrd-modules)) 23 24 ;; Choose US English keyboard layout. The "altgr-intl" 25 ;; variant provides dead keys for accented characters. 26 (keyboard-layout (keyboard-layout "us,ru" 27 #:options '("grp:shifts_toggle" "ctrl:nocaps" "ctrl:escape"))) 28 29 ;; Use the UEFI variant of GRUB with the EFI System 30 ;; Partition mounted on /boot/efi. 31 (bootloader (bootloader-configuration 32 (bootloader grub-efi-bootloader) 33 (targets '("/boot/efi")) 34 (keyboard-layout keyboard-layout))) 35 36 ;; Specify a mapped device for the encrypted root partition. 37 ;; The UUID is that returned by 'cryptsetup luksUUID'. 38 39 (mapped-devices 40 (list 41 (mapped-device 42 (source (list "/dev/sda1" "/dev/sdc1")) 43 ;; (source (list (uuid "ed5b96c3-fa7f-6de7-259d-6eb8e73a631e") (uuid "daeb6a6e-290d-7792-e7b6-edf45cef2076"))) 44 (target "/dev/md0") 45 (type raid-device-mapping)) 46 47 (mapped-device 48 ;; (source "/dev/md0") 49 (source (uuid "4e2ee2d8-735d-49bd-8b3d-cd9102170a1f")) 50 (target "home") 51 (type luks-device-mapping)) 52 53 (mapped-device 54 (source (uuid "03db8d78-051b-4a11-a7e5-b62ae0f530d4")) 55 (target "guix_old") 56 (type luks-device-mapping)) 57 ) 58 ) 59 60 (file-systems (append 61 (list 62 (file-system 63 (device "/dev/mapper/home") 64 (mount-point "/home") 65 (type "ext4") 66 (dependencies mapped-devices)) 67 68 (file-system 69 (device "/dev/mapper/guix_old") 70 (mount-point "/home/storage") 71 (type "btrfs") 72 (dependencies mapped-devices)) 73 74 (file-system 75 (device (file-system-label "root")) 76 (mount-point "/") 77 (type "ext4")) 78 79 (file-system 80 (device (uuid "17C5-3E35" 'fat)) 81 (mount-point "/boot/efi") 82 (type "vfat"))) 83 %base-file-systems)) 84 85 ;; Specify a swap file for the system, which resides on the 86 ;; root file system. 87 (swap-devices (list (swap-space 88 (target "/swapfile")))) 89 90 (groups 91 (append 92 (list 93 (user-group (name "storage"))) %base-groups)) 94 95 (users (append (list 96 (user-account 97 (name "w96k") 98 (group "users") 99 (home-directory "/home/w96k") 100 (supplementary-groups '("wheel" "netdev" "audio" "video" "kvm" "httpd" "libvirt" "postgres" "transmission" "nitrokey"))) 101 102 (user-account 103 (name "torrent") 104 (group "users") 105 (supplementary-groups '("wheel" "transmission")) 106 (home-directory "/home/torrent")) 107 108 (user-account 109 (name "storage") 110 (group "users") 111 (supplementary-groups '("wheel" "transmission")) 112 (home-directory "/home/storage")) 113 ) 37 114 %base-user-accounts)) 38 115 39 ;; (packages %base-packages) 40 (packages 116 (packages 41 117 (append 42 118 (map 43 119 specification->package 44 '( 45 "font-gnu-freefont" "font-gnu-unifont" 46 )) 120 '("font-gnu-freefont" "font-gnu-unifont" "nix" "virt-manager" "bridge-utils" "xmodmap" "gvfs" "ovmf-x86-64" "efibootmgr" 121 "cryptsetup" "mdadm")) 47 122 %base-packages)) 48 123 49 ;; Below is the list of system services. To search for available 50 ;; services, run 'guix system search KEYWORD' in a terminal. 51 (services 52 (append (list 53 (service guix-home-service-type `(("w96k" ,wkz-home))) 54 (service block-facebook-hosts-service-type) 55 56 (service zram-device-service-type 57 (zram-device-configuration 58 (compression-algorithm 'zlib) 59 (priority 100))) 60 61 (service tor-service-type 62 (tor-configuration 63 (config-file (plain-file "tor-config" 64 "HTTPTunnelPort 127.0.0.1:9250")))) 65 (service openssh-service-type) 66 67 (service transmission-daemon-service-type) 68 69 ;; (service containerd-service-type) 70 ;; (service docker-service-type) 71 ;; (service restic-backup-service-type) 72 73 ;; (service hurd-vm-service-type 74 ;; (hurd-vm-configuration 75 ;; (disk-size (* 5000 (expt 2 20))) ;5G 76 ;; (memory-size 1024))) 77 78 ;; (service nix-service-type) 79 80 ;; (service xvnc-service-type (xvnc-configuration 81 ;; (display-number 10) 82 ;; (localhost? #f) 83 ;; (geometry "1280x800"))) 84 85 ;; (service syncthing-service-type 86 ;; (syncthing-configuration 87 ;; (user "w96k"))) 88 89 ;; (service postgresql-service-type 90 ;; (postgresql-configuration 91 ;; (postgresql postgresql-15))) 92 93 (service dhcp-client-service-type) 124 (services 125 (append (list 126 (service guix-home-service-type `(("w96k" ,wkz-home))) 127 (service gpm-service-type) 128 129 (service tor-service-type) 130 (service openssh-service-type) 131 132 (service transmission-daemon-service-type) 133 134 (service libvirt-service-type 135 (libvirt-configuration 136 (unix-sock-group "libvirt") 137 (tls-port "16555"))) 138 139 (service virtlog-service-type) 140 141 (service postgresql-service-type 142 (postgresql-configuration 143 (postgresql postgresql-15))) 144 145 (service dhcp-client-service-type) 146 147 (extra-special-file "/usr/share/OVMF/OVMF_VARS.fd" 148 (file-append ovmf "/share/firmware/ovmf_x64.bin")) 94 149 95 150 (service httpd-service-type … … 115 170 (socket-group "httpd"))) 116 171 117 ;; (service screen-locker-service-type 118 ;; (screen-locker-configuration 119 ;; (name "xlock") 120 ;; (program (file-append xlockmore "/bin/xlock")))) 121 ) 172 (service pcscd-service-type) 173 (udev-rules-service 'nitrokey libnitrokey #:groups '("nitrokey")) 174 175 (service screen-locker-service-type 176 (screen-locker-configuration 177 (name "xlock") 178 (program (file-append xlockmore "/bin/xlock")))) 179 180 (extra-special-file "/etc/qemu/host.conf" "allow br0\n") 181 (service spice-vdagent-service-type)) 122 182 123 183 (modify-services %desktop-services 124 184 (delete screen-locker-service-type) 125 185 (delete modem-manager-service-type) 126 ;; (delete udisks-service-type)127 186 (delete upower-service-type) 128 187 (delete network-manager-service-type) … … 135 194 136 195 137 (guix-service-type config => (guix-configuration 138 (inherit config) 139 ;; Rely on btrfs compression. 140 (log-compression 'none) 141 (extra-options '("--max-jobs=10")) 142 (substitute-urls 143 (list 144 "https://4zwzi66wwdaalbhgnix55ea3ab4pvvw66ll2ow53kjub6se4q2bclcyd.onion" 145 "https://substitutes.nonguix.org")) 146 (http-proxy "http://localhost:9250") 147 (authorized-keys 148 (append (list (plain-file "non-guix.pub" 149 " 150 (public-key 151 (ecc 152 (curve Ed25519) 153 (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#) 154 ) 155 ) 156 ")) 157 %default-authorized-guix-keys)))) 196 ;; (guix-service-type config => (guix-configuration 197 ;; (inherit config) 198 ;; (extra-options '("--max-jobs=10")) 199 ;; ;; (http-proxy "http://localhost:9250") 200 ;; )) 158 201 159 (delete gdm-service-type)))) 160 161 (mapped-devices (list (mapped-device 162 (source (uuid 163 "03db8d78-051b-4a11-a7e5-b62ae0f530d4")) 164 (target "cryptroot") 165 (type luks-device-mapping)))) 166 167 ;; The list of file systems that get "mounted". The unique 168 ;; file system identifiers there ("UUIDs") can be obtained 169 ;; by running 'blkid' in a terminal. 170 (file-systems (cons* (file-system 171 (mount-point "/") 172 (device "/dev/mapper/cryptroot") 173 (type "btrfs") 174 (options "compress=zlib:9,autodefrag") 175 (dependencies mapped-devices)) 176 (file-system 177 (mount-point "/home/w96k/") 178 (device "/dev/mapper/cryptroot") 179 (type "btrfs") 180 (options "compress=zlib:7,autodefrag,subvol=/home/w96k/") 181 (dependencies mapped-devices)) 182 (file-system 183 (mount-point "/home/w96k/Snapshots/") 184 (device "/dev/mapper/cryptroot") 185 (type "btrfs") 186 (options "compress=zlib:9,autodefrag,subvol=/home/w96k/Snapshots") 187 (dependencies mapped-devices)) 188 (file-system 189 (mount-point "/boot/efi") 190 (device (uuid "6ECD-551F" 191 'fat32)) 192 (type "vfat")) %base-file-systems)) 193 194 (bootloader (bootloader-configuration 195 (bootloader grub-efi-bootloader) 196 (targets (list "/boot/efi")) 197 (keyboard-layout keyboard-layout)))) 202 (delete gdm-service-type)) 203 204 )) 205 206 ;; Allow resolution of '.local' host names with mDNS. 207 (name-service-switch %mdns-host-lookup-nss)) -
vim/.vimrc
rf30e1cd r9bc0481 1 " Initialization 1 syntax on 2 3 packadd vimcomplete 4 2 5 filetype plugin on 3 syntax enable 4 set autoindent 6 set omnifunc=syntaxcomplete#Complete 5 7 6 call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged') 7 Plug 'tpope/vim-fugitive' 8 Plug 'tpope/vim-surround' 9 Plug 'tpope/vim-dadbod' 10 Plug 'qbbr/vim-symfony' 11 Plug 'vim-syntastic/syntastic' 12 call plug#end() 13 14 " Backups 15 set directory=~/.vim/backups/ 16 17 " Undo history 18 set undofile 19 set undodir=~/.vim/undo/ 20 21 " Display maximum char width line 22 set colorcolumn=80 23 24 " Syntax checker 25 set statusline+=%#warningmsg# 26 set statusline+=%{SyntasticStatuslineFlag()} 27 set statusline+=%* 28 29 let g:syntastic_always_populate_loc_list = 1 30 let g:syntastic_auto_loc_list = 1 31 let g:syntastic_check_on_open = 1 32 let g:syntastic_check_on_wq = 0 33 34 " Better command completion 35 set wildmenu 36 set wildmode=list:longest,full 37 38 " Emacs keys in insert mode 39 imap <C-p> <Up> 40 imap <C-n> <Down> 41 imap <C-b> <Left> 42 imap <C-f> <Right> 43 imap <C-a> <C-o>:call <SID>home()<CR> 44 imap <C-e> <End> 45 imap <C-d> <Del> 46 imap <C-h> <BS> 47 imap <C-k> <C-r>=<SID>kill()<CR> 48 49 function! s:home() 50 let start_column = col('.') 51 normal! ^ 52 if col('.') == start_column 53 normal! 0 54 endif 55 return '' 56 endfunction 57 58 function! s:kill() 59 let [text_before, text_after] = s:split_line() 60 if len(text_after) == 0 61 normal! J 62 else 63 call setline(line('.'), text_before) 64 endif 65 return '' 66 endfunction 67 68 function! s:split_line() 69 let line_text = getline(line('.')) 70 let text_after = line_text[col('.')-1 :] 71 let text_before = (col('.') > 1) ? line_text[: col('.')-2] : '' 72 return [text_before, text_after] 73 endfunction 8 " For built in omnifunc 9 autocmd FileType sql setlocal omnifunc=vim_dadbod_completion#omni
Note:
See TracChangeset
for help on using the changeset viewer.