Small changes
This commit is contained in:
@@ -9,4 +9,4 @@ alias ff find-file $1
|
|||||||
alias dd dired-other-window .
|
alias dd dired-other-window .
|
||||||
alias d dired-jump
|
alias d dired-jump
|
||||||
alias clear clear-scrollback
|
alias clear clear-scrollback
|
||||||
alias asc async-shell-command $1
|
alias asc async-shell-command $1
|
||||||
@@ -255,31 +255,6 @@ never used before, 3 seems to be a reasonable default.
|
|||||||
("ravenmaiden" 6)
|
("ravenmaiden" 6)
|
||||||
(_ 3))))
|
(_ 3))))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Reset font size
|
|
||||||
Font size is best left unfixed: depending on the display size and the
|
|
||||||
machine, I will usually need to adjust it so it looks just right.
|
|
||||||
This function sets the font size using both those variables. It is
|
|
||||||
also added to `enable-theme-functions` such that loading a theme will
|
|
||||||
forcefully adjust the font size.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(defun +oreo/font-reset (&optional _)
|
|
||||||
(-->
|
|
||||||
(* (pcase (system-name) ; get a fixed base value based on the machine
|
|
||||||
("rhmaiden" 140)
|
|
||||||
(_ 120))
|
|
||||||
(pcase (display-pixel-width) ; get a multiplier based on resolution
|
|
||||||
((pred (>= 1920)) 0.9)
|
|
||||||
((pred (>= 2560)) 1.24)
|
|
||||||
(_ 1.05)))
|
|
||||||
floor
|
|
||||||
(progn
|
|
||||||
(set-face-attribute 'default nil :height it)
|
|
||||||
(set-face-attribute 'mode-line nil :height it))))
|
|
||||||
|
|
||||||
(add-to-list 'enable-theme-functions #'+oreo/font-reset)
|
|
||||||
(add-to-list 'after-make-frame-functions #'+oreo/font-reset)
|
|
||||||
#+end_src
|
|
||||||
** Proper paths in Emacs
|
** Proper paths in Emacs
|
||||||
Imagine you adjust your path in ZSH. This change won't necessarily
|
Imagine you adjust your path in ZSH. This change won't necessarily
|
||||||
affect the results of ~(getenv "PATH")~ - you'd need to ensure Emacs
|
affect the results of ~(getenv "PATH")~ - you'd need to ensure Emacs
|
||||||
@@ -1835,13 +1810,8 @@ and any expression delimited by curly braces is considered an external
|
|||||||
command. You may even pipe the results of one into another, allowing
|
command. You may even pipe the results of one into another, allowing
|
||||||
a deeper level of integration between Emacs Lisp and the shell!
|
a deeper level of integration between Emacs Lisp and the shell!
|
||||||
*** EShell basics
|
*** EShell basics
|
||||||
Setup some niceties of any shell program and some evil-like movements
|
Setup some niceties and basics you'd expect from any worthy shell
|
||||||
for easy shell usage, both in and out of insert mode.
|
interpreter.
|
||||||
|
|
||||||
NOTE: This mode doesn't allow you to set maps the normal way; you need
|
|
||||||
to set keybindings on eshell-mode-hook, otherwise it'll just overwrite
|
|
||||||
them.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
:defer t
|
:defer t
|
||||||
@@ -1900,7 +1870,6 @@ Here I use my external library
|
|||||||
dynamic prompt for EShell. Current features include:
|
dynamic prompt for EShell. Current features include:
|
||||||
- Git repository details (with difference from remote and number of
|
- Git repository details (with difference from remote and number of
|
||||||
modified files)
|
modified files)
|
||||||
- Current date and time
|
|
||||||
- A coloured prompt character which changes colour based on the exit
|
- A coloured prompt character which changes colour based on the exit
|
||||||
code of the previous command
|
code of the previous command
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ Returns a list of files with the directory preprended to them."
|
|||||||
|
|
||||||
(defun +search/find-file ()
|
(defun +search/find-file ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(find-file (completing-read "Find file: " (+search/get-all-candidates) nil t)))
|
(let* ((cands (+search/get-all-candidates))
|
||||||
|
(choice (completing-read "Find file: " cands nil t)))
|
||||||
|
(find-file choice)))
|
||||||
|
|
||||||
(defun +search/-format-grep-candidates ()
|
(defun +search/-format-grep-candidates ()
|
||||||
(thread-last (+search/get-all-candidates)
|
(thread-last (+search/get-all-candidates)
|
||||||
@@ -57,7 +59,7 @@ Returns a list of files with the directory preprended to them."
|
|||||||
|
|
||||||
(defun +search/search-all ()
|
(defun +search/search-all ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((term (read-string "Search for: " (thing-at-point 'symbol)))
|
(let ((term (read-string "Search for: "))
|
||||||
(candidates (+search/-format-grep-candidates)))
|
(candidates (+search/-format-grep-candidates)))
|
||||||
(thread-last candidates
|
(thread-last candidates
|
||||||
(format "grep --color=auto -nIHZe \"%s\" -- %s" term)
|
(format "grep --color=auto -nIHZe \"%s\" -- %s" term)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"NeoSolarized": { "branch": "master", "commit": "b94b1a9ad51e2de015266f10fdc6e142f97bd617" },
|
"NeoSolarized": { "branch": "master", "commit": "b94b1a9ad51e2de015266f10fdc6e142f97bd617" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" },
|
"lazy.nvim": { "branch": "main", "commit": "f0f5bbb9e5bfae5e6468f9359ffea3d151418176" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
"vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }
|
"vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
|
|||||||
sh /etc/profile.d/debuginfod.sh
|
sh /etc/profile.d/debuginfod.sh
|
||||||
|
|
||||||
# Import useful variables to systemd
|
# Import useful variables to systemd
|
||||||
systemctl --user import-environment PATH SSH_AUTH_SOCK
|
systemctl --user import-environment PATH SSH_AUTH_SOCK EDITOR
|
||||||
|
|
||||||
# Run some programs
|
# Run some programs
|
||||||
echo "Welcome to..."
|
echo "Welcome to..."
|
||||||
figlet "Arch Linux"
|
figlet "Arch Linux"
|
||||||
/usr/bin/pfetch
|
fastfetch
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ autoload -U compinit
|
|||||||
setopt autocd
|
setopt autocd
|
||||||
export ZSH_THEME="af-magic"
|
export ZSH_THEME="af-magic"
|
||||||
PS1="%B%F{4}[%(4~|...|)%3~]
|
PS1="%B%F{4}[%(4~|...|)%3~]
|
||||||
%F{white}%F{2}%m%b%f> %k"
|
%F{white}%n@%F{white}%F{2}%m%b%f> %k"
|
||||||
|
|
||||||
setopt BANG_HIST
|
setopt BANG_HIST
|
||||||
setopt EXTENDED_HISTORY
|
setopt EXTENDED_HISTORY
|
||||||
@@ -75,7 +75,6 @@ zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,'
|
|||||||
## Imports
|
## Imports
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
||||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||||
|
|
||||||
## Vim binds
|
## Vim binds
|
||||||
|
|||||||
Reference in New Issue
Block a user