mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 11:13:04 +03:00
Compare commits
3 commits
13aef359c2
...
b7728cf9ca
| Author | SHA1 | Date | |
|---|---|---|---|
| b7728cf9ca | |||
| 8264a067e9 | |||
| 53b19728b7 |
6 changed files with 67 additions and 6 deletions
2
.bashrc
2
.bashrc
|
|
@ -29,7 +29,7 @@ xhost +local:root > /dev/null 2>&1
|
|||
# Startup & environment:5 ends here
|
||||
|
||||
# [[file:Console.org::*Startup & environment][Startup & environment:6]]
|
||||
export MANPAGER="sh -c 'sed -e s/.\\\\x08//g | bat -l man -p'"
|
||||
# export MANPAGER="sh -c 'sed -e s/.\\\\x08//g | bat -l man -p'"
|
||||
# Startup & environment:6 ends here
|
||||
|
||||
# [[file:Console.org::*Startup & environment][Startup & environment:7]]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
(specifications->manifest
|
||||
'(
|
||||
"man-db"
|
||||
"aria2"
|
||||
"openssl"
|
||||
"ncdu"
|
||||
|
|
|
|||
|
|
@ -615,6 +615,25 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
|
|||
(setq accent-custom '((a (ā))
|
||||
(A (Ā)))))
|
||||
|
||||
(defun my/round-number-at-point (word signs)
|
||||
(interactive
|
||||
(list (or (when (region-active-p)
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning)
|
||||
(region-end)))
|
||||
(thing-at-point 'number 'no-properties))
|
||||
(read-number "Decimal signs: " 2)))
|
||||
(when (stringp word)
|
||||
(setq word (string-to-number word)))
|
||||
(let ((number (/ (float (round (* (expt 10 signs) word)))
|
||||
(expt 10 signs))))
|
||||
(save-excursion
|
||||
(replace-string-in-region
|
||||
(number-to-string word)
|
||||
(number-to-string number)
|
||||
(line-beginning-position)
|
||||
(line-end-position)))))
|
||||
|
||||
(use-package projectile
|
||||
:straight t
|
||||
:config
|
||||
|
|
@ -8192,6 +8211,7 @@ base toot."
|
|||
"qwen2.5:32b" "qwen2.5-coder:32b"
|
||||
"eva-qwen2.5-q4_k_l-32b:latest"
|
||||
"t-pro-1.0-q4_k_m:latest"
|
||||
"t-lite-it-1.0-q4_k_m:latest"
|
||||
(llava-phi3:latest
|
||||
:capabilities (media)
|
||||
:mime-types ("image/jpeg" "image/png")))))
|
||||
|
|
|
|||
11
.profile
11
.profile
|
|
@ -51,11 +51,18 @@ fi
|
|||
# SSL Certs:1 ends here
|
||||
|
||||
# [[file:Console.org::*ssh-agent][ssh-agent:1]]
|
||||
SSH_AGENT_DIR="/tmp"
|
||||
|
||||
if [ "$IS_ANDROID" == "true" ]; then
|
||||
SSH_AGENT_DIR="/data/data/com.termux/files/tmp"
|
||||
mkdir -p $SSH_AGENT_DIR
|
||||
fi
|
||||
|
||||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||
ssh-agent -t 1h > "/tmp/ssh-agent.env"
|
||||
ssh-agent -t 1h > "$SSH_AGENT_DIR/ssh-agent.env"
|
||||
fi
|
||||
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
|
||||
source "/tmp/ssh-agent.env" >/dev/null
|
||||
source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null
|
||||
fi
|
||||
# ssh-agent:1 ends here
|
||||
|
||||
|
|
|
|||
15
Console.org
15
Console.org
|
|
@ -109,11 +109,18 @@ I'm paranoid so I encrypt my SSH keys.
|
|||
Got the idea for below from [[https://wiki.archlinux.org/title/SSH_keys#SSH_agents][ArchWiki]]:
|
||||
|
||||
#+begin_src bash
|
||||
SSH_AGENT_DIR="/tmp"
|
||||
|
||||
if [ "$IS_ANDROID" == "true" ]; then
|
||||
SSH_AGENT_DIR="/data/data/com.termux/files/tmp"
|
||||
mkdir -p $SSH_AGENT_DIR
|
||||
fi
|
||||
|
||||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
||||
ssh-agent -t 1h > "$SSH_AGENT_DIR/ssh-agent.env"
|
||||
fi
|
||||
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
|
||||
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
||||
source "$SSH_AGENT_DIR/ssh-agent.env" >/dev/null
|
||||
fi
|
||||
#+end_src
|
||||
** Guix settings
|
||||
|
|
@ -345,7 +352,7 @@ xhost +local:root > /dev/null 2>&1
|
|||
|
||||
Set manpager to bat
|
||||
#+begin_src bash
|
||||
export MANPAGER="sh -c 'sed -e s/.\\\\x08//g | bat -l man -p'"
|
||||
# export MANPAGER="sh -c 'sed -e s/.\\\\x08//g | bat -l man -p'"
|
||||
#+end_src
|
||||
|
||||
[[https://codeberg.org/akib/emacs-eat][eat]] integration
|
||||
|
|
@ -974,6 +981,8 @@ keymap_mode = "vim-insert"
|
|||
| ncdu | disk usage analyzer |
|
||||
| openssl | |
|
||||
| aria2 | Download tool |
|
||||
| man-db | |
|
||||
| pv | |
|
||||
|
||||
** ripgrep config
|
||||
Occasionally I can't exclude certain files from ripgrep via the VCS settings, so here is a simple config to ignore certain files globally.
|
||||
|
|
|
|||
24
Emacs.org
24
Emacs.org
|
|
@ -1083,6 +1083,28 @@ Input accented characters.
|
|||
(setq accent-custom '((a (ā))
|
||||
(A (Ā)))))
|
||||
#+end_src
|
||||
*** Random editing tricks
|
||||
**** Round number at point
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/round-number-at-point (word signs)
|
||||
(interactive
|
||||
(list (or (when (region-active-p)
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning)
|
||||
(region-end)))
|
||||
(thing-at-point 'number 'no-properties))
|
||||
(read-number "Decimal signs: " 2)))
|
||||
(when (stringp word)
|
||||
(setq word (string-to-number word)))
|
||||
(let ((number (/ (float (round (* (expt 10 signs) word)))
|
||||
(expt 10 signs))))
|
||||
(save-excursion
|
||||
(replace-string-in-region
|
||||
(number-to-string word)
|
||||
(number-to-string number)
|
||||
(line-beginning-position)
|
||||
(line-end-position)))))
|
||||
#+end_src
|
||||
** Working with projects
|
||||
Packages related to managing projects.
|
||||
|
||||
|
|
@ -10835,6 +10857,7 @@ Or you can load up Element for a moment to see what the mention was, if that's e
|
|||
(setq telega-emoji-use-images nil)
|
||||
(setq telega-chat-fill-column 80)
|
||||
(setq telega-completing-read-function #'completing-read)
|
||||
(setq telega-sticker-size '(12 . 24))
|
||||
(add-to-list 'savehist-additional-variables 'telega-msg-add-reaction)
|
||||
(remove-hook 'telega-chat-mode-hook #'telega-chat-auto-fill-mode)
|
||||
(general-define-key
|
||||
|
|
@ -11180,6 +11203,7 @@ I don't have access to any proprietary APIs, but LLaMA 3.1 8b with [[https://oll
|
|||
"qwen2.5:32b" "qwen2.5-coder:32b"
|
||||
"eva-qwen2.5-q4_k_l-32b:latest"
|
||||
"t-pro-1.0-q4_k_m:latest"
|
||||
"t-lite-it-1.0-q4_k_m:latest"
|
||||
(llava-phi3:latest
|
||||
:capabilities (media)
|
||||
:mime-types ("image/jpeg" "image/png")))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue