Switch to gnu stow and add emacs pdf-tools

This commit is contained in:
Marco Thomas committed 2022-01-24 09:28:14 +01:00
1 parent 8632359365
commit 888c9819e9
35 files changed
+714 -87

No files matched your search

+6 -4
View File
@@ -1,6 +1,9 @@
#+TITLE:my dots
dots for my lenovo yoga slim 7i pro 「itomori」
dots for my lenovo yoga slim 7i pro 「itomori」, managed with =gnu stow=.
Files can be =stow='ed and un'=stow='-ed with =stow.sh=.
It will link all dotfiles to their correct place.
[[./screen.png]]
@@ -34,7 +37,6 @@ dots for my lenovo yoga slim 7i pro 「itomori」
+ spotify
+ seafile-applet
+ keepassxc
+ okular / zathura
** control stuff
+ [[https://github.com/bulletmark/libinput-gestures][libinput-gestures]]
+ pactl
@@ -46,8 +48,8 @@ dots for my lenovo yoga slim 7i pro 「itomori」
+ wmctrl
+ redshift-gtk
** special stuff
+ fcitx5 (with mozc)
+ hunspell DE
+ fcitx5 (=fcitx5 fcitx5-configtool fcitx5-gtk fcitx5-mozc fcitx-qt=)
+ hunspell-de (=hunspell-en= should be installed)
** GTK theming
+ papirus icons
+ materia gtk theme
-44
View File
@@ -1,44 +0,0 @@
general {
output_format = "i3bar"
colors = false
markup = pango
interval = 5
color_good = '#2f343f'
color_degraded = '#ebcb8b'
color_bad = '#ba5e57'
}
order += "wireless _first_"
order += "battery all"
order += "volume master"
order += "tztime local"
wireless _first_ {
format_up = "%essid"
format_down = "Disconnected"
}
volume master {
format = "%volume"
format_muted = "Muted"
device = "default"
mixer = "Master"
mixer_idx = 0
}
battery all {
last_full_capacity = true
format = "%status %percentage"
format_down = "No Battery"
status_chr = "Charging"
status_bat = "Battery"
status_unk = "Unknown"
status_full = "Full"
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
}
tztime local {
format = "%time"
format_time = "%a %-d %b %H:%M"
}
@@ -6,7 +6,7 @@
follow = mouse
width = 400
origin = "top-center"
offset = "0x100"
offset = "0x45"
indicate_hidden = yes
shrink = no
separator_height = 1
+610
View File
@@ -0,0 +1,610 @@
;;; -*- lexical-binding: t -*-
(defun tangle-init ()
(when (equal (buffer-file-name)
(expand-file-name (concat (getenv "HOME") "/dots/files/init.org")))
;; Avoid running hooks when tangling.
(let ((prog-mode-hook nil))
(org-babel-tangle))))
(add-hook 'after-save-hook 'tangle-init)
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold (* 32 1024 1024))))
(setq read-process-output-max (* 3 1024 1024))
(setq-default bidi-display-reordering 'left-to-right
bidi-paragraph-direction 'left-to-right)
(setq bidi-inhibit-bpa t)
(setq-default cursor-in-non-selected-windows nil)
(setq highlight-nonselected-windows nil)
(setq idle-update-delay 1.0)
(setq redisplay-skip-fontification-on-input t)
(setq make-backup-files nil
auto-mode-case-fold nil
auto-save-default nil
inhibit-startup-screen t
tramp-default-method "ssh"
initial-major-mode 'fundamental-mode
initial-scratch-message nil
fast-but-imprecise-scrolling t)
(add-hook 'doc-view-mode-hook 'auto-revert-mode)
(fset 'yes-or-no-p 'y-or-n-p)
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(global-visual-line-mode t)
(setq straight-check-for-modifications 'live)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq package-enable-at-startup nil)
(straight-use-package 'use-package)
(use-package general
:straight t
:init
(general-create-definer vim-leader-def :prefix "SPC"))
(use-package which-key
:straight t
:init
(which-key-mode)
:diminish
(which-key-mode)
:config
(setq which-key-idle-delay 1))
(use-package evil
:straight t
:bind
(:map evil-motion-state-map
("C-y" . nil))
(:map evil-insert-state-map
("C-y" . nil))
:init
;; so C-z works for background
(setq evil-toggle-key "C-~"
evil-want-C-d-scroll t
evil-want-C-u-scroll t
evil-want-integration t
evil-want-keybinding nil)
:config
(evil-mode))
(use-package evil-collection
:straight t
:after evil
:config
(evil-collection-init))
(use-package evil-matchit
:straight t
:after evil
:config
(global-evil-matchit-mode 1))
(set-face-attribute 'default nil :font "JuliaMono" :height 110)
(set-fontset-font t 'unicode "Noto Color Emoji" nil 'prepend)
(set-fontset-font t 'unicode "Noto Sans Mono CJK JP" nil 'append)
(set-face-attribute 'variable-pitch nil :family "Roboto")
(set-face-attribute 'fixed-pitch nil :family "JuliaMono")
(use-package mixed-pitch
:straight t
:hook
(text-mode . mixed-pitch-mode))
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(show-paren-mode t)
(setq show-paren-style 'paranthesis)
(setq-default display-line-numbers 'relative
display-line-numbers-widen t
;; this is the default
display-line-numbers-current-absolute t)
;; Display absolute numbers, when in normal mode
(defun noct:relative ()
(setq-local display-line-numbers 'relative))
(defun noct:absolute ()
(setq-local display-line-numbers t))
(add-hook 'evil-insert-state-entry-hook #'noct:absolute)
(add-hook 'evil-insert-state-exit-hook #'noct:relative)
(use-package doom-themes
:straight (doom-themes :type git :host github :repo "hlissner/emacs-doom-themes"
:fork (:host github :repo "CramMK/emacs-doom-themes"))
:config
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-ayu-light t)
(doom-themes-org-config)
(doom-themes-treemacs-config))
(use-package doom-modeline
:straight t
:config
(doom-modeline-mode 1)
(setq doom-modeline-indent-info t
doom-modeline-buffer-file-name-style 'file-name))
(use-package all-the-icons
:straight t)
(use-package nyan-mode
:straight t
:init
(nyan-mode)
(nyan-start-animation)
;; (nyan-toggle-wavy-trail)
:config
(setq nyan-cat-face-number 4))
(use-package rainbow-mode
:straight t
:hook
(prog-mode . rainbow-mode))
(global-whitespace-mode t)
(setq whitespace-style '(face trailing tabs tab-mark))
(add-hook 'before-save-hook 'whitespace-cleanup)
(use-package fill-column-indicator
:straight t
:defer 1
:diminish
(fci-mode)
:config
(setq fci-rule-width 1
fci-rule-column 80
fci-rule-color "#A6CC70")
:hook
(prog-mode . fci-mode)
(markdown-mode . fci-mode))
(use-package treemacs
:straight t
:defer t
:config
(setq treemacs-follow-after-init t
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
treemacs-width 50
treemacs-project-follow-cleanup t
treemacs-tag-follow-cleanup t
treemacs-expand-after-init nil
treemacs-recenter-after-file-follow t
treemacs-recenter-after-tag-follow t
treemacs-tag-follow-delay 1)
(treemacs-follow-mode t)
(treemacs-load-theme "Default")
(dolist (face '(treemacs-root-face
treemacs-git-unmodified-face
treemacs-git-modified-face
treemacs-git-renamed-face
treemacs-git-ignored-face
treemacs-git-untracked-face
treemacs-git-added-face
treemacs-git-conflict-face
treemacs-directory-face
treemacs-directory-collapsed-face
treemacs-file-face
treemacs-tags-face))
(set-face-attribute face nil :family "JuliaMono" :height 110))
:bind
(:map global-map
("C-x t t" . treemacs)))
;; C-c C-p -> projectile
;; C-c C-w -> workspace
(use-package treemacs-evil
:after (treemacs evil)
:straight t)
(use-package ivy
:straight t
:diminish
:bind (("C-s" . swiper)
:map ivy-minibuffer-map
("TAB" . ivy-alt-done)
("C-l" . ivy-alt-done)
("C-j" . ivy-next-line)
("C-k" . ivy-previous-line)
:map ivy-switch-buffer-map
("C-k" . ivy-previous-line)
("C-l" . ivy-done)
("C-d" . ivy-switch-buffer-kill)
:map ivy-reverse-i-search-map
("C-k" . ivy-previous-line)
("C-d" . ivy-reverse-i-search-kill))
:config
(ivy-mode 1))
(use-package counsel
:straight t
:bind (("M-x" . counsel-M-x)
("C-x b" . counsel-ibuffer)
("C-x C-f" . counsel-find-file)
("C-x C-g" . counsel-git)
:map minibuffer-local-map
("C-r" . 'counsel-minibuffer-history)))
(use-package org
:straight t
:general
(vim-leader-def 'normal 'global
"oci" 'org-clock-in
"oco" 'org-clock-out
"oa" 'org-agenda
"oca" 'org-capture
"oes" 'org-edit-src-code
"oti" 'org-toggle-inline-images
"odi" 'org-display-inline-images)
:hook
(org-mode . (lambda () (electric-indent-local-mode -1))) ;; dont make real spaces at the start of a line
(org-mode . org-indent-mode) ;; add virtual spaces
:config
(define-key evil-normal-state-map (kbd "TAB") 'org-cycle)) ;; use TAB to FOLD in every evil-mode
(setq ;; org-hidden-keywords '(title) ;; hide title
org-startup-with-inline-images t ;; start with inline images enabled
org-image-actual-width nil ;; rescale inline images
org-directory "~/org" ;; set org file directory
org-agenda-files (quote ("~/org")) ;; indexed files by org agenda
org-edit-src-content-indentation 0 ;; don't indent stupidly in org-edit-src-code
org-log-done nil ;; just mark DONE without a time stamp
org-log-repeat nil ;; don't set a time after marking sth DONE
org-agenda-start-on-weekday nil ;; my week starts on a monday
calendar-week-start-day 1 ;; my week starts on a monday
)
(setq org-todo-keywords '((sequence "TODO" "PROGRESS" "REVIEW" "|" "DONE"))
org-todo-keyword-faces '(("TODO" . "#cc241d") ("PROGRESS" . "#a6cc70") ("REVIEW" . "#b16286") ("DONE" . "#abb0b6")))
(setq org-capture-templates
(quote (("w" "Work" entry (file "~/org/work.org") "* TODO %?\n" :empty-lines-before 1)
("u" "University" entry (file "~/org/uni.org") "* TODO %?\n" :empty-lines-before 1)
("p" "Personal" entry (file "~/org/personal.org") "* TODO %?\n" :empty-lines-before 1))))
(org-babel-do-load-languages 'org-babel-load-languages '((python . t)
(shell . t)
(haskell . t)
(C . t)
(dot . t)))
(use-package sage-shell-mode
:straight t)
(use-package ob-sagemath
:straight t)
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")
org-latex-inputenc-alist '(("utf8" . "utf8x"))
org-latex-default-packages-alist (cons '("mathletters" "ucs" nil) org-latex-default-packages-alist)
org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
(defun mth/beamer-bold (contents backend info)
(when (eq backend 'beamer)
(replace-regexp-in-string "\\`\\\\[A-Za-z0-9]+" "\\\\textbf" contents)))
(use-package ox
:after org
:config
(add-to-list 'org-export-filter-bold-functions 'mth/beamer-bold)
(add-to-list 'org-latex-logfiles-extensions "tex"))
(use-package org-fragtog
:straight t
:hook
(org-mode . org-fragtog-mode))
(use-package graphviz-dot-mode
:straight t
:hook
(graphviz-dot-mode . (lambda () (set-input-method "math")))
:config
(setq graphviz-dot-indent-width 4))
(set-face-attribute 'org-document-title nil :family "Roboto" :weight 'bold :inherit 'default :height 250)
(setq org-ellipsis " ⮷" ;; folding icon
;; org-hide-emphasis-markers t ;; hide markers such as *, =, _
)
(use-package org-superstar
:straight t
:after org
:hook
(org-mode . org-superstar-mode)
:config
(setq org-superstar-remove-leading-stars t))
(use-package org-super-agenda
:straight t
:after org
:config
(setq org-super-agenda-groups '((:auto-group t)))
(org-super-agenda-mode))
(use-package dtrt-indent
:straight t
:hook
(prog-mode . dtrt-indent-mode)
(text-mode . dtrt-indent-mode)
(org-mode . dtrt-indent-mode)
(markdown-mode . dtrt-indent-mode))
(use-package electric-pair
:config
(setq electric-pair-open-newline-between-pairs nil)
:hook
(prog-mode . electric-pair-mode)
(text-mode . electric-pair-mode)
(org-mode . electric-pair-mode)
(markdown-mode . electric-pair-mode))
(use-package magit
:straight t
:general
(vim-leader-def 'normal 'global
"gb" 'magit-branch
"gc" 'magit-checkout
"gc" 'magit-commit
"gd" 'magit-diff
"gg" 'counsel-git-grep
"gi" 'magit-gitignore-in-topdir
"gj" 'magit-blame
"gl" 'magit-log
"gp" 'magit-push
"gs" 'magit-status
"gu" 'magit-pull))
(use-package treemacs-magit
:after (treemacs magit)
:straight t)
(use-package hl-todo
:straight t
:hook
(prog-mode . hl-todo-mode)
:config
(defface hl-todo-TODO
'((t :background "#cc241d" :foreground "#ffffff"))
"TODO Face")
(setq hl-todo-highlight-punctuation ":"
hl-todo-color-background t
hl-todo-keyword-faces '(("TODO" . hl-todo-TODO)
("XXX" . hl-todo-TODO)
("FIXME" . hl-todo-TODO))))
(use-package company
:straight t
:hook
(lsp-mode . company-mode)
(prog-mode . company-mode)
(LaTeX-mode . company-mode)
(org-mode . company-mode)
:custom
(company-minimum-prefix-length 3)
(company-idle-delay 0.5)
:bind (:map company-active-map
("C-j" . company-select-next-or-abort)
("C-k" . company-select-previous-or-abort)
("C-l" . company-complete-selection)))
(use-package company-box
:straight t
:config
(setq company-box-doc-delay 2.0
company-box-max-candidates 10)
:hook
(company-mode . company-box-mode))
(defun company-mode/backend-with-yas (backend)
(if (and (listp backend) (member 'company-yasnippet backend))
backend
(append (if (consp backend) backend (list backend))
'(:with company-yasnippet))))
(defun company-mode/add-yasnippet ()
(setq company-backends (mapcar #'company-mode/backend-with-yas company-backends)))
(use-package yasnippet
:straight t
:init
:bind (:map yas-minor-mode-map
("C-y" . yas-expand))
:hook
(company-mode . yas-minor-mode)
(company-mode . company-mode/add-yasnippet))
(use-package yasnippet-snippets
:straight (yasnippet-snippets :type git :host github :repo "AndreaCrotti/yasnippet-snippets"
:fork (:host github
:repo "marcothms/yasnippet-snippets"))
:after yasnippet)
(use-package lsp-mode :straight t
:commands (lsp lsp-deferred)
:init
(setq lsp-keymap-prefix "C-l")
:config
(lsp-enable-which-key-integration t)
(setq lsp-rust-server 'rust-analyzer
lsp-auto-guess-root t
lsp-idle-delay 1
lsp-enable-file-watchers nil)
:hook
(rust-mode . lsp)
(python-mode . lsp)
(haskell-mode . lsp)
(c++-mode . lsp))
(use-package flycheck
:straight t
:after lsp)
(use-package lsp-ivy
:straight t
:after lsp-mode
:bind(:map lsp-mode-map ("C-l g a" . lsp-ivy-workspace-symbol)))
(use-package projectile
:straight t
:after lsp
:config
(setq projectile-completion-system 'ivy)
(projectile-mode +1))
(use-package rust-mode
:straight t
:hook
(rust-mode . prettify-symbols-mode)
(rust-mode . (lambda ()
(push '("->" . ?→) prettify-symbols-alist)
(push '("=>" . ?⇒) prettify-symbols-alist)
(push '("!=" . ?≠) prettify-symbols-alist)
(push '("<=" . ?≤) prettify-symbols-alist)
(push '(">=" . ?≥) prettify-symbols-alist))))
(use-package haskell-mode
:straight t
:hook
(haskell-mode . interactive-haskell-mode))
(use-package lsp-haskell
:straight t
:after lsp
:hook
(haskell-mode . lsp)
(haskell-literate-mode . lsp))
(use-package dap-mode
:straight t)
(require 'dap-python)
(use-package ispell
:straight t
:if (executable-find "hunspell")
:config
(setq ispell-program-name "hunspell"
ispell-dictionary "de_DE,en_GB,en_US")
(ispell-set-spellchecker-params)
(ispell-hunspell-add-multi-dic "de_DE,en_GB,en_US")
:hook
(org-mode . flyspell-mode)
(markdown-mode . flyspell-mode)
(text-mode . flyspell-mode))
(use-package math-symbol-lists
:straight t
:config
(quail-define-package "math" "UTF-8" "Ω" t)
(quail-define-rules
; Equality and order
("<=" ?≤) (">=" ?≥) ("\\prec" ?≺) ("\\preceq" ?≼) ("\\succ" ?≻)
("\\succeq" ?≽)
("/=" ?≠) ("\\neq" ?≠) ("\\=n" ?≠)("\\equiv" ?≡) ("\\nequiv" ?≢)
("\\approx" ?≈) ("\\~~" ?≈) ("\\t=" ?≜) ("\\def=" ?≝)
; Set theory
("\\sub" ?⊆) ("\\subset" ?⊂) ("\\subseteq" ?⊆) ("\\in" ?∈)
("\\inn" ?∉) ("\\:" ?∈) ("\\cap" ?∩) ("\\inter" ?∩)
("\\cup" ?∪) ("\\uni" ?∪) ("\\emptyset" ?∅) ("\\empty" ?∅)
("\\times" ?×) ("\\x" ?×)
; Number stuff
("\\mid" ?∣) ("\\infty" ?∞) ("\\sqrt" ?√) ("\\Im" ?ℑ) ("\\Re" ?ℜ)
; Logic
("\\/" ?∨) ("\\and" ?∧) ("/\\" ?∧) ("\\or" ?∨) ("~" ?¬) ("\neg" ?¬)
("|-" ?⊢) ("|-n" ?⊬) ("\\bot" ?⊥) ("\\top" ?⊤)
("\\r" ?→) ("\\lr" ?↔)
("\\R" ?⇒) ("\\Lr" ?⇔)
("\\qed" ?∎)
; Predicate logic
("\\all" ?∀) ("\\ex" ?∃) ("\\exn" ?∄)
; functions
("\\to" ?→) ("\\mapsto" ?↦) ("\\circ" ?∘) ("\\comp" ?∘) ("\\integral" ?∫)
("\\fun" ?λ)
; Sets of numbers
("\\nat" ?ℕ) ("\\N" ?ℕ) ("\\int" ?ℤ) ("\\Z" ?ℤ) ("\\rat" ?ℚ) ("\\Q" ?ℚ)
("\\real" ?ℝ) ("\\R" ?ℝ) ("\\complex" ?ℂ) ("\\C" ?ℂ) ("\\prime" ?ℙ)
("\\P" ?ℙ)
; Complexity
("\\bigo" ?𝒪)
; Greek
("\\Ga" ?α) ("\\GA" ?Α) ("\\a" ?α)
("\\Gb" ?β) ("\\GB" ?Β) ("\\b" ?β)
("\\Gg" ?γ) ("\\GG" ?Γ) ("\\g" ?γ) ("\\Gamma" ?Γ)
("\\Gd" ?δ) ("\\GD" ?Δ) ("\\delta" ?δ) ("\\Delta" ?Δ)
("\\Ge" ?ε) ("\\GE" ?Ε) ("\\epsilon" ?ε)
("\\Gz" ?ζ) ("\\GZ" ?Ζ)
("\\Gh" ?η) ("\\Gh" ?Η) ("\\mu" ?μ)
("\\Gth" ?θ) ("\\GTH" ?Θ) ("\\theta" ?θ) ("\\Theta" ?Θ)
("\\Gi" ?ι) ("\\GI" ?Ι) ("\\iota" ?ι)
("\\Gk" ?κ) ("\\GK" ?Κ)
("\\Gl" ?λ) ("\\GL" ?Λ) ("\\lam" ?λ)
("\\Gm" ?μ) ("\\GM" Μ) ("\\mu" ?μ)
("\\Gx" ?ξ) ("\\GX" ?Ξ) ("\\xi" ?ξ) ("\\Xi" ?Ξ)
("\\Gp" ?π) ("\\GP" ?Π) ("\\pi" ?π) ("\\Pi" ?Π)
("\\Gr" ?ρ) ("\\GR" ?Ρ) ("\\rho" ?ρ)
("\\Gs" ?σ) ("\\GS" ?Σ) ("\\sig" ?σ) ("\\Sig" ?Σ)
("\\Gt" ?τ) ("\\GT" ?Τ) ("\\tau" ?τ)
("\\Gph" ?ϕ) ("\\GPH" ?Φ) ("\\phi" ?ϕ) ("\\Phi" ?Φ)
("\\Gc" ?χ) ("\\GC" ?Χ) ("\\chi" ?χ)
("\\Gp" ?ψ) ("\\GP" ?Ψ) ("\\psi" ?ψ)
("\\Go" ?ω) ("\\GO" ?Ω) ("\\omega" ?ω) ("\\Omega" ?Ω)
)
(mapc (lambda (x)
(if (cddr x)
(quail-defrule (cadr x) (car (cddr x)))))
(append math-symbol-list-superscripts
math-symbol-list-subscripts)))
(use-package pdf-tools
:straight t
:config
(define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward-regexp))
;; load necessary things, when a PDF gets opened
(pdf-tools-install)
+39 -6
View File
@@ -69,9 +69,8 @@ the =after-save-hook= ensuring to always tangle and byte-compile the
** Performance for start-up
A common optimization is to temporarily disable garbage collection during
initialization. Here, we set the ~gc-cons-threshold~ to a ridiculously large
initialization. Here, we set the =gc-cons-threshold= to a ridiculously large
number, and restore the default value after initialization.
#+BEGIN_SRC emacs-lisp :tangle yes
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'emacs-startup-hook
@@ -258,6 +257,18 @@ I mainly use these fonts:
(set-fontset-font t 'unicode "Noto Sans Mono CJK JP" nil 'append)
#+end_src
Use non-monospace font for org-mode!
Blocks will still be mono-spaced.
#+begin_src emacs-lisp :tangle yes
(set-face-attribute 'variable-pitch nil :family "Roboto")
(set-face-attribute 'fixed-pitch nil :family "JuliaMono")
(use-package mixed-pitch
:straight t
:hook
(text-mode . mixed-pitch-mode))
#+end_src
*** Bars
I don't need ugly ass bars.
#+begin_src emacs-lisp :tangle yes
@@ -407,7 +418,7 @@ Sometimes I want to see all of my files.
:straight t)
#+end_src
** Mini buffers
*** Mini buffers
*** ivy
Ivy - a generic completion frontend for Emacs.
Swiper - isearch with an overview, and more. Oh, man!
@@ -471,7 +482,7 @@ Bootstrap =org-mode= together with keybindings.
*** Misc
#+begin_src emacs-lisp :tangle yes
(setq org-hidden-keywords '(title) ;; hide title
(setq ;; org-hidden-keywords '(title) ;; hide title
org-startup-with-inline-images t ;; start with inline images enabled
org-image-actual-width nil ;; rescale inline images
org-directory "~/org" ;; set org file directory
@@ -570,7 +581,7 @@ Use graphivz to draw graphs.
*** Fonts and fancy
Some custom fonts stuff.
#+begin_src emacs-lisp :tangle yes
(set-face-attribute 'org-document-title nil :weight 'bold :inherit 'default :height 250)
(set-face-attribute 'org-document-title nil :family "Roboto" :weight 'bold :inherit 'default :height 250)
(setq org-ellipsis " ⮷" ;; folding icon
;; org-hide-emphasis-markers t ;; hide markers such as *, =, _
)
@@ -583,7 +594,9 @@ Use =(setq inhibit-compacting-font-caches t)=, if performance is low.
:straight t
:after org
:hook
(org-mode . org-superstar-mode))
(org-mode . org-superstar-mode)
:config
(setq org-superstar-remove-leading-stars t))
#+end_src
Also the default =agenda= looks a bit messy.
@@ -922,3 +935,23 @@ Who needs LaTeX when you can the power of unicode?
(append math-symbol-list-superscripts
math-symbol-list-subscripts)))
#+end_src
** PDF
*** pdf-tools
Built-in DocView isn't too nice to use.
=pdf-tools= offers smoother scrolling and a nicer search.
=isearch-forward-regexp= replaces =swiper= in this mode, as =swiper= would regexp in the PDF source.
Keybinds:
+ =C-s=: search, just as in =swiper=
+ =C-s= (again): forward search
+ =C=r=: backward search
#+begin_src emacs-lisp :tangle yes
(use-package pdf-tools
:straight t
:config
(define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward-regexp))
;; load necessary things, when a PDF gets opened
(pdf-tools-install)
#+end_src
+1 -1
View File
@@ -1,6 +1,6 @@
[user]
name = Marco Thomas
email = mail@marco-thomas.net
email = rb.ma.tho@gmail.com
[includeIf "gitdir:~/dev/lrz-gitlab/**"]
path = "~/dev/lrz-gitlab/.gitconfig"
[alias]
@@ -31,8 +31,8 @@ bindsym $mod+Shift+BackSpace kill
bindsym $mod+Control+BackSpace exec --no-startup-id ~/dots/scripts/powermenu.sh
# change monitor layout
bindsym $mod+Control+d exec --no-startup-id ~/dots/scripts/monitor.sh dual
bindsym $mod+Control+s exec --no-startup-id ~/dots/scripts/monitor.sh single
bindsym $mod+Control+e exec --no-startup-id ~/dots/scripts/laptop/monitor.sh external
bindsym $mod+Control+s exec --no-startup-id ~/dots/scripts/laptop/monitor.sh single
# change focus
bindsym $mod+h focus left
@@ -142,7 +142,7 @@ smart_borders on
# gaps
gaps inner 10
# desktop (wallpaper, bar, picom)
# desktop (wallpaper, bar, ...)
exec_always --no-startup-id ~/dots/scripts/reload_desktop.sh
# startup
@@ -130,7 +130,7 @@ label-full =  100%
[module/conservation]
type = custom/script
exec = if [ /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode ]; then echo "On"; else echo "Off"; fi
click-left = alacritty --command ~/dots/scripts/conservation_mode.sh
click-left = alacritty --command ~/dots/scripts/laptop/conservation_mode.sh
format = <label>
label =  %output%
tail = true
@@ -147,7 +147,7 @@ ramp-1 = 
[module/polywins]
type = custom/script
exec = ~/dots/scripts/polywins.sh 2>/dev/null
exec = ~/dots/scripts/polybar/polywins.sh 2>/dev/null
format = <label>
label = %output%
tail = true
@@ -156,7 +156,7 @@ tail = true
type = custom/script
interval = 1
format =  <label>
exec = python3 ~/dots/scripts/spotify.py -f '{artist}: {song}' -t 50 -q
exec = python3 ~/dots/scripts/polybar/spotify.py -f '{artist}: {song}' -t 50 -q
click-left = playerctl -p spotify play-pause
click-right = playerctl -p spotify next
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -15,7 +15,7 @@ window {
background-color: @background;
text-color: @foreground;
border-radius: 0px;
height: 28%;
height: 30%;
width: 15%;
location: center;
x-offset: 0;
File renamed without changes.
View File
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
Xft.dpi: 140
! Font
XTerm.vt100.faceName: xft:SFMono Nerd Font Mono:antialias=true
XTerm.vt100.faceName: xft:JuliaMono:antialias=true
XTerm.vt100.faceSize: 10
! Remove Scrollbar
File renamed without changes.
View File
File renamed without changes.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 MiB

After

Width:  |  Height:  |  Size: 5.5 MiB

File renamed without changes.
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
mon=$1
# when using a laptop, i want to easily switch screens
if [ "$(hostname)" = "itomori" ]; then
if [ ${mon} == "external" ]; then
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer.svg "Screen update" "Switching to external monitor..."
sleep 2
# set layout for external monitor
$HOME/.screenlayout/external.sh
# built in screen has higher dpi, so scale the bigger one
xrandr --output DP-1 --scale 1.4
xrandr --output DP-2 --scale 1.4
xrandr --output DP-3 --scale 1.4
xrandr --output DP-4 --scale 1.4
elif [ ${mon} == "single" ]; then
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer.svg "Screen update" "Switching to single monitor..."
sleep 2
# set layout for built in display
xrandr --output eDP-1 --mode 2880x1800 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off
fi
fi
# reload wallpaper etc
$HOME/dots/scripts/reload_desktop.sh
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash
mon=$1
if [ ${mon} == "dual" ]; then
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer.svg "Screen update" "Switching to dual monitor..."
sleep 2
# set layout for dual monitor at home
xrandr --output eDP-1 --mode 2880x1800 --pos 4816x1474 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --primary --mode 3440x1440 --pos 0x0 --rotate normal --output DP-4 --off
# built in screen has higher dpi, so scale the bigger one
xrandr --output DP-3 --scale 1.4
elif [ ${mon} == "single" ]; then
notify-send -i /usr/share/icons/Papirus/48x48/devices/computer.svg "Screen update" "Switching to single monitor..."
sleep 2
# set layout for built in display
xrandr --output eDP-1 --mode 2880x1800 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output DP-4 --off
fi
# reload wallpaper etc
$HOME/dots/scripts/reload_desktop.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
+2 -2
View File
@@ -6,12 +6,12 @@ notify-send -i /usr/share/icons/Papirus/48x48/devices/computer-laptop.svg "Reloa
# bar
killall -q polybar
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
$HOME/dots/scripts/polybar.sh
$HOME/dots/scripts/polybar/polybar.sh
# wallpaper
feh --bg-fill $HOME/data/Seafile/images/wallpaper/wallpaper.png
# for some reason xmodmap and xset settings reset
# for some reason xmodmap and xset settings reset sometimes
source $HOME/.profile
# send notification
Executable
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
FILES_DIR=$HOME/dots/files
OPTS=$1
echo "You are about to stow all config files."
echo "Do you want to proceed? [y]"
read proceed
if [ "${proceed}" != "y" ]; then
echo "Exiting!"
exit
fi
echo "Switching to ${FILES_DIR}"
cd $FILES_DIR
echo "STOWING..."
stow ${OPTS} -v --ignore="init.org" --target="$HOME" *
echo "DONE!"