Browse Source

add emacs files

master
nya 2 months ago
parent
commit
f08b0dd538
  1. 21
      .emacs
  2. 240
      .emacs.d/themes/nyan-theme.el
  3. 2
      etc/local.d/zram.start
  4. 9
      etc/portage/make.conf
  5. 15
      etc/portage/package.use
  6. 10
      etc/portage/savedconfig/sys-kernel/vanilla-kernel
  7. 2
      etc/portage/savedconfig/x11-misc/dmenu

21
.emacs

@ -0,0 +1,21 @@
(require 'sudo-edit)
(require 'xterm-color)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives
'("org" . "https://orgmode.org/elpa/") t)
(package-initialize)
(custom-set-variables
'(custom-enabled-themes '(nyan))
'(custom-safe-themes
'("f3d88904f7c4a25cd6d0fad6cf1f5da9045a83a056f97540127fc7f8c26f8caf" default))
'(custom-theme-directory "~/.emacs.d/themes")
'(fringe-mode 0 nil (fringe))
'(initial-scratch-message nil)
'(package-selected-packages '(sudo-edit xterm-color vterm org multi-vterm))
'(scroll-bar-mode 'left)
'(use-file-dialog nil))
(custom-set-faces
'(default ((t (:family "lucy tewi" :foundry "lucy" :slant normal :weight normal :height 83 :width normal))))
'(fringe ((t nil))))

240
.emacs.d/themes/nyan-theme.el

@ -0,0 +1,240 @@
;;; nyan-theme.el --- Theme
;; Author: em
;; Version: 0.1
(deftheme nyan)
(let ((class '((class color) (min-colors 89)))
(fg1 "#fefefe")
(fg2 "#eaeaea")
(fg3 "#d5d5d5")
(fg4 "#c1c1c1")
(bg1 "#141414")
(bg2 "#181414")
(bg3 "#2c2929")
(bg4 "#403d3d")
(builtin "#d62e02")
(keyword "#ff90a9")
(const "#d161a2")
(comment "#808080")
(func "#05ffa1")
(str "#fd9855")
(type "#3bdcff")
(var "#a20160")
(warning "#ff0000")
(warning2 "#ffd400"))
(custom-theme-set-faces
'nyan
`(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 nil))))
`(region ((,class (:background ,fg1 :foreground ,bg1))))
`(highlight ((,class (:foreground ,fg3 :background ,bg3))))
`(hl-line ((,class (:background ,bg2))))
`(fringe ((,class (:background ,bg2 :foreground ,fg4))))
`(cursor ((,class (:background ,fg1))))
`(show-paren-match-face ((,class (:background ,warning))))
`(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 ,bg3 :weight normal))))
`(mode-line-buffer-id ((,class (:bold t :foreground ,func :background nil))))
`(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 nil :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 nil :background nil :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 ,bg1 :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))))
)
(when (>= emacs-major-version 26)
(custom-theme-set-faces
'nyan
`(line-number ((t (:inherit fringe))))
`(line-number-current-line ((t (:inherit fringe :foreground "white" :weight bold))))))
(when (>= emacs-major-version 27)
(custom-theme-set-faces
'nyan
`(line-number ((t (:background ,bg2 :foreground ,fg4))))
`(line-number-current-line ((t (:background ,bg2 :foreground ,fg1))))
`(tab-line ((,class (:inherit fringe :box (:line-width 4 :color ,bg2)))))
`(tab-line-tab ((,class (:inherit tab-line))))
`(tab-line-tab-inactive ((,class (:inherit tab-line :foreground ,comment))))
`(tab-line-tab-current ((,class (:background ,bg4 :foreground ,fg1 :box (:line-width 4 :color ,bg4)))))
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2 :box (:line-width 4 :color ,bg1)))))))
)
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'nyan)

2
etc/local.d/zram.start

@ -1,5 +1,5 @@
#!/bin/sh
size="8G"
size="10G"
modprobe zram
echo $size > /sys/block/zram0/disksize
mkswap /dev/zram0

9
etc/portage/make.conf

@ -1,5 +1,5 @@
COMMON_FLAGS="-O2 -pipe -march=native -mtune=ivybridge"
#MAKEOPTS="-j6"
MAKEOPTS="-j6 -l7"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
@ -15,14 +15,15 @@ PKGDIR="/var/cache/binpkgs"
## portage settings
EMERGE_DEFAULT_OPTS="--ask --verbose --tree --deep"
PORTAGE_SYNC_STALE="3"
FEATURES="candy collision-protect network-sandbox parallel-fetch sandbox"
PORTAGE_NICENESS="10"
FEATURES="collision-protect network-sandbox parallel-fetch sandbox"
## organize useflags
AUDIO_FLAGS="aac alsa -cdda flac mp3 mp4 ogg pulseaudio vorbis x264"
MEDIA_FLAGS="gif imlib jpeg png svg tiff truetype unicode"
VIDEO_FLAGS="acpi cairo -cdr dri gles2 opengl -ogre sdl vulkan -wayland X"
VIDEO_FLAGS="acpi cairo -cdr dri gles2 opengl -ogre sdl vaapi vulkan -wayland X"
SYSTEM_FLAGS="bluetooth -branding -cups dbus elogind -geolocation -gnome gtk
gtk3 gpm icu -netifrc networkmanager policykit -systemd threads udev upower udisks xml"
gtk3 gpm icu -netifrc networkmanager osmesa policykit -systemd threads udev upower udisks xml"
GPU="intel nouveau i915 i965"
USE="${AUDIO_FLAGS} ${MEDIA_FLAGS} ${VIDEO_FLAGS} ${SYSTEM_FLAGS}"

15
etc/portage/package.use

@ -16,12 +16,23 @@ dev-util/ostree curl
dev-lang/rust nightly parallel-compiler system-llvm
# source-han-sans useflags
media-fonts/source-han-sans l10n_ja l10n_ko l10n_zh-CN"
media-fonts/source-han-sans l10n_ja l10n_ko l10n_zh-CN
# emacs useflags
app-editors/emacs gui sound xft xwidgets harfbuzz imagemagick
app-editors/emacs dynamic-loading gui harfbuzz imagemagick sound toolkit-scroll-bars xft
app-emacs/emacs-common gui
# qutebrowser useflags
dev-python/PyQt5 sql declarative printsupport widgets network multimedia gui webchannel
dev-qt/qtwebengine widgets
dev-qt/qtwebchannel qml
media-libs/libvpx svc
sys-libs/zlib minizip
dev-qt/qtmultimedia widgets
# networkmanager useflags
net-misc/networkmanager -ppp
# save kernel config
sys-kernel/vanilla-kernel savedconfig

10
etc/portage/savedconfig/sys-kernel/vanilla-kernel

@ -1,8 +1,8 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.11.10 Kernel Configuration
# Linux/x86 5.11.14 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="x86_64-pc-linux-gnu-gcc (Gentoo 10.2.0-r5 p6) 10.2.0"
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 10.2.0-r5 p6) 10.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100200
CONFIG_LD_VERSION=235010000
@ -21,7 +21,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION="camellia-dist"
CONFIG_LOCALVERSION="-camellia-dist"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
@ -8611,13 +8611,13 @@ CONFIG_FONTS=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
CONFIG_FONT_ACORN_8x8=y
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_6x10 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_TER16x32 is not set
CONFIG_FONT_TER16x32=y
# CONFIG_FONT_6x8 is not set
CONFIG_SG_POOL=y
CONFIG_ARCH_HAS_PMEM_API=y

2
etc/portage/savedconfig/x11-misc/dmenu

@ -16,8 +16,6 @@ static const char *colors[SchemeLast][2] = {
/* -l and -g options; controls number of lines and columns in grid if > 0 */
static unsigned int lines = 6;
static unsigned int maxhist = 64;
static int histnodup = 1; /* if 0, record repeated histories */
static unsigned int columns = 2;
/*

Loading…
Cancel
Save