Signed-off-by: Alex Stan <alex.stan.2010@proton.me>
This commit is contained in:
Alex Stan 2024-10-20 10:17:15 +03:00
parent 6d8a20f567
commit 27f3ea6a9a
3 changed files with 104 additions and 15 deletions

View file

@ -275,6 +275,16 @@ in {
};
programs = {
niri.enable = true;
niri = {
enable = true;
package = pkgs.niri;
};
};
xdg = {
portal = {
enable = true;
};
};
}

View file

@ -1,4 +1,4 @@
(let ((indent 2))
(let ((indent 4))
(setq standard-indent indent)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
@ -11,13 +11,13 @@
(set-face-attribute 'default nil :height (font-size-to-height font-size)))
(setq mastodon-instance-url "https://shonk.phite.ro"
mastodon-active-user "graphite")
(evil-mode 1)
;(evil-mode 1)
(add-hook 'lisp-mode 'parinfer-rust-mode)
(require 'bshell)
(add-hook 'eshell-load-hook #'eat-eshell-mode)
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode)
; (load (expand-file-name "~/.emacs.d/everblush-theme.el"))
(load-theme 'uwu)
; (load-theme 'uwu)
(if (window-system)
(set-frame-size (selected-frame) 1000 800))
;; (add-hook 'c++-mode-hook 'irony-mode)
@ -56,9 +56,9 @@
(keymap-global-set "C-\\" #'eat)
(add-hook 'eat-mode-hook (lambda () (evil-mode nil)))
(evil-set-initial-state 'eat-mode 'emacs)
(setq evil-move-beyond-eol t)
;(add-hook 'eat-mode-hook (lambda () (evil-mode nil)))
;(evil-set-initial-state 'eat-mode 'emacs)
;(setq evil-move-beyond-eol t)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
@ -127,7 +127,7 @@
(add-hook 'prog-mode-hook #'sublimity-mode)
(add-hook 'prog-mode-hook #'linum-relative-on)
;(add-hook 'prog-mode-hook #'linum-relative-on)
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
@ -137,3 +137,74 @@
(setq pulsar-pulse t
pulsar-delay 0.055)
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(require 'doom-themes)
(load-theme 'doom-tokyo-night)
(use-package kakoune
:bind (("C-;" . ryo-modal-mode)
("C-z" . ryo-modal-mode)
("<escape>" . ryo-modal-mode))
:hook (after-init . my/kakoune-setup)
:config
(defun ryo-enter () "Enter normal mode" (interactive) (ryo-modal-mode 1))
(defun my/kakoune-setup ()
"Call kakoune-setup-keybinds then add some personal config."
(kakoune-setup-keybinds)
(setq ryo-modal-cursor-type 'line)
(add-hook 'prog-mode-hook #'ryo-enter)
(define-key ryo-modal-mode-map (kbd "SPC h") 'help-command)
;; Access all C-x bindings easily
(define-key ryo-modal-mode-map (kbd "z") ctl-x-map)
(ryo-modal-keys
("," save-buffer)
("p" counsel-yank-pop)
("m" mc/mark-next-like-this)
("M" mc/skip-to-next-like-this)
("n" mc/mark-previous-like-this)
("N" mc/skip-to-previous-like-this)
("M-m" mc/edit-lines)
("*" mc/mark-all-like-this)
("v" er/expand-region)
("C-v" set-rectangular-region-anchor)
("M-s" mc/split-region)
(";" (("q" delete-window)
("v" split-window-horizontally)
("s" split-window-vertically)))
("C-h" windmove-left)
("C-j" windmove-down)
("C-k" windmove-up)
("C-l" windmove-right)
("C-u" scroll-down-command :first '(deactivate-mark))
("C-d" scroll-up-command :first '(deactivate-mark)))))
;; This overrides the default mark-in-region with a prettier-looking one,
;; and provides a couple extra commands
(use-package visual-regexp
:ryo
("s" vr/mc-mark)
("?" vr/replace)
("M-/" vr/query-replace))
;; Emacs incremental search doesn't work with multiple cursors, but this fixes that
(use-package phi-search
:bind (("C-s" . phi-search)
("C-r" . phi-search-backward)))
;; Probably the first thing you'd miss is undo and redo, which requires an extra package
;; to work like it does in kakoune (and almost every other editor).
(use-package undo-tree
:config
(global-undo-tree-mode)
:ryo
("u" undo-tree-undo)
("U" undo-tree-redo)
("SPC u" undo-tree-visualize)
:bind (:map undo-tree-visualizer-mode-map
("h" . undo-tree-visualize-switch-branch-left)
("j" . undo-tree-visualize-redo)
("k" . undo-tree-visualize-undo)
("l" . undo-tree-visualize-switch-branch-right)))

View file

@ -36,16 +36,16 @@ let
sly
# spacemacs-theme
paredit
evil
#evil
magit
org
mastodon
eshell-z
bshell
eat
gruvbox-theme
uwu-theme
irony
#gruvbox-theme
#uwu-theme
#irony
hotfuzz
vertico
marginalia
@ -73,6 +73,12 @@ let
linum-relative
pulsar
orderless
doom-themes
cider
kakoune
visual-regexp
phi-search
undo-tree
];
});
helix = inputs.helix.packages.${pkgs.system}.default;
@ -88,7 +94,7 @@ in {
imports = [
inputs.hyprland.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
inputs.niri.homeModules.niri
inputs.niri.homeModules.config
];
# Allow unfree packages
nixpkgs = {
@ -280,6 +286,8 @@ in {
# nyxt
lmms
cozette
leiningen
sublime-music
];
file = {
"emacs.d/everblush-theme.el".source = ./configs/emacs/everblush-theme.el;
@ -492,7 +500,7 @@ in {
};
};
niri = {
enable = true;
#enable = true;
package = pkgs.niri-stable;
settings = {
outputs = {