configurations: emacs and plasma-manger changes, crypt.sh formatting

This commit is contained in:
Mateusz Słodkowicz 2024-10-30 14:09:43 +01:00
parent 4912a5bc99
commit 868a49fb74
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
11 changed files with 361 additions and 167 deletions

View File

@ -17,7 +17,7 @@
enableTerminal = lib.mkDefault true;
enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true;
editor.emacs.enable = false;
editor.emacs.enable = true;
editor.code.fhs.enable = true;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_18; in [
llvmpkgs.clang
@ -29,6 +29,7 @@
llvmpkgs.mlir
llvmpkgs.libllvm.dev
fpc
xmake
raylib
gcc

View File

@ -1,9 +1,11 @@
{ pkgs, ... }:
{ pkgs, materusArg, ... }:
{
home.packages = [
pkgs.papirus-icon-theme
(pkgs.nerdfonts.override { fonts = [ "Hack" ]; })
];
xdg.dataFile."konsole/materus-linux.keytab".source = ("${materusArg.cfg.path}" + "/extraFiles/config/plasma/materus-linux.keytab");
programs.konsole = {
enable = true;
profiles = {
@ -11,6 +13,9 @@
colorScheme = "Breeze";
font.name = "Hack Nerd Font";
extraConfig = {
Keyboard = {
KeyBindings="materus-linux";
};
Scrolling = {
HistoryMode = 2;
};

View File

@ -1,14 +1,12 @@
{ config, lib, pkgs, materusArg, ... }:
let
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/";
inits = import ./init.nix {
path = configPath;
inherit pkgs;
};
packages = epkgs:
with epkgs; [
load-relative
elcord
persp-mode
dashboard
@ -23,12 +21,9 @@ let
clipetty
which-key
iedit
#Evil-Mode
hideshowvis
evil
treemacs-evil
#########
treemacs
treemacs-nerd-icons
treemacs-perspective
@ -44,7 +39,6 @@ let
telephone-line
rainbow-delimiters
use-package
cmake-mode
lsp-mode
lsp-java
@ -65,10 +59,8 @@ let
markdown-mode
json-mode
nix-mode
no-littering
right-click-context
moe-theme
doom-themes
];
@ -116,26 +108,25 @@ in
mkdir -p ${config.xdg.configHome}/emacs/etc
run ${config.programs.emacs.finalPackage}/bin/emacs --batch \
--eval '(setq warning-minimum-log-level :error)' \
--eval '(byte-recompile-directory "${config.xdg.configHome}/emacs/etc/materus" 0 t)' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
'';
xdg.configFile."emacs/early-init.el".text = ''
${inits.earlyInitText}
'';
xdg.configFile."emacs/init.el".text = ''
(require 'recentf)
(require 'no-littering)
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-var-directory))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-etc-directory))
'';
xdg.configFile = {
"emacs/early-init.el".text = inits.earlyInitText;
"emacs/init.el".text = default-config;
"emacs/etc/materus" =
{
source = configPath + "etc/materus";
recursive = true;
};
};
programs.emacs = {
enable = true;
package = with pkgs;
lib.mkDefault (pkgs.emacs29.override {
lib.mkDefault (pkgs.emacs29.override ({
withSQLite3 = true;
withWebP = true;
withX = true;
@ -144,9 +135,8 @@ in
withGconf = true;
withImageMagick = true;
withXwidgets = true;
});
}));
extraPackages = epkgs: ((packages epkgs));
extraConfig = default-config;
};
};

View File

@ -6,7 +6,6 @@
'';
initText = ''
${builtins.readFile (path + "init.el")}
${builtins.readFile (path + "lsp.el")}
'';

View File

@ -4,6 +4,9 @@
(defvar materus/init-early t)
(setq materus/init-early t)
(when (boundp 'native-comp-eln-load-path)
(startup-redirect-eln-cache (expand-file-name "/var/eln-cache/" user-emacs-directory)))
(tool-bar-mode -1)
(setq initial-major-mode 'fundamental-mode)
(setq-default package-quickstart t)
@ -12,11 +15,11 @@
(setq gc-cons-threshold 100000000 ; ~100mb
gc-cons-percentage 0.1)
))
(setq package-enable-at-startup nil)
(unless (daemonp)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
(setq package-enable-at-startup nil)
(advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook 'window-setup-hook

View File

@ -0,0 +1,74 @@
(defvar bootstrap-version)
(defvar straight-base-dir)
(setq straight-base-dir (concat user-emacs-directory "var/" ))
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'elcord)
(straight-use-package 'persp-mode)
(straight-use-package 'dashboard)
(straight-use-package 'magit)
(straight-use-package 'helm)
(straight-use-package 'avy)
(straight-use-package 'corfu)
(straight-use-package 'vterm)
(straight-use-package 'centaur-tabs)
(straight-use-package 'projectile)
(straight-use-package 'company)
(straight-use-package 'clipetty)
(straight-use-package 'which-key)
(straight-use-package 'iedit)
(straight-use-package 'hideshowvis)
(straight-use-package 'evil)
(straight-use-package 'treemacs-evil)
(straight-use-package 'treemacs)
(straight-use-package 'treemacs-nerd-icons)
(straight-use-package 'treemacs-perspective)
(straight-use-package 'treemacs-icons-dired)
(straight-use-package 'treemacs-magit)
(straight-use-package 'treemacs-projectile)
(straight-use-package 'tree-edit)
(straight-use-package 'vertico)
(straight-use-package 'nerd-icons)
(straight-use-package 'nerd-icons-completion)
(straight-use-package 'perspective)
(straight-use-package 'minions)
(straight-use-package 'telephone-line)
(straight-use-package 'rainbow-delimiters)
(straight-use-package 'use-package)
(straight-use-package 'cmake-mode)
(straight-use-package 'lsp-mode)
(straight-use-package 'lsp-java)
(straight-use-package 'lsp-jedi)
(straight-use-package 'lsp-haskell)
(straight-use-package 'lsp-ui)
(straight-use-package 'lsp-treemacs)
(straight-use-package 'dap-mode)
(straight-use-package 'd-mode)
(straight-use-package 'lua-mode)
(straight-use-package 'multiple-cursors)
(straight-use-package 'org)
(straight-use-package 'org-rainbow-tags)
(straight-use-package 'org-roam)
(straight-use-package 'org-roam-ui)
(straight-use-package 'org-review)
(straight-use-package 'csharp-mode)
(straight-use-package 'markdown-mode)
(straight-use-package 'json-mode)
(straight-use-package 'nix-mode)
(straight-use-package 'no-littering)
(straight-use-package 'right-click-context)
(straight-use-package 'moe-theme)
(straight-use-package 'doom-themes)

View File

@ -0,0 +1,132 @@
(require 'recentf)
(require 'no-littering)
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-var-directory))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-etc-directory))
(setq native-comp-async-report-warnings-errors nil)
(setq package-enable-at-startup nil)
(setq frame-inhibit-implied-resize t)
(defvar materus/init-early nil)
(unless materus/init-early
(tool-bar-mode -1)
(setq initial-major-mode 'fundamental-mode)
(setq-default package-quickstart t)
(setq native-comp-speed 3)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
(setq gc-cons-threshold 100000000 ; ~100mb
gc-cons-percentage 0.1)
))
(unless (daemonp)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
(setq package-enable-at-startup nil)
(advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook 'window-setup-hook
(lambda ()
(advice-remove #'tty-run-terminal-initialization #'ignore)
(tty-run-terminal-initialization (selected-frame) nil t)
)
)
)
)
(setq custom-file (concat user-emacs-directory "etc/custom.el"))
(setq auto-save-default nil)
(setq backup-directory-alist
`((".*" . ,(concat user-emacs-directory "var/backups/"))))
(setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "var/recovery/") t)))
; Load packages
(require 'telephone-line)
(require 'elcord)
(require 'dashboard)
(require 'minions)
(require 'doom-themes)
(require 'nerd-icons)
(require 'centaur-tabs)
(require 'projectile)
(require 'treemacs)
(require 'treemacs-projectile)
(require 'treemacs-nerd-icons)
;Graphical
(setq frame-resize-pixelwise t)
(when (display-graphic-p)
(set-frame-font "Hack Nerd Font" nil t)
)
(setq read-process-output-max (* 1024 1024 3))
(when (or (not (display-graphic-p)) (daemonp))
(xterm-mouse-mode 1)
)
(tool-bar-mode -1)
(load-theme 'doom-horizon t)
(setq ring-bell-function 'ignore)
(setq-default cursor-type '(bar . 1))
(pixel-scroll-precision-mode 1)
(context-menu-mode 1)
(setq mouse-wheel-follow-mouse 't)
(setq scroll-step 1)
(setq mouse-drag-and-drop-region t)
(telephone-line-mode 1)
(setq-default pixel-scroll-precision-large-scroll-height 10.0)
(minions-mode 1)
(unless (daemonp)
(elcord-mode 1))
;Hide startup screen if started with file
(defun startup-screen-advice (orig-fun &rest args)
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
(apply orig-fun args)))
(advice-add 'display-startup-screen :around #'startup-screen-advice)
;Enable dashboard
(setq dashboard-center-content t)
(setq dashboard-display-icons-p t)
(setq dashboard-icon-type 'nerd-icons)
(dashboard-setup-startup-hook)
(when (daemonp)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
)
;Enable Centaur tabs
(centaur-tabs-mode t)
(setq centaur-tabs-set-bar 'over)
(setq centaur-tabs-set-modified-marker t)
;(setq centaur-tabs-modified-marker "*")
;Enable treemacs
(global-set-key (kbd "C-H-t") 'treemacs)
;CUA
(cua-mode 1)
(global-set-key (kbd "C-y") 'undo-redo)
(global-set-key (kbd "C-<tab>") 'indent-rigidly-right-to-tab-stop)
(global-set-key (kbd "<backtab>") 'indent-rigidly-left-to-tab-stop)
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "") 'event-apply-hyper-modifier )
;(global-set-key (kbd "C-∇") (kbd "C-H"))
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))

View File

@ -1,128 +1,4 @@
(setq native-comp-async-report-warnings-errors nil)
(setq package-enable-at-startup nil)
(setq frame-inhibit-implied-resize t)
(defvar materus/init-early nil)
(unless materus/init-early
(tool-bar-mode -1)
(setq initial-major-mode 'fundamental-mode)
(setq-default package-quickstart t)
(setq native-comp-speed 3)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
(setq gc-cons-threshold 100000000 ; ~100mb
gc-cons-percentage 0.1)
))
(unless (daemonp)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
(setq package-enable-at-startup nil)
(advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook 'window-setup-hook
(lambda ()
(advice-remove #'tty-run-terminal-initialization #'ignore)
(tty-run-terminal-initialization (selected-frame) nil t)
)
)
)
)
(setq custom-file (concat user-emacs-directory "etc/custom.el"))
(setq auto-save-default nil)
(setq backup-directory-alist
`((".*" . ,(concat user-emacs-directory "var/backups/"))))
(setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "var/recovery/") t)))
; Load packages
(require 'telephone-line)
(require 'elcord)
(require 'dashboard)
(require 'minions)
(require 'doom-themes)
(require 'nerd-icons)
(require 'centaur-tabs)
(require 'projectile)
(require 'treemacs)
(require 'treemacs-projectile)
(require 'treemacs-nerd-icons)
;Graphical
(setq frame-resize-pixelwise t)
(when (display-graphic-p)
(set-frame-font "Hack Nerd Font" nil t)
)
(setq read-process-output-max (* 1024 1024 3))
(when (or (not (display-graphic-p)) (daemonp))
(xterm-mouse-mode 1)
)
(tool-bar-mode -1)
(load-theme 'doom-horizon t)
(setq ring-bell-function 'ignore)
(setq-default cursor-type '(bar . 1))
(pixel-scroll-precision-mode 1)
(context-menu-mode 1)
(setq mouse-wheel-follow-mouse 't)
(setq scroll-step 1)
(setq mouse-drag-and-drop-region t)
(telephone-line-mode 1)
(setq-default pixel-scroll-precision-large-scroll-height 10.0)
(minions-mode 1)
(unless (daemonp)
(elcord-mode 1))
;Hide startup screen if started with file
(defun startup-screen-advice (orig-fun &rest args)
(when (= (seq-count #'buffer-file-name (buffer-list)) 0)
(apply orig-fun args)))
(advice-add 'display-startup-screen :around #'startup-screen-advice)
;Enable dashboard
(setq dashboard-center-content t)
(setq dashboard-display-icons-p t)
(setq dashboard-icon-type 'nerd-icons)
(dashboard-setup-startup-hook)
(when (daemonp)
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
)
;Enable Centaur tabs
(centaur-tabs-mode t)
(setq centaur-tabs-set-bar 'over)
(setq centaur-tabs-set-modified-marker t)
;(setq centaur-tabs-modified-marker "*")
;Enable treemacs
(global-set-key (kbd "C-H-t") 'treemacs)
;CUA
(cua-mode 1)
(global-set-key (kbd "C-y") 'undo-redo)
(global-set-key (kbd "C-<tab>") 'indent-rigidly-right-to-tab-stop)
(global-set-key (kbd "<backtab>") 'indent-rigidly-left-to-tab-stop)
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "") 'event-apply-hyper-modifier )
;(global-set-key (kbd "C-∇") (kbd "C-H"))
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
(unless materus/nix-packages (load (concat user-emacs-directory "etc/materus/packages")))
(load (concat user-emacs-directory "etc/materus/start"))
(load (concat user-emacs-directory "etc/materus/lsp"))

View File

@ -0,0 +1,114 @@
keyboard "Domyślny (XFree 4) - materus"
key Clear+KeyPad : "\E[E"
key Space+Ctrl : "\x00"
key Backspace+Ctrl : "\b"
key Backspace-Ctrl : "\x7f"
key F8+AnyModifier : "\E[19;*~"
key F8-AnyModifier : "\E[19~"
key Enter-NewLine : "\r"
key Enter+NewLine : "\r\n"
key Return+Shift : "\EOM"
key Return-Shift+NewLine : "\r\n"
key Return-Shift-NewLine : "\r"
key PgUp+Shift+Ctrl-AppScreen : ScrollPromptUp
key PgUp+Shift-Ctrl-AppScreen : ScrollPageUp
key PgUp+Shift+AppScreen : "\E[5;*~"
key PgUp-Shift+AnyModifier : "\E[5;*~"
key PgUp-Shift-AnyModifier : "\E[5~"
key PgUp-Shift+KeyPad : "\E[5~"
key Esc : "\E"
key Tab+Ctrl-Ansi : "\t"
key Tab+Ctrl+Ansi : "\E[27;5;9~"
key Tab+Shift-Ansi : "\t"
key Tab+Shift+Ansi : "\E[Z"
key Tab-Shift : "\t"
key F6+AnyModifier : "\E[17;*~"
key F6-AnyModifier : "\E[17~"
key Down+Shift-Ctrl-Alt-AppScreen : ScrollLineDown
key Down-Shift+KeyPad+Ansi-AppCursorKeys : "\E[B"
key Down-Shift+KeyPad+Ansi+AppCursorKeys : "\EOB"
key Down+Shift+Ctrl-AppScreen : "\E[1;*B"
key Down+Shift+Alt-AppScreen : "\E[1;*B"
key Down+Shift+AppScreen : "\E[1;*B"
key Down-Shift+Ansi+AnyModifier : "\E[1;*B"
key Down-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[B"
key Down-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOB"
key Down-Shift-Ansi : "\EB"
key Up+Shift-Ctrl-Alt-AppScreen : ScrollLineUp
key Up-Shift+KeyPad+Ansi-AppCursorKeys : "\E[A"
key Up-Shift+KeyPad+Ansi+AppCursorKeys : "\EOA"
key Up+Shift+Ctrl-AppScreen : "\E[1;*A"
key Up+Shift+Alt-AppScreen : "\E[1;*A"
key Up+Shift+AppScreen : "\E[1;*A"
key Up-Shift+Ansi+AnyModifier : "\E[1;*A"
key Up-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[A"
key Up-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOA"
key Up-Shift-Ansi : "\EA"
key F10+AnyModifier : "\E[21;*~"
key F10-AnyModifier : "\E[21~"
key Left-Shift+KeyPad+Ansi-AppCursorKeys : "\E[D"
key Left-Shift+KeyPad+Ansi+AppCursorKeys : "\EOD"
key Left+Shift+Ctrl-AppScreen : "\E[1;*D"
key Left+Shift+Alt-AppScreen : "\E[1;*D"
key Left+Shift+AppScreen : "\E[1;*D"
key Left-Shift+Ansi+AnyModifier : "\E[1;*D"
key Left-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[D"
key Left-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOD"
key Left-Shift-Ansi : "\ED"
key F5+AnyModifier : "\E[15;*~"
key F5-AnyModifier : "\E[15~"
key F9+AnyModifier : "\E[20;*~"
key F9-AnyModifier : "\E[20~"
key F1+AnyModifier : "\EO*P"
key F1-AnyModifier : "\EOP"
key F12+AnyModifier : "\E[24;*~"
key F12-AnyModifier : "\E[24~"
key Right-Shift+KeyPad+Ansi-AppCursorKeys : "\E[C"
key Right-Shift+KeyPad+Ansi+AppCursorKeys : "\EOC"
key Right+Shift+Ctrl-AppScreen : "\E[1;*C"
key Right+Shift+Alt-AppScreen : "\E[1;*C"
key Right+Shift+AppScreen : "\E[1;*C"
key Right-Shift+Ansi+AnyModifier : "\E[1;*C"
key Right-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[C"
key Right-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOC"
key Right-Shift-Ansi : "\EC"
key F4+AnyModifier : "\EO*S"
key F4-AnyModifier : "\EOS"
key F11+AnyModifier : "\E[23;*~"
key F11-AnyModifier : "\E[23~"
key Home+Shift-AppScreen : ScrollUpToTop
key Home+AnyModifier : "\E[1;*H"
key Home+AppCursorKeys-AnyModifier : "\EOH"
key Home-AppCursorKeys-AnyModifier : "\E[H"
key Home+KeyPad-AppCursorKeys : "\E[H"
key Home+KeyPad+AppCursorKeys : "\EOH"
key F7+AnyModifier : "\E[18;*~"
key F7-AnyModifier : "\E[18~"
key End+Shift-AppScreen : ScrollDownToBottom
key End+AnyModifier : "\E[1;*F"
key End+AppCursorKeys-AnyModifier : "\EOF"
key End-AppCursorKeys-AnyModifier : "\E[F"
key End+KeyPad-AppCursorKeys : "\E[F"
key End+KeyPad+AppCursorKeys : "\EOF"
key F2+AnyModifier : "\EO*Q"
key F2-AnyModifier : "\EOQ"
key F3+AnyModifier : "\EO*R"
key F3-AnyModifier : "\EOR"
key Backtab+Ctrl-Ansi : "\t"
key Backtab+Ctrl+Ansi : "\E[27;6;9~"
key Backtab-Ansi : "\t"
key Backtab+Ansi : "\E[Z"
key PgDown+Shift+Ctrl-AppScreen : ScrollPromptDown
key PgDown+Shift-Ctrl-AppScreen : ScrollPageDown
key PgDown+Shift+AppScreen : "\E[6;*~"
key PgDown-Shift+AnyModifier : "\E[6;*~"
key PgDown-Shift-AnyModifier : "\E[6~"
key PgDown-Shift+KeyPad : "\E[6~"
key Del+AnyModifier : "\E[3;*~"
key Del-AnyModifier : "\E[3~"
key Del+KeyPad : "\E[3~"
key Ins+AnyModifier : "\E[2;*~"
key Ins-AnyModifier : "\E[2~"
key Ins+KeyPad : "\E[2~"
key Calculator : "\xe2\x88\x87"