From 6ddfbead98c697b56b88a644518b8c2307f835ff Mon Sep 17 00:00:00 2001 From: opfez Date: Sun, 15 Aug 2021 00:44:51 +0200 Subject: [PATCH] add fez/man-at-point, hl-sexp-mode, exwm multiscreen --- custom.el | 10 +++++++++- init.el | 9 +++++---- packages.el | 20 +++++++++++++++++--- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/custom.el b/custom.el index 1aa60d1..b170d89 100644 --- a/custom.el +++ b/custom.el @@ -196,6 +196,13 @@ (t (setq current-layout "nous"))) (shell-command (concat "setxkbmap " current-layout))) +(defun fez/man-at-point () + (interactive) + (let ((word (current-word))) + (if word + (man word) + "Not a word."))) + ;; Eshell convinience commands. (defalias 'open 'find-file-other-window) (defalias 'clean 'eshell/clear-scrollback) @@ -216,6 +223,8 @@ (global-set-key (kbd "C-c t") 'fez/time-stamp) +(global-set-key (kbd "C-z C-m") 'fez/man-at-point) + ;; zap-up-to-char > zap-to-char (global-set-key (kbd "M-z") 'zap-up-to-char) @@ -229,6 +238,5 @@ (global-set-key [f5] (fez/switch-theme 'magik)) (global-set-key [f6] (fez/switch-theme 'basic)) - (add-hook 'emacs-lisp-mode-hook (lambda () (local-set-key (kbd "C-c k") #'fez/insert-keybind))) diff --git a/init.el b/init.el index 65e081a..ec15256 100644 --- a/init.el +++ b/init.el @@ -26,9 +26,6 @@ (set-frame-font "monospace 12") (setq default-frame-alist '((font . "monospace 12"))) -;; Highlight current line. -(when window-system (global-hl-line-mode t)) - ;; Highlight matching parentheses. (show-paren-mode t) @@ -71,7 +68,11 @@ ;; for ncurses development, uncomment this: ;; (setq geiser-guile-binary "/usr/local/bin/guile-ncurses-shell") -(setq geiser-active-implementations '(chez guile)) +(setq geiser-active-implementations '(chez)) + +(add-hook 'scheme-mode-hook 'hl-sexp-mode) +(add-hook 'lisp-mode-hook 'hl-sexp-mode) +(add-hook 'emacs-lisp-mode-hook 'hl-sexp-mode) ;; I use emacs as my window manager. (exwm-config) diff --git a/packages.el b/packages.el index fedec6a..42d44f2 100644 --- a/packages.el +++ b/packages.el @@ -106,9 +106,9 @@ (setq mc/always-run-for-all t)) ;; avy - jump around files more easily -(use-package avy - :ensure t - :bind ("M-s" . avy-goto-char)) +;; (use-package avy +;; :ensure t +;; :bind ("M-s" . avy-goto-char)) ;; Amazing git porcelain. (use-package magit @@ -202,6 +202,18 @@ (use-package exwm :init + (defun fez/exwm-init-hook () + (exwm-workspace-switch-create 1)) + + (require 'exwm-randr) + (setq exwm-randr-workspace-output-plist '(0 "HDMI-0")) + (add-hook 'exwm-randr-screen-change-hook + (lambda () + (start-process-shell-command + "xrandr" nil "xrandr --output HDMI-0 --left-of DVI-D-0 --auto"))) + (exwm-randr-enable) + + (defun exwm-config () "EXWM configuration." ;; Set the initial workspace number. @@ -232,6 +244,8 @@ (number-sequence 0 9))) ;; 's-a': Toggle X mouse ([?\s-a] . fez/toggle-x-mouse) + ;; 's-': Toggle keyboard layouts + ([?\s-\ ] . fez/swap-keyboard) ;; 's-l': Toggle line-mode and char-mode for the current window. ([?\s-l] . exwm-input-toggle-keyboard) ;; windmove movement commands