From 6c2bc75f12296d2d297d849e482ced155044b022 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Fri, 16 Feb 2024 08:17:19 +0100 Subject: [PATCH 1/6] Fixed submodule issue for emacs/.emacs.d/ Signed-off-by: TuDatTr --- behemoth.sh | 9 ++ emacs/.doom.d/config.el | 145 ----------------------- emacs/.doom.d/custom.el | 152 ------------------------ emacs/.doom.d/init.el | 213 --------------------------------- emacs/.doom.d/packages.el | 59 --------- emacs/.emacs.d | 1 - emacs/.emacs.d/.gitignore | 4 + emacs/.emacs.d/config.org | 243 ++++++++++++++++++++++++++++++++++++++ emacs/.emacs.d/init.el | 13 ++ 9 files changed, 269 insertions(+), 570 deletions(-) create mode 100755 behemoth.sh delete mode 100644 emacs/.doom.d/config.el delete mode 100644 emacs/.doom.d/custom.el delete mode 100644 emacs/.doom.d/init.el delete mode 100644 emacs/.doom.d/packages.el delete mode 160000 emacs/.emacs.d create mode 100644 emacs/.emacs.d/.gitignore create mode 100644 emacs/.emacs.d/config.org create mode 100644 emacs/.emacs.d/init.el diff --git a/behemoth.sh b/behemoth.sh new file mode 100755 index 0000000..a5f8e38 --- /dev/null +++ b/behemoth.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# +# This is a file to create necessary parts of this environment for behemoth +# my desktop machine. +# + +ln -s /home/tuan/.dotfiles/emacs/.doom.d /home/tuan/.config/doom +ln -s /home/tuan/.dotfiles/config/.ssh /home/tuan/.ssh diff --git a/emacs/.doom.d/config.el b/emacs/.doom.d/config.el deleted file mode 100644 index ab4bd67..0000000 --- a/emacs/.doom.d/config.el +++ /dev/null @@ -1,145 +0,0 @@ -;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- - -;; Place your private configuration here! Remember, you do not need to run 'doom -;; sync' after modifying this file! - - -;; Some functionality uses this to identify you, e.g. GPG configuration, email -;; clients, file templates and snippets. It is optional. -(setq user-full-name "Tuan-Dat Tran" - user-mail-address "tuan-dat.tran@tudattr.dev") - -;; Doom exposes five (optional) variables for controlling fonts in Doom: -;; -;; - `doom-font' -- the primary font to use -;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) -;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for -;; presentations or streaming. -;; - `doom-unicode-font' -- for unicode glyphs -;; - `doom-serif-font' -- for the `fixed-pitch-serif' face -;; -;; See 'C-h v doom-font' for documentation and more examples of what they -;; accept. For example: -;; -;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) -;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) -;; -;; If you or Emacs can't find your font, use 'M-x describe-font' to look them -;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to -;; refresh your font settings. If Emacs still can't find your font, it likely -;; wasn't installed correctly. Font issues are rarely Doom issues! - -;; There are two ways to load a theme. Both assume the theme is installed and -;; available. You can either set `doom-theme' or manually load a theme with the -;; `load-theme' function. This is the default: -(setq doom-theme 'doom-one) - -;; This determines the style of line numbers in effect. If set to `nil', line -;; numbers are disabled. For relative line numbers, set this to `relative'. -(setq display-line-numbers-type t) - -;; If you use `org' and don't want your org files in the default location below, -;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/.emacs.d/org/") - - -;; Whenever you reconfigure a package, make sure to wrap your config in an -;; `after!' block, otherwise Doom's defaults may override your settings. E.g. -;; -;; (after! PACKAGE -;; (setq x y)) -;; -;; The exceptions to this rule: -;; -;; - Setting file/directory variables (like `org-directory') -;; - Setting variables which explicitly tell you to set them before their -;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). -;; - Setting doom variables (which start with 'doom-' or '+'). -;; -;; Here are some additional functions/macros that will help you configure Doom. -;; -;; - `load!' for loading external *.el files relative to this one -;; - `use-package!' for configuring packages -;; - `after!' for running code after a package has loaded -;; - `add-load-path!' for adding directories to the `load-path', relative to -;; this file. Emacs searches the `load-path' when you load packages with -;; `require' or `use-package'. -;; - `map!' for binding new keys -;; -;; To get information about any of these functions/macros, move the cursor over -;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). -;; This will open documentation for it, including demos of how they are used. -;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, -;; etc). -;; -;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how -;; they are implemented. - -; Rust -(use-package rustic - :bind (:map rustic-mode-map - ("M-j" . lsp-ui-imenu) - ("M-?" . lsp-find-references) - ("C-c C-c l" . flycheck-list-errors) - ("C-c C-c a" . lsp-execute-code-action) - ("C-c C-c r" . lsp-rename) - ("C-c C-c q" . lsp-workspace-restart) - ("C-c C-c Q" . lsp-workspace-shutdown) - ("C-c C-c s" . lsp-rust-analyzer-status)) - :config - (setq rustic-format-on-save t) - (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)) - -(defun rk/rustic-mode-hook () - ;; so that run C-c C-c C-r works without having to confirm, but don't try to - ;; save rust buffers that are not file visiting. Once - ;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should - ;; no longer be necessary. - (when buffer-file-name - (setq-local buffer-save-without-query t)) - (add-hook 'before-save-hook 'lsp-format-buffer nil t)) - -(use-package lsp-mode - :commands lsp - :custom - ;; what to use when checking on-save. "check" is default, I prefer clippy - (lsp-rust-analyzer-cargo-watch-command "clippy") - (lsp-eldoc-render-all t) - (lsp-idle-delay 0.6) - ;; enable / disable the hints as you prefer: - (lsp-rust-analyzer-server-display-inlay-hints t) - (lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial") - (lsp-rust-analyzer-display-chaining-hints t) - (lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil) - (lsp-rust-analyzer-display-closure-return-type-hints t) - (lsp-rust-analyzer-display-parameter-hints nil) - (lsp-rust-analyzer-display-reborrow-hints nil) - :config - (add-hook 'lsp-mode-hook 'lsp-ui-mode)) - -(use-package lsp-ui - :commands lsp-ui-mode - :custom - (lsp-ui-peek-always-show t) - (lsp-ui-sideline-show-hover t) - (lsp-ui-doc-enable nil)) - -; Latex -(setq +latex-viewers '(zathura)) - -; Roam -(setq org-roam-directory "~/Documents/roam/") -(use-package! websocket - :after org-roam) - -(use-package! org-roam-ui - :after org-roam ;; or :after org -;; normally we'd recommend hooking orui after org-roam, but since org-roam does not have -;; a hookable mode anymore, you're advised to pick something yourself -;; if you don't care about startup time, use -;; :hook (after-init . org-roam-ui-mode) - :config - (setq org-roam-ui-sync-theme t - org-roam-ui-follow t - org-roam-ui-update-on-save t - org-roam-ui-open-on-start t)) diff --git a/emacs/.doom.d/custom.el b/emacs/.doom.d/custom.el deleted file mode 100644 index f4cbef3..0000000 --- a/emacs/.doom.d/custom.el +++ /dev/null @@ -1,152 +0,0 @@ -(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. - '(org-hugo-base-dir "~/Documents/hugo/") - '(org-roam-capture-templates - '(("d" "default" plain "* Description -%? - -* Resources -- " :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}") -:unnarrowed t) - ("r" "Code Implementation" plain "* Description -%? - -* Methods - -** TODO - -*** Description - -*** Code - -* Resources -- " :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} -#+filetags: code") -:unnarrowed t) - ("t" "Rust Traits" plain "* Description -%? - -* Notable Implementations/Subtraits - - - -* Methods - -** TODO - -*** Description - -*** Code - -* Resources -- " :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} -#+filetags: rust-trait") -:unnarrowed t) - ("P" "project" plain "* Project Overview -- Type: %^{Project Type} -- Project Partners: - - %? - -* Project Description - -* Tasks - -** TODO Add initial taks - -* Sprints - -** -" :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} -#+filetags: project") -:unnarrowed t) -("i" "ieee paper" plain " -#+title: %^{title} -#+OPTIONS: toc:nil author:nil -#+LaTeX_CLASS: paper -# LaTeX_HEADER: \\documentclass[12pt,a4paper,conference,final,twoside]{IEEEtran} -#+LaTeX_HEADER: \\title{%^{title}} -#+LaTeX_HEADER: \\author{\\IEEEauthorblockN{Tuan-Dat Tran\\\\\\small(3030462)}\\\\\\IEEEauthorblockA{University of Duisburg-Essen\\\\tuan-dat.tran@stud.uni-due.de}} -#+LaTeX_HEADER: \\usepackage[utf8]{inputenc} -#+LaTeX_HEADER: \\usepackage[T1]{fontenc} -#+LaTeX_HEADER: \\usepackage{lmodern} -#+LaTeX_HEADER: \\usepackage[english]{babel} -#+LaTeX_HEADER: \\usepackage[backend=biber,doi=true,url=true,block=ragged,maxnames=6]{biblatex} -#+LaTeX_HEADER: \\renewcommand*{\\bibfont}{\\footnotesize} -#+LaTeX_HEADER: \\pagestyle{plain} -#+LaTeX_HEADER: \\usepackage{siunitx} -#+LaTeX_HEADER: \\RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor} -#+LaTeX_HEADER: \\usepackage{cleveref} -#+LaTeX_HEADER: \\usepackage{graphicx} -#+LaTeX_HEADER: \\graphicspath{{./images/}} -#+LaTeX_HEADER: \\usepackage{csquotes} -#+LaTeX_HEADER: \\MakeOuterQuote{\"} -#+LaTeX_HEADER: \\usepackage{balance} -#+LaTeX_HEADER: \\clubpenalty10000 -#+LaTeX_HEADER: \\widowpenalty10000 -#+LaTeX_HEADER: \\usepackage{listings} -#+LaTeX_HEADER: \\definecolor{lstgreen}{rgb}{0,0.6,0} -#+LaTeX_HEADER: \\lstset{language=C,%basicstyle=\\scriptsize\\sourcecodepro,%basicstyle=\\scriptsize\\ttfamily,basicstyle=\\linespread{1.1}\\scriptsize\\ttfamily,commentstyle=\\color{lstgreen},keywordstyle=\\color{blue},keywordstyle=[2]\\color{SlateBlue},keywordstyle=[3]\\color{DarkCyan},keywordstyle=[4]\\color{violet},%ndkeywordstyle=\\color{violet},emphstyle=\\bfseries\\color{DarkGray},identifierstyle=\\color{black},commentstyle=\\color{purple}\\ttfamily,stringstyle=\\color{gray}\\ttfamily,%numbers=left,numbers=left,numberstyle=\\tiny,columns=fullflexible,keepspaces=true,showstringspaces=false,captionpos=b,%xleftmargin=\\parindent,%framexleftmargin=\\parindent,%xleftmargin=2cm,%linewidth=\\textwidth,%xleftmargin=2cm,xleftmargin=2em,%xleftmargin=3pt,xrightmargin=3pt,%aboveskip=\\bigskipamount,%belowskip=\\bigskipamount,%fancyvrb=true,frame=single,%frame=L,escapechar=@,} -#+LaTeX_HEADER: \\lstdefinestyle{plain}{ numbers=none,frame=none,xleftmargin=1pt,xrightmargin=1pt,} -#+LaTeX_HEADER: \\crefname{lstlisting}{listing}{listing} -#+LaTeX_HEADER: \\Crefname{lstlisting}{Listing}{Listings} -#+LaTeX_HEADER: \\usepackage{blindtext} -#+LaTeX_HEADER: \\newcommand\\blindsection{{\\color{gray}\\subsection{Some bind text}\\blindtext}} - -%? -" :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} -#+filetags: paper") -:unnarrowed t) - ("p" "paper notes" plain "* Authors -- %? - -* Index Terms -- - -* Short Summary -" :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title} -#+filetags: paper") -:unnarrowed t) - ("l" "programming language" plain "* Description -%? - -* Programming Language Properties -- - -* Benefits -- - -* Examples -** Hello World -#+begin_src ${title} -#+end_src -" :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}") -:unnarrowed t) - ("L" "lecture" plain "- Lecture: ${title} -- Lecturer: %^{Docent} -- Research Group: %^{Research Group} -* Description -" :target -(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}") -:unnarrowed t nil nil)))) -(require 'ox-latex) -(unless (boundp 'org-latex-classes) - (setq org-latex-classes nil)) -(add-to-list 'org-latex-classes - '("paper" - "\\documentclass[12pt,a4paper,conference,final,twoside]{IEEEtran}" - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) - diff --git a/emacs/.doom.d/init.el b/emacs/.doom.d/init.el deleted file mode 100644 index e58b94a..0000000 --- a/emacs/.doom.d/init.el +++ /dev/null @@ -1,213 +0,0 @@ -;;; init.el -*- lexical-binding: t; -*- - -;; This file controls what Doom modules are enabled and what order they load -;; in. Remember to run 'doom sync' after modifying it! - -;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's -;; documentation. There you'll find a link to Doom's Module Index where all -;; of our modules are listed, including what flags they support. - -;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or -;; 'C-c c k' for non-vim users) to view its documentation. This works on -;; flags as well (those symbols that start with a plus). -;; -;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its -;; directory (for easy access to its source code). - -(doom! :input - ;;bidi ; (tfel ot) thgir etirw uoy gnipleh - ;;chinese - ;;japanese - ;;layout ; auie,ctsrnm is the superior home row - - :completion - company ; the ultimate code completion backend - ;;helm ; the *other* search engine for love and life - ;;ido ; the other *other* search engine... - ;;ivy ; a search engine for love and life - vertico ; the search engine of the future - - :ui - ;;deft ; notational velocity for Emacs - doom ; what makes DOOM look the way it does - doom-dashboard ; a nifty splash screen for Emacs - ;;doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji - +unicode) ; 🙂 - hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW - ;;hydra - ;;indent-guides ; highlighted indent columns - ;;ligatures ; ligatures and symbols to make your code pretty again - minimap ; show a map of the code on the side - modeline ; snazzy, Atom-inspired modeline, plus API - ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on - (popup - +defaults) ; tame sudden yet inevitable temporary windows - ;;tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler - ;;unicode ; extended unicode support for various languages - (vc-gutter - +pretty) ; vcs diff in the fringe - vi-tilde-fringe ; fringe tildes to mark beyond EOB - ;;window-select ; visually switch windows - workspaces ; tab emulation, persistence & separate workspaces - ;;zen ; distraction-free coding or writing - - :editor - (evil - +everywhere); come to the dark side, we have cookies - file-templates ; auto-snippets for empty files - fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness - ;;god ; run Emacs commands without modifier keys - ;;lispy ; vim for lisp, for people who don't like vim - ;;multiple-cursors ; editing in many places at once - ;;objed ; text object editing for the innocent - ;;parinfer ; turn lisp into python, sort of - ;;rotate-text ; cycle region at point between text candidates - snippets ; my elves. They type so I don't have to - ;;word-wrap ; soft wrapping with language-aware indent - - :emacs - dired ; making dired pretty [functional] - electric ; smarter, keyword-based electric-indent - ;;ibuffer ; interactive buffer management - undo ; persistent, smarter undo for your inevitable mistakes - vc ; version-control and Emacs, sitting in a tree - - :term - ;;eshell ; the elisp shell that works everywhere - ;;shell ; simple shell REPL for Emacs - ;;term ; basic terminal emulator for Emacs - ;;vterm ; the best terminal emulation in Emacs - - :checkers - syntax ; tasing you for every semicolon you forget - ;;(spell +flyspell) ; tasing you for misspelling mispelling - ;;grammar ; tasing grammar mistake every you make - - :tools - ;;ansible - biblio ; Writes a PhD for you (citation needed) - debugger ; FIXME stepping through code, to help you add bugs - ;;direnv - docker - ;;editorconfig ; let someone else argue about tabs vs spaces - ;;ein ; tame Jupyter notebooks with emacs - (eval - +overlay) ; run code, run (also, repls) - ;;gist ; interacting with github gists - lookup ; navigate your code and its documentation - lsp ; M-x vscode - magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs - ;;pass ; password manager for nerds - pdf ; pdf enhancements - ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings - ;;taskrunner ; taskrunner for all your projects - terraform ; infrastructure as code - ;;tmux ; an API for interacting with tmux - ;;tree-sitter ; syntax and parsing, sitting in a tree... - ;;upload ; map local to remote projects via ssh/ftp - - :os - (:if IS-MAC macos) ; improve compatibility with macOS - (tty - +osc) ; improve the terminal Emacs experience - - :lang - ;;agda ; types of types of types of types... - ;;beancount ; mind the GAAP - ;;(cc +lsp) ; C > C++ == 1 - ;;clojure ; java with a lisp - ;;common-lisp ; if you've seen one lisp, you've seen them all - ;;coq ; proofs-as-programs - ;;crystal ; ruby at the speed of c - ;;csharp ; unity, .NET, and mono shenanigans - ;;data ; config/data formats - ;;(dart +flutter) ; paint ui and not much else - ;;dhall - ;;elixir ; erlang done right - ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses - ;;erlang ; an elegant language for a more civilized age - ;;ess ; emacs speaks statistics - ;;factor - ;;faust ; dsp, but you get to keep your soul - ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) - ;;fsharp ; ML stands for Microsoft's Language - ;;fstar ; (dependent) types and (monadic) effects and Z3 - ;;gdscript ; the language you waited for - ;;(go +lsp) ; the hipster dialect - ;;(graphql +lsp) ; Give queries a REST - ;;(haskell +lsp) ; a language that's lazier than I am - ;;hy ; readability of scheme w/ speed of python - ;;idris ; a language you can depend on - ;;json ; At least it ain't XML - ;;(java +lsp) ; the poster child for carpal tunnel syndrome - ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) - ;;julia ; a better, faster MATLAB - ;;kotlin ; a better, slicker Java(Script) - (latex - +latexmk - +lsp) ; writing papers in Emacs has never been so fun - ;;lean ; for folks with too much to prove - ledger ; be audit you can be - ;;lua ; one-based indices? one-based indices - markdown ; writing docs for people to ignore - ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" - ;;ocaml ; an objective camel - (org ; organize your plain life in plain text - +dragndrop - +gnuplot - +hugo - +pandoc - +present - +pretty - +roam2) - ;;php ; perl's insecure younger brother - ;;plantuml ; diagrams for confusing people more - ;;purescript ; javascript, but functional - (python - +lsp) ; beautiful is better than ugly - ;;qt ; the 'cutest' gui framework ever - ;;racket ; a DSL for DSLs - ;;raku ; the artist formerly known as perl6 - ;;rest ; Emacs as a REST client - ;;rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - (rust - +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - ;;scala ; java, but good - ;;(scheme +guile) ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor - ;;sml - ;;solidity ; do you need a blockchain? No. - ;;swift ; who asked for emoji variables? - ;;terra ; Earth and Moon in alignment for performance. - ;;web ; the tubes - yaml ; JSON, but readable - ;;zig ; C, but simpler - - :email - ;;(mu4e +org +gmail) - ;;notmuch - ;;(wanderlust +gmail) - - :app - ;;calendar - ;;emms - ;;everywhere ; *leave* Emacs!? You must be joking - ;;irc ; how neckbeards socialize - ;;(rss +org) ; emacs as an RSS reader - ;;twitter ; twitter client https://twitter.com/vnought - - :config - ;;literate - (default - +bindings - +smartparens)) diff --git a/emacs/.doom.d/packages.el b/emacs/.doom.d/packages.el deleted file mode 100644 index 2cb0a06..0000000 --- a/emacs/.doom.d/packages.el +++ /dev/null @@ -1,59 +0,0 @@ -;; -*- no-byte-compile: t; -*- -;;; $DOOMDIR/packages.el - -;; To install a package with Doom you must declare them here and run 'doom sync' -;; on the command line, then restart Emacs for the changes to take effect -- or -;; use 'M-x doom/reload'. - - -;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: -;(package! some-package) - -;; To install a package directly from a remote git repo, you must specify a -;; `:recipe'. You'll find documentation on what `:recipe' accepts here: -;; https://github.com/radian-software/straight.el#the-recipe-format -;(package! another-package -; :recipe (:host github :repo "username/repo")) - -;; If the package you are trying to install does not contain a PACKAGENAME.el -;; file, or is located in a subdirectory of the repo, you'll need to specify -;; `:files' in the `:recipe': -;(package! this-package -; :recipe (:host github :repo "username/repo" -; :files ("some-file.el" "src/lisp/*.el"))) - -;; If you'd like to disable a package included with Doom, you can do so here -;; with the `:disable' property: -;(package! builtin-package :disable t) - -;; You can override the recipe of a built in package without having to specify -;; all the properties for `:recipe'. These will inherit the rest of its recipe -;; from Doom or MELPA/ELPA/Emacsmirror: -;(package! builtin-package :recipe (:nonrecursive t)) -;(package! builtin-package-2 :recipe (:repo "myfork/package")) - -;; Specify a `:branch' to install a package from a particular branch or tag. -;; This is required for some packages whose default branch isn't 'master' (which -;; our package manager can't deal with; see radian-software/straight.el#279) -;(package! builtin-package :recipe (:branch "develop")) - -;; Use `:pin' to specify a particular commit to install. -;(package! builtin-package :pin "1a2b3c4d5e") - - -;; Doom's packages are pinned to a specific commit and updated from release to -;; release. The `unpin!' macro allows you to unpin single packages... -;(unpin! pinned-package) -;; ...or multiple packages -;(unpin! pinned-package another-pinned-package) -;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) -;(unpin! t) - -(package! rustic) -(package! lsp-mode) -(package! lsp-ui) -(package! flycheck) -(package! ledger-mode) - -(unpin! org-roam) -(package! org-roam-ui) diff --git a/emacs/.emacs.d b/emacs/.emacs.d deleted file mode 160000 index b66ad77..0000000 --- a/emacs/.emacs.d +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b66ad7703134d8a91e8ae1fab84af3bb90fcca03 diff --git a/emacs/.emacs.d/.gitignore b/emacs/.emacs.d/.gitignore new file mode 100644 index 0000000..b407378 --- /dev/null +++ b/emacs/.emacs.d/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!config.org +!init.el diff --git a/emacs/.emacs.d/config.org b/emacs/.emacs.d/config.org new file mode 100644 index 0000000..9525a3d --- /dev/null +++ b/emacs/.emacs.d/config.org @@ -0,0 +1,243 @@ +* Packet + + #+begin_src emacs-lisp + (require 'package) + (setq package-archives '(("melpa" . "https://melpa.org/packages/") + ("gnu" . "https://elpa.gnu.org/packages/"))) + (package-initialize) + (package-refresh-contents) + #+end_src + +* Use Package + + #+begin_src emacs-lisp + (unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + + (require 'use-package) + (setq use-package-always-ensure t) + #+end_src + +* Plugins +** Evil + + #+begin_src emacs-lisp + (use-package evil + :init + (setq evil-want-keybinding nil) + :config + (evil-mode 1) + (setq evil-search-module 'evil-search) + + ) + + (use-package evil-collection + :config + (evil-collection-init)) + #+end_src + +** no-littering + #+begin_src emacs-lisp +(use-package no-littering) + #+end_src + +** simpleclip + #+begin_src emacs-lisp +(use-package simpleclip + :config + (simpleclip-mode 1)) + #+end_src + +** org-bullets + #+begin_src emacs-lisp +(use-package org-bullets) + #+end_src +** rainbow-delimiters + #+begin_src emacs-lisp +(use-package rainbow-delimiters) + #+end_src +** projectile + #+begin_src emacs-lisp +(use-package projectile) + #+end_src +** ledger-mode + #+begin_src emacs-lisp +(use-package ledger-mode + :mode ("\\.ledger\\'") + :config + (autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t) + (add-to-list 'load-path + (expand-file-name "~/Documents/paisa/")) + (add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode)) + ) + #+end_src +** org-bullets + #+begin_src emacs-lisp + #+end_src +** flycheck + #+begin_src emacs-lisp +(use-package flycheck :ensure) + #+end_src + +* Global +** emacs-one-themes + #+begin_src emacs-lisp +(use-package one-themes + :init + (load-theme 'one-dark t)) + #+end_src + +** Menubar + #+begin_src emacs-lisp +(menu-bar-mode -1) +(tool-bar-mode -1) + #+end_src + +** Symlinks + #+begin_src emacs-lisp +(setq vc-follow-symlinks t) + #+end_src + +** spaces>tabs + #+begin_src emacs-lisp +(setq-default indent-tabs-mode nil) + #+end_src + +** lsp inlay hints globally + #+begin_src +(setq-local lsp-inlay-hint-enable t) + #+end_src +* Org-mode +** hook + #+begin_src emacs-lisp +(add-hook 'org-mode-hook + (lambda () + (org-bullets-mode 1) + (setq org-pretty-entities f) + (setq org-src-fontify-natively 1))) + #+end_src +* keybinding +** simpleclip + #+begin_src emacs-lisp + (define-key evil-normal-state-map (kbd "Y") 'simpleclip-yank) + (define-key evil-normal-state-map (kbd "P") 'simpleclip-paste) + #+end_src +* Rust +** Rustic + #+begin_src emacs-lisp +(use-package rustic + :ensure + :bind (:map rustic-mode-map + ("M-j" . lsp-ui-imenu) + ("M-?" . lsp-find-references) + ("C-c C-c l" . flycheck-list-errors) + ("C-c C-c a" . lsp-execute-code-action) + ("C-c C-c r" . lsp-rename) + ("C-c C-c q" . lsp-workspace-restart) + ("C-c C-c Q" . lsp-workspace-shutdown) + ("C-c C-c s" . lsp-rust-analyzer-status)) + :config + ;; uncomment for less flashiness + ;; (setq lsp-eldoc-hook nil) + ;; (setq lsp-enable-symbol-highlighting nil) + ;; (setq lsp-signature-auto-activate nil) + + ;; comment to disable rustfmt on save + (setq rustic-format-on-save t) + (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)) + +(defun rk/rustic-mode-hook () + ;; so that run C-c C-c C-r works without having to confirm, but don't try to + ;; save rust buffers that are not file visiting. Once + ;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should + ;; no longer be necessary. + (when buffer-file-name + (setq-local buffer-save-without-query t)) + (add-hook 'before-save-hook 'lsp-format-buffer nil t)) + #+end_src +** LSP + #+begin_src emacs-lisp +(use-package lsp-mode + :ensure + :commands lsp + :custom + ;; what to use when checking on-save. "check" is default, I prefer clippy + (lsp-rust-analyzer-cargo-watch-command "clippy") + (lsp-eldoc-render-all t) + (lsp-idle-delay 0.6) + ;; enable / disable the hints as you prefer: + (lsp-inlay-hint-enable t) + ;; These are optional configurations. See https://emacs-lsp.github.io/lsp-mode/page/lsp-rust-analyzer/#lsp-rust-analyzer-display-chaining-hints for a full list + (lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial") + (lsp-rust-analyzer-display-chaining-hints t) + (lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil) + (lsp-rust-analyzer-display-closure-return-type-hints t) + (lsp-rust-analyzer-display-parameter-hints nil) + (lsp-rust-analyzer-display-reborrow-hints nil) + :config + (add-hook 'lsp-mode-hook 'lsp-ui-mode)) + +(use-package lsp-ui + :ensure + :commands lsp-ui-mode + :custom + (lsp-ui-peek-always-show t) + (lsp-ui-sideline-show-hover t) + (lsp-ui-doc-enable nil)) + #+end_src + +** company + #+begin_src emacs-lisp +(use-package company + :ensure + :custom + (company-idle-delay 0.5) ;; how long to wait until popup + ;; (company-begin-commands nil) ;; uncomment to disable popup + :bind + (:map company-active-map + ("C-n". company-select-next) + ("C-p". company-select-previous) + ("M-<". company-select-first) + ("M->". company-select-last) + ("". tab-indent-or-complete) +("TAB". tab-indent-or-complete))) + +(use-package yasnippet + :ensure + :config + (yas-reload-all) + (add-hook 'prog-mode-hook 'yas-minor-mode) + (add-hook 'text-mode-hook 'yas-minor-mode)) +(defun company-yasnippet-or-completion () + (interactive) + (or (do-yas-expand) + (company-complete-common))) + +(defun check-expansion () + (save-excursion + (if (looking-at "\\_>") t + (backward-char 1) + (if (looking-at "\\.") t + (backward-char 1) + (if (looking-at "::") t nil))))) + +(defun do-yas-expand () + (let ((yas/fallback-behavior 'return-nil)) + (yas/expand))) + +(defun tab-indent-or-complete () + (interactive) + (if (minibufferp) + (minibuffer-complete) + (if (or (not yas/minor-mode) + (null (do-yas-expand))) + (if (check-expansion) + (company-complete-common) + (indent-for-tab-command))))) + #+end_src + +* Solidity + #+begin_src emacs-lisp +(use-package solidity-mode) + #+end_src diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el new file mode 100644 index 0000000..76ad4c4 --- /dev/null +++ b/emacs/.emacs.d/init.el @@ -0,0 +1,13 @@ +(org-babel-load-file "~/.emacs.d/config.org") +(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 '(evil-collection evil use-package))) +(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. + ) From 9ceae68f52f7a8ea01bdd5c8a0367c7c64a5fb76 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Sat, 17 Feb 2024 11:18:54 +0100 Subject: [PATCH 2/6] alacritty update and emacs config Signed-off-by: TuDatTr --- config/.config/alacritty/alacritty.toml | 19 + config/.config/alacritty/alacritty.yml | 895 ------------------------ config/.config/i3/config | 25 +- config/.local/share/ranger/bookmarks | 2 +- config/.ssh/config | 6 + emacs/.emacs.d/config.org | 345 +++++---- 6 files changed, 192 insertions(+), 1100 deletions(-) create mode 100644 config/.config/alacritty/alacritty.toml delete mode 100644 config/.config/alacritty/alacritty.yml diff --git a/config/.config/alacritty/alacritty.toml b/config/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..2b1d557 --- /dev/null +++ b/config/.config/alacritty/alacritty.toml @@ -0,0 +1,19 @@ +[font] +size = 7 + +[font.bold] +style = "Bold" + +[font.bold_italic] +style = "Bold Italic" + +[font.italic] +style = "Italic" + +[font.normal] +family = "DejaVu Sans Mono for Powerline" +style = "Regular" + +[window] +decorations = "none" +opacity = 0.9 diff --git a/config/.config/alacritty/alacritty.yml b/config/.config/alacritty/alacritty.yml deleted file mode 100644 index e090ec7..0000000 --- a/config/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,895 +0,0 @@ -# Configuration for Alacritty, the GPU enhanced terminal emulator. - -# Import additional configuration files -# -# Imports are loaded in order, skipping all missing files, with the importing -# file being loaded last. If a field is already present in a previous import, it -# will be replaced. -# -# All imports must either be absolute paths starting with `/`, or paths relative -# to the user's home directory starting with `~/`. -#import: -# - /path/to/alacritty.yml - -# Any items in the `env` entry below will be added as -# environment variables. Some entries may override variables -# set by alacritty itself. -#env: - # TERM variable - # - # This value is used to set the `$TERM` environment variable for - # each instance of Alacritty. If it is not present, alacritty will - # check the local terminfo database and use `alacritty` if it is - # available, otherwise `xterm-256color` is used. - #TERM: alacritty - -window: - # Window dimensions (changes require restart) - # - # Number of lines/columns (not pixels) in the terminal. Both lines and columns - # must be non-zero for this to take effect. The number of columns must be at - # least `2`, while using a value of `0` for columns and lines will fall back - # to the window manager's recommended size - #dimensions: - # columns: 0 - # lines: 0 - - # Window position (changes require restart) - # - # Specified in number of pixels. - # If the position is not set, the window manager will handle the placement. - #position: - # x: 0 - # y: 0 - - # Window padding (changes require restart) - # - # Blank space added around the window in pixels. This padding is scaled - # by DPI and the specified value is always added at both opposing sides. - #padding: - # x: 0 - # y: 0 - - # Spread additional padding evenly around the terminal content. - #dynamic_padding: false - - # Window decorations - # - # Values for `decorations`: - # - full: Borders and title bar - # - none: Neither borders nor title bar - # - # Values for `decorations` (macOS only): - # - transparent: Title bar, transparent background and title bar buttons - # - buttonless: Title bar, transparent background and no title bar buttons - decorations: none - - # Background opacity - # - # Window opacity as a floating point number from `0.0` to `1.0`. - # The value `0.0` is completely transparent and `1.0` is opaque. - opacity: 0.9 - - # Startup Mode (changes require restart) - # - # Values for `startup_mode`: - # - Windowed - # - Maximized - # - Fullscreen - # - # Values for `startup_mode` (macOS only): - # - SimpleFullscreen - #startup_mode: Windowed - - # Window title - #title: Alacritty - - # Allow terminal applications to change Alacritty's window title. - #dynamic_title: true - - # Window class (Linux/BSD only): - #class: - # Application instance name - #instance: Alacritty - # General application class - #general: Alacritty - - # Decorations theme variant (Linux/BSD only) - # - # Override the variant of the GTK theme/Wayland client side decorations. - # Commonly supported values are `dark` and `light`. Set this to `None` to use - # the default theme variant. - #decorations_theme_variant: None - -#scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - #history: 10000 - - # Scrolling distance multiplier. - #multiplier: 3 - -# Font configuration -font: - # Normal (roman) font face - normal: - # Font family - # - # Default: - # - (macOS) Menlo - # - (Linux/BSD) monospace - # - (Windows) Consolas - family: DejaVu Sans Mono for Powerline - - # The `style` can be specified to pick a specific face. - style: Regular - - # Bold font face - bold: - # Font family - # - # If the bold family is not specified, it will fall back to the - # value specified for the normal font. - # family: monospace - - # The `style` can be specified to pick a specific face. - style: Bold - - # Italic font face - italic: - # Font family - # - # If the italic family is not specified, it will fall back to the - # value specified for the normal font. - # family: monospace - - # The `style` can be specified to pick a specific face. - style: Italic - - # Bold italic font face - bold_italic: - # Font family - # - # If the bold italic family is not specified, it will fall back to the - # value specified for the normal font. - # family: monospace - - # The `style` can be specified to pick a specific face. - style: Bold Italic - - # Point size - size: 7 - - # Offset is the extra space around each character. `offset.y` can be thought - # of as modifying the line spacing, and `offset.x` as modifying the letter - # spacing. - #offset: - # x: 0 - # y: 0 - - # Glyph offset determines the locations of the glyphs within their cells with - # the default being at the bottom. Increasing `x` moves the glyph to the - # right, increasing `y` moves the glyph upward. - #glyph_offset: - # x: 0 - # y: 0 - - # Use built-in font for box drawing characters. - # - # If `true`, Alacritty will use a custom built-in font for box drawing - # characters (Unicode points 2500 - 259f). - # - #builtin_box_drawing: true - -# If `true`, bold text is drawn using the bright color variants. -#draw_bold_text_with_bright_colors: false - -# Colors (Tomorrow Night) -#colors: - # Default colors - #primary: - # background: '#1d1f21' - # foreground: '#c5c8c6' - - # Bright and dim foreground colors - # - # The dimmed foreground color is calculated automatically if it is not - # present. If the bright foreground color is not set, or - # `draw_bold_text_with_bright_colors` is `false`, the normal foreground - # color will be used. - #dim_foreground: '#828482' - #bright_foreground: '#eaeaea' - - # Cursor colors - # - # Colors which should be used to draw the terminal cursor. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #cursor: - # text: CellBackground - # cursor: CellForeground - - # Vi mode cursor colors - # - # Colors for the cursor when the vi mode is active. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #vi_mode_cursor: - # text: CellBackground - # cursor: CellForeground - - # Search colors - # - # Colors used for the search bar and match highlighting. - #search: - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #matches: - # foreground: '#000000' - # background: '#ffffff' - #focused_match: - # foreground: '#ffffff' - # background: '#000000' - - # Keyboard hints - #hints: - # First character in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #start: - # foreground: '#1d1f21' - # background: '#e9ff5e' - - # All characters after the first one in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #end: - # foreground: '#e9ff5e' - # background: '#1d1f21' - - # Line indicator - # - # Color used for the indicator displaying the position in history during - # search and vi mode. - # - # By default, these will use the opposing primary color. - #line_indicator: - # foreground: None - # background: None - - # Footer bar - # - # Color used for the footer bar on the bottom, used by search regex input, - # hyperlink URI preview, etc. - # - #footer_bar: - # background: '#c5c8c6' - # foreground: '#1d1f21' - - # Selection colors - # - # Colors which should be used to draw the selection area. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #selection: - # text: CellBackground - # background: CellForeground - - # Normal colors - #normal: - # black: '#1d1f21' - # red: '#cc6666' - # green: '#b5bd68' - # yellow: '#f0c674' - # blue: '#81a2be' - # magenta: '#b294bb' - # cyan: '#8abeb7' - # white: '#c5c8c6' - - # Bright colors - #bright: - # black: '#666666' - # red: '#d54e53' - # green: '#b9ca4a' - # yellow: '#e7c547' - # blue: '#7aa6da' - # magenta: '#c397d8' - # cyan: '#70c0b1' - # white: '#eaeaea' - - # Dim colors - # - # If the dim colors are not set, they will be calculated automatically based - # on the `normal` colors. - #dim: - # black: '#131415' - # red: '#864343' - # green: '#777c44' - # yellow: '#9e824c' - # blue: '#556a7d' - # magenta: '#75617b' - # cyan: '#5b7d78' - # white: '#828482' - - # Indexed Colors - # - # The indexed colors include all colors from 16 to 256. - # When these are not set, they're filled with sensible defaults. - # - # Example: - # `- { index: 16, color: '#ff00ff' }` - # - #indexed_colors: [] - - # Transparent cell backgrounds - # - # Whether or not `window.opacity` applies to all cell backgrounds or only to - # the default background. When set to `true` all cells will be transparent - # regardless of their background color. - #transparent_background_colors: false - -# Bell -# -# The bell is rung every time the BEL control character is received. -#bell: - # Visual Bell Animation - # - # Animation effect for flashing the screen when the visual bell is rung. - # - # Values for `animation`: - # - Ease - # - EaseOut - # - EaseOutSine - # - EaseOutQuad - # - EaseOutCubic - # - EaseOutQuart - # - EaseOutQuint - # - EaseOutExpo - # - EaseOutCirc - # - Linear - #animation: EaseOutExpo - - # Duration of the visual bell flash in milliseconds. A `duration` of `0` will - # disable the visual bell animation. - #duration: 0 - - # Visual bell animation color. - #color: '#ffffff' - - # Bell Command - # - # This program is executed whenever the bell is rung. - # - # When set to `command: None`, no command will be executed. - # - # Example: - # command: - # program: notify-send - # args: ["Hello, World!"] - # - #command: None - -#selection: - # This string contains all characters that are used as separators for - # "semantic words" in Alacritty. - #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" - - # When set to `true`, selected text will be copied to the primary clipboard. - #save_to_clipboard: false - -#cursor: - # Cursor style - #style: - # Cursor shape - # - # Values for `shape`: - # - ▇ Block - # - _ Underline - # - | Beam - #shape: Block - - # Cursor blinking state - # - # Values for `blinking`: - # - Never: Prevent the cursor from ever blinking - # - Off: Disable blinking by default - # - On: Enable blinking by default - # - Always: Force the cursor to always blink - #blinking: Off - - # Vi mode cursor style - # - # If the vi mode cursor style is `None` or not specified, it will fall back to - # the style of the active value of the normal cursor. - # - # See `cursor.style` for available options. - #vi_mode_style: None - - # Cursor blinking interval in milliseconds. - #blink_interval: 750 - - # Time after which cursor stops blinking, in seconds. - # - # Specifying '0' will disable timeout for blinking. - #blink_timeout: 5 - - # If this is `true`, the cursor will be rendered as a hollow box when the - # window is not focused. - #unfocused_hollow: true - - # Thickness of the cursor relative to the cell width as floating point number - # from `0.0` to `1.0`. - #thickness: 0.15 - -# Live config reload (changes require restart) -#live_config_reload: true - -# Shell -# -# You can set `shell.program` to the path of your favorite shell, e.g. -# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the -# shell. -# -# Default: -# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset -# - (Windows) powershell -#shell: -# program: /bin/bash -# args: -# - --login - -# Startup directory -# -# Directory the shell is started in. If this is unset, or `None`, the working -# directory of the parent process will be used. -#working_directory: None - -# Send ESC (\x1b) before characters when alt is pressed. -#alt_send_esc: true - -# Offer IPC using `alacritty msg` (unix only) -#ipc_socket: true - -#mouse: - # Click settings - # - # The `double_click` and `triple_click` settings control the time - # alacritty should wait for accepting multiple clicks as one double - # or triple click. - #double_click: { threshold: 300 } - #triple_click: { threshold: 300 } - - # If this is `true`, the cursor is temporarily hidden when typing. - #hide_when_typing: false - -# Hints -# -# Terminal hints can be used to find text or hyperlink in the visible part of -# the terminal and pipe it to other applications. -#hints: - # Keys used for the hint labels. - #alphabet: "jfkdls;ahgurieowpq" - - # List with all available hints - # - # Each hint must have any of `regex` or `hyperlinks` field and either an - # `action` or a `command` field. The fields `mouse`, `binding` and - # `post_processing` are optional. - # - # The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be - # highlighted. - # - # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and - # `mouse.mods` accept the same values as they do in the `key_bindings` section. - # - # The `mouse.enabled` field controls if the hint should be underlined while - # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. - # - # If the `post_processing` field is set to `true`, heuristics will be used to - # shorten the match if there are characters likely not to be part of the hint - # (e.g. a trailing `.`). This is most useful for URIs and applies only to - # `regex` matches. - # - # Values for `action`: - # - Copy - # Copy the hint's text to the clipboard. - # - Paste - # Paste the hint's text to the terminal or search. - # - Select - # Select the hint's text. - # - MoveViModeCursor - # Move the vi mode cursor to the beginning of the hint. - #enabled: - # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ - # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" - # hyperlinks: true - # command: xdg-open - # post_processing: true - # mouse: - # enabled: true - # mods: None - # binding: - # key: U - # mods: Control|Shift - -# Mouse bindings -# -# Mouse bindings are specified as a list of objects, much like the key -# bindings further below. -# -# To trigger mouse bindings when an application running within Alacritty -# captures the mouse, the `Shift` modifier is automatically added as a -# requirement. -# -# Each mouse binding will specify a: -# -# - `mouse`: -# -# - Middle -# - Left -# - Right -# - Numeric identifier such as `5` -# -# - `action` (see key bindings for actions not exclusive to mouse mode) -# -# - Mouse exclusive actions: -# -# - ExpandSelection -# Expand the selection to the current mouse cursor location. -# -# And optionally: -# -# - `mods` (see key bindings) -#mouse_bindings: -# - { mouse: Right, action: ExpandSelection } -# - { mouse: Right, mods: Control, action: ExpandSelection } -# - { mouse: Middle, mode: ~Vi, action: PasteSelection } - -# Key bindings -# -# Key bindings are specified as a list of objects. For example, this is the -# default paste binding: -# -# `- { key: V, mods: Control|Shift, action: Paste }` -# -# Each key binding will specify a: -# -# - `key`: Identifier of the key pressed -# -# - A-Z -# - F1-F24 -# - Key0-Key9 -# -# A full list with available key codes can be found here: -# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants -# -# Instead of using the name of the keys, the `key` field also supports using -# the scancode of the desired key. Scancodes have to be specified as a -# decimal number. This command will allow you to display the hex scancodes -# for certain keys: -# -# `showkey --scancodes`. -# -# Then exactly one of: -# -# - `chars`: Send a byte sequence to the running application -# -# The `chars` field writes the specified string to the terminal. This makes -# it possible to pass escape sequences. To find escape codes for bindings -# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside -# of tmux. Note that applications use terminfo to map escape sequences back -# to keys. It is therefore required to update the terminfo when changing an -# escape sequence. -# -# - `action`: Execute a predefined action -# -# - ToggleViMode -# - SearchForward -# Start searching toward the right of the search origin. -# - SearchBackward -# Start searching toward the left of the search origin. -# - Copy -# - Paste -# - IncreaseFontSize -# - DecreaseFontSize -# - ResetFontSize -# - ScrollPageUp -# - ScrollPageDown -# - ScrollHalfPageUp -# - ScrollHalfPageDown -# - ScrollLineUp -# - ScrollLineDown -# - ScrollToTop -# - ScrollToBottom -# - ClearHistory -# Remove the terminal's scrollback history. -# - Hide -# Hide the Alacritty window. -# - Minimize -# Minimize the Alacritty window. -# - Quit -# Quit Alacritty. -# - ToggleFullscreen -# - SpawnNewInstance -# Spawn a new instance of Alacritty. -# - CreateNewWindow -# Create a new Alacritty window from the current process. -# - ClearLogNotice -# Clear Alacritty's UI warning and error notice. -# - ClearSelection -# Remove the active selection. -# - ReceiveChar -# - None -# -# - Vi mode exclusive actions: -# -# - Open -# Perform the action of the first matching hint under the vi mode cursor -# with `mouse.enabled` set to `true`. -# - ToggleNormalSelection -# - ToggleLineSelection -# - ToggleBlockSelection -# - ToggleSemanticSelection -# Toggle semantic selection based on `selection.semantic_escape_chars`. -# - CenterAroundViCursor -# Center view around vi mode cursor -# -# - Vi mode exclusive cursor motion actions: -# -# - Up -# One line up. -# - Down -# One line down. -# - Left -# One character left. -# - Right -# One character right. -# - First -# First column, or beginning of the line when already at the first column. -# - Last -# Last column, or beginning of the line when already at the last column. -# - FirstOccupied -# First non-empty cell in this terminal row, or first non-empty cell of -# the line when already at the first cell of the row. -# - High -# Top of the screen. -# - Middle -# Center of the screen. -# - Low -# Bottom of the screen. -# - SemanticLeft -# Start of the previous semantically separated word. -# - SemanticRight -# Start of the next semantically separated word. -# - SemanticLeftEnd -# End of the previous semantically separated word. -# - SemanticRightEnd -# End of the next semantically separated word. -# - WordLeft -# Start of the previous whitespace separated word. -# - WordRight -# Start of the next whitespace separated word. -# - WordLeftEnd -# End of the previous whitespace separated word. -# - WordRightEnd -# End of the next whitespace separated word. -# - Bracket -# Character matching the bracket at the cursor's location. -# - SearchNext -# Beginning of the next match. -# - SearchPrevious -# Beginning of the previous match. -# - SearchStart -# Start of the match to the left of the vi mode cursor. -# - SearchEnd -# End of the match to the right of the vi mode cursor. -# -# - Search mode exclusive actions: -# - SearchFocusNext -# Move the focus to the next search match. -# - SearchFocusPrevious -# Move the focus to the previous search match. -# - SearchConfirm -# - SearchCancel -# - SearchClear -# Reset the search regex. -# - SearchDeleteWord -# Delete the last word in the search regex. -# - SearchHistoryPrevious -# Go to the previous regex in the search history. -# - SearchHistoryNext -# Go to the next regex in the search history. -# -# - macOS exclusive actions: -# - ToggleSimpleFullscreen -# Enter fullscreen without occupying another space. -# -# - Linux/BSD exclusive actions: -# -# - CopySelection -# Copy from the selection buffer. -# - PasteSelection -# Paste from the selection buffer. -# -# - `command`: Fork and execute a specified command plus arguments -# -# The `command` field must be a map containing a `program` string and an -# `args` array of command line parameter strings. For example: -# `{ program: "alacritty", args: ["-e", "vttest"] }` -# -# And optionally: -# -# - `mods`: Key modifiers to filter binding actions -# -# - Command -# - Control -# - Option -# - Super -# - Shift -# - Alt -# -# Multiple `mods` can be combined using `|` like this: -# `mods: Control|Shift`. -# Whitespace and capitalization are relevant and must match the example. -# -# - `mode`: Indicate a binding for only specific terminal reported modes -# -# This is mainly used to send applications the correct escape sequences -# when in different modes. -# -# - AppCursor -# - AppKeypad -# - Search -# - Alt -# - Vi -# -# A `~` operator can be used before a mode to apply the binding whenever -# the mode is *not* active, e.g. `~Alt`. -# -# Bindings are always filled by default, but will be replaced when a new -# binding with the same triggers is defined. To unset a default binding, it can -# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for -# a no-op if you do not wish to receive input characters for that binding. -# -# If the same trigger is assigned to multiple actions, all of them are executed -# in the order they were defined in. -#key_bindings: - #- { key: Paste, action: Paste } - #- { key: Copy, action: Copy } - #- { key: L, mods: Control, action: ClearLogNotice } - #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp } - #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } - #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop } - #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } - - # Vi Mode - #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } - #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } - #- { key: Escape, mode: Vi|~Search, action: ClearSelection } - #- { key: I, mode: Vi|~Search, action: ToggleViMode } - #- { key: I, mode: Vi|~Search, action: ScrollToBottom } - #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } - #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } - #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } - #- { key: G, mode: Vi|~Search, action: ScrollToTop } - #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } - #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } - #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } - #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } - #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } - #- { key: Y, mode: Vi|~Search, action: Copy } - #- { key: Y, mode: Vi|~Search, action: ClearSelection } - #- { key: Copy, mode: Vi|~Search, action: ClearSelection } - #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } - #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } - #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } - #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } - #- { key: Return, mode: Vi|~Search, action: Open } - #- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor } - #- { key: K, mode: Vi|~Search, action: Up } - #- { key: J, mode: Vi|~Search, action: Down } - #- { key: H, mode: Vi|~Search, action: Left } - #- { key: L, mode: Vi|~Search, action: Right } - #- { key: Up, mode: Vi|~Search, action: Up } - #- { key: Down, mode: Vi|~Search, action: Down } - #- { key: Left, mode: Vi|~Search, action: Left } - #- { key: Right, mode: Vi|~Search, action: Right } - #- { key: Key0, mode: Vi|~Search, action: First } - #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } - #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } - #- { key: H, mods: Shift, mode: Vi|~Search, action: High } - #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } - #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } - #- { key: B, mode: Vi|~Search, action: SemanticLeft } - #- { key: W, mode: Vi|~Search, action: SemanticRight } - #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } - #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } - #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } - #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } - #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } - #- { key: Slash, mode: Vi|~Search, action: SearchForward } - #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } - #- { key: N, mode: Vi|~Search, action: SearchNext } - #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } - - # Search Mode - #- { key: Return, mode: Search|Vi, action: SearchConfirm } - #- { key: Escape, mode: Search, action: SearchCancel } - #- { key: C, mods: Control, mode: Search, action: SearchCancel } - #- { key: U, mods: Control, mode: Search, action: SearchClear } - #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } - #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } - #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } - #- { key: Up, mode: Search, action: SearchHistoryPrevious } - #- { key: Down, mode: Search, action: SearchHistoryNext } - #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } - #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } - - # (Windows, Linux, and BSD only) - #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } - #- { key: C, mods: Control|Shift, action: Copy } - #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } - #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } - #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } - #- { key: Insert, mods: Shift, action: PasteSelection } - #- { key: Key0, mods: Control, action: ResetFontSize } - #- { key: Equals, mods: Control, action: IncreaseFontSize } - #- { key: Plus, mods: Control, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } - #- { key: Minus, mods: Control, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } - - # (Windows only) - #- { key: Return, mods: Alt, action: ToggleFullscreen } - - # (macOS only) - #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } - #- { key: Key0, mods: Command, action: ResetFontSize } - #- { key: Equals, mods: Command, action: IncreaseFontSize } - #- { key: Plus, mods: Command, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } - #- { key: Minus, mods: Command, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } - #- { key: V, mods: Command, action: Paste } - #- { key: C, mods: Command, action: Copy } - #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } - #- { key: H, mods: Command, action: Hide } - #- { key: H, mods: Command|Alt, action: HideOtherApplications } - #- { key: M, mods: Command, action: Minimize } - #- { key: Q, mods: Command, action: Quit } - #- { key: W, mods: Command, action: Quit } - #- { key: N, mods: Command, action: SpawnNewInstance } - #- { key: F, mods: Command|Control, action: ToggleFullscreen } - #- { key: F, mods: Command, mode: ~Search, action: SearchForward } - #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } - -#debug: - # Display the time it takes to redraw each frame. - #render_timer: false - - # Keep the log file after quitting Alacritty. - #persistent_logging: false - - # Log level - # - # Values for `log_level`: - # - Off - # - Error - # - Warn - # - Info - # - Debug - # - Trace - #log_level: Warn - - # Print all received window events. - #print_events: false - - # Highlight window damage information. - #highlight_damage: false diff --git a/config/.config/i3/config b/config/.config/i3/config index d79c689..810ad3b 100644 --- a/config/.config/i3/config +++ b/config/.config/i3/config @@ -21,8 +21,6 @@ focus_follows_mouse no # Configure # border style -new_window pixel 3 -new_float normal hide_edge_borders none ################################################################################################ @@ -82,19 +80,6 @@ bindsym $mod+Shift+0 move container to workspace $ws0; workspace $ws0 # Open specific applications in floating mode for_window [class="(?i)virtualbox"] floating enable border normal for_window [title="KeePassX$"] floating enable border normal -for_window [class="^Thunderbird$" title="^.*Event:"] floating enable - -# https://github.com/z3ntu/dotfiles/blob/master/i3/.config/i3/config -# Steam -for_window [class="^Steam$" title="^Friends List$"] floating enable -for_window [class="^Steam$" title="Steam"] floating enable -for_window [class="^Steam$" title="^Settings$"] floating enable -for_window [class="^Steam$" title=".* - event started"] floating enable -for_window [class="^Steam$" title=".* CD key"] floating enable -for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable -for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable -for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable -for_window [title="^Steam Keyboard$"] floating enable ############################################################################### ############################ Startup Applications ############################# @@ -140,10 +125,10 @@ bindsym XF86MonBrightnessDown exec --no-startup-id ~/.scripts/screen.sh down bindsym XF86AudioLowerVolume exec --no-startup-id ~/.scripts/sound.sh down bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.scripts/sound.sh up bindsym XF86AudioMute exec --no-startup-id ~/.scripts/sound.sh toggle -bindsym XF86AudioPlay exec "playerctl play-pause; cmus-remote -u" -bindsym XF86AudioStop exec "playerctl stop; cmus-remote -s" -bindsym XF86AudioNext exec "playerctl next; cmus-remote -n" -bindsym XF86AudioPrevious exec "playerctl previous; cmus-remote -r" +bindsym XF86AudioPlay exec "playerctl play-pause" +bindsym XF86AudioStop exec "playerctl stop" +bindsym XF86AudioNext exec "playerctl next" +bindsym XF86AudioPrevious exec "playerctl previous" # Application Shortcuts bindsym $mod+b exec firefox @@ -193,7 +178,7 @@ bindsym $mod+f fullscreen toggle bindsym $mod+Mod1+space floating toggle # change focus between tiling / floating windows -# bindsym $mod+space focus mode_toggle +bindsym $mod+Shift+f focus mode_toggle # focus the parent container bindsym $mod+a focus parent diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index 0d03178..29988b9 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -9,7 +9,7 @@ t:/home/tuan/Templates w:/home/tuan/workspace_l/home_lab/wiki k:/home/tuan/.syncthing/Documents/Uni/Studium/2022_Sommersemester/Bachelorprojekt/Implement EFCF based on libAFL/git/foundry/evm/src/executor q:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/02-gps -':/home/tuan/.dotfiles +':/home/tuan e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon s:/home/tuan/Pictures/Screenshots v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible diff --git a/config/.ssh/config b/config/.ssh/config index 4abaa5a..f4fadf6 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -23,6 +23,12 @@ Host git.uni-due.de User git IdentityFile /mnt/veracrypt1/git +Host git.tudattr.dev + Hostname 192.168.20.12 + Port 2222 + User git + IdentityFile /mnt/veracrypt1/git + # Homeserver Host madrigal HostName 192.168.70.1 diff --git a/emacs/.emacs.d/config.org b/emacs/.emacs.d/config.org index 9525a3d..dbbe835 100644 --- a/emacs/.emacs.d/config.org +++ b/emacs/.emacs.d/config.org @@ -1,243 +1,220 @@ * Packet - #+begin_src emacs-lisp +#+begin_src emacs-lisp (require 'package) (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("gnu" . "https://elpa.gnu.org/packages/"))) (package-initialize) (package-refresh-contents) - #+end_src +#+end_src * Use Package - #+begin_src emacs-lisp +#+begin_src emacs-lisp (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (require 'use-package) (setq use-package-always-ensure t) - #+end_src +#+end_src * Plugins -** Evil +** Quick online installs +#+begin_src emacs-lisp + (use-package no-littering) + (use-package org-bullets) + (use-package rainbow-delimiters) + (use-package flycheck :ensure) + (use-package solidity-mode) + (use-package undo-tree) +#+end_src - #+begin_src emacs-lisp +** Evil +#+begin_src emacs-lisp (use-package evil :init (setq evil-want-keybinding nil) :config (evil-mode 1) - (setq evil-search-module 'evil-search) - - ) + (setq evil-search-module 'evil-search)) (use-package evil-collection :config (evil-collection-init)) - #+end_src +#+end_src -** no-littering - #+begin_src emacs-lisp -(use-package no-littering) - #+end_src - -** simpleclip - #+begin_src emacs-lisp -(use-package simpleclip - :config - (simpleclip-mode 1)) - #+end_src - -** org-bullets - #+begin_src emacs-lisp -(use-package org-bullets) - #+end_src -** rainbow-delimiters - #+begin_src emacs-lisp -(use-package rainbow-delimiters) - #+end_src ** projectile - #+begin_src emacs-lisp -(use-package projectile) - #+end_src +#+begin_src emacs-lisp + (use-package projectile + :ensure t + :init + (projectile-mode +1) + :bind (:map projectile-mode-map + ("s-p" . projectile-command-map) + ("C-c p" . projectile-command-map))) +#+end_src ** ledger-mode - #+begin_src emacs-lisp -(use-package ledger-mode - :mode ("\\.ledger\\'") - :config - (autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t) - (add-to-list 'load-path - (expand-file-name "~/Documents/paisa/")) - (add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode)) - ) - #+end_src -** org-bullets - #+begin_src emacs-lisp - #+end_src -** flycheck - #+begin_src emacs-lisp -(use-package flycheck :ensure) - #+end_src +#+begin_src emacs-lisp + (use-package ledger-mode + :mode ("\\.ledger\\'") + :config + (autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t) + (add-to-list 'load-path + (expand-file-name "~/Documents/paisa/")) + (add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))) +#+end_src * Global ** emacs-one-themes - #+begin_src emacs-lisp -(use-package one-themes - :init - (load-theme 'one-dark t)) - #+end_src +#+begin_src emacs-lisp + (use-package one-themes + :init + (load-theme 'one-dark t)) +#+end_src ** Menubar - #+begin_src emacs-lisp -(menu-bar-mode -1) -(tool-bar-mode -1) - #+end_src +#+begin_src emacs-lisp + (menu-bar-mode -1) + (tool-bar-mode -1) + (scroll-bar-mode -1) +#+end_src ** Symlinks - #+begin_src emacs-lisp -(setq vc-follow-symlinks t) - #+end_src +#+begin_src emacs-lisp + (setq vc-follow-symlinks t) +#+end_src ** spaces>tabs - #+begin_src emacs-lisp -(setq-default indent-tabs-mode nil) - #+end_src +#+begin_src emacs-lisp + (setq-default indent-tabs-mode nil) +#+end_src ** lsp inlay hints globally - #+begin_src +#+begin_src (setq-local lsp-inlay-hint-enable t) - #+end_src +#+end_src * Org-mode ** hook - #+begin_src emacs-lisp -(add-hook 'org-mode-hook - (lambda () - (org-bullets-mode 1) - (setq org-pretty-entities f) - (setq org-src-fontify-natively 1))) - #+end_src -* keybinding -** simpleclip - #+begin_src emacs-lisp - (define-key evil-normal-state-map (kbd "Y") 'simpleclip-yank) - (define-key evil-normal-state-map (kbd "P") 'simpleclip-paste) - #+end_src +#+begin_src emacs-lisp + (add-hook 'org-mode-hook + (lambda () + (org-bullets-mode 1) + (setq org-pretty-entities f) + (setq org-src-fontify-natively 1))) +#+end_src + * Rust ** Rustic - #+begin_src emacs-lisp -(use-package rustic - :ensure - :bind (:map rustic-mode-map - ("M-j" . lsp-ui-imenu) - ("M-?" . lsp-find-references) - ("C-c C-c l" . flycheck-list-errors) - ("C-c C-c a" . lsp-execute-code-action) - ("C-c C-c r" . lsp-rename) - ("C-c C-c q" . lsp-workspace-restart) - ("C-c C-c Q" . lsp-workspace-shutdown) - ("C-c C-c s" . lsp-rust-analyzer-status)) - :config - ;; uncomment for less flashiness - ;; (setq lsp-eldoc-hook nil) - ;; (setq lsp-enable-symbol-highlighting nil) - ;; (setq lsp-signature-auto-activate nil) +#+begin_src emacs-lisp + (use-package rustic + :ensure + :bind (:map rustic-mode-map + ("M-j" . lsp-ui-imenu) + ("M-?" . lsp-find-references) + ("C-c C-c l" . flycheck-list-errors) + ("C-c C-c a" . lsp-execute-code-action) + ("C-c C-c r" . lsp-rename) + ("C-c C-c q" . lsp-workspace-restart) + ("C-c C-c Q" . lsp-workspace-shutdown) + ("C-c C-c s" . lsp-rust-analyzer-status)) + :config + ;; uncomment for less flashiness + ;; (setq lsp-eldoc-hook nil) + ;; (setq lsp-enable-symbol-highlighting nil) + ;; (setq lsp-signature-auto-activate nil) - ;; comment to disable rustfmt on save - (setq rustic-format-on-save t) - (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)) + ;; comment to disable rustfmt on save + (setq rustic-format-on-save t) + (add-hook 'rustic-mode-hook 'rk/rustic-mode-hook)) -(defun rk/rustic-mode-hook () - ;; so that run C-c C-c C-r works without having to confirm, but don't try to - ;; save rust buffers that are not file visiting. Once - ;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should - ;; no longer be necessary. - (when buffer-file-name - (setq-local buffer-save-without-query t)) - (add-hook 'before-save-hook 'lsp-format-buffer nil t)) - #+end_src + (defun rk/rustic-mode-hook () + ;; so that run C-c C-c C-r works without having to confirm, but don't try to + ;; save rust buffers that are not file visiting. Once + ;; https://github.com/brotzeit/rustic/issues/253 has been resolved this should + ;; no longer be necessary. + (when buffer-file-name + (setq-local buffer-save-without-query t)) + (add-hook 'before-save-hook 'lsp-format-buffer nil t)) +#+end_src ** LSP - #+begin_src emacs-lisp -(use-package lsp-mode - :ensure - :commands lsp - :custom - ;; what to use when checking on-save. "check" is default, I prefer clippy - (lsp-rust-analyzer-cargo-watch-command "clippy") - (lsp-eldoc-render-all t) - (lsp-idle-delay 0.6) - ;; enable / disable the hints as you prefer: - (lsp-inlay-hint-enable t) - ;; These are optional configurations. See https://emacs-lsp.github.io/lsp-mode/page/lsp-rust-analyzer/#lsp-rust-analyzer-display-chaining-hints for a full list - (lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial") - (lsp-rust-analyzer-display-chaining-hints t) - (lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil) - (lsp-rust-analyzer-display-closure-return-type-hints t) - (lsp-rust-analyzer-display-parameter-hints nil) - (lsp-rust-analyzer-display-reborrow-hints nil) - :config - (add-hook 'lsp-mode-hook 'lsp-ui-mode)) +#+begin_src emacs-lisp + (use-package lsp-mode + :ensure + :commands lsp + :custom + ;; what to use when checking on-save. "check" is default, I prefer clippy + (lsp-rust-analyzer-cargo-watch-command "clippy") + (lsp-eldoc-render-all t) + (lsp-idle-delay 0.6) + ;; enable / disable the hints as you prefer: + (lsp-inlay-hint-enable t) + ;; These are optional configurations. See https://emacs-lsp.github.io/lsp-mode/page/lsp-rust-analyzer/#lsp-rust-analyzer-display-chaining-hints for a full list + (lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial") + (lsp-rust-analyzer-display-chaining-hints t) + (lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil) + (lsp-rust-analyzer-display-closure-return-type-hints t) + (lsp-rust-analyzer-display-parameter-hints nil) + (lsp-rust-analyzer-display-reborrow-hints nil) + :config + (add-hook 'lsp-mode-hook 'lsp-ui-mode)) -(use-package lsp-ui - :ensure - :commands lsp-ui-mode - :custom - (lsp-ui-peek-always-show t) - (lsp-ui-sideline-show-hover t) - (lsp-ui-doc-enable nil)) - #+end_src + (use-package lsp-ui + :ensure + :commands lsp-ui-mode + :custom + (lsp-ui-peek-always-show t) + (lsp-ui-sideline-show-hover t) + (lsp-ui-doc-enable nil)) +#+end_src ** company - #+begin_src emacs-lisp -(use-package company - :ensure - :custom - (company-idle-delay 0.5) ;; how long to wait until popup - ;; (company-begin-commands nil) ;; uncomment to disable popup - :bind - (:map company-active-map - ("C-n". company-select-next) - ("C-p". company-select-previous) - ("M-<". company-select-first) - ("M->". company-select-last) - ("". tab-indent-or-complete) -("TAB". tab-indent-or-complete))) +#+begin_src emacs-lisp + (use-package company + :ensure + :custom + (company-idle-delay 0.5) ;; how long to wait until popup + ;; (company-begin-commands nil) ;; uncomment to disable popup + :bind + (:map company-active-map + ("C-n". company-select-next) + ("C-p". company-select-previous) + ("M-<". company-select-first) + ("M->". company-select-last) + ("". tab-indent-or-complete) + ("TAB". tab-indent-or-complete))) -(use-package yasnippet - :ensure - :config - (yas-reload-all) - (add-hook 'prog-mode-hook 'yas-minor-mode) - (add-hook 'text-mode-hook 'yas-minor-mode)) -(defun company-yasnippet-or-completion () - (interactive) - (or (do-yas-expand) - (company-complete-common))) + (use-package yasnippet + :ensure + :config + (yas-reload-all) + (add-hook 'prog-mode-hook 'yas-minor-mode) + (add-hook 'text-mode-hook 'yas-minor-mode)) + (defun company-yasnippet-or-completion () + (interactive) + (or (do-yas-expand) + (company-complete-common))) -(defun check-expansion () - (save-excursion - (if (looking-at "\\_>") t - (backward-char 1) - (if (looking-at "\\.") t + (defun check-expansion () + (save-excursion + (if (looking-at "\\_>") t (backward-char 1) - (if (looking-at "::") t nil))))) + (if (looking-at "\\.") t + (backward-char 1) + (if (looking-at "::") t nil))))) -(defun do-yas-expand () - (let ((yas/fallback-behavior 'return-nil)) - (yas/expand))) + (defun do-yas-expand () + (let ((yas/fallback-behavior 'return-nil)) + (yas/expand))) -(defun tab-indent-or-complete () - (interactive) - (if (minibufferp) - (minibuffer-complete) - (if (or (not yas/minor-mode) - (null (do-yas-expand))) - (if (check-expansion) - (company-complete-common) - (indent-for-tab-command))))) - #+end_src + (defun tab-indent-or-complete () + (interactive) + (if (minibufferp) + (minibuffer-complete) + (if (or (not yas/minor-mode) + (null (do-yas-expand))) + (if (check-expansion) + (company-complete-common) + (indent-for-tab-command))))) +#+end_src -* Solidity - #+begin_src emacs-lisp -(use-package solidity-mode) - #+end_src From 65c923108aeffb19ce99bd28c5cf35c1316fa20f Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Thu, 7 Mar 2024 10:26:49 +0100 Subject: [PATCH 3/6] Added lazyvim Signed-off-by: TuDatTr --- config/.config/alacritty/alacritty.toml | 2 +- config/.config/cava/config | 2 +- config/.config/cava/shaders/bar_spectrum.frag | 79 ++++++ .../.config/cava/shaders/northern_lights.frag | 34 +++ config/.config/cava/shaders/pass_through.vert | 14 + config/.config/i3/config | 2 + config/.ssh/config | 147 ++++------ emacs/.emacs.d/config.org | 9 +- emacs/.emacs.d/init.el | 2 +- vim/.config/nvim/.gitignore | 8 + vim/.config/nvim/.neoconf.json | 15 + vim/.config/nvim/LICENSE | 201 +++++++++++++ vim/.config/nvim/README.md | 4 + vim/.config/nvim/init.lua | 2 + vim/.config/nvim/lazy-lock.json | 63 +++++ vim/.config/nvim/lazyvim.json | 14 + vim/.config/nvim/lua/config/autocmds.lua | 3 + vim/.config/nvim/lua/config/keymaps.lua | 3 + vim/.config/nvim/lua/config/lazy.lua | 46 +++ vim/.config/nvim/lua/config/options.lua | 3 + vim/.config/nvim/lua/plugins/example.lua | 265 ++++++++++++++++++ vim/.config/nvim/lua/plugins/ledger-cli.lua | 4 + vim/.config/nvim/lua/plugins/onedark.lua | 9 + vim/.config/nvim/lua/plugins/org-mode.lua | 27 ++ vim/.config/nvim/stylua.toml | 3 + zsh/.zshrc | 4 +- 26 files changed, 866 insertions(+), 99 deletions(-) create mode 100644 config/.config/cava/shaders/bar_spectrum.frag create mode 100644 config/.config/cava/shaders/northern_lights.frag create mode 100644 config/.config/cava/shaders/pass_through.vert create mode 100644 vim/.config/nvim/.gitignore create mode 100644 vim/.config/nvim/.neoconf.json create mode 100644 vim/.config/nvim/LICENSE create mode 100644 vim/.config/nvim/README.md create mode 100644 vim/.config/nvim/init.lua create mode 100644 vim/.config/nvim/lazy-lock.json create mode 100644 vim/.config/nvim/lazyvim.json create mode 100644 vim/.config/nvim/lua/config/autocmds.lua create mode 100644 vim/.config/nvim/lua/config/keymaps.lua create mode 100644 vim/.config/nvim/lua/config/lazy.lua create mode 100644 vim/.config/nvim/lua/config/options.lua create mode 100644 vim/.config/nvim/lua/plugins/example.lua create mode 100644 vim/.config/nvim/lua/plugins/ledger-cli.lua create mode 100644 vim/.config/nvim/lua/plugins/onedark.lua create mode 100644 vim/.config/nvim/lua/plugins/org-mode.lua create mode 100644 vim/.config/nvim/stylua.toml diff --git a/config/.config/alacritty/alacritty.toml b/config/.config/alacritty/alacritty.toml index 2b1d557..b59158a 100644 --- a/config/.config/alacritty/alacritty.toml +++ b/config/.config/alacritty/alacritty.toml @@ -1,5 +1,5 @@ [font] -size = 7 +size = 12 [font.bold] style = "Bold" diff --git a/config/.config/cava/config b/config/.config/cava/config index 3a35ade..9a43938 100755 --- a/config/.config/cava/config +++ b/config/.config/cava/config @@ -48,7 +48,7 @@ # # For alsa 'source' will be the capture device. # For fifo 'source' will be the path to fifo-file. -; method = pulse +method = pulse ; source = auto ; method = alsa diff --git a/config/.config/cava/shaders/bar_spectrum.frag b/config/.config/cava/shaders/bar_spectrum.frag new file mode 100644 index 0000000..b078913 --- /dev/null +++ b/config/.config/cava/shaders/bar_spectrum.frag @@ -0,0 +1,79 @@ +#version 330 + +in vec2 fragCoord; +out vec4 fragColor; + +// bar values. defaults to left channels first (low to high), then right (high to low). +uniform float bars[512]; + +uniform int bars_count; // number of bars (left + right) (configurable) +uniform int bar_width; // bar width (configurable), not used here +uniform int bar_spacing; // space bewteen bars (configurable) + +uniform vec3 u_resolution; // window resolution + +//colors, configurable in cava config file (r,g,b) (0.0 - 1.0) +uniform vec3 bg_color; // background color +uniform vec3 fg_color; // foreground color + +uniform int gradient_count; +uniform vec3 gradient_colors[8]; // gradient colors + +vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max) +{ + //create color based on fraction of this color and next color + float yr = (y - y_min) / (y_max - y_min); + return col_1 * (1.0 - yr) + col_2 * yr; +} + +void main() +{ + // find which bar to use based on where we are on the x axis + float x = u_resolution.x * fragCoord.x; + int bar = int(bars_count * fragCoord.x); + + //calculate a bar size + float bar_size = u_resolution.x / bars_count; + + //the y coordinate and bar values are the same + float y = bars[bar]; + + // make sure there is a thin line at bottom + if (y * u_resolution.y < 1.0) + { + y = 1.0 / u_resolution.y; + } + + //draw the bar up to current height + if (y > fragCoord.y) + { + //make some space between bars basen on settings + if (x > (bar + 1) * (bar_size) - bar_spacing) + { + fragColor = vec4(bg_color,1.0); + } + else + { + if (gradient_count == 0) + { + fragColor = vec4(fg_color,1.0); + } + else + { + //find which color in the configured gradient we are at + int color = int((gradient_count - 1) * fragCoord.y); + + //find where on y this and next color is supposed to be + float y_min = color / (gradient_count - 1.0); + float y_max = (color + 1.0) / (gradient_count - 1.0); + + //make color + fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0); + } + } + } + else + { + fragColor = vec4(bg_color,1.0); + } +} \ No newline at end of file diff --git a/config/.config/cava/shaders/northern_lights.frag b/config/.config/cava/shaders/northern_lights.frag new file mode 100644 index 0000000..ecd859a --- /dev/null +++ b/config/.config/cava/shaders/northern_lights.frag @@ -0,0 +1,34 @@ +#version 330 + +in vec2 fragCoord; +out vec4 fragColor; + +// bar values. defaults to left channels first (low to high), then right (high to low). +uniform float bars[512]; + +uniform int bars_count; // number of bars (left + right) (configurable) + +uniform vec3 u_resolution; // window resolution, not used here + +//colors, configurable in cava config file +uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here +uniform vec3 fg_color; // foreground color, not used here + +void main() +{ + // find which bar to use based on where we are on the x axis + int bar = int(bars_count * fragCoord.x); + + float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0; + float y = (bars[bar]) * bar_y; + + float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count; + float bar_r = 1.0 - abs((bar_x - 0.5)) * 2; + + bar_r = bar_r * bar_r * 2; + + // set color + fragColor.r = fg_color.x * y * bar_r; + fragColor.g = fg_color.y * y * bar_r; + fragColor.b = fg_color.z * y * bar_r; +} diff --git a/config/.config/cava/shaders/pass_through.vert b/config/.config/cava/shaders/pass_through.vert new file mode 100644 index 0000000..a4f20e5 --- /dev/null +++ b/config/.config/cava/shaders/pass_through.vert @@ -0,0 +1,14 @@ +#version 330 + + +// Input vertex data, different for all executions of this shader. +layout(location = 0) in vec3 vertexPosition_modelspace; + +// Output data ; will be interpolated for each fragment. +out vec2 fragCoord; + +void main() +{ + gl_Position = vec4(vertexPosition_modelspace,1); + fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0; +} diff --git a/config/.config/i3/config b/config/.config/i3/config index 810ad3b..d7bc02a 100644 --- a/config/.config/i3/config +++ b/config/.config/i3/config @@ -22,6 +22,7 @@ focus_follows_mouse no # Configure # border style hide_edge_borders none +default_border none ################################################################################################ ###################################### Workspace Settings ###################################### @@ -140,6 +141,7 @@ bindsym $mod+m exec thunderbird bindsym Control+Print exec --no-startup-id ~/.scripts/screenshot.sh screen # Window + bindsym Mod1+Sys_Req --release exec --no-startup-id ~/.scripts/screenshot.sh window # Area diff --git a/config/.ssh/config b/config/.ssh/config index f4fadf6..52821c1 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -1,27 +1,17 @@ # Services -Host github.com - Hostname github.com +Host github.com gitlab.com git.uni-due.de Port 22 User git IdentityFile /mnt/veracrypt1/git +Host github.com + Hostname github.com + Host gitlab.com Hostname gitlab.com - Port 22 - User git - IdentityFile /mnt/veracrypt1/git - -Host picoCTF - HostName 2018shell4.picoctf.com - Port 22 - User mos4 - IdentityFile "/home/tuan/Documents/CTF/picoCTF/2018/30 - ssh-keyz/picoCTF" Host git.uni-due.de HostName git.uni-due.de - Port 22 - User git - IdentityFile /mnt/veracrypt1/git Host git.tudattr.dev Hostname 192.168.20.12 @@ -36,31 +26,49 @@ Host madrigal User tudattr IdentityFile /mnt/veracrypt1/mikrotik_rsa -Host aya01 +Host inko inko.mii + HostName 192.168.20.14 + +Host naruto naruto.mii + HostName 192.168.20.13 + +Host pi pi.mii + HostName 192.168.20.11 + +Host aya01 aya01.mii HostName 192.168.20.12 + +Host mii + HostName tudattr.dev + +Host inko.mii pi.mii aya01.mii naruto.mii + ProxyJump mii + +Host mii pi aya01 inko naruto inko.mii pi.mii aya01.mii naruto.mii Port 22 User tudattr IdentityFile /mnt/veracrypt1/genesis -Host git.aya01 - HostName 192.168.20.12 - Port 23231 +# Work +Host mini + HostName 100.76.45.158 + Port 22 User tudattr IdentityFile /mnt/veracrypt1/genesis -Host pi - HostName 192.168.20.11 - Port 22 - User tudattr - IdentityFile /mnt/veracrypt1/genesis +Host tail-pi + HostName 100.93.79.94 + Port 22 + User tuant + IdentityFile /mnt/veracrypt1/work/minis -# Work Host ncs-head HostName 132.252.68.50 Port 2122 User tuan-dat.tran IdentityFile /mnt/veracrypt1/genesis ForwardX11 yes + ProxyJump tail-pi Host ncs-head-user HostName 132.252.68.50 @@ -71,62 +79,44 @@ Host ncs-head-user Host ncs2 HostName 192.168.1.13 - Port 22 User tuan-dat.tran + +Host ncs2 ncs2-user ncs-node1 ncs-node2 ncs-node2-user ncs-node3 ncs-node4 ncs-node5 ncs-node6 ncs-node7 ncs-wedge + Port 22 IdentityFile /mnt/veracrypt1/genesis ProxyJump ncs-head Host ncs2-user HostName 192.168.1.13 - Port 22 User user # tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis - ProxyJump ncs-head Host ncs-node1 HostName 192.168.1.11 - Port 22 User user - IdentityFile /mnt/veracrypt1/tudattr - ProxyJump ncs-head Host ncs-node2 HostName 192.168.1.7 - Port 22 User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis - ProxyJump ncs-head ForwardX11 yes Host ncs-node2-user HostName 192.168.1.7 - Port 22 User user - IdentityFile /mnt/veracrypt1/tudattr - ProxyJump ncs-head Host ncs-node3 Hostname 192.168.1.19 - Port 22 User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis ForwardX11 yes - ProxyJump ncs-head Host ncs-node3-user Hostname 192.168.1.19 - Port 22 User user IdentityFile /mnt/veracrypt1/tudattr ForwardX11 yes - ProxyJump ncs-head Host ncs-node4 HostName 192.168.1.9 - Port 22 User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis - ProxyJump ncs-head Host ncs-node4-user HostName 192.168.1.9 @@ -137,18 +127,11 @@ Host ncs-node4-user Host ncs-node5 HostName 192.168.1.15 - Port 22 User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis - ProxyJump ncs-head Host ncs-node6 Hostname 192.168.1.17 - Port 22 User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis - # ForwardX11 yes - ProxyJump ncs-head Host ncs-node6-user Hostname 192.168.1.17 @@ -160,47 +143,12 @@ Host ncs-node6-user Host ncs-node7 Hostname 192.168.1.18 - Port 22 User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis ForwardX11 yes - ProxyJump ncs-head Host ncs-wedge Hostname 192.168.1.5 - Port 22 User user - IdentityFile /mnt/veracrypt1/genesis - # ForwardX11 yes - ProxyJump ncs-head - -Host ncs-local-server - HostName 192.168.1.1 - Port 22 - User tuan-dat.tran - IdentityFile /mnt/veracrypt1/tudattr - StrictHostKeyChecking no - -Host ncs-local-server-user - HostName 192.168.1.1 - Port 22 - User user - IdentityFile /mnt/veracrypt1/tudattr - StrictHostKeyChecking no - -Host ncs-local-server2 - HostName 192.168.2.2 - Port 22 - User user - IdentityFile /mnt/veracrypt1/tudattr - StrictHostKeyChecking no - ProxyJump ncs-local-server - -Host phone - Hostname 192.168.30.245 - Port 2222 - User tuan-dat.tran - IdentityFile /mnt/veracrypt1/genesis Host ncs-gpu Hostname 192.168.1.21 @@ -210,15 +158,28 @@ Host ncs-gpu ForwardX11 yes ProxyJump ncs-head -Host ncs-aws-iperf3 - Hostname 18.185.5.191 - Port 22 - User ec2-user - IdentityFile /mnt/veracrypt1/aws_ncs.pem - Host ami Hostname 3.72.156.214 Port 22 User ubuntu IdentityFile /mnt/veracrypt1/work/aws-rizk.pem + +## 5g IANA +Host 5g-iana-mec + Hostname 192.168.100.1 + Port 22 + User udue + IdentityFile /mnt/veracrypt1/genesis + +Host uulm-obu0 uulm-obu1 + Port 22 + User user + ProxyJump 5g-iana-mec + IdentityFile /mnt/veracrypt1/genesis + +Host uulm-obu0 + Hostname 192.168.201.7 + +Host uulm-obu1 + Hostname 192.168.201.11 diff --git a/emacs/.emacs.d/config.org b/emacs/.emacs.d/config.org index dbbe835..524cde0 100644 --- a/emacs/.emacs.d/config.org +++ b/emacs/.emacs.d/config.org @@ -28,6 +28,12 @@ (use-package flycheck :ensure) (use-package solidity-mode) (use-package undo-tree) + (use-package yaml-mode + :config + (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) + (use-package org-roam) + (use-package consult) + (use-package dockerfile-mode) #+end_src ** Evil @@ -37,7 +43,8 @@ (setq evil-want-keybinding nil) :config (evil-mode 1) - (setq evil-search-module 'evil-search)) + (setq evil-search-module 'evil-search) + (setq evil-undo-system 'undo-redo)) (use-package evil-collection :config diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 76ad4c4..6e8534a 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -4,7 +4,7 @@ ;; 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 '(evil-collection evil use-package))) + '(package-selected-packages '(consult org-roam evil-collection evil use-package))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/vim/.config/nvim/.gitignore b/vim/.config/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/vim/.config/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/vim/.config/nvim/.neoconf.json b/vim/.config/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/vim/.config/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/vim/.config/nvim/LICENSE b/vim/.config/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/vim/.config/nvim/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vim/.config/nvim/README.md b/vim/.config/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/vim/.config/nvim/README.md @@ -0,0 +1,4 @@ +# 💤 LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua new file mode 100644 index 0000000..2514f9e --- /dev/null +++ b/vim/.config/nvim/init.lua @@ -0,0 +1,2 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/vim/.config/nvim/lazy-lock.json b/vim/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..2ef522c --- /dev/null +++ b/vim/.config/nvim/lazy-lock.json @@ -0,0 +1,63 @@ +{ + "LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" }, + "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, + "SchemaStore.nvim": { "branch": "main", "commit": "88355559bb42cc8e4f6ca7b624dc4c3b654c5c08" }, + "bufferline.nvim": { "branch": "main", "commit": "b15c6daf5a64426c69732b31a951f4e438cb6590" }, + "catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, + "crates.nvim": { "branch": "main", "commit": "ec2b04a380c9f3a8e6ca38c230e4990d71978143" }, + "dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" }, + "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, + "edgy.nvim": { "branch": "main", "commit": "0b35dc6da4cae6cc2f724bc610eadf955cd2319b" }, + "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, + "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, + "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, + "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, + "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, + "lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, + "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, + "mini.ai": { "branch": "main", "commit": "ee9446a17c160aba6a04ff22097389c41872c878" }, + "mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" }, + "mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" }, + "mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" }, + "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, + "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "459c60317cc1d251f6eb3b6f010d015d5d24b806" }, + "neoconf.nvim": { "branch": "main", "commit": "8d7150e9d6113f01421c34c5aeb0f586afa232e0" }, + "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, + "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, + "nui.nvim": { "branch": "main", "commit": "fbb139c6f14896b434d0229099e1acd863ae6bec" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" }, + "nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" }, + "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, + "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, + "nvim-treesitter": { "branch": "master", "commit": "212b7a504cf56f85d1acc5be237261b42d7560c5" }, + "nvim-treesitter-context": { "branch": "master", "commit": "53cdd58446521575d8f1052152099e08b15ca53c" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "3532f6095efd4723f7c066a5ac3fe632506cc09e" }, + "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, + "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, + "onedark.vim": { "branch": "main", "commit": "57b77747694ea5676c3ca0eeaf9567dc499730c0" }, + "orgmode": { "branch": "master", "commit": "779a56823857a2e0baacadc7f3042fa0bfbaf6aa" }, + "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, + "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "master", "commit": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8" }, + "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, + "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, + "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, + "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" }, + "vim-ledger": { "branch": "master", "commit": "281346a221434574dd7f8767a352b2bf0b218b74" }, + "vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" }, + "vimtex": { "branch": "master", "commit": "a77d14b2e4391c0d3e860708bb1fd56161ab68eb" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } +} \ No newline at end of file diff --git a/vim/.config/nvim/lazyvim.json b/vim/.config/nvim/lazyvim.json new file mode 100644 index 0000000..a943afc --- /dev/null +++ b/vim/.config/nvim/lazyvim.json @@ -0,0 +1,14 @@ +{ + "extras": [ + "lazyvim.plugins.extras.lang.docker", + "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.lang.rust", + "lazyvim.plugins.extras.lang.tex", + "lazyvim.plugins.extras.lang.yaml", + "lazyvim.plugins.extras.ui.edgy" + ], + "news": { + "NEWS.md": "2123" + }, + "version": 2 +} \ No newline at end of file diff --git a/vim/.config/nvim/lua/config/autocmds.lua b/vim/.config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..27e9e06 --- /dev/null +++ b/vim/.config/nvim/lua/config/autocmds.lua @@ -0,0 +1,3 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here diff --git a/vim/.config/nvim/lua/config/keymaps.lua b/vim/.config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..2c134f7 --- /dev/null +++ b/vim/.config/nvim/lua/config/keymaps.lua @@ -0,0 +1,3 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here diff --git a/vim/.config/nvim/lua/config/lazy.lua b/vim/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..891b190 --- /dev/null +++ b/vim/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,46 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + -- bootstrap lazy.nvim + -- stylua: ignore + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import any extras modules here + -- { import = "lazyvim.plugins.extras.lang.typescript" }, + -- { import = "lazyvim.plugins.extras.lang.json" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "tokyonight", "habamax" } }, + checker = { enabled = true }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/vim/.config/nvim/lua/config/options.lua b/vim/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..3ea1454 --- /dev/null +++ b/vim/.config/nvim/lua/config/options.lua @@ -0,0 +1,3 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here diff --git a/vim/.config/nvim/lua/plugins/example.lua b/vim/.config/nvim/lua/plugins/example.lua new file mode 100644 index 0000000..6859c0e --- /dev/null +++ b/vim/.config/nvim/lua/plugins/example.lua @@ -0,0 +1,265 @@ +-- since this is just an example spec, don't actually load anything here and return an empty spec +-- stylua: ignore +if true then return {} end + +-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim +-- +-- In your plugin files, you can: +-- * add extra plugins +-- * disable/enabled LazyVim plugins +-- * override the configuration of LazyVim plugins +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, + + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + }, + + -- disable trouble + { "folke/trouble.nvim", enabled = false }, + + -- add symbols-outline + { + "simrat39/symbols-outline.nvim", + cmd = "SymbolsOutline", + keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, + config = true, + }, + + -- override nvim-cmp and add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + }, + + -- change some telescope options and a keymap to browse plugin files + { + "nvim-telescope/telescope.nvim", + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + + -- add telescope-fzf-native + { + "telescope.nvim", + dependencies = { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + config = function() + require("telescope").load_extension("fzf") + end, + }, + }, + + -- add pyright to lspconfig + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + pyright = {}, + }, + }, + }, + + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").lsp.on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table + setup = { + -- example to setup with typescript.nvim + tsserver = function(_, opts) + require("typescript").setup({ server = opts }) + return true + end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + }, + }, + + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + + -- add more treesitter parsers + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add tsx and treesitter + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + }) + end, + }, + + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, "😄") + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- use mini.starter instead of alpha + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, + + -- add any tools you want to have installed below + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, + + -- Use for completion and snippets (supertab) + -- first: disable default and behavior in LuaSnip + { + "L3MON4D3/LuaSnip", + keys = function() + return {} + end, + }, + -- then: setup supertab in cmp + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-emoji", + }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end + + local luasnip = require("luasnip") + local cmp = require("cmp") + + opts.mapping = vim.tbl_extend("force", opts.mapping, { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() + -- this way you will only jump inside the snippet region + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }) + end, + }, +} diff --git a/vim/.config/nvim/lua/plugins/ledger-cli.lua b/vim/.config/nvim/lua/plugins/ledger-cli.lua new file mode 100644 index 0000000..e30f980 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/ledger-cli.lua @@ -0,0 +1,4 @@ +return { + -- Add vim-ledger + { "ledger/vim-ledger" }, +} diff --git a/vim/.config/nvim/lua/plugins/onedark.lua b/vim/.config/nvim/lua/plugins/onedark.lua new file mode 100644 index 0000000..c361dbb --- /dev/null +++ b/vim/.config/nvim/lua/plugins/onedark.lua @@ -0,0 +1,9 @@ +return { + { "joshdick/onedark.vim" }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "onedark", + }, + }, +} diff --git a/vim/.config/nvim/lua/plugins/org-mode.lua b/vim/.config/nvim/lua/plugins/org-mode.lua new file mode 100644 index 0000000..d33bcd2 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/org-mode.lua @@ -0,0 +1,27 @@ +return { + { + "nvim-orgmode/orgmode", + dependencies = { + { "nvim-treesitter/nvim-treesitter", lazy = true }, + }, + event = "VeryLazy", + config = function() + -- Load treesitter grammar for org + require("orgmode").setup_ts_grammar() + + -- Setup treesitter + require("nvim-treesitter.configs").setup({ + highlight = { + enable = true, + }, + ensure_installed = { "org" }, + }) + + -- Setup orgmode + require("orgmode").setup({ + org_agenda_files = "~/orgfiles/**/*", + org_default_notes_file = "~/orgfiles/refile.org", + }) + end, + }, +} diff --git a/vim/.config/nvim/stylua.toml b/vim/.config/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/vim/.config/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file diff --git a/zsh/.zshrc b/zsh/.zshrc index ba4c1c7..70c7502 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -6,8 +6,8 @@ export PenTestTools=$HOME/Local/PenTesting/ export CTF=$HOME/Documents/CTF/ export WORKSPACE=$HOME/workspace_l export ZSHRC="$HOME/.zshrc" -export VISUAL="emacsclient -t" -export EDITOR="emacsclient -t" +export VISUAL="nvim" +export EDITOR="nvim" # History From 34cda631d21fa4b0a679ed61570dc1eccb088711 Mon Sep 17 00:00:00 2001 From: TuDatTr Date: Wed, 13 Mar 2024 11:48:31 +0100 Subject: [PATCH 4/6] Added some alias for eza/ls,vim/nvm and cat/bat Signed-off-by: TuDatTr --- .../.config/rofi/launchers/type-1/launcher.sh | 4 +- config/.conky/Conky_4K/conky.conf | 173 ++++++++++++++++++ config/.conky/Conky_4K/start-conky.sh | 80 ++++++++ config/.local/share/ranger/bookmarks | 2 +- config/.ssh/config | 8 +- vim/.config/nvim/lazy-lock.json | 41 +++-- vim/.config/nvim/lazyvim.json | 9 +- vim/.config/nvim/lua/plugins/rust.lua | 44 +++++ zsh/.zshrc | 3 + 9 files changed, 338 insertions(+), 26 deletions(-) create mode 100644 config/.conky/Conky_4K/conky.conf create mode 100755 config/.conky/Conky_4K/start-conky.sh create mode 100644 vim/.config/nvim/lua/plugins/rust.lua diff --git a/config/.config/rofi/launchers/type-1/launcher.sh b/config/.config/rofi/launchers/type-1/launcher.sh index 0d6ff71..437fcdc 100755 --- a/config/.config/rofi/launchers/type-1/launcher.sh +++ b/config/.config/rofi/launchers/type-1/launcher.sh @@ -16,5 +16,5 @@ theme='style-7' ## Run rofi \ - -show drun \ - -theme ${dir}/${theme}.rasi + -show run \ + -theme ${dir}/${theme}.rasi diff --git a/config/.conky/Conky_4K/conky.conf b/config/.conky/Conky_4K/conky.conf new file mode 100644 index 0000000..559fecc --- /dev/null +++ b/config/.conky/Conky_4K/conky.conf @@ -0,0 +1,173 @@ +--[[ +#===================================================================================== +# Date : package-date +# Author : Nicola Bicocchi +# Version : package-version +# License : Distributed under the terms of GNU GPL version 2 or later +#====================================================================================== +# CONKY +# For commands in conky.config section: +# http://conky.sourceforge.net/config_settings.html +# +# For commands in conky.text section: +# http://conky.sourceforge.net/variables.html +# +# A PDF with all variables is provided +#===================================================================================== +# FONTS +# To avoid copyright infringements you will have to download +# and install the fonts yourself sometimes. +#===================================================================================== +# GENERAL INFO ABOUT FONTS +# Go and look for a nice font on sites like http://www.dafont.com/ +# Download and unzip - double click the font to install it (font-manager must be installed) +# No font-manager then put fonts in ~/.fonts +# Change the font name in the conky +# The name can be known with a command in the terminal: fc-list | grep "part of name" +# Change width and height of the conky according to font +# Reboot your system or fc-cache -fv in terminal +# Enjoy +#===================================================================================== +]] + +conky.config = { + + --Various settings + + background = true, -- forked to background + cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring. + diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring. + double_buffer = true, -- Use the Xdbe extension? (eliminates flicker) + if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address + net_avg_samples = 2, -- The number of samples to average for net data + no_buffers = true, -- Subtract (file system) buffers from used memory? + temperature_unit = 'celsius', -- fahrenheit or celsius + text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256 + update_interval = 2, -- update interval + imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song + + + --Placement + + alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right, + -- middle_left,middle_middle,middle_right,none + --Arch Duoscreen + --gap_x = -1910, + gap_x = 15, -- pixels between right or left border + gap_y = 0, -- pixels between bottom or left border + minimum_height = 1000, -- minimum height of window + minimum_width = 500, -- minimum width of window + maximum_width = 600, -- maximum width of window + + --Graphical + + border_inner_margin = 10, -- margin between border and text + border_outer_margin = 10, -- margin between border and edge of window + border_width = 0, -- border width in pixels + default_bar_width = 0, -- default is 0 - full width + default_bar_height = 25, -- default is 6 + default_gauge_height = 25, -- default is 25 + default_gauge_width = 0, -- default is 40 + default_graph_height = 80, -- default is 25 + default_graph_width = 0, -- default is 0 - full width + default_shade_color = '#000000', -- default shading colour + default_outline_color = '#000000', -- default outline colour + draw_borders = false, -- draw borders around text + draw_graph_borders = true, -- draw borders around graphs + draw_shades = false, -- draw shades + draw_outline = false, -- draw outline + stippled_borders = 0, -- dashing the border + + --Textual + + extra_newline = false, -- extra newline at the end - for asesome's wiboxes + format_human_readable = true, -- KiB, MiB rather then number of bytes + font = 'Roboto Mono:size=15', -- font for complete conky unless in code defined + max_text_width = 0, -- 0 will make sure line does not get broken if width too smal + max_user_text = 16384, -- max text in conky default 16384 + override_utf8_locale = true, -- force UTF8 requires xft + short_units = true, -- shorten units from KiB to k + top_name_width = 21, -- width for $top name value default 15 + top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false. + uppercase = false, -- uppercase or not + use_spacer = 'none', -- adds spaces around certain objects to align - default none + use_xft = true, -- xft font - anti-aliased font + xftalpha = 1, -- alpha of the xft font - between 0-1 + + --Windows + + own_window = true, -- create your own window to draw + own_window_argb_value = 100, -- real transparency - composite manager required 0-255 + own_window_argb_visual = true, -- use ARGB - composite manager required + own_window_colour = '#000000', -- set colour if own_window_transparent no + own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it + own_window_transparent = false, -- if own_window_argb_visual is true sets background opacity 0% + own_window_title = 'system_conky', -- set the name manually - default conky "hostname" + own_window_type = 'normal', -- if own_window true options are: normal/override/dock/desktop/panel + + + --Colours + default_color = '#D9FFE2', + color1 = '#FF0000', + color2 = '#3E5570', + color3 = '#CCCCCC', + color4 = '#BBBBBB', + color5 = '#C0FF00', + color6 = '#FFFFFF', + + --Signal Colours + color7 = '#C0FF00', --green + color8 = '#FFA726', --orange + color9 = '#F1544B', --firebrick +}; + +conky.text = [[ +${color6}${font Roboto:size=140}${alignc}${time %H}:${time %M}${font} + +${color6}${font Roboto:size=25}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font} + +${color5}${font Roboto:style=Bold:size=17}S Y S T E M ${hr 2}${font} +${color6}Hostname:${color}${alignr}${nodename} +${color6}OS:${color}${alignr}${texeci 3600 lsb_release -d | awk '{$1=""; print $0}'} +${color6}Kernel:${color}${alignr}${kernel} +${color6}Uptime:${color}${alignr}${uptime} +${color6}Processes:${color}${alignr}${processes} + +${color5}${font Roboto:style=Bold:size=17}C P U ${hr 2}${font} +${color6}CPU Frequency:${color}${alignr}${freq}MHz +${color6}CPU Temperature:${color}${alignr}${texeci 30 sensors | grep "Package id 0" | cut -d ':' -f 2 | cut -d '(' -f 1 | tr -d ' '} +${color6}CPU Usage:${color}${alignr}${cpu}% +${cpugraph cpu0} +${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem% +${color}${top name 1} ${alignr}${offset -75}${top pid 1}${alignr}${offset -45}${top cpu 1}${alignr}${top mem 1} +${color}${top name 2} ${alignr}${offset -75}${top pid 2}${alignr}${offset -45}${top cpu 2}${alignr}${top mem 2} +${color}${top name 3} ${alignr}${offset -75}${top pid 3}${alignr}${offset -45}${top cpu 3}${alignr}${top mem 3} + +${color5}${font Roboto:style=Bold:size=17}M E M O R Y ${hr 2}${font} +${color6}Swap Usage:${color}${alignr}${swap}/${swapmax} +${color6}Memory Usage:${color}${alignr}${mem}/${memmax} +${memgraph} +${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem% +${color}${top_mem name 1} ${alignr}${offset -75}${top_mem pid 1}${alignr}${offset -45}${top_mem cpu 1}${alignr}${top_mem mem 1} +${color}${top_mem name 2} ${alignr}${offset -75}${top_mem pid 2}${alignr}${offset -45}${top_mem cpu 2}${alignr}${top_mem mem 2} +${color}${top_mem name 3} ${alignr}${offset -75}${top_mem pid 3}${alignr}${offset -45}${top_mem cpu 3}${alignr}${top_mem mem 3} + +${color5}${font Roboto:style=Bold:size=17}D I S K ${hr 2}${font} +${color6}Disk Usage:${color}${alignr}${fs_used /}/${fs_size /} +${color6}IO Read / Write:${color}${alignr}${diskio_read /dev/nvme0n1p2} / ${diskio_write /dev/nvme0n1p2} +${diskiograph_read nvme0n1p2} +${diskiograph_write nvme0n1p2} +${color6}Top Processes ${alignr}${offset -40}PID ${alignr}${offset -20}CPU% ${alignr}Mem% +${color}${top_io name 1} ${alignr}${offset -75}${top_io pid 1}${alignr}${offset -45}${top_io cpu 1}${alignr}${top_io mem 1} +${color}${top_io name 2} ${alignr}${offset -75}${top_io pid 2}${alignr}${offset -45}${top_io cpu 2}${alignr}${top_io mem 2} +${color}${top_io name 3} ${alignr}${offset -75}${top_io pid 3}${alignr}${offset -45}${top_io cpu 3}${alignr}${top_io mem 3} + +${color5}${font Roboto:style=Bold:size=17}N E T W O R K ${hr 2}${font} +${color6}Default Gateway:${color}${alignr}${gw_ip} +${color6}Internal IP Address:${color}${alignr}${addrs enp6s0} +${color6}External IP Address:${color}${alignr}${texeci 3600 wget -q -O- https://ipecho.net/plain} +${color6}Upload / Download Total:${color}${alignr}${totalup enp6s0} / ${totaldown enp6s0} +${color6}Upload / Download Speed:${color}${alignr}${upspeed enp6s0} / ${downspeed enp6s0} +${upspeedgraph enp6s0} +${downspeedgraph enp6s0} +]]; diff --git a/config/.conky/Conky_4K/start-conky.sh b/config/.conky/Conky_4K/start-conky.sh new file mode 100755 index 0000000..f58318b --- /dev/null +++ b/config/.conky/Conky_4K/start-conky.sh @@ -0,0 +1,80 @@ +#!/bin/sh +# vim: ft=sh:ts=4:sw=4:et:ai:cin + +conky_bin="conky" +config_file=$(dirname $0)/"conky.conf" +magic_id=$(md5sum "$config_file" | cut -c -12) +toggle_mode="N" + +usage() { + echo "USAGE: $(basename $0) [-t] [-p]" +} + +start_conky() { + "$conky_bin" --daemonize --quiet --config="$config_file" -- "$magic_id" + return $? +} + +stop_conky() { + pkill --signal kill --full "conky.*\s-- $magic_id" + return $? +} + +toggle_conky() { + if stop_conky; then + true + else + start_conky + fi +} + +restart_conky() { + stop_conky + sleep 1 + start_conky +} + +while getopts "tp:h" opt; do + case $opt in + t) # toggle mode on + toggle_mode="Y" + ;; + p) # path to conky binary + conky_bin=$(realpath -- "$OPTARG") + if [ -x "$conky_bin" ]; then + echo "Conky binary path: ${conky_bin}" + else + echo "ERROR: ${conky_bin} is not executable, path to Conky binary needed\n" >&2 + usage + exit 1 + fi + ;; + h) # help + usage + exit 1 + ;; + \?) + usage + exit 1 + ;; + esac +done +shift "$((OPTIND - 1))" + +if [ "$toggle_mode" == "Y" ]; then + toggle_conky +else + restart_conky +fi + +exit 0 + + + + + + + + + + diff --git a/config/.local/share/ranger/bookmarks b/config/.local/share/ranger/bookmarks index 29988b9..aa6638a 100644 --- a/config/.local/share/ranger/bookmarks +++ b/config/.local/share/ranger/bookmarks @@ -9,7 +9,7 @@ t:/home/tuan/Templates w:/home/tuan/workspace_l/home_lab/wiki k:/home/tuan/.syncthing/Documents/Uni/Studium/2022_Sommersemester/Bachelorprojekt/Implement EFCF based on libAFL/git/foundry/evm/src/executor q:/home/tuan/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/02-gps -':/home/tuan +':/home/tuan/.syncthing/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/04-5G_IANA/03-demonstration_23-10-31/state 24-01-22/5g-uulm-network-monitoring e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon s:/home/tuan/Pictures/Screenshots v:/home/tuan/.aya01/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte/06-Server_Setup/ansible diff --git a/config/.ssh/config b/config/.ssh/config index 52821c1..f352fae 100644 --- a/config/.ssh/config +++ b/config/.ssh/config @@ -38,13 +38,17 @@ Host pi pi.mii Host aya01 aya01.mii HostName 192.168.20.12 +Host behemoth behemoth.mii + User tuan + HostName 192.168.30.174 + Host mii HostName tudattr.dev -Host inko.mii pi.mii aya01.mii naruto.mii +Host inko.mii pi.mii aya01.mii naruto.mii behemoth.mii ProxyJump mii -Host mii pi aya01 inko naruto inko.mii pi.mii aya01.mii naruto.mii +Host mii pi aya01 inko naruto inko.mii pi.mii aya01.mii naruto.mii behemoth behemoth.mii Port 22 User tudattr IdentityFile /mnt/veracrypt1/genesis diff --git a/vim/.config/nvim/lazy-lock.json b/vim/.config/nvim/lazy-lock.json index 2ef522c..16de196 100644 --- a/vim/.config/nvim/lazy-lock.json +++ b/vim/.config/nvim/lazy-lock.json @@ -1,24 +1,24 @@ { - "LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" }, + "LazyVim": { "branch": "main", "commit": "c0ad2209b67f125a1f1a1ae3ccd6e89b7ffc8946" }, "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, - "SchemaStore.nvim": { "branch": "main", "commit": "88355559bb42cc8e4f6ca7b624dc4c3b654c5c08" }, - "bufferline.nvim": { "branch": "main", "commit": "b15c6daf5a64426c69732b31a951f4e438cb6590" }, - "catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, + "SchemaStore.nvim": { "branch": "main", "commit": "6eb5d8d9ec9f81b75aaa6d15d0f6dc12a066fd3f" }, + "bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" }, + "catppuccin": { "branch": "main", "commit": "045e3499d9ec8d84635fb08877ae44fd33f6a38d" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, - "crates.nvim": { "branch": "main", "commit": "ec2b04a380c9f3a8e6ca38c230e4990d71978143" }, + "conform.nvim": { "branch": "master", "commit": "5a15cc46e75cad804fd51ec5af9227aeb1d1bdaa" }, + "crates.nvim": { "branch": "main", "commit": "535773ed3b321d68ddd6ef8cd5a1e07b345026a6" }, "dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, - "edgy.nvim": { "branch": "main", "commit": "0b35dc6da4cae6cc2f724bc610eadf955cd2319b" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, - "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, + "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, "lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, @@ -30,31 +30,34 @@ "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "459c60317cc1d251f6eb3b6f010d015d5d24b806" }, - "neoconf.nvim": { "branch": "main", "commit": "8d7150e9d6113f01421c34c5aeb0f586afa232e0" }, + "neoconf.nvim": { "branch": "main", "commit": "db1d1bd45f4e91da6abc898281711fa47eda0ece" }, "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, - "nui.nvim": { "branch": "main", "commit": "fbb139c6f14896b434d0229099e1acd863ae6bec" }, + "nui.nvim": { "branch": "main", "commit": "756c59f46057cd2d43619cd3a6d4e01b2aa60295" }, + "nvim-ansible": { "branch": "main", "commit": "d115cb9bb3680c990e2684f58cf333663fff03b8" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" }, - "nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" }, + "nvim-lspconfig": { "branch": "master", "commit": "e172dd599cff2ae5267871b5e33fb42934c4df43" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, - "nvim-treesitter": { "branch": "master", "commit": "212b7a504cf56f85d1acc5be237261b42d7560c5" }, - "nvim-treesitter-context": { "branch": "master", "commit": "53cdd58446521575d8f1052152099e08b15ca53c" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3532f6095efd4723f7c066a5ac3fe632506cc09e" }, + "nvim-treesitter": { "branch": "master", "commit": "9775d5d7c724f81acdd441e7e9edefc4514e990b" }, + "nvim-treesitter-context": { "branch": "master", "commit": "b8b7e52c1517d401d7c519787d5dc4528c41291a" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "b7a0bfa3e93697ca5b61b15df633404bf8f45883" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, "onedark.vim": { "branch": "main", "commit": "57b77747694ea5676c3ca0eeaf9567dc499730c0" }, - "orgmode": { "branch": "master", "commit": "779a56823857a2e0baacadc7f3042fa0bfbaf6aa" }, + "orgmode": { "branch": "master", "commit": "18734589e5807074f57a5228ce06b52ea898b802" }, "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, - "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, - "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope.nvim": { "branch": "master", "commit": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8" }, + "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, + "rustaceanvim": { "branch": "master", "commit": "387ca846d632f8c90631536341ca1778b4c2c497" }, + "semshi": { "branch": "master", "commit": "0182447e2ff4dfa04cd2dfe5f189e012c581ca45" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope.nvim": { "branch": "master", "commit": "7472420f8734c710bd7009081cef9b97f08a3821" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, + "venv-selector.nvim": { "branch": "main", "commit": "2ad34f36d498ff5193ea10f79c87688bd5284172" }, "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" }, "vim-ledger": { "branch": "master", "commit": "281346a221434574dd7f8767a352b2bf0b218b74" }, "vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" }, diff --git a/vim/.config/nvim/lazyvim.json b/vim/.config/nvim/lazyvim.json index a943afc..89916fe 100644 --- a/vim/.config/nvim/lazyvim.json +++ b/vim/.config/nvim/lazyvim.json @@ -1,11 +1,16 @@ { "extras": [ + "lazyvim.plugins.extras.lang.ansible", + "lazyvim.plugins.extras.lang.clangd", "lazyvim.plugins.extras.lang.docker", + "lazyvim.plugins.extras.lang.elixir", + "lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.lang.python", + "lazyvim.plugins.extras.lang.python-semshi", "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.tex", - "lazyvim.plugins.extras.lang.yaml", - "lazyvim.plugins.extras.ui.edgy" + "lazyvim.plugins.extras.lang.yaml" ], "news": { "NEWS.md": "2123" diff --git a/vim/.config/nvim/lua/plugins/rust.lua b/vim/.config/nvim/lua/plugins/rust.lua new file mode 100644 index 0000000..a038ef7 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/rust.lua @@ -0,0 +1,44 @@ +return { + "mrcjkb/rustaceanvim", + version = "^4", -- Recommended + ft = { "rust" }, + opts = { + server = { + on_attach = function(_, bufnr) + vim.keymap.set("n", "cR", function() + vim.cmd.RustLsp("codeAction") + end, { desc = "Code Action", buffer = bufnr }) + vim.keymap.set("n", "dr", function() + vim.cmd.RustLsp("debuggables") + end, { desc = "Rust debuggables", buffer = bufnr }) + end, + default_settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = { + cargo = { + allFeatures = true, + loadOutDirsFromCheck = true, + runBuildScripts = true, + }, + -- Add clippy lints for Rust. + checkOnSave = { + allFeatures = true, + command = "clippy", + extraArgs = { "--no-deps" }, + }, + procMacro = { + enable = true, + ignored = { + ["async-trait"] = { "async_trait" }, + ["napi-derive"] = { "napi" }, + ["async-recursion"] = { "async_recursion" }, + }, + }, + }, + }, + }, + }, + config = function(_, opts) + vim.g.rustaceanvim = vim.tbl_deep_extend("force", {}, opts or {}) + end, +} diff --git a/zsh/.zshrc b/zsh/.zshrc index 70c7502..30e435a 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -20,6 +20,8 @@ setopt HIST_FIND_NO_DUPS # Alias alias q="exit" alias b="byobu" +alias vim="nvim" +alias cat="bat --pager=never" alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' alias xsel='xsel -ib' alias msfconsole="msfconsole -x \"db_connect metasploit@msf\"" @@ -39,6 +41,7 @@ alias notify="dunstify \"ping~\"" alias ekill="pkill emacs; pkill emacsclient; ed" alias latexmk="latexmk -f -pdf -interaction=nonstopmode" alias picotik="picocom --b 115200 /dev/ttyUSB0" +alias ls="eza" ## git alias gps="git push soft --all" alias gras="add_soft_git" From 6c023972efea5ecb377a0563433b2c8341032557 Mon Sep 17 00:00:00 2001 From: Tuan-Dat Tran Date: Fri, 15 Mar 2024 16:02:52 +0100 Subject: [PATCH 5/6] Added .gitconfig Signed-off-by: Tuan-Dat Tran --- README.md | 21 +- README.org | 49 - config/.Xdefaults | 2 +- config/.byobu/keybindings.tmux | 2 - config/.byobu/status | 15 - config/.config/alacritty/alacritty.toml | 2 +- config/.config/cava/config | 149 - config/.config/cava/shaders/bar_spectrum.frag | 79 - .../.config/cava/shaders/northern_lights.frag | 34 - config/.config/cava/shaders/pass_through.vert | 14 - config/.config/i3/config | 13 +- config/.config/nushell/config.nu | 556 -- config/.config/nushell/env.nu | 70 - config/.config/polybar/config | 392 -- config/.config/sioyek/keys_user.config | 208 - config/.config/sioyek/prefs_user.config | 137 - config/.config/starship.toml | 64 - config/.config/termite/config | 46 - config/.conky/Conky_4K/conky.conf | 173 - config/.conky/Conky_4K/start-conky.sh | 80 - config/.gitconfig | 18 + config/.local/share/ranger/bookmarks | 18 - .../2x4tnepw.default/chrome/userChrome.css | 3 - config/.mozilla/firefox/profiles.ini | 14 - config/.scripts/battery_stats.nu | 7 - config/.scripts/zellij-chooser.nu | 38 - config/.urxvt/ext/keyboard-select | 606 -- emacs/.emacs.d/.gitignore | 4 - emacs/.emacs.d/config.org | 227 - emacs/.emacs.d/init.el | 13 - resources/23-04-10_10-30-18-alacritty.png | Bin 1148175 -> 0 bytes vim/.config/nvim/lazy-lock.json | 46 +- vim/.config/nvim/lazyvim.json | 2 +- vim/.vim/autoload/colorizer.vim | 467 -- vim/.vim/autoload/plug.vim | 2541 ------- vim/.vim/ftplugin/cs.vim | 2 - vim/.vim/ftplugin/go.vim | 23 - vim/.vim/ftplugin/html.vim | 2 - vim/.vim/ftplugin/markdown.vim | 13 - vim/.vim/ftplugin/python.vim | 17 - vim/.vim/ftplugin/sh.vim | 3 - vim/.vim/ftplugin/tex.vim | 30 - vim/.vim/plugin/basics.vim | 30 - vim/.vim/plugin/colorizer.vim | 76 - vim/.vim/plugin/filetype.vim | 2 - vim/.vim/plugin/missspelling_abbrevs.vim | 5892 ----------------- vim/.vim/plugin/plugins.vim | 17 - vim/.vim/plugin/remaps.vim | 28 - vim/.vim/plugin/settings.vim | 14 - vim/.vim/plugin/skeletons.vim | 8 - vim/.vim/spell/de.utf-8.add | 846 --- vim/.vim/spell/de.utf-8.add.spl | Bin 10781 -> 0 bytes vim/.vim/spell/de.utf-8.spl | Bin 2388149 -> 0 bytes vim/.vim/templates/skeleton.go | 6 - vim/.vim/templates/skeleton.md | 5 - vim/.vim/templates/skeleton.sh | 1 - vim/.vim/templates/skeleton.tex | 32 - 57 files changed, 58 insertions(+), 13099 deletions(-) delete mode 100644 README.org delete mode 100644 config/.byobu/keybindings.tmux delete mode 100644 config/.byobu/status delete mode 100755 config/.config/cava/config delete mode 100644 config/.config/cava/shaders/bar_spectrum.frag delete mode 100644 config/.config/cava/shaders/northern_lights.frag delete mode 100644 config/.config/cava/shaders/pass_through.vert delete mode 100644 config/.config/nushell/config.nu delete mode 100644 config/.config/nushell/env.nu delete mode 100644 config/.config/polybar/config delete mode 100644 config/.config/sioyek/keys_user.config delete mode 100644 config/.config/sioyek/prefs_user.config delete mode 100644 config/.config/starship.toml delete mode 100644 config/.config/termite/config delete mode 100644 config/.conky/Conky_4K/conky.conf delete mode 100755 config/.conky/Conky_4K/start-conky.sh create mode 100644 config/.gitconfig delete mode 100644 config/.local/share/ranger/bookmarks delete mode 100644 config/.mozilla/firefox/2x4tnepw.default/chrome/userChrome.css delete mode 100644 config/.mozilla/firefox/profiles.ini delete mode 100755 config/.scripts/battery_stats.nu delete mode 100755 config/.scripts/zellij-chooser.nu delete mode 100644 config/.urxvt/ext/keyboard-select delete mode 100644 emacs/.emacs.d/.gitignore delete mode 100644 emacs/.emacs.d/config.org delete mode 100644 emacs/.emacs.d/init.el delete mode 100644 resources/23-04-10_10-30-18-alacritty.png delete mode 100644 vim/.vim/autoload/colorizer.vim delete mode 100644 vim/.vim/autoload/plug.vim delete mode 100644 vim/.vim/ftplugin/cs.vim delete mode 100644 vim/.vim/ftplugin/go.vim delete mode 100644 vim/.vim/ftplugin/html.vim delete mode 100644 vim/.vim/ftplugin/markdown.vim delete mode 100644 vim/.vim/ftplugin/python.vim delete mode 100644 vim/.vim/ftplugin/sh.vim delete mode 100644 vim/.vim/ftplugin/tex.vim delete mode 100644 vim/.vim/plugin/basics.vim delete mode 100644 vim/.vim/plugin/colorizer.vim delete mode 100644 vim/.vim/plugin/filetype.vim delete mode 100644 vim/.vim/plugin/missspelling_abbrevs.vim delete mode 100644 vim/.vim/plugin/plugins.vim delete mode 100644 vim/.vim/plugin/remaps.vim delete mode 100644 vim/.vim/plugin/settings.vim delete mode 100644 vim/.vim/plugin/skeletons.vim delete mode 100644 vim/.vim/spell/de.utf-8.add delete mode 100644 vim/.vim/spell/de.utf-8.add.spl delete mode 100644 vim/.vim/spell/de.utf-8.spl delete mode 100644 vim/.vim/templates/skeleton.go delete mode 100644 vim/.vim/templates/skeleton.md delete mode 100644 vim/.vim/templates/skeleton.sh delete mode 100644 vim/.vim/templates/skeleton.tex diff --git a/README.md b/README.md index 251c2d8..9c1dff2 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -# .dotfiles - -These are my personal dotfiles. - -Main tools I am currently using are: - -- i3-gaps -- nushell (although its not stable yet) -- (doom)emacs -- zellij -- alacritty +# Install dependencies +```bash +paru -S syncthing feh bottom zellij eza bat maim vlc python-pillow i3lock-color \ +vlc fd ripgrep unzip npm bacon simple-scan dunst picom \ +adobe-source-han-sans-jp-fonts obs-studio git zsh wget lightdm \ +lightdm-webkit2-greeter xorg-server i3-gaps xorg-xbacklight xorg-xrandr \ +alsa-utils pulseaudio pulseaudio-alsa pulseaudio-bluetooth playerctl \ +pavucontrol btrfs-progs udiskie blueman acpi acpid tlp conky stow openssh \ +firefox veracrypt keepassxc ranger rofi chromium delta-git +``` diff --git a/README.org b/README.org deleted file mode 100644 index 2fabf02..0000000 --- a/README.org +++ /dev/null @@ -1,49 +0,0 @@ -* .dotfiles - -These are the personal dotfiles for my laptop. - -Main tools I am currently using are (may be out of date): -- alacritty -- emacs (Doom Emacs) -- vim -- nu -- starship -- picom -- i3wm -- zellij -- synthing (as my home directory) - -#+CAPTION: Neofetch -#+ATTR_HTML: :width 960px -[[./resources/23-04-10_10-30-18-alacritty.png]] - -** Getting started - -*** Font setup - -Since we're using a powerline font we need to install them first. - -#+begin_src shell -git clone https://github.com/powerline/fonts.git --depth=1 -./fonts/install.sh -rm -rf fonts/ -#+end_src - -*** Installing the dotfiles - -To deploy the .dotfiles we use the tool stow. - -#+begin_src shell -git clone https://github.com/TuDatTr/dotfiles .dotfiles && cd .dotfiles -stow emacs -stow zsh -stow config -#+end_src - -** Author - -- Tuan-Dat Tran - [[https://gitlab.com/TuDatTr/][TuDatTr]] - -** License - -This project is licensed under the GPL-3.0 License - see LICENSE file for details. diff --git a/config/.Xdefaults b/config/.Xdefaults index d5dd1ff..2142bca 100644 --- a/config/.Xdefaults +++ b/config/.Xdefaults @@ -1,6 +1,6 @@ ! urxvt ! Fonts -urxvt*font: xft:Hack Nerd Font Mono:style=Regular:size=11:hinting=full, xft:DejaVu Sans Mono for Powerline:size=11, SourceHanSans-Regular +urxvt*font: xft:DejaVuSansM Nerd Font Mono:style=Regular:size=11:hinting=full ! Behavior urxvt*scrollBar: false diff --git a/config/.byobu/keybindings.tmux b/config/.byobu/keybindings.tmux deleted file mode 100644 index 3b962e1..0000000 --- a/config/.byobu/keybindings.tmux +++ /dev/null @@ -1,2 +0,0 @@ -set -g prefix F12 -unbind-key -n C-a \ No newline at end of file diff --git a/config/.byobu/status b/config/.byobu/status deleted file mode 100644 index 528da52..0000000 --- a/config/.byobu/status +++ /dev/null @@ -1,15 +0,0 @@ -# Status bar for tmux and screen - -# Status beginning with '#' are disabled. - -# Screen has two status lines, with 4 quadrants for status -screen_upper_left="color" -screen_upper_right="color whoami hostname ip_address menu" -screen_lower_left="color logo distro release #arch session" -screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time" - - -# Tmux has one status line, with 2 halves for status -tmux_left=" logo #distro #release #arch #session" -# You can have as many tmux right lines below here, and cycle through them using Shift-F5 -tmux_right="#network #disk_io #custom #entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime #fan_speed #cpu_temp battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap #disk #whoami #hostname ip_address #time_utc date time" \ No newline at end of file diff --git a/config/.config/alacritty/alacritty.toml b/config/.config/alacritty/alacritty.toml index b59158a..815a7d1 100644 --- a/config/.config/alacritty/alacritty.toml +++ b/config/.config/alacritty/alacritty.toml @@ -11,7 +11,7 @@ style = "Bold Italic" style = "Italic" [font.normal] -family = "DejaVu Sans Mono for Powerline" +family = "DejaVuSansM Nerd Font Mono" style = "Regular" [window] diff --git a/config/.config/cava/config b/config/.config/cava/config deleted file mode 100755 index 9a43938..0000000 --- a/config/.config/cava/config +++ /dev/null @@ -1,149 +0,0 @@ -## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting. - - -[general] - -# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0 -; mode = normal - -# Accepts only non-negative values. -; framerate = 60 - -# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off -# new as of 0.6.0 autosens of low values (dynamic range) -# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0 -; autosens = 1 -; overshoot = 20 - -# Manual sensitivity in %. Autosens must be turned off for this to take effect. -# 200 means double height. Accepts only non-negative values. -; sensitivity = 100 - -# The number of bars (0-200). 0 sets it to auto (fill up console). -# Bars' width and space between bars in number of characters. -; bars = 0 -; bar_width = 2 -; bar_spacing = 1 - - -# Lower and higher cutoff frequencies for lowest and highest bars -# the bandwidth of the visualizer. -# Note: there is a minimum total bandwidth of 43Mhz x number of bars. -# Cava will automatically increase the higher cutoff if a too low band is specified. -; lower_cutoff_freq = 50 -; higher_cutoff_freq = 10000 - - - -[input] - -# Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'. -# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with. -# -# All input methods uses the same config variable 'source' -# to define where it should get the audio. -# -# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink -# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them). -# -# For alsa 'source' will be the capture device. -# For fifo 'source' will be the path to fifo-file. -method = pulse -; source = auto - -; method = alsa -; source = hw:Loopback,1 - -; method = fifo -; source = /tmp/mpd.fifo - - - -[output] - -# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'. -# 'noncurses' is for systems that does not suport ncurses. -# 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications. -# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. -; method = ncurses - -# Visual channels. Can be 'stereo' or 'mono'. -# 'stereo' mirrors both channels with low frequencies in center. -# 'mono' averages both channels and outputs left to right lowest to highest frequencies. -; channels = stereo - -# Raw output target. A fifo will be created if target does not exist. -; raw_target = /dev/stdout - -# Raw data format. Can be 'binary' or 'ascii'. -; data_format = binary - -# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530). -; bit_format = 16bit - -# Ascii max value. In 'ascii' mode range will run from 0 to value specified here -; ascii_max_range = 1000 - -# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters. -# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)). -; bar_delimiter = 59 -; frame_delimiter = 10 - - - -[color] - -# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow. -# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a -# terminal that can change color definitions such as Gnome-terminal or rxvt. -; background = black -; foreground = blue - -# Gradient mode, only hex defined colors are supported, background must also be defined in hex -# or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will -# not able to restore color definitions on exit, simply restart your terminal to restore colors. -gradient = 1 -# GMK Noel -gradient_color_1 = '#FFFFFF' -gradient_color_2 = '#EEB9C1' -gradient_color_3 = '#B3DCE1' -gradient_color_4 = '#66B9D2' -# Cool Blues -; gradient_color_1 = '#2193b0' -; gradient_color_2 = '#6dd5ed' -# Quepal -; gradient_color_1 = '#11998e' -; gradient_color_2 = '#38ef7d' -# Teal Love -; gradient_color_1 = '#11FFBD' -; gradient_color_2 = '#AAFFA9' - -[smoothing] - -# Percentage value for integral smoothing. Takes values from 0 - 100. -# Higher values means smoother, but less precise. 0 to disable. -; integral = 70 - -# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable. -; monstercat = 1 -; waves = 0; - -# Set gravity percentage for "drop off". Higher values means bars will drop faster. -# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off". -; gravity = 100 - - -# In bar height, bars that would have been lower that this will not be drawn. -; ignore = 0 - - -[eq] - -# This one is tricky. You can have as much keys as you want. -# Remember to uncomment more then one key! More keys = more precision. -# Look at readme.md on github for further explanations and examples. -; 1 = 1 # bass -; 2 = 1 -; 3 = 1 # midtone -; 4 = 1 -; 5 = 1 # treble diff --git a/config/.config/cava/shaders/bar_spectrum.frag b/config/.config/cava/shaders/bar_spectrum.frag deleted file mode 100644 index b078913..0000000 --- a/config/.config/cava/shaders/bar_spectrum.frag +++ /dev/null @@ -1,79 +0,0 @@ -#version 330 - -in vec2 fragCoord; -out vec4 fragColor; - -// bar values. defaults to left channels first (low to high), then right (high to low). -uniform float bars[512]; - -uniform int bars_count; // number of bars (left + right) (configurable) -uniform int bar_width; // bar width (configurable), not used here -uniform int bar_spacing; // space bewteen bars (configurable) - -uniform vec3 u_resolution; // window resolution - -//colors, configurable in cava config file (r,g,b) (0.0 - 1.0) -uniform vec3 bg_color; // background color -uniform vec3 fg_color; // foreground color - -uniform int gradient_count; -uniform vec3 gradient_colors[8]; // gradient colors - -vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max) -{ - //create color based on fraction of this color and next color - float yr = (y - y_min) / (y_max - y_min); - return col_1 * (1.0 - yr) + col_2 * yr; -} - -void main() -{ - // find which bar to use based on where we are on the x axis - float x = u_resolution.x * fragCoord.x; - int bar = int(bars_count * fragCoord.x); - - //calculate a bar size - float bar_size = u_resolution.x / bars_count; - - //the y coordinate and bar values are the same - float y = bars[bar]; - - // make sure there is a thin line at bottom - if (y * u_resolution.y < 1.0) - { - y = 1.0 / u_resolution.y; - } - - //draw the bar up to current height - if (y > fragCoord.y) - { - //make some space between bars basen on settings - if (x > (bar + 1) * (bar_size) - bar_spacing) - { - fragColor = vec4(bg_color,1.0); - } - else - { - if (gradient_count == 0) - { - fragColor = vec4(fg_color,1.0); - } - else - { - //find which color in the configured gradient we are at - int color = int((gradient_count - 1) * fragCoord.y); - - //find where on y this and next color is supposed to be - float y_min = color / (gradient_count - 1.0); - float y_max = (color + 1.0) / (gradient_count - 1.0); - - //make color - fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0); - } - } - } - else - { - fragColor = vec4(bg_color,1.0); - } -} \ No newline at end of file diff --git a/config/.config/cava/shaders/northern_lights.frag b/config/.config/cava/shaders/northern_lights.frag deleted file mode 100644 index ecd859a..0000000 --- a/config/.config/cava/shaders/northern_lights.frag +++ /dev/null @@ -1,34 +0,0 @@ -#version 330 - -in vec2 fragCoord; -out vec4 fragColor; - -// bar values. defaults to left channels first (low to high), then right (high to low). -uniform float bars[512]; - -uniform int bars_count; // number of bars (left + right) (configurable) - -uniform vec3 u_resolution; // window resolution, not used here - -//colors, configurable in cava config file -uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here -uniform vec3 fg_color; // foreground color, not used here - -void main() -{ - // find which bar to use based on where we are on the x axis - int bar = int(bars_count * fragCoord.x); - - float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0; - float y = (bars[bar]) * bar_y; - - float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count; - float bar_r = 1.0 - abs((bar_x - 0.5)) * 2; - - bar_r = bar_r * bar_r * 2; - - // set color - fragColor.r = fg_color.x * y * bar_r; - fragColor.g = fg_color.y * y * bar_r; - fragColor.b = fg_color.z * y * bar_r; -} diff --git a/config/.config/cava/shaders/pass_through.vert b/config/.config/cava/shaders/pass_through.vert deleted file mode 100644 index a4f20e5..0000000 --- a/config/.config/cava/shaders/pass_through.vert +++ /dev/null @@ -1,14 +0,0 @@ -#version 330 - - -// Input vertex data, different for all executions of this shader. -layout(location = 0) in vec3 vertexPosition_modelspace; - -// Output data ; will be interpolated for each fragment. -out vec2 fragCoord; - -void main() -{ - gl_Position = vec4(vertexPosition_modelspace,1); - fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0; -} diff --git a/config/.config/i3/config b/config/.config/i3/config index d7bc02a..946a481 100644 --- a/config/.config/i3/config +++ b/config/.config/i3/config @@ -86,17 +86,14 @@ for_window [title="KeePassX$"] floating enable border normal ############################ Startup Applications ############################# ############################################################################### -# exec --no-startup-id setxkbmap us,de; setxkbmap -option ctrl:nocaps; setxkbmap -option grp:lalt_lshift_toggle +exec --no-startup-id setxkbmap eu; setxkbmap -option ctrl:nocaps; exec --no-startup-id picom exec --no-startup-id udiskie exec --no-startup-id conky -c ~/.conky/syclo-crimson-bottomleft.conkyrc # exec --no-startup-id synergyc -f --no-tray --debug INFO --name genesis --enable-crypto 192.168.178.38:24800 exec --no-startup-id dunst exec --no-startup-id ~/.scripts/startup.sh -exec --no-startup-id llk -exec --no-startup-id emacs --daemon exec --no-startup-id syncthing -exec --no-startup-id xrandr --output eDP1 --auto --left-of HDMI1 --output HDMI1 --off --output DP1 --off; feh --randomize --bg-fill /home/tuan/Pictures/Wallpaper/* exec --no-startup-id feh --randomize --bg-fill $HOME/Pictures/Wallpaper/* ############################################################################### @@ -110,13 +107,13 @@ bindsym $mod+Shift+s exec poweroff # start a terminal bindsym $mod+space exec alacritty -bindsym $mod+Return exec alacritty -e nu /home/tuan/.scripts/zellij-chooser.nu +bindsym $mod+Return exec alacritty -e zellij # kill focused window bindsym $mod+Shift+q kill # start program launcher -bindsym $mod+d exec --no-startup-id /home/tuan/.config/rofi/launchers/type-1/launcher.sh +bindsym $mod+d exec --no-startup-id $HOME/.config/rofi/launchers/type-1/launcher.sh # Screen brightness controls bindsym XF86MonBrightnessUp exec --no-startup-id ~/.scripts/screen.sh up @@ -133,9 +130,7 @@ bindsym XF86AudioPrevious exec "playerctl previous" # Application Shortcuts bindsym $mod+b exec firefox -bindsym $mod+p exec firefox --private-window https://mos4.de -bindsym $mod+e exec emacsclient -c -bindsym $mod+m exec thunderbird +bindsym $mod+p exec firefox --private-window https://tudattr.dev # Whole Screen bindsym Control+Print exec --no-startup-id ~/.scripts/screenshot.sh screen diff --git a/config/.config/nushell/config.nu b/config/.config/nushell/config.nu deleted file mode 100644 index 141e3ba..0000000 --- a/config/.config/nushell/config.nu +++ /dev/null @@ -1,556 +0,0 @@ -# Nushell Config File - -# For more information on defining custom themes, see -# https://www.nushell.sh/book/coloring_and_theming.html -# And here is the theme collection -# https://github.com/nushell/nu_scripts/tree/main/themes -let dark_theme = { - # color for nushell primitives - separator: white - leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off - header: green_bold - empty: blue - # Closures can be used to choose colors for specific values. - # The value (in this case, a bool) is piped into the closure. - bool: { || if $in { 'light_cyan' } else { 'light_gray' } } - int: white - filesize: {|e| - if $e == 0b { - 'white' - } else if $e < 1mb { - 'cyan' - } else { 'blue' } - } - duration: white - date: { || (date now) - $in | - if $in < 1hr { - 'red3b' - } else if $in < 6hr { - 'orange3' - } else if $in < 1day { - 'yellow3b' - } else if $in < 3day { - 'chartreuse2b' - } else if $in < 1wk { - 'green3b' - } else if $in < 6wk { - 'darkturquoise' - } else if $in < 52wk { - 'deepskyblue3b' - } else { 'dark_gray' } - } - range: white - float: white - string: white - nothing: white - binary: white - cellpath: white - row_index: green_bold - record: white - list: white - block: white - hints: dark_gray - - shape_and: purple_bold - shape_binary: purple_bold - shape_block: blue_bold - shape_bool: light_cyan - shape_custom: green - shape_datetime: cyan_bold - shape_directory: cyan - shape_external: cyan - shape_externalarg: green_bold - shape_filepath: cyan - shape_flag: blue_bold - shape_float: purple_bold - # shapes are used to change the cli syntax highlighting - shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} - shape_globpattern: cyan_bold - shape_int: purple_bold - shape_internalcall: cyan_bold - shape_list: cyan_bold - shape_literal: blue - shape_matching_brackets: { attr: u } - shape_nothing: light_cyan - shape_operator: yellow - shape_or: purple_bold - shape_pipe: purple_bold - shape_range: yellow_bold - shape_record: cyan_bold - shape_redirection: purple_bold - shape_signature: green_bold - shape_string: green - shape_string_interpolation: cyan_bold - shape_table: blue_bold - shape_variable: purple -} - -let light_theme = { - # color for nushell primitives - separator: dark_gray - leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off - header: green_bold - empty: blue - # Closures can be used to choose colors for specific values. - # The value (in this case, a bool) is piped into the closure. - bool: { || if $in { 'dark_cyan' } else { 'dark_gray' } } - int: dark_gray - filesize: {|e| - if $e == 0b { - 'dark_gray' - } else if $e < 1mb { - 'cyan_bold' - } else { 'blue_bold' } - } - duration: dark_gray - date: { || (date now) - $in | - if $in < 1hr { - 'red3b' - } else if $in < 6hr { - 'orange3' - } else if $in < 1day { - 'yellow3b' - } else if $in < 3day { - 'chartreuse2b' - } else if $in < 1wk { - 'green3b' - } else if $in < 6wk { - 'darkturquoise' - } else if $in < 52wk { - 'deepskyblue3b' - } else { 'dark_gray' } - } - range: dark_gray - float: dark_gray - string: dark_gray - nothing: dark_gray - binary: dark_gray - cellpath: dark_gray - row_index: green_bold - record: white - list: white - block: white - hints: dark_gray - - shape_and: purple_bold - shape_binary: purple_bold - shape_block: blue_bold - shape_bool: light_cyan - shape_custom: green - shape_datetime: cyan_bold - shape_directory: cyan - shape_external: cyan - shape_externalarg: green_bold - shape_filepath: cyan - shape_flag: blue_bold - shape_float: purple_bold - # shapes are used to change the cli syntax highlighting - shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b} - shape_globpattern: cyan_bold - shape_int: purple_bold - shape_internalcall: cyan_bold - shape_list: cyan_bold - shape_literal: blue - shape_matching_brackets: { attr: u } - shape_nothing: light_cyan - shape_operator: yellow - shape_or: purple_bold - shape_pipe: purple_bold - shape_range: yellow_bold - shape_record: cyan_bold - shape_redirection: purple_bold - shape_signature: green_bold - shape_string: green - shape_string_interpolation: cyan_bold - shape_table: blue_bold - shape_variable: purple -} - -# External completer example -# let carapace_completer = {|spans| -# carapace $spans.0 nushell $spans | from json -# } - - -# The default config record. This is where much of your global configuration is setup. -let-env config = { - ls: { - use_ls_colors: true # use the LS_COLORS environment variable to colorize output - clickable_links: true # enable or disable clickable links. Your terminal has to support links. - } - rm: { - always_trash: false # always act as if -t was given. Can be overridden with -p - } - cd: { - abbreviations: false # allows `cd s/o/f` to expand to `cd some/other/folder` - } - table: { - mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other - trim: { - methodology: wrapping # wrapping or truncating - wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology - truncating_suffix: "..." # A suffix used by the 'truncating' methodology - } - } - - explore: { - help_banner: true - exit_esc: true - - command_bar_text: '#C4C9C6' - # command_bar: {fg: '#C4C9C6' bg: '#223311' } - - status_bar_background: {fg: '#1D1F21' bg: '#C4C9C6' } - # status_bar_text: {fg: '#C4C9C6' bg: '#223311' } - - highlight: {bg: 'yellow' fg: 'black' } - - status: { - # warn: {bg: 'yellow', fg: 'blue'} - # error: {bg: 'yellow', fg: 'blue'} - # info: {bg: 'yellow', fg: 'blue'} - } - - try: { - # border_color: 'red' - # highlighted_color: 'blue' - - # reactive: false - } - - table: { - split_line: '#404040' - - cursor: true - - line_index: true - line_shift: true - line_head_top: true - line_head_bottom: true - - show_head: true - show_index: true - - # selected_cell: {fg: 'white', bg: '#777777'} - # selected_row: {fg: 'yellow', bg: '#C1C2A3'} - # selected_column: blue - - # padding_column_right: 2 - # padding_column_left: 2 - - # padding_index_left: 2 - # padding_index_right: 1 - } - - config: { - cursor_color: {bg: 'yellow' fg: 'black' } - - # border_color: white - # list_color: green - } - } - - history: { - max_size: 10000 # Session has to be reloaded for this to take effect - sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file - file_format: "plaintext" # "sqlite" or "plaintext" - } - completions: { - case_sensitive: false # set to true to enable case-sensitive completions - quick: true # set this to false to prevent auto-selecting completions when only one remains - partial: true # set this to false to prevent partial filling of the prompt - algorithm: "prefix" # prefix or fuzzy - external: { - enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow - max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options - completer: null # check 'carapace_completer' above as an example - } - } - filesize: { - metric: true # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard) - format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto - } - - color_config: $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme` - use_grid_icons: true - footer_mode: "25" # always, never, number_of_rows, auto - float_precision: 2 # the precision for displaying floats in tables - # buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL - use_ansi_coloring: true - edit_mode: emacs # emacs, vi - shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue - # true or false to enable or disable the welcome banner at startup - show_banner: false - render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt. - - #hooks: { - # pre_prompt: [{ || - # null # replace with source code to run before the prompt is shown - # }] - # pre_execution: [{ || - # null # replace with source code to run before the repl input is run - # }] - # env_change: { || - # PWD: [{|before, after| - # null # replace with source code to run if the PWD environment is different since the last repl input - # }] - # } - # display_output: { || - # if (term size).columns >= 100 { table -e } else { table } - # } - #} - menus: [ - # Configuration for default nushell menus - # Note the lack of source parameter - { - name: completion_menu - only_buffer_difference: false - marker: "| " - type: { - layout: columnar - columns: 4 - col_width: 20 # Optional value. If missing all the screen width is used to calculate column width - col_padding: 2 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - } - { - name: history_menu - only_buffer_difference: true - marker: "? " - type: { - layout: list - page_size: 10 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - } - { - name: help_menu - only_buffer_difference: true - marker: "? " - type: { - layout: description - columns: 4 - col_width: 20 # Optional value. If missing all the screen width is used to calculate column width - col_padding: 2 - selection_rows: 4 - description_rows: 10 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - } - # Example of extra menus created using a nushell source - # Use the source field to create a list of records that populates - # the menu - { - name: commands_menu - only_buffer_difference: false - marker: "# " - type: { - layout: columnar - columns: 4 - col_width: 20 - col_padding: 2 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - source: { |buffer, position| - $nu.scope.commands - | where name =~ $buffer - | each { |it| {value: $it.name description: $it.usage} } - } - } - { - name: vars_menu - only_buffer_difference: true - marker: "# " - type: { - layout: list - page_size: 10 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - source: { |buffer, position| - $nu.scope.vars - | where name =~ $buffer - | sort-by name - | each { |it| {value: $it.name description: $it.type} } - } - } - { - name: commands_with_description - only_buffer_difference: true - marker: "# " - type: { - layout: description - columns: 4 - col_width: 20 - col_padding: 2 - selection_rows: 4 - description_rows: 10 - } - style: { - text: green - selected_text: green_reverse - description_text: yellow - } - source: { |buffer, position| - $nu.scope.commands - | where name =~ $buffer - | each { |it| {value: $it.name description: $it.usage} } - } - } - ] - keybindings: [ - { - name: completion_menu - modifier: none - keycode: tab - mode: [emacs vi_normal vi_insert] - event: { - until: [ - { send: menu name: completion_menu } - { send: menunext } - ] - } - } - { - name: completion_previous - modifier: shift - keycode: backtab - mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list - event: { send: menuprevious } - } - { - name: history_menu - modifier: control - keycode: char_r - mode: emacs - event: { send: menu name: history_menu } - } - { - name: next_page - modifier: control - keycode: char_x - mode: emacs - event: { send: menupagenext } - } - { - name: undo_or_previous_page - modifier: control - keycode: char_z - mode: emacs - event: { - until: [ - { send: menupageprevious } - { edit: undo } - ] - } - } - { - name: yank - modifier: control - keycode: char_y - mode: emacs - event: { - until: [ - {edit: pastecutbufferafter} - ] - } - } - { - name: unix-line-discard - modifier: control - keycode: char_u - mode: [emacs, vi_normal, vi_insert] - event: { - until: [ - {edit: cutfromlinestart} - ] - } - } - { - name: kill-line - modifier: control - keycode: char_k - mode: [emacs, vi_normal, vi_insert] - event: { - until: [ - {edit: cuttolineend} - ] - } - } - # Keybindings used to trigger the user defined menus - { - name: commands_menu - modifier: control - keycode: char_t - mode: [emacs, vi_normal, vi_insert] - event: { send: menu name: commands_menu } - } - { - name: vars_menu - modifier: alt - keycode: char_o - mode: [emacs, vi_normal, vi_insert] - event: { send: menu name: vars_menu } - } - { - name: commands_with_description - modifier: control - keycode: char_s - mode: [emacs, vi_normal, vi_insert] - event: { send: menu name: commands_with_description } - } - ] - -} - -def add_soft [project] { git remote add soft $"ssh://git.aya00:/($project)" } - -alias ll = ls -la -alias la = ls -a -alias q = exit -alias e = emacsclient -t -alias ekill = (pkill emacs;pkill emacsclient;emacs --daemon) -alias picotik = picocom --b 115199 /dev/ttyUSB0 -alias nmap = ^nmap -T5 --min-parallelism 100 -Pn -alias ed = emacs --daemon -alias eledger = emacsclient -nw ~/Documents/Finanzen/Ledger/MyBudget.ledger -alias sshconfig = emacsclient -nw ~/.ssh/config -alias econfig = emacsclient -nw ~/.doom.d/init.el -alias wttr = curl wttr.in/Essen -alias tvres = xrandr --output HDMI1 --transform 1.02,0,-20,0,1.02,-10,0,0,1 -alias defaultres = xrandr --output HDMI1 --transform 1.00,0,0,0,1.00,0,0,0,1 -alias latexmk = ^latexmk -f -pdf -interaction=nonstopmode - -# git -alias gpa = git push all --all -alias gras = add_soft -alias gd = git diff -alias gp = git push -alias gcsm = git commit -s -m -alias gaa = git add --all -alias gco = git checkout -alias grv = git remote -v - -let-env DOCKER_BUILDKIT = 1 # Disable for podman -source ~/.cache/starship/init.nu - diff --git a/config/.config/nushell/env.nu b/config/.config/nushell/env.nu deleted file mode 100644 index 9783f9d..0000000 --- a/config/.config/nushell/env.nu +++ /dev/null @@ -1,70 +0,0 @@ -# Nushell Environment Config File - -def create_left_prompt [] { - let home = ($env | get -i (if $nu.os-info.name == "windows" { "USERPROFILE" } else { "HOME" }) | into string) - let dir = ([ - ($env.PWD | str substring 0..($home | str length) | str replace -s $home "~"), - ($env.PWD | str substring ($home | str length)..) - ] | str join) - - let path_segment = if (is-admin) { - $"(ansi red_bold)($dir)" - } else { - $"(ansi green_bold)($dir)" - } - - $path_segment -} - -def create_right_prompt [] { - let time_segment = ([ - (date now | date format '%m/%d/%Y %r') - ] | str join) - - $time_segment -} - -# Use nushell functions to define your right and left prompt -let-env PROMPT_COMMAND = { || create_left_prompt } -let-env PROMPT_COMMAND_RIGHT = {|| create_right_prompt } - -# The prompt indicators are environmental variables that represent -# the state of the prompt -let-env PROMPT_INDICATOR = { || "〉" } -let-env PROMPT_INDICATOR_VI_INSERT = { || ": " } -let-env PROMPT_INDICATOR_VI_NORMAL = { || "〉" } -let-env PROMPT_MULTILINE_INDICATOR = { || "::: " } - -# Specifies how environment variables are: -# - converted from a string to a value on Nushell startup (from_string) -# - converted from a value back to a string when running external commands (to_string) -# Note: The conversions happen *after* config.nu is loaded -let-env ENV_CONVERSIONS = { - "PATH": { - from_string: { |s| $s | split row (char esep) | path expand -n } - to_string: { |v| $v | path expand -n | str join (char esep) } - } - "Path": { - from_string: { |s| $s | split row (char esep) | path expand -n } - to_string: { |v| $v | path expand -n | str join (char esep) } - } -} - -# Directories to search for scripts when calling source or use -# -# By default, /scripts is added -let-env NU_LIB_DIRS = [ - ($nu.config-path | path dirname | path join 'scripts') -] - -# Directories to search for plugin binaries when calling register -# -# By default, /plugins is added -let-env NU_PLUGIN_DIRS = [ - ($nu.config-path | path dirname | path join 'plugins') -] - -# To add entries to PATH (on Windows you might use Path), you can use the following pattern: -# let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path') -let-env VISUAL = 'emacsclient -t' -let-env EDITOR = 'emacsclient -t' diff --git a/config/.config/polybar/config b/config/.config/polybar/config deleted file mode 100644 index 6c840e9..0000000 --- a/config/.config/polybar/config +++ /dev/null @@ -1,392 +0,0 @@ -[colors] -background = ${xrdb:color0:#22300} -background-alt = ${xrdb:color8:#fa400} -foreground = ${xrdb:color7:#cdd} -foreground-alt = ${xrdb:color15:#eef} -black = ${xrdb:color0:#233} -red = ${xrdb:color1:#f90} -green = ${xrdb:color2:#8c4} -yellow = ${xrdb:color3:#fc0} -blue = ${xrdb:color4:#0af} -magenta = ${xrdb:color5:#e16} -cyan = ${xrdb:color6:#098} -white = ${xrdb:color7:#cdd} - -[bar/systray] -width = 100% -height = 25 - -radius = 6.0 -fixed-center = true - -tray-position = right -tray-padding = 0 - -background = #00000000 -foreground = ${colors.foreground} - -module-margin-left = 1 -module-margin-right = 1 - -font-0 = DejaVu Sans Mono for Powerline:pixelsize=10;1 -# font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -# font-2 = siji:pixelsize=10;1 -# font-3 = FontAwesome:style=Regular:pixelsize=10 - -modules-left = -modules-center = i3 -modules-right = - -cursor-click = pointer -cursor-scroll = ns-resize - - -[bar/beep] -width = 100% -height = 25 - -radius = 6.0 -fixed-center = true - -tray-position = right -tray-padding = 2 - -background = #00000000 -foreground = ${colors.foreground} - -module-margin-left = 1 -module-margin-right = 1 - -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 -font-3 = FontAwesome:style=Regular:pixelsize=10 - -modules-left = volume xkeyboard -modules-center = date -modules-right = - -cursor-click = pointer -cursor-scroll = ns-resize - -[bar/boop] -width = 100% -height = 2% -bottom = true -radius = 6.0 -fixed-center = true - -background = #00000000 -foreground = ${colors.foreground} - -line-size = 0 - -line-color = ${colors.blue} - -border-size = 0 -border-color = #00000000 - -padding-left = 0 -padding-right = 2 - -module-margin-left = 1 -module-margin-right = 2 - -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 -font-3 = FontAwesome:style=Regular:pixelsize=10 - -modules-left = airvpn -modules-center = i3 -modules-right = xbacklight wlan eth battery1 powermenu - -cursor-click = pointer -cursor-scroll = ns-resize - -[module/xkeyboard] -type = internal/xkeyboard -blacklist-0 = num lock - -format-prefix = " " -format-prefix-foreground = ${colors.foreground-alt} -format-prefix-underline = ${colors.magenta} - -label-layout = %layout% -label-layout-underline = ${colors.magenta} - -label-indicator-padding = 2 -label-indicator-margin = 1 -label-indicator-background = ${colors.magenta} -label-indicator-underline = ${colors.magenta} - -[module/spotify] -type = custom/script -exec-if = pgrep -x spotify -exec = echo "$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)" - -[module/spotify-prev] -type = custom/script -exec-if = pgrep -x spotify -exec = echo "" -click-left = bash -c "playerctl previous" - -[module/spotify-next] -type = custom/script -exec-if = pgrep -x spotify -exec = echo "" -click-left = bash -c "playerctl next" - -[module/spotify-play] -type = custom/script -exec-if = pgrep -x spotify -exec = ~/.scripts/spotify-play.out -tail = true -click-left = bash -c "if [ `cat /home/$USER/.scripts/playstate` = 0 ]; then echo '1'>/home/$USER/.scripts/playstate;else echo '0'>/home/$USER/.scripts/playstate;fi" - -[module/spotify-stop] -type = custom/script -exec-if = pgrep -x spotify -exec = echo "" -tail = true -click-left = bash -c "playerctl stop && echo '0'>/home/$USER/.scripts/playstate" - -[module/airvpn] -type = custom/script -exec-if = -exec = "if [[ $(ip addr | grep tun) ]]; then echo 'VPN: connected'; else echo 'VPN: disconnectd'; fi" -tail = true - - -[module/i3] -type = internal/i3 - -pin-workspaces = true - -strip-wsnumbers = true - -index-sort = false - -enable-click = false - -enable-scroll = false - -wrapping-scroll = false - -reverse-scroll = false - -fuzzy-match = true - -ws-icon-0 = 1; -ws-icon-1 = 2; -ws-icon-2 = 3; -ws-icon-3 = 4; -ws-icon-4 = 5; -ws-icon-5 = 6; -ws-icon-6 = 7; -ws-icon-7 = 8; -ws-icon-8 = 9; -ws-icon-default =  - -format = - -label-mode = %mode% -label-mode-padding = 2 -label-mode-background = ${colors.black} - -label-focused = %name% -label-focused-foreground = ${colors.foreground} -label-focused-background = ${colors.background} -label-focused-underline = ${colors.blue} -label-focused-padding = 4 - -label-unfocused = %name% -label-unfocused-padding = 4 - -label-visible = %name% -label-visible-underline = ${colors.red} -label-visible-padding = 4 - -label-urgent = %name% -label-urgent-foreground = ${colors.black} -label-urgent-background = ${colors.red} -label-urgent-padding = 4 - -[module/xbacklight] -type = internal/xbacklight - -format =