major restructuring for using snowfall

This commit is contained in:
2024-02-01 12:42:15 +01:00
parent d8e53f1f78
commit 67d23bcd9e
87 changed files with 24 additions and 164 deletions

View File

@ -0,0 +1,8 @@
import = [
"~/.config/alacritty/theme/themes/smoooooth.toml"
]
[[keyboard.bindings]]
chars = "fzf-z \r"
key = "Z"
mods = "Control"

1
non-nix/direnvrc Normal file
View File

@ -0,0 +1 @@
source /run/current-system/sw/share/nix-direnv/direnvrc

View File

@ -0,0 +1,8 @@
(("default" . ((user-emacs-directory . "~/emacs/doom-emacs")))
("vanilla" . ((user-emacs-directory . "~/emacs/vanilla")))
("spacemacs" . ((user-emacs-directory . "~/emacs/spacemacs")))
)
;(env . (("DOOMDIR" . "~/emacs/doom-config"))))))
;("doom" . ((user-emacs-directory . "~/emacs/doom")))
;(doom-private-dir . "~/emacs/doom-config"))))
;)

View File

@ -0,0 +1,344 @@
;; Here are some additional functions/macros that could 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
(setq user-full-name "Julian Mutter"
user-mail-address "julian.mutter@comumail.de")
(setq doom-theme 'doom-dracula
doom-font (font-spec :family "Source Code Pro" :size 14)
doom-variable-pitch-font (font-spec :family "DejaVu Sans" :size 15))
(setq display-line-numbers-type 'nil) ;; 'relative
(setq-default evil-escape-key-sequence "kj")
;; (after! company
;; (setq company-idle-delay 0.1))
(map! :leader :desc "Open external terminal" "o t" (cmd! (call-process-shell-command "$TERMINAL &" nil 0)))
(map! :leader :desc "Open external file explorer" "o e" (cmd! (call-process-shell-command "thunar &" nil 0)))
;; Remap font scaling keybindings to make more sense
(map! :desc "Increase font size" :n "C-+" #'text-scale-increase)
(map! :desc "Decrease font size" :n "C--" #'text-scale-decrease)
(map! :desc "Reset font size" :n "C-=" #'doom/reset-font-size)
(map! :desc "Flycheck next error" :nv "g n" #'flycheck-next-error)
(map! :desc "Flycheck previous error" :nv "g N" #'flycheck-previous-error)
(map! :leader "c X" #'flycheck-list-errors)
(map! :desc "Save" :g "C-s" #'fd-save-and-escape)
;; (map! :leader "w 1" #'delete-other-windows)
(map! :leader "t p" #'+popup/toggle)
;; Useful for recompiling or running a project
(map! :nvi "<f5>" #'projectile-repeat-last-command)
;; Do not use autosave when using vim save command
(evil-ex-define-cmd "write" #'fd-format-without-autosave)
;; Select other window by number
(dotimes (counter 9)
(let ((command (format "(map! :leader \"%d\" #'winum-select-window-%d)"
(1+ counter) (1+ counter))))
(eval (read command))))
(map! :leader "r" #'quickrun)
(defun fd-format-without-autosave()
(interactive)
(let ((current-prefix-arg 4)) ;; pass universal argument
(call-interactively #'save-buffer))
)
(defun fd-save-and-escape()
(interactive)
(company-abort)
(evil-force-normal-state)
(save-buffer))
;; Do not ask before exiting emacs
(setq confirm-kill-emacs nil)
;; Open pdf files with external reader
(openwith-mode t)
(setq openwith-associations '(("\\.pdf\\'" "evince" (file))))
;; Org settings
(setq org-directory "~/Nextcloud/org"
org-roam-directory "~/Nextcloud/org/roam")
;; Make all org files agenda files
(setq org-agenda-files (list org-directory "~/dev/bachelor-thesis/notes"))
(setq org-export-allow-bind-keywords t)
;; Insert timestamp when marking task as done
(setq org-log-done #'time)
(add-hook 'org-clock-in-hook #'save-buffer)
(add-hook 'org-clock-out-hook #'save-buffer)
(setq org-pomodoro-manual-break t)
;; Max volume is 65536 since player is paplay
(let ((volume "--volume=40000"))
(setq org-pomodoro-start-sound-args volume)
(setq org-pomodoro-killed-sound-args volume)
(setq org-pomodoro-ticking-sound-args volume)
(setq org-pomodoro-finished-sound-args volume)
(setq org-pomodoro-overtime-sound-args volume)
(setq org-pomodoro-long-break-sound-args volume)
(setq org-pomodoro-short-break-sound-args volume)
)
(setq org-agenda-custom-commands
'(("." "Clocking today" agenda ""
((org-agenda-span 1)
(org-agenda-start-day "today")
(org-agenda-start-with-clockreport-mode t)
(org-agenda-start-with-log-mode 'clockcheck)
))))
(setq org-agenda-clockreport-parameter-plist '(:link t :maxlevel 2 :fileskip0 t)) ;; :stepskip0 t
(setq org-clock-mode-line-total 'today)
(map! :map org-mode-map :nvi "C-k" #'org-backward-element)
(map! :map org-mode-map :nvi "C-j" #'org-forward-element)
(map! :map org-mode-map :nvi "C-h" #'org-up-element)
(map! :map org-mode-map :nvi "C-l" #'org-down-element)
(map! :map org-mode-map :nvi "M-i" #'org-roam-node-insert)
(map! :map org-mode-map :nvi "M-@" #'org-cite-insert)
(map! :map doom-leader-notes-map "r r" #'org-roam-node-find)
(map! :map doom-leader-notes-map "r t" #'org-roam-buffer-toggle)
(map! :map doom-leader-notes-map "s" #'fd-org-notes-search-follow-symlinks)
(after! org
(add-to-list 'org-capture-templates
'("b" "Bachelor todo" entry
(file+headline "bachelor/todo.org" "Inbox")
"* IDEA %?\n%i\n%T\n%a" :prepend t)
))
(defun fd-org-notes-search-follow-symlinks (query)
"Alternative to +default/org-notes-search which follows symbolic links for better project inlusion"
(interactive
(list (if (doom-region-active-p)
(buffer-substring-no-properties
(doom-region-beginning)
(doom-region-end))
"")))
(require 'org)
(+vertico-file-search :query query :in org-directory :args '("-L")))
(defun fd-org-latex-preview-buffer ()
"Show latex preview for whole buffer by running org-latex-preview with C-u C-u"
(interactive)
(let ((current-prefix-arg '(16)))
(call-interactively 'org-latex-preview)
))
;; Custom time format display
(setq-default org-display-custom-times t)
(setq org-time-stamp-custom-formats '("<%d.%m.%Y %a>" . "<%d.%m.%Y %a %H:%M>"))
;; Enable org mode like header navigation
(map! :map TeX-mode-map :nvi "<backtab>" #'outline-cycle-buffer)
(map! :map TeX-mode-map :nv "C-k" #'outline-backward-same-level)
(map! :map TeX-mode-map :nv "C-j" #'outline-forward-same-level)
(map! :map TeX-mode-map :nv "C-h" #'outline-up-heading)
(map! :map TeX-mode-map :nv "C-l" #'outline-next-heading)
;; Fixes latexindent not finding perl libraries
(setenv "PERL5LIB" "~/perl5/lib/perl5")
(setq +latex-viewers '(evince))
(use-package! lsp-ltex
:after latex
:init
(setq lsp-ltex-enabled t)
(setq lsp-ltex-language "en-US")
(setq lsp-ltex-mother-tongue "de-DE"))
;; Do not automatically enable writegood mode
(remove-hook! '(org-mode-hook markdown-mode-hook rst-mode-hook asciidoc-mode-hook latex-mode-hook LaTeX-mode-hook) #'writegood-mode)
;; Removing hooks for automatic spell checking set here: https://github.com/hlissner/doom-emacs/blob/develop/modules/checkers/spell/config.el
(remove-hook! '(org-mode-hook
markdown-mode-hook
TeX-mode-hook
rst-mode-hook
mu4e-compose-mode-hook
message-mode-hook
git-commit-mode-hook)
#'flyspell-mode)
(remove-hook! '(yaml-mode-hook
conf-mode-hook
prog-mode-hook)
#'flyspell-prog-mode)
;; (setq ispell-dictionary "english")
(setq ispell-personal-dictionary "~/ispell-personal-dictionary")
(map! :map doom-leader-toggle-map :desc "Toggle dictionary" "d" #'fd-switch-dictionary)
(defun fd-switch-dictionary()
(interactive)
(let* ((dic ispell-current-dictionary)
(change (if (string= dic "german") "english" "german")))
(ispell-change-dictionary change)
(message "Dictionary switched from %s to %s" dic change)
))
(set-flyspell-predicate! '(latex-mode)
#'+latex-flyspell-word-p)
(defun +latex-flyspell-word-p ()
"Return t if point is on a word that should be spell checked.
Return nil if on a link url, markup, html, or references."
(let ((faces (ensure-list (get-text-property (point) 'face))))
(or (and (memq 'font-lock-comment-face faces)
(memq 'markdown-code-face faces))
(not (cl-loop with unsafe-faces = '(font-lock-comment-face
;; font-latex-math-face
;; font-latex-string-face
font-lock-keyword-face
font-lock-constant-face
font-lock-function-name-face
font-lock-variable-name-face
font-lock-type-face ;; figure captions
)
for face in faces
if (memq face unsafe-faces)
return t)))))
;; (setq lsp-dart-flutter-sdk-dir "~/snap/flutter/common/flutter")
;; (map! :mode dart-mode :leader "r" #'flutter-run-or-hot-reload)
;; Make sniping simpler for german keyboard
(setq evil-snipe-scope 'visible)
(map! :map evil-snipe-override-mode-map :m "," #'evil-snipe-repeat)
(map! :map evil-snipe-override-mode-map :m ";" #'evil-snipe-repeat-reverse)
(map! :map evil-snipe-parent-transient-map "," #'evil-snipe-repeat)
(map! :map evil-snipe-parent-transient-map ";" #'evil-snipe-repeat-reverse)
(add-hook 'matlab-mode-hook (lambda () (add-to-list 'quickrun-file-alist '("\\.m\\'" . "octave"))))
;; (assq-delete-all "objc" quickrun-file-alist)
(quickrun-add-command "matlab"
'((:command . "octave"))
:mode #'matlab-mode
)
(quickrun-add-command "octave"
'((:command . "octave"))
:mode #'octave-mode
)
;; (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
(add-to-list
'auto-mode-alist
'("\\.m$" . matlab-mode))
;; (setq matlab-indent-function t)
;; (setq matlab-shell-command "/urs/local/bin/matlab")
(map! :desc "Toggle case of word" :nv "g C" #'toggle-word-case)
(defun toggle-word-case ()
"Toggle the case of current word or text selection."
(interactive)
(let (
(deactivate-mark nil)
$p1 $p2)
(if (use-region-p)
(setq $p1 (region-beginning) $p2 (region-end))
(save-excursion
(skip-chars-backward "[:alpha:]")
(setq $p1 (point))
(skip-chars-forward "[:alpha:]")
(setq $p2 (point))))
(let ((first-char-prop (get-char-code-property (char-after $p1) 'general-category)))
(cond ((string= "Ll" first-char-prop) ; Lower case
(upcase-region $p1 (+ $p1 1)))
((string= "Lu" first-char-prop) ; Upper case
(downcase-region $p1 (+ $p1 1)))
(t (message "Word does not start with a alphabetic character"))))))
(add-hook 'tetris-mode-hook #'turn-off-evil-mode)
(map! :map 'doom-leader-project-map :desc "Repeat last command" "SPC" #'projectile-repeat-last-command)
(defun fd-pretty-print-dirty-json()
(interactive)
(let ((new-buffer-contents (shell-command-to-string (format "echo '%s' | newliner" (buffer-string)))))
(erase-buffer)
(insert new-buffer-contents)
(evil-indent (buffer-end -1) (buffer-end +1)))
)
(defun fd-inventory-transfer()
(interactive)
(fd-inventory-transfer-check-if-valid-table)
(let ((location-from (string-trim (org-table-get 1 2)))
(location-to (string-trim (org-table-get 1 3)))
(item-name (string-trim (org-table-get-field 1))))
(let (transfer-amount)
(setq transfer-amount (read-number (concat "Transfer from " location-from " to " location-to ": ")))
(fd-inventory-transfer-log-transfer transfer-amount item-name location-from location-to)
(fd-inventory-transfer-do-transfer transfer-amount)
(org-table-align)
)))
(defun fd-inventory-transfer-check-if-valid-table ()
(unless (org-at-table-p) (error "You are not inside a table"))
(unless (and (string-match-p "^[[:blank:]]*-?[0-9]+[[:blank:]]*$" (org-table-get-field 2))
(string-match-p "^[[:blank:]]*-?[0-9]+[[:blank:]]*$" (org-table-get-field 3)))
(error "Amounts in table are not numbers"))
(if (or (string= "" (org-table-get 1 2))
(string= "" (org-table-get 1 3)))
(error "No valid table header")))
(defun fd-inventory-transfer-do-transfer(amount)
(let* ((amount-from-location (string-to-number (org-table-get-field 2)))
(amount-to-location (string-to-number (org-table-get-field 3)))
(amount-from-location-new (- amount-from-location amount))
(amount-to-location-new (+ amount-to-location amount)))
(progn (org-table-get-field 2 (number-to-string amount-from-location-new))
(org-table-get-field 3 (number-to-string amount-to-location-new)))))
(defun fd-inventory-transfer-log-transfer(amount item-name from-location to-location)
(save-excursion
(let* ((log-heading-point (or (org-find-exact-headline-in-buffer "Transfer log" nil t)
(progn (goto-char (org-table-end))
(org-insert-heading)
(insert "Transfer log")
(point)))))
(goto-char log-heading-point)
(forward-line)
(let ((message (concat "- " (format-time-string "%d.%m.%Y") ": *" (number-to-string amount) "* =" item-name "= from " from-location " to " to-location "\n")))
(insert message))
)))
(defun fd-python-to-latex(regionBegin regionEnd)
(interactive (if (use-region-p)
(list (region-beginning) (region-end))
(list (point-min) (point-max))))
(shell-command-on-region regionBegin regionEnd "python2latex"))
(set-docsets! 'haskell-mode "Haskell")
(setq! citar-bibliography '("~/Nextcloud/zotero-sources.bib"))

195
non-nix/emacs/doom/init.el Normal file
View File

@ -0,0 +1,195 @@
;;; 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 +lsp) ; 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 +numbers) ; 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 +hunspell +everywhere) ; tasing you for misspelling mispelling
;; grammar ; tasing grammar mistake every you make
:tools
;; ansible
biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;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 +docsets +dictionary) ; 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 ; 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 +lsp +tree-sitter) ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
(latex +lsp +latexmk) ; 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 +lsp) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +dragndrop +pandoc +pretty +roam2 +pomodoro +noter) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +lsp +pyright) ; 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 +tree-sitter) ; 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))

View File

View File

@ -0,0 +1,61 @@
;; -*- 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)
;; (package! company-quickhelp)
(package! github-tags) ;; Needed for lsp-ltex auto-install to work
(package! lsp-ltex)
(package! org-roam-ui)
(package! openwith)
;; 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/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
(package! matlab
:recipe (:repo "https://git.code.sf.net/p/matlab-emacs/src" ))
;; 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 raxod502/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)

View File

@ -0,0 +1,644 @@
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
;; with a supported type is opened). Possible values are `all', `unused'
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
;; lazy install any layer that support lazy installation even the layers
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
;; installation feature and you have to explicitly list a layer in the
;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(csv
python
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
;; (dart :variables dart-server-sdk-path "<flutter-path>/bin/cache/dart-sdk/")
(csharp :variables
csharp-backend nil)
rust
tabs
auto-completion
(auto-completion :variables
auto-completion-return-key-behavior 'complete
auto-completion-tab-key-behavior 'cycle
auto-completion-complete-with-key-sequence nil
auto-completion-complete-with-key-sequence-delay 0.1
auto-completion-minimum-prefix-length 2
auto-completion-idle-delay 0.2
auto-completion-private-snippets-directory nil
auto-completion-enable-snippets-in-popup nil
auto-completion-enable-help-tooltip 't
auto-completion-use-company-box nil
auto-completion-enable-sort-by-usage nil)
;; better-defaults
emacs-lisp
(git :variables
git-magit-status-fullscreen t)
helm
(lsp :variables
lsp-lens-enable t
lsp-ui-doc-enable t)
;; markdown
multiple-cursors
org
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
(spell-checking :variables
spell-checking-enable-by-default nil)
syntax-checking
;; version-control
treemacs
json
(evil-snipe :variables evil-snipe-enable-alternate-f-and-t-behaviors t)
)
;; List of additional packages that will be installed without being wrapped
;; in a layer (generally the packages are installed only and should still be
;; loaded using load/require/use-package in the user-config section below in
;; this file). If you need some configuration for these packages, then
;; consider creating a layer. You can also put the configuration in
;; `dotspacemacs/user-config'. To use a local version of a package, use the
;; `:location' property: '(your-package :location "~/path/to/your-package/")
;; Also include the dependencies as they will not be resolved automatically.
dotspacemacs-additional-packages '(format-all)
;; A list of packages that cannot be updated.
dotspacemacs-frozen-packages '()
;; A list of packages that will not be installed and loaded.
dotspacemacs-excluded-packages '()
;; Defines the behaviour of Spacemacs when installing packages.
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
;; `used-only' installs only explicitly used packages and deletes any unused
;; packages as well as their unused dependencies. `used-but-keep-unused'
;; installs only the used packages but won't delete unused ones. `all'
;; installs *all* packages supported by Spacemacs and never uninstalls them.
;; (default is `used-only')
dotspacemacs-install-packages 'used-only))
(defun dotspacemacs/init ()
"Initialization:
This function is called at the very beginning of Spacemacs startup,
before layer configuration.
It should only modify the values of Spacemacs settings."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non-nil then enable support for the portable dumper. You'll need to
;; compile Emacs 27 from source following the instructions in file
;; EXPERIMENTAL.org at to root of the git repository.
;;
;; WARNING: pdumper does not work with Native Compilation, so it's disabled
;; regardless of the following setting when native compilation is in effect.
;;
;; (default nil)
dotspacemacs-enable-emacs-pdumper nil
;; Name of executable file pointing to emacs 27+. This executable must be
;; in your PATH.
;; (default "emacs")
dotspacemacs-emacs-pdumper-executable-file "emacs"
;; Name of the Spacemacs dump file. This is the file will be created by the
;; portable dumper in the cache directory under dumps sub-directory.
;; To load it when starting Emacs add the parameter `--dump-file'
;; when invoking Emacs 27.1 executable on the command line, for instance:
;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp
;; (default (format "spacemacs-%s.pdmp" emacs-version))
dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version)
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
;; (default 5)
dotspacemacs-elpa-timeout 5
;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
;; This is an advanced option and should not be changed unless you suspect
;; performance issues due to garbage collection operations.
;; (default '(100000000 0.1))
dotspacemacs-gc-cons '(100000000 0.1)
;; Set `read-process-output-max' when startup finishes.
;; This defines how much data is read from a foreign process.
;; Setting this >= 1 MB should increase performance for lsp servers
;; in emacs 27.
;; (default (* 1024 1024))
dotspacemacs-read-process-output-max (* 1024 1024)
;; If non-nil then Spacelpa repository is the primary source to install
;; a locked version of packages. If nil then Spacemacs will install the
;; latest version of packages from MELPA. Spacelpa is currently in
;; experimental state please use only for testing purposes.
;; (default nil)
dotspacemacs-use-spacelpa nil
;; If non-nil then verify the signature for downloaded Spacelpa archives.
;; (default t)
dotspacemacs-verify-spacelpa-archives t
;; If non-nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. Note that checking for
;; new versions works via git commands, thus it calls GitHub services
;; whenever you start Emacs. (default nil)
dotspacemacs-check-for-update nil
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different package directories for different Emacs versions, set this
;; to `emacs-version'. (default 'emacs-version)
dotspacemacs-elpa-subdirectory 'emacs-version
;; One of `vim', `emacs' or `hybrid'.
;; `hybrid' is like `vim' except that `insert state' is replaced by the
;; `hybrid state' with `emacs' key bindings. The value can also be a list
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'vim
;; If non-nil show the version string in the Spacemacs buffer. It will
;; appear as (spacemacs version)@(emacs version)
;; (default t)
dotspacemacs-startup-buffer-show-version t
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; List of items to show in startup buffer or an association list of
;; the form `(list-type . list-size)`. If nil then it is disabled.
;; Possible values for list-type are:
;; `recents' `recents-by-project' `bookmarks' `projects' `agenda' `todos'.
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
;; The exceptional case is `recents-by-project', where list-type must be a
;; pair of numbers, e.g. `(recents-by-project . (7 . 5))', where the first
;; number is the project limit and the second the limit on the recent files
;; within a project.
dotspacemacs-startup-lists '((recents . 5)
(projects . 7))
;; True if the home buffer should respond to resize events. (default t)
dotspacemacs-startup-buffer-responsive t
;; Show numbers before the startup list lines. (default t)
dotspacemacs-show-startup-list-numbers t
;; The minimum delay in seconds between number key presses. (default 0.4)
dotspacemacs-startup-buffer-multi-digit-delay 0.4
;; If non-nil, show file icons for entries and headings on Spacemacs home buffer.
;; This has no effect in terminal or if "all-the-icons" package or the font
;; is not installed. (default nil)
dotspacemacs-startup-buffer-show-icons nil
;; Default major mode for a new empty buffer. Possible values are mode
;; names such as `text-mode'; and `nil' to use Fundamental mode.
;; (default `text-mode')
dotspacemacs-new-empty-buffer-major-mode 'text-mode
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'text-mode
;; If non-nil, *scratch* buffer will be persistent. Things you write down in
;; *scratch* buffer will be saved and restored automatically.
dotspacemacs-scratch-buffer-persistent nil
;; If non-nil, `kill-buffer' on *scratch* buffer
;; will bury it instead of killing.
dotspacemacs-scratch-buffer-unkillable nil
;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
;; (default nil)
dotspacemacs-initial-scratch-message nil
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press `SPC T n' to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(spacemacs-dark
spacemacs-light)
;; Set the theme for the Spaceline. Supported themes are `spacemacs',
;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The
;; first three are spaceline themes. `doom' is the doom-emacs mode-line.
;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes,
;; refer to the DOCUMENTATION.org for more info on how to create your own
;; spaceline theme. Value can be a symbol or list with additional properties.
;; (default '(spacemacs :separator wave :separator-scale 1.5))
dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
;; If non-nil the cursor color matches the state color in GUI Emacs.
;; (default t)
dotspacemacs-colorize-cursor-according-to-state t
;; Default font or prioritized list of fonts. The `:size' can be specified as
;; a non-negative integer (pixel size), or a floating-point (point size).
;; Point size is recommended, because it's device independent. (default 10.0)
dotspacemacs-default-font '("Source Code Pro"
:size 11.0
:weight normal
:width normal)
;; The leader key (default "SPC")
dotspacemacs-leader-key "SPC"
;; The key used for Emacs commands `M-x' (after pressing on the leader key).
;; (default "SPC")
dotspacemacs-emacs-command-key "SPC"
;; The key used for Vim Ex commands (default ":")
dotspacemacs-ex-command-key ":"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'.
;; (default "C-M-m" for terminal mode, "<M-return>" for GUI mode).
;; Thus M-RET should work as leader key in both GUI and terminal modes.
;; C-M-m also should work in terminal mode, but not in GUI mode.
dotspacemacs-major-mode-emacs-leader-key (if window-system "<M-return>" "C-M-m")
;; These variables control whether separate commands are bound in the GUI to
;; the key pairs `C-i', `TAB' and `C-m', `RET'.
;; Setting it to a non-nil value, allows for separate commands under `C-i'
;; and TAB or `C-m' and `RET'.
;; In the terminal, these pairs are generally indistinguishable, so this only
;; works in the GUI. (default nil)
dotspacemacs-distinguish-gui-tab nil
;; Name of the default layout (default "Default")
dotspacemacs-default-layout-name "Default"
;; If non-nil the default layout name is displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
;; If non-nil then the last auto saved layouts are resumed automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts nil
;; If non-nil, auto-generate layout name when creating new layouts. Only has
;; effect when using the "jump to layout by number" commands. (default nil)
dotspacemacs-auto-generate-layout-names nil
;; Size (in MB) above which spacemacs will prompt to open the large file
;; literally to avoid performance issues. Opening a file literally means that
;; no major mode or minor modes are active. (default is 1)
dotspacemacs-large-file-size 1
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location 'cache
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non-nil, the paste transient-state is enabled. While enabled, after you
;; paste something, pressing `C-j' and `C-k' several times cycles through the
;; elements in the `kill-ring'. (default nil)
dotspacemacs-enable-paste-transient-state nil
;; Which-key delay in seconds. The which-key buffer is the popup listing
;; the commands bound to the current keystroke sequence. (default 0.4)
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are `right', `bottom' and
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
;; right; if there is insufficient space it displays it at the bottom.
;; (default 'bottom)
dotspacemacs-which-key-position 'bottom
;; Control where `switch-to-buffer' displays the buffer. If nil,
;; `switch-to-buffer' displays the buffer in the current window even if
;; another same-purpose window is available. If non-nil, `switch-to-buffer'
;; displays the buffer in a same-purpose window even if the buffer can be
;; displayed in the current window. (default nil)
dotspacemacs-switch-to-buffer-prefers-purpose nil
;; If non-nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil to boost the loading time. (default t)
dotspacemacs-loading-progress-bar t
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup nil
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX. (default nil)
dotspacemacs-fullscreen-use-non-native nil
;; If non-nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; If non-nil the frame is undecorated when Emacs starts up. Combine this
;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain
;; borderless fullscreen. (default nil)
dotspacemacs-undecorated-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90
;; If non-nil show the titles of transient states. (default t)
dotspacemacs-show-transient-state-title t
;; If non-nil show the color guide hint for transient state keys. (default t)
dotspacemacs-show-transient-state-color-guide t
;; If non-nil unicode symbols are displayed in the mode line.
;; If you use Emacs as a daemon and wants unicode characters only in GUI set
;; the value to quoted `display-graphic-p'. (default t)
dotspacemacs-mode-line-unicode-symbols t
;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters point
;; when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; Show the scroll bar while scrolling. The auto hide time can be configured
;; by setting this variable to a number. (default t)
dotspacemacs-scroll-bar-while-scrolling t
;; Control line numbers activation.
;; If set to `t', `relative' or `visual' then line numbers are enabled in all
;; `prog-mode' and `text-mode' derivatives. If set to `relative', line
;; numbers are relative. If set to `visual', line numbers are also relative,
;; but only visual lines are counted. For example, folded lines will not be
;; counted and wrapped lines are counted as multiple lines.
;; This variable can also be set to a property list for finer control:
;; '(:relative nil
;; :visual nil
;; :disabled-for-modes dired-mode
;; doc-view-mode
;; markdown-mode
;; org-mode
;; pdf-view-mode
;; text-mode
;; :size-limit-kb 1000)
;; When used in a plist, `visual' takes precedence over `relative'.
;; (default nil)
dotspacemacs-line-numbers nil
;; Code folding method. Possible values are `evil', `origami' and `vimish'.
;; (default 'evil)
dotspacemacs-folding-method 'evil
;; If non-nil and `dotspacemacs-activate-smartparens-mode' is also non-nil,
;; `smartparens-strict-mode' will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; If non-nil smartparens-mode will be enabled in programming modes.
;; (default t)
dotspacemacs-activate-smartparens-mode t
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
;; over any automatically added closing parenthesis, bracket, quote, etc...
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
dotspacemacs-smart-closing-parenthesis nil
;; Select a scope to highlight delimiters. Possible values are `any',
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
;; emphasis the current one). (default 'all)
dotspacemacs-highlight-delimiters 'all
;; If non-nil, start an Emacs server if one is not already running.
;; (default nil)
dotspacemacs-enable-server nil
;; Set the emacs server socket location.
;; If nil, uses whatever the Emacs default is, otherwise a directory path
;; like \"~/.emacs.d/server\". It has no effect if
;; `dotspacemacs-enable-server' is nil.
;; (default nil)
dotspacemacs-server-socket-dir nil
;; If non-nil, advise quit functions to keep server open when quitting.
;; (default nil)
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
;; (default '("rg" "ag" "pt" "ack" "grep"))
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
;; Format specification for setting the frame title.
;; %a - the `abbreviated-file-name', or `buffer-name'
;; %t - `projectile-project-name'
;; %I - `invocation-name'
;; %S - `system-name'
;; %U - contents of $USER
;; %b - buffer name
;; %f - visited file name
;; %F - frame name
;; %s - process status
;; %p - percent of buffer above top of window, or Top, Bot or All
;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
;; %m - mode name
;; %n - Narrow if appropriate
;; %z - mnemonics of buffer, terminal, and keyboard coding systems
;; %Z - like %z, but including the end-of-line format
;; If nil then Spacemacs uses default `frame-title-format' to avoid
;; performance issues, instead of calculating the frame title by
;; `spacemacs/title-prepare' all the time.
;; (default "%I@%S")
dotspacemacs-frame-title-format "%I@%S"
;; Format specification for setting the icon title format
;; (default nil - same as frame-title-format)
dotspacemacs-icon-title-format nil
;; Show trailing whitespace (default t)
dotspacemacs-show-trailing-whitespace t
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed' to
;; delete only whitespace for changed lines or `nil' to disable cleanup.
;; (default nil)
dotspacemacs-whitespace-cleanup nil
;; If non-nil activate `clean-aindent-mode' which tries to correct
;; virtual indentation of simple modes. This can interfere with mode specific
;; indent handling like has been reported for `go-mode'.
;; If it does deactivate it here.
;; (default t)
dotspacemacs-use-clean-aindent-mode t
;; Accept SPC as y for prompts if non-nil. (default nil)
dotspacemacs-use-SPC-as-y nil
;; If non-nil shift your number row to match the entered keyboard layout
;; (only in insert state). Currently supported keyboard layouts are:
;; `qwerty-us', `qwertz-de' and `querty-ca-fr'.
;; New layouts can be added in `spacemacs-editing' layer.
;; (default nil)
dotspacemacs-swap-number-row nil
;; Either nil or a number of seconds. If non-nil zone out after the specified
;; number of seconds. (default nil)
dotspacemacs-zone-out-when-idle nil
;; Run `spacemacs/prettify-org-buffer' when
;; visiting README.org files of Spacemacs.
;; (default nil)
dotspacemacs-pretty-docs nil
;; If nil the home buffer shows the full path of agenda items
;; and todos. If non-nil only the file name is shown.
dotspacemacs-home-shorten-agenda-source nil
;; If non-nil then byte-compile some of Spacemacs files.
dotspacemacs-byte-compile nil))
(defun dotspacemacs/user-env ()
"Environment variables setup.
This function defines the environment variables for your Emacs session. By
default it calls `spacemacs/load-spacemacs-env' which loads the environment
variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
See the header of this file for more information."
(spacemacs/load-spacemacs-env)
)
(defun dotspacemacs/user-init ()
"Initialization for user code:
This function is called immediately after `dotspacemacs/init', before layer
configuration.
It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first."
)
(defun dotspacemacs/user-load ()
"Library to load while dumping.
This function is called only while dumping Spacemacs configuration. You can
`require' or `load' the libraries of your choice that will be included in the
dump."
)
(defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
(setq rust-format-on-save t)
;; (global-set-key (kbd "M-1") 'evil-jump-forward)
;; (setq centaur-tabs-show-count t)
(define-key winum-keymap (kbd "M-1") 'tab-bar-switch-to-tab)
;; (evil-define-key '(normal) nil (kbd "C-i") 'evil-jump-forward)
(define-key evil-motion-state-map (kbd "C-i") 'evil-jump-forward)
(evil-define-key* '(normal insert visual) 'global (kbd "C-s") 'escape-and-save)
(evil-define-key* '(normal visual) 'global (kbd "gD") 'lsp-find-references)
(global-set-key (kbd "C--") 'spacemacs/scale-down-font)
(global-set-key (kbd "C-+") 'spacemacs/scale-up-font)
(global-set-key (kbd "C-=") 'spacemacs/reset-font-size)
(spacemacs/set-leader-keys "." 'lazy-helm/spacemacs/helm-find-files)
(spacemacs/set-leader-keys ":" 'helm-projectile-find-file)
(spacemacs/declare-prefix "o" "open external")
(spacemacs/set-leader-keys "ot" 'open-external-terminal)
(spacemacs/set-leader-keys "gg" 'magit-status)
(spacemacs/set-leader-keys "ee" 'flycheck-explain-error-at-point)
;; (spacemacs/set-leader-keys "br" '(revert-buffer nil nil))
(setq evil-escape-key-sequence "kj")
(defun open-external-terminal ()
"Open external terminal"
(interactive)
(call-process-shell-command "alacritty&" nil 0))
(defun escape-and-save()
"Evil escape and then save buffer"
(interactive)
(evil-escape)
(condition-case nil
(format-all-buffer)
(error nil))
(save-buffer))
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(defun dotspacemacs/emacs-custom-settings ()
"Emacs custom settings.
This is an auto-generated function, do not modify its content directly, use
Emacs customize menu instead.
This function is called at the very end of Spacemacs initialization."
(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.
'(evil-want-Y-yank-to-eol nil)
'(org-babel-load-languages '((csharp . t) (emacs-lisp)))
'(package-selected-packages
'(csv-mode yapfify sphinx-doc pytest pyenv-mode pydoc py-isort poetry pippel pipenv pyvenv pip-requirements nose lsp-python-ms lsp-pyright live-py-mode importmagic epc ctable concurrent deferred helm-pydoc helm-cscope xcscope cython-mode company-anaconda blacken anaconda-mode pythonic evil-snipe omnisharp csharp-mode web-beautify prettier-js json-reformat json-navigator hierarchy json-mode json-snatcher format-all language-id inheritenv company-quickhelp stickyfunc-enhance srefactor yasnippet-snippets treemacs-magit smeargle orgit-forge orgit org-rich-yank org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download org-contrib org-cliplink org lsp-ui lsp-origami origami htmlize helm-org-rifle helm-lsp helm-git-grep helm-company helm-c-yasnippet gnuplot gitignore-templates git-timemachine git-modes git-messenger git-link fuzzy forge yaml magit ghub closql emacsql-sqlite emacsql treepy magit-section git-commit with-editor transient flyspell-correct-helm flyspell-correct flycheck-pos-tip evil-org centaur-tabs auto-yasnippet yasnippet auto-dictionary ac-ispell auto-complete toml-mode ron-mode racer pos-tip rust-mode helm-gtags ggtags flycheck-rust dap-mode lsp-treemacs bui lsp-mode counsel-gtags counsel swiper ivy company cargo markdown-mode ws-butler writeroom-mode winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package undo-tree treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org symon symbol-overlay string-inflection string-edit spaceline-all-the-icons restart-emacs request rainbow-delimiters quickrun popwin pcre2el password-generator paradox overseer org-superstar open-junk-file nameless multi-line macrostep lorem-ipsum link-hint inspector info+ indent-guide hybrid-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org helm-mode-manager helm-make helm-ls-git helm-flx helm-descbinds helm-ag google-translate golden-ratio font-lock+ flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-terminal-cursor-changer evil-surround evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-easymotion evil-collection evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav elisp-def editorconfig dumb-jump drag-stuff dotenv-mode dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-compile aggressive-indent ace-link ace-jump-helm-line)))
(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.
'(highlight-parentheses-highlight ((nil (:weight ultra-bold))) t))
)

View File

@ -0,0 +1,3 @@
if status is-interactive
# Commands to run in interactive sessions can go here
end

View File

@ -0,0 +1,37 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export ANDROID_HOME:~/Android/Sdk
SETUVAR --export ANDROID_SDK_ROOT:~/Android/Sdk/
SETUVAR --export EDITOR:/usr/bin/nvim
SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7
SETUVAR fish_color_comment:990000
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:009900
SETUVAR fish_color_error:ff0000
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:00afff
SETUVAR fish_color_quote:999900
SETUVAR fish_color_redirection:00afff
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:~/\x2eemacs\x2ed/bin\x1e~/\x2ecargo/bin\x1e~/\x2ecargo/env

View File

@ -0,0 +1,27 @@
function fish_prompt --description 'Write out the prompt'
set -l last_pipestatus $pipestatus
set -l last_status $status
set -l normal (set_color normal)
# Color the prompt differently when we're root
set -l color_cwd $fish_color_cwd
set -l prefix
set -l suffix '>'
if contains -- $USER root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
end
set suffix '#'
end
# If we're running via SSH, change the host color.
set -l color_host $fish_color_host
if set -q SSH_TTY
set color_host $fish_color_host_remote
end
# Write pipestatus
set -l prompt_status (__fish_print_pipestatus " [" "]" "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus)
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal $prompt_status $suffix " "
end

View File

@ -0,0 +1,4 @@
# Defined in - @ line 1
function handbrake --wraps=ghb --description 'alias handbrake ghb'
ghb $argv;
end

View File

@ -0,0 +1,4 @@
# Defined via `source`
function vim --wraps=/opt/nvim.appimage --description 'alias vim=/opt/nvim.appimage'
/opt/nvim.appimage $argv;
end

View File

@ -0,0 +1,4 @@
# Defined in - @ line 1
function vivado --wraps=/opt/Xilinx/Vivado/2020.2/bin/vivado --description 'alias vivado /opt/Xilinx/Vivado/2020.2/bin/vivado'
/opt/Xilinx/Vivado/2020.2/bin/vivado $argv;
end

14
non-nix/i3/.profile Normal file
View File

@ -0,0 +1,14 @@
export GOPATH="$HOME/go";
export PATH=$GOPATH/bin:$PATH
export PATH=/opt/dart-sdk/bin:$PATH
export PATH=~/dev/flutter/bin:$PATH
export PATH=~/.config/emacs/bin:$PATH
export PATH=~/.cargo/bin:$PATH
export PATH=~/perl5/bin:$PATH
export PATH=~/.local/bin:$PATH
export PATH=~/.config/i3/scripts:$PATH
# Add desktop files from nix
export XDG_DATA_DIRS="$HOME/.nix-profile/share:$XDG_DATA_DIRS"

1
non-nix/i3/i3-scrot.conf Normal file
View File

@ -0,0 +1 @@
scrot_dir=~/Pictures/screenshots

323
non-nix/i3/i3/config Normal file
View File

@ -0,0 +1,323 @@
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $scripts ~/.config/i3/scripts
set $lock "i3lock --ignore-empty-password --color=000000"
# Font for window titles
font pango:FuraCode Nerd Font 12
# xss-lock grabs a logind suspend inhibit lock and will use $lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock --nofork
# Screen brightness controls
# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
# Use pactl to adjust volume in PulseAudio.
# set $refresh_i3status killall -SIGUSR1 i3status
set $refresh_i3blocks pkill -RTMIN+1 i3blocks
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3blocks
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3blocks
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3blocks
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3blocks
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
bindsym $mod+x kill
# Simulates alt+f4
bindsym Mod1+F4 kill
# start program launcher
bindsym $mod+d exec rofi -show run
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal / vertical orientation
bindsym $mod+Shift+v split h
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+Shift+w layout stacking
# bindsym $mod+w layout tabbed
# bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# The middle button over a titlebar kills the window
bindsym --release button2 kill
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace number $ws1
bindsym $mod+Ctrl+2 move container to workspace number $ws2
bindsym $mod+Ctrl+3 move container to workspace number $ws3
bindsym $mod+Ctrl+4 move container to workspace number $ws4
bindsym $mod+Ctrl+5 move container to workspace number $ws5
bindsym $mod+Ctrl+6 move container to workspace number $ws6
bindsym $mod+Ctrl+7 move container to workspace number $ws7
bindsym $mod+Ctrl+8 move container to workspace number $ws8
bindsym $mod+Ctrl+9 move container to workspace number $ws9
bindsym $mod+Ctrl+0 move container to workspace number $ws10
# move focused container to workspace and follow
bindsym $mod+Shift+1 move container to workspace number $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9; workspace $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10; workspace $ws10
# Monitor config
set $monitor_left {{monitor-primary}}
set $monitor_right {{monitor-secondary}}
workspace $ws1 output $monitor_left
workspace $ws2 output $monitor_left
workspace $ws3 output $monitor_left
workspace $ws4 output $monitor_left
workspace $ws5 output $monitor_left
workspace $ws6 output $monitor_right
workspace $ws7 output $monitor_right
workspace $ws8 output $monitor_right
workspace $ws9 output $monitor_right
workspace $ws10 output $monitor_right
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# resize window (you can also use the mouse for that)
mode "resize" {
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
bar {
font pango:DejaVu Sans Mono, Font Awesome {{bar-font-size}}
status_command i3status-rs
position bottom
{{tray-output}}
}
set $mode_system System (l) lock, (e) logout, (r) reboot, (s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $lock, mode "default"
bindsym e exec --no-startup-id i3-msg exit, mode "default" # logout
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym s exec --no-startup-id systemctl poweroff, mode "default"
bindsym h exec --no-startup-id $lock && systemctl hibernate, mode "default"
bindsym Shift+s exec --no-startup-id $lock && systemctl suspend, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+e mode "$mode_system"
bindsym $mod+Tab exec --no-startup-id $lock
bindsym $mod+Print exec --no-startup-id "xfce4-screenshooter"
bindsym $mod+c exec qalculate-gtk
bindsym $mod+Shift+p exec xwacomcalibrate
bindsym $mod+e exec thunar
bindsym $mod+Shift+c exec $scripts/jupyter-calculator
bindsym $mod+b exec firefox
bindsym $mod+u exec pamac-manager
bindsym $mod+p exec $scripts/display-toggle-mirror
workspace_auto_back_and_forth yes
# default_border pixel
default_border normal
default_floating_border normal
hide_edge_borders smart
show_marks no
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
focus_on_window_activation focus
assign [class="firefox" title="Mozilla Firefox$"] workspace $ws1
assign [class="TelegramDesktop"] workspace $ws9
assign [class="Signal"] workspace $ws9
assign [class="Rocket.Chat"] workspace $ws9
assign [class="Element"] workspace $ws9
assign [class="SchildiChat"] workspace $ws9
assign [class="thunderbird"] workspace $ws10
assign [class="zoom"] workspace $ws5
assign [class="Zotero"] workspace $ws8
for_window [class="firefox" urgent="latest"] focus
for_window [title="Manjaro Settings Manager"] floating enable
for_window [class="pamac-manager"] floating enable
for_window [class="Pamac-updater"] floating enable
for_window [class="Qalculate-gtk"] floating enable
for_window [class="Gcolor3"] floating enable
#for_window [class="zoom" title="Chat"] floating enable
#for_window [class="Thunderbird" instance="Msgcompose"] floating enable
#
for_window [window_role=floating] floating enable
for_window [class="Viewnior"] border normal
########## Autostart applications ##########
exec firefox
exec --no-startup-id nm-applet
exec --no-startup-id blueman-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id nextcloud --background
# exec --no-startup-id xfce4-screensaver
# exec --no-startup-id /usr/bin/emacs --daemon
# Authentication agent
{{#if dotter.packages.nix}}
exec --no-startup-id /etc/manual-links/polkit-gnome-authentication-agent-1
{{else}}
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id /usr/bin/env gnome-keyring-daemon --start
{{/if}}
# Notify about software updates
exec --no-startup-id pamac-tray
exec --no-startup-id clipit
# exec --no-startup-id xfce4-clipman
# Notify about kernel updates
exec --no-startup-id msm_notifier
# Audio
exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
# Background
exec --no-startup-id nitrogen --restore
# Adjust display temperature
exec --no-startup-id redshift
# Notifications
{{#if dotter.packages.nix}}
exec --no-startup-id /etc/manual-links/xfce4-notifyd
{{else}}
exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd
{{/if}}
# exec --no-startup-id xautolock -time 10 -locker blurlock
exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor
exec_always --no-startup-id {{screenlayout-script}}
#############################
### settings for i3-gaps: ###
#############################
# Set inner/outer gaps
gaps inner 8
gaps outer -2
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
smart_borders on

View File

@ -0,0 +1,415 @@
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border pixel 1
default_floating_border normal
# Hide borders
hide_edge_borders none
# change borders
bindsym $mod+u border none
bindsym $mod+y border pixel 1
bindsym $mod+n border normal
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font xft:URWGothic-Book 11
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec terminal
# kill focused window
bindsym $mod+Shift+q kill
# start program launcher
bindsym $mod+d exec --no-startup-id dmenu_recency
# launch categorized menu
bindsym $mod+z exec --no-startup-id morc_menu
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################
#exec --no-startup-id volumeicon
#bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################
# Screen brightness controls
# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
# Start Applications
bindsym $mod+Ctrl+b exec terminal -e 'bmenu'
bindsym $mod+F2 exec palemoon
bindsym $mod+F3 exec pcmanfm
# bindsym $mod+F3 exec ranger
bindsym $mod+Shift+F3 exec pcmanfm_pkexec
bindsym $mod+F5 exec terminal -e 'mocp'
bindsym $mod+t exec --no-startup-id pkill picom
bindsym $mod+Ctrl+t exec --no-startup-id picom -b
bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'"
bindsym Print exec --no-startup-id i3-scrot
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w
bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
# focus_follows_mouse no
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
# split orientation
bindsym $mod+h split h;exec notify-send 'tile horizontally'
bindsym $mod+v split v;exec notify-send 'tile vertically'
bindsym $mod+q split toggle
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#navigate workspaces next / previous
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
# set $ws2 2:
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
# Open applications on specific workspaces
# assign [class="Thunderbird"] $ws1
# assign [class="Pale moon"] $ws2
# assign [class="Pcmanfm"] $ws3
# assign [class="Skype"] $ws5
# Open specific applications in floating mode
for_window [title="alsamixer"] floating enable border pixel 1
for_window [class="calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="fpakman"] floating enable
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lightdm-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [title="MuseScore: Play Panel"] floating enable
for_window [class="Nitrogen"] floating enable sticky enable border normal
for_window [class="Oblogout"] fullscreen enable
for_window [class="octopi"] floating enable
for_window [title="About Pale Moon"] floating enable
for_window [class="Pamac-manager"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Skype"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="Xfburn"] floating enable
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# Set shut down, restart and locking features
bindsym $mod+Shift+e mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym semicolon resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Lock screen
bindsym $mod+9 exec --no-startup-id blurlock
# Autostart applications
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
exec --no-startup-id manjaro-hello
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
exec --no-startup-id clipit
exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb
exec --no-startup-id start_conky_maia
# exec --no-startup-id start_conky_green
exec --no-startup-id xautolock -time 10 -locker blurlock
exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor
# Color palette used for the terminal ( ~/.Xresources file )
# Colors are gathered based on the documentation:
# https://i3wm.org/docs/userguide.html#xresources
# Change the variable name at the place you want to match the color
# of your terminal like this:
# [example]
# If you want your bar to have the same background color as your
# terminal background change the line 362 from:
# background #14191D
# to:
# background $term_background
# Same logic applied to everything else.
set_from_resource $term_background background
set_from_resource $term_foreground foreground
set_from_resource $term_color0 color0
set_from_resource $term_color1 color1
set_from_resource $term_color2 color2
set_from_resource $term_color3 color3
set_from_resource $term_color4 color4
set_from_resource $term_color5 color5
set_from_resource $term_color6 color6
set_from_resource $term_color7 color7
set_from_resource $term_color8 color8
set_from_resource $term_color9 color9
set_from_resource $term_color10 color10
set_from_resource $term_color11 color11
set_from_resource $term_color12 color12
set_from_resource $term_color13 color13
set_from_resource $term_color14 color14
set_from_resource $term_color15 color15
# Start i3bar to display a workspace bar (plus the system information i3status if available)
bar {
i3bar_command i3bar
status_command i3status
position bottom
## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
# tray_output primary
# tray_output eDP1
bindsym button4 nop
bindsym button5 nop
# font xft:URWGothic-Book 11
strip_workspace_numbers yes
colors {
background #222D31
statusline #F9FAF9
separator #454947
# border backgr. text
focused_workspace #F9FAF9 #16a085 #292F34
active_workspace #595B5B #353836 #FDF6E3
inactive_workspace #595B5B #222D31 #EEE8D5
binding_mode #16a085 #2C2C2C #F9FAF9
urgent_workspace #16a085 #FDF6E3 #E5201D
}
}
# hide/unhide i3status bar
bindsym $mod+m bar mode toggle
# Theme colors
# class border backgr. text indic. child_border
client.focused #556064 #556064 #80FFF9 #FDF6E3
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #2B2C2B
#############################
### settings for i3-gaps: ###
#############################
# Set inner/outer gaps
gaps inner 14
gaps outer -2
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}

View File

@ -0,0 +1,11 @@
#!/bin/sh
xrandr | grep -q "HDMI-1 connected"
if [ "$?" -eq "0" ]; then
echo "Two screens available"
~/.screenlayout/twoscreens.sh
else
echo "Only one screen available"
~/.screenlayout/onescreen.sh
fi

View File

@ -0,0 +1,21 @@
#!/bin/sh
xrandr | grep -q "HDMI-1 connected"
if [ "$?" -eq "0" ]; then
echo "Two screens available"
MIRROR_FILE=~/.screenlayout/mirror-primary
if [ -e "$MIRROR_FILE" ]; then
echo "Mode set to mirror"
rm "$MIRROR_FILE"
~/.screenlayout/twoscreens-mirror.sh
else
echo "Mode set to left-right"
touch "$MIRROR_FILE"
~/.screenlayout/twoscreens.sh
fi
else
echo "Only one screen available"
~/.screenlayout/onescreen.sh
fi

View File

@ -0,0 +1,78 @@
#!/bin/python3
import subprocess
import time
import psutil
NOTEBOOK_DIR = "~/jupyter-notebooks/"
PORT = "8988"
def isOtherProcessRunning():
process_count = 0
for proc in psutil.process_iter():
try:
pinfo = proc.as_dict(attrs=['pid', 'name', 'create_time'])
if "jupyter-calc" in pinfo['name'].lower():
process_count += 1
except (psutil.NoSuchProcess, psutil.AccessDenied , psutil.ZombieProcess) :
pass
return process_count > 1
def getNotebookPort(line):
url = line.split(" :: ")[0]
return url.split("localhost:")[1].split("/")[0]
def getNotebookToken(line):
url = line.split(" :: ")[0]
return url.split("token=")[1]
def isNotebookRunning():
answer = subprocess.check_output("jupyter notebook list", shell=True)
lines = answer.decode("utf-8").split("\n")
if lines[0] != "Currently running servers:":
raise Exception("Invalid jupyter status message")
for i in range(1, len(lines) -1):
if getNotebookPort(lines[i]) == PORT:
return getNotebookToken(lines[i])
return None
if __name__ == "__main__":
try:
if not isNotebookRunning():
print("No notebook instance running. Starting it...")
subprocess.Popen(f"jupyter notebook --notebook-dir={NOTEBOOK_DIR} --port={PORT} --no-browser", shell=True)
else:
print("Notebook instance already running.")
max_wait_seconds = 3
delta_t_seconds = 0.1
current_wait_seconds = 0
token = ""
while True:
token = isNotebookRunning()
if token:
break
time.sleep(delta_t_seconds)
current_wait_seconds += delta_t_seconds
if current_wait_seconds >= max_wait_seconds:
raise Exception(f"Maximum wait time of {max_wait_seconds} exceeded!")
subprocess.call(f"cp {NOTEBOOK_DIR}calculator_template.ipynb {NOTEBOOK_DIR}calculator.ipynb", shell=True)
# url = f"http://localhost:{PORT}/notebooks/calculator.ipynb?token={token}"
url = f"http://localhost:{PORT}/?token={token}"
subprocess.call(f"$BROWSER '{url}'", shell=True)
finally:
# TODO: not reliably working
if not isOtherProcessRunning():
try:
subprocess.run(f"jupyter notebook stop {PORT}", shell=True)
except Exception:
pass

View File

@ -0,0 +1,3 @@
#!/bin/sh
matlab -desktop -sd ~/dev/bachelor-thesis/simulation

View File

@ -0,0 +1,40 @@
#!/bin/sh
start_if_not_running()
{
program=$1
pidof -sq $program
if [ "$?" -eq "1" ]; then
start_program $1
else
echo "$program is already running"
fi
}
start_program()
{
program=$1
echo "Starting $program..."
$program & > /dev/null
}
i3-msg 'workspace 9; append_layout ~/.config/i3/workspace-chat-schildi-tele-rocket.json'
{{#if dotter.packages.nix}}
start_program schildichat-desktop
sleep 0.1
start_program telegram-desktop
sleep 0.1
start_program rocketchat-desktop
sleep 0.1
start_program thunderbird
sleep 0.1
{{else}}
start_program chat.schildi.desktop
sleep 0.1
start_program telegram-desktop
sleep 0.1
start_program chat.rocket.RocketChat
sleep 0.1
start_program thunderbird
sleep 0.1
{{/if}}

View File

@ -0,0 +1,20 @@
#!/bin/sh
HDMI_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink"
LAPTOP_SINK="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink"
HDMI_ICON=$(pactl info | grep -q $HDMI_SINK && echo "checkbox")
LAPTOP_ICON=$(pactl info | grep -q $LAPTOP_SINK && echo "checkbox")
HDMI_VOLUME=$(pactl get-sink-volume $HDMI_SINK | head -n 1 | awk '{print $5}')
LAPTOP_VOLUME=$(pactl get-sink-volume $LAPTOP_SINK | head -n 1 | awk '{print $5}')
read -r -d '' CONF <<EOF
Open Pavucontrol,pavucontrol,pavucontrol
^sep()
HDMI - $HDMI_VOLUME,pactl set-default-sink $HDMI_SINK,$HDMI_ICON
Laptop - $LAPTOP_VOLUME,pactl set-default-sink $LAPTOP_SINK,$LAPTOP_ICON
EOF
echo "$CONF" | jgmenu --simple

View File

@ -0,0 +1,4 @@
#!/bin/bash
LC_NUMERIC=en_US.utf8
rofi -show calc -modi calc -no-show-match -no-sort -terse -calc-command "echo -n '{result}' | xclip"

View File

@ -0,0 +1,6 @@
#!/bin/bash
zoom &
#i3-msg "workspace --no-auto-back-and-forth 5; exec mousepad ~/Nextcloud/studium/zoom.txt"
i3-msg "workspace --no-auto-back-and-forth 5; append_layout ~/.config/i3/workspace-zoom.json"

View File

@ -0,0 +1,96 @@
// vim:ts=4:sw=4:et
{
"border": "normal",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 996,
"width": 937,
"x": 1934,
"y": 40
},
"marks": [],
"name": "SchildiChat",
"percent": 0.5,
"swallows": [
{
"class": "^SchildiChat$"
// "instance": "^schildichat$",
// "machine": "^julian\\-aspi$",
// "title": "^SchildiChat\\ \\*\\ \\|\\ Familie$",
// "window_role": "^browser\\-window$"
}
],
"type": "con"
}
{
// splitv split container with 2 children
"border": "normal",
"floating": "auto_off",
"layout": "splitv",
"marks": [],
"percent": 0.5,
"type": "con",
"nodes": [
{
// splith split container with 1 children
"border": "normal",
"floating": "auto_off",
"layout": "splith",
"marks": [],
"percent": 0.5,
"type": "con",
"nodes": [
{
"border": "none",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1026,
"width": 941,
"x": 2887,
"y": 12
},
"marks": [],
"name": "Telegram",
"percent": 1,
"swallows": [
{
"class": "^TelegramDesktop$"
// "instance": "^telegram\\-desktop$",
// "machine": "^julian\\-aspi$",
// "title": "^Telegram$"
}
],
"type": "con"
}
]
},
{
"border": "normal",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 485,
"width": 1904,
"x": 1928,
"y": 557
},
"marks": [],
"name": "RocketChat",
"percent": 0.5,
"swallows": [
{
"class": "^Rocket\\.Chat$"
// "instance": "^rocket\\.chat$",
// "machine": "^julian\\-aspi$",
// "title": "^ifiChat$",
// "window_role": "^browser\\-window$"
}
],
"type": "con"
}
]
}

View File

@ -0,0 +1,49 @@
// vim:ts=4:sw=4:et
{
"border": "normal",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 996,
"width": 937,
"x": 1934,
"y": 40
},
"marks": [],
"name": "SchildiChat",
"percent": 0.5,
"swallows": [
{
"class": "^SchildiChat$"
// "instance": "^schildichat$",
// "machine": "^julian\\-aspi$",
// "title": "^SchildiChat$",
// "window_role": "^browser\\-window$"
}
],
"type": "con"
}
{
"border": "none",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1026,
"width": 941,
"x": 2887,
"y": 12
},
"marks": [],
"name": "Telegram",
"percent": 0.5,
"swallows": [
{
"class": "^TelegramDesktop$"
// "instance": "^telegram\\-desktop$",
// "machine": "^julian\\-aspi$",
// "title": "^Telegram\\ \\(71\\)$"
}
],
"type": "con"
}

View File

@ -0,0 +1,93 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1033,
"width": 956,
"x": 1366,
"y": 45
},
"marks": [],
"name": "Element",
"percent": 0.5,
"swallows": [
{
"class": "^Element$",
// "instance": "^element$",
// "title": "^Element\\ \\|\\ Familie$",
"window_role": "^browser\\-window$"
}
],
"type": "con"
}
{
// splitv split container with 2 children
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"marks": [],
"percent": 0.5,
"type": "con",
"nodes": [
{
// splith split container with 1 children
"border": "pixel",
"floating": "auto_off",
"layout": "splith",
"marks": [],
"percent": 0.5,
"type": "con",
"nodes": [
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 524,
"width": 1916,
"x": 1368,
"y": 25
},
"marks": [],
"name": "Telegram",
"percent": 1,
"swallows": [
{
"class": "^TelegramDesktop$",
// "instance": "^telegram\\-desktop$",
"title": "^Telegram$"
}
],
"type": "con"
}
]
},
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1033,
"width": 1916,
"x": 1368,
"y": 45
},
"marks": [],
"name": "Rocket Chat",
"percent": 0.5,
"swallows": [
{
"class": "^Rocket\\.Chat$",
// "instance": "^rocket\\.chat$",
// "title": "^Chat\\ der\\ Uni\\ Würzburg$",
"window_role": "^browser\\-window$"
}
],
"type": "con"
}
]
}

View File

@ -0,0 +1,86 @@
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 800,
"width": 1188,
"x": 246,
"y": 125
},
"name": "Zoom Meeting",
"percent": 0.8,
"swallows": [
{
"class": "^zoom$",
"instance": "^zoom$",
"title": "^Zoom\\ Meeting$"
}
],
"type": "con"
}
{
// splitv split container with 2 children
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"percent": 0.2,
"type": "con",
"nodes": [
{
// splith split container with 1 children
"border": "pixel",
"floating": "auto_off",
"layout": "splith",
"percent": 0.5,
"type": "con",
"nodes": [
{
"border": "pixel",
"current_border_width": 2,
"floating": "auto_off",
"geometry": {
"height": 1002,
"width": 220,
"x": 1458,
"y": 46
},
"name": "Participants",
"percent": 1,
"swallows": [
{
"class": "^zoom$",
"instance": "^zoom$",
"title": "^Participants"
}
],
"type": "con"
}
]
},
{
"border": "pixel",
"current_border_width": 2,
"floating": "user_off",
"geometry": {
"height": 350,
"width": 355,
"x": 662,
"y": 350
},
"name": "Chat",
"percent": 0.5,
"swallows": [
{
"class": "^zoom$",
"instance": "^zoom$",
"title": "^Chat$"
}
],
"type": "con"
}
]
}

30
non-nix/i3/i3blocks/activity Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
NONE="None"
get_current_activity() {
activity=$(hamster current)
if [ "$activity" = "No activity" ]; then
echo $NONE
else
IFS=' '
read -ra ADDR <<< "$activity"
echo "${ADDR[2]}"
fi
}
case "$BLOCK_BUTTON" in
1|2|3)
current_activity=$(get_current_activity)
if [ "$current_activity" = "$NONE" ]; then
hamster start "Comu@Work#Flexibill App"
else
hamster stop
fi
esac
current_activity=$(get_current_activity)
echo "$LABEL $current_activity"
echo "$LABEL $current_activity"

35
non-nix/i3/i3blocks/calendar Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
OPTIND=1
while getopts ":f:" opt; do
case $opt in
f) DATEFMT="$OPTARG" ;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
case "$BLOCK_BUTTON" in
1|2|3)
# Try to focus Thunderbird
i3-msg -q [class="Thunderbird" instance="Mail"] focus
if [ $? == 2 ]
then
# Open Thunderbird if it was not open
i3-msg -q "exec thunderbird -mail -calendar"
else
# Open calendar
xdotool key --clearmodifiers --delay 5 ctrl+shift+c
fi
esac
echo "$LABEL$(date "$DATEFMT")"
echo "$LABEL$(date "$SHORTFMT")"

View File

@ -0,0 +1,36 @@
# i3blocks configuration file
#
# The i3blocks man page describes the usage of the binary,
# and its website describes the configuration:
#
# https://vivien.github.io/i3blocks
# Sources:
# https://github.com/hastinbe/i3blocks-battery-plus
# https://github.com/zakariaGatter/i3blocks-gate
# Global properties
separator=true
separator_block_width=15
[activity]
command=./activity
interval=10
LABEL=
[dunst]
command=./dunst
markup=pango
interval=once
format=json
[volume]
command=./volume
LABEL=
interval=10
signal=1
[calendar]
command=./calendar
interval=1

60
non-nix/i3/i3blocks/dunst Executable file
View File

@ -0,0 +1,60 @@
#!/usr/bin/env python3
"""
A do-not-disturb button for muting Dunst notifications in i3 using i3blocks
Mute is handled by passing 'DUNST_COMMAND_PAUSE' and 'DUNST_COMMAND_RESUME' to
the notify-send script and the 'DUNST_MUTE' environment variable is set to keep
track of the toggle.
"""
__author__ = "Jessey White-Cinis <j@cin.is>"
__copyright__ = "Copyright (c) 2019 Jessey White-Cinis"
__license__ = "MIT"
__version__ = "1.1.0"
import os
import subprocess
import json
def mute_on():
'''Turns off dunst notifications'''
subprocess.run(["dunstctl", "set-paused", "true"], check=True)
return {
"full_text":"<span font='Font Awesome 5 Free Solid' color='#BE616E'>\uf1f6</span>",
"DUNST_MUTE":"on"
}
def mute_off():
'''Turns back on dunst notifications'''
subprocess.run(["dunstctl", "set-paused", "false"], check=True)
return {
"full_text":"<span font='Font Awesome 5 Free Solid' color='#FFFFFF'>\uf0f3</span>",
"DUNST_MUTE":"off"
}
def clicked():
'''Returns True if the button was clicked'''
button = "BLOCK_BUTTON" in os.environ and os.environ["BLOCK_BUTTON"]
return bool(button)
def muted():
'''Returns True if Dunst is muted'''
cmd = ['dunstctl', 'is-paused']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output = proc.communicate()[0]
return u'true' == output.strip().decode("UTF-8")
if clicked():
# toggle button click to turn mute on and off
if muted():
RTN = mute_off()
else:
RTN = mute_on()
else:
# Set default state using 'DUNST_MUTE' environment variable
if muted():
RTN = mute_on()
else:
RTN = mute_off()
print(json.dumps(RTN))

462
non-nix/i3/i3blocks/i3b-gate Executable file
View File

@ -0,0 +1,462 @@
#!/usr/bin/env bash
# Zakaria Barkouk ( Zakaria.gatter@gmail.com)
#---------------------#
# SHOW CPU INFO (TOP) #
#---------------------#
_BLOCK_1_(){ #{{{
mpstat | awk '/all/{print "'"${1:-} "'"$4}'
} #}}}
#--------------------#
# SHOW ALL CPUS INFO #
#--------------------#
_BLOCK_2_(){ #{{{
mpstat -P ALL | awk -v icon=${1:-} 'BEGIN{printf "%s ", icon} {
if($3 ~ /^[0-9]/){
printf "%s ", $4
}
}'
} #}}}
#--------------------------#
# SHOW MEMORY USAGE (FREE) #
#--------------------------#
_BLOCK_3_(){ #{{{
free -h | awk '/^Mem:/{print "'"${1:-} "'"$3}'
} #}}}
#------------------------#
# SHOW SWAP USAGE (FREE) #
#------------------------#
_BLOCK_4_(){ #{{{
free -h | awk '/^Swap:/{print "'"${1:-}"' "$3}'
} #}}}
#---------------------------#
# SHOW DATE AND TIME (DATE) #
#---------------------------#
_BLOCK_5_(){ #{{{
date +"${1:-} %R %D"
} #}}}
#----------------------------#
# SHOW BATTERY STATUS (ACPI) #
#----------------------------#
_BLOCK_6_(){ #{{{
Bat=$(acpi | awk '{gsub(",|%","",$4); print $4}');
adapt=$(acpi -a | awk '{print $3}');
if [ "$adapt" = "on-line" -a -n "$Bat" ];then
icon0=" "
icon1=" "
icon2=" "
icon3=" "
icon4=" "
elif [ "$adapt" = "on-line" ];then
icon0=""
icon1=""
icon2=""
icon3=""
icon4=""
else
icon0=""
icon1=""
icon2=""
icon3=""
icon4=""
fi
[ -z "$Bat" ] && echo "$icon0 $adapt" && return
[ "$Bat" -gt "100" ] && echo "$icon4 Full"
[ "$Bat" -gt "90" ] && echo "$icon3 $Bat%"
[ "$Bat" -gt "60" ] && echo "$icon2 $Bat%"
[ "$Bat" -gt "30" ] && echo "$icon1 $Bat%"
[ "$Bat" -lt "30" ] && echo "$icon0 $Bat%"
} #}}}
#----------------------#
# SHOW DISK USAGE (DF) #
#----------------------#
_BLOCK_7_() { #{{{
df -h "${1:-/}" | awk '/\/dev\//{print "'"${2:-}"' "$3-G"/"$2}'
} #}}}
#----------------------#
# SHOW KEYBOARD LAYOUT #
#----------------------#
_BLOCK_8_() { #{{{
awk -F '"' '/XKBLAYOUT/{print "'"${1:-} "'"$2}' /etc/default/keyboard
} #}}}
#----------------------#
# SHOW SYSTEM LANGUAGE #
#----------------------#
_BLOCK_9_(){ #{{{
echo "${1:-} ${LANG/.UTF-8/}"
} #}}}
#------------------------------#
# SHOW MACHINE UPTIME (UPTIME) #
#------------------------------#
_BLOCK_10_() { #{{{
uptime | awk '{sub(",","",$4); print "'"${1:- } "'"$3 " " $4}'
} #}}}
#----------------------#
# SHOW TRASH SIZE (DU) #
#----------------------#
_BLOCK_11_() { #{{{
[ -d "$HOME/.local/share/Trash/files" ] && {
du -hc $HOME/.local/share/Trash/files | awk '/total$/{print "'"${1:-} "'"$1}'
} || {
echo "${1:-} ---"
}
} #}}}
#-------------------#
# SHOW WINDOW USAGE #
#-------------------#
_BLOCK_12_() { #{{{
focus=$(xprop -id `xprop -root | awk '/^_NET_ACTIVE_WINDOW/{print $5}'` | awk -F '"' '/^WM_NAME/{print $2}')
if [ -z "$focus" ];then
echo "${1:-} Welcome"
else
[ "${#focus}" -gt "${2:-30}" ] && echo "${1:-} ${focus::${2:-30}} ..." || echo "${1:-} $focus"
fi
} #}}}
#-----------------------------------------#
# SHOW MOCP PLAYING SONG AND STATUS (MOC) #
#-----------------------------------------#
_BLOCK_13_() { # {{{
Title=$(mocp -Q %title)
F_Title=$(basename `mocp -Q %file | tr " " "_"`)
Status=$(mocp -Q %state)
if [ "$Status" != "PLAY" ];then
echo "${1:-} Pause"
elif [ -z "$Title" ];then
echo "${1:-} ${F_Title::30}"
else
echo "${1:-} $Title"
fi
} #}}}
#------------------------------------------------------#
# SHOW MPD PLAYING SONG AND STATUS (MPD; NCMPCCP, MPC) #
#------------------------------------------------------#
_BLOCK_14_() { #{{{
local NCMP=$(mpc | awk '/^\[playing\]/{print $1}')
if [ "$NCMP" = "[playing]" ];then
echo "${1:-} $(basename $(mpc current)) "
else
echo "${1:-} Pause "
fi
} #}}}
#-------------------------#
# SHOW CPU TEMP (XSENSER) #
#-------------------------#
_BLOCK_15_() { #{{{
sensors | awk '/^CPU/{gsub("\+",""); print "'"${1:-} "'"$2}'
} #}}}
#-------------------------#
# SHOW GPU TEMP (XSENSER) #
#-------------------------#
_BLOCK_16_() { #{{{
sensors | awk '/^GPU/{gsub("\+",""); print "'"${1:-} "'"$2}' | tail -1
} #}}}
#----------------------------------#
# SHOW TOUCHPAD STATUS (SYSCLIENT) #
#----------------------------------#
_BLOCK_17_() { #{{{
[ "$(synclient -l | awk '/Touchpad/{print $3}')" = "0" ] && echo "${1:-} Enable" || echo "${1:-} Disable"
} #}}}
#---------------------------#
# SHOW VOLUME STATUS (ALSA) #
#---------------------------#
_BLOCK_18_() { #{{{
local Vol=$(amixer get Master | awk '/Mono:/{gsub("\[|\%|\]",""); print $4}')
local Mute=$(amixer get Master | awk '/Mono:/{gsub("\[|\]",""); print $6}')
if [ "$Mute" = "off" ];then
echo -e " --"
else
if [ "$Vol" -gt "60" ];then
echo -e " $Vol%"
elif [ "$Vol" -gt "30" ];then
echo -e " $Vol%"
elif [ "$Vol" -lt "30" ];then
echo -e " $Vol%"
fi
fi
} #}}}
#----------------------------------------------#
# SHOW WIFI INFO ; IP ; CONNECTED NAME (NMCLI) #
#----------------------------------------------#
_BLOCK_19_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP4.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} )"
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep -w "wifi")
echo -e ""
} #}}}
#-------------------------------------------#
# SHOW ETHERNET INFO ; IP ; CONNECTED NAME #
#-------------------------------------------#
_BLOCK_20_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP4.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} ) "
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep "ethernet")
echo -e ""
} #}}}
#-----------------------------------------------#
# SHOW WIFI INFO ; IP6 ; CONNECTED NAME (NMCLI) #
#-----------------------------------------------#
_BLOCK_21_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP6.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} ) "
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep "wifi")
echo -e ""
} #}}}
#--------------------------------------------#
# SHOW ETHERNET INFO ; IP6 ; CONNECTED NAME #
#--------------------------------------------#
_BLOCK_22_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP6.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} ) "
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep "ethernet")
echo -e ""
} #}}}
#-------------------------------#
# SHOW PROSSES USE BY THIS USER #
#-------------------------------#
_BLOCK_23_() { #{{{
echo "${1:-} $(ps -U $USER | wc -l)"
} #}}}
#---------------------#
# SHOW SYSTEM KERENEL #
#---------------------#
_BLOCK_24_() { #{{{
echo "${1:-} $(uname -r)"
} #}}}
#-----------------------------#
# SHOW USB PLUG IN UR COMPUTE #
#-----------------------------#
_BLOCK_25_() { #{{{
echo "${1:-} $(lsblk -l -o 'TRAN' | grep -c "usb")"
} #}}}
#---------------------------------------#
# SHOW TOTAL PKGS INSTALL IN YOUR SYSTE #
#---------------------------------------#
_BLOCK_26_() { #{{{
echo "${1:-} $(dpkg -l | grep -c "^ii")"
} #}}}
#--------------------------------------------#
# CHECK IF THERE IS ANY UPDATE IN UR SYSTEM #
#--------------------------------------------#
_BLOCK_27_() { #{{{
local U_PKGS=$(apt-get -s -o APT::Get::Show-User-Simulation-Note=0 dist-upgrade | grep "^\s\s" | wc -w);
echo "${1:-} $U_PKGS"
} #}}}
#-----------------#
# SHOW UFW STATUS #
#-----------------#
_BLOCK_28_() { #{{{
[ "$(systemctl status ufw | awk '/Active:/{print $2}')" == "active" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#-------------------------#
# SHOW NUMBER LOCK STATUS #
#-------------------------#
_BLOCK_29_() { #{{{
[ "$(xset -q | awk '/00:/{print $8}')" == "on" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#-----------------------#
# SHOW BLUETOOTH STATUS #
#-----------------------#
_BLOCK_30_() { #{{{
[ "$(systemctl status bluetooth.target | awk '/Active:/{print $2}')" == "active" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#------------------------#
# SHOW CAPS LOCK STATUS #
#------------------------#
_BLOCK_31_() { #{{{
[ "$(xset -q | awk '/00:/{print $4}')" == "on" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#-----------------------------#
# DISPLAY X SCREENSAVER STATE #
#-----------------------------#
_BLOCK_32_() { #{{{
[ "$(xdg-screensaver status)" != "enabled" ] && echo "${1:-} Off" || echo "${1:-} On"
} #}}}
#--------------------------------#
# CALCULE MOUNT POINTS ON SYSTEM #
#--------------------------------#
_BLOCK_33_() { #{{{
echo "${1:-} $(cat /proc/mounts | grep -c "^/dev/sd*") "
} #}}}
#-------------------------#
# SHOW CMUS PLAYING SONG #
#-------------------------#
_BLOCK_34_() { #{{{
local CMUS_P=$(cmus-remote -Q | awk '/^status/{print $2}')
local CMUS_F=$(cmus-remote -Q | awk '/^file/{$1=""; print $2}')
if [ "$CMUS_P" = "Playing" ];then
echo "${1:-} $(basename $CMUS_F)"
else
echo "${1:-} Pause"
fi
} #}}}
#----------------------#
# SHOW APPARMOR STATUS #
#----------------------#
_BLOCK_35_() { #{{{
[ "$(aa-enabled)" = "Yes" ] && {
echo "${1:-} On"
}||{
echo "${1:-} Off"
}
} #}}}
#-----------------------------#
# SHOW TOTAL PACKAGES IN ARCH #
#-----------------------------#{{{
_BLOCK_36_(){
echo "${1:-} $(pacman -Q | grep -c "*")"
}
#}}}
#--------------------#
# SHOW I3 WORKSPACES #
#--------------------#
_BLOCK_37_() { #{{{
i3-msg -t get_workspaces | awk -F , '{
for(i=1;i<=NF;i++){
if($i~"name"){
gsub("\"name\":|\"","",$i)
WK=$i
}
if($i~"focused"){
gsub("\"focused\":","",$i)
WKF=$i
}
if($i~"urgent"){
gsub("\"urgent\":|\]|\}","",$i)
if($i=="false" && WKF=="true"){
printf "%s ", WK
}
if($i=="false" && WKF=="false"){
printf"[%s] ", WK
}
if($i=="true" && WKF=="false"){
printf "[*%s] ", WK
}
if($i=="true" && WKF=="true"){
printf "*%s ", WK
}
}
}
}'
} #}}}
#-----------------#
# SHOW USER NAME #
#-----------------#
_BLOCK_38_(){ #{{{
echo -e "${1:-} $USER"
} #}}}
#-------------------#
# SHOW VOLUME PULSE #
#-------------------#
_BLOCK_39_(){
local Vol=$(pactl list sinks | awk '/Volume: front/{print $5-"%"}')
local Mute=$(amixer get Master | awk '/Mono:/{gsub("\[|\]",""); print $6}')
if [ "$Mute" = "off" ];then
echo -e " --"
else
if [ "$Vol" -gt "60" ];then
echo -e " $Vol%"
elif [ "$Vol" -gt "30" ];then
echo -e " $Vol%"
elif [ "$Vol" -lt "30" ];then
echo -e " $Vol%"
fi
fi
}
#------------------------#
# USAGE AND HELP DIALOG #
#------------------------#
_USAGE_(){ #{{{
echo -e "
i3b-gate : is a all in one collaction of small script
show you useful unformation about your system
There is 39 deffirent script to use
for more information you can see the 'README' file
or visite 'https://gitlab.com/zakariagatter/i3blocks-gate'
SYNTAX :
i3b-gate [NUMBER] ...
"
} #}}}
#----------------#
# MAIN ARGUMENT #
#----------------#
if [ "$1" -gt "39" ] || [ -z "$1" ] ;then
_USAGE_
elif [ "$1" = "-h" ]; then
_USAGE_
else
eval $(echo "_BLOCK_$1_ $2 $3")
fi

26
non-nix/i3/i3blocks/keyboard Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
get_current_layout () {
setxkbmap -print | grep -q dvorak
if [ "$?" -eq "0" ]; then
echo dvorak
else
echo qwertz
fi
}
case "$BLOCK_BUTTON" in
1|2|3)
# Switch layout
current_layout=$(get_current_layout)
if [ $current_layout == dvorak ]; then
setxkbmap -layout de
else
setxkbmap -layout de -variant dvorak
fi
esac
current_layout=$(get_current_layout)
echo "$LABEL $current_layout"
echo "$LABEL $current_layout"

91
non-nix/i3/i3blocks/volume Executable file
View File

@ -0,0 +1,91 @@
#!/usr/bin/env bash
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------
# The second parameter overrides the mixer selection
# For PulseAudio users, eventually use "pulse"
# For Jack/Jack2 users, use "jackplug"
# For ALSA users, you may use "default" for your primary card
# or you may use hw:# where # is the number of the card desired
if [[ -z "$MIXER" ]] ; then
MIXER="default"
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
# pulseaudio is running, but not all installations use "pulse"
if amixer -D pulse info >/dev/null 2>&1 ; then
MIXER="pulse"
fi
fi
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
MIXER="${2:-$MIXER}"
fi
# The instance option sets the control to report and configure
# This defaults to the first control of your selected mixer
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
if [[ -z "$SCONTROL" ]] ; then
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
head -n1
)}"
fi
# The first parameter sets the step to change the volume by (and units to display)
# This may be in in % or dB (eg. 5% or 3dB)
if [[ -z "$STEP" ]] ; then
STEP="${1:-5%}"
fi
# AMIXER(1):
# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
# more natural for human ear."
NATURAL_MAPPING=${NATURAL_MAPPING:-0}
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
AMIXER_PARAMS="-M"
fi
#------------------------------------------------------------------------
capability() { # Return "Capture" if the device is a capture device
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
}
volume() {
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
}
format() {
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
# If dB was selected, print that instead
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
perl_filter+='"; exit}'
output=$(perl -ne "$perl_filter")
echo "$LABEL $output"
}
#------------------------------------------------------------------------
case $BLOCK_BUTTON in
1|2|3) pavucontrol ;; # right click, open gui
4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
esac
volume | format

View File

@ -0,0 +1,47 @@
[theme]
theme = "dracula"
[icons]
icons = "awesome4"
[[block]]
block = "disk_space"
path = "~"
format = " $icon $available ($percentage) frei "
info_type = "available"
alert_unit = "GB"
interval = 20
warning = 20.0
alert = 10.0
[[block]]
block = "memory"
format = " $icon $mem_used_percents "
[[block]]
block = "cpu"
interval = 1
[[block]]
block = "net"
# device = "enp1s0"
#format = " $icon $speed_down;K*b $speed_up;K*b"
interval = 5
[[block]]
block = "sound"
[[block.click]]
button = "left"
cmd = "~/.config/i3/scripts/pulse_popup"
[[block]]
block = "battery"
interval = 10
format = " $icon $percentage ($time) "
not_charging_format = " $icon $percentage "
if_command = "test -e /sys/class/power_supply/BAT1"
[[block]]
block = "time"
interval = 1
format = " $icon $timestamp.datetime(f:'%a %d.%m %H:%M:%S') "

276
non-nix/i3/rofi/config.rasi Normal file
View File

@ -0,0 +1,276 @@
configuration {
modi: "run,drun";
/* width: 50;*/
lines: 10;
/* columns: 1;*/
/* font: "mono 12";*/
/* bw: 1;*/
/* location: 0;*/
/* padding: 5;*/
/* yoffset: 0;*/
/* xoffset: 0;*/
/* fixed-num-lines: true;*/
show-icons: true;
terminal: "alacritty";
/* ssh-client: "ssh";*/
/* ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";*/
/* run-command: "{cmd}";*/
/* run-list-command: "";*/
/* run-shell-command: "{terminal} -e {cmd}";*/
/* window-command: "wmctrl -i -R {window}";*/
/* window-match-fields: "all";*/
/* icon-theme: ;*/
/* drun-match-fields: "name,generic,exec,categories,keywords";*/
/* drun-categories: ;*/
/* drun-show-actions: false;*/
/* drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";*/
/* drun-url-launcher: "xdg-open";*/
/* disable-history: false;*/
/* ignored-prefixes: "";*/
/* sort: false;*/
/* sorting-method: "normal";*/
/* case-sensitive: false;*/
/* cycle: true;*/
/* sidebar-mode: false;*/
/* eh: 1;*/
/* auto-select: false;*/
/* parse-hosts: false;*/
/* parse-known-hosts: true;*/
/* combi-modi: "window,run";*/
/* matching: "normal";*/
/* tokenize: true;*/
/* m: "-5";*/
/* line-margin: 2;*/
/* line-padding: 1;*/
/* filter: ;*/
/* separator-style: "dash";*/
/* hide-scrollbar: false;*/
/* fullscreen: false;*/
/* fake-transparency: false;*/
/* dpi: -1;*/
/* threads: 0;*/
/* scrollbar-width: 8;*/
/* scroll-method: 0;*/
/* fake-background: "screenshot";*/
/* window-format: "{w} {c} {t}";*/
/* click-to-exit: true;*/
/* show-match: true;*/
/* theme: ;*/
/* color-normal: ;*/
/* color-urgent: ;*/
/* color-active: ;*/
/* color-window: ;*/
/* max-history-size: 25;*/
/* combi-hide-mode-prefix: false;*/
/* matching-negate-char: '-' /* unsupported */;*/
/* cache-dir: ;*/
/* window-thumbnail: false;*/
/* drun-use-desktop-cache: false;*/
/* drun-reload-desktop-cache: false;*/
/* normalize-match: false;*/
/* pid: "/run/user/1000/rofi.pid";*/
/* display-window: ;*/
/* display-windowcd: ;*/
/* display-run: ;*/
/* display-ssh: ;*/
/* display-drun: ;*/
/* display-combi: ;*/
/* display-keys: ;*/
/* display-file-browser: ;*/
/* display-calc: ;*/
/* kb-primary-paste: "Control+V,Shift+Insert";*/
/* kb-secondary-paste: "Control+v,Insert";*/
/* kb-clear-line: "Control+w";*/
/* kb-move-front: "Control+a";*/
/* kb-move-end: "Control+e";*/
/* kb-move-word-back: "Alt+b,Control+Left";*/
/* kb-move-word-forward: "Alt+f,Control+Right";*/
/* kb-move-char-back: "Left,Control+b";*/
/* kb-move-char-forward: "Right,Control+f";*/
/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
/* kb-remove-word-forward: "Control+Alt+d";*/
/* kb-remove-char-forward: "Delete,Control+d";*/
/* kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";*/
/* kb-remove-to-eol: "Control+k";*/
/* kb-remove-to-sol: "Control+u";*/
/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/
kb-accept-custom: "Control+Return";
/* kb-accept-alt: "Shift+Return";*/
/* kb-delete-entry: "Shift+Delete";*/
/* kb-mode-next: "Shift+Right,Control+Tab";*/
/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/
/* kb-row-left: "Control+Page_Up";*/
/* kb-row-right: "Control+Page_Down";*/
/* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/
/* kb-row-down: "Down,Control+n";*/
/* kb-row-tab: "Tab";*/
/* kb-page-prev: "Page_Up";*/
/* kb-page-next: "Page_Down";*/
/* kb-row-first: "Home,KP_Home";*/
/* kb-row-last: "End,KP_End";*/
/* kb-row-select: "Control+space";*/
/* kb-screenshot: "Alt+S";*/
/* kb-ellipsize: "Alt+period";*/
/* kb-toggle-case-sensitivity: "grave,dead_grave";*/
/* kb-toggle-sort: "Alt+grave";*/
/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/
/* kb-custom-1: "Alt+1";*/
/* kb-custom-2: "Alt+2";*/
/* kb-custom-3: "Alt+3";*/
/* kb-custom-4: "Alt+4";*/
/* kb-custom-5: "Alt+5";*/
/* kb-custom-6: "Alt+6";*/
/* kb-custom-7: "Alt+7";*/
/* kb-custom-8: "Alt+8";*/
/* kb-custom-9: "Alt+9";*/
/* kb-custom-10: "Alt+0";*/
/* kb-custom-11: "Alt+exclam";*/
/* kb-custom-12: "Alt+at";*/
/* kb-custom-13: "Alt+numbersign";*/
/* kb-custom-14: "Alt+dollar";*/
/* kb-custom-15: "Alt+percent";*/
/* kb-custom-16: "Alt+dead_circumflex";*/
/* kb-custom-17: "Alt+ampersand";*/
/* kb-custom-18: "Alt+asterisk";*/
/* kb-custom-19: "Alt+parenleft";*/
/* kb-select-1: "Super+1";*/
/* kb-select-2: "Super+2";*/
/* kb-select-3: "Super+3";*/
/* kb-select-4: "Super+4";*/
/* kb-select-5: "Super+5";*/
/* kb-select-6: "Super+6";*/
/* kb-select-7: "Super+7";*/
/* kb-select-8: "Super+8";*/
/* kb-select-9: "Super+9";*/
/* kb-select-10: "Super+0";*/
/* ml-row-left: "ScrollLeft";*/
/* ml-row-right: "ScrollRight";*/
/* ml-row-up: "ScrollUp";*/
/* ml-row-down: "ScrollDown";*/
/* me-select-entry: "MousePrimary";*/
/* me-accept-entry: "MouseDPrimary";*/
/* me-accept-custom: "Control+MouseDPrimary";*/
}
/*Dracula theme based on the Purple official rofi theme*/
* {
font: "Jetbrains Mono 14";
foreground: #f8f8f2;
background: #282a36;
active-background: #6272a4;
urgent-background: #ff5555;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
#window {
background-color: @background;
border: 1;
border-radius: 6;
border-color: @bordercolor;
padding: 5;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 2px dash 0px 0px ;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @background;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}

View File

@ -0,0 +1,15 @@
#!/usr/bin/env sh
# Using following tool https://github.com/frederik-h/acer-wmi-battery.git
PROJECT_LOCATION=~/git/acer-wmi-battery
if [ "$1" == "enable" ]; then
sudo insmod "$PROJECT_LOCATION/acer-wmi-battery.ko" enable_health_mode=1
echo "Battery health mode enabled"
elif [ "$1" == "disable" ]; then
sudo insmod "$PROJECT_LOCATION/acer-wmi-battery.ko" enable_health_mode=0
echo "Battery health mode disabled"
else
echo "Please either state 'enable' or 'disable'"
fi

376
non-nix/leftwm/config.toml Normal file
View File

@ -0,0 +1,376 @@
modkey = "Mod4"
mousekey = "Mod4"
workspaces = []
tags = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ]
layouts = [
"MainAndVertStack",
"MainAndHorizontalStack",
# "MainAndDeck",
#"GridHorizontal",
# "EvenHorizontal",
# "EvenVertical",
# "Fibonacci",
# "LeftMain",
# "CenterMain",
# "CenterMainBalanced",
# "CenterMainFluid",
# "Monocle",
# "RightWiderLeftStack",
# "LeftWiderRightStack"
]
layout_mode = "Tag"
insert_behavior = "Bottom"
disable_current_tag_swap = false
disable_tile_drag = true
focus_behaviour = "Sloppy"
focus_new_windows = true
disable_window_snap = true
window_rules = [
{window_class = "firefox", window_title = "Mozilla Firefox$", spawn_on_tag = 1},
{window_class = "TelegramDesktop", spawn_on_tag = 9},
{window_class = "Signal", spawn_on_tag = 9},
{window_class = "Rocket.Chat", spawn_on_tag = 9},
{window_class = "Element", spawn_on_tag = 9},
{window_class = "Thunderbird", spawn_on_tag = 10},
{window_class = "zoom", spawn_on_tag = 5},
# {window_title = "Manjaro Settings Manager", spawn_floating = true},
# {window_class = "Pamac-manager", spawn_floating = true},
# {window_class = "Pamac-updater", spawn_floating = true},
# {window_class = "Qalculate-gtk", spawn_floating = true},
]
[[keybind]]
command = "SetLayout"
value = "Monocle"
modifier = ["modkey"]
key = "m"
[[scratchpad]]
name = "calculator"
value = "qalculate-gtk"
[[keybind]]
command = "ToggleScratchPad"
value = "calculator"
modifier = ["modkey"]
key = "c"
[[keybind]]
command = "Execute"
value = "~/.config/leftwm/scripts/dzen_exit_menu.pl"
modifier = ["modkey", "Shift"]
key = "e"
[[keybind]]
command = "Execute"
value = "firefox"
modifier = ["modkey"]
key = "b"
[[keybind]]
command = "Execute"
value = "krusader"
modifier = ["modkey"]
key = "t"
[[keybind]]
command = "Execute"
value = "rofi -show run #dmenu_recency -i"
modifier = ["modkey"]
key = "d"
[[keybind]]
command = "Execute"
value = "alacritty"
modifier = ["modkey"]
key = "Return"
[[keybind]]
command = "ToggleFullScreen"
value = ""
modifier = ["modkey"]
key = "f"
[[keybind]]
command = "ToggleFloating"
value = ""
modifier = ["modkey", "Shift"]
key = "space"
[[keybind]]
command = "CloseWindow"
value = ""
modifier = ["modkey"]
key = "q"
[[keybind]]
command = "CloseWindow"
value = ""
modifier = ["modkey"]
key = "x"
[[keybind]]
command ="SoftReload"
value = ""
modifier = ["modkey", "Shift"]
key = "r"
#[[keybind]]
#command = "MoveToLastWorkspace"
#value = ""
#modifier = ["modkey", "Shift"]
#key = "w"
#[[keybind]]
#command = "SwapTags"
#value = ""
#modifier = ["modkey"]
#key = "w"
#[[keybind]]
#command = "MoveWindowUp"
#value = ""
#modifier = ["modkey", "Shift"]
#key = "k"
#[[keybind]]
#command = "MoveWindowDown"
#value = ""
#modifier = ["modkey", "Shift"]
#key = "j"
#[[keybind]]
#command = "MoveWindowTop"
#value = ""
#modifier = ["modkey", "Shift"]
#key = "Return"
#[[keybind]]
#command = "FocusWindowUp"
#value = ""
#modifier = ["modkey"]
#key = "k"
#[[keybind]]
#command = "FocusWindowDown"
#value = ""
#modifier = ["modkey"]
#key = "j"
#[[keybind]]
#command = "NextLayout"
#value = ""
#modifier = ["modkey", "Control"]
#key = "k"
#[[keybind]]
#command = "PreviousLayout"
#value = ""
#modifier = ["modkey", "Control"]
#key = "j"
#[[keybind]]
#command = "FocusWorkspaceNext"
#value = ""
#modifier = ["modkey"]
#key = "l"
#[[keybind]]
#command = "FocusWorkspacePrevious"
#value = ""
#modifier = ["modkey"]
#key = "h"
[[keybind]]
command = "FocusWindowUp"
value = ""
modifier = ["modkey"]
key = "Up"
[[keybind]]
command = "FocusWindowDown"
value = ""
modifier = ["modkey"]
key = "Down"
[[keybind]]
command = "FocusWindowTop"
value = "true"
modifier = ["modkey"]
key = "Left"
[[keybind]]
command = "FocusWindowTop"
value = "true"
modifier = ["modkey"]
key = "Right"
[[keybind]]
command = "MoveWindowUp"
value = ""
modifier = ["modkey", "Shift"]
key = "Up"
[[keybind]]
command = "MoveWindowDown"
value = ""
modifier = ["modkey", "Shift"]
key = "Down"
[[keybind]]
command = "MoveWindowTop"
value = ""
modifier = ["modkey", "Shift"]
key = "Left"
[[keybind]]
command = "MoveWindowTop"
value = ""
modifier = ["modkey", "Shift"]
key = "Right"
[[keybind]]
command = "NextLayout"
value = ""
modifier = ["modkey", "Control"]
key = "Up"
[[keybind]]
command = "RotateTag"
value = ""
modifier = ["modkey", "Control"]
key = "Down"
#[[keybind]]
#command = "FocusWorkspaceNext"
#value = ""
#modifier = ["modkey"]
#key = "Right"
#[[keybind]]
#command = "FocusWorkspacePrevious"
#value = ""
#modifier = ["modkey"]
#key = "Left"
[[keybind]]
command = "GotoTag"
value = "1"
modifier = ["modkey"]
key = "1"
[[keybind]]
command = "GotoTag"
value = "2"
modifier = ["modkey"]
key = "2"
[[keybind]]
command = "GotoTag"
value = "3"
modifier = ["modkey"]
key = "3"
[[keybind]]
command = "GotoTag"
value = "4"
modifier = ["modkey"]
key = "4"
[[keybind]]
command = "GotoTag"
value = "5"
modifier = ["modkey"]
key = "5"
[[keybind]]
command = "GotoTag"
value = "6"
modifier = ["modkey"]
key = "6"
[[keybind]]
command = "GotoTag"
value = "7"
modifier = ["modkey"]
key = "7"
[[keybind]]
command = "GotoTag"
value = "8"
modifier = ["modkey"]
key = "8"
[[keybind]]
command = "GotoTag"
value = "9"
modifier = ["modkey"]
key = "9"
[[keybind]]
command = "GotoTag"
value = "10"
modifier = ["modkey"]
key = "0"
[[keybind]]
command = "MoveToTag"
value = "1"
modifier = ["modkey", "Shift"]
key = "1"
[[keybind]]
command = "MoveToTag"
value = "2"
modifier = ["modkey", "Shift"]
key = "2"
[[keybind]]
command = "MoveToTag"
value = "3"
modifier = ["modkey", "Shift"]
key = "3"
[[keybind]]
command = "MoveToTag"
value = "4"
modifier = ["modkey", "Shift"]
key = "4"
[[keybind]]
command = "MoveToTag"
value = "5"
modifier = ["modkey", "Shift"]
key = "5"
[[keybind]]
command = "MoveToTag"
value = "6"
modifier = ["modkey", "Shift"]
key = "6"
[[keybind]]
command = "MoveToTag"
value = "7"
modifier = ["modkey", "Shift"]
key = "7"
[[keybind]]
command = "MoveToTag"
value = "8"
modifier = ["modkey", "Shift"]
key = "8"
[[keybind]]
command = "MoveToTag"
value = "9"
modifier = ["modkey", "Shift"]
key = "9"
[[keybind]]
command = "MoveToTag"
value = "10"
modifier = ["modkey", "Shift"]
key = "0"

View File

@ -0,0 +1,21 @@
#!/bin/perl
use strict;
use warnings;
my $message="System (l) lock, (e) logout, (r) reboot, (s) shutdown";
my $screen_height=1080;
my $message_height=34;
my %actions;
$actions{"l"} = "i3lock --ignore-empty-password --color 000000";
$actions{"e"} = "pkill leftwm";
$actions{"r"} = "systemctl reboot";
$actions{"s"} = "systemctl poweroff";
my @dzen_actions;
while ((my $key, my $action) = each (%actions)){
push @dzen_actions, "key_$key=exit,exec:$action";
}
my $joined_actions = join(";", @dzen_actions);
print "$joined_actions";
`echo "$message" | dzen2 -h $message_height -p -y $screen_height -e "onstart=grabkeys;key_Escape=exit;key_Return=exit;button1=exit;$joined_actions"`;

211
non-nix/leftwm/themes.toml Normal file
View File

@ -0,0 +1,211 @@
[[repos]]
url = "https://raw.githubusercontent.com/leftwm/leftwm-community-themes/master/known.toml"
name = "community"
definitions_version = 1
[[repos.themes]]
name = "Orange Forest"
repository = "https://github.com/PVautour/leftwm-theme-orange-forest/"
commit = "*"
version = "0.0.2"
leftwm_versions = "^0.3.0"
current = false
[[repos.themes]]
name = "Coffee"
repository = "https://github.com/lex148/leftwm-coffee/"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "Soothe"
repository = "https://github.com/b4skyx/leftwm-soothe/"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
relative_directory = "theme/"
[[repos.themes]]
name = "TNG"
repository = "https://github.com/lex148/leftwm-tng/"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "Windows XP"
repository = "https://github.com/lex148/leftwm-windowsxp/"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "Dracula Rounded"
directory = "~/.config/leftwm/themes/Dracula Rounded"
repository = "https://github.com/AethanFoot/leftwm-theme-dracula-rounded/"
commit = "*"
version = "0.0.3"
leftwm_versions = "^0.3.0"
current = false
[[repos.themes]]
name = "Forest"
directory = "~/.config/leftwm/themes/Forest"
repository = "https://github.com/lex148/forest/"
commit = "*"
version = "0.0.1"
leftwm_versions = "^0.3.0"
current = true
[[repos.themes]]
name = "Ground Zero"
repository = "https://github.com/Qwart376/Ground-Zero/"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "Red Moon"
repository = "https://github.com/Qwart376/Red-Moon"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "Blue Coffee"
directory = "~/.config/leftwm/themes/Blue Coffee"
repository = "https://github.com/Qwart376/Blue-Coffee/"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "sunflower"
repository = "https://github.com/mautamu/leftwm-sunflower/"
commit = "*"
version = "0.1.2"
leftwm_versions = "^0.2.11, <0.3.0"
current = false
[[repos.themes]]
name = "Bumblebee"
repository = "https://github.com/mfdorst/leftwm-bumblebee/"
commit = "*"
version = "0.0.1"
leftwm_versions = "^0.2.8, <0.3.0"
current = false
[[repos.themes]]
name = "Sunset"
repository = "https://github.com/Syudagye/leftwm-sunset"
commit = "*"
version = "0.0.1"
leftwm_versions = "<0.3.0"
current = false
[[repos.themes]]
name = "Garden"
directory = "~/.config/leftwm/themes/Garden"
repository = "https://github.com/taylor85345/leftwm-theme-garden"
commit = "*"
version = "0.0.4"
leftwm_versions = ">0.2.7"
current = false
[[repos.themes]]
name = "Epitaph"
directory = "~/.config/leftwm/themes/Epitaph"
repository = "https://github.com/VentGrey/Epitaph"
commit = "*"
version = "0.0.2"
leftwm_versions = "*"
current = false
[[repos.themes]]
name = "Ocean-night"
directory = "~/.config/leftwm/themes/Ocean-night"
repository = "https://github.com/TheRoniOne/ocean-night"
commit = "*"
version = "0.0.1"
leftwm_versions = "*"
current = false
[[repos.themes]]
name = "Flamingo"
repository = "https://github.com/necaris/leftwm-theme-flamingo"
commit = "*"
version = "0.0.1"
leftwm_versions = ">0.2.7, <0.3.0"
current = false
[[repos.themes]]
name = "Amber"
repository = "https://github.com/di-effe/amber"
commit = "*"
version = "0.2.2"
leftwm_versions = ">0.2.10, <0.3.0"
current = false
[[repos.themes]]
name = "Catppuccin"
repository = "https://github.com/di-effe/catppuccin"
commit = "*"
version = "0.1.1"
leftwm_versions = ">0.2.10, <0.3.0"
current = false
[[repos.themes]]
name = "Molese"
repository = "https://github.com/m0lese/leftwm-config"
commit = "*"
version = "2.1.0"
leftwm_versions = ">0.2.10, <0.3.0"
current = false
[[repos.themes]]
name = "Double Bar"
directory = "~/.config/leftwm/themes/Double Bar"
repository = "https://github.com/PeterDauwe/doublebar/"
commit = "*"
version = "0.0.2"
leftwm_versions = "^0.3.0"
current = false
[[repos.themes]]
name = "SpaceJelly"
repository = "https://gitlab.com/jchand99/space_jelly"
commit = "*"
version = "1.0.0"
leftwm_versions = ">0.2.10, <0.3.0"
current = false
[[repos.themes]]
name = "Ascent"
directory = "~/.config/leftwm/themes/Ascent"
repository = "https://gitlab.com/mWalrus/ascent"
commit = "*"
version = "1.0.0"
leftwm_versions = ">0.2.7"
current = false
[[repos.themes]]
name = "Zexanima"
repository = "https://github.com/calebgasser/zexanima-leftwm-theme/tree/develop"
commit = "*"
version = "0.0.1"
leftwm_versions = ">0.3.0"
current = false
[[repos]]
url = "localhost"
name = "LOCAL"
definitions_version = 1
themes = []

View File

@ -0,0 +1,134 @@
Submodule leftwm/themes/current contains modified content
diff --git a/leftwm/themes/current/down b/leftwm/themes/current/down
index 81fcae4..8dce89e 100755
--- a/leftwm/themes/current/down
+++ b/leftwm/themes/current/down
@@ -14,4 +14,3 @@ pkill picom
pkill polybar
pkill dunst
pkill lxsession
-
diff --git a/leftwm/themes/current/polybar/bars.ini b/leftwm/themes/current/polybar/bars.ini
index 368f5e5..80d09d4 100644
--- a/leftwm/themes/current/polybar/bars.ini
+++ b/leftwm/themes/current/polybar/bars.ini
@@ -46,6 +46,7 @@ bar-volume-empty = ${bar.empty}
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${color.sep}
ramp-headphones-0 = 
+click-right = pavucontrol
[module/brightness]
type = internal/backlight
diff --git a/leftwm/themes/current/polybar/config.ini b/leftwm/themes/current/polybar/config.ini
index 88747c3..e81ff69 100644
--- a/leftwm/themes/current/polybar/config.ini
+++ b/leftwm/themes/current/polybar/config.ini
@@ -18,7 +18,7 @@ monitor = ${env:monitor}
monitor-fallback =
monitor-strict = false
override-redirect = false
-bottom = false
+bottom = true
fixed-center = true
width = 100%
height = 34
@@ -39,8 +39,8 @@ font-0 = "Iosevka Nerd Font:size=10;4"
font-1 = "Iosevka Nerd Font:size=10;3"
font-2 = "feather:size=12;3"
modules-left = workspaces sep cpu memory filesystem
-modules-center = mpd sep date
-modules-right = battery network sep volume brightness sep sysmenu sep
+modules-center =
+modules-right = battery network volume brightness sep date
separator =
dim-value = 1.0
wm-name =
@@ -50,7 +50,7 @@ tray-detached = false
enable-ipc = true
click-left =
click-middle =
-click-right =
+click-right = jgmenu_run
scroll-up =
scroll-down =
double-click-left =
diff --git a/leftwm/themes/current/polybar/modules.ini b/leftwm/themes/current/polybar/modules.ini
index 0b2ff0e..0491e61 100644
--- a/leftwm/themes/current/polybar/modules.ini
+++ b/leftwm/themes/current/polybar/modules.ini
@@ -76,11 +76,11 @@ label = " %percentage%%"
[module/date]
type = internal/date
-interval = 1.0
-date = %A, %d %B
-time = at %I:%M %p
+interval = 0.5
+date = %A, %d.%m.%Y
+time = at %H:%M:%S
date-alt = It's %A, %d %B %Y
-time-alt = at %k:%M:%S
+time-alt = at %H:%M:%S
format = <label>
format-prefix = " "
format-prefix-foreground = ${color.red}
diff --git a/leftwm/themes/current/polybar/polybar.sh b/leftwm/themes/current/polybar/polybar.sh
new file mode 100755
index 0000000..033b764
--- /dev/null
+++ b/leftwm/themes/current/polybar/polybar.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#boot a polybar for each monitor
+# cd ${SCRIPTPATH}/polybar
+polybar -m | sed s/:.*// | tac | while read -r monitor
+do
+ monitor=$monitor polybar -c config.ini main &> /dev/null &
+done
diff --git a/leftwm/themes/current/theme.toml b/leftwm/themes/current/theme.toml
index 1e11d8f..297138a 100644
--- a/leftwm/themes/current/theme.toml
+++ b/leftwm/themes/current/theme.toml
@@ -1,5 +1,5 @@
border_width = 5
-margin = 20
+margin = 5
default_border_color = "#222222"
floating_border_color = "#005500"
focused_border_color = "#FFB53A"
diff --git a/leftwm/themes/current/up b/leftwm/themes/current/up
index 0f03bbb..6455180 100755
--- a/leftwm/themes/current/up
+++ b/leftwm/themes/current/up
@@ -23,16 +23,26 @@ leftwm-command "LoadTheme $SCRIPTPATH/theme.toml"
#set background
if [ -x "$(command -v feh)" ]; then
- feh --bg-scale "${SCRIPTPATH}/background.jpg"
+ # feh --bg-scale "${SCRIPTPATH}/background.jpg"
+ feh --bg-fill ~/Bilder/background.jpg
fi
#make sure all fonts needed are installed
${SCRIPTPATH}/fonts/install_fonts
# extra utils to make this theme a little more homey
-if [ -x "$(command -v dunst)" ]; then
- dunst &
-fi
+#if [ -x "$(command -v dunst)" ]; then
+# dunst &
+#fi
+
+/usr/lib/xfce4/notifyd/xfce4-notifyd &
+nm-applet &
+blueman-applet &
+xfce4-power-manager &
+# nextcloud &
+/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
+start-pulseaudio-x11 &
+jgmenu --at-pointer --hide-on-startup &
#boot a polybar for each monitor
cd ${SCRIPTPATH}/polybar

View File

@ -0,0 +1,58 @@
[Default Applications]
application/octet-stream=mousepad.desktop
application/pdf=FoxitReader.desktop
application/pdf=org.gnome.Evince.desktop
application/x-gettext-translation=mousepad.desktop
application/xml=mousepad.desktop
application/x-wine-extension-ini=mousepad.desktop
image/gif=viewnior.desktop;gimp.desktop
image/gif=viewnior.desktop;gimp.desktop
image/jpeg=viewnior.desktop;gimp.desktop
image/png=viewnior.desktop;gimp.desktop
text/plain=mousepad.desktop
video/mp4=vlc.desktop
video/ogg=vlc.desktop
video/x-flv=vlc.desktop
video/x-ms-wmv=vlc.desktop
video/x-ogm+ogg=vlc.desktop
video/x-theora+ogg=vlc.desktop
application/ppdf=FoxitReader.desktop
application/xfdf=FoxitReader.desktop
application/fdf=FoxitReader.desktop
x-scheme-handler/tg=userapp-Telegram Desktop-DQX5U0.desktop
application/x-compressed-tar=engrampa.desktop
application/x-tar=engrampa.desktop
application/zip=engrampa.desktop
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/unknown=firefox.desktop
text/x-csrc=code-oss.desktop
x-scheme-handler/eclipse+installer=_home_julian_Downloads_eclipse-installer_.desktop
x-scheme-handler/eclipse+command x-scheme-handler/eclipse+mpc=_home_julian_eclipse_cpp-2021-03_eclipse_.desktop
text/x-c++src=mousepad.desktop
inode/directory=/usr/share/applications/thunar.desktop
[Added Associations]
text/plain=wolfram-mathematica12.desktop;code-oss.desktop;libreoffice-writer.desktop;code-oss-url-handler.desktop;mousepad.desktop;
application/pdf=qpdfview.desktop;com.github.xournalpp.xournalpp.desktop;code-oss.desktop;org.gnome.Evince.desktop;firefox.desktop;FoxitReader.desktop;libreoffice-draw.desktop;
application/x-qw=libreoffice-startcenter.desktop;
text/csv=libreoffice-calc.desktop;mousepad.desktop;
application/zip=org.gnome.FileRoller.desktop;
application/x-ms-dos-executable=wine.desktop;engrampa.desktop;
image/png=gimp.desktop;
image/jpeg=gimp.desktop;
application/x-shellscript=mousepad.desktop;
text/x-python=code-oss.desktop;
application/x-perl=code-oss.desktop;
font/ttf=org.gnome.font-viewer.desktop;
application/vnd.appimage=unity-editor.desktop;
x-scheme-handler/tg=userapp-Telegram Desktop-DQX5U0.desktop;
text/x-tex=texstudio.desktop;
application/x-compressed-tar=engrampa.desktop;
application/x-tar=engrampa.desktop;
text/x-c++src=nvim.desktop;mousepad.desktop;
text/x-java=nvim.desktop;vim.desktop;
text/x-csrc=code-oss.desktop;
application/x-7z-compressed=mplayer.desktop;

13
non-nix/manjaro/.xprofile Normal file
View File

@ -0,0 +1,13 @@
export LANG=en_US.utf8
export LC_CTYPE="en_US.utf8"
export LC_NUMERIC="de_DE.utf8"
export LC_TIME="en_US.utf8"
export LC_COLLATE="en_US.utf8"
export LC_MONETARY="de_DE.utf8"
export LC_MESSAGES="en_US.utf8"
export LC_PAPER="en_US.utf8"
export LC_NAME="en_US.utf8"
export LC_ADDRESS="en_US.utf8"
export LC_TELEPHONE="en_US.utf8"
export LC_MEASUREMENT="en_US.utf8"
export LC_IDENTIFICATION="en_US.utf8"

497
non-nix/mc/mc.keymap Normal file
View File

@ -0,0 +1,497 @@
[main]
ChangePanel = tab
Help = f1
UserMenu = f2
View = f3
# ViewFile =
Edit = f4
# EditForceInternal =
Copy = f5
Move = f6
MakeDir = f7
Delete = f8
Menu = f9
Quit = f10
MenuLastSelected = f19
QuitQuiet = f20
Find = alt-question
CdQuick = alt-c
HotList = alt-backslash; ctrl-b
Reread = ctrl-r
DirSize = ctrl-space
Suspend = ctrl-z
Swap = ctrl-u
History = alt-h
# PanelListing =
# SetupListingFormat =
ShowHidden = alt-dot
SplitVertHoriz = alt-comma
SplitEqual = alt-equal
SplitMore = alt-shift-right
SplitLess = alt-shift-left
Shell = ctrl-o
PutCurrentPath = alt-a
PutOtherPath = alt-shift-a
PutCurrentSelected = alt-enter; ctrl-enter
PutCurrentFullSelected = ctrl-shift-enter
ViewFiltered = alt-exclamation
Select = kpplus
Unselect = kpminus
SelectInvert = kpasterisk
ScreenList = alt-prime
# OptionsLayout =
# OptionsAppearance =
# OptionsPanel =
# OptionsConfirm =
# OptionsDisplayBits =
# OptionsVfs =
# LearnKeys =
# SaveSetup =
# EditExtensionsFile =
# EditFileHighlightFile =
# Filter =
# ConnectFish =
# ConnectFtp =
# ConnectSmb =
# Undelete =
EditorViewerHistory = alt-shift-e
ExtendedKeyMap = ctrl-x
[main:xmap]
ChangeMode = c
ChangeOwn = o
ChangeAttributes = e
CompareDirs = d
CompareFiles = ctrl-d
HotListAdd = h
LinkSymbolicEdit = ctrl-s
Link = l
LinkSymbolic = s
LinkSymbolicRelative = v
PanelInfo = i
PanelQuickView = q
ExternalPanelize = exclamation
VfsList = a
Jobs = j
PutCurrentPath = p
PutOtherPath = ctrl-p
PutCurrentTagged = t
PutOtherTagged = ctrl-t
PutCurrentLink = r
PutOtherLink = ctrl-r
[panel]
CycleListingFormat = alt-t
Search = ctrl-s; alt-s
Mark = insert; ctrl-t
MarkUp = shift-up
MarkDown = shift-down
# MarkLeft =
# MarkRight =
Down = down; ctrl-n
Up = up; ctrl-p
Left = left
Right = right
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Enter = enter
PanelOtherCd = alt-o
PanelOtherCdLink = alt-l
ViewRaw = f13
EditNew = f14
CopySingle = f15
MoveSingle = f16
DeleteSingle = f18
# SelectExt =
Select = alt-plus
Unselect = alt-minus
SelectInvert = alt-asterisk
CdChild = ctrl-pgdn
CdParent = ctrl-pgup
# CdParentSmart =
# Panelize =
History = alt-shift-h
HistoryNext = alt-u
HistoryPrev = alt-y
BottomOnScreen = alt-j
MiddleOnScreen = alt-r
TopOnScreen = alt-g
PanelOtherSync = alt-i
SelectCodepage = alt-e
Top = alt-lt; home; a1
Bottom = alt-gt; end; c1
# Sort =
# SortPrev =
# SortNext =
# SortReverse =
# SortByName =
# SortByExt =
# SortBySize =
# SortByMTime =
# ScrollLeft =
# ScrollRight =
[dialog]
Ok = enter
Cancel = f10; esc; ctrl-g
Up = left; up
#Left = left; up
Down = right; down
#Right = right; down
Help = f1
Suspend = ctrl-z
Refresh = ctrl-l
ScreenList = alt-prime
ScreenNext = alt-rbrace
ScreenPrev = alt-lbrace
[menu]
Help = f1
Left = left; ctrl-b
Right = right; ctrl-f
Up = up; ctrl-p
Down = down; ctrl-n
Home = home; alt-lt; ctr-a
End = end; alt-gt ctrl-e
Enter = enter
Quit = F10; esc; ctrl-g
[input]
Home = ctrl-a; alt-lt; home; a1
End = ctrl-e; alt-gt; end; c1
Left = left; alt-left; ctrl-b
Right = right; alt-right; ctrl-f
WordLeft = ctrl-left; alt-b
WordRight = ctrl-right; alt-f
Backspace = backspace
Delete = delete; ctrl-d
DeleteToWordBegin = alt-backspace
DeleteToWordEnd = alt-d
# Mark =
Remove = ctrl-w
# Cut =
Store = alt-w
# Paste =
Yank = ctrl-y
DeleteToEnd = ctrl-k
HistoryPrev = alt-p; ctrl-down
HistoryNext = alt-n; ctrl-up
History = alt-h
Complete = alt-tab
# Clear =
MarkLeft = shift-left
MarkRight = shift-right
MarkToWordBegin = ctrl-shift-left
MarkToWordEnd = ctrl-shift-right
MarkToHome = shift-home
MarkToEnd = shift-end
[listbox]
Up = up; ctrl-p
Down = down; ctrl-n
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Delete = delete; d
Clear = shift-delete; shift-d
View = f3
Edit = f4
Enter = enter
[radio]
Up = up; ctrl-p
Down = down; ctrl-n
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
Select = space
[tree]
Help = f1
Reread = f2; ctrl-r
Forget = f3
ToggleNavigation = f4
Copy = f5
Move = f6
Up = up; ctrl-p
Down = down; ctrl-n
Left = left
Right = right
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Enter = enter
Search = ctrl-s; alt-s
Delete = f8; delete
[help]
Help = f1
Index = f2; c
Back = f3; left; l
Quit = f10; esc
Up = up; ctrl-p
Down = down; ctrl-n
PageDown = f; space; pgdn; ctrl-v
PageUp = b; pgup; alt-v; backspace
HalfPageDown = d
HalfPageUp = u
Top = home; ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
Enter = right; enter
LinkNext = tab
LinkPrev = alt-tab
NodeNext = n
NodePrev = p
[chattr]
Up = up; left; ctrl-p
Down = down; right; ctrl-n
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Mark = t; shift-t
MarkAndDown = insert
[editor]
Store = ctrl-insert
Paste = shift-insert
Cut = shift-delete
Up = up
Down = down
Left = left
Right = right
WordLeft = ctrl-left; ctrl-z
WordRight = ctrl-right; ctrl-x
Enter = enter
Return = shift-enter; ctrl-enter; ctrl-shift-enter
BackSpace = backspace; ctrl-h
Delete = delete; ctrl-d
PageUp = pgup
PageDown = pgdn
Home = home
End = end
Tab = tab; shift-tab; ctrl-tab; ctrl-shift-tab
Undo = ctrl-u
Redo = alt-r
Top = ctrl-home; alt-lt
Bottom = ctrl-end; alt-gt
ScrollUp = ctrl-up
ScrollDown = ctrl-down
TopOnScreen = ctrl-pgup
BottomOnScreen = ctrl-pgdn
DeleteToWordBegin = alt-backspace
DeleteToWordEnd = alt-d
DeleteLine = ctrl-y
DeleteToEnd = ctrl-k
# DeleteToHome =
# ParagraphUp =
# ParagraphDown =
Save = f2
# EditFile =
EditNew = ctrl-n
SaveAs = f12; ctrl-f2
# Close =
History = alt-shift-e
Mark = f3
Copy = f5
Move = f6
Remove = f8
# MarkLine =
# MarkWord =
# MarkAll =
# Unmark =
Search = f7
SearchContinue = f17
# BlockShiftLeft =
# BlockShiftRight =
MarkPageUp = shift-pgup
MarkPageDown = shift-pgdn
MarkLeft = shift-left
MarkRight = shift-right
MarkToWordBegin = ctrl-shift-left
MarkToWordEnd = ctrl-shift-right
MarkUp = shift-up
MarkDown = shift-down
MarkToHome = shift-home
MarkToEnd = shift-end
MarkToFileBegin = ctrl-shift-home
MarkToFileEnd = ctrl-shift-end
MarkToPageBegin = ctrl-shift-pgup
MarkToPageEnd = ctrl-shift-pgdn
MarkScrollUp = ctrl-shift-up
MarkScrollDown = ctrl-shift-down
# MarkParagraphUp =
# MarkParagraphDown =
MarkColumnPageUp = alt-pgup
MarkColumnPageDown = alt-pgdn
MarkColumnLeft = alt-left
MarkColumnRight = alt-right
MarkColumnUp = alt-up
MarkColumnDown = alt-down
# MarkColumnScrollUp =
# MarkColumnScrollDown =
# MarkColumnParagraphUp =
# MarkColumnParagraphDown =
BlockSave = ctrl-f
MarkColumn = f13
Replace = f4
ReplaceContinue = f14
Complete = alt-tab
InsertFile = f15
Quit = f10; esc
InsertOverwrite = insert
Help = f1
# Date =
Refresh = ctrl-l
Goto = alt-l
Sort = alt-t
Mail = alt-m
ParagraphFormat = alt-p
MatchBracket = alt-b
ExternalCommand = alt-u
UserMenu = f11
Menu = f9
Bookmark = alt-k
BookmarkFlush = alt-o
BookmarkNext = alt-j
BookmarkPrev = alt-i
# History =
Shell = ctrl-o
InsertLiteral = ctrl-q
# MacroStartRecord =
# MacroStopRecord =
MacroStartStopRecord = ctrl-r
# MacroDelete =
ShowNumbers = alt-n
ShowTabTws = alt-underline
SyntaxOnOff = ctrl-s
# SyntaxChoose =
# ShowMargin =
Find = alt-enter
FilePrev = alt-minus
FileNext = alt-plus
# RepeatStartStopRecord =
SelectCodepage = alt-e
# Options =
# OptionsSaveMode =
# SpellCheck =
SpellCheckCurrentWord = ctrl-p
# SpellCheckSelectLang =
# LearnKeys =
# WindowMove =
# WindowResize =
# WindowFullscreen =
# WindowList =
# WindowNext =
# WindowPrev =
# ExtendedKeyMap =
[viewer]
Help = f1
WrapMode = f2
Quit = f3; f10; q; esc
HexMode = f4
Goto = f5
Search = f7
SearchForward = slash
SearchBackward = question
SearchContinue = f17; n
SearchForwardContinue = ctrl-s
SearchBackwardContinue = ctrl-r
SearchOppositeContinue = shift-n
MagicMode = f8
NroffMode = f9
Home = ctrl-a
End = ctrl-e
Left = h; left
Right = l; right
LeftQuick = ctrl-left
RightQuick = ctrl-right
Up = k; y; insert; up; ctrl-p
Down = j; e; delete; down; enter; ctrl-n
PageDown = f; space; pgdn; ctrl-v
PageUp = b; pgup; alt-v; backspace
HalfPageDown = d
HalfPageUp = u
Top = home; ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
BookmarkGoto = m
Bookmark = r
FileNext = ctrl-f
FilePrev = ctrl-b
SelectCodepage = alt-e
Shell = ctrl-o
Ruler = alt-r
History = alt-shift-e
[viewer:hex]
Help = f1
HexEditMode = f2
Quit = f3; f10; q; esc
HexMode = f4
Goto = f5
Save = f6
Search = f7
SearchForward = slash
SearchBackward = question
SearchContinue = f17; n
SearchForwardContinue = ctrl-s
SearchBackwardContinue = ctrl-r
SearchOppositeContinue = shift-n
MagicMode = f8
NroffMode = f9
ToggleNavigation = tab
Home = ctrl-a; home
End = ctrl-e; end
Left = b; left
Right = f; right
Up = k; y; up
Down = j; delete; down
PageDown = pgdn; ctrl-v
PageUp = pgup; alt-v
Top = ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
History = alt-shift-e
[diffviewer]
ShowSymbols = alt-s; s
ShowNumbers = alt-n; l
SplitFull = f
SplitEqual = equal
SplitMore = gt
SplitLess = lt
Tab2 = 2
Tab3 = 3
Tab4 = 4
Tab8 = 8
Swap = ctrl-u
Redo = ctrl-r
HunkNext = n; enter; space
HunkPrev = p; backspace
Goto = g; shift-g
Save = f2
Edit = f4
EditOther = f14
Merge = f5
MergeOther = f15
Search = f7
SearchContinue = f17
Options = f9
Top = ctrl-home
Bottom = ctrl-end
Down = down
Up = up
LeftQuick = ctrl-left
RightQuick = ctrl-right
Left = left
Right = right
PageDown = pgdn
PageUp = pgup
Home = home
End = end
Help = f1
Quit = f10; q; shift-q; esc
Shell = ctrl-o
SelectCodepage = alt-e

171
non-nix/polybar/config.ini Normal file
View File

@ -0,0 +1,171 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #282A2E
background-alt = #373B41
foreground = #C5C8C6
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
[bar/main]
monitor = ${env:monitor}
width = 100%
height = 24pt
line-size = 5
bottom = true
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 0
padding-right = 1
module-margin = 1
font-0 = monospace;2
; https://feathericons.com/
; https://github.com/AT-UI/feather-font
font-1 = feather;2
modules-left = i3
modules-center = cpu memory filesystem
modules-right = volume sep date
tray-position = right
tray-detached = false
enable-ipc = true
click-right = jgmenu_run
[module/sep]
type = custom/text
content = |
content-foreground = ${colors.foreground}
[module/i3]
type = internal/i3
enable-click = true
enable-scroll = true
pin_workspaces = true
format = <label-state> <label-mode>
label-mode =  %mode%
label-mode-padding = 1
label-mode-background = ${colors.background-alt}
label-mode-foreground = ${colors.primary}
label-mode-prefix =
label-mode-prefix-foreground = ${colors.primary}
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-padding = 1
label-unfocused = %name%
label-unfocused-padding = 1
label-urgent = %name%
label-urgent-underline = ${colors.alert}
label-urgent-padding = 1
label-visible = %name%
label-visible-foreground = ${colors.disabled}
label-visible-padding = 1
[module/xworkspaces]
type = internal/xworkspaces
enable-click = true
enable-scroll = true
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/volume]
type = internal/pulseaudio
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
format-volume-prefix-foreground = ${colors.primary}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-foreground = ${colors.primary}
label-muted = MUTED
label-muted-foreground = ${colors.primary}
click-right = pavucontrol
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix =
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[module/date]
type = internal/date
interval = 0.5
date = %A, %d.%m.%Y
time = at %H:%M:%S
label = %date% %time%
label-foreground = ${colors.foreground}
format-prefix = " "
format-prefix-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = false

8
non-nix/polybar/startup.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
#boot a polybar for each monitor
pkill polybar
polybar -m | sed s/:.*// | tac | while read -r monitor
do
monitor=$monitor polybar main &> /dev/null &
done

View File

@ -0,0 +1,14 @@
# newline between shell prompts
add_newline = false
#format = "$all$directory$character"
[line_break]
disabled = true
[directory]
fish_style_pwd_dir_length = 1
[status]
map_symbol = true
format = '[$symbol$status $common_meaning$signal_name$maybe_int]($style) '
disabled = false

164
non-nix/vim/.vimrc Normal file
View File

@ -0,0 +1,164 @@
" URL: https://vim.wikia.com/wiki/Example_vimrc
" Authors: https://vim.wikia.com/wiki/Vim_on_Libera_Chat
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
" These options and commands enable some very useful features in Vim, that
" no user should have to live without.
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
if has('filetype')
filetype indent plugin on
endif
" Enable syntax highlighting
if has('syntax')
syntax on
endif
"------------------------------------------------------------
" Must have options {{{1
"
" These are highly recommended options.
" Vim with default settings does not allow easy switching between multiple files
" in the same editor window. Users can use multiple split windows or multiple
" tab pages to edit multiple files, but it is still best to enable an option to
" allow easier switching between files.
"
" One such option is the 'hidden' option, which allows you to re-use the same
" window and switch from an unsaved buffer without saving it first. Also allows
" you to keep an undo history for multiple files when re-using the same window
" in this way. Note that using persistent undo also lets you undo in multiple
" files even in the same window, but is less efficient and is actually designed
" for keeping undo history after closing Vim entirely. Vim will complain if you
" try to quit without saving, and swap files will keep you safe if your computer
" crashes.
set hidden
" Note that not everyone likes working this way (with the hidden option).
" Alternatives include using tabs or split windows instead of re-using the same
" window as mentioned above, and/or either of the following options:
" set confirm
" set autowriteall
" Better command-line completion
set wildmenu
" Show partial commands in the last line of the screen
set showcmd
" Highlight searches (use <C-L> to temporarily turn off highlighting; see the
" mapping of <C-L> below)
set hlsearch
" Modelines have historically been a source of security vulnerabilities. As
" such, it may be a good idea to disable them and use the securemodelines
" script, <http://www.vim.org/scripts/script.php?script_id=1876>.
" set nomodeline
"------------------------------------------------------------
" Usability options {{{1
"
" These are options that users frequently set in their .vimrc. Some of them
" change Vim's behaviour in ways which deviate from the true Vi way, but
" which are considered to add usability. Which, if any, of these options to
" use is very much a personal preference, but they are harmless.
" Use case insensitive search, except when using capital letters
set ignorecase
set smartcase
" Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
" When opening a new line and no filetype-specific indenting is enabled, keep
" the same indent as the line you're currently on. Useful for READMEs, etc.
set autoindent
" Stop certain movements from always going to the first character of a line.
" While this behaviour deviates from that of Vi, it does what most users
" coming from other editors would expect.
set nostartofline
" Display the cursor position on the last line of the screen or in the status
" line of a window
set ruler
" Always display the status line, even if only one window is displayed
set laststatus=2
" Instead of failing a command because of unsaved changes, instead raise a
" dialogue asking if you wish to save changed files.
set confirm
" Use visual bell instead of beeping when doing something wrong
set visualbell
" And reset the terminal code for the visual bell. If visualbell is set, and
" this line is also included, vim will neither flash nor beep. If visualbell
" is unset, this does nothing.
set t_vb=
" Enable use of the mouse for all modes
if has('mouse')
set mouse=a
endif
" Set the command window height to 2 lines, to avoid many cases of having to
" "press <Enter> to continue"
set cmdheight=2
" Display line numbers on the left
set number relativenumber
" Quickly time out on keycodes, but never time out on mappings
set notimeout ttimeout ttimeoutlen=200
" Use <F11> to toggle between 'paste' and 'nopaste'
set pastetoggle=<F11>
"------------------------------------------------------------
" Indentation options {{{1
"
" Indentation settings according to personal preference.
" Indentation settings for using 4 spaces instead of tabs.
" Do not change 'tabstop' from its default value of 8 with this setup.
set shiftwidth=4
set softtabstop=4
set expandtab
" Indentation settings for using hard tabs for indent. Display tabs as
" four characters wide.
"set shiftwidth=4
"set tabstop=4
"------------------------------------------------------------
" Mappings {{{1
"
" Useful mappings
" Map Y to act like D and C, i.e. to yank until EOL, rather than act as yy,
" which is the default
map Y y$
" Map <C-L> (redraw screen) to also turn off search highlighting until the
" next search
nnoremap <C-L> :nohl<CR><C-L>
"------------------------------------------------------------

223
non-nix/vim/init.vim Normal file
View File

@ -0,0 +1,223 @@
" URL: http://vim.wikia.com/wiki/Example_vimrc
" Authors: http://vim.wikia.com/wiki/Vim_on_Freenode
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
" These options and commands enable some very useful features in Vim, that
" no user should have to live without.
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
if has('filetype')
filetype indent plugin on
endif
" Enable syntax highlighting
if has('syntax')
syntax on
endif
" Set leader key
let mapleader = " "
" Plugins
" call plug#begin()
" Plug 'itchyny/lightline.vim'
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
" Plug 'Valloric/YouCompleteMe'
" Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
" Plug 'https://github.com/ap/vim-css-color.git'
" Plug 'vim-autoformat/vim-autoformat'
" Collection of common configurations for the Nvim LSP client
" Plug 'neovim/nvim-lspconfig'
" Extensions to built-in LSP, for example, providing type inlay hints
" Plug 'nvim-lua/lsp_extensions.nvim'
" Autocompletion framework for built-in LSP
" Plug 'hrsh7th/nvim-compe'
" Popup telescope
" Plug 'nvim-lua/popup.nvim'
" Plug 'nvim-lua/plenary.nvim'
" Plug 'nvim-telescope/telescope.nvim'
" Plug 'joshdick/onedark.vim'
" Plug 'tpope/vim-commentary'
" call plug#end()
"------------------------------------------------------------
" Must have options {{{1
"
" These are highly recommended options.
" Vim with default settings does not allow easy switching between multiple files
" in the same editor window. Users can use multiple split windows or multiple
" tab pages to edit multiple files, but it is still best to enable an option to
" allow easier switching between files.
"
" One such option is the 'hidden' option, which allows you to re-use the same
" window and switch from an unsaved buffer without saving it first. Also allows
" you to keep an undo history for multiple files when re-using the same window
" in this way. Note that using persistent undo also lets you undo in multiple
" files even in the same window, but is less efficient and is actually designed
" for keeping undo history after closing Vim entirely. Vim will complain if you
" try to quit without saving, and swap files will keep you safe if your computer
" crashes.
set hidden
" Note that not everyone likes working this way (with the hidden option).
" Alternatives include using tabs or split windows instead of re-using the same
" window as mentioned above, and/or either of the following options:
" set confirm
" set autowriteall
" Better command-line completion
set wildmenu
" Show partial commands in the last line of the screen
set showcmd
" Highlight searches (use <C-L> to temporarily turn off highlighting; see the
" mapping of <C-L> below)
set hlsearch
" Modelines have historically been a source of security vulnerabilities. As
" such, it may be a good idea to disable them and use the securemodelines
" script, <http://www.vim.org/scripts/script.php?script_id=1876>.
" set nomodeline
"------------------------------------------------------------
" Usability options {{{1
"
" These are options that users frequently set in their .vimrc. Some of them
" change Vim's behaviour in ways which deviate from the true Vi way, but
" which are considered to add usability. Which, if any, of these options to
" use is very much a personal preference, but they are harmless.
" Use case insensitive search, except when using capital letters
set ignorecase
set smartcase
" Allow backspacing over autoindent, line breaks and start of insert action
set backspace=indent,eol,start
" When opening a new line and no filetype-specific indenting is enabled, keep
" the same indent as the line you're currently on. Useful for READMEs, etc.
set autoindent
" Stop certain movements from always going to the first character of a line.
" While this behaviour deviates from that of Vi, it does what most users
" coming from other editors would expect.
set nostartofline
" Display the cursor position on the last line of the screen or in the status
" line of a window
set ruler
" Always display the status line, even if only one window is displayed
set laststatus=2
" Instead of failing a command because of unsaved changes, instead raise a
" dialogue asking if you wish to save changed files.
set confirm
" Use visual bell instead of beeping when doing something wrong
set visualbell
" And reset the terminal code for the visual bell. If visualbell is set, and
" this line is also included, vim will neither flash nor beep. If visualbell
" is unset, this does nothing.
set t_vb=
" Enable use of the mouse for all modes
if has('mouse')
set mouse=a
endif
" Set the command window height to 2 lines, to avoid many cases of having to
" "press <Enter> to continue"
set cmdheight=2
" Display line numbers on the left
set number relativenumber
" Quickly time out on keycodes, but never time out on mappings
set notimeout ttimeout ttimeoutlen=200
" Use <F11> to toggle between 'paste' and 'nopaste'
set pastetoggle=<F11>
"------------------------------------------------------------
" Indentation options {{{1
"
" Indentation settings according to personal preference.
" Indentation settings for using 4 spaces instead of tabs.
" Do not change 'tabstop' from its default value of 8 with this setup.
set shiftwidth=4
set softtabstop=4
set expandtab
" Indentation settings for using hard tabs for indent. Display tabs as
" four characters wide.
"set shiftwidth=4
"set tabstop=4
"------------------------------------------------------------
" Mappings {{{1
"
" Useful mappings
" Map Y to act like D and C, i.e. to yank until EOL, rather than act as yy,
" which is the default
map Y y$
" Map <C-L> (redraw screen) to also turn off search highlighting until the
" next search
nnoremap <C-L> :nohl<CR><C-L>
" Shortcuts for Ycm
"nnoremap <C-F> :YcmCompleter Format<Cr>
"nnoremap <C-J> :YcmCompleter GoTo<Cr>
nnoremap <C-N> :NERDTreeToggle<Cr>
nnoremap <leader>n :NERDTreeToggle<Cr>
"------------------------------------------------------------
" use Mouse clipboard instead of vims internal one
" use unnamedplus for Keyboard clipboard
set clipboard=unnamedplus
" For mouse selection clipboard, select text with Shift button pressed
" Find files using Telescope command-line sugar.
" nnoremap <leader>ff <cmd>Telescope find_files<cr>
"nnoremap <leader>fg <cmd>Telescope live_grep<cr>
"nnoremap <leader>fb <cmd>Telescope buffers<cr>
"nnoremap <leader>fh <cmd>Telescope help_tags<cr>
" !!! Uncomment the following line to load lsp functionality
" Remember to also uncomment the corresponding plugins at the top of this
" file.
" Maybe use doom emacs instead
" :lua require('lsp')

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
#!/bin/perl
use strict;
use warnings;
my $message="System (l) lock, (e) logout, (r) reboot, (s) shutdown";
my $screen_height=1080;
my $message_height=34;
my %actions;
$actions{"l"} = "i3lock --ignore-empty-password --color 000000";
$actions{"e"} = "pkill leftwm";
$actions{"r"} = "systemctl reboot";
$actions{"s"} = "systemctl poweroff";
my @dzen_actions;
while ((my $key, my $action) = each (%actions)){
push @dzen_actions, "key_$key=exit,exec:$action";
}
my $joined_actions = join(";", @dzen_actions);
print "$joined_actions";
system "echo \"$message\" | dzen2 -h $message_height -p -y $screen_height -e \"onstart=grabkeys;key_Escape=exit;key_Return=exit;button1=exit;$joined_actions\"";

Binary file not shown.

View File

@ -0,0 +1 @@
$ ghc --make xmonad.hs -i -ilib -fforce-recomp -main-is main -dynamic -v0 -outputdir ~/.xmonad/build-x86_64-linux -o ~/.xmonad/xmonad-x86_64-linux

BIN
non-nix/xmonad/xmonad.hi Normal file

Binary file not shown.

205
non-nix/xmonad/xmonad.hs Normal file
View File

@ -0,0 +1,205 @@
import qualified Data.Map as M
import Data.Monoid
import System.Exit
import XMonad hiding ((|||))
import XMonad.Actions.MouseResize
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.InsertPosition (Focus (Newer), Position (Below, Master), insertPosition)
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (doCenterFloat, doFullFloat, isDialog, isFullscreen)
import XMonad.Layout.Fullscreen
import XMonad.Layout.LayoutCombinators
import XMonad.Layout.LimitWindows
import XMonad.Layout.MultiToggle
import XMonad.Layout.MultiToggle.Instances
import XMonad.Layout.NoBorders
import XMonad.Layout.NoFrillsDecoration (simpleDeco)
import XMonad.Layout.Reflect (reflectHoriz)
import XMonad.Layout.Renamed
import XMonad.Layout.ResizableTile
import XMonad.Layout.SimpleDecoration
import XMonad.Layout.Simplest
import XMonad.Layout.SimplestFloat
import XMonad.Layout.Spacing
import XMonad.Layout.SubLayouts
import XMonad.Layout.Tabbed
import XMonad.Layout.ToggleLayouts
import qualified XMonad.Layout.ToggleLayouts as T (ToggleLayout (Toggle), toggleLayouts)
import XMonad.Layout.WindowArranger
import XMonad.Layout.WindowNavigation
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig (additionalKeysP, checkKeymap)
import XMonad.Util.SpawnOnce
myTerminal = "alacritty"
myFocusFollowsMouse = True
-- mod1Mask = left alt; mod3Mask = right alt; mod4Mask = windows key
myModMask = mod4Mask
myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
myWorkspaceKeys = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
myBorderWidth = 2
myNormalBorderColor = "#dddddd"
myFocusedBorderColor = "#f0c674"
myAddKeys =
[ ("M-S-r", spawn "xmonad --recompile && xmonad --restart && notify-send 'Xmonad restarted'"),
("M-h", sendMessage Shrink), -- Shrink master area
("M-l", sendMessage Expand), -- Expand master area
("M-,", sendMessage (IncMasterN 1)), -- Increment the number of windows in the master area
("M-.", sendMessage (IncMasterN (-1))), -- Deincrement the number of windows in the master area
-- ("M-t", withFocused $ windows . W.sink), -- Push window back into tiling
("M-x", kill),
("M-q", kill),
("M-C-j", sendMessage $ JumpToLayout "TiledBottom"),
("M-C-k", sendMessage $ JumpToLayout "TiledTop"),
("M-C-h", sendMessage $ JumpToLayout "TiledLeft"),
("M-C-l", sendMessage $ JumpToLayout "TiledRight"),
("M-f", sendMessage $ T.Toggle "Full"),
-- ("M-S-<Space>", setLayout $ XMonad.layoutHook conf), -- Reset the layouts on the current workspace to default
("M-n", refresh), -- Resize viewed windows to the correct size
("M-<Tab>", windows W.focusDown), -- Move focus to the next window
("M-j", windows W.focusDown), -- Move focus to the next window
("M-k", windows W.focusUp), -- Move focus to the previous window
("M-m", windows W.focusMaster), -- Move focus to the master window
-- Swap the focused window and the master window
-- ((modm, xK_Return), windows W.swapMaster),
("M-S-j", windows W.swapDown), -- Swap the focused window with the next window
("M-S-k", windows W.swapUp), -- Swap the focused window with the previous window
("M-S-e", spawn "~/.xmonad/scripts/dzen_exit_menu.pl"),
-- My keybound programs
("M-d", spawn "rofi -show run #dmenu_recency -i"),
("M-<Return>", spawn myTerminal),
("M-b", spawn "firefox"),
("M-t", spawn "krusader"),
("M-u", spawn "pamac-manager"),
("M-c", spawn "qalculate-gtk"),
("<XF86AudioMute>", spawn "amixer set Master toggle"),
("<XF86AudioLowerVolume>", spawn "amixer set Master 10%- unmute"),
("<XF86AudioRaiseVolume>", spawn "amixer set Master 10%+ unmute")
]
-- Switch to workspace
++ [ ("M-" ++ key, windows $ W.greedyView workspace)
| (key, workspace) <- zip myWorkspaceKeys myWorkspaces
]
-- Move window to workspace and follow
++ [ ( "M-S-" ++ key,
do
windows $ W.shift workspace
windows $
W.greedyView workspace
)
| (key, workspace) <- zip myWorkspaceKeys myWorkspaces
]
-- Move window to workspace
++ [ ("M-C-" ++ key, windows $ W.shift workspace)
| (key, workspace) <- zip myWorkspaceKeys myWorkspaces
]
myKeys conf@(XConfig {XMonad.modMask = modm}) =
M.fromList $
[ -- Reset the layouts on the current workspace to default
((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf),
-- Quit xmonad
((modm .|. shiftMask, xK_q), io exitSuccess)
]
myMouseBindings (XConfig {XMonad.modMask = modm}) =
M.fromList
-- mod-button1, Set the window to floating mode and move by dragging
[ ( (modm, button1),
\w ->
focus w >> mouseMoveWindow w
>> windows W.shiftMaster
),
-- mod-button2, Raise the window to the top of the stack
((modm, button2), \w -> focus w >> windows W.shiftMaster),
-- mod-button3, Set the window to floating mode and resize by dragging
( (modm, button3),
\w ->
focus w >> mouseResizeWindow w
>> windows W.shiftMaster
)
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
myLayouts = T.toggleLayouts Full $ tiledRight ||| tiledBottom ||| tiledLeft ||| tiledTop ||| Full
where
tiledRight = renamed [Replace "TiledRight"] $ Tall nmaster delta ratio
tiledBottom = renamed [Replace "TiledBottom"] $ Mirror $ Tall nmaster delta ratio
tiledLeft = renamed [Replace "TiledLeft"] $ reflectHoriz $ Tall nmaster delta ratio
tiledTop = renamed [Replace "TiledTop"] $ Mirror $ reflectHoriz $ Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1 / 2
-- Percent of screen to increment by when resizing panes
delta = 3 / 100
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
myManageHook =
composeAll
[ className =? "Qalculate-gtk" --> doCenterFloat,
resource =? "desktop_window" --> doIgnore,
resource =? "kdesktop" --> doIgnore,
className =? "firefox" <&&> title =? "Mozilla Firefox" --> doShift "1" <+> doF (W.greedyView "1"),
className =? "TelegramDesktop" --> doShift "9",
className =? "Signal" --> doShift "9",
className =? "Rocket.Chat" --> doShift "9",
className =? "Element" --> doShift "9",
className =? "Thunderbird" --> doShift "10",
className =? "zoom" --> doShift "5"
-- isFullscreen --> doFullFloat
]
myStartupHook = do
spawn "~/.config/polybar/startup.sh"
spawnOnce "picom"
spawnOnce "nm-applet"
spawnOnce "blueman-applet"
spawnOnce "xfce4-power-manager"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
spawnOnce "start-pulseaudio-x11"
spawnOnce "feh --bg-fill ~/Bilder/background.jpg"
spawnOnce "/usr/lib/xfce4/notifyd/xfce4-notifyd"
spawnOnce "jgmenu --at-pointer --hide-on-startup"
-- Very important return()!!!
return () >> checkKeymap myConfig myAddKeys
main =
xmonad $
ewmhFullscreen $ ewmh $ docks myConfig
myConfig =
def
{ terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = smartBorders $ avoidStruts $ smartSpacingWithEdge 2 $ myLayouts,
manageHook = insertPosition Below Newer <+> myManageHook,
-- handleEventHook =
-- logHook =
startupHook = myStartupHook
}
`additionalKeysP` myAddKeys
-- Local Variables:
-- lsp-lens-enable: nil
-- End:

BIN
non-nix/xmonad/xmonad.o Normal file

Binary file not shown.

144
non-nix/zsh/.zshrc Normal file
View File

@ -0,0 +1,144 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# $PATH is adapted in ~/.profile
[ -f "~/.ghcup/env" ] && source "~/.ghcup/env" # ghcup-env
PERL5LIB="~/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="~/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"~/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=~/perl5"; export PERL_MM_OPT;
export ANDROID_HOME="$HOME/Android/Sdk"
export TERMINAL="alacritty"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="robbyrussell"
# ZSH_THEME="random"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
z
web-search
dirhistory
# colored-man-pages
# zsh-interactive-cd
# jsontools
# make it behave like fish
zsh-autosuggestions
history-substring-search
zsh-syntax-highlighting
)
export EDITOR=/usr/bin/nvim
export VISUAL=/usr/bin/nvim
alias vim="nvim"
alias ls="ls --color"
alias grep="grep --color"
alias la="ls -Alh --color"
alias g="git status"
alias bat="bat --paging=never"
# alias emacs="emacsclient -c -a emacs"
mkcd ()
{
mkdir -p -- "$1" && cd -P -- "$1"
}
follow_du () {
/usr/local/bin/follow_du "$@"
cd $(cat /tmp/follow_du_workdir)
}
notify(){
start=$(date +%s)
"$@"
exit_code="$?"
message="Command \"$(echo $@)\" finished with exit code $exit_code after $(($(date +%s) - start)) seconds"
gotify push -q $message
notify-send $message
}
source $ZSH/oh-my-zsh.sh
if type starship &> /dev/null; then
eval "$(starship init zsh)"
fi
if type direnv &> /dev/null; then
eval "$(direnv hook zsh)"
fi
BROOT_CONFIG="/home/julian/.config/broot/launcher/bash/br"
if [ -f "$BROOT_CONFIG" ]; then
source "$BROOT_CONFIG"
fi

View File

@ -0,0 +1,6 @@
#!/usr/bin/zsh
fzf-z() {
dir=$(z | fzf --tiebreak=index --tac | sed -E 's/^[0-9]+[[:space:]]+//')
cd $dir
}

View File

@ -0,0 +1,21 @@
#!/usr/bin/zsh
#
# My version of the last-working-dir plugin (https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/last-working-dir/last-working-dir.plugin.zsh)
#
# Updates the last directory once directory is changed
autoload -U add-zsh-hook
add-zsh-hook chpwd chpwd_last_working_dir
chpwd_last_working_dir() {
# Don't run in subshells
[[ "$ZSH_SUBSHELL" -eq 0 ]] || return 0
pwd > ~/.last-working-dir
}
# Changes directory to the last working directory
lwd() {
if [[ -r ~/.last-working-dir ]]; then
lwd=$(cat ~/.last-working-dir)
cd $lwd
echo $lwd
fi
}