From cbbd461d7ff06dcb85f67131a079d40cf67b387b Mon Sep 17 00:00:00 2001 From: Curt Spark Date: Tue, 2 Mar 2021 00:20:41 +0000 Subject: [PATCH] EXWM --- config.org | 57 +++++++++++++++++++++++++++++++++++++--- projectile-bookmarks.eld | 2 +- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/config.org b/config.org index 4110faa..240d5b9 100644 --- a/config.org +++ b/config.org @@ -95,12 +95,28 @@ Old theme for if you'd like to follow Xresources ;; Corrects (and improves) org-mode's native fontification. (doom-themes-org-config)) #+END_SRC +*** Custom Modeline +A custom sleek modeline which is also used in Centaur Emacs, Doom Emacs and Spacemacs. + + +Install and set the modeline, ensuring that it is always installed: + +#+BEGIN_SRC emacs-lisp + (use-package doom-modeline + :ensure t + :init (doom-modeline-mode 1)) + + ;; Display the current time on the modeline + (display-time 1) +#+END_SRC *** All The Icons All The Icons is a package to display cool icons within Emacs. Install the package, enable it and ensure that it always is installed: #+BEGIN_SRC emacs-lisp (use-package all-the-icons :ensure t) + + (setq inhibit-compacting-font-caches t) ; Don’t compact font caches during GC. Fixes lag on doom modeline #+END_SRC All The Icons Support for Ivy/Counsel. Which are autocompletion tools in emacs @@ -604,7 +620,7 @@ Install the package, enable it and ensure that it always is installed, and then (require 'exwm-config) (exwm-config-default)) #+END_SRC -*** Configuration +**** Configuration #+BEGIN_SRC emacs-lisp ;; Systemtray (require 'exwm-systemtray) @@ -615,17 +631,50 @@ Install the package, enable it and ensure that it always is installed, and then ;; Keybindings (setq exwm-input-global-keys - `(([?\s-r] . exwm-reset) + `(;; Reset EXWM + ([?\s-r] . exwm-reset) + + ;; EXWM Workspace Switcher ([?\s-w] . exwm-workspace-switch) + ,@(mapcar (lambda (i) `(,(kbd (format "s-%d" i)) . (lambda () (interactive) (exwm-workspace-switch-create ,i)))) - (number-sequence 0 9)))) + (number-sequence 0 9)) + + ;; Switch between char and line mode mode switcher + ;; Char mode allows for practically all keybindings to be passed to the application aside from a few essential keybindings, line mode allows for emacs keybindings + ([?\s-i] . exwm-input-toggle-keyboard) + + ;; Application Launcher + ([?\s-d] . counsel-linux-app))) + + ;; Set all windows to open in char mode by default, allowing to pass through all key combinations + ;; (add-hook 'exwm-manage-finish-hook + ;; (lambda () (call-interactively #'exwm-input-release-keyboard) + ;; (exwm-layout-hide-mode-line))) ;; Ido mode seems to be enabled in the default configuration, turn it back off as we are using Ivy completion instead. (ido-mode -1) - #+END_SRC + +*** Counsel Linux Application +Counsel Linux Application is an application launcher for emacs using counsel (which is ivy). + +Install the package, enable it and ensure that it always is installed, and then configure: +#+BEGIN_SRC emacs-lisp + ;; some customization to make the display "nicer" and include any user local .desktop files + + (push (concat (getenv "HOME") "/.local/share/applications/") counsel-linux-apps-directories) + (defun ds/counsel-linux-app-format-function (name comment exec) + "Default Linux application name formatter. + NAME is the name of the application, COMMENT its comment and EXEC + the command to launch it." + (format "% -45s %s" + (propertize name 'face 'font-lock-builtin-face) + (or comment ""))) + (setq counsel-linux-app-format-function #'ds/counsel-linux-app-format-function) +#+END_SRC diff --git a/projectile-bookmarks.eld b/projectile-bookmarks.eld index dfda882..3e3cfd9 100644 --- a/projectile-bookmarks.eld +++ b/projectile-bookmarks.eld @@ -1 +1 @@ -("~/.emacs.d/elpa/xelb-0.18/" "~/.emacs.d/") \ No newline at end of file +("~/.emacs.d/" "~/.emacs.d/elpa/xelb-0.18/") \ No newline at end of file