Compare commits

...

10 Commits

Author SHA1 Message Date
Curt Spark 416fe4ee00 Add gitignore for personal files, re-enable EXWM configuration and slight modification to it 2023-08-09 12:13:36 +01:00
Curt Spark 964b614e38 LUA support 2023-06-14 20:18:25 +01:00
Seaspark 0f4f7579bb Update config.org 2022-10-10 01:08:42 +00:00
Curt Spark 3d3cb07e19 Pywal theme 2021-03-27 18:12:01 +00:00
Curt Spark de083dabdf Disable EXWM, switch to stumpwm 2021-03-23 13:45:07 +00:00
Curt Spark a1be36a8b7 Performance improvements 2021-03-21 13:04:43 +00:00
Curt Spark 5953585674 Add more stuff, switch back to EXWM. 2021-03-19 23:05:18 +00:00
Curt Spark f001cb47cb LUA and NIX support, company tweaks 2021-03-14 01:56:48 +00:00
Curt Spark a24de4a6cb Disable EXWM, EXWM Keybinding twaks 2021-03-03 20:54:29 +00:00
Curt Spark 0f5a0e03b9 Edwina tiling 2021-03-03 03:32:16 +00:00
6 changed files with 239 additions and 28 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
agenda.org
bookmarks
projectile-bookmarks.eld

View File

View File

@ -1,10 +0,0 @@
;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*-
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("Schoolwork"
(filename . "~/Documents/Schoolwork/")
(front-context-string . "English\n drwxr-")
(rear-context-string . "96 Apr 11 05:07 ")
(position . 246))
)

View File

@ -1,4 +1,4 @@
* Bloxie's Emacs Configuration * Bloxie's Emacs Configuration
** By Curt Spark / Bloxiebird. ** By Curt Spark / Bloxiebird.
* Introduction * Introduction
@ -71,6 +71,52 @@ Install the package, enable it and ensure that it always is installed:
(modern-fringes-invert-arrows)) (modern-fringes-invert-arrows))
#+END_SRC #+END_SRC
*** Theming *** Theming
**** Pywal
+BEGIN_SRC emacs-lisp
(use-package ewal
:init (setq
;; Always use built-in palettes:
ewal-use-built-in-always-p nil
;; Use built-in palettes if your pywal theme fails to load (otherwise you just get a black-and-white theme and something about color being nil):
ewal-use-built-in-on-failure-p t
;; Pick a built-in palette:
;; ewal-built-in-palette "sexy-material"
;; Use special cursor for insert state when evil insert bindings are disabled:
ewal-evil-cursors-obey-evil-p t
))
(use-package ewal-doom-themes
:ensure t
:config
;; Global settings (defaults)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t)) ; if nil, italics is universally disabled
(load-theme 'ewal-doom-vibrant t)
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config)
;; or for treemacs users
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config)
(use-package ewal-evil-cursors
:after (ewal-spacemacs-themes)
:config (ewal-evil-cursors-get-colors
:apply t :spaceline t))
+END_SRC
**** Classic
The theme for Emacs. The theme for Emacs.
Install and set the theme, ensuring that it is always installed: Install and set the theme, ensuring that it is always installed:
Old theme for if you'd like to follow Xresources Old theme for if you'd like to follow Xresources
@ -81,6 +127,9 @@ Old theme for if you'd like to follow Xresources
(load-theme 'xresources t)) (load-theme 'xresources t))
+END_SRC +END_SRC
*** Doom Themes
Themes from Doom Emacs
Install and set the theme, ensuring that it is always installed:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package doom-themes (use-package doom-themes
:ensure t :ensure t
@ -95,10 +144,10 @@ Old theme for if you'd like to follow Xresources
(doom-themes-visual-bell-config) (doom-themes-visual-bell-config)
;; Enable custom neotree theme (all-the-icons must be installed!) ;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config) ;; (doom-themes-neotree-config)
;; or for treemacs users ;; or for treemacs users
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme ;; (setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
(doom-themes-treemacs-config) ;; (doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification. ;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config) (doom-themes-org-config)
@ -117,6 +166,12 @@ Install and set the modeline, ensuring that it is always installed:
;; Display the current time on the modeline ;; Display the current time on the modeline
(display-time-mode 1) (display-time-mode 1)
;; Display time in the 24hr format
(setq display-time-24hr-format t)
;; Display also the date on the modeline
(setq display-time-day-and-date t)
;; Display the battery (if has one) on the modeline ;; Display the battery (if has one) on the modeline
(display-battery-mode 1) (display-battery-mode 1)
#+END_SRC #+END_SRC
@ -153,9 +208,9 @@ Install the package, enable it and ensure that it always is installed:
**** Emacs Dashboard Configuration **** Emacs Dashboard Configuration
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; Set the title ;; Set the title
(setq dashboard-banner-logo-title "Welcome to Bloxie's Emacs!") (setq dashboard-banner-logo-title "Welcome to Seaspark's Emacs!")
;; Set the banner ;; Set the banner
(setq dashboard-startup-banner 'logo) (setq dashboard-startup-banner '1)
;; Value can be ;; Value can be
;; 'official which displays the official emacs logo ;; 'official which displays the official emacs logo
;; 'logo which displays an alternative emacs logo ;; 'logo which displays an alternative emacs logo
@ -206,6 +261,42 @@ Install the package, enable it and ensure that it always is installed:
("?" "" "?/h" #'show-help nil "<" ">")) ("?" "" "?/h" #'show-help nil "<" ">"))
)) ))
#+END_SRC #+END_SRC
** Performance
*** Gcmh Mode
Enforce a sneaky Garbage Collection strategy to minimize GC interference with
user activity.
During normal use a high GC threshold is set.
When idling GC is triggered and a low threshold is set.
This greatly improves performance/startup time of emacs.
#+BEGIN_SRC emacs-lisp
(use-package gcmh
:ensure t
:config
(gcmh-mode 1))
#+END_SRC
*** Doom Modeline
Tweaks to doom modeline
#+BEGIN_SRC emacs-lisp
;; Disable modeline word count as it causes lots of lag
(setq doom-modeline-enable-word-count nil)
#+END_SRC
*** Custom
#+BEGIN_SRC emacs-lisp
(setq auto-window-vscroll nil)
(setq fast-but-imprecise-scrolling t)
#+END_SRC
** Custom ** Custom
*** Auto Popup frame Mode *** Auto Popup frame Mode
A mode that is similiar in functionality to pop-up-frame, however much more granular in control and toggleable as it is mode. Will stop duplicate windows from creating new frames etc. A mode that is similiar in functionality to pop-up-frame, however much more granular in control and toggleable as it is mode. Will stop duplicate windows from creating new frames etc.
@ -334,6 +425,7 @@ it.
Install the package, enable it and ensure that it always is installed: Install the package, enable it and ensure that it always is installed:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package pdf-tools (use-package pdf-tools
:ensure t
:hook (pdf-tools-enabled . pdf-view-midnight-minor-mode) :hook (pdf-tools-enabled . pdf-view-midnight-minor-mode)
;;:hook (pdf-tools-enabled . hide-mode-line-mode) ;;:hook (pdf-tools-enabled . hide-mode-line-mode)
:init :init
@ -518,6 +610,18 @@ Install the package, enable it and ensure that it always is installed, and then
; Wrap around when suggestions reach bottom. ; Wrap around when suggestions reach bottom.
(setq company-selection-wrap-around t) (setq company-selection-wrap-around t)
(dolist (key '("<return>" "RET"))
;; Here we are using an advanced feature of define-key that lets
;; us pass an "extended menu item" instead of an interactive
;; function. Doing this allows RET to regain its usual
;; functionality when the user has not explicitly interacted with
;; Company.
(define-key company-active-map (kbd key)
`(menu-item nil company-complete
:filter ,(lambda (cmd)
(when (company-explicit-action-p)
cmd)))))
; Use tab key to cycle through suggestions. ; Use tab key to cycle through suggestions.
; ('tng' means 'tab and go') ; ('tng' means 'tab and go')
(company-tng-configure-default) (company-tng-configure-default)
@ -581,12 +685,31 @@ Install the package, enable it and ensure that it always is installed, and then
Rich Presence in Emacs for discord, `https://github.com/Mstrodl/elcord` Rich Presence in Emacs for discord, `https://github.com/Mstrodl/elcord`
Install the package, enable it and ensure that it always is installed, and then enable the mode: Install the package, enable it and ensure that it always is installed, and then enable the mode:
#+BEGIN_SRC emacs-lisp +BEGIN_SRC emacs-lisp
(use-package elcord (use-package elcord
:ensure t :ensure t
:init :init
(elcord-mode 1)) (elcord-mode 1))
+END_SRC
** Nix Mode
An Emacs major mode for editing Nix expressions. There is also a manual available at nix-mode.org.
#+BEGIN_SRC emacs-lisp
(use-package nix-mode
:ensure t
:mode "\\.nix\\'")
#+END_SRC #+END_SRC
** LUA Mode
lua-mode is a major mode for editing Lua sources in Emacs.
#+BEGIN_SRC emacs-lisp
(use-package lua-mode
:ensure t)
(add-to-list 'auto-mode-alist '("\\.iy\\'" . lua-mode))
#+END_SRC
** LSP Mode ** LSP Mode
LSP mode will give you IDE capabilities in Emacs, using Microsoft's LSP mode will give you IDE capabilities in Emacs, using Microsoft's
Universal Language Server Protocol. The same one that VSCode uses for Universal Language Server Protocol. The same one that VSCode uses for
@ -607,20 +730,23 @@ on how to install the Programming Language Servers that you want.
:commands lsp) :commands lsp)
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
(setq lsp-keymap-prefix "s-l") (setq lsp-keymap-prefix "C-l")
#+END_SRC #+END_SRC
*** Configuration *** Configuration
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; optionally ;; optionally
(use-package lsp-ui :commands lsp-ui-mode (use-package lsp-ui
:ensure t) :commands lsp-ui-mode
(use-package company-lsp :commands company-lsp
:ensure t) :ensure t)
;; (use-package company-lsp
;; :commands company-lsp
;; :ensure t)
;; if you are helm user ;; if you are helm user
;;(use-package helm-lsp :commands helm-lsp-workspace-symbol) ;;(use-package helm-lsp :commands helm-lsp-workspace-symbol)
;; if you are ivy user ;; if you are ivy user
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol (use-package lsp-ivy
:commands lsp-ivy-workspace-symbol
:ensure t) :ensure t)
;;(use-package lsp-treemacs :commands lsp-treemacs-errors-list ;;(use-package lsp-treemacs :commands lsp-treemacs-errors-list
;; :ensure t) ;; :ensure t)
@ -629,8 +755,42 @@ on how to install the Programming Language Servers that you want.
(use-package dap-mode (use-package dap-mode
:ensure t) :ensure t)
;; (use-package dap-LANGUAGE) to load the dap adapter for your language ;; (use-package dap-LANGUAGE) to load the dap adapter for your language
;; New luau lsp for roblox implementation
(with-eval-after-load 'lsp-mode
(add-to-list 'lsp-language-id-configuration
'(lua-mode . "luau"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "luau-lsp")
:activation-fn (lsp-activate-on "luau")
:server-id 'luau-lsp)))
#+END_SRC #+END_SRC
** Edwina Dynamic Tiling
Edwina is a dynamic window manager for Emacs. It automatically arranges your Emacs panes (called “windows” in Emacs parlance) into predefined layouts, dwm-style.
Install the package, enable it and ensure that it always is installed, and then configure:
+BEGIN_SRC emacs-lisp
(use-package edwina
:ensure t
:config
(setq display-buffer-base-action '(display-buffer-below-selected))
;;(edwina-setup-dwm-keys)
(edwina-mode 1))
+END_SRC
** Ranger
This is a minor mode that runs within dired, it emulates many of
ranger's (terminal file manager) features. This minor mode shows a
stack of parent directories, and updates the parent buffers, while
you're navigating the file system. The preview window takes some of
the ideas from Peep-Dired, to display previews for the selected files,
in the primary dired buffer.
#+BEGIN_SRC emacs-lisp
(use-package ranger
:ensure t)
#+END_SRC
** EXWM ** EXWM
EXWM, The Emacs X Window Manager. As it says, it is an Emacs window EXWM, The Emacs X Window Manager. As it says, it is an Emacs window
manager for the X display server. The benefits include using all your manager for the X display server. The benefits include using all your
@ -656,6 +816,11 @@ Install the package, enable it and ensure that it always is installed, and then
;; Mouse input/bindings ;; Mouse input/bindings
(require 'exwm-input) (require 'exwm-input)
;; EXWM Randr, makes sure that the screens automatically update with the proper resolutions
;; You may want to install a program such as arandr to graphically manage the screens and resolutions, you can export it into Xrandr commands
(require 'exwm-randr)
(exwm-randr-enable)
(defun exwm-switch-workspace-left () (defun exwm-switch-workspace-left ()
"Switch one workspace to the left" "Switch one workspace to the left"
(interactive) (interactive)
@ -683,7 +848,9 @@ Install the package, enable it and ensure that it always is installed, and then
;; Keybindings ;; Keybindings
(setq exwm-input-global-keys (setq exwm-input-global-keys
`(;; Reset EXWM `(;; Standard EXWM Bindings
;; Reset EXWM
([?\s-r] . exwm-reset) ([?\s-r] . exwm-reset)
;; EXWM Workspace Switcher ;; EXWM Workspace Switcher
@ -712,12 +879,64 @@ Install the package, enable it and ensure that it always is installed, and then
;; Swap current workspace with one workspace to the left ;; Swap current workspace with one workspace to the left
([?\s-L] . exwm-swap-workspace-right) ([?\s-L] . exwm-swap-workspace-right)
;; Application Launcher ;; Bindings for Edwina
([?\s-b] . counsel-linux-app)))
;; Select next window in stack
;;([?\s-n] . edwina-select-next-window)
;; Select previous window in stack
;;([?\s-p] . edwina-select-previous-window)
;; Swap current window with next window in stack
;; ([?\s-N] . edwina-swap-next-window)
;; Swap current window with previous window in stack
;;([?\s-P] . edwina-swap-previous-window)
;; Make a new window in the stack
;;([?\s-b] . (lambda ()
;; (interactive)
;; (edwina-clone-window)
;; (edwina-select-next-window)))
))
;; Could not integrate these into the exwm global keys variable, for some reason they do not work in NIXOS
(exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app)
;; (exwm-input-set-key (kbd "s-i") 'exwm-input-toggle-keyboard)
;; (exwm-input-set-key (kbd "s-h") 'exwm-switch-workspace-left)
;; (exwm-input-set-key (kbd "s-l") 'exwm-switch-workspace-right)
;; (exwm-input-set-key (kbd "s-H") 'exwm-swap-workspace-left)
;; (exwm-input-set-key (kbd "s-L") 'exwm-swap-workspace-right)
;; Edwina bindings
;; Increase master column size
;;(exwm-input-set-key (kbd "s-=") 'edwina-inc-mfact)
;; Increase master column size
;;(exwm-input-set-key (kbd "s--") 'edwina-dec-mfact)
;; Increase number of windows in master stack
;;(exwm-input-set-key (kbd "s-+") 'edwina-inc-nmaster)
;; Decrease number of windows in master stack
;;(exwm-input-set-key (kbd "s-_") 'edwina-dec-nmaster)
;; Set all X windows to open in char mode by default, allowing to pass through all key combinations ;; Set all X 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)
;; ))
;; Set all X windows to open in line mode by default, allowing emacs to have control over keybinds first
(add-hook 'exwm-manage-finish-hook (add-hook 'exwm-manage-finish-hook
(lambda () (call-interactively #'exwm-input-release-keyboard) (lambda () (call-interactively #'exwm-input-grab-keyboard)
;;(exwm-layout-hide-mode-line) ;;(exwm-layout-hide-mode-line)
)) ))

View File

@ -51,7 +51,7 @@
'(jdee-db-spec-breakpoint-face-colors (cons "#030100" "#100e0d")) '(jdee-db-spec-breakpoint-face-colors (cons "#030100" "#100e0d"))
'(objed-cursor-color "#874804") '(objed-cursor-color "#874804")
'(package-selected-packages '(package-selected-packages
'(omnisharp csharp-mode bug-hunter ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes ewal org-bullets company flyspell-correct-ivy evil ivy which-key use-package)) '(ranger omnisharp csharp-mode bug-hunter ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes ewal org-bullets company flyspell-correct-ivy evil ivy which-key use-package))
'(pdf-view-midnight-colors '("#655370" . "#fbf8ef")) '(pdf-view-midnight-colors '("#655370" . "#fbf8ef"))
'(rustic-ansi-faces '(rustic-ansi-faces
["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010" "#e8c99f"]) ["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010" "#e8c99f"])

View File

@ -1 +0,0 @@
("~/.emacs.d/")