updates, reworking
This commit is contained in:
Generated
+18
-18
@@ -78,11 +78,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747279714,
|
||||
"narHash": "sha256-UdxlE8yyrKiGq3bgGyJ78AdFwh+fuRAruKtyFY5Zq5I=",
|
||||
"lastModified": 1747753534,
|
||||
"narHash": "sha256-hbDBa5a6jnxoD0OqijmCKF45Hiv4uubb340OMr5DJhc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "954615c510c9faa3ee7fb6607ff72e55905e69f2",
|
||||
"rev": "559f6d36b32dd2180ebac40c522dd36290430fc5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -165,11 +165,11 @@
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747301504,
|
||||
"narHash": "sha256-GAI36RNzF9yC0JOauS1+h681ElwdbD9q/qxxuIqcejQ=",
|
||||
"lastModified": 1747610850,
|
||||
"narHash": "sha256-b41pc9J8b9fxRFHBQRKoTXZHpAsKW5eJbNsTMris2Mo=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "a5c9b3e49047b4f03f79c5146d8925363eab3072",
|
||||
"rev": "eb3b38d40baca5c05ddbc1507b3d3f02a0ccb164",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -195,11 +195,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746806942,
|
||||
"narHash": "sha256-fziL5ORI599D6Wp+BKlspxOqZ1HhCCLkq4C4FBwIwJo=",
|
||||
"lastModified": 1747595918,
|
||||
"narHash": "sha256-5wjvmFtk85uBJLnrKZbfrgo9OTTQlFP18ZNgfBwFsz0=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-plugins",
|
||||
"rev": "c491d2831448645f24a1597a17f564aa52691ac6",
|
||||
"rev": "4dea1029e837ae642979ab509eb2eddc959470d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -612,11 +612,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1746461020,
|
||||
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
|
||||
"lastModified": 1747327360,
|
||||
"narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
|
||||
"rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -628,11 +628,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1747179050,
|
||||
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
|
||||
"lastModified": 1747542820,
|
||||
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
|
||||
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -652,11 +652,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746537231,
|
||||
"narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=",
|
||||
"lastModified": 1747372754,
|
||||
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "fa466640195d38ec97cf0493d6d6882bc4d14969",
|
||||
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -186,20 +186,26 @@
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
bat
|
||||
discord
|
||||
ghostty
|
||||
glib
|
||||
gnome-keyring
|
||||
fd
|
||||
file
|
||||
ripgrep
|
||||
wget
|
||||
glib
|
||||
spotify
|
||||
discord
|
||||
uxplay
|
||||
wl-clipboard
|
||||
ghostty
|
||||
libnotify
|
||||
mesa
|
||||
libdrm
|
||||
mesa
|
||||
neovim
|
||||
ripgrep
|
||||
spotify
|
||||
unzip
|
||||
uxplay
|
||||
vim
|
||||
wget
|
||||
wl-clipboard
|
||||
xdg-user-dirs
|
||||
zip
|
||||
];
|
||||
|
||||
zramSwap = {
|
||||
|
||||
+33
-30
@@ -13,46 +13,49 @@ in
|
||||
{
|
||||
# Symlink dotfiles
|
||||
home.file = mkSymlinkAttrs {
|
||||
".config/hypr" = {
|
||||
source = ../../modules/non-nix_configs/hypr;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
".local/share/fonts/KelmscottMono.otf" = {
|
||||
source = ../../fonts/KelmscottMono.otf;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = false;
|
||||
};
|
||||
|
||||
# Configs
|
||||
".config/hypr" = {
|
||||
source = ../../configs/hypr;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
".config/waybar" = {
|
||||
source = ../../configs/waybar;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
".config/ghostty" = {
|
||||
source = ../../configs/ghostty;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
".config/kitty" = {
|
||||
source = ../../configs/kitty;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
".config/nvim" = {
|
||||
source = ../../configs/nvim;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
".config/wofi" = {
|
||||
source = ../../configs/wofi;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
# ".config/emacs" = {
|
||||
# source = ../../modules/non-nix_configs/emacs;
|
||||
# source = ../../configs/emacs;
|
||||
# outOfStoreSymlink = true;
|
||||
# recursive = true;
|
||||
# };
|
||||
|
||||
".config/ghostty" = {
|
||||
source = ../../modules/non-nix_configs/ghostty;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".config/kitty" = {
|
||||
source = ../../modules/non-nix_configs/kitty;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".config/nvim" = {
|
||||
source = ../../modules/non-nix_configs/nvim;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".config/wofi" = {
|
||||
source = ../../modules/non-nix_configs/wofi;
|
||||
outOfStoreSymlink = true;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+8
-20
@@ -15,7 +15,6 @@
|
||||
|
||||
# desktop
|
||||
../../modules/desktop/bluetooth.nix
|
||||
../../modules/desktop/waybar.nix
|
||||
];
|
||||
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
@@ -37,12 +36,11 @@
|
||||
floorp
|
||||
genymotion
|
||||
gimp
|
||||
gnome-keyring
|
||||
gtk4
|
||||
gvfs
|
||||
grim
|
||||
grimblast
|
||||
htop
|
||||
hyprpicker
|
||||
imagemagick
|
||||
kdePackages.kdenlive
|
||||
keepassxc
|
||||
@@ -57,19 +55,14 @@
|
||||
pamixer
|
||||
pavucontrol
|
||||
powertop
|
||||
praat
|
||||
prismlauncher
|
||||
protonvpn-cli
|
||||
protonvpn-gui
|
||||
qbittorrent
|
||||
signal-desktop
|
||||
swww
|
||||
texliveFull
|
||||
tree
|
||||
unzip
|
||||
wev
|
||||
wl-clipboard
|
||||
xdg-user-dirs
|
||||
zip
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
@@ -119,11 +112,11 @@
|
||||
xdg.enable = true;
|
||||
xdg.configFile = {
|
||||
"emacs" = {
|
||||
source = ../../modules/non-nix_configs/emacs;
|
||||
source = ../../configs/emacs;
|
||||
recursive = true;
|
||||
};
|
||||
"user-dirs.dirs".source = ../../modules/non-nix_configs/user-dirs.dirs;
|
||||
"user-dirs.locale".source = ../../modules/non-nix_configs/user-dirs.locale;
|
||||
"user-dirs.dirs".source = ../../configs/user-dirs.dirs;
|
||||
"user-dirs.locale".source = ../../configs/user-dirs.locale;
|
||||
};
|
||||
|
||||
# BEGIN PROGRAMS
|
||||
@@ -196,12 +189,6 @@
|
||||
|
||||
# BEGIN SERVICES
|
||||
services = {
|
||||
hyprpaper.enable = true;
|
||||
hypridle.enable = true;
|
||||
|
||||
blueman-applet.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
|
||||
emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs-gtk;
|
||||
@@ -215,14 +202,15 @@
|
||||
startWithUserSession = "graphical";
|
||||
};
|
||||
|
||||
gnome-keyring.enable = true;
|
||||
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
|
||||
gnome-keyring.enable = true;
|
||||
network-manager-applet.enable = true;
|
||||
nextcloud-client.enable = true;
|
||||
swww.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 190 KiB |
@@ -6,10 +6,11 @@
|
||||
@define-color red #C50F1F;
|
||||
@define-color orange #FFC251;
|
||||
@define-color blue #00FFB2;
|
||||
@define-color lightgreen #a6e3a1;
|
||||
@define-color magenta #f5c2e7;
|
||||
@define-color archbtw #1793d1;
|
||||
@define-color purple #881798;
|
||||
@define-color green #00BB00;
|
||||
@define-color lightgreen #93C863;
|
||||
|
||||
@define-color black-transparent-1 rgba(0, 0, 0, 0.1);
|
||||
@define-color black-transparent-2 rgba(0, 0, 0, 0.2);
|
||||
@@ -59,7 +60,7 @@ window#waybar {
|
||||
|
||||
tooltip {
|
||||
background: @black-transparent-9;
|
||||
border: 1px solid @purple;
|
||||
border: 1px solid @lightgreen;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
@@ -70,7 +71,7 @@ tooltip label {
|
||||
.modules-left {
|
||||
background: @black-transparent-8;
|
||||
border-radius: 8px;
|
||||
border: 2px solid @purple;
|
||||
border: 2px solid @lightgreen;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
padding: 2px 4px;
|
||||
@@ -79,7 +80,7 @@ tooltip label {
|
||||
.modules-right {
|
||||
background: @black-transparent-8;
|
||||
border-radius: 8px;
|
||||
border: 2px solid @purple;
|
||||
border: 2px solid @lightgreen;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
padding: 2px 4px;
|
||||
@@ -222,7 +223,7 @@ tooltip label {
|
||||
}
|
||||
|
||||
#custom-wofi {
|
||||
color: @archbtw;
|
||||
color: @green;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
padding: 0px 4px;
|
||||
@@ -261,7 +262,7 @@ tooltip label {
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: @lightgreen;
|
||||
color: @green;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
padding: 4px 4px;
|
||||
|
||||
@@ -5,25 +5,25 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
logo = {
|
||||
source = "nixos";
|
||||
# source = "~/pictures/lil-penguin.png";
|
||||
# type = "kitty";
|
||||
width = 18;
|
||||
height = 9;
|
||||
color = {
|
||||
"1" = "white";
|
||||
"2" = "magenta";
|
||||
};
|
||||
# source = "nixos";
|
||||
source = "$HOME/pictures/smol-penguin.png";
|
||||
type = "kitty";
|
||||
# width = 18;
|
||||
# height = 9;
|
||||
# color = {
|
||||
# "1" = "white";
|
||||
# "2" = "green";
|
||||
# };
|
||||
padding = {
|
||||
top = 0; # put this on 2 for picture source
|
||||
top = 1; # put this on 2 for picture source
|
||||
left = 1;
|
||||
right = 3;
|
||||
right = 2;
|
||||
};
|
||||
};
|
||||
display = {
|
||||
separator = " -> ";
|
||||
color = {
|
||||
keys = "magenta";
|
||||
keys = "green";
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
type = "custom";
|
||||
format = "────────── Env ──────────";
|
||||
color = "magenta";
|
||||
color = "green";
|
||||
}
|
||||
{
|
||||
type = "os";
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
plugins = with pkgs; [
|
||||
vimPlugins.rose-pine
|
||||
vimPlugins.telescope-nvim
|
||||
vimPlugins.nvim-treesitter
|
||||
vimPlugins.nvim-treesitter-context
|
||||
vimPlugins.plenary-nvim
|
||||
vimPlugins.undotree
|
||||
vimPlugins.harpoon
|
||||
vimPlugins.lualine-nvim
|
||||
vimPlugins.vim-fugitive
|
||||
vimPlugins.lsp-zero-nvim
|
||||
vimPlugins.nvim-lspconfig
|
||||
vimPlugins.nvim-cmp
|
||||
vimPlugins.cmp-path
|
||||
vimPlugins.cmp-buffer
|
||||
vimPlugins.cmp_luasnip
|
||||
vimPlugins.cmp-nvim-lsp
|
||||
vimPlugins.cmp-nvim-lua
|
||||
vimPlugins.luasnip
|
||||
vimPlugins.friendly-snippets
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,558 +0,0 @@
|
||||
(defvar elpaca-installer-version 0.6)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (call-process "git" nil buffer t "clone"
|
||||
(plist-get order :repo) repo)))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(kill-buffer buffer)
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Install use-package support
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
;;When installing a package which modifies a form used at the top-level
|
||||
;;(e.g. a package which adds a use-package key word),
|
||||
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||
;;For example:
|
||||
;;(use-package general :demand t)
|
||||
;;(elpaca-wait)
|
||||
|
||||
;;Turns off elpaca-use-package-mode current declartion
|
||||
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||
;;Useful for configuring built-in emacs features.
|
||||
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||
|
||||
;; Don't install anything. Defer execution of BODY
|
||||
;;(elpaca nil (message "deferred"))
|
||||
|
||||
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||
(use-package evil
|
||||
:bind (:map evil-normal-state-map
|
||||
("<C-u>" . evil-scroll-page-up))
|
||||
:init ;; tweak evil's configuration before loading it
|
||||
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||
(setq evil-respect-visual-line-mode t)
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-vsplit-window-right t)
|
||||
(setq evil-split-window-below t)
|
||||
(evil-mode))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||
(evil-collection-init))
|
||||
|
||||
(use-package general
|
||||
:config
|
||||
(general-evil-setup)
|
||||
;; set 'SPC' as global leader key
|
||||
(general-create-definer lm/leader-keys
|
||||
:states '(normal insert visual emacs)
|
||||
:keymaps 'override
|
||||
:prefix "SPC" ;; set leader
|
||||
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||
|
||||
(lm/leader-keys
|
||||
"b" '(:ignore t :wk "buffer")
|
||||
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||
"b i" '(ibuffer :wk "Ibuffer")
|
||||
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||
"b n" '(next-buffer :wk "Next buffer")
|
||||
"b p" '(previous-buffer :wk "Previous buffer")
|
||||
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||
|
||||
(lm/leader-keys
|
||||
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||
"e e" '(eval-expression :wk "Evaluate an elisp expression")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||
"e h" '(counsel-esh-history :wk "Eshell history")
|
||||
"e s" '(eshell :wk "Eshell"))
|
||||
|
||||
(lm/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(find-file :wk "Find file")
|
||||
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
|
||||
"f r" '(counsel-recentf :wk "Find recent files")
|
||||
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||
|
||||
(lm/leader-keys
|
||||
"h" '(:ignore t :wk "Help")
|
||||
"h f" '(describe-function :wk "Describe function")
|
||||
"h v" '(describe-variable :wk "Describe variable")
|
||||
"h r r" '(reload-init-file :wk "Reload emacs config"))
|
||||
;; "h r r" '((lambda () (interactive) (load-file user-init-file)) :wk "Reload emacs config"))
|
||||
|
||||
(lm/leader-keys
|
||||
"i" '(:ignore t :wk "Insert")
|
||||
"i p" '(org-download-screenshot :wk "Insert screenshot (org)"))
|
||||
|
||||
(lm/leader-keys
|
||||
"t" '(:ignore t :wk "Toggle")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"t v" '(vterm-toggle :wk "Toggle Vterm")
|
||||
"t i" '(org-toggle-inline-images :wk "Toggle inline images")
|
||||
"t t" '(visual-line-mode :wk "Toggle truncated lines"))
|
||||
|
||||
(lm/leader-keys
|
||||
"s" '(:ignore t :wk "Shell")
|
||||
"s c" '(shell-command :wk "Run a shell command")
|
||||
"s d" '(sh-cd-here :wk "Move current shell to current dir")
|
||||
"s m" '(sh-mode :wk "Shell mode"))
|
||||
|
||||
(lm/leader-keys
|
||||
"c" '(:ignore t :wk "Capitalize")
|
||||
"c w" '(capitalize-word :wk "Capitalize word")
|
||||
"c r" '(capitalize-region :wk "Capitalize region")
|
||||
"c c" '(upcase-char :wk "Upcase char")
|
||||
"c u" '(upcase-region :wk "Upcase region"))
|
||||
|
||||
(lm/leader-keys
|
||||
"l" '(:ignore t :wk "Downcase")
|
||||
"l w" '(downcase-word :wk "Downcase word")
|
||||
"l u" '(downcase-region :wk "Downcase region"))
|
||||
|
||||
;; Evil window bindings
|
||||
(lm/leader-keys
|
||||
"w" '(:ignore t :wk "Window")
|
||||
"w w" '(evil-window-next :wk "Next window")
|
||||
"w h" '(evil-window-left :wk "Move cursor to window left")
|
||||
"w j" '(evil-window-down :wk "Move cursor to window below")
|
||||
"w k" '(evil-window-up :wk "Move cursor to window above")
|
||||
"w l" '(evil-window-right :wk "Move cursor to window right")
|
||||
"w s" '(evil-window-split :wk "Split window horizontally")
|
||||
"w v" '(evil-window-vsplit :wk "Split window vertically")
|
||||
"w H" '(evil-window-move-far-left :wk "Move split to left")
|
||||
"w J" '(evil-window-move-very-bottom :wk "Move split to bottom")
|
||||
"w K" '(evil-window-move-very-top :wk "Move split to top")
|
||||
"w L" '(evil-window-move-far-right :wk "Move split to right")
|
||||
"w c" '(evil-window-delete :wk "Close window")
|
||||
"w o" '(delete-other-windows :wk "Delete other windows")
|
||||
"w =" '(balance-windows :wk "Balance windows")
|
||||
"q k" '(kill-buffer-and-window :wk "Kill buf and window")
|
||||
"q q" '(save-buffers-kill-terminal :wk "Save bufs, kill term"))
|
||||
|
||||
;; (evil-global-set-key 'visual "K" (kbd ":m '<-2 RET gv '< gk"))
|
||||
(evil-global-set-key 'visual "K" 'drag-stuff-up)
|
||||
;; (evil-global-set-key 'visual "J" (kbd ":m '>+1 RET gv '> gj"))
|
||||
(evil-global-set-key 'visual "J" 'drag-stuff-down)
|
||||
|
||||
(lm/leader-keys
|
||||
"p" '(:ignore t :wk "Project")
|
||||
"p o" '(dashboard-open :wk "Return to dashboard")
|
||||
"p f" '(project-find-file :wk "Find project file"))
|
||||
|
||||
)
|
||||
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:diminish
|
||||
:if (display-graphic-p))
|
||||
(use-package all-the-icons-dired
|
||||
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||
|
||||
(setq backup-directory-alist
|
||||
`((".*" . "~/emacs/auto-saves")))
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" "~/emacs/auto-saves" t)))
|
||||
|
||||
(use-package company
|
||||
:defer 2
|
||||
:diminish
|
||||
:custom
|
||||
(company-begin-commands '(self-insert-command))
|
||||
(company-idle-delay .1)
|
||||
(company-minimum-prefix-length 2)
|
||||
(company-show-numbers t)
|
||||
(company-tooltip-align-annotations 't)
|
||||
(global-company-mode t))
|
||||
|
||||
(use-package company-box
|
||||
:after company
|
||||
:diminish
|
||||
:hook (company-mode . company-box-mode))
|
||||
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:diminish
|
||||
:init
|
||||
(setq initial-buffer-choice 'dashboard-open)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
;; (setq dashboard-set-navigator t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "Welcome to Emacs!")
|
||||
;; (setq dashboard-startup-banner 'logo) ;; default logo
|
||||
(setq dashboard-startup-banner "~/pictures/smol-penguin.png")
|
||||
(setq dashboard-center-content t)
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(agenda . 5)
|
||||
(bookmarks . 3)
|
||||
;; (registers . 3)
|
||||
(projects . 3)))
|
||||
;; (dashboard-modify-heading-icons '((recents . "file-text")
|
||||
;; (bookmarks . "book")))
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
(use-package diminish)
|
||||
|
||||
(use-package drag-stuff
|
||||
:diminish
|
||||
:config
|
||||
(drag-stuff-global-mode 1))
|
||||
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:init (global-flycheck-mode))
|
||||
|
||||
(set-face-attribute 'default nil
|
||||
;; try switch to Source Code Pro
|
||||
:font "FiraCodeNerdFontMono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'variable-pitch nil
|
||||
:font "FiraCodeNerdFontMono"
|
||||
:height 120
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'fixed-pitch nil
|
||||
:font "FiraCodeNerdFontMono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
;; Makes commented text and keywords italics.
|
||||
;; This is working in emacsclient but not emacs.
|
||||
;; Your font must have an italic face available.
|
||||
(set-face-attribute 'font-lock-comment-face nil
|
||||
:slant 'italic)
|
||||
(set-face-attribute 'font-lock-keyword-face nil
|
||||
:slant 'italic)
|
||||
|
||||
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||
;; are not right unless I also add this method of setting the default font.
|
||||
(add-to-list 'default-frame-alist '(font . "FiraCodeNerdFontMono-14"))
|
||||
|
||||
;; Uncomment the following line if line spacing needs adjusting.
|
||||
;; (setq-default line-spacing 0.12)
|
||||
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||
|
||||
(use-package gnuplot-mode)
|
||||
;; automatically open files ending with .gp or .gnuplot in gnuplot mode
|
||||
;; (setq auto-mode-alist
|
||||
;; (append '(("\\.\\(gp\\|gnuplot\\)$" . gnuplot-mode)) auto-mode-alist)))
|
||||
|
||||
(use-package image-dired+)
|
||||
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq-default indent-line-function 'insert-tab)
|
||||
(setq-default c-default-style "linux"
|
||||
c-basic-offset 4)
|
||||
;; if indent-tabs-mode is off, untabify before saving
|
||||
;;(add-hook 'write-file-hooks
|
||||
;; (lambda () (if (not indent-tabs-mode)
|
||||
;; (untabify (point-min) (point-max)))))
|
||||
|
||||
;; This assumes you've installed the package via MELPA.
|
||||
(use-package ligature
|
||||
:config
|
||||
;; Enable the "www" ligature in every possible major mode
|
||||
(ligature-set-ligatures 't '("www"))
|
||||
;; Enable traditional ligature support in eww-mode, if the
|
||||
;; `variable-pitch' face supports it
|
||||
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
||||
;; Enable all FiraMonoNerdFont and Fira Code ligatures in programming modes
|
||||
|
||||
(ligature-set-ligatures 'prog-mode
|
||||
'(;; == === ==== => =| =>>=>=|=>==>> ==< =/=//=// =~
|
||||
;; =:= =!=
|
||||
("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "="))))
|
||||
;; ;; ;;;
|
||||
(";" (rx (+ ";")))
|
||||
;; && &&&
|
||||
("&" (rx (+ "&")))
|
||||
;; !! !!! !. !: !!. != !== !~
|
||||
("!" (rx (+ (or "=" "!" "\." ":" "~"))))
|
||||
;; ?? ??? ?: ?= ?.
|
||||
("?" (rx (or ":" "=" "\." (+ "?"))))
|
||||
;; %% %%%
|
||||
("%" (rx (+ "%")))
|
||||
;; |> ||> |||> ||||> |] |} || ||| |-> ||-||
|
||||
;; |->>-||-<<-| |- |== ||=||
|
||||
;; |==>>==<<==<=>==//==/=!==:===>
|
||||
("|" (rx (+ (or ">" "<" "|" "/" ":" "!" "}" "\]"
|
||||
"-" "=" ))))
|
||||
;; \\ \\\ \/
|
||||
("\\" (rx (or "/" (+ "\\"))))
|
||||
;; ++ +++ ++++ +>
|
||||
("+" (rx (or ">" (+ "+"))))
|
||||
;; :: ::: :::: :> :< := :// ::=
|
||||
(":" (rx (or ">" "<" "=" "//" ":=" (+ ":"))))
|
||||
;; // /// //// /\ /* /> /===:===!=//===>>==>==/
|
||||
("/" (rx (+ (or ">" "<" "|" "/" "\\" "\*" ":" "!"
|
||||
"="))))
|
||||
;; .. ... .... .= .- .? ..= ..<
|
||||
("\." (rx (or "=" "-" "\?" "\.=" "\.<" (+ "\."))))
|
||||
;; -- --- ---- -~ -> ->> -| -|->-->>->--<<-|
|
||||
("-" (rx (+ (or ">" "<" "|" "~" "-"))))
|
||||
;; *> */ *) ** *** ****
|
||||
("*" (rx (or ">" "/" ")" (+ "*"))))
|
||||
;; www wwww
|
||||
("w" (rx (+ "w")))
|
||||
;; <> <!-- <|> <: <~ <~> <~~ <+ <* <$ </ <+> <*>
|
||||
;; <$> </> <| <|| <||| <|||| <- <-| <-<<-|-> <->>
|
||||
;; <<-> <= <=> <<==<<==>=|=>==/==//=!==:=>
|
||||
;; << <<< <<<<
|
||||
("<" (rx (+ (or "\+" "\*" "\$" "<" ">" ":" "~" "!"
|
||||
"-" "/" "|" "="))))
|
||||
;; >: >- >>- >--|-> >>-|-> >= >== >>== >=|=:=>>
|
||||
;; >> >>> >>>>
|
||||
(">" (rx (+ (or ">" "<" "|" "/" ":" "=" "-"))))
|
||||
;; #: #= #! #( #? #[ #{ #_ #_( ## ### #####
|
||||
("#" (rx (or ":" "=" "!" "(" "\?" "\[" "{" "_(" "_"
|
||||
(+ "#"))))
|
||||
;; ~~ ~~~ ~= ~- ~@ ~> ~~>
|
||||
("~" (rx (or ">" "=" "-" "@" "~>" (+ "~"))))
|
||||
;; __ ___ ____ _|_ __|____|_
|
||||
("_" (rx (+ (or "_" "|"))))
|
||||
;; Fira code: 0xFF 0x12
|
||||
("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9")))))
|
||||
;; Fira code:
|
||||
"Fl" "Tl" "fi" "fj" "fl" "ft"
|
||||
;; The few not covered by the regexps.
|
||||
"{|" "[|" "]#" "(*" "}#" "$>" "^="))
|
||||
|
||||
;; Enables ligature checks globally in all buffers. You can also do it
|
||||
;; per mode with `ligature-mode'.
|
||||
(global-ligature-mode t))
|
||||
|
||||
(use-package markdown-mode
|
||||
:ensure t
|
||||
:mode ("README\\.md\\'" . gfm-mode)
|
||||
:init (setq markdown-command "multimarkdown"))
|
||||
|
||||
;; inspired by https://zzamboni.org/post/how-to-insert-screenshots-in-org-documents-on-macos/
|
||||
|
||||
(use-package org-download
|
||||
:after org
|
||||
:defer nil
|
||||
:custom
|
||||
(org-download-method 'directory)
|
||||
(org-download-image-dir "~/emacs/")
|
||||
(org-download-heading-lvl 0)
|
||||
(org-download-timestamp "org_%Y%m%d-%H%M%S_")
|
||||
;; (org-image-actual-width 400)
|
||||
(org-download-screenshot-method "wl-paste -t image/png > '%s'")
|
||||
:bind
|
||||
("C-M-y" . org-download-screenshot)
|
||||
:config
|
||||
(require 'org-download))
|
||||
|
||||
(use-package projectile
|
||||
:diminish
|
||||
:config
|
||||
(projectile-mode 1))
|
||||
|
||||
(use-package rainbow-mode
|
||||
:diminish
|
||||
:hook
|
||||
((org-mode prog-mode) . rainbow-mode))
|
||||
|
||||
(defun reload-init-file ()
|
||||
(interactive)
|
||||
(load-file user-init-file)
|
||||
(load-file user-init-file))
|
||||
|
||||
(use-package eshell-syntax-highlighting
|
||||
:after esh-mode
|
||||
:config
|
||||
(eshell-syntax-highlighting-global-mode +1))
|
||||
|
||||
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||
eshell-history-size 5000
|
||||
eshell-buffer-maximum-lines 5000
|
||||
eshell-hist-ignoredups t
|
||||
eshell-scroll-to-bottom-on-input t
|
||||
eshell-destroy-buffer-when-process-dies t
|
||||
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq shell-file-name "/run/current-system/sw/bin/bash"
|
||||
vterm-max-scrollback 5000))
|
||||
|
||||
(use-package vterm-toggle
|
||||
:after vterm
|
||||
:config
|
||||
(setq vterm-toggle-fullscreen-p nil)
|
||||
(setq vterm-toggle-scope 'project)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'((lambda (buffer-or-name _)
|
||||
(let ((buffer (get-buffer buffer-or-name)))
|
||||
(with-current-buffer buffer
|
||||
(or (equal major-mode 'vterm-mode)
|
||||
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
|
||||
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||
;;(display-buffer-reuse-window display-buffer-in-direction)
|
||||
;;display-buffer-in-direction/direction/dedicated is added in emacs27
|
||||
;;(direction . bottom)
|
||||
;;(dedicated . t) ;dedicated is supported in emacs27
|
||||
(reusable-frames . visible)
|
||||
(window-height . 0.3))))
|
||||
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(lm/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
|
||||
;;(add-to-list 'custom-theme-load-path "~/.config/emacs/themes")
|
||||
;;(load-theme 'soft-charcoal t)
|
||||
|
||||
(use-package doom-themes
|
||||
:ensure t
|
||||
:config
|
||||
;; Global settings (defaults)
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
(load-theme 'doom-monokai-spectrum t)
|
||||
;; (load-theme 'doom-monokai-machine t)
|
||||
|
||||
;; Enable flashing mode-line on errors
|
||||
(doom-themes-visual-bell-config)
|
||||
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||
(doom-themes-neotree-config)
|
||||
;; or for treemacs users
|
||||
(setq doom-themes-treemacs-theme "doom-colors") ; use "doom-colors" for less minimal icon theme
|
||||
(doom-themes-treemacs-config)
|
||||
;; Corrects (and improves) org-mode's native fontification.
|
||||
(doom-themes-org-config))
|
||||
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 90)) ;; for all new frames
|
||||
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
|
||||
(global-display-line-numbers-mode 0)
|
||||
(menu-bar--display-line-numbers-mode-relative)
|
||||
;; (setq display-line-numbers-mode-relative 't)
|
||||
|
||||
(global-visual-line-mode t)
|
||||
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:diminish
|
||||
:config (counsel-mode))
|
||||
|
||||
(use-package ivy
|
||||
:bind
|
||||
;; ivy-resume resumes the last Ivy-based completion.
|
||||
(("C-c C-r" . ivy-resume)
|
||||
("C-x B" . ivy-switch-buffer-other-window))
|
||||
:diminish
|
||||
:custom
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t)
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:ensure t
|
||||
:diminish
|
||||
:init (all-the-icons-ivy-rich-mode 1))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:diminish
|
||||
:ensure t
|
||||
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||
:custom
|
||||
(ivy-virtual-abbreviate 'full
|
||||
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||
ivy-rich-path-style 'abbrev)
|
||||
:config
|
||||
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||
'ivy-rich-switch-buffer-transformer))
|
||||
|
||||
(use-package zig-mode)
|
||||
(use-package nix-mode)
|
||||
;; (use-package jai-mode)
|
||||
(use-package rust-mode)
|
||||
(use-package cargo-mode)
|
||||
(use-package lua-mode)
|
||||
(add-to-list 'load-path "~/.config/emacs/manual-packages")
|
||||
(require 'odin-mode)
|
||||
|
||||
(use-package toc-org
|
||||
:commands toc-org-enable
|
||||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
;;(setq (setq org-return-follows-link t)
|
||||
(use-package org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
|
||||
(require 'org-tempo)
|
||||
|
||||
(use-package which-key
|
||||
:init
|
||||
(which-key-mode 1)
|
||||
:diminish
|
||||
:config
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order #'which-key-key-order-alpha
|
||||
which-key-sort-uppercase-first nil
|
||||
which-key-add-column-padding 1
|
||||
which-key-max-display-columns nil
|
||||
which-key-min-display-lines 6
|
||||
which-key-side-window-slot -10
|
||||
which-key-side-window-max-height 0.25
|
||||
which-key-ide-delay 0.8
|
||||
which-key-max-description-length 25
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-separator " -> " ))
|
||||
@@ -1,792 +0,0 @@
|
||||
#+TITLE:LM's Emacs Config
|
||||
#+Author: Liam Malone (LM)
|
||||
#+DESCRIPTION: LM's personal Emacs config
|
||||
#+STARTUP: showeverything
|
||||
#+OPTIONS: toc:2
|
||||
|
||||
* TABLE OF CONTENTS :toc:
|
||||
- [[#important-programs-to-load-first][IMPORTANT PROGRAMS TO LOAD FIRST]]
|
||||
- [[#elpaca-package-manager][Elpaca Package Manager]]
|
||||
- [[#load-evil-mode][Load Evil Mode]]
|
||||
- [[#general-keybindings][General Keybindings]]
|
||||
- [[#all-the-icons][ALL THE ICONS]]
|
||||
- [[#autosave][AUTOSAVE]]
|
||||
- [[#company][COMPANY]]
|
||||
- [[#dashboard][DASHBOARD]]
|
||||
- [[#diminish][DIMINISH]]
|
||||
- [[#drag-stuff][DRAG-STUFF]]
|
||||
- [[#flycheck][FLYCHECK]]
|
||||
- [[#fonts][FONTS]]
|
||||
- [[#setting-the-font-face][Setting The Font Face]]
|
||||
- [[#zoom-inout][Zoom In/Out]]
|
||||
- [[#gnuplot][GNUPLOT]]
|
||||
- [[#image-dir-ed][IMAGE DIR-ED]]
|
||||
- [[#indentingtabs][INDENTING/TABS]]
|
||||
- [[#ligatures][LIGATURES]]
|
||||
- [[#markdown-mode][MARKDOWN MODE]]
|
||||
- [[#org-download][ORG DOWNLOAD]]
|
||||
- [[#pulse][PULSE]]
|
||||
- [[#pdf-tools][PDF TOOLS]]
|
||||
- [[#projectile][PROJECTILE]]
|
||||
- [[#rainbow-mode][RAINBOW MODE]]
|
||||
- [[#reload-emacs][RELOAD EMACS]]
|
||||
- [[#shells-and-terminals][SHELLS AND TERMINALS]]
|
||||
- [[#eshell][Eshell]]
|
||||
- [[#vterm][Vterm]]
|
||||
- [[#sudo-edit][SUDO EDIT]]
|
||||
- [[#theme][THEME]]
|
||||
- [[#transparency][TRANSPARENCY]]
|
||||
- [[#gui-tweaks][GUI TWEAKS]]
|
||||
- [[#disable-menubar-toolbars-and-scrollbars][Disable Menubar, Toolbars and Scrollbars]]
|
||||
- [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]]
|
||||
- [[#ivy-counsel][IVY (COUNSEL)]]
|
||||
- [[#language-support][LANGUAGE SUPPORT]]
|
||||
- [[#org-mode][ORG MODE]]
|
||||
- [[#enabling-table-of-contents][Enabling Table of Contents]]
|
||||
- [[#enabling-org-bullets][Enabling Org Bullets]]
|
||||
- [[#source-code-block-tag-expansion][Source Code Block Tag Expansion]]
|
||||
- [[#which-key][WHICH-KEY]]
|
||||
|
||||
* IMPORTANT PROGRAMS TO LOAD FIRST
|
||||
** Elpaca Package Manager
|
||||
#+begin_src emacs-lisp
|
||||
(defvar elpaca-installer-version 0.6)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil
|
||||
:files (:defaults (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (call-process "git" nil buffer t "clone"
|
||||
(plist-get order :repo) repo)))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(kill-buffer buffer)
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Install use-package support
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
;;When installing a package which modifies a form used at the top-level
|
||||
;;(e.g. a package which adds a use-package key word),
|
||||
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||
;;For example:
|
||||
;;(use-package general :demand t)
|
||||
;;(elpaca-wait)
|
||||
|
||||
;;Turns off elpaca-use-package-mode current declartion
|
||||
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||
;;Useful for configuring built-in emacs features.
|
||||
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||
|
||||
;; Don't install anything. Defer execution of BODY
|
||||
;;(elpaca nil (message "deferred"))
|
||||
#+end_src
|
||||
|
||||
** Load Evil Mode
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||
(use-package evil
|
||||
:bind (:map evil-normal-state-map
|
||||
("<C-u>" . evil-scroll-page-up))
|
||||
:init ;; tweak evil's configuration before loading it
|
||||
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||
(setq evil-respect-visual-line-mode t)
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-vsplit-window-right t)
|
||||
(setq evil-split-window-below t)
|
||||
(evil-mode))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:config
|
||||
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||
(evil-collection-init))
|
||||
#+end_src
|
||||
|
||||
|
||||
** General Keybindings
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(use-package general
|
||||
:config
|
||||
(general-evil-setup)
|
||||
;; set 'SPC' as global leader key
|
||||
(general-create-definer lm/leader-keys
|
||||
:states '(normal insert visual emacs)
|
||||
:keymaps 'override
|
||||
:prefix "SPC" ;; set leader
|
||||
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||
|
||||
(lm/leader-keys
|
||||
"b" '(:ignore t :wk "buffer")
|
||||
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||
"b i" '(ibuffer :wk "Ibuffer")
|
||||
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||
"b n" '(next-buffer :wk "Next buffer")
|
||||
"b p" '(previous-buffer :wk "Previous buffer")
|
||||
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||
|
||||
(lm/leader-keys
|
||||
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||
"e e" '(eval-expression :wk "Evaluate an elisp expression")
|
||||
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||
"e h" '(counsel-esh-history :wk "Eshell history")
|
||||
"e s" '(eshell :wk "Eshell"))
|
||||
|
||||
(lm/leader-keys
|
||||
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||
"." '(find-file :wk "Find file")
|
||||
"f c" '((lambda () (interactive) (find-file "~/nixos/modules/old_configs/emacs/config.org")) :wk "Edit emacs config")
|
||||
"f r" '(counsel-recentf :wk "Find recent files")
|
||||
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||
|
||||
(lm/leader-keys
|
||||
"h" '(:ignore t :wk "Help")
|
||||
"h f" '(describe-function :wk "Describe function")
|
||||
"h v" '(describe-variable :wk "Describe variable")
|
||||
"h r r" '(reload-init-file :wk "Reload emacs config"))
|
||||
;; "h r r" '((lambda () (interactive) (load-file user-init-file)) :wk "Reload emacs config"))
|
||||
|
||||
(lm/leader-keys
|
||||
"i" '(:ignore t :wk "Insert")
|
||||
"i p" '(org-download-screenshot :wk "Insert screenshot (org)"))
|
||||
|
||||
(lm/leader-keys
|
||||
"t" '(:ignore t :wk "Toggle")
|
||||
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||
"t i" '(org-toggle-inline-images :wk "Toggle inline images")
|
||||
"t t" '(visual-line-mode :wk "Toggle truncated lines"))
|
||||
|
||||
(lm/leader-keys
|
||||
"s" '(:ignore t :wk "Shell")
|
||||
"s c" '(shell-command :wk "Run a shell command")
|
||||
"s d" '(sh-cd-here :wk "Move current shell to current dir")
|
||||
"s m" '(sh-mode :wk "Shell mode"))
|
||||
|
||||
(lm/leader-keys
|
||||
"c" '(:ignore t :wk "Capitalize")
|
||||
"c w" '(capitalize-word :wk "Capitalize word")
|
||||
"c r" '(capitalize-region :wk "Capitalize region")
|
||||
"c c" '(upcase-char :wk "Upcase char")
|
||||
"c u" '(upcase-region :wk "Upcase region"))
|
||||
|
||||
(lm/leader-keys
|
||||
"l" '(:ignore t :wk "Downcase")
|
||||
"l w" '(downcase-word :wk "Downcase word")
|
||||
"l u" '(downcase-region :wk "Downcase region"))
|
||||
|
||||
;; Evil window bindings
|
||||
(lm/leader-keys
|
||||
"w" '(:ignore t :wk "Window")
|
||||
"w w" '(evil-window-next :wk "Next window")
|
||||
"w h" '(evil-window-left :wk "Move cursor to window left")
|
||||
"w j" '(evil-window-down :wk "Move cursor to window below")
|
||||
"w k" '(evil-window-up :wk "Move cursor to window above")
|
||||
"w l" '(evil-window-right :wk "Move cursor to window right")
|
||||
"w s" '(evil-window-split :wk "Split window horizontally")
|
||||
"w v" '(evil-window-vsplit :wk "Split window vertically")
|
||||
"w H" '(evil-window-move-far-left :wk "Move split to left")
|
||||
"w J" '(evil-window-move-very-bottom :wk "Move split to bottom")
|
||||
"w K" '(evil-window-move-very-top :wk "Move split to top")
|
||||
"w L" '(evil-window-move-far-right :wk "Move split to right")
|
||||
"w >" '(evil-window-increase-width :wk "Increase window width")
|
||||
"w ." '(evil-window-increase-width :wk "Increase window width")
|
||||
"w <" '(evil-window-decrease-width :wk "Increase window width")
|
||||
"w ," '(evil-window-decrease-width :wk "Increase window width")
|
||||
"w c" '(evil-window-delete :wk "Close window")
|
||||
"w o" '(delete-other-windows :wk "Delete other windows")
|
||||
"w =" '(balance-windows :wk "Balance windows")
|
||||
"q k" '(kill-buffer-and-window :wk "Kill buf and window")
|
||||
"q q" '(save-buffers-kill-terminal :wk "Save bufs, kill term"))
|
||||
|
||||
;; (evil-global-set-key 'visual "K" (kbd ":m '<-2 RET gv '< gk"))
|
||||
(evil-global-set-key 'visual "K" 'drag-stuff-up)
|
||||
;; (evil-global-set-key 'visual "J" (kbd ":m '>+1 RET gv '> gj"))
|
||||
(evil-global-set-key 'visual "J" 'drag-stuff-down)
|
||||
|
||||
(lm/leader-keys
|
||||
"p" '(:ignore t :wk "Project")
|
||||
"p o" '(dashboard-open :wk "Return to dashboard")
|
||||
"p f" '(project-find-file :wk "Find project file"))
|
||||
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
* ALL THE ICONS
|
||||
#+begin_src emacs-lisp
|
||||
(use-package all-the-icons
|
||||
:ensure t
|
||||
:diminish
|
||||
:if (display-graphic-p))
|
||||
(use-package all-the-icons-dired
|
||||
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||
|
||||
#+end_src
|
||||
|
||||
* AUTOSAVE
|
||||
#+begin_src emacs-lisp
|
||||
(setq backup-directory-alist
|
||||
`((".*" . "~/emacs/auto-saves")))
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" "~/emacs/auto-saves" t)))
|
||||
#+end_src
|
||||
|
||||
* COMPANY
|
||||
#+begin_src emacs-lisp
|
||||
(use-package company
|
||||
:defer 2
|
||||
:diminish
|
||||
:custom
|
||||
(company-begin-commands '(self-insert-command))
|
||||
(company-idle-delay .1)
|
||||
(company-minimum-prefix-length 2)
|
||||
(company-show-numbers t)
|
||||
(company-tooltip-align-annotations 't)
|
||||
(global-company-mode t))
|
||||
|
||||
(use-package company-box
|
||||
:after company
|
||||
:diminish
|
||||
:hook (company-mode . company-box-mode))
|
||||
#+end_src
|
||||
|
||||
* DASHBOARD
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:diminish
|
||||
:init
|
||||
(setq initial-buffer-choice 'dashboard-open)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
;; (setq dashboard-set-navigator t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-banner-logo-title "Welcome to Emacs!")
|
||||
(setq dashboard-startup-banner 'logo) ;; default logo
|
||||
(setq dashboard-center-content t)
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(agenda . 5)
|
||||
(bookmarks . 3)
|
||||
(projects . 3)))
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
#+end_src
|
||||
|
||||
* DIMINISH
|
||||
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package diminish)
|
||||
|
||||
#+end_src
|
||||
|
||||
* DRAG-STUFF
|
||||
#+begin_src emacs-lisp
|
||||
(use-package drag-stuff
|
||||
:diminish
|
||||
:config
|
||||
(drag-stuff-global-mode 1))
|
||||
|
||||
#+end_src
|
||||
|
||||
* FLYCHECK
|
||||
Install =luacheck= from your Linux distro's repositories for flycheck to work correctly with lua files. Install =python-pylint= for flycheck to work with python files. Haskell works with flycheck as long as =haskell-ghc= or =haskell-stack-ghc= is installed. For more information on language support for flycheck, [[https://www.flycheck.org/en/latest/languages.html][read this]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:init (global-flycheck-mode))
|
||||
#+end_src
|
||||
|
||||
* FONTS
|
||||
Defining the various fonts emacs will use
|
||||
|
||||
** Setting The Font Face
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(set-face-attribute 'default nil
|
||||
;; try switch to Source Code Pro
|
||||
:font "FiraCodeNerdFontMono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'variable-pitch nil
|
||||
:font "FiraCodeNerdFontMono"
|
||||
:height 120
|
||||
:weight 'medium)
|
||||
(set-face-attribute 'fixed-pitch nil
|
||||
:font "FiraCodeNerdFontMono"
|
||||
:height 110
|
||||
:weight 'medium)
|
||||
;; Makes commented text and keywords italics.
|
||||
;; This is working in emacsclient but not emacs.
|
||||
;; Your font must have an italic face available.
|
||||
(set-face-attribute 'font-lock-comment-face nil
|
||||
:slant 'italic)
|
||||
(set-face-attribute 'font-lock-keyword-face nil
|
||||
:slant 'italic)
|
||||
|
||||
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||
;; are not right unless I also add this method of setting the default font.
|
||||
(add-to-list 'default-frame-alist '(font . "FiraCodeNerdFontMono-14"))
|
||||
|
||||
;; Uncomment the following line if line spacing needs adjusting.
|
||||
;; (setq-default line-spacing 0.12)
|
||||
|
||||
#+end_src
|
||||
|
||||
** Zoom In/Out
|
||||
Enable zoom in/out with C-=/- and also for C-scrl-up/down
|
||||
#+begin_src emacs-lisp
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||
#+end_src
|
||||
|
||||
* GNUPLOT
|
||||
#+begin_src emacs-lisp
|
||||
(use-package gnuplot-mode)
|
||||
;; automatically open files ending with .gp or .gnuplot in gnuplot mode
|
||||
;; (setq auto-mode-alist
|
||||
;; (append '(("\\.\\(gp\\|gnuplot\\)$" . gnuplot-mode)) auto-mode-alist)))
|
||||
|
||||
#+end_src
|
||||
|
||||
* IMAGE DIR-ED
|
||||
#+begin_src emacs-lisp
|
||||
(use-package image-dired+)
|
||||
#+end_src
|
||||
* INDENTING/TABS
|
||||
#+begin_src emacs-lisp
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq-default indent-line-function 'insert-tab)
|
||||
(setq-default c-default-style "linux"
|
||||
c-basic-offset 4)
|
||||
;; if indent-tabs-mode is off, untabify before saving
|
||||
;;(add-hook 'write-file-hooks
|
||||
;; (lambda () (if (not indent-tabs-mode)
|
||||
;; (untabify (point-min) (point-max)))))
|
||||
#+end_src
|
||||
|
||||
* LIGATURES
|
||||
#+begin_src emacs-lisp
|
||||
;; This assumes you've installed the package via MELPA.
|
||||
(use-package ligature
|
||||
:config
|
||||
;; Enable the "www" ligature in every possible major mode
|
||||
(ligature-set-ligatures 't '("www"))
|
||||
;; Enable traditional ligature support in eww-mode, if the
|
||||
;; `variable-pitch' face supports it
|
||||
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
||||
;; Enable all FiraMonoNerdFont and Fira Code ligatures in programming modes
|
||||
|
||||
(ligature-set-ligatures 'prog-mode
|
||||
'(;; == === ==== => =| =>>=>=|=>==>> ==< =/=//=// =~
|
||||
;; =:= =!=
|
||||
("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "="))))
|
||||
;; ;; ;;;
|
||||
(";" (rx (+ ";")))
|
||||
;; && &&&
|
||||
("&" (rx (+ "&")))
|
||||
;; !! !!! !. !: !!. != !== !~
|
||||
("!" (rx (+ (or "=" "!" "\." ":" "~"))))
|
||||
;; ?? ??? ?: ?= ?.
|
||||
("?" (rx (or ":" "=" "\." (+ "?"))))
|
||||
;; %% %%%
|
||||
("%" (rx (+ "%")))
|
||||
;; |> ||> |||> ||||> |] |} || ||| |-> ||-||
|
||||
;; |->>-||-<<-| |- |== ||=||
|
||||
;; |==>>==<<==<=>==//==/=!==:===>
|
||||
("|" (rx (+ (or ">" "<" "|" "/" ":" "!" "}" "\]"
|
||||
"-" "=" ))))
|
||||
;; \\ \\\ \/
|
||||
("\\" (rx (or "/" (+ "\\"))))
|
||||
;; ++ +++ ++++ +>
|
||||
("+" (rx (or ">" (+ "+"))))
|
||||
;; :: ::: :::: :> :< := :// ::=
|
||||
(":" (rx (or ">" "<" "=" "//" ":=" (+ ":"))))
|
||||
;; // /// //// /\ /* /> /===:===!=//===>>==>==/
|
||||
("/" (rx (+ (or ">" "<" "|" "/" "\\" "\*" ":" "!"
|
||||
"="))))
|
||||
;; .. ... .... .= .- .? ..= ..<
|
||||
("\." (rx (or "=" "-" "\?" "\.=" "\.<" (+ "\."))))
|
||||
;; -- --- ---- -~ -> ->> -| -|->-->>->--<<-|
|
||||
("-" (rx (+ (or ">" "<" "|" "~" "-"))))
|
||||
;; *> */ *) ** *** ****
|
||||
("*" (rx (or ">" "/" ")" (+ "*"))))
|
||||
;; www wwww
|
||||
("w" (rx (+ "w")))
|
||||
;; <> <!-- <|> <: <~ <~> <~~ <+ <* <$ </ <+> <*>
|
||||
;; <$> </> <| <|| <||| <|||| <- <-| <-<<-|-> <->>
|
||||
;; <<-> <= <=> <<==<<==>=|=>==/==//=!==:=>
|
||||
;; << <<< <<<<
|
||||
("<" (rx (+ (or "\+" "\*" "\$" "<" ">" ":" "~" "!"
|
||||
"-" "/" "|" "="))))
|
||||
;; >: >- >>- >--|-> >>-|-> >= >== >>== >=|=:=>>
|
||||
;; >> >>> >>>>
|
||||
(">" (rx (+ (or ">" "<" "|" "/" ":" "=" "-"))))
|
||||
;; #: #= #! #( #? #[ #{ #_ #_( ## ### #####
|
||||
("#" (rx (or ":" "=" "!" "(" "\?" "\[" "{" "_(" "_"
|
||||
(+ "#"))))
|
||||
;; ~~ ~~~ ~= ~- ~@ ~> ~~>
|
||||
("~" (rx (or ">" "=" "-" "@" "~>" (+ "~"))))
|
||||
;; __ ___ ____ _|_ __|____|_
|
||||
("_" (rx (+ (or "_" "|"))))
|
||||
;; Fira code: 0xFF 0x12
|
||||
("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9")))))
|
||||
;; Fira code:
|
||||
"Fl" "Tl" "fi" "fj" "fl" "ft"
|
||||
;; The few not covered by the regexps.
|
||||
"{|" "[|" "]#" "(*" "}#" "$>" "^="))
|
||||
|
||||
;; Enables ligature checks globally in all buffers. You can also do it
|
||||
;; per mode with `ligature-mode'.
|
||||
(global-ligature-mode t))
|
||||
|
||||
#+end_src
|
||||
|
||||
* MARKDOWN MODE
|
||||
#+begin_src emacs-lisp
|
||||
(use-package markdown-mode
|
||||
:ensure t
|
||||
:mode ("README\\.md\\'" . gfm-mode)
|
||||
:init (setq markdown-command "multimarkdown"))
|
||||
|
||||
#+end_src
|
||||
|
||||
* ORG DOWNLOAD
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(use-package org-download
|
||||
:after org
|
||||
:defer nil
|
||||
:custom
|
||||
(org-download-method 'directory)
|
||||
(org-download-image-dir "~/emacs/images/")
|
||||
(org-download-heading-lvl 0)
|
||||
(org-download-timestamp "org_%Y%m%d-%H%M%S_")
|
||||
(org-image-actual-width 400)
|
||||
(org-download-screenshot-method "WAYLAND_DISPLAY=wayland-1 wl-paste -t image/png > '%s'.png")
|
||||
:bind
|
||||
("C-M-y" . org-download-screenshot file)
|
||||
:config
|
||||
(require 'org-download))
|
||||
#+end_src
|
||||
|
||||
* PULSE
|
||||
Pulse highlight a line on certain actions
|
||||
|
||||
# #+begin_src emacs-lisp
|
||||
# (use-package pulse
|
||||
# :ensure nil
|
||||
# :defer
|
||||
# :init
|
||||
# (defun pulse-line (&rest _)
|
||||
# "Pulse the current line"
|
||||
# (pulse-momentary-highlight-one-line (point)))
|
||||
|
||||
# (dolist (command '(scroll-up-command
|
||||
# scroll-down-command
|
||||
# windmove-left
|
||||
# windmove-right
|
||||
# windmove-up
|
||||
# windmove-down
|
||||
# move-to-window-line-top-bottom
|
||||
# recenter-top-bottom
|
||||
# other-window))
|
||||
# (advice-add command :after #'pulse-line)))
|
||||
# #+end_src
|
||||
|
||||
* PDF TOOLS
|
||||
#+begin_src emacs-lisp
|
||||
(use-package pdf-tools)
|
||||
#+end_src
|
||||
|
||||
|
||||
* PROJECTILE
|
||||
[[https://github.com/bbatsov/projectile][Projectile]] is a project interaction library for Emacs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package projectile
|
||||
:diminish
|
||||
:config
|
||||
(projectile-mode 1))
|
||||
#+end_src
|
||||
|
||||
* RAINBOW MODE
|
||||
Display the actual color as a background for any hex color value (ex. #ffffff). The code block below enables rainbow-mode in all programming modes (prog-mode) as well as org-mode, which is why rainbow works in this document.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package rainbow-mode
|
||||
:diminish
|
||||
:hook
|
||||
((org-mode prog-mode) . rainbow-mode))
|
||||
#+end_src
|
||||
|
||||
* RELOAD EMACS
|
||||
This is just an example of how to create a simple function in Emacs. Use this function to reload Emacs after adding changes to the config. Yes, I am loading the user-init-file twice in this function, which is a hack because for some reason, just loading the user-init-file once does not work properly.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun reload-init-file ()
|
||||
(interactive)
|
||||
(load-file user-init-file)
|
||||
(load-file user-init-file))
|
||||
#+end_src
|
||||
|
||||
* SHELLS AND TERMINALS
|
||||
|
||||
** Eshell
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package eshell-syntax-highlighting
|
||||
:after esh-mode
|
||||
:config
|
||||
(eshell-syntax-highlighting-global-mode +1))
|
||||
|
||||
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||
eshell-history-size 5000
|
||||
eshell-buffer-maximum-lines 5000
|
||||
eshell-hist-ignoredups t
|
||||
eshell-scroll-to-bottom-on-input t
|
||||
eshell-destroy-buffer-when-process-dies t
|
||||
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||
#+end_src
|
||||
|
||||
** Vterm
|
||||
Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets the shell to be used in M-x shell, M-x term, M-x ansi-term and M-x vterm. By default, the shell is set to 'fish' but could change it to 'bash' or 'zsh' if you prefer.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vterm
|
||||
:config
|
||||
(setq shell-file-name "/run/current-system/sw/bin/bash"
|
||||
vterm-max-scrollback 5000))
|
||||
#+end_src
|
||||
|
||||
* SUDO EDIT
|
||||
Enable editing of privileged files
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package sudo-edit
|
||||
:config
|
||||
(lm/leader-keys
|
||||
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||
|
||||
#+end_src
|
||||
|
||||
* THEME
|
||||
Set themes dir, load chosen theme - theme made with [[https://emacsfodder.github.io/emacs-theme-editor/][Emacs Theme Editor]].
|
||||
#+begin_src emacs-lisp
|
||||
;;(add-to-list 'custom-theme-load-path "~/.config/emacs/themes")
|
||||
;;(load-theme 'soft-charcoal t)
|
||||
|
||||
(use-package doom-themes
|
||||
:ensure t
|
||||
:config
|
||||
;; Global settings (defaults)
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
(load-theme 'doom-monokai-spectrum t)
|
||||
;; (load-theme 'doom-monokai-machine t)
|
||||
|
||||
;; Enable flashing mode-line on errors
|
||||
(doom-themes-visual-bell-config)
|
||||
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||
(doom-themes-neotree-config)
|
||||
;; or for treemacs users
|
||||
(setq doom-themes-treemacs-theme "doom-colors") ; use "doom-colors" for less minimal icon theme
|
||||
(doom-themes-treemacs-config)
|
||||
;; Corrects (and improves) org-mode's native fontification.
|
||||
(doom-themes-org-config))
|
||||
#+end_src
|
||||
|
||||
* TRANSPARENCY
|
||||
True transparency support as of emacs 29
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 90)) ;; for all new frames
|
||||
#+end_src
|
||||
|
||||
|
||||
* GUI TWEAKS
|
||||
Making the UI look nicer
|
||||
|
||||
** Disable Menubar, Toolbars and Scrollbars
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(scroll-bar-mode -1)
|
||||
#+end_src
|
||||
|
||||
** Display Line Numbers and Truncated Lines
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(global-display-line-numbers-mode 0)
|
||||
(menu-bar--display-line-numbers-mode-relative)
|
||||
;; (setq display-line-numbers-mode-relative 't)
|
||||
|
||||
(global-visual-line-mode t)
|
||||
#+end_src
|
||||
|
||||
* IVY (COUNSEL)
|
||||
+ Ivy, a generic completion mechanism for Emacs.
|
||||
+ Counsel, a collection of Ivy-enhanced versions of common Emacs commands.
|
||||
+ Ivy-rich allows us to add descriptions alongside the commands in M-x.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:diminish
|
||||
:config (counsel-mode))
|
||||
|
||||
(use-package ivy
|
||||
:bind
|
||||
;; ivy-resume resumes the last Ivy-based completion.
|
||||
(("C-c C-r" . ivy-resume)
|
||||
("C-x B" . ivy-switch-buffer-other-window))
|
||||
:diminish
|
||||
:custom
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t)
|
||||
:config
|
||||
(ivy-mode))
|
||||
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:ensure t
|
||||
:diminish
|
||||
:init (all-the-icons-ivy-rich-mode 1))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:diminish
|
||||
:ensure t
|
||||
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||
:custom
|
||||
(ivy-virtual-abbreviate 'full
|
||||
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||
ivy-rich-path-style 'abbrev)
|
||||
:config
|
||||
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||
'ivy-rich-switch-buffer-transformer))
|
||||
|
||||
#+end_src
|
||||
|
||||
* LANGUAGE SUPPORT
|
||||
Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM, AWK, C, C++, Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, M4, Makefiles, Metafont, Modula2, Object Pascal, Objective-C, Octave, Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, SQL, Tcl, Verilog, and VHDL. Other languages will require you to install additional modes.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package zig-mode)
|
||||
(use-package nix-mode)
|
||||
;; (use-package jai-mode)
|
||||
(use-package rust-mode)
|
||||
(use-package cargo-mode)
|
||||
(use-package lua-mode)
|
||||
(add-to-list 'load-path "~/.config/emacs/manual-packages")
|
||||
(require 'odin-mode)
|
||||
#+end_src
|
||||
|
||||
|
||||
* ORG MODE
|
||||
** Enabling Table of Contents
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package toc-org
|
||||
:commands toc-org-enable
|
||||
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||
#+end_src
|
||||
|
||||
** Enabling Org Bullets
|
||||
Org-bullets give bullet points instead of asterisks
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
;;(setq (setq org-return-follows-link t)
|
||||
(use-package org-bullets)
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
#+end_src
|
||||
|
||||
** Source Code Block Tag Expansion
|
||||
Org-tempo is not a separate package but a module within org that can be enabled. Org-tempo allows for '<s' followed by TAB to expand to a begin_src tag. Other expansions available include:
|
||||
|
||||
| Typing the below + TAB | Expands to ... |
|
||||
|------------------------+-----------------------------------------|
|
||||
| <a | '#+BEGIN_EXPORT ascii' … '#+END_EXPORT |
|
||||
| <c | '#+BEGIN_CENTER' … '#+END_CENTER' |
|
||||
| <C | '#+BEGIN_COMMENT' … '#+END_COMMENT' |
|
||||
| <e | '#+BEGIN_EXAMPLE' … '#+END_EXAMPLE' |
|
||||
| <E | '#+BEGIN_EXPORT' … '#+END_EXPORT' |
|
||||
| <h | '#+BEGIN_EXPORT html' … '#+END_EXPORT' |
|
||||
| <l | '#+BEGIN_EXPORT latex' … '#+END_EXPORT' |
|
||||
| <q | '#+BEGIN_QUOTE' … '#+END_QUOTE' |
|
||||
| <s | '#+BEGIN_SRC' … '#+END_SRC' |
|
||||
| <v | '#+BEGIN_VERSE' … '#+END_VERSE' |
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'org-tempo)
|
||||
#+end_src
|
||||
|
||||
* WHICH-KEY
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package which-key
|
||||
:init
|
||||
(which-key-mode 1)
|
||||
:diminish
|
||||
:config
|
||||
(setq which-key-side-window-location 'bottom
|
||||
which-key-sort-order #'which-key-key-order-alpha
|
||||
which-key-sort-uppercase-first nil
|
||||
which-key-add-column-padding 1
|
||||
which-key-max-display-columns nil
|
||||
which-key-min-display-lines 6
|
||||
which-key-side-window-slot -10
|
||||
which-key-side-window-max-height 0.25
|
||||
which-key-ide-delay 0.8
|
||||
which-key-max-description-length 25
|
||||
which-key-allow-imprecise-window-fit nil
|
||||
which-key-separator " -> " ))
|
||||
#+end_src
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,447 +0,0 @@
|
||||
;;; doom-themes.el --- an opinionated pack of modern color-themes -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Copyright (C) 2016-2022 Henrik Lissner
|
||||
;;
|
||||
;; Author: Henrik Lissner <contact@henrik.io>
|
||||
;; Maintainer: Henrik Lissner <contact@henrik.io>
|
||||
;; Maintainer: Emmanuel Bustos Torres <ema2159@gmail.com>
|
||||
;; Created: May 22, 2016
|
||||
;; Version: 2.3.0
|
||||
;; Keywords: themes faces
|
||||
;; Homepage: https://github.com/doomemacs/themes
|
||||
;; Package-Requires: ((emacs "25.1") (cl-lib "0.5"))
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; doomemacs/themes is an megapack of popular themes, including aesthetic
|
||||
;; extensions for popular packages.
|
||||
;;
|
||||
;; Themes in this pack:
|
||||
;; - doom-1337 -- ported from VSCode's 1337 theme (ported by @ccmywish)
|
||||
;; - doom-acario-dark -- an original dark theme (ported by @gagbo)
|
||||
;; - doom-acario-light -- an original light theme (ported by @gagbo)
|
||||
;; - doom-ayu-dark -- inspired by Ayu Dark (ported by @ashton)
|
||||
;; - doom-ayu-light -- inspirted by Ayu Light (ported by @LoveSponge)
|
||||
;; - doom-ayu-mirage -- inspired by Ayu Mirage (ported by @LoveSponge)
|
||||
;; - doom-badger -- inspired by cann's Badger colorscheme (ported by @jsoa)
|
||||
;; - doom-challenger-deep -- inspired by Vim's Challenger Deep theme (ported by @fuxialexander)
|
||||
;; - doom-city-lights -- inspired by Atom's City Lights theme (ported by @fuxialexander)
|
||||
;; - doom-dark+ -- ported from equinusocio's VSCode Theme, dark+ (ported by @ema2159)
|
||||
;; - doom-dracula -- inspired by the popular Dracula theme (ported by @fuxialexander)
|
||||
;; - doom-earl-grey -- a gentle color scheme, for code (ported by @JuneKelly)
|
||||
;; - doom-ephemeral -- inspired by the Ephemeral Theme from elenapan's dotfiles (ported by @karetsu)
|
||||
;; - doom-fairy-floss -- a candy colored theme by sailorhg (ported by @ema2159)
|
||||
;; - doom-feather-dark -- a purple-tinted theme, inspired by doom-one (by @Plunne)
|
||||
;; - doom-feather-light -- a light variable of feather-dark, inspired by doom-one (by @Plunne)
|
||||
;; - doom-flatwhite -- inspired by Atom's Flatwhite Syntax theme (ported by @JuneKelly)
|
||||
;; - doom-gruvbox -- inspired by morhetz's Gruvbox (ported by @JongW)
|
||||
;; - doom-gruvbox-light -- inspired by morhetz's Gruvbox (light) (ported by @jsoa)
|
||||
;; - doom-henna -- based on VSCode's Henna theme (ported by @jsoa)
|
||||
;; - doom-homage-black -- a minimalistic, colorless theme inspired by eziam, tao, and jbeans (ported by @mskorzhinskiy)
|
||||
;; - doom-homage-white -- minimal white theme inspired by editors from 2000s (ported by @mskorzhinskiy)
|
||||
;; - doom-horizon -- ported from VSCode Horizon (ported by @karetsu)
|
||||
;; - doom-Iosvkem -- ported from the default dark theme for Adobe Brackets (ported by @neutaaaaan)
|
||||
;; - doom-ir-black -- ported from Vim's ir_black colorscheme (ported by @legendre6891)
|
||||
;; - doom-lantern -- based on Gitleptune's Lantern theme (ported by @paladhammika)
|
||||
;; - doom-laserwave -- a clean synthwave/outrun theme inspired by VSCode's Laserwave (ported by @hyakt)
|
||||
;; - doom-manegarm -- an original autumn-inspired dark theme (ported by @kenranunderscore)
|
||||
;; - doom-material -- adapted from equinusocio's Material themes (ported by @tam5)
|
||||
;; - doom-material-dark -- inspired by Material Theme by xrei (ported by @trev-dev)
|
||||
;; - doom-meltbus -- a dark (mostly) monochromatic theme (ported by @spacefrogg)
|
||||
;; - doom-miramare -- a port of Franbach's Miramare theme; a variant of Grubox (ported by @sagittaros)
|
||||
;; - doom-molokai -- inspired by Tomas Restrepo's Molokai (ported by @hlissner)
|
||||
;; - doom-monokai-classic -- port of Monokai Classic (ported by @ema2159)
|
||||
;; - doom-monokai-machine -- port of Monokai Classic (ported by @minikN)
|
||||
;; - doom-monokai-octagon -- port of Monokai Octagon (ported by @minikN)
|
||||
;; - doom-monokai-pro -- Port of Monokai Pro (ported by @minikN)
|
||||
;; - doom-monokai-ristretto -- Port of Monokai Ristretto (ported by @minikN)
|
||||
;; - doom-monokai-spectrum -- port of Monokai Spectrum (ported by @minikN)
|
||||
;; - doom-moonlight -- inspired by VS code's Moonlight (ported by @Brettm12345)
|
||||
;; - doom-nord -- dark variant of Nord (ported by @fuxialexander)
|
||||
;; - doom-nord-aurora -- a light variant of Nord (ported by @MoskitoHero)
|
||||
;; - doom-nord-light -- light variant of Nord (ported by @fuxialexander)
|
||||
;; - doom-nova -- inspired by Trevord Miller's Nova (ported by @bigardone)
|
||||
;; - doom-oceanic-next -- inspired by Oceanic Next (ported by @juanwolf)
|
||||
;; - doom-oksolar-dark -- an OKLab variant of Solarized dark (ported by @logc)
|
||||
;; - doom-oksolar-light -- an OKLab variant of Solarized light (ported by @logc)
|
||||
;; - doom-old-hope -- inspired by An Old Hope, in a galaxy far far away (ported by @teesloane)
|
||||
;; - doom-one -- inspired by Atom One Dark (ported by @hlissner)
|
||||
;; - doom-one-light -- inspired by Atom One Light (ported by @ztlevi)
|
||||
;; - doom-opera -- an original light theme (ported by @jwintz)
|
||||
;; - doom-opera-light -- an original light theme (ported by @jwintz)
|
||||
;; - doom-outrun-electric -- a high contrast, neon theme inspired by Outrun Electric on VSCode (ported by @ema2159)
|
||||
;; - doom-palenight -- adapted from equinusocio's Material themes (ported by @Brettm12345)
|
||||
;; - doom-peacock -- inspired by daylerees' Peacock (ported by @teesloane)
|
||||
;; - doom-pine -- a green flavor of doom-gruvbox (by @RomanHargrave)
|
||||
;; - doom-plain -- inspired by gko's plain theme for VSCode (ported by @das-s)
|
||||
;; - doom-plain-dark -- inspired by gko's plain theme for VSCode (ported by @das-s)
|
||||
;; - doom-rouge -- ported from VSCode's Rouge Theme (ported by @das-s)
|
||||
;; - doom-shades-of-purple -- a port of VSCode's Shades of Purple (ported by @jwbaldwin)
|
||||
;; - doom-snazzy -- inspired by Hyper Snazzy (ported by @ar1a)
|
||||
;; - doom-solarized-dark -- a dark variant of Solarized (ported by @ema2159)
|
||||
;; - doom-solarized-dark-high-contrast -- a high-contrast variant of Solarized Dark (ported by @jmorag)
|
||||
;; - doom-solarized-light -- a light variant of Solarized (ported by @fuxialexander)
|
||||
;; - doom-sourcerer -- a port of xero's Sourcerer (ported by @fm0xb)
|
||||
;; - doom-spacegrey -- I'm sure you've heard of it (ported by @teesloane)
|
||||
;; - doom-tokyo-night -- inspired by VSCode's Tokyo Night theme (ported by @FosterHangdaan)
|
||||
;; - doom-tomorrow-day -- a light variant of Tomorrow (ported by @emacswatcher)
|
||||
;; - doom-tomorrow-night -- One of the dark variants of Tomorrow (ported by @hlissner)
|
||||
;; - doom-vibrant -- a more vibrant variant of doom-one (ported by @hlissner)
|
||||
;; - doom-wilmersdorf -- port of Ian Pan's Wilmersdorf (ported by @ema2159)
|
||||
;; - doom-xcode -- based off of Apple's Xcode Dark Theme (ported by @kadenbarlow)
|
||||
;; - doom-zenburn -- port of the popular Zenburn theme (ported by @jsoa)
|
||||
;;
|
||||
;; ## Install
|
||||
;;
|
||||
;; `M-x package-install RET doom-themes`
|
||||
;;
|
||||
;; A comprehensive configuration example:
|
||||
;;
|
||||
;; (require 'doom-themes)
|
||||
;;
|
||||
;; ;; Global settings (defaults)
|
||||
;; (setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
;; doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
;;
|
||||
;; ;; Load the theme (doom-one, doom-molokai, etc); keep in mind that each
|
||||
;; ;; theme may have their own settings.
|
||||
;; (load-theme 'doom-one t)
|
||||
;;
|
||||
;; ;; Enable flashing mode-line on errors
|
||||
;; (doom-themes-visual-bell-config)
|
||||
;;
|
||||
;; ;; Enable custom neotree theme
|
||||
;; (doom-themes-neotree-config) ; all-the-icons fonts must be installed!
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(require 'cl-lib)
|
||||
(require 'doom-themes-base)
|
||||
|
||||
(defgroup doom-themes nil
|
||||
"Options for doom-themes."
|
||||
:group 'faces)
|
||||
|
||||
(defcustom doom-themes-padded-modeline nil
|
||||
"Default value for padded-modeline setting for themes that support it."
|
||||
:group 'doom-themes
|
||||
:type '(choice integer boolean))
|
||||
|
||||
;;
|
||||
(defcustom doom-themes-enable-bold t
|
||||
"If nil, bold will be disabled across all faces."
|
||||
:group 'doom-themes
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom doom-themes-enable-italic t
|
||||
"If nil, italics will be disabled across all faces."
|
||||
:group 'doom-themes
|
||||
:type 'boolean)
|
||||
|
||||
|
||||
;;
|
||||
;;; API
|
||||
|
||||
(defvar doom-themes--colors nil)
|
||||
(defvar doom--min-colors '(257 256 16))
|
||||
(defvar doom--quoted-p nil)
|
||||
(defvar doom-themes--faces nil)
|
||||
|
||||
(defun doom-themes--colors-p (item)
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(when item
|
||||
(cond ((listp item)
|
||||
(let ((car (car item)))
|
||||
(cond ((memq car '(quote doom-color)) nil)
|
||||
|
||||
((memq car '(backquote \`))
|
||||
(let ((doom--quoted-p t))
|
||||
(doom-themes--colors-p (cdr item))))
|
||||
|
||||
((eq car '\,)
|
||||
(let (doom--quoted-p)
|
||||
(doom-themes--colors-p (cdr item))))
|
||||
|
||||
((or (doom-themes--colors-p car)
|
||||
(doom-themes--colors-p (cdr-safe item)))))))
|
||||
|
||||
((and (symbolp item)
|
||||
(not (keywordp item))
|
||||
(not doom--quoted-p)
|
||||
(not (equal (substring (symbol-name item) 0 1) "-"))
|
||||
(assq item doom-themes--colors))))))
|
||||
|
||||
(defun doom-themes--apply-faces (new-faces &optional default-faces)
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(let ((default-faces (or default-faces doom-themes-base-faces))
|
||||
(faces (make-hash-table :test #'eq :size (+ (length default-faces) (length new-faces))))
|
||||
(directives (make-hash-table :test #'eq)))
|
||||
(dolist (spec (append (mapcar #'copy-sequence default-faces) new-faces))
|
||||
(if (listp (car spec))
|
||||
(cl-destructuring-bind (face action &optional arg) (car spec)
|
||||
(unless (assq face new-faces)
|
||||
(puthash face (list action arg (cdr spec))
|
||||
directives)))
|
||||
(puthash (car spec) (cdr spec) faces)))
|
||||
(cl-loop for face being the hash-keys of directives
|
||||
for (action target spec) = (gethash face directives)
|
||||
unless (memq action '(&inherit &extend &override))
|
||||
do (error "Invalid operation (%s) for '%s' face" action face)
|
||||
if (eq (car spec) 'quote)
|
||||
do (error "Can't extend literal face spec (for '%s')" face)
|
||||
;; TODO Add &all/&light/&dark extension support
|
||||
else if (memq (car spec) '(&all &light &dark))
|
||||
do (error "Can't extend face with &all, &light or &dark specs (for '%s')" face)
|
||||
else do
|
||||
(puthash face
|
||||
(let ((old-spec (gethash (or target face) faces))
|
||||
(plist spec))
|
||||
;; remove duplicates
|
||||
(while (keywordp (car plist))
|
||||
(setq old-spec (plist-put old-spec (car plist) (cadr plist))
|
||||
plist (cddr plist)))
|
||||
old-spec)
|
||||
faces))
|
||||
(let (results)
|
||||
(maphash (lambda (face plist)
|
||||
(when (keywordp (car plist))
|
||||
;; TODO Clean up duplicates in &all/&light/&dark blocks
|
||||
(dolist (prop (append (unless doom-themes-enable-bold '(:weight normal :bold unspecified))
|
||||
(unless doom-themes-enable-italic '(:slant normal :italic unspecified))))
|
||||
(when (and (plist-member plist prop)
|
||||
(not (eq (plist-get plist prop) 'inherit)))
|
||||
(plist-put plist prop
|
||||
(if (memq prop '(:weight :slant))
|
||||
(quote 'normal))))))
|
||||
(push (cons face plist) results))
|
||||
faces)
|
||||
(nreverse results))))
|
||||
|
||||
(defun doom-themes--colorize (item type)
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(when item
|
||||
(let ((doom--quoted-p doom--quoted-p))
|
||||
(cond ((listp item)
|
||||
(cond ((memq (car item) '(quote doom-color))
|
||||
item)
|
||||
((eq (car item) 'doom-ref)
|
||||
(doom-themes--colorize
|
||||
(apply #'doom-ref (cdr item)) type))
|
||||
((let* ((item (append item nil))
|
||||
(car (car item))
|
||||
(doom--quoted-p
|
||||
(cond ((memq car '(backquote \`)) t)
|
||||
((eq car '\,) nil)
|
||||
(t doom--quoted-p))))
|
||||
(cons car
|
||||
(cl-loop
|
||||
for i in (cdr item)
|
||||
collect (doom-themes--colorize i type)))))))
|
||||
|
||||
((and (symbolp item)
|
||||
(not (keywordp item))
|
||||
(not doom--quoted-p)
|
||||
(not (equal (substring (symbol-name item) 0 1) "-"))
|
||||
(assq item doom-themes--colors))
|
||||
`(doom-color ',item ',type))
|
||||
|
||||
(item)))))
|
||||
|
||||
(defun doom-themes--build-face (face)
|
||||
(declare (pure t) (side-effect-free t))
|
||||
`(list
|
||||
',(car face)
|
||||
,(let ((face-body (cdr face)))
|
||||
(cond ((keywordp (car face-body))
|
||||
(let ((real-attrs face-body)
|
||||
defs)
|
||||
(if (doom-themes--colors-p real-attrs)
|
||||
(dolist (cl doom--min-colors `(list ,@(nreverse defs)))
|
||||
(push `(list '((class color) (min-colors ,cl))
|
||||
(list ,@(doom-themes--colorize real-attrs cl)))
|
||||
defs))
|
||||
`(list (list 't (list ,@real-attrs))))))
|
||||
|
||||
((memq (car-safe (car face-body)) '(quote backquote \`))
|
||||
(car face-body))
|
||||
|
||||
((let (all-attrs defs)
|
||||
(dolist (attrs face-body `(list ,@(nreverse defs)))
|
||||
(cond ((eq (car attrs) '&all)
|
||||
(setq all-attrs (append all-attrs (cdr attrs))))
|
||||
|
||||
((memq (car attrs) '(&dark &light))
|
||||
(let ((bg (if (eq (car attrs) '&dark) 'dark 'light))
|
||||
(real-attrs (append all-attrs (cdr attrs) '())))
|
||||
(cond ((doom-themes--colors-p real-attrs)
|
||||
(dolist (cl doom--min-colors)
|
||||
(push `(list '((class color) (min-colors ,cl) (background ,bg))
|
||||
(list ,@(doom-themes--colorize real-attrs cl)))
|
||||
defs)))
|
||||
|
||||
((push `(list '((background ,bg)) (list ,@real-attrs))
|
||||
defs)))))))))))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Color helper functions
|
||||
|
||||
;; Shamelessly *borrowed* from solarized
|
||||
;;;###autoload
|
||||
(defun doom-name-to-rgb (color)
|
||||
"Retrieves the hexidecimal string repesented the named COLOR (e.g. \"red\")
|
||||
for FRAME (defaults to the current frame)."
|
||||
(cl-loop with div = (float (car (tty-color-standard-values "#ffffff")))
|
||||
for x in (tty-color-standard-values (downcase color))
|
||||
collect (/ x div)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-blend (color1 color2 alpha)
|
||||
"Blend two colors (hexidecimal strings) together by a coefficient ALPHA (a
|
||||
float between 0 and 1)"
|
||||
(when (and color1 color2)
|
||||
(cond ((and color1 color2 (symbolp color1) (symbolp color2))
|
||||
(doom-blend (doom-color color1) (doom-color color2) alpha))
|
||||
|
||||
((or (listp color1) (listp color2))
|
||||
(cl-loop for x in color1
|
||||
when (if (listp color2) (pop color2) color2)
|
||||
collect (doom-blend x it alpha)))
|
||||
|
||||
((and (string-prefix-p "#" color1) (string-prefix-p "#" color2))
|
||||
(apply (lambda (r g b) (format "#%02x%02x%02x" (* r 255) (* g 255) (* b 255)))
|
||||
(cl-loop for it in (doom-name-to-rgb color1)
|
||||
for other in (doom-name-to-rgb color2)
|
||||
collect (+ (* alpha it) (* other (- 1 alpha))))))
|
||||
|
||||
(color1))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-darken (color alpha)
|
||||
"Darken a COLOR (a hexidecimal string) by a coefficient ALPHA (a float between
|
||||
0 and 1)."
|
||||
(cond ((and color (symbolp color))
|
||||
(doom-darken (doom-color color) alpha))
|
||||
|
||||
((listp color)
|
||||
(cl-loop for c in color collect (doom-darken c alpha)))
|
||||
|
||||
((doom-blend color "#000000" (- 1 alpha)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-lighten (color alpha)
|
||||
"Brighten a COLOR (a hexidecimal string) by a coefficient ALPHA (a float
|
||||
between 0 and 1)."
|
||||
(cond ((and color (symbolp color))
|
||||
(doom-lighten (doom-color color) alpha))
|
||||
|
||||
((listp color)
|
||||
(cl-loop for c in color collect (doom-lighten c alpha)))
|
||||
|
||||
((doom-blend color "#FFFFFF" (- 1 alpha)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-color (name &optional type)
|
||||
"Retrieve a specific color named NAME (a symbol) from the current theme."
|
||||
(let ((colors (if (listp name)
|
||||
name
|
||||
(cdr-safe (assq name doom-themes--colors)))))
|
||||
(and colors
|
||||
(cond ((listp colors)
|
||||
(let ((i (or (plist-get '(256 1 16 2 8 3) type) 0)))
|
||||
(if (> i (1- (length colors)))
|
||||
(car (last colors))
|
||||
(nth i colors))))
|
||||
(t colors)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-ref (face prop &optional class)
|
||||
"TODO"
|
||||
(let ((spec (or (cdr (assq face doom-themes--faces))
|
||||
(error "Couldn't find the '%s' face" face))))
|
||||
(when (memq (car spec) '(quote backquote \`))
|
||||
(user-error "Can't fetch the literal spec for '%s'" face))
|
||||
(when class
|
||||
(setq spec (cdr (assq class spec)))
|
||||
(unless spec
|
||||
(error "Couldn't find the '%s' class in the '%s' face"
|
||||
class face)))
|
||||
(unless (plist-member spec prop)
|
||||
(error "Couldn't find the '%s' property in the '%s' face%s"
|
||||
prop face (if class (format "'s '%s' class" class) "")))
|
||||
(plist-get spec prop)))
|
||||
|
||||
|
||||
;;
|
||||
;;; Defining themes
|
||||
|
||||
(defun doom-themes-prepare-facelist (custom-faces)
|
||||
"Return an alist of face definitions for `custom-theme-set-faces'.
|
||||
|
||||
Faces in EXTRA-FACES override the default faces."
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(setq doom-themes--faces (doom-themes--apply-faces custom-faces))
|
||||
(mapcar #'doom-themes--build-face doom-themes--faces))
|
||||
|
||||
(defun doom-themes-prepare-varlist (vars)
|
||||
"Return an alist of variable definitions for `custom-theme-set-variables'.
|
||||
|
||||
Variables in EXTRA-VARS override the default ones."
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(cl-loop for (var val) in (append doom-themes-base-vars vars)
|
||||
collect `(list ',var ,val)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-themes-set-faces (theme &rest faces)
|
||||
"Customize THEME (a symbol) with FACES.
|
||||
|
||||
If THEME is nil, it applies to all themes you load. FACES is a list of Doom
|
||||
theme face specs. These is a simplified spec. For example:
|
||||
|
||||
(doom-themes-set-faces \\='user
|
||||
\\='(default :background red :foreground blue)
|
||||
\\='(doom-modeline-bar :background (if -modeline-bright modeline-bg highlight))
|
||||
\\='(doom-modeline-buffer-file :inherit \\='mode-line-buffer-id :weight \\='bold)
|
||||
\\='(doom-modeline-buffer-path :inherit \\='mode-line-emphasis :weight \\='bold)
|
||||
\\='(doom-modeline-buffer-project-root :foreground green :weight \\='bold))"
|
||||
(declare (indent defun))
|
||||
(apply #'custom-theme-set-faces
|
||||
(or theme 'user)
|
||||
(eval
|
||||
`(let* ((bold ,doom-themes-enable-bold)
|
||||
(italic ,doom-themes-enable-italic)
|
||||
,@(cl-loop for (var . val) in doom-themes--colors
|
||||
collect `(,var ',val)))
|
||||
(list ,@(mapcar #'doom-themes--build-face faces))))))
|
||||
|
||||
(defmacro def-doom-theme (name docstring defs &optional extra-faces extra-vars)
|
||||
"Define a DOOM theme, named NAME (a symbol)."
|
||||
(declare (doc-string 2))
|
||||
(let ((doom-themes--colors defs))
|
||||
`(let* ((bold doom-themes-enable-bold)
|
||||
(italic doom-themes-enable-italic)
|
||||
,@defs)
|
||||
(setq doom-themes--colors
|
||||
(list ,@(cl-loop for (var val) in defs
|
||||
collect `(cons ',var ,val))))
|
||||
(deftheme ,name ,docstring)
|
||||
(custom-theme-set-faces
|
||||
',name ,@(doom-themes-prepare-facelist extra-faces))
|
||||
(custom-theme-set-variables
|
||||
',name ,@(doom-themes-prepare-varlist extra-vars))
|
||||
(unless bold (set-face-bold 'bold 'unspecified))
|
||||
(unless italic (set-face-italic 'italic 'unspecified))
|
||||
(provide-theme ',name))))
|
||||
|
||||
;;;###autoload
|
||||
(when (and (boundp 'custom-theme-load-path) load-file-name)
|
||||
(let* ((base (file-name-directory load-file-name))
|
||||
(dir (expand-file-name "themes/" base)))
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(or (and (file-directory-p dir) dir)
|
||||
base))))
|
||||
|
||||
(provide 'doom-themes)
|
||||
;;; doom-themes.el ends here
|
||||
@@ -1 +0,0 @@
|
||||
(setq package-enable-at-startup nil)
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,20 +0,0 @@
|
||||
# Aliases for emacs commands
|
||||
alias ff find-file $1
|
||||
|
||||
# Aliasing standard shell commands to emacs alternatives
|
||||
alias less view-file $1
|
||||
# Changing "ls" to "exa"
|
||||
|
||||
alias ls exa -al --color=always --group-directories-first $* # my preferred listing
|
||||
alias la exa -a --color=always --group-directories-first $* # all files and dirs
|
||||
alias ll exa -l --color=always --group-directories-first $* # long format
|
||||
alias lt exa -aT --color=always --group-directories-first $* # tree listing
|
||||
alias l. exa -a1 $* | grep "^\." # list hidden files
|
||||
|
||||
# Merge Xresources
|
||||
alias merge xrdb -merge ~/.Xresources
|
||||
|
||||
# Confirm before overwriting something
|
||||
alias cp cp -i $1
|
||||
alias mv mv -i $1
|
||||
alias rm rm -i $1
|
||||
@@ -1 +0,0 @@
|
||||
ls
|
||||
@@ -1,6 +0,0 @@
|
||||
(org-babel-load-file
|
||||
(expand-file-name
|
||||
"config.org"
|
||||
user-emacs-directory))
|
||||
(put 'upcase-region 'disabled nil)
|
||||
(put 'downcase-region 'disabled nil)
|
||||
@@ -1,191 +0,0 @@
|
||||
;;; odin-mode.el --- A major mode for Odin -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2023 Graham Marlow
|
||||
|
||||
;; Author: Graham Marlow
|
||||
;; Keywords: languages
|
||||
;; Url: https://git.sr.ht/~mgmarlow/odin-mode
|
||||
;; Version: 0.1.0
|
||||
;; Package-Requires: ((emacs "28.1"))
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; A major mode for the Odin programming language.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'js) ; For indentation
|
||||
(require 'project) ; For build/compile commands
|
||||
|
||||
(defgroup odin nil
|
||||
"Major mode for the Odin programming language."
|
||||
:link '(url-link "https://odin-lang.org")
|
||||
:group 'languages)
|
||||
|
||||
(defconst odin-keywords
|
||||
'("import" "foreign" "package"
|
||||
"where" "when" "if" "else" "for" "switch" "in" "do" "case"
|
||||
"break" "continue" "fallthrough" "defer" "return" "proc"
|
||||
"struct" "union" "enum" "bit_field" "bit_set" "map" "dynamic"
|
||||
"auto_cast" "cast" "transmute" "distinct" "opaque"
|
||||
"using" "inline" "no_inline"
|
||||
"size_of" "align_of" "offset_of" "type_of"
|
||||
"context"))
|
||||
|
||||
(defconst odin-builtins
|
||||
'("len" "cap"
|
||||
"typeid_of" "type_info_of"
|
||||
"swizzle" "complex" "real" "imag" "quaternion" "conj"
|
||||
"jmag" "kmag"
|
||||
"min" "max" "abs" "clamp"
|
||||
"expand_to_tuple"
|
||||
|
||||
"init_global_temporary_allocator"
|
||||
"copy" "pop" "unordered_remove" "ordered_remove" "clear" "reserve"
|
||||
"resize" "new" "new_clone" "free" "free_all" "delete" "make"
|
||||
"clear_map" "reserve_map" "delete_key" "append_elem" "append_elems"
|
||||
"append" "append_string" "clear_dynamic_array" "reserve_dynamic_array"
|
||||
"resize_dynamic_array" "incl_elem" "incl_elems" "incl_bit_set"
|
||||
"excl_elem" "excl_elems" "excl_bit_set" "incl" "excl" "card"
|
||||
"assert" "panic" "unimplemented" "unreachable"))
|
||||
|
||||
(defconst odin-constants
|
||||
'("nil" "true" "false"))
|
||||
|
||||
(defconst odin-typenames
|
||||
'("bool" "b8" "b16" "b32" "b64"
|
||||
|
||||
"int" "i8" "i16" "i32" "i64"
|
||||
"i16le" "i32le" "i64le"
|
||||
"i16be" "i32be" "i64be"
|
||||
"i128" "u128"
|
||||
"i128le" "u128le"
|
||||
"i128be" "u128be"
|
||||
|
||||
"uint" "u8" "u16" "u32" "u64"
|
||||
"u16le" "u32le" "u64le"
|
||||
"u16be" "u32be" "u64be"
|
||||
|
||||
"f32" "f64"
|
||||
"complex64" "complex128"
|
||||
|
||||
"quaternion128" "quaternion256"
|
||||
|
||||
"rune"
|
||||
"string" "cstring"
|
||||
|
||||
"uintptr" "rawptr"
|
||||
"typeid" "any"
|
||||
"byte"))
|
||||
|
||||
(defvar odin-mode-syntax-table
|
||||
(let ((table (make-syntax-table)))
|
||||
;; Operators
|
||||
(dolist (i '(?: ?+ ?- ?* ?= ?< ?> ?& ?| ?^ ?! ??))
|
||||
(modify-syntax-entry i "." table))
|
||||
|
||||
;; Strings
|
||||
(modify-syntax-entry ?\" "\"" table)
|
||||
(modify-syntax-entry ?\\ "\\" table)
|
||||
|
||||
;; Comments
|
||||
(modify-syntax-entry ?/ ". 124b" table)
|
||||
(modify-syntax-entry ?* ". 23n" table)
|
||||
(modify-syntax-entry ?\n "> b" table)
|
||||
(modify-syntax-entry ?\^m "> b" table)
|
||||
|
||||
table))
|
||||
|
||||
(defvar odin-font-lock-keywords
|
||||
`(
|
||||
;; Keywords
|
||||
(,(regexp-opt odin-keywords 'symbols) . font-lock-keyword-face)
|
||||
|
||||
;; Types
|
||||
(,(regexp-opt odin-typenames 'symbols) . font-lock-type-face)
|
||||
|
||||
;; Attributes
|
||||
("^ *@[a-zA-Z]+" . font-lock-preprocessor-face)
|
||||
|
||||
;; Builtins
|
||||
(,(regexp-opt odin-builtins 'symbols) . font-lock-builtin-face)
|
||||
|
||||
;; Constants
|
||||
(,(regexp-opt odin-constants 'symbols) . font-lock-constant-face)))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode odin-mode
|
||||
prog-mode "Odin"
|
||||
"Major mode for the Odin programming language."
|
||||
:group 'odin
|
||||
:syntax-table odin-mode-syntax-table
|
||||
|
||||
(setq-local font-lock-defaults
|
||||
'(odin-font-lock-keywords))
|
||||
|
||||
(setq-local parse-sexp-ignore-comments t)
|
||||
(setq-local comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
|
||||
(setq-local comment-start "/*")
|
||||
(setq-local comment-end "*/")
|
||||
|
||||
(setq-local indent-line-function #'js-indent-line)
|
||||
|
||||
(setq-local electric-indent-chars
|
||||
(append "{}():;," electric-indent-chars)))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.odin\\'" . odin-mode))
|
||||
|
||||
(defcustom odin-bin "odin"
|
||||
"Path to odin executable."
|
||||
:type 'string
|
||||
:group 'odin-mode)
|
||||
|
||||
(defun odin--project-cmd (format-string)
|
||||
"Execute odin on current project.
|
||||
|
||||
FORMAT-STRING is the command passed to the odin binary. The
|
||||
current project directory is always passed as the first argument."
|
||||
(unless (project-current)
|
||||
(error "No project found"))
|
||||
(let ((default-directory (project-root (project-current))))
|
||||
(compile (apply #'format
|
||||
(concat "%s " format-string " %s")
|
||||
(list odin-bin default-directory)))))
|
||||
|
||||
(defun odin-build-project ()
|
||||
"Build curent project using `odin build`."
|
||||
(interactive)
|
||||
(odin--project-cmd "build"))
|
||||
|
||||
(defun odin-run-project ()
|
||||
"Run current project using `odin run`."
|
||||
(interactive)
|
||||
(odin--project-cmd "run"))
|
||||
|
||||
(defun odin-check-project ()
|
||||
"Check current project using `odin check`."
|
||||
(interactive)
|
||||
(odin--project-cmd "check"))
|
||||
|
||||
(defun odin-test-project ()
|
||||
"Run procedures marked by the attribute @(test) using `odin test`."
|
||||
(interactive)
|
||||
(odin--project-cmd "test"))
|
||||
|
||||
(provide 'odin-mode)
|
||||
|
||||
;;; odin-mode.el ends here
|
||||
@@ -1,147 +0,0 @@
|
||||
;;; doom-palenight-theme.el --- adapted from equinusocio's Material themes -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;
|
||||
;; Added: August 8, 2019 (7c7e871f2221)
|
||||
;; Author: Brettm12345 <https://github.com/Brettm12345>
|
||||
;; Maintainer:
|
||||
;; Source: https://github.com/equinusocio/vsc-material-theme
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(require 'doom-themes)
|
||||
|
||||
|
||||
;;
|
||||
;;; Variables
|
||||
|
||||
(defgroup doom-palenight-theme nil
|
||||
"Options for the `doom-palenight' theme."
|
||||
:group 'doom-themes)
|
||||
|
||||
(defcustom doom-palenight-padded-modeline doom-themes-padded-modeline
|
||||
"If non-nil, adds a 4px padding to the mode-line.
|
||||
Can be an integer to determine the exact padding."
|
||||
:group 'doom-palenight-theme
|
||||
:type '(choice integer boolean))
|
||||
|
||||
|
||||
;;
|
||||
;;; Theme definition
|
||||
|
||||
(def-doom-theme doom-palenight
|
||||
"A dark theme inspired by Material-Palenight"
|
||||
|
||||
;; name default 256 16
|
||||
((bg '("#292D3E" nil nil))
|
||||
(bg-alt '("#242837" nil nil))
|
||||
(base0 '("#1c1f2b" "black" "black"))
|
||||
(base1 '("#1e212e" "#262626" "brightblack"))
|
||||
(base2 '("#232635" "#303030" "brightblack"))
|
||||
(base3 '("#3C435E" "#3a3a3a" "brightblack"))
|
||||
(base4 '("#4E5579" "#444444" "brightblack"))
|
||||
(base5 '("#676E95" "#585858" "brightblack"))
|
||||
(base6 '("#697098" "#626262" "brightblack"))
|
||||
(base7 '("#717CB4" "#767676" "brightblack"))
|
||||
(base8 '("#A6Accd" "#a8a8a8" "white"))
|
||||
(fg '("#EEFFFF" "#e4e4e4" "brightwhite"))
|
||||
(fg-alt '("#BFC7D5" "#bcbcbc" "white"))
|
||||
|
||||
(grey base5)
|
||||
|
||||
(red '("#ff5370" "#ff0000" "red"))
|
||||
(orange '("#f78c6c" "#ff5f00" "brightred"))
|
||||
(green '("#c3e88d" "#afff00" "green"))
|
||||
(teal '("#44b9b1" "#00d7af" "brightgreen"))
|
||||
(yellow '("#ffcb6b" "#ffd700" "brightyellow"))
|
||||
(blue '("#82aaff" "#5fafff" "brightblue"))
|
||||
(dark-blue '("#7986E7" "#d7ffff" "blue"))
|
||||
(magenta '("#c792ea" "#d787d7" "brightmagenta"))
|
||||
(violet '("#bb80b3" "#d787af" "magenta"))
|
||||
(cyan '("#89DDFF" "#5fd7ff" "brightcyan"))
|
||||
(dark-cyan '("#80cbc4" "#00d7af" "cyan"))
|
||||
|
||||
;; face categories -- required for all themes
|
||||
(highlight magenta)
|
||||
(vertical-bar base2)
|
||||
(selection base4)
|
||||
(builtin blue)
|
||||
(comments base5)
|
||||
(doc-comments (doom-lighten base5 0.25))
|
||||
(constants orange)
|
||||
(functions blue)
|
||||
(keywords cyan)
|
||||
(methods blue)
|
||||
(operators cyan)
|
||||
(type magenta)
|
||||
(strings green)
|
||||
(variables yellow)
|
||||
(numbers orange)
|
||||
(region base3)
|
||||
(error red)
|
||||
(warning yellow)
|
||||
(success green)
|
||||
(vc-modified blue)
|
||||
(vc-added green)
|
||||
(vc-deleted red)
|
||||
|
||||
;; custom categories
|
||||
(modeline-bg base2)
|
||||
(modeline-bg-alt (doom-darken bg 0.01))
|
||||
(modeline-fg base8)
|
||||
(modeline-fg-alt comments)
|
||||
|
||||
(-modeline-pad
|
||||
(when doom-palenight-padded-modeline
|
||||
(if (integerp doom-palenight-padded-modeline) doom-palenight-padded-modeline 4))))
|
||||
|
||||
;;;; Base theme face overrides
|
||||
((lazy-highlight :background base4 :foreground fg :weight 'bold)
|
||||
(mode-line
|
||||
:background modeline-bg :foreground modeline-fg
|
||||
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg)))
|
||||
(mode-line-inactive
|
||||
:background modeline-bg-alt :foreground modeline-fg-alt
|
||||
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-alt)))
|
||||
(tooltip :background (doom-darken bg-alt 0.2) :foreground fg)
|
||||
|
||||
;;;; css-mode <built-in> / scss-mode
|
||||
(css-proprietary-property :foreground orange)
|
||||
(css-property :foreground green)
|
||||
(css-selector :foreground blue)
|
||||
;;;; dired-k
|
||||
(dired-k-commited :foreground base4)
|
||||
(dired-k-modified :foreground vc-modified)
|
||||
(dired-k-ignored :foreground cyan)
|
||||
(dired-k-added :foreground vc-added)
|
||||
;;;; doom-modeline
|
||||
(doom-modeline-buffer-path :foreground green :weight 'bold)
|
||||
(doom-modeline-buffer-major-mode :inherit 'doom-modeline-buffer-path)
|
||||
;;;; js2-mode
|
||||
(js2-jsdoc-tag :foreground magenta)
|
||||
(js2-object-property :foreground yellow)
|
||||
(js2-object-property-access :foreground cyan)
|
||||
(js2-function-param :foreground violet)
|
||||
(js2-jsdoc-type :foreground base8)
|
||||
(js2-jsdoc-value :foreground cyan)
|
||||
;;;; man <built-in>
|
||||
(Man-overstrike :inherit 'bold :foreground magenta)
|
||||
(Man-underline :inherit 'underline :foreground blue)
|
||||
;;;; org <built-in>
|
||||
((org-block &override) :background base2)
|
||||
((org-block-background &override) :background base2)
|
||||
((org-block-begin-line &override) :background base2)
|
||||
;;;; rainbow-delimiters
|
||||
(rainbow-delimiters-depth-1-face :foreground magenta)
|
||||
(rainbow-delimiters-depth-2-face :foreground orange)
|
||||
(rainbow-delimiters-depth-3-face :foreground green)
|
||||
(rainbow-delimiters-depth-4-face :foreground cyan)
|
||||
(rainbow-delimiters-depth-5-face :foreground violet)
|
||||
(rainbow-delimiters-depth-6-face :foreground yellow)
|
||||
(rainbow-delimiters-depth-7-face :foreground blue)
|
||||
(rainbow-delimiters-depth-8-face :foreground teal)
|
||||
(rainbow-delimiters-depth-9-face :foreground dark-cyan)
|
||||
;;;; rjsx-mode
|
||||
(rjsx-tag :foreground red)
|
||||
(rjsx-attr :foreground yellow :slant 'italic :weight 'medium)))
|
||||
|
||||
;;; doom-palenight-theme.el ends here
|
||||
@@ -1,306 +0,0 @@
|
||||
;;; soft-charcoal-theme.el --- Theme
|
||||
|
||||
;; Copyright (C) 2023 ,
|
||||
|
||||
;; Author:
|
||||
;; Version: 0.1
|
||||
;; Package-Requires: ((emacs "24.1"))
|
||||
;; Created with ThemeCreator, https://github.com/mswift42/themecreator.
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; This file is not part of Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
;;; soft-charcoal theme created by in 2023
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme soft-charcoal)
|
||||
(let ((class '((class color) (min-colors 89)))
|
||||
(fg1 "#c2c2c2")
|
||||
(fg2 "#b2b2b2")
|
||||
(fg3 "#a3a3a3")
|
||||
(fg4 "#939393")
|
||||
(fg6 "#d1d1d1")
|
||||
(bg1 "#191919")
|
||||
(bg2 "#2b2b2b")
|
||||
(bg3 "#3e3e3e")
|
||||
(bg4 "#505050")
|
||||
(builtin "#54686d")
|
||||
(keyword "#8aa234")
|
||||
(const "#8aa6c1")
|
||||
(comment "#808080")
|
||||
(func "#7a8bbd")
|
||||
(str "#5d90cd")
|
||||
(type "#8aa6c1")
|
||||
(var "#8885b2")
|
||||
(selection "#ff6523")
|
||||
(warning "#ff6523")
|
||||
(warning2 "#ff2370")
|
||||
(unspec (when (>= emacs-major-version 29) 'unspecified)))
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(default ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
`(font-lock-builtin-face ((,class (:foreground ,builtin))))
|
||||
`(font-lock-comment-face ((,class (:foreground ,comment))))
|
||||
`(font-lock-negation-char-face ((,class (:foreground ,const))))
|
||||
`(font-lock-reference-face ((,class (:foreground ,const))))
|
||||
`(font-lock-constant-face ((,class (:foreground ,const))))
|
||||
`(font-lock-doc-face ((,class (:foreground ,comment))))
|
||||
`(font-lock-function-name-face ((,class (:foreground ,func ))))
|
||||
`(font-lock-keyword-face ((,class (:bold ,class :foreground ,keyword))))
|
||||
`(font-lock-string-face ((,class (:foreground ,str))))
|
||||
`(font-lock-type-face ((,class (:foreground ,type ))))
|
||||
`(font-lock-variable-name-face ((,class (:foreground ,var))))
|
||||
`(font-lock-warning-face ((,class (:foreground ,warning :background ,bg2))))
|
||||
`(term-color-black ((,class (:foreground ,fg2 :background ,unspec))))
|
||||
;; `(region ((,class (:background ,fg1 :foreground ,bg1))))
|
||||
`(region ((,class (:background ,selection))))
|
||||
`(highlight ((,class (:foreground ,fg3 :background ,bg3))))
|
||||
`(hl-line ((,class (:background ,bg2))))
|
||||
`(fringe ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(cursor ((,class (:background ,fg4))))
|
||||
`(isearch ((,class (:bold t :foreground ,warning :background ,bg3))))
|
||||
`(mode-line ((,class (:box (:line-width 1 :color nil) :bold t :foreground ,fg4 :background ,bg2))))
|
||||
`(mode-line-inactive ((,class (:box (:line-width 1 :color nil :style pressed-button) :foreground ,var :background ,bg1 :weight normal))))
|
||||
`(mode-line-buffer-id ((,class (:bold t :foreground ,func :background ,unspec))))
|
||||
`(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight bold))))
|
||||
`(mode-line-emphasis ((,class (:foreground ,fg1))))
|
||||
`(vertical-border ((,class (:foreground ,fg3))))
|
||||
`(minibuffer-prompt ((,class (:bold t :foreground ,keyword))))
|
||||
`(default-italic ((,class (:italic t))))
|
||||
`(link ((,class (:foreground ,const :underline t))))
|
||||
`(org-code ((,class (:foreground ,fg2))))
|
||||
`(org-hide ((,class (:foreground ,fg4))))
|
||||
`(org-level-1 ((,class (:bold t :foreground ,fg2 :height 1.1))))
|
||||
`(org-level-2 ((,class (:bold nil :foreground ,fg3))))
|
||||
`(org-level-3 ((,class (:bold t :foreground ,fg4))))
|
||||
`(org-level-4 ((,class (:bold nil :foreground ,bg4))))
|
||||
`(org-date ((,class (:underline t :foreground ,var) )))
|
||||
`(org-footnote ((,class (:underline t :foreground ,fg4))))
|
||||
`(org-link ((,class (:underline t :foreground ,type ))))
|
||||
`(org-special-keyword ((,class (:foreground ,func))))
|
||||
`(org-block ((,class (:foreground ,fg3))))
|
||||
`(org-quote ((,class (:inherit org-block :slant italic))))
|
||||
`(org-verse ((,class (:inherit org-block :slant italic))))
|
||||
`(org-todo ((,class (:box (:line-width 1 :color ,fg3) :foreground ,keyword :bold t))))
|
||||
`(org-done ((,class (:box (:line-width 1 :color ,bg3) :bold t :foreground ,bg4))))
|
||||
`(org-warning ((,class (:underline t :foreground ,warning))))
|
||||
`(org-agenda-structure ((,class (:weight bold :foreground ,fg3 :box (:color ,fg4) :background ,bg3))))
|
||||
`(org-agenda-date ((,class (:foreground ,var :height 1.1 ))))
|
||||
`(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4))))
|
||||
`(org-agenda-date-today ((,class (:weight bold :foreground ,keyword :height 1.4))))
|
||||
`(org-agenda-done ((,class (:foreground ,bg4))))
|
||||
`(org-scheduled ((,class (:foreground ,type))))
|
||||
`(org-scheduled-today ((,class (:foreground ,func :weight bold :height 1.2))))
|
||||
`(org-ellipsis ((,class (:foreground ,builtin))))
|
||||
`(org-verbatim ((,class (:foreground ,fg4))))
|
||||
`(org-document-info-keyword ((,class (:foreground ,func))))
|
||||
`(font-latex-bold-face ((,class (:foreground ,type))))
|
||||
`(font-latex-italic-face ((,class (:foreground ,var :italic t))))
|
||||
`(font-latex-string-face ((,class (:foreground ,str))))
|
||||
`(font-latex-match-reference-keywords ((,class (:foreground ,const))))
|
||||
`(font-latex-match-variable-keywords ((,class (:foreground ,var))))
|
||||
`(ido-only-match ((,class (:foreground ,warning))))
|
||||
`(org-sexp-date ((,class (:foreground ,fg4))))
|
||||
`(ido-first-match ((,class (:foreground ,keyword :bold t))))
|
||||
`(ivy-current-match ((,class (:foreground ,fg3 :inherit highlight :underline t))))
|
||||
`(gnus-header-content ((,class (:foreground ,keyword))))
|
||||
`(gnus-header-from ((,class (:foreground ,var))))
|
||||
`(gnus-header-name ((,class (:foreground ,type))))
|
||||
`(gnus-header-subject ((,class (:foreground ,func :bold t))))
|
||||
`(mu4e-view-url-number-face ((,class (:foreground ,type))))
|
||||
`(mu4e-cited-1-face ((,class (:foreground ,fg2))))
|
||||
`(mu4e-cited-7-face ((,class (:foreground ,fg3))))
|
||||
`(mu4e-header-marks-face ((,class (:foreground ,type))))
|
||||
`(ffap ((,class (:foreground ,fg4))))
|
||||
`(js2-private-function-call ((,class (:foreground ,const))))
|
||||
`(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str))))
|
||||
`(js2-jsdoc-html-tag-name ((,class (:foreground ,var))))
|
||||
`(js2-external-variable ((,class (:foreground ,type ))))
|
||||
`(js2-function-param ((,class (:foreground ,const))))
|
||||
`(js2-jsdoc-value ((,class (:foreground ,str))))
|
||||
`(js2-private-member ((,class (:foreground ,fg3))))
|
||||
`(js3-warning-face ((,class (:underline ,keyword))))
|
||||
`(js3-error-face ((,class (:underline ,warning))))
|
||||
`(js3-external-variable-face ((,class (:foreground ,var))))
|
||||
`(js3-function-param-face ((,class (:foreground ,fg2))))
|
||||
`(js3-jsdoc-tag-face ((,class (:foreground ,keyword))))
|
||||
`(js3-instance-member-face ((,class (:foreground ,const))))
|
||||
`(warning ((,class (:foreground ,warning))))
|
||||
`(ac-completion-face ((,class (:underline t :foreground ,keyword))))
|
||||
`(info-quoted-name ((,class (:foreground ,builtin))))
|
||||
`(info-string ((,class (:foreground ,str))))
|
||||
`(icompletep-determined ((,class :foreground ,builtin)))
|
||||
`(undo-tree-visualizer-current-face ((,class :foreground ,builtin)))
|
||||
`(undo-tree-visualizer-default-face ((,class :foreground ,fg2)))
|
||||
`(undo-tree-visualizer-unmodified-face ((,class :foreground ,var)))
|
||||
`(undo-tree-visualizer-register-face ((,class :foreground ,type)))
|
||||
`(slime-repl-inputed-output-face ((,class (:foreground ,type))))
|
||||
`(trailing-whitespace ((,class :foreground ,unspec :background ,warning)))
|
||||
`(rainbow-delimiters-depth-1-face ((,class :foreground ,fg1)))
|
||||
`(rainbow-delimiters-depth-2-face ((,class :foreground ,type)))
|
||||
`(rainbow-delimiters-depth-3-face ((,class :foreground ,var)))
|
||||
`(rainbow-delimiters-depth-4-face ((,class :foreground ,const)))
|
||||
`(rainbow-delimiters-depth-5-face ((,class :foreground ,keyword)))
|
||||
`(rainbow-delimiters-depth-6-face ((,class :foreground ,fg1)))
|
||||
`(rainbow-delimiters-depth-7-face ((,class :foreground ,type)))
|
||||
`(rainbow-delimiters-depth-8-face ((,class :foreground ,var)))
|
||||
`(magit-item-highlight ((,class :background ,bg3)))
|
||||
`(magit-section-heading ((,class (:foreground ,keyword :weight bold))))
|
||||
`(magit-hunk-heading ((,class (:background ,bg3))))
|
||||
`(magit-section-highlight ((,class (:background ,bg2))))
|
||||
`(magit-hunk-heading-highlight ((,class (:background ,bg3))))
|
||||
`(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3))))
|
||||
`(magit-diffstat-added ((,class (:foreground ,type))))
|
||||
`(magit-diffstat-removed ((,class (:foreground ,var))))
|
||||
`(magit-process-ok ((,class (:foreground ,func :weight bold))))
|
||||
`(magit-process-ng ((,class (:foreground ,warning :weight bold))))
|
||||
`(magit-branch ((,class (:foreground ,const :weight bold))))
|
||||
`(magit-log-author ((,class (:foreground ,fg3))))
|
||||
`(magit-hash ((,class (:foreground ,fg2))))
|
||||
`(magit-diff-file-header ((,class (:foreground ,fg2 :background ,bg3))))
|
||||
`(lazy-highlight ((,class (:foreground ,fg2 :background ,bg3))))
|
||||
`(term ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(term-color-black ((,class (:foreground ,bg3 :background ,bg3))))
|
||||
`(term-color-blue ((,class (:foreground ,func :background ,func))))
|
||||
`(term-color-red ((,class (:foreground ,keyword :background ,bg3))))
|
||||
`(term-color-green ((,class (:foreground ,type :background ,bg3))))
|
||||
`(term-color-yellow ((,class (:foreground ,var :background ,var))))
|
||||
`(term-color-magenta ((,class (:foreground ,builtin :background ,builtin))))
|
||||
`(term-color-cyan ((,class (:foreground ,str :background ,str))))
|
||||
`(term-color-white ((,class (:foreground ,fg2 :background ,fg2))))
|
||||
`(rainbow-delimiters-unmatched-face ((,class :foreground ,warning)))
|
||||
`(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil))))
|
||||
`(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight bold))))
|
||||
`(helm-selection ((,class (:background ,bg2 :underline nil))))
|
||||
`(helm-selection-line ((,class (:background ,bg2))))
|
||||
`(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3))))
|
||||
`(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1))))
|
||||
`(helm-separator ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1))))
|
||||
`(helm-time-zone-home ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1))))
|
||||
`(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight bold))))
|
||||
`(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal))))
|
||||
`(helm-ff-executable ((,class (:foreground ,var :background ,bg1 :weight normal))))
|
||||
`(helm-ff-invalid-symlink ((,class (:foreground ,warning2 :background ,bg1 :weight bold))))
|
||||
`(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight bold))))
|
||||
`(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal))))
|
||||
`(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1))))
|
||||
`(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-match ((,class (:foreground ,unspec :background ,unspec :inherit helm-match))))
|
||||
`(helm-grep-running ((,class (:foreground ,func :background ,bg1))))
|
||||
`(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1))))
|
||||
`(helm-source-go-package-godoc-description ((,class (:foreground ,str))))
|
||||
`(helm-bookmark-w3m ((,class (:foreground ,type))))
|
||||
`(company-echo-common ((,class (:foreground ,bg1 :background ,fg1))))
|
||||
`(company-preview ((,class (:background ,bg1 :foreground ,var))))
|
||||
`(company-preview-common ((,class (:foreground ,bg2 :foreground ,fg3))))
|
||||
`(company-preview-search ((,class (:foreground ,type :background ,bg1))))
|
||||
`(company-scrollbar-bg ((,class (:background ,bg3))))
|
||||
`(company-scrollbar-fg ((,class (:foreground ,keyword))))
|
||||
`(company-tooltip ((,class (:foreground ,fg2 :background ,bg2 :bold t))))
|
||||
`(company-tooltop-annotation ((,class (:foreground ,const))))
|
||||
`(company-tooltip-common ((,class ( :foreground ,fg3))))
|
||||
`(company-tooltip-common-selection ((,class (:foreground ,str))))
|
||||
`(company-tooltip-mouse ((,class (:inherit highlight))))
|
||||
`(company-tooltip-selection ((,class (:background ,bg3 :foreground ,fg3))))
|
||||
`(company-template-field ((,class (:inherit region))))
|
||||
`(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face))))
|
||||
`(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face))))
|
||||
`(web-mode-keyword-face ((,class (:foreground ,keyword))))
|
||||
`(web-mode-doctype-face ((,class (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face))))
|
||||
`(web-mode-string-face ((,class (:foreground ,str))))
|
||||
`(web-mode-type-face ((,class (:inherit ,font-lock-type-face))))
|
||||
`(web-mode-html-attr-name-face ((,class (:foreground ,func))))
|
||||
`(web-mode-html-attr-value-face ((,class (:foreground ,keyword))))
|
||||
`(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face))))
|
||||
`(web-mode-html-tag-face ((,class (:foreground ,builtin))))
|
||||
`(jde-java-font-lock-package-face ((t (:foreground ,var))))
|
||||
`(jde-java-font-lock-public-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-private-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-constant-face ((t (:foreground ,const))))
|
||||
`(jde-java-font-lock-modifier-face ((t (:foreground ,fg2))))
|
||||
`(jde-jave-font-lock-protected-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-number-face ((t (:foreground ,var))))
|
||||
`(yas-field-highlight-face ((t (:background ,selection)))))
|
||||
;; Legacy
|
||||
(if (< emacs-major-version 22)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(show-paren-match-face ((,class (:background ,warning))))) ;; obsoleted in 22.1, removed 2016
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(show-paren-match ((,class (:foreground ,bg1 :background ,str))))
|
||||
`(show-paren-mismatch ((,class (:foreground ,bg1 :background ,warning))))))
|
||||
;; emacs >= 26.1
|
||||
(when (>= emacs-major-version 26)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(line-number ((t (:inherit fringe))))
|
||||
`(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
|
||||
|
||||
;; emacs >= 27.1
|
||||
(when (>= emacs-major-version 27)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab ((,class (:inherit tab-line))))
|
||||
`(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
|
||||
(when (>= emacs-major-version 28)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(line-number ((t (:inherit fringe))))
|
||||
`(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
|
||||
;; emacs >= 27.1
|
||||
(when (>= emacs-major-version 27)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab ((,class (:inherit tab-line))))
|
||||
`(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
|
||||
`(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
|
||||
(when (>= emacs-major-version 28)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(tab-line-tab-modified ((,class (:foreground ,warning2 :weight bold))))))
|
||||
(when (boundp 'font-lock-regexp-face)
|
||||
(custom-theme-set-faces
|
||||
'soft-charcoal
|
||||
`(font-lock-regexp-face ((,class (:inherit font-lock-string-face :underline t)))))))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'soft-charcoal)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
||||
;;; soft-charcoal-theme.el ends here
|
||||
@@ -1,34 +0,0 @@
|
||||
# The syntax is "key = value". The whitespace around the equals doesn't matter.
|
||||
|
||||
keybind = ctrl+shift+w=close_surface
|
||||
keybind = ctrl+t=new_tab
|
||||
keybind = ctrl+tab=next_tab
|
||||
keybind = ctrl+shift+tab=previous_tab
|
||||
keybind = ctrl+shift+n=new_window
|
||||
keybind = ctrl+shift+o=ignore
|
||||
|
||||
# Window Stuff
|
||||
background-opacity=0.9
|
||||
confirm-close-surface = false
|
||||
window-theme = dark
|
||||
window-decoration = false
|
||||
|
||||
# Linux Specific
|
||||
gtk-wide-tabs = true
|
||||
|
||||
# MacOS Specific
|
||||
#macos-non-native-fullscreen = true
|
||||
|
||||
# Font
|
||||
font-size = 16
|
||||
font-family = Kelmscott Mono
|
||||
|
||||
# Theme
|
||||
theme = Obsidian
|
||||
# theme = Relaxed
|
||||
|
||||
# Cursor And Mouse
|
||||
cursor-style = block
|
||||
cursor-color = #ffffff
|
||||
mouse-hide-while-typing = true
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
general {
|
||||
after_sleep_cmd=hyprctl dispatch dpms on
|
||||
before_sleep_cmd=loginctl lock-session
|
||||
lock_cmd=pidof hyprlock || hyprlock
|
||||
}
|
||||
|
||||
listeners {
|
||||
on-resume=brightnessctl -r
|
||||
on-timeout=brightnessctl -s set 10
|
||||
timeout=120
|
||||
}
|
||||
|
||||
listeners {
|
||||
on-resume=brightnessctl -rd rgb:kbd_backlight
|
||||
on-timeout=brightnessctl -sd rgb:kbd_backlight set 0
|
||||
timeout=120
|
||||
}
|
||||
|
||||
listeners {
|
||||
on-timeout=loginctl lock-session
|
||||
timeout=180
|
||||
}
|
||||
|
||||
listeners {
|
||||
on-resume=hyprctl dispatch dpms on
|
||||
on-timeout=hyprctl dispatch dpms off
|
||||
timeout=300
|
||||
}
|
||||
|
||||
listeners {
|
||||
on-timeout=systemctl suspend
|
||||
timeout=300
|
||||
}
|
||||
@@ -1,294 +0,0 @@
|
||||
# Startup
|
||||
exec-once = dbus-update-activation-environment --systemd --all && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
|
||||
exec-once=wl-clipboard-history -t
|
||||
exec-once=wl-paste -p --watch wl-copy -p ''
|
||||
exec-once=nm-applet
|
||||
exec-once=fcitx5 -d
|
||||
exec-once=blueman-applet
|
||||
exec-once=waybar
|
||||
|
||||
# Monitors
|
||||
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
monitor=HDMI-A-1,2550x1440@144,auto,1,mirror,eDP-1
|
||||
monitor=,preferred,auto,1,mirror,eDP-1
|
||||
|
||||
# Environment
|
||||
|
||||
env=WLR_NO_HARDWARE_CURSORS,1
|
||||
env=HYPRCURSOR_THEME,Bibata-Modern-Ice
|
||||
env=HYPRCURSOR_SIZE,24
|
||||
env=XDG_CURRENT_DESKTOP,Hyprland
|
||||
env=XDG_SESSION_TYPE,wayland
|
||||
env=XDG_SESSION_DESKTOP,Hyprland
|
||||
env=GTK_THEME,Materia-dark
|
||||
env=QT_QPA_PLATFORM,xcb;Hyprland
|
||||
env=XCURSOR_THEME,Bibata-Modern-Ice
|
||||
env=XCURSOR_SIZE,24
|
||||
|
||||
animations {
|
||||
bezier=myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
animation=windows, 1, 7, myBezier
|
||||
animation=windowsOut, 1, 7, default, popin 80%
|
||||
animation=border, 1, 10, default
|
||||
animation=borderangle, 1, 8, default
|
||||
animation=fade, 1, 7, default
|
||||
animation=workspaces, 1, 6, default
|
||||
enabled=true
|
||||
}
|
||||
|
||||
debug {
|
||||
disable_logs=true
|
||||
}
|
||||
|
||||
decoration {
|
||||
blur {
|
||||
enabled=true
|
||||
new_optimizations=on
|
||||
passes=1
|
||||
size=3
|
||||
xray=true
|
||||
}
|
||||
|
||||
shadow {
|
||||
color=rgba(1a1a1aee)
|
||||
enabled=true
|
||||
range=4
|
||||
render_power=3
|
||||
}
|
||||
rounding=10
|
||||
}
|
||||
|
||||
dwindle {
|
||||
preserve_split=true
|
||||
pseudotile=true
|
||||
}
|
||||
|
||||
ecosystem {
|
||||
no_donation_nag=true
|
||||
no_update_news=true
|
||||
}
|
||||
|
||||
experimental {
|
||||
xx_color_management_v4=true
|
||||
}
|
||||
|
||||
$purple=rgba(881798FF)
|
||||
$crimson=rgba(471520FF)
|
||||
|
||||
general {
|
||||
border_size=2
|
||||
col.active_border=$purple
|
||||
col.inactive_border=$crimson
|
||||
gaps_in=2
|
||||
gaps_out=4
|
||||
layout=dwindle
|
||||
}
|
||||
|
||||
gestures {
|
||||
workspace_swipe=true
|
||||
workspace_swipe_forever=true
|
||||
}
|
||||
|
||||
input {
|
||||
touchpad {
|
||||
disable_while_typing=true
|
||||
drag_lock=false
|
||||
middle_button_emulation=true
|
||||
natural_scroll=true
|
||||
scroll_factor=0.500000
|
||||
tap-to-click=true
|
||||
}
|
||||
follow_mouse=1
|
||||
kb_layout=us
|
||||
kb_model=
|
||||
kb_options=
|
||||
kb_rules=
|
||||
kb_variant=
|
||||
numlock_by_default=true
|
||||
sensitivity=0
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo=false
|
||||
disable_splash_rendering=false
|
||||
key_press_enables_dpms=true
|
||||
mouse_move_enables_dpms=true
|
||||
}
|
||||
|
||||
# Window Rules
|
||||
|
||||
windowrule=idleinhibit fullscreen, class:firefox
|
||||
windowrule=idleinhibit fullscreen, class:floorp
|
||||
windowrule=idleinhibit fullscreen, class:ghostty
|
||||
windowrule=idleinhibit focus, class:firefox
|
||||
windowrule=idleinhibit focus, class:floorp
|
||||
windowrule=idleinhibit focus, class:mpv
|
||||
windowrule=idleinhibit focus, class:^(emacs)$
|
||||
windowrule=idleinhibit focus, class:^(Emacs)$
|
||||
windowrule=idleinhibit focus, class:^(discord)$
|
||||
windowrule=idleinhibit focus, class:^(Discord)$
|
||||
windowrule=idleinhibit focus, class:^(spotify)$
|
||||
windowrule=float, class:polkit-kde-authentication-agent-1
|
||||
windowrule=float, class:^(praat)$
|
||||
windowrule=float, class:^(network)$
|
||||
windowrule=float, class:^(nm-)$
|
||||
windowrule=float, class:^(Network)$
|
||||
windowrule=float, class:Rofi
|
||||
windowrule=float, class:Gimp
|
||||
windowrule=float, class:Nautilus
|
||||
windowrule=float, class:notification
|
||||
windowrule=float, class:^(launcher)$
|
||||
windowrule=tile, class:Spotify
|
||||
windowrule=tile, title:Minecraft
|
||||
windowrule=workspace 2, class:KeePassXC
|
||||
windowrule=workspace 3, class:firefox
|
||||
windowrule=workspace 3, class:floorp
|
||||
windowrule=workspace 4, class:Spotify
|
||||
windowrule=workspace 6, class:discord
|
||||
windowrule=workspace 6, class:Signal
|
||||
windowrule=workspace 10, title:Minecraft
|
||||
|
||||
# Binds
|
||||
|
||||
$altMod=ALT
|
||||
$ctrlMod=CTRL
|
||||
$lock=hyprlock
|
||||
$mainMod=SUPER
|
||||
$screenshotarea=hyprctl keyword animation 'fadeOut,0,0,default'; grimblast --notify copy area; hyprctl keyword animation 'fadeOut,1,4,default'
|
||||
|
||||
# Binds :: Programs
|
||||
|
||||
bind=$altMod, Return, exec, ghostty
|
||||
bind=$altMod SHIFT, Return, exec, alacritty
|
||||
bind=$mainMod SHIFT, D, exec, discord --enable-blink-features=MiddleClickAutoscroll
|
||||
bind=$mainMod SHIFT, E, exec, emacsclient -c -a 'emacs'
|
||||
bind=$mainMode SHIFT, F, exec, focus-linux
|
||||
bind=$mainMod, SPACE, exec, pkill wofi || wofi
|
||||
bind=$mainMod, E, exec, nautilus
|
||||
bind=$mainMod, S, exec, spotify
|
||||
bind=$mainMod, P, exec, hyprpicker -a -f hex
|
||||
bind=, Print, exec, $screenshotarea
|
||||
bind=SHIFT, Print, exec, grimblast --notify --cursor copy output
|
||||
bind=$mainMod SHIFT, P, pseudo,
|
||||
bind=$mainMod, C, killactive,
|
||||
bind=$mainMod control, Q, exec, $lock
|
||||
bind=$mainMod, F4, exit,
|
||||
bind=$mainMod, V, togglefloating,
|
||||
bind=$mainMod SHIFT, S, togglesplit,
|
||||
|
||||
# Binds :: Navigation
|
||||
|
||||
bind=$mainMod, F, fullscreen,
|
||||
bind=$mainMod, H, movefocus, l
|
||||
bind=$mainMod, L, movefocus, r
|
||||
bind=$mainMod, K, movefocus, u
|
||||
bind=$mainMod, J, movefocus, d
|
||||
bind=$mainMod, comma, focusmonitor, -1
|
||||
bind=$mainMod, period, focusmonitor, +1
|
||||
bind=$mainMod SHIFT, H, movewindow, l
|
||||
bind=$mainMod SHIFT, L, movewindow, r
|
||||
bind=$mainMod SHIFT, K, movewindow, u
|
||||
bind=$mainMod SHIFT, J, movewindow, d
|
||||
bind=$mainMod SHIFT, comma, movecurrentworkspacetomonitor, -1
|
||||
bind=$mainMod SHIFT, period, movecurrentworkspacetomonitor, +1
|
||||
bind=$mainMod, right, resizeactive, 10 0
|
||||
bind=$mainMod, left, resizeactive, -10 0
|
||||
bind=$mainMod, up, resizeactive, 0 -10
|
||||
bind=$mainMod, down, resizeactive, 0 10
|
||||
bind=$mainMod, 1, workspace, 1
|
||||
bind=$mainMod, 2, workspace, 2
|
||||
bind=$mainMod, 3, workspace, 3
|
||||
bind=$mainMod, 4, workspace, 4
|
||||
bind=$mainMod, 5, workspace, 5
|
||||
bind=$mainMod, 6, workspace, 6
|
||||
bind=$mainMod, 7, workspace, 7
|
||||
bind=$mainMod, 8, workspace, 8
|
||||
bind=$mainMod, 9, workspace, 9
|
||||
bind=$mainMod, 0, workspace, 10
|
||||
bind=$mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind=$mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind=$mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind=$mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind=$mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind=$mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind=$mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind=$mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind=$mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind=$mainMod SHIFT, 0, movetoworkspace, 10
|
||||
bind=$mainMod SHIFT CTRL, right, movetoworkspace, +1
|
||||
bind=$mainMod SHIFT CTRL, left, movetoworkspace, -1
|
||||
bind=$mainMod, mouse_down, workspace, e+1
|
||||
bind=$mainMod, mouse_up, workspace, e-1
|
||||
bind=$mainMod, Tab, workspace, e+1
|
||||
bind=$mainMod SHIFT, Tab, workspace, e-1
|
||||
bind=$mainMod CTRL, right, workspace, +1
|
||||
bind=$mainMod CTRL, left, workspace, -1
|
||||
|
||||
bindm=$mainMod, mouse:272, movewindow
|
||||
bindm=$mainMod, mouse:273, resizewindow
|
||||
|
||||
# Binds :: MultiMedia
|
||||
|
||||
binde=, XF86MonBrightnessDown, exec, brightnessctl set 10%- && $HOME/personal/nixos/modules/scripts/progress-notify.sh brightness
|
||||
binde=, XF86MonBrightnessUp, exec, brightnessctl set 10%+ && $HOME/personal/nixos/modules/scripts/progress-notify.sh brightness
|
||||
bindel=, XF86AudioRaiseVolume, exec, pamixer -i 5 && $HOME/personal/nixos/modules/scripts/progress-notify.sh audio
|
||||
bindel=, XF86AudioLowerVolume, exec, pamixer -d 5 && $HOME/personal/nixos/modules/scripts/progress-notify.sh audio
|
||||
bindel=, XF86AudioMute, exec, pamixer -t && $HOME/personal/nixos/modules/scripts/progress-notify.sh mute
|
||||
bindl=, XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl=, XF86AudioNext, exec, playerctl next
|
||||
bindl=, XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
# Binds :: Submaps
|
||||
|
||||
bind = $mainMod, R, submap, resize
|
||||
submap = resize
|
||||
bind=, escape,submap,reset
|
||||
|
||||
binde=, left, resizeactive, -10 0
|
||||
bindr=, left, submap, reset
|
||||
binde=, right, resizeactive, 10 0
|
||||
bindr=, right, submap, reset
|
||||
binde=, up, resizeactive, 0 10
|
||||
bindr=, up, submap, reset
|
||||
binde=, down, resizeactive, 0 -10
|
||||
bindr=, down, submap, reset
|
||||
|
||||
binde=, H, resizeactive, -10 0
|
||||
bindr=, H, submap, reset
|
||||
binde=, J, resizeactive, 0 -10
|
||||
bindr=, J, submap, reset
|
||||
binde=, K, resizeactive, 0 10
|
||||
bindr=, K, submap, reset
|
||||
binde=, L, resizeactive, 10 0
|
||||
bindr=, L, submap, reset
|
||||
|
||||
submap=reset
|
||||
|
||||
bind = $mainMod, B, submap, browser_select
|
||||
submap = browser_select
|
||||
|
||||
bind =, B, exec, brave
|
||||
bind =, B, submap, reset
|
||||
|
||||
bind = SHIFT, F, exec, firefox
|
||||
bind = SHIFT, F, submap, reset
|
||||
|
||||
bind =, F, exec, floorp
|
||||
bind =, F, submap, reset
|
||||
|
||||
bind =, C, exec, floorp -p limalone -no-remote
|
||||
bind =, C, submap, reset
|
||||
|
||||
bind=, escape,submap,reset
|
||||
submap=reset
|
||||
|
||||
bind = $mainMod SHIFT, V, submap, video_stuff
|
||||
submap = video_stuff
|
||||
bind = , O, exec, obs
|
||||
bind = , O, submap, reset
|
||||
bind = , V, exec , kdenlive
|
||||
bind = , V, submap, reset
|
||||
|
||||
bind=, escape,submap,reset
|
||||
submap = reset
|
||||
@@ -1,65 +0,0 @@
|
||||
background {
|
||||
blur_passes=2
|
||||
blur_size=8
|
||||
path=$HOME/pictures/.wallpapers/bloody_snow.jpg
|
||||
}
|
||||
|
||||
general {
|
||||
disable_loading_bar=true
|
||||
hide_cursor=true
|
||||
no_fade_in=false
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor=
|
||||
size=200, 30
|
||||
capslock_color=#bb00ee
|
||||
check_color=#0eff0d
|
||||
dots_center=false
|
||||
dots_size=0.330000
|
||||
dots_spacing=0.150000
|
||||
fade_on_empty=true
|
||||
fail_color=#ff009e
|
||||
fail_text=<i>$FAIL <b>($ATTEMPTS)</b></i>
|
||||
font_color=#efefef
|
||||
inner_color=#0c0c0c
|
||||
outer_color=#fe0b00
|
||||
outline_thickness=3
|
||||
placeholder_text=<i>Enter Password...</i>
|
||||
}
|
||||
|
||||
label {
|
||||
monitor=
|
||||
color=#ffffee
|
||||
font_family=DejaVu Sans
|
||||
font_size=28
|
||||
halign=center
|
||||
position=0, 80
|
||||
text=$TIME
|
||||
text_align=center
|
||||
valign=center
|
||||
}
|
||||
|
||||
label {
|
||||
monitor=
|
||||
color=#ffffee
|
||||
font_family=DejaVu Sans
|
||||
font_size=18
|
||||
halign=left
|
||||
position=80, 80
|
||||
text=cmd[update:1000] echo " <span foreground='##ffffee'>$(date +'%A, %b %d %Y')</span>"
|
||||
text_align=center
|
||||
valign=bottom
|
||||
}
|
||||
|
||||
label {
|
||||
monitor=
|
||||
color=#ffffee
|
||||
font_family=DejaVu Sans
|
||||
font_size=18
|
||||
halign=right
|
||||
position=80, 80
|
||||
text=cmd[update:1000] echo "<span foreground='##feffee'>$(cat /sys/class/power_supply/BAT0/capacity)</span>"
|
||||
text_align=center
|
||||
valign=bottom
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
ipc=on
|
||||
preload=$HOME/pictures/.wallpapers/skyline-view.png
|
||||
preload=$HOME/pictures/.wallpapers/iceland-winter-mountains.jpg
|
||||
splash=false
|
||||
wallpaper=eDP-1,$HOME/pictures/.wallpapers/iceland-winter-mountains.jpg
|
||||
@@ -1,46 +0,0 @@
|
||||
# vim:ft=kitty
|
||||
|
||||
## name: Campbell
|
||||
## author: Microsoft
|
||||
## blurb: The default theme of Microsoft's terminals, including Windows Terminal and cmd.
|
||||
|
||||
# The basic colors
|
||||
foreground #cccccc
|
||||
background #0c0c0c
|
||||
selection_background #ffffff
|
||||
|
||||
# Cursor colors
|
||||
cursor #ffffff
|
||||
|
||||
# The basic 16 colors
|
||||
# black
|
||||
color0 #0c0c0c
|
||||
color8 #767676
|
||||
|
||||
# red
|
||||
color1 #c50f1f
|
||||
color9 #e74856
|
||||
|
||||
# green
|
||||
color2 #13a10e
|
||||
color10 #16c60c
|
||||
|
||||
# yellow
|
||||
color3 #f19c00
|
||||
color11 #f9f1a5
|
||||
|
||||
# blue
|
||||
color4 #0037da
|
||||
color12 #3b78ff
|
||||
|
||||
# magenta
|
||||
color5 #881798
|
||||
color13 #b4009e
|
||||
|
||||
# cyan
|
||||
color6 #3a96dd
|
||||
color14 #61d6d6
|
||||
|
||||
# white
|
||||
color7 #cccccc
|
||||
color15 #f2f2f2
|
||||
@@ -1,7 +0,0 @@
|
||||
background_opacity 0.8
|
||||
font_size 14.0
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
# Campbell
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
||||
@@ -1,7 +0,0 @@
|
||||
background_opacity 0.8
|
||||
font_size 14.0
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
# Rosé Pine Moon
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
||||
@@ -1,12 +0,0 @@
|
||||
local default_color = "sonokai"
|
||||
|
||||
function ColorMyTerminal(color)
|
||||
color = color or default_color
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
vim.cmd("hi ColorColumn ctermbg=0 guibg=purple")
|
||||
vim.api.nvim_set_hl(0, "Normal", {bg = "none"})
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", {bg = "none"})
|
||||
end
|
||||
|
||||
vim.cmd.colorscheme(default_color)
|
||||
@@ -1,105 +0,0 @@
|
||||
local dapui = require('dapui')
|
||||
local dap = require("dap")
|
||||
|
||||
-- DAP UI setup
|
||||
dapui.setup()
|
||||
|
||||
-- Basic DAP UI event listeners
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
-- DAP for C
|
||||
|
||||
dap.adapters.gdb = {
|
||||
type = "executable",
|
||||
command = "gdb",
|
||||
args = { "--interpreter=dap", "--eval-command", "set print pretty on" }
|
||||
}
|
||||
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = 'lldb-dap',
|
||||
name = 'lldb'
|
||||
}
|
||||
|
||||
dap.configurations.c = {
|
||||
{
|
||||
name = "Launch",
|
||||
type = "gdb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
},
|
||||
{
|
||||
name = "Select and attach to process",
|
||||
type = "gdb",
|
||||
request = "attach",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
pid = function()
|
||||
local name = vim.fn.input('Executable name (filter): ')
|
||||
return require("dap.utils").pick_process({ filter = name })
|
||||
end,
|
||||
cwd = '${workspaceFolder}'
|
||||
},
|
||||
{
|
||||
name = 'Attach to process',
|
||||
type = 'gdb',
|
||||
request = 'attach',
|
||||
pid = function ()
|
||||
return vim.fn.input('Enter PID: ')
|
||||
end,
|
||||
args = {},
|
||||
},
|
||||
{
|
||||
name = 'Attach to gdbserver :1234',
|
||||
type = 'gdb',
|
||||
request = 'attach',
|
||||
target = 'localhost:1234',
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}'
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.zig = {
|
||||
{
|
||||
name = "Debug Zig Executable",
|
||||
type = "lldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/zig-out/bin/', 'file')
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
args = {},
|
||||
stopOnEntry = false,
|
||||
},
|
||||
{
|
||||
name = 'Attach to Zig Process',
|
||||
type = 'lldb',
|
||||
request = 'attach',
|
||||
pid = require('dap.ui.widgets').hover,
|
||||
args = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- DAP Keybinds
|
||||
vim.keymap.set('n', '<F5>', function() dap.continue() end)
|
||||
vim.keymap.set('n', '<F10>', function() dap.step_over() end)
|
||||
vim.keymap.set('n', '<F11>', function() dap.step_into() end)
|
||||
vim.keymap.set('n', '<F12>', function() dap.step_out() end)
|
||||
vim.keymap.set('n', '<Leader>bp', function() dap.toggle_breakpoint() end)
|
||||
vim.keymap.set('n', '<Leader>dr', function() dap.repl.open() end)
|
||||
|
||||
@@ -1,221 +0,0 @@
|
||||
-- Eviline config for lualine
|
||||
-- Author: shadmansaleh
|
||||
-- Credit: glepnir
|
||||
local lualine = require('lualine')
|
||||
|
||||
-- Color table for highlights
|
||||
-- stylua: ignore
|
||||
local colors = {
|
||||
bg = '#202328',
|
||||
fg = '#bbc2cf',
|
||||
yellow = '#ECBE7B',
|
||||
cyan = '#008080',
|
||||
darkblue = '#081633',
|
||||
green = '#98be65',
|
||||
orange = '#FF8800',
|
||||
violet = '#a9a1e1',
|
||||
magenta = '#c678dd',
|
||||
blue = '#51afef',
|
||||
red = '#ec5f67',
|
||||
}
|
||||
|
||||
local conditions = {
|
||||
buffer_not_empty = function()
|
||||
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
|
||||
end,
|
||||
hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 80
|
||||
end,
|
||||
check_git_workspace = function()
|
||||
local filepath = vim.fn.expand('%:p:h')
|
||||
local gitdir = vim.fn.finddir('.git', filepath .. ';')
|
||||
return gitdir and #gitdir > 0 and #gitdir < #filepath
|
||||
end,
|
||||
}
|
||||
|
||||
-- Config
|
||||
local config = {
|
||||
options = {
|
||||
-- Disable sections and component separators
|
||||
component_separators = '',
|
||||
section_separators = '',
|
||||
theme = {
|
||||
-- We are going to use lualine_c an lualine_x as left and
|
||||
-- right section. Both are highlighted by c theme . So we
|
||||
-- are just setting default looks o statusline
|
||||
normal = { c = { fg = colors.fg, bg = colors.bg } },
|
||||
inactive = { c = { fg = colors.fg, bg = colors.bg } },
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
-- these are to remove the defaults
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
-- These will be filled later
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
},
|
||||
inactive_sections = {
|
||||
-- these are to remove the defaults
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
},
|
||||
}
|
||||
|
||||
-- Inserts a component in lualine_c at left section
|
||||
local function ins_left(component)
|
||||
table.insert(config.sections.lualine_c, component)
|
||||
end
|
||||
|
||||
-- Inserts a component in lualine_x at right section
|
||||
local function ins_right(component)
|
||||
table.insert(config.sections.lualine_x, component)
|
||||
end
|
||||
|
||||
ins_left {
|
||||
function()
|
||||
return '▊'
|
||||
end,
|
||||
color = { fg = colors.blue }, -- Sets highlighting of component
|
||||
padding = { left = 0, right = 1 }, -- We don't need space before this
|
||||
}
|
||||
|
||||
ins_left {
|
||||
-- mode component
|
||||
function()
|
||||
return ''
|
||||
end,
|
||||
color = function()
|
||||
-- auto change color according to neovims mode
|
||||
local mode_color = {
|
||||
n = colors.red,
|
||||
i = colors.green,
|
||||
v = colors.blue,
|
||||
[''] = colors.blue,
|
||||
V = colors.blue,
|
||||
c = colors.magenta,
|
||||
no = colors.red,
|
||||
s = colors.orange,
|
||||
S = colors.orange,
|
||||
[''] = colors.orange,
|
||||
ic = colors.yellow,
|
||||
R = colors.violet,
|
||||
Rv = colors.violet,
|
||||
cv = colors.red,
|
||||
ce = colors.red,
|
||||
r = colors.cyan,
|
||||
rm = colors.cyan,
|
||||
['r?'] = colors.cyan,
|
||||
['!'] = colors.red,
|
||||
t = colors.red,
|
||||
}
|
||||
return { fg = mode_color[vim.fn.mode()] }
|
||||
end,
|
||||
padding = { right = 1 },
|
||||
}
|
||||
|
||||
ins_left {
|
||||
-- filesize component
|
||||
'filesize',
|
||||
cond = conditions.buffer_not_empty,
|
||||
}
|
||||
|
||||
ins_left {
|
||||
'filename',
|
||||
cond = conditions.buffer_not_empty,
|
||||
color = { fg = colors.magenta, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_left { 'location' }
|
||||
|
||||
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
|
||||
|
||||
ins_left {
|
||||
'diagnostics',
|
||||
sources = { 'nvim_diagnostic' },
|
||||
symbols = { error = ' ', warn = ' ', info = ' ' },
|
||||
diagnostics_color = {
|
||||
color_error = { fg = colors.red },
|
||||
color_warn = { fg = colors.yellow },
|
||||
color_info = { fg = colors.cyan },
|
||||
},
|
||||
}
|
||||
|
||||
-- Insert mid section. You can make any number of sections in neovim :)
|
||||
-- for lualine it's any number greater then 2
|
||||
ins_left {
|
||||
function()
|
||||
return '%='
|
||||
end,
|
||||
}
|
||||
|
||||
ins_left {
|
||||
-- Lsp server name .
|
||||
function()
|
||||
local msg = 'No Active Lsp'
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end,
|
||||
icon = ' LSP:',
|
||||
color = { fg = '#ffffff', gui = 'bold' },
|
||||
}
|
||||
|
||||
-- Add components to right sections
|
||||
ins_right {
|
||||
'o:encoding', -- option component same as &encoding in viml
|
||||
fmt = string.upper, -- I'm not sure why it's upper case either ;)
|
||||
cond = conditions.hide_in_width,
|
||||
color = { fg = colors.green, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'fileformat',
|
||||
fmt = string.upper,
|
||||
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
|
||||
color = { fg = colors.green, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'branch',
|
||||
icon = '',
|
||||
color = { fg = colors.violet, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'diff',
|
||||
-- Is it me or the symbol for modified us really weird
|
||||
symbols = { added = ' ', modified = '柳 ', removed = ' ' },
|
||||
diff_color = {
|
||||
added = { fg = colors.green },
|
||||
modified = { fg = colors.orange },
|
||||
removed = { fg = colors.red },
|
||||
},
|
||||
cond = conditions.hide_in_width,
|
||||
}
|
||||
|
||||
ins_right {
|
||||
function()
|
||||
return '▊'
|
||||
end,
|
||||
color = { fg = colors.blue },
|
||||
padding = { left = 1 },
|
||||
}
|
||||
|
||||
-- Now don't forget to initialize lualine
|
||||
lualine.setup(config)
|
||||
@@ -1,5 +0,0 @@
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||
|
||||
|
||||
vim.keymap.set("n", "gf", "<cmd>diffget //2<CR>")
|
||||
vim.keymap.set("n", "gj", "<cmd>diffget //3<CR>")
|
||||
@@ -1,10 +0,0 @@
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
|
||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||
|
||||
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||
vim.keymap.set("n", "<C-j>", function() ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-k>", function() ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-l>", function() ui.nav_file(4) end)
|
||||
@@ -1,135 +0,0 @@
|
||||
local lsp_zero = require('lsp-zero')
|
||||
|
||||
local lsp_attach = function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
-- lsp_zero.default_keymaps({buffer = bufnr})
|
||||
--
|
||||
local opts = {buffer = bufnr, remap = false}
|
||||
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||
end
|
||||
|
||||
lsp_zero.extend_lspconfig({
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
||||
lsp_attach = lsp_attach,
|
||||
float_border = 'rounded',
|
||||
sign_text = true,
|
||||
})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
require('mason').setup({})
|
||||
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {
|
||||
'lua_ls',
|
||||
'jdtls',
|
||||
'clangd',
|
||||
'zls',
|
||||
},
|
||||
handlers = {
|
||||
function(server_name)
|
||||
require('lspconfig')[server_name].setup({})
|
||||
end,
|
||||
|
||||
-- noop is an empty function that doesn't do anything
|
||||
clangd = function()
|
||||
-- lspconfig.clangd.setup({
|
||||
-- cmd = {
|
||||
-- 'clangd',
|
||||
-- '--background-index',
|
||||
-- '--clang-tidy',
|
||||
-- '--log=verbose',
|
||||
-- '--header-interpolation=false', -- clangd doesn't find the files, annoying and unnecessary noise as a result
|
||||
-- },
|
||||
-- init_options = {
|
||||
-- fallbackFlags = {
|
||||
-- '-std=c23',
|
||||
-- '-std=c++20'
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
end,
|
||||
jdtls = function()
|
||||
lspconfig.jdtls.setup{}
|
||||
end,
|
||||
zls = function()
|
||||
lspconfig.zls.setup({})
|
||||
end,
|
||||
lua_ls = function()
|
||||
lspconfig.lua_ls.setup({
|
||||
on_init = function(client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.uv.fs_stat(path..'/.luarc.json') or vim.uv.fs_stat(path..'/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'turtle' },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
ols = function()
|
||||
lspconfig.ols.setup({
|
||||
single_file_support = true,
|
||||
on_attach = function (client, buffer)
|
||||
print('reached ols')
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
local cmp = require('cmp')
|
||||
local cmp_select = {behaviour = cmp.SelectBehavior.Select}
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
}),
|
||||
formatting = lsp_zero.cmp_format(),
|
||||
})
|
||||
@@ -1,61 +0,0 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '|', right = '|'},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 75,
|
||||
tabline = 10000,
|
||||
winbar = 10000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = {
|
||||
'branch',
|
||||
'diff',
|
||||
{
|
||||
'diagnostics',
|
||||
--sources = 'nvim_diagnostic'
|
||||
sources = { 'nvim_diagnostic' },
|
||||
|
||||
-- Displays diagnostics for the defined severity types
|
||||
sections = { 'error', 'warn', 'info', 'hint' },
|
||||
diagnostics_color = {
|
||||
-- Same values as the general color option can be used here.
|
||||
error = 'DiagnosticError', -- Changes diagnostics' error color.
|
||||
warn = 'DiagnosticWarn', -- Changes diagnostics' warn color.
|
||||
info = 'DiagnosticInfo', -- Changes diagnostics' info color.
|
||||
hint = 'DiagnosticHint', -- Changes diagnostics' hint color.
|
||||
},
|
||||
symbols = { error = ' ', warn = ' ', info = ' ', hint = 'H' },
|
||||
colored = true, -- Displays diagnostics status in color if set to true.
|
||||
update_in_insert = false, -- Update diagnostics in insert mode.
|
||||
always_visible = false, -- Show diagnostics even if there are none.
|
||||
},
|
||||
},
|
||||
lualine_x = {'encoding', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>gf', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>ps', function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||
end)
|
||||
@@ -1,16 +0,0 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "c", "lua", "vim", "query" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = false,
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
require'treesitter-context'.setup{
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
multiwindow = false,
|
||||
max_lines = 4, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 10, -- Maximum number of lines to collapse for a single context line
|
||||
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||
separator = nil,
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
@@ -1 +0,0 @@
|
||||
require("liamm")
|
||||
@@ -1,4 +0,0 @@
|
||||
require("liamm.set")
|
||||
require("liamm.remap")
|
||||
require("liamm.packer")
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
local function bind(op, outer_opts)
|
||||
outer_opts = outer_opts or {noremap = true}
|
||||
return function(lhs, rhs, opts)
|
||||
opts = vim.tbl_extend("force",
|
||||
outer_opts,
|
||||
opts or {}
|
||||
)
|
||||
vim.keymap.set(op, lhs, rhs, opts)
|
||||
end
|
||||
end
|
||||
|
||||
M.nmap = bind("n", {noremap = false})
|
||||
M.nnoremap = bind("n")
|
||||
M.vnoremap = bind("v")
|
||||
M.xnoremap = bind("x")
|
||||
M.inoremap = bind("i")
|
||||
|
||||
return M
|
||||
@@ -1,54 +0,0 @@
|
||||
return require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
use({ 'folke/tokyonight.nvim', as = 'tokyonight' })
|
||||
use({ 'karoliskoncevicius/sacredforest-vim', as = 'sacredforest' })
|
||||
use({ 'EdenEast/nightfox.nvim', as = 'nightfox' })
|
||||
use({ 'rebelot/kanagawa.nvim', as = 'kanagawa'})
|
||||
use({ 'sainnhe/sonokai', as = 'sonokai'})
|
||||
use({ 'p00f/alabaster.nvim', as = 'alabaster'})
|
||||
|
||||
use 'nvim-telescope/telescope.nvim'
|
||||
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
|
||||
use 'nvim-treesitter/playground'
|
||||
use 'nvim-treesitter/nvim-treesitter-context'
|
||||
use 'nvim-lua/plenary.nvim'
|
||||
use 'mbbill/undotree'
|
||||
use 'theprimeagen/harpoon'
|
||||
use 'nvim-lualine/lualine.nvim'
|
||||
use {
|
||||
'mfussenegger/nvim-dap', -- debugger integration
|
||||
requires = {
|
||||
'rcarriga/nvim-dap-ui',
|
||||
'nvim-neotest/nvim-nio' -- dep of dap-ui
|
||||
}
|
||||
}
|
||||
use 'mfussenegger/nvim-jdtls' -- Java LSP Support
|
||||
|
||||
use 'tpope/vim-fugitive' -- git integration
|
||||
--LSP CONFIG
|
||||
--
|
||||
use {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v4.x',
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'}, -- Required
|
||||
{'williamboman/mason.nvim'}, -- Optional
|
||||
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'}, -- Required
|
||||
{'hrsh7th/cmp-buffer'},
|
||||
{'hrsh7th/cmp-path'},
|
||||
{'saadparwaiz1/cmp_luasnip'},
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||
{'hrsh7th/cmp-nvim-lua'},
|
||||
|
||||
-- Snippets
|
||||
{'L3MON4D3/LuaSnip'}, -- Required
|
||||
{'rafamadriz/friendly-snippets'},
|
||||
}
|
||||
}
|
||||
|
||||
end)
|
||||
@@ -1,123 +0,0 @@
|
||||
local nnoremap = require("liamm.keymap").nnoremap
|
||||
|
||||
nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
||||
nnoremap("<leader>tv", "<cmd>ToggleTerm<CR>")
|
||||
nnoremap("<leader>tt", "<cmd>TSContextToggle<CR>")
|
||||
|
||||
vim.keymap.set("v", "<leader>ss", ":CarbonNow<CR>", { silent = true })
|
||||
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
|
||||
vim.keymap.set("n", "J", "mzJ`z")
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "n", "nzzzv")
|
||||
vim.keymap.set("n", "N", "Nzzzv")
|
||||
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
vim.keymap.set("n", "<leader>Y", "\"+Y")
|
||||
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", {silent = true})
|
||||
|
||||
-- put to background
|
||||
vim.keymap.set("n", "<leader>bg", "<C-z>")
|
||||
|
||||
-- BUILD SCRIPT INVOKATIONS
|
||||
-- generic build function
|
||||
local function set(list)
|
||||
local _set = {}
|
||||
for _, l in ipairs(list) do
|
||||
_set[l] = true
|
||||
end
|
||||
return _set
|
||||
end
|
||||
|
||||
-- TODO: add support for passing flags
|
||||
function Build()
|
||||
local out_buf = vim.api.nvim_create_buf(false, true)
|
||||
|
||||
local build_scripts = set(vim.fs.find({ "build.sh", "build.zig", "build.bat" }, { upward = true, type = "file", path = "." }))
|
||||
local output = "[No Build Output]"
|
||||
|
||||
if build_scripts['build.zig'] then
|
||||
vim.cmd('echo "Running build.zig"')
|
||||
output = vim.fn.system({ 'zig', 'build' })
|
||||
else
|
||||
if jit.os == 'Windows' and build_scripts['build.bat'] then
|
||||
output = vim.fn.system({ 'build', '' })
|
||||
elseif build_scripts['build.sh'] then
|
||||
output = vim.fn.system({ './build.sh', '' })
|
||||
else
|
||||
end
|
||||
end
|
||||
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, {"[ Build Output ]"})
|
||||
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, vim.split(output, '\n'))
|
||||
|
||||
local window = vim.api.nvim_open_win(out_buf, false, {
|
||||
split = 'right',
|
||||
win = 0,
|
||||
width = math.floor(vim.o.columns * 0.35),
|
||||
style = 'minimal',
|
||||
})
|
||||
vim.api.nvim_set_current_win(window)
|
||||
|
||||
-- Keybind to close the window on pressing Enter
|
||||
vim.api.nvim_buf_set_keymap(out_buf, 'n', '<CR>', '', {
|
||||
noremap = true,
|
||||
silent = true,
|
||||
callback = function()
|
||||
vim.api.nvim_win_close(window, true)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- TODO: add support for passing flags
|
||||
vim.keymap.set("n", "<leader>bs", ":lua Build()<CR>")
|
||||
|
||||
-- specific build scipt options
|
||||
|
||||
-- `build.sh` script binds
|
||||
-- non-interactive binds
|
||||
vim.keymap.set("n", "<leader>bb" , ":!./build.sh <CR>")
|
||||
vim.keymap.set("n", "<leader>br" , ":!./build.sh run <CR>")
|
||||
vim.keymap.set("n", "<leader>bRb" , ":!./build.sh release <CR>")
|
||||
vim.keymap.set("n", "<leader>bRr" , ":!./build.sh release run <CR>")
|
||||
vim.keymap.set("n", "<leader>bRr" , ":!./build.sh release run <CR>")
|
||||
|
||||
-- interactive binds
|
||||
vim.keymap.set("n", "<leader>bo" , ":!./build.sh ") -- allow for adding extra flags/options
|
||||
vim.keymap.set("n", "<leader>bor" , ":!./build.sh run") -- allow for adding extra flags/options
|
||||
vim.keymap.set("n", "<leader>bRo" , ":!./build.sh release ")
|
||||
vim.keymap.set("n", "<leader>bRor", ":!./build.sh release run ")
|
||||
|
||||
-- `build.zig` script binds
|
||||
-- non-interactive binds
|
||||
vim.keymap.set("n", "<leader>zbb" , ":!zig build <CR>")
|
||||
vim.keymap.set("n", "<leader>zbr" , ":!zig build run <CR>")
|
||||
vim.keymap.set("n", "<leader>zbt" , ":!zig build test <CR>")
|
||||
vim.keymap.set("n", "<leader>zbR" , ":!zig build -Doptimize=ReleaseSafe <CR>")
|
||||
vim.keymap.set("n", "<leader>zbRs" , ":!zig build -Doptimize=ReleaseSmall <CR>")
|
||||
vim.keymap.set("n", "<leader>zbRf" , ":!zig build -Doptimize=ReleaseFast <CR>")
|
||||
vim.keymap.set("n", "<leader>zbRr" , ":!zig build run -Doptimize=ReleaseSafe <CR>")
|
||||
vim.keymap.set("n", "<leader>zbRsr", ":!zig build run -Doptimize=ReleaseSmall <CR>")
|
||||
vim.keymap.set("n", "<leader>zbRfr", ":!zig build run -Doptimize=ReleaseFast <CR>")
|
||||
|
||||
-- interactive binds
|
||||
vim.keymap.set("n", "<leader>zbob" , ":!zig build ")
|
||||
vim.keymap.set("n", "<leader>zbor" , ":!zig build run ")
|
||||
vim.keymap.set("n", "<leader>zbot" , ":!zig build test ")
|
||||
vim.keymap.set("n", "<leader>zboR" , ":!zig build -Doptimize=ReleaseSafe ")
|
||||
vim.keymap.set("n", "<leader>zboRs" , ":!zig build -Doptimize=ReleaseSmall ")
|
||||
vim.keymap.set("n", "<leader>zboRf" , ":!zig build -Doptimize=ReleaseFast ")
|
||||
vim.keymap.set("n", "<leader>zboRr" , ":!zig build run -Doptimize=ReleaseSafe ")
|
||||
vim.keymap.set("n", "<leader>zboRsr", ":!zig build run -Doptimize=ReleaseSmall ")
|
||||
vim.keymap.set("n", "<leader>zboRfr", ":!zig build run -Doptimize=ReleaseFast ")
|
||||
|
||||
-- emacs-inspired binds
|
||||
-- all <C-w> can be done w spacebar-w
|
||||
vim.keymap.set("n", "<leader>w", "<C-w>")
|
||||
vim.keymap.set("n", "<leader>qq", ":x<CR>")
|
||||
nnoremap("<leader>.", ":find ~/")
|
||||
nnoremap("<leader>fc", ":find ~/personal/nixos/modules/old_configs/nvim/lua/liamm/remap.lua<CR>")
|
||||
@@ -1,32 +0,0 @@
|
||||
vim.opt.guicursor = ""
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.rnu = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
vim.opt.updatetime = 40
|
||||
|
||||
vim.opt.colorcolumn = ""
|
||||
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.opt.wrap = true
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
vim.g.netrw_keepdir = 0
|
||||
vim.g.mapleader = " "
|
||||
@@ -1,15 +0,0 @@
|
||||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run.
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
XDG_DESKTOP_DIR="$HOME/"
|
||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/"
|
||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||
XDG_MUSIC_DIR="$HOME/music"
|
||||
XDG_PICTURES_DIR="$HOME/pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/videos"
|
||||
@@ -1 +0,0 @@
|
||||
en_US
|
||||
@@ -1,14 +0,0 @@
|
||||
term=ghostty
|
||||
location=center
|
||||
width=26%
|
||||
lines=9
|
||||
|
||||
|
||||
prompt=Search Applications
|
||||
show=drun
|
||||
insensitive=true
|
||||
allow_images=true
|
||||
hide_scroll=true
|
||||
|
||||
always_parse_args=true
|
||||
show_all=true
|
||||
@@ -1,59 +0,0 @@
|
||||
@define-color purple #881798;
|
||||
|
||||
* {
|
||||
transition: 0.2s;
|
||||
color: #aaaaaa;
|
||||
}
|
||||
#window {
|
||||
background-color: #1e1e2e;
|
||||
/* background: linear-gradient(27deg, rgba(249,255,150,1) 0%, rgba(113,181,120,1) 54%, rgba(21,85,165,1) 100%);*/
|
||||
/* background-image: url("file:///home/liamm/pictures/wp-store/dystopian-cyber-city.jpg");*/
|
||||
/* background-position: 50% 30%;*/
|
||||
background-size: auto 200%;
|
||||
border: 2.0px solid;
|
||||
border-color: @purple;
|
||||
border-color: @darkpurple;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#input {
|
||||
border-radius: 20px;
|
||||
margin: 0 20px 20px 20px;
|
||||
padding: 10px 10px;
|
||||
background-color: #292929;
|
||||
font-weight: 400;
|
||||
color: #ffffffff;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 20px;
|
||||
color: #000000;
|
||||
font-family: 'Source Code Pro';
|
||||
font-weight: 400;
|
||||
|
||||
border: 2px;
|
||||
border-color: #00ffb2ff;
|
||||
}
|
||||
|
||||
#expander {
|
||||
background-color: rgba(69, 29, 50, 0.0);
|
||||
color: #292929;
|
||||
}
|
||||
|
||||
#entry {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #ffffffff;
|
||||
margin: 10px 0px;
|
||||
padding: 10px 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
#entry:selected{
|
||||
background-color:rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
#entry:hover {
|
||||
color: #ffaa34;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
# imgLink = "https://github.com/Liam-Malone/nixos/blob/main/modules/backgrounds/desert.jpg";
|
||||
# image = pkgs.fetchurl {
|
||||
# url = imgLink;
|
||||
# sha256 = "1qyra0ps99pi64nhdmn211v8fxh9f6kd5sxpqaz9ab24janmf55c";
|
||||
# };
|
||||
image = ../backgrounds/desert.jpg;
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "sddm-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nautilor";
|
||||
repo = "nord-sddm";
|
||||
rev = "ad72c3c7048c8aabe85bab41cbeab5f3c4502250";
|
||||
sha256 = "02idn5hggbqc0j01vhxij5nh748sgva123103d5ir0nl676rl782";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out
|
||||
cp -r ${image} $out/Background.jpg
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user