making pgtk work better and setting up a bit better ui
This commit is contained in:
parent
c25d060033
commit
505274a62e
3 changed files with 231 additions and 31 deletions
64
README.org
64
README.org
|
@ -7,6 +7,7 @@
|
|||
- [[#set-basic-ui-config][Set basic UI config]]
|
||||
- [[#lets-bootstrap-straightel][Let's bootstrap straight.el]]
|
||||
- [[#fix-nixos][Fix NixOS]]
|
||||
- [[#spell-check][Spell Check]]
|
||||
- [[#keep-folders-clean][Keep Folders Clean]]
|
||||
- [[#ligatures][Ligatures]]
|
||||
- [[#keybindings][Keybindings]]
|
||||
|
@ -90,6 +91,7 @@ Let's start by making some basic ui changes like turning off the scrollbar, tool
|
|||
(setq-default indent-tabs-mode nil)
|
||||
|
||||
(setq comp-deferred-compilation-deny-list nil)
|
||||
(setq frame-resize-pixelwise t)
|
||||
#+end_src
|
||||
|
||||
In order to have this config work on both my desktop with regular joe-schmoe monitors and my laptop with new-hotness HiDPI monitor, I will set the font size if my system is the laptop to much higher.
|
||||
|
@ -133,9 +135,6 @@ Then let's make sure line-numbers are relative and on. And let's turn on visual-
|
|||
(global-visual-line-mode +1)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: t
|
||||
|
||||
I'm adding a terminal to my workflow because sometimes that's better for me.
|
||||
#+begin_src emacs-lisp
|
||||
(defun on-frame-open (frame)
|
||||
|
@ -145,8 +144,7 @@ I'm adding a terminal to my workflow because sometimes that's better for me.
|
|||
#+end_src
|
||||
|
||||
Here are some ui changes I pulled from Doom Emacs
|
||||
,#+begin_src emacs-lisp
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; always avoid GUI
|
||||
(setq use-dialog-box nil)
|
||||
;; Don't display floating tooltips; display their contents in the echo-area,
|
||||
|
@ -161,16 +159,11 @@ Here are some ui changes I pulled from Doom Emacs
|
|||
split-height-threshold nil)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
Let's make doc-view better
|
||||
#+begin_src emacs-lisp
|
||||
(setq doc-view-resolution 192)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 192
|
||||
|
||||
I need to fix evil-org and these seems about good as place as any to fix it.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(fset 'evil-redirect-digit-argument 'ignore)
|
||||
|
@ -181,17 +174,11 @@ Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
|
|||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: keyboard-escape-quit
|
||||
|
||||
Let's also turn on =recentf-mode=.
|
||||
#+begin_src emacs-lisp
|
||||
(recentf-mode +1)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: t
|
||||
|
||||
Finally this is not part of the UI but let's do this early and start the server so I can use emacsclient from my WM.
|
||||
#+begin_src emacs-lisp
|
||||
(server-start)
|
||||
|
@ -202,6 +189,12 @@ I will also add my personal scripts to emacs' PATH
|
|||
(add-to-list 'exec-path "/home/chris/scripts")
|
||||
#+end_src
|
||||
|
||||
Let's also set org-mode as the scratch buffer mode
|
||||
#+begin_src emacs-lisp
|
||||
(setq initial-major-mode 'org-mode)
|
||||
(setq initial-scratch-message "#+TITLE: SCRATCH\n#+DESCRIPTION: This buffer is for temporary things")
|
||||
#+end_src
|
||||
|
||||
** Let's bootstrap straight.el
|
||||
To use straight we need to bootstrap it. This code is pulled right from Straight's github repo.
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -301,15 +294,40 @@ Let's make parens and other delimiters easier to tell apart by making nested one
|
|||
|
||||
** Fix NixOS
|
||||
I am currently using NixOS. In order for emacs to have access to certain programs, we need to set some environment variables
|
||||
#+begin_src emacs-lisp
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(add-to-list 'exec-path "/home/chris/.nix-profile/bin")
|
||||
(add-to-list 'exec-path "/etc/profiles/per-user/chris/bin")
|
||||
(add-to-list 'exec-path "/run/current-system/sw/bin")
|
||||
(add-to-list 'exec-path "/opt/android-sdk/cmdline-tools/latest/bin")
|
||||
|
||||
(setq exec-directory "/run/current-system/sw/bin")
|
||||
(setenv "NIX_CONF_DIR" "/etc/nix")
|
||||
(setenv "NIX_OTHER_STORES" "/run/nix/remote-stores/*/nix")
|
||||
(setenv "NIX_PATH" "nixpkgs=%h/nixpkgs:nixos=%h/nixpkgs/nixos:nixos-config=/etc/nixos/configuration.nix")
|
||||
(setenv "NIX_PROFILES" "${pkgs.lib.concatStringsSep " " config.environment.profiles}")
|
||||
(setenv "NIX_REMOTE" "daemon")
|
||||
(setenv "NIX_USER_PROFILE_DIR" "/nix/var/nix/profiles/per-user/%u")
|
||||
(load "site-paths" t)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package exec-path-from-shell
|
||||
:demand
|
||||
:commands exec-path-from-shell-initialize
|
||||
:custom
|
||||
(exec-path-from-shell-arguments '("-l"))
|
||||
:config
|
||||
(exec-path-from-shell-initialize))
|
||||
#+end_src
|
||||
** Spell Check
|
||||
#+begin_src emacs-lisp
|
||||
(executable-find "ssh")
|
||||
(setq ispell-program-name "hunspell"
|
||||
ispell-local-dictionary "en_US"
|
||||
ispell-local-dictionary-alist
|
||||
;; Please note the list `("-d" "en_US")` contains ACTUAL parameters passed to hunspell
|
||||
;; You could use `("-d" "en_US,en_US-med")` to check with multiple dictionaries
|
||||
'(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8)))
|
||||
#+end_src
|
||||
|
||||
** Keep Folders Clean
|
||||
|
@ -437,6 +455,7 @@ This evil-collection package includes a lot of other evil based things.
|
|||
"ht" '(which-key-show-top-level :which-key "show top-level keybindings")
|
||||
"ss" '(consult-line :which-key "consult search")
|
||||
"sr" '(consult-ripgrep :which-key "consult ripgrep")
|
||||
"oP" '(proced :which-key "proced")
|
||||
"wo" '(other-window :which-key "other window")
|
||||
"wd" '(delete-window :which-key "other window")
|
||||
"wv" '(evil-window-vsplit :which-key "split window vertically")
|
||||
|
@ -669,7 +688,8 @@ Part of this config includes some special capture templates for my work as a you
|
|||
"c" 'org-capture
|
||||
"rr" 'org-refile
|
||||
"e" 'org-export-dispatch
|
||||
"oa" 'org-agenda-list)
|
||||
"oa" 'org-agenda-list
|
||||
"gt" 'org-babel-tangle)
|
||||
('normal org-agenda-mode-map
|
||||
"q" 'org-agenda-quit
|
||||
"r" 'org-agenda-redo
|
||||
|
@ -1792,6 +1812,7 @@ Since I like to make my window manager handle a lot of the window management, I
|
|||
** Help
|
||||
#+begin_src emacs-lisp
|
||||
(use-package helpful
|
||||
:ensure nil
|
||||
:commands (helpful-callable helpful-variable helpful-command helpful-key)
|
||||
:general
|
||||
(general-def 'normal 'helpful-mode-map
|
||||
|
@ -2183,7 +2204,7 @@ Ledger mode
|
|||
#+end_src
|
||||
|
||||
** MU4E
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
#+begin_src emacs-lisp
|
||||
(use-package mu4e
|
||||
:ensure nil
|
||||
:config
|
||||
|
@ -2341,7 +2362,6 @@ Ledger mode
|
|||
"om" 'mu4e)
|
||||
(general-def 'normal mu4e-view-mode-map
|
||||
"ga" 'mu4e-view-save-attachments))
|
||||
|
||||
#+end_src
|
||||
|
||||
# (use-package org-mime
|
||||
|
@ -2457,6 +2477,7 @@ I'd really like to have notifications for when things are scheduled so that I ge
|
|||
Use magit, because why wouldn't you? duh!
|
||||
#+begin_src emacs-lisp
|
||||
(use-package magit
|
||||
:ensure nil
|
||||
:commands (magit-status magit-get-current-branch)
|
||||
:general
|
||||
(chris/leader-keys
|
||||
|
@ -2559,7 +2580,6 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
|
|||
(setenv "ANDROID_SDK_ROOT" "/opt/android-sdk")
|
||||
(setenv "CHROME_EXECUTABLE" "/usr/bin/qutebrowser")
|
||||
(setenv "JAVA_HOME" "/usr/lib/jvm/default")
|
||||
(setenv "PATH" "/usr/local/bin:/usr/bin:/opt/android-sdk/cmdline-tools/latest/bin")
|
||||
|
||||
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
|
||||
|
||||
|
@ -3018,6 +3038,7 @@ Here we have a bunch of performance tweaks
|
|||
;; receiving input, which should help with performance while scrolling.
|
||||
(setq redisplay-skip-fontification-on-input t)
|
||||
#+end_src
|
||||
|
||||
*** Garbage Collection
|
||||
|
||||
We set the =gc-cons-threshold= variable to really high, now lets set it back low to make sure emacs performs properly.
|
||||
|
@ -3073,6 +3094,7 @@ As of right now I haven't fully setup my early-init file, this does not export i
|
|||
;; ;; we must prevent Emacs from doing it early!
|
||||
;; (setq package-enable-at-startup nil)
|
||||
;; (fset #'package--ensure-init-file #'ignore) ; DEPRECATED Removed in 28
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;; ;; `file-name-handler-alist' is consulted on every `require', `load' and various
|
||||
;; ;; path/io functions. You get a minor speed up by nooping this. However, this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue