Compare commits

..

8 Commits

7 changed files with 211 additions and 100 deletions

View File

@ -124,6 +124,9 @@ if [ -z "$SSH_AUTH_SOCK" ] ; then
# ssh-add # ssh-add
fi fi
eval "$(starship init bash)"
# BEGIN_KITTY_SHELL_INTEGRATION # BEGIN_KITTY_SHELL_INTEGRATION
if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi
# END_KITTY_SHELL_INTEGRATION # END_KITTY_SHELL_INTEGRATION

View File

@ -71,20 +71,20 @@ android-studio() {
#exit 0; #exit 0;
} }
ansible() { # ansible() {
local args=$@ # local args=$@
local cur_dir=$(pwd) # local cur_dir=$(pwd)
local targetmount=$(basename $cur_dir) # local targetmount=$(basename $cur_dir)
docker run -it \ # docker run -it \
--name ansible_$targetmount \ # --name ansible_$targetmount \
-v ${cur_dir}:/src/$targetmount \ # -v ${cur_dir}:/src/$targetmount \
-w /src/$targetmount \ # -w /src/$targetmount \
-v $HOME/.ssh/:/tmp/.ssh:ro \ # -v $HOME/.ssh/:/tmp/.ssh:ro \
-v /etc/hosts:/etc/hosts:ro \ # -v /etc/hosts:/etc/hosts:ro \
${DOCKER_REPO_PREFIX}/ansible:alpine \ # ${DOCKER_REPO_PREFIX}/ansible:alpine \
bash -c "$args" # bash -c "$args"
} # }
ant() { ant() {
local args=$@ local args=$@

View File

@ -192,16 +192,16 @@ mode "resize" {
# Pressing right will grow the windows width. # Pressing right will grow the windows width.
# Pressing up will shrink the windows height. # Pressing up will shrink the windows height.
# Pressing down will grow the windows height. # Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt bindsym h resize shrink width 10 px or 10 ppt
bindsym i resize grow height 10 px or 10 ppt bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys # same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize shrink width 5 px
bindsym Down resize grow height 10 px or 10 ppt bindsym Down resize grow height 5 px
bindsym Up resize shrink height 10 px or 10 ppt bindsym Up resize shrink height 5 px
bindsym Right resize grow width 10 px or 10 ppt bindsym Right resize grow width 5 px
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default" bindsym Return mode "default"

View File

@ -33,6 +33,17 @@ pomodoro_break = ""
# alert_absolute = true # alert_absolute = true
# format = "{icon}/{available}" # format = "{icon}/{available}"
[[block]]
block = "disk_space"
path = "/media/store"
info_type = "available"
unit = "GB"
interval = 20
warning = 20.0
alert = 10.0
alert_absolute = true
format = "{icon}/store {available}"
[[block]] [[block]]
block = "disk_space" block = "disk_space"
path = "/home" path = "/home"

View File

@ -32,8 +32,7 @@ This function should only modify configuration layer settings."
;; List of configuration layers to load. ;; List of configuration layers to load.
dotspacemacs-configuration-layers dotspacemacs-configuration-layers
'(javascript '(
systemd
;; ---------------------------------------------------------------- ;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away. ;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or ;; Uncomment some layer names and press `SPC f e R' (Vim style) or
@ -49,25 +48,32 @@ This function should only modify configuration layer settings."
graphviz graphviz
helm helm
html html
javascript
latex latex
;; https://github.com/emacs-lsp/lsp-mode
(lsp :variables (lsp :variables
lsp-rust-server lsp-rust-server
'rust-analyzer) 'rust-analyzer)
markdown markdown
;; https://www.spacemacs.org/layers/+emacs/org/README.html
(org :variables (org :variables
org-enable-roam-support t) org-enable-roam-support t
org-enable-roam-ui t)
plantuml plantuml
python (python :variables python-backend 'lsp python-lsp-server 'mspyls)
;; https://develop.spacemacs.org/layers/+lang/rust/README.html
(rust :variables rust-backend 'lsp) (rust :variables rust-backend 'lsp)
shell shell
;; shell-scripts ;; shell-scripts
;; spell-checking ;; spell-checking
syntax-checking syntax-checking
systemd
(tree-sitter :variables (tree-sitter :variables
spacemacs-tree-sitter-hl-black-list '(js-mode js2-mode) spacemacs-tree-sitter-hl-black-list '(js-mode js2-mode)
tree-sitter-syntax-highlight-enable t tree-sitter-syntax-highlight-enable t
tree-sitter-fold-enable t tree-sitter-fold-enable t
tree-sitter-fold-indicators-enable t) tree-sitter-fold-indicators-enable t)
(typescript-mode (typescript-backend . lsp))
version-control version-control
yaml yaml
;; (shell :variables ;; (shell :variables
@ -76,7 +82,8 @@ This function should only modify configuration layer settings."
;; spell-checking ;; spell-checking
;; syntax-checking ;; syntax-checking
;; version-control ;; version-control
treemacs) ;; treemacs
)
;; List of additional packages that will be installed without being wrapped ;; List of additional packages that will be installed without being wrapped
@ -580,7 +587,6 @@ you should place your code here."
) )
(setq calendar-week-start-day 1) (setq calendar-week-start-day 1)
(setq calendar-intermonth-text (setq calendar-intermonth-text
'(propertize '(propertize
(format "%2d" (format "%2d"
@ -592,29 +598,19 @@ you should place your code here."
(setq calendar-intermonth-header (setq calendar-intermonth-header
(propertize "KW" ; or e.g. "Wk" (propertize "KW" ; or e.g. "Wk"
'font-lock-face 'font-lock-keyword-face)) 'font-lock-face 'font-lock-keyword-face))
(with-eval-after-load 'org (with-eval-after-load 'org
(when (file-exists-p "~/dotfiles/spacemacs-custom.el") (when (file-exists-p "~/dotfiles/spacemacs-custom.el")
(load-file "~/dotfiles/spacemacs-custom.el") (load-file "~/dotfiles/spacemacs-custom.el")
) )
) (when (file-exists-p "~/dotfiles/publish.el")
(load-file "~/dotfiles/publish.el")
)
)
) )
;; Do not write anything past this comment. This is where Emacs will ;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions. ;; auto-generate custom variable definitions.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
(company-auctex auctex flycheck-pos-tip pos-tip flycheck docker json-mode tablist docker-tramp json-snatcher json-reformat unfill mwim web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode company-web web-completion-data go-guru go-eldoc company-go go-mode yaml-mode smeargle orgit org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download mmm-mode markdown-toc markdown-mode magit-gitflow htmlize helm-gitignore helm-company helm-c-yasnippet gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy evil-magit magit magit-popup git-commit ghub treepy let-alist graphql with-editor diff-hl company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete dockerfile-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(defun dotspacemacs/emacs-custom-settings () (defun dotspacemacs/emacs-custom-settings ()
"Emacs custom settings. "Emacs custom settings.
This is an auto-generated function, do not modify its content directly, use This is an auto-generated function, do not modify its content directly, use
@ -626,8 +622,10 @@ This function is called at the very end of Spacemacs initialization."
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(evil-want-Y-yank-to-eol nil) '(evil-want-Y-yank-to-eol nil)
'(org-agenda-files
'("/home/fschl/Documents/Org/tasks.org" "/home/fschl/Documents/Org/journal.org" "/home/fschl/Documents/Org/private.org" "/home/fschl/Documents/Org/projects.org" "/home/fschl/Documents/Org/birthdays.org"))
'(package-selected-packages '(package-selected-packages
'(all-the-icons-gnus all-the-icons-completion all-the-icons-dired dap-mode lsp-docker bui company-auctex auctex flycheck-pos-tip pos-tip flycheck docker json-mode tablist docker-tramp json-snatcher json-reformat unfill mwim web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode company-web web-completion-data go-guru go-eldoc company-go go-mode yaml-mode smeargle orgit org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download mmm-mode markdown-toc markdown-mode magit-gitflow htmlize helm-gitignore helm-company helm-c-yasnippet gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy evil-magit magit magit-popup git-commit ghub treepy let-alist graphql with-editor diff-hl company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete dockerfile-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)) '(org-roam simple-httpd websocket org-roam-ui all-the-icons-gnus all-the-icons-completion all-the-icons-dired dap-mode lsp-docker bui company-auctex auctex flycheck-pos-tip pos-tip flycheck docker json-mode tablist docker-tramp json-snatcher json-reformat unfill mwim web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode company-web web-completion-data go-guru go-eldoc company-go go-mode yaml-mode smeargle orgit org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download mmm-mode markdown-toc markdown-mode magit-gitflow htmlize helm-gitignore helm-company helm-c-yasnippet gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gh-md fuzzy evil-magit magit magit-popup git-commit ghub treepy let-alist graphql with-editor diff-hl company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete dockerfile-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))
'(warning-suppress-types '((use-package) ((evil-collection))))) '(warning-suppress-types '((use-package) ((evil-collection)))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.

124
publish.el Normal file
View File

@ -0,0 +1,124 @@
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(setq org-export-with-broken-links 'mark)
(package-install 'htmlize)
(require 'htmlize)
(package-install 'simple-httpd)
(package-install 'websocket)
(package-install 'org-roam)
(package-install 'org-roam-ui)
(package-install 'f)
(require 'org-roam)
(require 'org-roam-ui)
(require 'ox-publish)
(setq org-export-html-coding-system 'utf-8-unix)
(setq org-html-doctype "html5")
(defvar fschlde-html-head "<link type='text/css' rel='stylesheet' href='../css/plain.css'>")
(setq fschlde-html-footer " <footer>\nfschl.de 2018-2023\n</footer>")
;; following two funcs are taken from
;; https://www.orgroam.com/manual.html#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f
;; sitemap function for my roam-publish
(defun roam-sitemap (title list)
(concat "#+OPTIONS: ^:nil author:nil html-postamble:nil\n"
"#+SETUPFILE: ./simple_inline.theme\n"
"#+TITLE: " title "\n\n"
(org-list-to-org list) "\nfile:sitemap.svg"))
(setq my-publish-time 0) ; see the next section for context
;;
(defun roam-publication-wrapper (plist filename pubdir)
(org-roam-graph)
(org-html-publish-to-html plist filename pubdir)
(setq my-publish-time (cadr (current-time))))
(defun org-roam-custom-link-builder (node)
(let ((file (org-roam-node-file node)))
(concat (file-name-base file) ".html")))
(setq org-roam-graph-link-builder 'org-roam-custom-link-builder)
(add-hook 'org-roam-graph-generation-hook
(lambda (dot svg) (if (< (- (cadr (current-time)) my-publish-time) 5)
(progn (copy-file svg "~/projects/blog-fschlde/pkb/sitemap.svg" 't)
(kill-buffer (file-name-nondirectory svg))
(setq my-publish-time 0)))))
(setq org-publish-project-alist
'(("website"
:components ("org-journal", "project-notes", "org-sites", "blog-rss", "blog-images"))
("org-journal"
:base-directory "~/Documents/Org/"
:base-extension "org"
:publishing-directory "~/projects/blog-fschlde/reads/"
:recursive nil
:publishing-function org-html-publish-to-html
:headline-levels 4
:with-author t
:with-creator nil
:with-date t
:with-toc t
:with-drawers nil
:html-link-home "/"
:html-head nil ;; cleans up anything that would have been in there.
;; :html-head-extra ,my-blog-extra-head
:html-head-include-default-style nil
:html-head-include-scripts nil
;; :html-preamble my-blog-header
;; :html-postamble ,my-blog-footer
)
("project-notes"
:base-directory "~/projects/"
:base-extension "org"
:publishing-directory "~/projects/blog-fschlde/projects/"
:recursive nil
:publishing-function org-html-publish-to-html
:headline-levels 4)
("org-sites"
:base-directory "~/projects/fschlde-static/"
:base-extension "org\\|css\\|js\\|ico\\|png\\|html"
:publishing-directory "~/projects/blog-fschlde/"
:recursive t
:publishing-function org-publish-attachment
:html-link-home "/"
;; :html-head ,fschlde-html-head ;; cleans up anything that would have been in there.
:html-head-include-default-style nil
:html-head-include-scripts nil
:with-drawers nil
:with-creator nil
;; :html-head-extra fschlde-html-head
;; :html-postamble fschlde-html-footer
:headline-levels 4)
("roam"
:base-directory "~/org-roam/"
:auto-sitemap t
:recursive nil
:base-extension "org"
:exclude ".stversions/\\|.stfolder"
:sitemap-function roam-sitemap
:sitemap-title "Roam notes"
:publishing-function roam-publication-wrapper
:publishing-directory "~/projects/blog-fschlde/pkb/"
:section-number nil
:table-of-contents nil
:style "<link rel=\"stylesheet\" href=\"../other/mystyle.cs\" type=\"text/css\">")
)
)

View File

@ -1,65 +1,23 @@
(setq org-roam-directory (file-truename "~/org-roam")) (setq org-roam-directory (file-truename "~/org-roam"))
(org-roam-db-autosync-mode) (org-roam-db-autosync-mode)
(require 'ox-publish)
(require 'org-projectile) (require 'org-projectile)
(setq org-export-html-coding-system 'utf-8-unix)
(setq org-html-doctype "html5")
(defvar fschlde-html-head "<link type='text/css' rel='stylesheet' href='../css/plain.css'>")
(setq fschlde-html-footer " <footer>\nfschl.de 2018-2022\n</footer>")
(setq org-publish-project-alist
'(("website"
:components ("org-journal", "project-notes", "org-sites", "blog-rss", "blog-images"))
("org-journal"
:base-directory "~/Documents/Org/"
:base-extension "org"
:publishing-directory "~/projects/blog-fschlde/reads/"
:recursive nil
:publishing-function org-html-publish-to-html
:headline-levels 4 (eval-after-load 'ox '(require 'ox-koma-letter))
:with-author t (eval-after-load 'ox-koma-letter
:with-creator nil '(progn
:with-date t (add-to-list 'org-latex-classes
'("Brief-de-modern"
"\\documentclass\[Brief-de-modern\]\{scrlttr2\}
\[DEFAULT-PACKAGES]
\[PACKAGES]
\[EXTRA]"))
:with-toc t ;; \\usepackage[english]{babel}
:with-drawers nil ;; \\setkomavar{frombank}{(1234)\\,567\\,890}
:html-link-home "/" (setq org-koma-letter-default-class "Brief-de-modern")))
:html-head nil ;; cleans up anything that would have been in there.
;; :html-head-extra ,my-blog-extra-head
:html-head-include-default-style nil
:html-head-include-scripts nil
;; :html-preamble my-blog-header
;; :html-postamble ,my-blog-footer
)
("project-notes"
:base-directory "~/projects/"
:base-extension "org"
:publishing-directory "~/projects/blog-fschlde/projects/"
:recursive nil
:publishing-function org-html-publish-to-html
:headline-levels 4)
("org-sites"
:base-directory "~/projects/fschlde-static/"
:base-extension "org"
:publishing-directory "~/projects/fschlde-static/"
:recursive t
:publishing-function org-html-publish-to-html
:html-link-home "/"
;; :html-head ,fschlde-html-head ;; cleans up anything that would have been in there.
:html-head-include-default-style nil
:html-head-include-scripts nil
:with-drawers nil
:with-creator nil
;; :html-head-extra fschlde-html-head
;; :html-postamble fschlde-html-footer
:headline-levels 4)
)
)
(setq org-default-notes-file "~/Documents/Org/tasks.org") (setq org-default-notes-file "~/Documents/Org/tasks.org")
(setq org-agenda-files (setq org-agenda-files
(quote ("~/Documents/Org/tasks.org" (quote ("~/Documents/Org/tasks.org"
@ -95,7 +53,24 @@
) )
("l" "letter to Documents/letters/<datetime.org>" ("l" "letter to Documents/letters/<datetime.org>"
entry (file fschl/create-org-letter) entry (file fschl/create-org-letter)
"* %? \n\n * \n\n " "* Preamble :noexport:
# #+TITLE: ?
# #+DATE:
# #+SUBJECT: test letter subject
#+LCO: Absender-Frieder
#+LCO: Brief-de-modern
#+STARTUP: showall
* To-address :to:
# * From :from:
* Sehr geehrte Damen und Herren,
?
* Mit freundlichen Grüßen, :closing: "
) )
("m" "Schedule a meeting" entry ("m" "Schedule a meeting" entry
(file+headline "~/Documents/Org/tasks.org") (file+headline "~/Documents/Org/tasks.org")
@ -117,6 +92,6 @@
) )
) )
(setq org-ref-default-bibliography '("~/Documents/WHZ/MA/latex/references.bib") (setq org-ref-default-bibliography '("~/Documents/references/references.bib")
org-ref-pdf-directory "~/Documents/WHZ/MA/references/" org-ref-pdf-directory "~/Documents/references/"
org-ref-bibliography-notes "~/Documents/WHZ/MA/notes.org") org-ref-bibliography-notes "~/Documents/references/notes.org")