X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/12e6cf3c7161e08802bd6399a19936d009188b50..6cf7efb05e6c807bd1d8c4c4f2f6db40cf183835:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 97ad750..32989b0 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -99,7 +99,7 @@ ;;; whoami -(setq ;; user-full-name "bandali" +(setq user-full-name "Amin Bandali" user-mail-address "bandali@gnu.org") @@ -135,18 +135,18 @@ This sets each user option VAR's value to the corresponding VALUE. ;; (package-generate-description-file d "refinery-theme-pkg.el")) (run-with-idle-timer 0.01 nil #'require 'package) (with-eval-after-load 'package - (csetq - ;; package-archives - ;; `(,@package-archives - ;; ("bndl" . "https://p.bndl.org/elpa/")) - package-load-list - '(;; GNU ELPA - (debbugs "0.29") - (delight "1.7") - (emms "7.7") - (expand-region "0.11.0") - (rt-liberation "2.4") - (yasnippet "0.14.0"))) + ;; (csetq + ;; ;; package-archives + ;; ;; `(,@package-archives + ;; ;; ("bndl" . "https://p.bndl.org/elpa/")) + ;; package-load-list + ;; '(;; GNU ELPA + ;; (debbugs "0.29") + ;; (delight "1.7") + ;; (emms "7.7") + ;; (expand-region "0.11.0") + ;; (rt-liberation "2.4") + ;; (yasnippet "0.14.0"))) (package-initialize)) (csetq package-archive-upload-base "/ssh:caffeine:~/www/p/elpa") @@ -341,7 +341,12 @@ This sets each user option VAR's value to the corresponding VALUE. display-time-mail-icon '(image :type xpm :file "gnus/gnus-pointer.xpm" :ascent center) - display-time-use-mail-icon t) + display-time-use-mail-icon t + zoneinfo-style-world-list + `(,@zoneinfo-style-world-list + ("Etc/UTC" "UTC") + ("Asia/Tehran" "Tehran") + ("Australia/Melbourne" "Melbourne"))) (display-time-mode)) (run-with-idle-timer 0.1 nil #'require 'battery) @@ -357,6 +362,14 @@ This sets each user option VAR's value to the corresponding VALUE. (require 'winner) (winner-mode 1) +(run-with-idle-timer 0.1 nil #'require 'windmove) +(with-eval-after-load 'windmove + (csetq windmove-wrap-around t) + (global-set-key (kbd "M-H") #'windmove-left) + (global-set-key (kbd "M-L") #'windmove-right) + (global-set-key (kbd "M-K") #'windmove-up) + (global-set-key (kbd "M-J") #'windmove-down)) + (with-eval-after-load 'compile ;; don't display *compilation* buffer on success. based on ;; https://stackoverflow.com/a/17788551, with changes to use `cl-letf' @@ -434,10 +447,12 @@ This sets each user option VAR's value to the corresponding VALUE. ;; info (with-eval-after-load 'info - (add-to-list - 'Info-directory-list - (expand-file-name - (convert-standard-filename "info/") source-directory))) + (csetq + Info-directory-list + `(,@Info-directory-list + ,(expand-file-name + (convert-standard-filename "info/") source-directory) + "/usr/share/info/"))) ;; faces (when (display-graphic-p) @@ -448,9 +463,11 @@ This sets each user option VAR's value to the corresponding VALUE. ;; `(;; :line-width -1 ;; :style released-button)) ) + ;; (set-face-attribute 'fixed-pitch nil :family "Source Code Pro") + (set-face-attribute 'fixed-pitch nil :family "Inconsolata") (set-face-attribute 'mode-line nil :background grey ;; :box box - ) + :inherit 'fixed-pitch) ;; (set-face-attribute 'mode-line-inactive nil ;; :background darker-grey :box box) ))) @@ -531,6 +548,12 @@ Make N (default: 1) copies of the current line or region." (dotimes (_ (abs n1)) (insert text)))))) +(defun b/invert-default-face () + "Invert the `default' face (swap its background and foreground). +Effectively a very simple light/dark theme toggle switch." + (interactive) + (invert-face 'default)) + ;;; General key bindings @@ -540,6 +563,7 @@ Make N (default: 1) copies of the current line or region." (global-set-key (kbd "C-c j") #'b/join-line-top) (global-set-key (kbd "C-S-j") #'b/join-line-top) (global-set-key (kbd "C-c x") #'execute-extended-command) +(global-set-key (kbd "C-c v") #'b/invert-default-face) ;; evaling and macro-expanding (global-set-key (kbd "C-c e b") #'eval-buffer)