haven't updated this in forever

master
Rachel Lambda Samuelsson 2023-07-25 11:16:50 +02:00
parent 4fa5e9786f
commit c64357da53
5 changed files with 22 additions and 120 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ secrets.el
\#*\#
ido.last
bookmarks
dmenu-items tramp

83
exwm.el
View File

@ -1,83 +0,0 @@
(require 'dash)
(require 'exwm)
(require 'exwm-systemtray)
(exwm-systemtray-enable)
(display-battery-mode 1)
(display-time-mode 1)
(defun discord ()
(interactive)
(call-process "discord" nil 0 nil))
(defun firefox ()
(interactive)
(let ((buff (--filter (string= "Firefox" (buffer-name it))
(buffer-list))))
(if buff
(apply 'switch-to-buffer buff)
(call-process "firefox" nil 0 nil))))
(defun rofi ()
(interactive)
(call-process "rofi" nil 0 nil "-show" "run"))
(defun pass ()
(interactive)
(call-process "/home/deppy/bin/cpypsk" nil 0 nil))
(defun scrot ()
(interactive)
(call-process "maim" nil 0 nil
"-s"
(concat "/home/deppy/img/scrot/" (format-time-string "%s" (current-time)) ".png")))
(setq exwm-input-global-keys
`((,(kbd "s-E") . save-buffers-kill-terminal)
(,(kbd "s-Q") . evil-quit)
;; Windowing
(,(kbd "s-h") . (lambda () (interactive) (evil-window-decrease-width 1)))
(,(kbd "s-j") . (lambda () (interactive) (select-window (next-window))))
(,(kbd "s-k") . (lambda () (interactive) (select-window (previous-window))))
(,(kbd "s-l") . (lambda () (interactive) (evil-window-increase-width 1)))
;; Maybe use window-right, window-left, etc, and add things to split in all directions too?
(,(kbd "s-J") . (lambda () (interactive)
(window-swap-states (selected-window) (next-window))))
(,(kbd "s-K") . (lambda () (interactive)
(window-swap-states (selected-window) (previous-window))))
(,(kbd "s-L") . (lambda () (interactive)
(select-window (split-window-right))
(switch-to-buffer ,dashboard-buffer-name)))
(,(kbd "s-H") . (lambda () (interactive)
(let ((cwin (selected-window))
(nwin (split-window-right)))
(window-swapstated cwin nwin)
(select-window nwin)
(switch-to-buffer ,dashboard-buffer-name))))
(,(kbd "s-r") . exwm-reset)
(,(kbd "s-f") . exwm-layout-set-fullscreen)
;; Applications
(,(kbd "s-<backspace>") . firefox)
(,(kbd "s-<return>") . multi-vterm)
(,(kbd "s-d") . rofi)
(,(kbd "s-p") . pass)
(,(kbd "<print>") . scrot)
;; Workspaces
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
(add-hook 'exwm-update-class-hook
(lambda () (exwm-workspace-rename-buffer exwm-class-name)))
(setq exwm-manage-force-tiling 1)
(exwm-init)

31
init.el
View File

@ -72,14 +72,8 @@
;;; END OPTIMIZATION
;; Packages
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
;; File inclusion
(defun path (f) (concat "/home/deppy/.emacs.d/" f))
(defun path (f) (concat (file-name-as-directory (getenv "HOME")) (file-name-as-directory ".emacs.d") f))
(defmacro include (f) (load (path f)))
;; Keybinds
@ -100,12 +94,6 @@
;; Emacs server
(server-start)
;; Exwm
(include "exwm.el")
;; PDF tools install
(pdf-tools-install)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@ -191,7 +179,10 @@
"dvips and gv")
(output-dvi "xdvi")
(output-pdf "Evince")
(output-html "xdg-open")))
(output-html "xdg-open")) t)
'(auth-source-save-behavior nil)
'(chess-display-popup nil)
'(dired-listing-switches "-alh")
'(display-time-24hr-format t)
'(display-time-default-load-average nil)
'(display-time-interval 15)
@ -207,11 +198,9 @@
'(image-use-external-converter t)
'(imagemagick-enabled-types
'(3FR ARW AVS BMP BMP2 BMP3 CAL CALS CMYK CMYKA CR2 CRW CUR CUT DCM DCR DCX DDS DJVU DNG DPX EXR FAX FITS GBR GIF GIF87 GRB HRZ ICB ICO ICON J2C JNG JP2 JPC JPEG JPG JPX K25 KDC MIFF MNG MRW MSL MSVG MTV NEF ORF OTB PBM PCD PCDS PCL PCT PCX PDB PEF PGM PICT PIX PJPEG PNG PNG24 PNG32 PNG8 PNM PPM PSD PTIF PWP RAF RAS RBG RGB RGBA RGBO RLA RLE SCR SCT SFW SGI SR2 SRF SUN SVG SVGZ TGA TIFF TIFF64 TILE TIM TTF UYVY VDA VICAR VID VIFF VST WBMP WPG X3F XBM XC XCF XPM XV XWD YCbCr YCbCrA YUV ORA))
'(org-agenda-files '("/home/deppy/doc/org/todo.org"))
'(org-agenda-files nil)
'(org-preview-latex-default-process 'imagemagick)
'(org-startup-with-latex-preview t)
'(package-selected-packages
'(pdf-tools dune tuareg idris-mode auctex haskell-emacs-base multi-vterm dmenu markdown-preview-mode markdown-mode exwm org-superstar org-fragtog org-pretty-tags visual-fill writeroom-mode haskell-emacs treemacs-evil treemacs solarized-theme doom-modeline all-the-icons-dired page-break-lines all-the-icons dashboard org-evil zotero vterm magit undo-fu latex-math-preview use-package haskell-mode evil-surround undo-tree evil-org evil))
'(shell-file-name "/bin/bash")
'(treemacs-collapse-dirs 3)
'(treemacs-filewatch-mode t)
@ -226,13 +215,7 @@
'(writeroom-set-alpha writeroom-set-menu-bar-lines writeroom-set-tool-bar-lines writeroom-set-vertical-scroll-bars writeroom-set-bottom-divider-width))
'(writeroom-maximize-window nil)
'(writeroom-mode-line t)
'(writeroom-width 100)
'(zotero-recognize-pdfdata
"/home/deppy/.emacs.d/elpa/zotero-20211008.2207/pdftools/poppler-data/")
'(zotero-recognize-pdfinfo
"/home/deppy/.emacs.d/elpa/zotero-20211008.2207/pdftools/pdfinfo-linux-x86_64" t)
'(zotero-recognize-pdftotext
"/home/deppy/.emacs.d/elpa/zotero-20211008.2207/pdftools/pdftotext-linux-x86_64"))
'(writeroom-width 100))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

View File

@ -17,3 +17,6 @@
(python . t)
(java . t)
(haskell . t)))
;; PDF tools install
(pdf-tools-install)

View File

@ -7,12 +7,12 @@
(global-prettify-symbols-mode 1)
;; Font
(let ((fontName "Fira Code Retina-10"))
(set-face-attribute 'default t :font fontName)
(set-face-attribute 'default nil :font fontName))
(setq use-default-font-for-symbols nil)
(add-to-list 'default-frame-alist '(font . "SAX2"))
(set-face-attribute 'default nil :height 120)
;; Highlight long lines
(setq whitespace-line-column 100)
(setq whitespace-line-column 120)
(setq whitespace-style '(face lines-tail))
(add-hook 'prog-mode-hook 'whitespace-mode)
@ -29,7 +29,7 @@
(setq image-use-external-converter t)
;; Theme
(load-theme 'solarized-light t)
(load-theme 'solarized-dark-high-contrast t)
;; Dashboard
(setq inhibit-splash-screen t)
@ -40,19 +40,14 @@
(setq dashboard-center-content t)
(setq dashboard-startup-banner (path "style/evil_logo.png"))
(setq dashboard-startup-banner (path "style/cat.png"))
(setq dashboard-banner-logo-title "Welcome to EVIL")
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
(setq dashboard-show-shortcuts nil)
(setq dashboard-filter-agenda-entry 'dashboard-no-filter-agenda)
(setq dashboard-footer-messages
'("The one true editor!"
"Who the hell uses VIM anyway? Go EVIL!"
"Happy coding!"
"VI VI VI, the editor of the beast"
"While any text editor can save your files, only EVIL can save your soul"
"λf. (λx. f (x x)) (λx. f (x x))"))
(setq dashboard-footer-messages '("λf. (λx. f (x x)) (λx. f (x x))"))
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
(when (display-graphic-p)
(require 'all-the-icons))
@ -93,3 +88,6 @@
;; Transparent
(set-frame-parameter (selected-frame) 'alpha '(100 . 100))
(add-to-list 'default-frame-alist '(alpha . (100 . 100)))
;; Allow any size
(setq frame-resize-pixelwise t)