removed files no longer necessary
@@ -1,69 +0,0 @@
|
||||
[colors.bright]
|
||||
black = "#928374"
|
||||
blue = "#83a598"
|
||||
cyan = "#8ec07c"
|
||||
green = "#b8bb26"
|
||||
magenta = "#d3869b"
|
||||
red = "#fb4934"
|
||||
white = "#ebdbb2"
|
||||
yellow = "#fabd2f"
|
||||
|
||||
[colors.cursor]
|
||||
cursor = "CellForeground"
|
||||
text = "CellBackground"
|
||||
|
||||
[colors.dim]
|
||||
black = "#32302f"
|
||||
blue = "#076678"
|
||||
cyan = "#427b58"
|
||||
green = "#79740e"
|
||||
magenta = "#8f3f71"
|
||||
red = "#9d0006"
|
||||
white = "#928374"
|
||||
yellow = "#b57614"
|
||||
|
||||
[colors.normal]
|
||||
black = "#282828"
|
||||
blue = "#458588"
|
||||
cyan = "#689d6a"
|
||||
green = "#98971a"
|
||||
magenta = "#b16286"
|
||||
red = "#cc241d"
|
||||
white = "#a89984"
|
||||
yellow = "#d79921"
|
||||
|
||||
[colors.primary]
|
||||
background = "#282828"
|
||||
bright_foreground = "#f9f5d7"
|
||||
dim_foreground = "#f2e5bc"
|
||||
foreground = "#fbf1c7"
|
||||
|
||||
[colors.selection]
|
||||
background = "CellForeground"
|
||||
text = "CellBackground"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
cursor = "CellForeground"
|
||||
text = "CellBackground"
|
||||
|
||||
[font]
|
||||
size = 9
|
||||
|
||||
[font.bold]
|
||||
family = "UbuntuMonoNerdFont"
|
||||
style = "Bold"
|
||||
|
||||
[font.bold_italic]
|
||||
family = "UbuntuMonoNerdFont"
|
||||
style = "Bold Italic"
|
||||
|
||||
[font.italic]
|
||||
family = "UbuntuMonoNerdFont"
|
||||
style = "Italic"
|
||||
|
||||
[font.normal]
|
||||
family = "UbuntuMonoNerdFont"
|
||||
style = "Regular"
|
||||
|
||||
[window]
|
||||
opacity = 1.0
|
||||
@@ -1,5 +0,0 @@
|
||||
auto_activate_base: false
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
channel_priority: strict
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
cd /home/$USER/.dotfiles
|
||||
#backup os packages
|
||||
pikaur -Qqe > pkglist.txt
|
||||
#backup vs code extensions
|
||||
code --list-extensions > code-extensions.txt
|
||||
#backup pip modules
|
||||
pip freeze > pip-modules.txt
|
||||
@@ -1,26 +0,0 @@
|
||||
aaron-bond.better-comments
|
||||
christian-kohler.path-intellisense
|
||||
CoenraadS.bracket-pair-colorizer-2
|
||||
esbenp.prettier-vscode
|
||||
GitLab.gitlab-workflow
|
||||
Gruntfuggly.todo-tree
|
||||
hbenl.test-adapter-converter
|
||||
hbenl.vscode-test-explorer
|
||||
matt-rudge.auto-open-preview-panel
|
||||
mhutchie.git-graph
|
||||
ms-azuretools.vscode-docker
|
||||
MS-CEINTL.vscode-language-pack-de
|
||||
ms-python.python
|
||||
ms-toolsai.jupyter
|
||||
ms-toolsai.jupyter-keymap
|
||||
ms-toolsai.jupyter-renderers
|
||||
ms-toolsai.vscode-jupyter-cell-tags
|
||||
ms-toolsai.vscode-jupyter-slideshow
|
||||
ms-vscode.cmake-tools
|
||||
ms-vscode.makefile-tools
|
||||
redhat.vscode-yaml
|
||||
streetsidesoftware.code-spell-checker
|
||||
twxs.cmake
|
||||
usernamehw.errorlens
|
||||
vscodevim.vim
|
||||
yzhang.markdown-all-in-one
|
||||
@@ -1 +0,0 @@
|
||||
Œ
|
||||
@@ -1,619 +0,0 @@
|
||||
:DOC-CONFIG:
|
||||
# tangle to config.el
|
||||
#+property: header-args:emacs-lisp :tangle config.el
|
||||
#+property: header-args: mkdirp yes :comments no
|
||||
#+startup: fold
|
||||
:END:
|
||||
|
||||
#+TITLE: PWL Doom Config
|
||||
#+AUTHOR: PWL
|
||||
#+EMAIL: paul@gve-loedige.de
|
||||
#+OPTIONS: toc:2
|
||||
|
||||
* Table of Contents :toc:
|
||||
- [[#config-file-headers][Config File Headers]]
|
||||
- [[#initel][init.el]]
|
||||
- [[#packagesel][packages.el]]
|
||||
- [[#configel][config.el]]
|
||||
- [[#doom-modules][Doom Modules]]
|
||||
- [[#general-configuration][General Configuration]]
|
||||
- [[#user-information][User Information]]
|
||||
- [[#visual-settings][Visual Settings]]
|
||||
- [[#authentication][Authentication]]
|
||||
- [[#misc][Misc]]
|
||||
- [[#multilanguage-spellcheck][Multilanguage Spellcheck]]
|
||||
- [[#latex][LaTeX]]
|
||||
- [[#set-pdf-viewer][Set PDF Viewer]]
|
||||
- [[#add-auto-compile-hook-for-tex-mode][Add auto-compile hook for TeX mode]]
|
||||
- [[#org-mode][Org Mode]]
|
||||
- [[#default-location][Default Location]]
|
||||
- [[#visual][Visual]]
|
||||
- [[#caldav-sync][CalDAV Sync]]
|
||||
- [[#org-agenda-setup][Org Agenda Setup]]
|
||||
- [[#org-roam][Org Roam]]
|
||||
- [[#org-transclusion][Org Transclusion]]
|
||||
- [[#bibliography][Bibliography]]
|
||||
- [[#python][Python]]
|
||||
- [[#set-debugger-to-debugpy][Set Debugger to debugpy]]
|
||||
- [[#cc][C/C++]]
|
||||
- [[#lsp][LSP]]
|
||||
|
||||
* Config File Headers
|
||||
We start by simply defining the standard headers used by the three files. These headers come from the initial files generated by =doom install=, and contain either some Emacs-LISP relevant indicators like =lexical-binding=, or instructions about the contents of the file.
|
||||
** init.el
|
||||
#+html: <details><summary>init.el</summary>
|
||||
#+begin_src emacs-lisp :tangle init.el
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; DO NOT EDIT THIS FILE DIRECTLY
|
||||
;; This is a file generated from a literate programing source file
|
||||
;; You should make any changes there and regenerate it from Emacs org-mode
|
||||
;; using org-babel-tangle (C-c C-v 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 "Module Index" link where you'll find
|
||||
;; a comprehensive list of Doom's modules and 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).
|
||||
#+end_src
|
||||
#+html: </details>
|
||||
|
||||
** packages.el
|
||||
#+html: <details><summary>packages.el</summary>
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; DO NOT EDIT THIS FILE DIRECTLY
|
||||
;; This is a file generated from a literate programing source file
|
||||
;; You should make any changes there and regenerate it from Emacs org-mode
|
||||
;; using org-babel-tangle (C-c C-v t)
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;;(package! some-package)
|
||||
|
||||
;; To install a package directly from a remote git repo, you must specify a
|
||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||
;; https://github.com/raxod502/straight.el#the-recipe-format
|
||||
;;(package! another-package
|
||||
;; :recipe (:host github :repo "username/repo"))
|
||||
|
||||
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
||||
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
||||
;; `:files' in the `:recipe':
|
||||
;;(package! this-package
|
||||
;; :recipe (:host github :repo "username/repo"
|
||||
;; :files ("some-file.el" "src/lisp/*.el")))
|
||||
|
||||
;; If you'd like to disable a package included with Doom, you can do so here
|
||||
;; with the `:disable' property:
|
||||
;;(package! builtin-package :disable t)
|
||||
|
||||
;; You can override the recipe of a built in package without having to specify
|
||||
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
||||
;; from Doom or MELPA/ELPA/Emacsmirror:
|
||||
;;(package! builtin-package :recipe (:nonrecursive t))
|
||||
;;(package! builtin-package-2 :recipe (:repo "myfork/package"))
|
||||
|
||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
||||
;; This is required for some packages whose default branch isn't 'master' (which
|
||||
;; our package manager can't deal with; see 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)
|
||||
#+end_src
|
||||
#+html: </details>
|
||||
|
||||
** config.el
|
||||
#+html: <details><summary>config.el</summary>
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; DO NOT EDIT THIS FILE DIRECTLY
|
||||
;; This is a file generated from a literate programing source file
|
||||
;; You should make any changes there and regenerate it from Emacs org-mode
|
||||
;; using org-babel-tangle (C-c C-v t)
|
||||
|
||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
||||
;; sync' after modifying this file!
|
||||
|
||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||
;; clients, file templates and snippets.
|
||||
;; (setq user-full-name "John Doe"
|
||||
;; user-mail-address "john@doe.com")
|
||||
|
||||
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
||||
;; are the three important ones:
|
||||
;;
|
||||
;; + `doom-font'
|
||||
;; + `doom-variable-pitch-font'
|
||||
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||
;; presentations or streaming.
|
||||
;;
|
||||
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
||||
;; font string. You generally only need these two:
|
||||
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
||||
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
||||
|
||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
;; `load-theme' function. This is the default:
|
||||
;; (setq doom-theme 'doom-one)
|
||||
|
||||
;; If you use `org' and don't want your org files in the default location below,
|
||||
;; change `org-directory'. It must be set before org loads!
|
||||
;; (setq org-directory "~/org/")
|
||||
|
||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
;; (setq display-line-numbers-type t)
|
||||
|
||||
;; 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
|
||||
;;
|
||||
;; To get information about any of these functions/macros, move the cursor over
|
||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
||||
;; This will open documentation for it, including demos of how they are used.
|
||||
;;
|
||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
#+end_src
|
||||
#+html: </details>
|
||||
|
||||
* Doom Modules
|
||||
#+begin_src emacs-lisp :tangle init.el
|
||||
(doom! :input
|
||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
;;ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
tabs ; a tab bar for Emacs
|
||||
treemacs ; a project drawer, like neotree but cooler
|
||||
unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
(spell +flyspell +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 +lsp) ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
(cc +lsp +tree-sitter) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
;;(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
(latex +fold +latexmk +lsp) ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
(org +roam2 +dragndrop +pretty +present) ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
(python +conda +lsp +pyright +pyenv +tree-sitter) ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
;;web ; the tubes
|
||||
yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
literate
|
||||
(default +bindings +smartparens))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
* General Configuration
|
||||
** User Information
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq user-full-name "Paul Lödige"
|
||||
user-mail-address "paul@gve-loedige.de")
|
||||
#+end_src
|
||||
|
||||
** Visual Settings
|
||||
*** Font
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq doom-font (font-spec :family "Ubuntu Mono" :size 16)
|
||||
doom-variable-pitch-font (font-spec :family "Ubuntu" :size 14))
|
||||
#+end_src
|
||||
|
||||
*** Theme
|
||||
I like the [[https://github.com/Greduan/emacs-theme-gruvbox][Gruvbox Theme by Eduardo Lavaque]].
|
||||
For this we first need to install the specific package
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! gruvbox-theme)
|
||||
#+end_src
|
||||
and then set it
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq doom-theme 'gruvbox-dark-hard)
|
||||
#+end_src
|
||||
|
||||
*** Line Numbering
|
||||
having used Neovim for quiet some time I got used to relative line numbering for navigation.
|
||||
Until I get used to the [[https://github.com/Greduan/emacs-theme-gruvbox][evil-snipe]] navigation I would like to keep them.
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq display-line-numbers-type 'relative)
|
||||
#+end_src
|
||||
|
||||
** Authentication
|
||||
Authentication information will be stored in a encrypted file that is part of my dotfiles
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq auth-sources
|
||||
'((:source "~/.config/doom/.authinfo.gpg")))
|
||||
#+end_src
|
||||
** Misc
|
||||
*** Set Start of Week to Monday
|
||||
#+begin_src emacs-lisp :tangle init.el
|
||||
(setq calendar-week-start-day 1)
|
||||
#+end_src
|
||||
* Multilanguage Spellcheck
|
||||
Enables use of multiple dictionaries. In my case German and English
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(with-eval-after-load "ispell"
|
||||
(setq ispell-program-name "hunspell")
|
||||
(setq ispell-dictionary "en_US,de_DE")
|
||||
(ispell-set-spellchecker-params)
|
||||
(ispell-hunspell-add-multi-dic "en_US,de_DE"))
|
||||
#+end_src
|
||||
|
||||
* LaTeX
|
||||
** Set PDF Viewer
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq +latex-viewers '(zathura))
|
||||
#+end_src
|
||||
** Add auto-compile hook for TeX mode
|
||||
Because TeX-command-run-all is an interactive command we need a helper function for the hook.
|
||||
This function could also become useful if we ever want to extend the compile command
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(defun custom-tex-compile ()
|
||||
(interactive)
|
||||
(TeX-command-run-all nil))
|
||||
|
||||
(add-hook 'TeX-mode-hook
|
||||
(lambda ()
|
||||
(add-hook 'after-save-hook #'custom-tex-compile nil t)))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
* Org Mode
|
||||
** Default Location
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(setq org-directory "~/org/")
|
||||
#+end_src
|
||||
** Visual
|
||||
*** Enable Header Numbering
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
(setq org-startup-numerated t))
|
||||
#+end_src
|
||||
*** Image Display as Default
|
||||
[[https://emacs.stackexchange.com/questions/57603/how-to-always-display-inline-images-by-default-existing-solutions-dont-seem-to#comment89772_57607][this stackexchange comment]] states that this has to be done before the [[Add "~/org" to Agenda][adding the ~/org directory to Org Agenda]]
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
(setq org-startup-with-inline-images t))
|
||||
#+end_src
|
||||
*** Enable \LaTeX preview on default
|
||||
#+begin_src emacs-lisp :tangle init.el
|
||||
(after! org
|
||||
(setq org-startup-latex-with-latex-preview t))
|
||||
#+end_src
|
||||
|
||||
** CalDAV Sync
|
||||
[[https://github.com/dengste/org-caldav][org-caldav]] provides a tool for syncing with a CalDAV server (in my case Nextcloud).
|
||||
A lot of the config is also taken from [[https://www.reddit.com/r/orgmode/comments/8rl8ep/comment/e0sb5j0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button][this]] reddit post.
|
||||
*** org-caldav installation
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! org-caldav)
|
||||
#+end_src
|
||||
*** Enable TODOs
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org-caldav
|
||||
(setq org-icalendar-include-todo 'all
|
||||
org-caldav-sync-todo t))
|
||||
#+end_src
|
||||
*** Configure Sync
|
||||
add the calendars to the org-caldav config
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org-caldav
|
||||
(setq org-caldav-url "https://cloud.ploedige.com/remote.php/dav/calendars/paul-loedige")
|
||||
(setq org-caldav-sync-direction 'org->cal)
|
||||
(setq org-caldav-calendars
|
||||
'((:calendar-id "todo" :files ("~/org/todo.org")))))
|
||||
#+end_src
|
||||
** Org Agenda Setup
|
||||
*** Progress States
|
||||
To get a more nuanced overview of my current TODOs I add more progress states.
|
||||
| | TODO | BLOCKED | IN_PROGRESS | REVIEW | TESTING | | DONE | DELEGATED | CANCELED |
|
||||
|------------+------+---------+-------------+--------+---------+---+------+-----------+----------|
|
||||
| Access Key | t | b | i | r | t | | d | | c |
|
||||
| Log Type | time | note | time | note | note | | time | note | note |
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
(setq org-todo-keywords
|
||||
'((sequence "INACTIVE(i!)" "TODO(t!)" "IN_PROGRESS(p!)" "BLOCKED(b@)" "REVIEW(r@)" "TESTING(e@)" "|" "DONE(d!)" "DELEGATED(x@)" "CANCELED(c@)"))))
|
||||
#+end_src
|
||||
Also set the percent states for [[*CalDAV Sync][CalDAV Sync]]
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org-caldav
|
||||
(setq org-caldav-todo-percent-states '((0 "INACTIVE") (1 "TODO") (2 "IN_PROGRESS") (3 "BLOCKED") (90 "REVIEW") (90 "TESTING") (100 "DONE") (100 "DELEGATED") (100 "CANCELED"))))
|
||||
#+end_src
|
||||
*** Add "~/org" to Agenda
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
(setq org-agenda-files (f-files "~/org"
|
||||
(lambda (f)
|
||||
(string= (f-ext f) "org"))
|
||||
'recursive)))
|
||||
#+end_src
|
||||
** Org Roam
|
||||
*** set base directory
|
||||
Both the org files themselves and the database should be located in the same directory to enable syncing via Nextcloud
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
(setq org-roam-directory (file-truename "~/org/org-roam"))
|
||||
(org-roam-db-autosync-mode))
|
||||
#+end_src
|
||||
*** Note Templates
|
||||
This contains all the capture templates I am using.
|
||||
Adding the "#+category: " tag improves the Org Agenda View for tasks captured in Org Roam
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org-roam
|
||||
(setq org-roam-capture-templates
|
||||
'(("d" "default" plain
|
||||
"%?"
|
||||
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}\n")
|
||||
:unnarrowed t)
|
||||
("m" "Meeting Templates")
|
||||
("mm" "Meeting Master Thesis" plain
|
||||
"* Current Progress\n\n* Open Questions\n\n* TODOs\n"
|
||||
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: Master Thesis Meeting ${title}\n#+category: Master Thesis\n")
|
||||
:unnarrowed t))))
|
||||
#+end_src
|
||||
*** Misc
|
||||
**** Follow Links on RET
|
||||
Because the normal shortcut for `org-open-at-point` is quite cumbersome I want it to just follow links when clicking the RET button
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
(setq return-follows-link t))
|
||||
#+end_src
|
||||
** Org Transclusion
|
||||
*** Installation
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! org-transclusion)
|
||||
#+end_src
|
||||
** Bibliography
|
||||
*** Enabling Zotero Links
|
||||
Following [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#opening-zotero-pdf-from-org-roam][this guide]] we enable using zotero links with the following code
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! org
|
||||
:custom
|
||||
(org-link-set-parameters "zotero" :follow
|
||||
(lambda (zpath)
|
||||
(browse-url
|
||||
(format "zotero:%s" zpath)))))
|
||||
#+end_src
|
||||
*** Citar Config
|
||||
**** Setting the Citar Bibliography
|
||||
Following the [[https://github.com/doomemacs/doomemacs/tree/master/modules/tools/biblio][Doom Emacs documentation ]]we set the citar bibliography and notes paths
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! oc
|
||||
(setq citar-bibliography '("~/org/biblio.bib"))
|
||||
(setq citar-notes-paths '("~/org/org-roam/")))
|
||||
#+end_src
|
||||
**** Citar Templates
|
||||
Following the [[https://github.com/emacs-citar/citar#configuration][citar package documentation]] we modify the note template to contain the pdf link to Zotero
|
||||
*NOTE:* This requires the a [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#opening-zotero-pdf-from-org-roam][specific Zotero Export Configuration]]
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! oc
|
||||
(setq citar-templates
|
||||
'((main . "${author editor:30%sn} ${date year issued:4} ${title:48}")
|
||||
(suffix . " ${=key= id:15} ${=type=:12} ${tags keywords:*}")
|
||||
(preview . "${author editor:%etal} (${year issued date}) ${title}, ${journal journaltitle publisher container-title collection-title}.\n")
|
||||
(note . "Notes on ${author editor:%etal}, ${title}\npdf: ${file}"))))
|
||||
#+end_src
|
||||
**** Enable Zotero Link Support
|
||||
In [[https://www.riccardopinosio.com/blog/posts/zotero_notes_article.html#citar][this tutorial]] I found the config for enabling Zotero Link Support through Citar
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! citar
|
||||
(defadvice! riccardo/citar-file-trust-zotero (oldfun &rest r)
|
||||
"Leave Zotero-generated file paths alone, especially zotero://..."
|
||||
:around '(citar-file-open citar-file--find-files-in-dirs)
|
||||
(cl-letf (((symbol-function 'file-exists-p) #'always)
|
||||
((symbol-function 'expand-file-name) (lambda (first &rest _) first)))
|
||||
(apply oldfun r)))
|
||||
|
||||
(add-to-list 'citar-file-open-functions '("pdf" . citar-file-open-external)))
|
||||
#+end_src
|
||||
|
||||
* Python
|
||||
** Set Debugger to debugpy
|
||||
as per the [[https://github.com/doomemacs/doomemacs/tree/master/modules/tools/debugger#dap-python][Doom Emacs Documentation]] it is recommended to set the debugger used for python debugging to debugpy
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! dap-mode
|
||||
(setq dap-python-debugger 'debugpy))
|
||||
#+end_src
|
||||
|
||||
* C/C++
|
||||
** LSP
|
||||
As per the [[https://github.com/doomemacs/doomemacs/tree/master/modules/lang/cc#lsp-mode-with-clangd][Doom Emacs documentation]] the LSP-mode needs to be set
|
||||
#+begin_src emacs-lisp :tangle config.el
|
||||
(after! lsp-clangd
|
||||
(setq lsp-clients-clangd-args
|
||||
'("-j=3"
|
||||
"--background-index"
|
||||
"--clang-tidy"
|
||||
"--completion-style=detailed"
|
||||
"--header-insertion=never"
|
||||
"--header-insertion-decorators=0"))
|
||||
(set-lsp-priority! 'clangd 2))
|
||||
#+end_src
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
#system upgrade
|
||||
sudo pacman -Syu
|
||||
# install pikaur
|
||||
sudo pacman -S --needed base-devel git
|
||||
cd /home/$USER/
|
||||
git clone https://aur.archlinux.org/pikaur.git
|
||||
cd /home/$USER/pikaur/
|
||||
makepkg -fsri
|
||||
#enable multilib
|
||||
sudo sed -i 's/#\[multilib\]/\[multilib\]\nInclude = \/etc\/pacman.d\/mirrorlist/' /etc/pacman.conf
|
||||
pikaur -Syu
|
||||
#install programms
|
||||
cd /home/$USER/.dotfiles/
|
||||
pikaur -S --needed --noconfirm - < pkglist.txt
|
||||
#install vs code extensions
|
||||
cd /home/$USER/.dotfiles/
|
||||
cat code-extensions.txt | while read extension || [[ -n $extension ]];
|
||||
do
|
||||
code --install-extension $extension --force
|
||||
done
|
||||
|
||||
#pip install
|
||||
cd /home/$USER/.dotfiles
|
||||
pip install -r ./pip-modules.txt
|
||||
|
||||
echo "Manually STOW the configs!"
|
||||
@@ -1,444 +0,0 @@
|
||||
#################################
|
||||
# Shadows #
|
||||
#################################
|
||||
|
||||
|
||||
# Enabled client-side shadows on windows. Note desktop windows
|
||||
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||
# unless explicitly requested using the wintypes option.
|
||||
#
|
||||
# shadow = false
|
||||
shadow = false;
|
||||
|
||||
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||
# shadow-radius = 12
|
||||
shadow-radius = 7;
|
||||
|
||||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||
# shadow-opacity = .75
|
||||
|
||||
# The left offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-x = -15
|
||||
shadow-offset-x = -7;
|
||||
|
||||
# The top offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-y = -15
|
||||
shadow-offset-y = -7;
|
||||
|
||||
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
|
||||
# you should use the *wintypes* option in your config file instead.
|
||||
#
|
||||
# no-dock-shadow = false
|
||||
|
||||
# Don't draw shadows on drag-and-drop windows. This option is deprecated,
|
||||
# you should use the *wintypes* option in your config file instead.
|
||||
#
|
||||
# no-dnd-shadow = false
|
||||
|
||||
# Red color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-red = 0
|
||||
|
||||
# Green color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-green = 0
|
||||
|
||||
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-blue = 0
|
||||
|
||||
# Do not paint shadows on shaped windows. Note shaped windows
|
||||
# here means windows setting its shape through X Shape extension.
|
||||
# Those using ARGB background is beyond our control.
|
||||
# Deprecated, use
|
||||
# shadow-exclude = 'bounding_shaped'
|
||||
# or
|
||||
# shadow-exclude = 'bounding_shaped && !rounded_corners'
|
||||
# instead.
|
||||
#
|
||||
# shadow-ignore-shaped = ''
|
||||
|
||||
# corner-radius = 5
|
||||
rounded-corners-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
]
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow.
|
||||
#
|
||||
# examples:
|
||||
# shadow-exclude = "n:e:Notification";
|
||||
#
|
||||
# shadow-exclude = []
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"name = 'Plank'",
|
||||
"name = 'Docky'",
|
||||
"name = 'Kupfer'",
|
||||
"name = 'xfce4-notifyd'",
|
||||
"name *= 'VLC'",
|
||||
"name *= 'compton'",
|
||||
"name *= 'Chromium'",
|
||||
"name *= 'Chrome'",
|
||||
"class_g = 'Firefox' && argb",
|
||||
"class_g = 'Conky'",
|
||||
"class_g = 'Kupfer'",
|
||||
"class_g = 'Synapse'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g ?= 'Cairo-dock'",
|
||||
"class_g = 'Cairo-clock'",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
"class_g ?= 'Xfce4-power-manager'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
];
|
||||
|
||||
# Add this one too for ...
|
||||
# "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
# Add this one above to the list to have no shadow in Openbox menu
|
||||
# "! name~=''",
|
||||
|
||||
# Specify a X geometry that describes the region in which shadow should not
|
||||
# be painted in, such as a dock window region. Use
|
||||
# shadow-exclude-reg = "x10+0+0"
|
||||
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
|
||||
#
|
||||
# shadow-exclude-reg = ""
|
||||
|
||||
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
|
||||
# xinerama-shadow-crop = false
|
||||
|
||||
|
||||
#################################
|
||||
# Fading #
|
||||
#################################
|
||||
|
||||
|
||||
# Fade windows in/out when opening/closing and when opacity changes,
|
||||
# unless no-fading-openclose is used.
|
||||
# fading = false
|
||||
fading = false
|
||||
|
||||
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
|
||||
# fade-in-step = 0.028
|
||||
fade-in-step = 0.03;
|
||||
|
||||
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
|
||||
# fade-out-step = 0.03
|
||||
fade-out-step = 0.03;
|
||||
|
||||
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
|
||||
# fade-delta = 10
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
# fade-exclude = []
|
||||
|
||||
# Do not fade on window open/close.
|
||||
# no-fading-openclose = false
|
||||
|
||||
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
|
||||
# no-fading-destroyed-argb = false
|
||||
|
||||
|
||||
#################################
|
||||
# Transparency / Opacity #
|
||||
#################################
|
||||
|
||||
|
||||
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||
# inactive-opacity = 1
|
||||
inactive-opacity = 1;
|
||||
|
||||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||
# frame-opacity = 1.0
|
||||
frame-opacity = 1;
|
||||
|
||||
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
|
||||
# menu-opacity = 1.0
|
||||
|
||||
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
|
||||
# inactive-opacity-override = true
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
|
||||
# active-opacity = 1.0
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
|
||||
# inactive-dim = 0.0
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
# focus-exclude = []
|
||||
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||
|
||||
# Use fixed inactive dim value, instead of adjusting according to window opacity.
|
||||
# inactive-dim-fixed = 1.0
|
||||
|
||||
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
|
||||
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
|
||||
# Note we don't make any guarantee about possible conflicts with other
|
||||
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
|
||||
# example:
|
||||
# opacity-rule = [ "80:class_g = 'URxvt'" ];
|
||||
#
|
||||
opacity-rule = [ "80:class_g = 'Alacritty'" ]
|
||||
|
||||
|
||||
#################################
|
||||
# Background-Blurring #
|
||||
#################################
|
||||
|
||||
|
||||
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||
# blur-method =
|
||||
# blur-size = 12
|
||||
#
|
||||
# blur-deviation = false
|
||||
|
||||
# Blur background of semi-transparent / ARGB windows.
|
||||
# Bad in performance, with driver-dependent behavior.
|
||||
# The name of the switch may change without prior notifications.
|
||||
#
|
||||
# blur-background = false
|
||||
|
||||
# Blur background of windows when the window frame is not opaque.
|
||||
# Implies:
|
||||
# blur-background
|
||||
# Bad in performance, with driver-dependent behavior. The name may change.
|
||||
#
|
||||
# blur-background-frame = false
|
||||
|
||||
|
||||
# Use fixed blur strength rather than adjusting according to window opacity.
|
||||
# blur-background-fixed = false
|
||||
|
||||
|
||||
# Specify the blur convolution kernel, with the following format:
|
||||
# example:
|
||||
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||
#
|
||||
# blur-kern = ''
|
||||
blur-kern = "3x3box";
|
||||
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
#################################
|
||||
# General Settings #
|
||||
#################################
|
||||
|
||||
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||
# daemon = false
|
||||
|
||||
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||
# `xrender` is the default one.
|
||||
#
|
||||
# backend = "glx"
|
||||
# backend = "xr_glx_hybrid"
|
||||
backend = "xrender";
|
||||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
vsyc = true
|
||||
|
||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
# dbus = false
|
||||
|
||||
# Try to detect WM windows (a non-override-redirect window with no
|
||||
# child that has 'WM_STATE') and mark them as active.
|
||||
#
|
||||
# mark-wmwin-focused = false
|
||||
mark-wmwin-focused = true;
|
||||
|
||||
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||
# mark-ovredir-focused = false
|
||||
mark-ovredir-focused = true;
|
||||
|
||||
# Try to detect windows with rounded corners and don't consider them
|
||||
# shaped windows. The accuracy is not very high, unfortunately.
|
||||
#
|
||||
# detect-rounded-corners = false
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
||||
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
||||
#
|
||||
# detect-client-opacity = false
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
|
||||
# boost performance. This should not be used with
|
||||
# vsync drm/opengl/opengl-oml
|
||||
# as they essentially does sw-opti's job already,
|
||||
# unless you wish to specify a lower refresh rate than the actual value.
|
||||
#
|
||||
# sw-opti =
|
||||
|
||||
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
|
||||
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
|
||||
# provided that the WM supports it.
|
||||
#
|
||||
# use-ewmh-active-win = false
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected,
|
||||
# to maximize performance for full-screen windows. Known to cause flickering
|
||||
# when redirecting/unredirecting windows.
|
||||
#
|
||||
# unredir-if-possible = false
|
||||
|
||||
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
|
||||
# unredir-if-possible-delay = 0
|
||||
|
||||
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||
# unredir-if-possible-exclude = []
|
||||
|
||||
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||
# in the same group focused at the same time.
|
||||
#
|
||||
# detect-transient = false
|
||||
detect-transient = true
|
||||
|
||||
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
|
||||
# detect-transient is enabled, too.
|
||||
#
|
||||
# detect-client-leader = false
|
||||
detect-client-leader = true
|
||||
|
||||
# Resize damaged region by a specific number of pixels.
|
||||
# A positive value enlarges it while a negative one shrinks it.
|
||||
# If the value is positive, those additional pixels will not be actually painted
|
||||
# to screen, only used in blur calculation, and such. (Due to technical limitations,
|
||||
# with use-damage, those pixels will still be incorrectly painted to screen.)
|
||||
# Primarily used to fix the line corruption issues of blur,
|
||||
# in which case you should use the blur radius value here
|
||||
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
|
||||
# with a 5x5 one you use `--resize-damage 2`, and so on).
|
||||
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
|
||||
#
|
||||
# resize-damage = 1
|
||||
|
||||
# Specify a list of conditions of windows that should be painted with inverted color.
|
||||
# Resource-hogging, and is not well tested.
|
||||
#
|
||||
# invert-color-include = []
|
||||
|
||||
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
|
||||
# Might cause incorrect opacity when rendering transparent content (but never
|
||||
# practically happened) and may not work with blur-background.
|
||||
# My tests show a 15% performance boost. Recommended.
|
||||
#
|
||||
# glx-no-stencil = false
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes,
|
||||
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||
# Recommended if it works.
|
||||
#
|
||||
# glx-no-rebind-pixmap = false
|
||||
|
||||
# Disable the use of damage information.
|
||||
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||
# The opposing option is use-damage
|
||||
#
|
||||
# no-use-damage = false
|
||||
use-damage = true
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||
# with GLX backend for some users.
|
||||
#
|
||||
# xrender-sync-fence = false
|
||||
|
||||
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||
# in the source tree for examples.
|
||||
#
|
||||
# glx-fshader-win = ''
|
||||
|
||||
# Force all windows to be painted with blending. Useful if you
|
||||
# have a glx-fshader-win that could turn opaque pixels transparent.
|
||||
#
|
||||
# force-win-blend = false
|
||||
|
||||
# Do not use EWMH to detect fullscreen windows.
|
||||
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||
#
|
||||
# no-ewmh-fullscreen = false
|
||||
|
||||
# Dimming bright windows so their brightness doesn't exceed this set value.
|
||||
# Brightness of a window is estimated by averaging all pixels in the window,
|
||||
# so this could comes with a performance hit.
|
||||
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
|
||||
#
|
||||
# max-brightness = 1.0
|
||||
|
||||
# Make transparent windows clip other windows like non-transparent windows do,
|
||||
# instead of blending on top of them.
|
||||
#
|
||||
# transparent-clipping = false
|
||||
|
||||
# Set the log level. Possible values are:
|
||||
# "trace", "debug", "info", "warn", "error"
|
||||
# in increasing level of importance. Case doesn't matter.
|
||||
# If using the "TRACE" log level, it's better to log into a file
|
||||
# using *--log-file*, since it can generate a huge stream of logs.
|
||||
#
|
||||
# log-level = "debug"
|
||||
log-level = "warn";
|
||||
|
||||
# Set the log file.
|
||||
# If *--log-file* is never specified, logs will be written to stderr.
|
||||
# Otherwise, logs will to written to the given file, though some of the early
|
||||
# logs might still be written to the stderr.
|
||||
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||
#
|
||||
# log-file = '~/.config/compton.log'
|
||||
|
||||
# Show all X errors (for debugging)
|
||||
# show-all-xerrors = false
|
||||
|
||||
# Write process ID to a file.
|
||||
# write-pid-path = '/path/to/your/log/file'
|
||||
|
||||
# Window type settings
|
||||
#
|
||||
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||
# "tooltip", "notification", "combo", and "dnd".
|
||||
#
|
||||
# Following per window-type options are available: ::
|
||||
#
|
||||
# fade, shadow:::
|
||||
# Controls window-type-specific shadow and fade settings.
|
||||
#
|
||||
# opacity:::
|
||||
# Controls default opacity of the window type.
|
||||
#
|
||||
# focus:::
|
||||
# Controls whether the window of this type is to be always considered focused.
|
||||
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||
#
|
||||
# full-shadow:::
|
||||
# Controls whether shadow is drawn under the parts of the window that you
|
||||
# normally won't be able to see. Useful when the window has parts of it
|
||||
# transparent, and you want shadows in those areas.
|
||||
#
|
||||
# redir-ignore:::
|
||||
# Controls whether this type of windows should cause screen to become
|
||||
# redirected again after been unredirected. If you have unredir-if-possible
|
||||
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||
# you can set this to `true`.
|
||||
#
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; };
|
||||
dock = { shadow = false; }
|
||||
dnd = { shadow = false; }
|
||||
popup_menu = { opacity = 0.9; }
|
||||
dropdown_menu = { opacity = 0.9; }
|
||||
};
|
||||
@@ -1,192 +0,0 @@
|
||||
aiohttp==3.8.4
|
||||
aiohttp-socks==0.8.0
|
||||
aiorpcX==0.22.1
|
||||
aiosignal==1.3.1
|
||||
anki==2.1.65
|
||||
apipkg==3.0.1
|
||||
aqt==2.1.65
|
||||
arandr==0.1.11
|
||||
argh==0.28.1
|
||||
async-timeout==4.0.2
|
||||
attrs==22.2.0
|
||||
autocommand==2.2.2
|
||||
Beaker==1.12.0
|
||||
beautifulsoup4==4.12.2
|
||||
bitstring==3.1.9
|
||||
borgbackup==1.2.4
|
||||
Brlapi==0.8.4
|
||||
bsddb3==6.2.9
|
||||
btrfsutil==6.3.2
|
||||
CacheControl==0.13.1
|
||||
cairocffi==1.5.0
|
||||
certifi==2023.7.22
|
||||
cffi==1.15.1
|
||||
chardet==5.1.0
|
||||
charset-normalizer==3.2.0
|
||||
click==8.1.6
|
||||
colorama==0.4.6
|
||||
commonmark==0.9.1
|
||||
contextlib2==21.6.0
|
||||
contourpy==1.1.0
|
||||
cryptography==41.0.2
|
||||
cssselect==1.2.0
|
||||
cupshelpers==1.0
|
||||
cycler==0.11.0
|
||||
Cython==3.0.0
|
||||
dbus-python==1.3.2
|
||||
decorator==5.1.1
|
||||
deprecation==2.1.0
|
||||
distlib==0.3.6
|
||||
distro==1.8.0
|
||||
dnspython==2.3.0
|
||||
docopt==0.6.2
|
||||
docutils==0.20.1
|
||||
ecdsa==0.18.0
|
||||
Electrum==4.4.5
|
||||
entrypoints==0.4
|
||||
evdev==1.6.1
|
||||
exceptiongroup==1.1.2
|
||||
fastjsonschema==2.18.0
|
||||
filelock==3.12.0
|
||||
Flask==2.2.5
|
||||
Flask-Cors==4.0.0
|
||||
fonttools==4.41.1
|
||||
frozenlist==1.3.3
|
||||
future==0.18.3
|
||||
GDAL==3.7.0
|
||||
gitdb==4.0.10
|
||||
GitPython==3.1.32
|
||||
gramps==5.1.6
|
||||
greenlet==2.0.2
|
||||
gscreenshot==3.4.1
|
||||
html5lib==1.1
|
||||
humanfriendly==10.0
|
||||
idna==3.4
|
||||
img2pdf==0.4.4
|
||||
importlib-resources==6.0.0
|
||||
inflect==7.0.0
|
||||
iniconfig==2.0.0
|
||||
itsdangerous==2.1.2
|
||||
jaraco.context==4.3.0
|
||||
jaraco.functools==3.8.0
|
||||
jaraco.text==3.11.1
|
||||
Jinja2==3.1.2
|
||||
jsonrpclib-pelix==0.4.3.2
|
||||
jsonschema==4.18.3
|
||||
jsonschema-specifications==2023.6.1
|
||||
keyutils==0.6
|
||||
kiwisolver==1.4.4
|
||||
lensfun==0.3.4
|
||||
libfdt==1.7.0
|
||||
lightdm-gtk-greeter-settings==1.2.2
|
||||
louis==3.26.0
|
||||
lxml==4.9.2
|
||||
Mako==1.2.4
|
||||
Markdown==3.4.4
|
||||
markdown-it-py==2.2.0
|
||||
MarkupSafe==2.1.3
|
||||
matplotlib==3.7.2
|
||||
mdurl==0.1.2
|
||||
moddb==0.8.1
|
||||
more-itertools==9.1.0
|
||||
msgpack==1.0.5
|
||||
multidict==6.0.4
|
||||
natsort==8.4.0
|
||||
netsnmp-python==1.0a1
|
||||
nftables==0.1
|
||||
nspektr==0.4.0
|
||||
numpy==1.25.1
|
||||
ocrmypdf==14.3.0
|
||||
ordered-set==4.1.0
|
||||
orjson==3.9.2
|
||||
OWSLib==0.29.1
|
||||
packaging==23.1
|
||||
pathtools==0.1.2
|
||||
pbkdf2==1.3
|
||||
pdfminer.six==20221105
|
||||
pikaur==1.17
|
||||
pikepdf==8.2.1
|
||||
Pillow==10.0.0
|
||||
Pivy==0.6.8
|
||||
platformdirs==3.9.1
|
||||
pluggy==1.0.0
|
||||
ply==3.11
|
||||
powerline-shell==0.7.0
|
||||
progress==1.6
|
||||
protobuf==4.23.4
|
||||
psutil==5.9.5
|
||||
psycopg2==2.9.6
|
||||
pwquality==1.4.5
|
||||
py==1.11.1.dev0+g447bac51.d20230407
|
||||
pyaes==1.6.1
|
||||
pyalpm==0.10.6
|
||||
pycairo==1.23.0
|
||||
pycparser==2.21
|
||||
pycryptodomex==3.12.0
|
||||
pycups==2.0.1
|
||||
pycurl==7.45.2
|
||||
pydantic==1.10.9
|
||||
Pygments==2.15.1
|
||||
PyGObject==3.44.1
|
||||
pympress==1.8.3
|
||||
pynvim==0.4.3
|
||||
pyOpenSSL==23.2.0
|
||||
pyparsing==3.0.9
|
||||
pypng==0.0.21
|
||||
pyproj==3.6.0
|
||||
PyQt5==5.15.9
|
||||
PyQt5-sip==12.12.2
|
||||
PyQt6==6.5.2
|
||||
PyQt6-sip==13.5.2
|
||||
PyQt6-WebEngine==6.5.0
|
||||
pyrate-limiter==2.10.0
|
||||
pyrsistent==0.19.3
|
||||
PySide2==5.15.10
|
||||
PySocks==1.7.1
|
||||
pytest==7.4.0
|
||||
python-dateutil==2.8.2
|
||||
python-socks==2.3.0
|
||||
python-vlc==3.0.18122
|
||||
pytz==2023.3
|
||||
pyxdg==0.28
|
||||
PyYAML==6.0.1
|
||||
qrcode==7.4.2
|
||||
QScintilla==2.14.1
|
||||
qtile==0.22.1
|
||||
referencing==0.29.1
|
||||
reportlab==3.6.12
|
||||
requests==2.28.2
|
||||
resolvelib==1.0.1
|
||||
retrying==1.3.3
|
||||
rich==13.4.2
|
||||
rpds-py==0.8.8
|
||||
Send2Trash==1.8.2
|
||||
setproctitle==1.3.2
|
||||
shiboken2==5.15.10
|
||||
six==1.16.0
|
||||
smmap==5.0.0
|
||||
soupsieve==2.4.1
|
||||
TBB==0.2
|
||||
tenacity==8.2.3.dev0+g548c5d4.d20230423
|
||||
termcolor==2.3.0
|
||||
toml==0.10.2
|
||||
tomli==2.0.1
|
||||
toolz==0.12.0
|
||||
tqdm==4.65.0
|
||||
trove-classifiers==2023.7.8
|
||||
typing_extensions==4.7.1
|
||||
uc-micro-py==1.0.2
|
||||
udiskie==2.4.2
|
||||
urllib3==1.26.15
|
||||
validate-pyproject==0.13.post1.dev0+gb752273.d20230520
|
||||
waitress==2.1.2
|
||||
watchdog==2.3.0
|
||||
webencodings==0.5.1
|
||||
websocket-client==1.6.1
|
||||
Werkzeug==2.3.2
|
||||
woeusb-ng==0.2.12
|
||||
wxPython==4.2.1
|
||||
xcffib==1.2.0
|
||||
yarl==1.9.2
|
||||
yt-dlp==2023.7.6
|
||||
zipp==3.16.0
|
||||
@@ -1,44 +0,0 @@
|
||||
from libqtile import widget, bar
|
||||
|
||||
from defines import base_color, blue_color
|
||||
from defines import ChassisType, chassis_type
|
||||
from Widgets import Left_widgets, volume_widget, System_widgets, end_widgets
|
||||
|
||||
widget_defaults = dict(
|
||||
background=base_color,
|
||||
font='UbuntuMono Nerd Font',
|
||||
fontsize=18,
|
||||
padding=1 if chassis_type == ChassisType.LAPTOP else 5,
|
||||
)
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
main_bar_fontsize=22
|
||||
main_bar_height=24 if chassis_type == ChassisType.LAPTOP else 28
|
||||
secondary_bar_height=24
|
||||
secondary_bar_fontsize=18
|
||||
|
||||
main_bar = bar.Bar([
|
||||
*Left_widgets(main_bar_height,main_bar_fontsize,True),
|
||||
widget.Systray(fontsize=main_bar_fontsize),
|
||||
*volume_widget(base_color,blue_color,main_bar_height,main_bar_fontsize),
|
||||
*System_widgets(blue_color,blue_color,main_bar_height,main_bar_fontsize),
|
||||
*end_widgets(blue_color,main_bar_height,main_bar_fontsize),
|
||||
],main_bar_height)
|
||||
|
||||
left_bar = bar.Bar([
|
||||
*Left_widgets(secondary_bar_height,secondary_bar_fontsize),
|
||||
*volume_widget(base_color,blue_color,secondary_bar_height,secondary_bar_fontsize),
|
||||
*end_widgets(blue_color,secondary_bar_height,secondary_bar_fontsize)
|
||||
],secondary_bar_height)
|
||||
|
||||
secondary_bar = bar.Bar([
|
||||
*Left_widgets(secondary_bar_height,secondary_bar_fontsize),
|
||||
*volume_widget(base_color,blue_color,secondary_bar_height,secondary_bar_fontsize),
|
||||
*end_widgets(blue_color,secondary_bar_height,secondary_bar_fontsize)
|
||||
],secondary_bar_height)
|
||||
|
||||
top_bar = bar.Bar([
|
||||
*Left_widgets(secondary_bar_height,secondary_bar_fontsize),
|
||||
*volume_widget(base_color,blue_color,secondary_bar_height,secondary_bar_fontsize),
|
||||
*end_widgets(blue_color,secondary_bar_height,secondary_bar_fontsize)
|
||||
],secondary_bar_height)
|
||||
@@ -1,147 +0,0 @@
|
||||
import subprocess
|
||||
import psutil
|
||||
import re
|
||||
import os
|
||||
|
||||
from libqtile import widget, bar
|
||||
|
||||
#region Custom_Memory
|
||||
class MemoryC(widget.base.ThreadPoolText):
|
||||
orientations = widget.base.ORIENTATION_HORIZONTAL
|
||||
defaults = [
|
||||
("format", "{MemUsed}GB/{MemTotal}GB", "Formatting for field names."),
|
||||
("update_interval", 1.0, "Update interval for the Memory"),
|
||||
]
|
||||
|
||||
def __init__(self, **config):
|
||||
super().__init__("", **config)
|
||||
self.add_defaults(MemoryC.defaults)
|
||||
|
||||
def poll(self):
|
||||
mem = psutil.virtual_memory()
|
||||
swap = psutil.swap_memory()
|
||||
val = {}
|
||||
val["MemUsed"] = mem.used // 1024 // 1024 // 102.4 / 10
|
||||
val["MemTotal"] = mem.total // 1024 // 1024 // 102.4 / 10
|
||||
val["MemPercent"] = mem.percent
|
||||
val["MemFree"] = mem.free // 1024 // 1024 // 102.4 / 10
|
||||
val["Buffers"] = mem.buffers // 1024 // 1024 // 102.4 / 10
|
||||
val["Active"] = mem.active // 1024 // 1024 // 102.4 / 10
|
||||
val["Inactive"] = mem.inactive // 1024 // 1024 // 102.4 / 10
|
||||
val["Shmem"] = mem.shared // 1024 // 1024 // 102.4 / 10
|
||||
val["SwapTotal"] = swap.total // 1024 // 1024 // 102.4 / 10
|
||||
val["Swapfree"] = swap.free // 1024 // 1024 // 102.4 / 10
|
||||
val["SwapUsed"] = swap.used // 1024 // 1024 // 102.4 / 10
|
||||
val["SwapPercent"] = swap.percent
|
||||
return self.format.format(**val)
|
||||
#endregion
|
||||
|
||||
#region Microphone_Widget
|
||||
re_vol = re.compile(r'\[(\d?\d?\d?)%\]')
|
||||
BUTTON_MUTE = 1
|
||||
class Mic(widget.base._TextBox):
|
||||
"""
|
||||
Custom Microphone widget
|
||||
"""
|
||||
orientations = widget.base.ORIENTATION_HORIZONTAL
|
||||
defaults = [
|
||||
("cardid", None, "Card Id"),
|
||||
("device", "default", "Device Name"),
|
||||
("channel", "Capture", "Channel"),
|
||||
("padding", 3, "Padding left and right. Calculated if None."),
|
||||
("update_interval", 0.2, "Update time in seconds."),
|
||||
("theme_path", None, "Path of the icons"),
|
||||
("emoji", False, "Use emoji to display volume states, only if ``theme_path`` is not set."
|
||||
"The specified font needs to contain the correct unicode characters."),
|
||||
("mute_command", None, "Mute command"),
|
||||
("volume_app", None, "App to control volume"),
|
||||
("volume_up_command", None, "Volume up command"),
|
||||
("volume_down_command", None, "Volume down command"),
|
||||
("get_volume_command", None, "Command to get the current volume"),
|
||||
("step", 2, "Volume change for up an down commands in percentage."
|
||||
"Only used if ``volume_up_command`` and ``volume_down_command`` are not set.")
|
||||
]
|
||||
|
||||
def __init__(self, **config):
|
||||
widget.base._TextBox.__init__(self, '0', width=bar.CALCULATED, **config)
|
||||
self.add_defaults(Mic.defaults)
|
||||
if self.theme_path:
|
||||
self.length_type = bar.STATIC
|
||||
self.length = 0
|
||||
self.surfaces = {}
|
||||
self.volume = None
|
||||
|
||||
def timer_setup(self):
|
||||
self.timeout_add(self.update_interval, self.update)
|
||||
if self.theme_path:
|
||||
self.setup_images()
|
||||
|
||||
def create_amixer_command(self, *args):
|
||||
cmd = ['amixer']
|
||||
cmd.extend([x for x in args])
|
||||
return cmd
|
||||
|
||||
def button_press(self, x, y, button):
|
||||
if button == BUTTON_MUTE:
|
||||
if self.mute_command is not None:
|
||||
subprocess.call(self.mute_command, shell=True)
|
||||
else:
|
||||
subprocess.call(self.create_amixer_command('-q',
|
||||
'sset',
|
||||
self.channel,
|
||||
'toggle'))
|
||||
self.draw()
|
||||
|
||||
def update(self):
|
||||
vol = self.get_volume()
|
||||
if vol != self.volume:
|
||||
self.volume = vol
|
||||
# Update the underlying canvas size before actually attempting
|
||||
# to figure out how big it is and draw it.
|
||||
self._update_drawer()
|
||||
self.bar.draw()
|
||||
self.timeout_add(self.update_interval, self.update)
|
||||
|
||||
def _update_drawer(self):
|
||||
if self.emoji:
|
||||
if self.volume > 0:
|
||||
self.text = ''
|
||||
elif self.volume <= 0:
|
||||
self.text = ''
|
||||
else:
|
||||
if self.volume == -1:
|
||||
self.text = 'M'
|
||||
else:
|
||||
self.text = '{}%'.format(self.volume)
|
||||
def get_volume(self):
|
||||
try:
|
||||
get_volume_cmd = self.create_amixer_command('sget',
|
||||
self.channel)
|
||||
|
||||
if self.get_volume_command:
|
||||
get_volume_cmd = self.get_volume_command
|
||||
|
||||
mixer_out = self.call_process(get_volume_cmd)
|
||||
except subprocess.CalledProcessError:
|
||||
return -1
|
||||
|
||||
if '[off]' in mixer_out:
|
||||
return -1
|
||||
|
||||
volgroups = re_vol.search(mixer_out)
|
||||
if volgroups:
|
||||
return int(volgroups.groups()[0])
|
||||
else:
|
||||
# this shouldn't happen
|
||||
return -1
|
||||
|
||||
def draw(self):
|
||||
if self.theme_path:
|
||||
self.drawer.draw(offsetx=self.offset, width=self.length)
|
||||
else:
|
||||
widget.base._TextBox.draw(self)
|
||||
|
||||
def cmd_mute(self):
|
||||
# Emulate button press.
|
||||
self.button_press(0, 0, BUTTON_MUTE)
|
||||
#endregion
|
||||
@@ -1,166 +0,0 @@
|
||||
from typing import Match
|
||||
from libqtile.config import Group, ScratchPad, DropDown, Key, Match
|
||||
from libqtile.command import lazy
|
||||
|
||||
import re
|
||||
|
||||
from defines import mod,term
|
||||
from Keys import keys
|
||||
|
||||
group_names = [(" ","Org",'o',{'layout': 'monadtall'}),
|
||||
(" ","Home", 'h',{'layout': 'monadtall'}),
|
||||
(" ","Browser", 'f',{'layout': 'monadtall'}),
|
||||
(" ","Mail", 'm',{'layout': 'monadtall', 'matches':[Match(wm_class="Mail")]}),
|
||||
(" ","Coding", 'c',{'layout': 'monadtall', 'matches' : [Match(wm_class="code")]}),
|
||||
(" ","Documents", 'l',{'layout': 'monadtall'}),
|
||||
(" ","Music", 'u',{'layout': 'monadtall', 'matches' : [Match(wm_class="spotify")]}),
|
||||
(" ","Video", 'v',{'layout': 'monadtall', 'matches' : [Match(wm_class="vlc")]}),
|
||||
(" ","VideoChat", 'z',{'layout': 'monadtall', 'matches':[Match(wm_class="discord")]}),
|
||||
("一","etc1", '1', {'layout': 'monadtall'}),
|
||||
("二","etc2", '2', {'layout': 'monadtall'}),
|
||||
("三","etc3", '3', {'layout': 'monadtall'}),
|
||||
("四","etc4", '4', {'layout': 'monadtall'})]
|
||||
|
||||
groups = [Group(icon, **kwargs) for icon, name, key, kwargs in group_names]
|
||||
|
||||
groups.append(
|
||||
ScratchPad("scratchpad",[
|
||||
DropDown(
|
||||
'ARandR',
|
||||
'arandr',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = .1,
|
||||
on_focus_lost_hide=True,
|
||||
opacity=1,
|
||||
match = Match(wm_class='arandr')
|
||||
),
|
||||
DropDown(
|
||||
"term",
|
||||
term,
|
||||
),
|
||||
DropDown(
|
||||
"htop",
|
||||
term + ' -e htop',
|
||||
),
|
||||
DropDown(
|
||||
'sound',
|
||||
'pavucontrol'
|
||||
),
|
||||
DropDown(
|
||||
'filemanager',
|
||||
'pcmanfm',
|
||||
on_focus_lost_hide=False
|
||||
),
|
||||
DropDown(
|
||||
'bitwarden',
|
||||
'bitwarden-desktop',
|
||||
on_focus_lost_hide=False,
|
||||
match = Match(wm_class='bitwarden')
|
||||
),
|
||||
DropDown(
|
||||
'WhatsApp',
|
||||
'whatsapp-nativefier',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = .1,
|
||||
on_focus_lost_hide=False,
|
||||
opacity=1
|
||||
),
|
||||
DropDown(
|
||||
'Signal',
|
||||
'signal-desktop',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = .1,
|
||||
on_focus_lost_hide=False,
|
||||
opacity = 1,
|
||||
match = Match(wm_class='signal')
|
||||
),
|
||||
DropDown(
|
||||
'Qalculate!',
|
||||
'qalculate-gtk',
|
||||
height = 0.5,
|
||||
width = 0.5,
|
||||
x = .25,
|
||||
on_focus_lost_hide=True,
|
||||
opacity = 1
|
||||
),
|
||||
DropDown(
|
||||
'Slack',
|
||||
'slack',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = 0.1,
|
||||
on_focus_lost_hide=False,
|
||||
opacity=1
|
||||
),
|
||||
DropDown(
|
||||
'Deepl',
|
||||
'surf deepl.com',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = 0.1,
|
||||
on_focus_lost_hide=True,
|
||||
opacity=1
|
||||
),
|
||||
DropDown(
|
||||
'Telegram',
|
||||
'telegram-desktop',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = 0.1,
|
||||
on_focus_lost_hide=False,
|
||||
opacity=1,
|
||||
match = Match(wm_class='telegram-desktop')
|
||||
),
|
||||
DropDown(
|
||||
'Org Agenda',
|
||||
'emacsclient -c -e \'(org-agenda-list)\'',
|
||||
height = 0.5,
|
||||
width = 0.8,
|
||||
x = 0.1,
|
||||
on_focus_lost_hide=True,
|
||||
opacity=1,
|
||||
match = Match(wm_class='emacs')
|
||||
)
|
||||
])
|
||||
)
|
||||
|
||||
for (icon,name,key, kwargs) in group_names:
|
||||
keys.extend([
|
||||
Key(["mod1","control"], str(key), lazy.group[icon].toscreen(toggle=True),
|
||||
desc="Switch to group {}".format(name)),
|
||||
|
||||
Key(['mod1','control', "shift"], str(key), lazy.window.togroup(icon),
|
||||
desc="move focused window to group {}".format(name)),
|
||||
])
|
||||
|
||||
keys.extend([
|
||||
Key([mod],'p',lazy.group['scratchpad'].dropdown_toggle('ARandR'),
|
||||
desc="open the dropdown for ARandR"),
|
||||
Key(['mod1','control'],'space',lazy.group['scratchpad'].dropdown_toggle('term'),
|
||||
desc="open the dropdown terminal"),
|
||||
Key(['control','shift'],'Escape',lazy.group['scratchpad'].dropdown_toggle('htop'),
|
||||
desc="open the dropdown terminal"),
|
||||
Key(['mod1','control'],'a',lazy.group['scratchpad'].dropdown_toggle('sound'),
|
||||
desc="open the dropdown pavucontrol"),
|
||||
Key(['mod1','control'],'e',lazy.group['scratchpad'].dropdown_toggle('filemanager'),
|
||||
desc="open the dropdown filemanager"),
|
||||
Key(['mod1','control'],'b',lazy.group['scratchpad'].dropdown_toggle('bitwarden'),
|
||||
desc="open the dropdown password manager KeePassXC"),
|
||||
Key(['mod1','control'],'w',lazy.group['scratchpad'].dropdown_toggle('WhatsApp'),
|
||||
desc="open the dropdown for WhatsApp"),
|
||||
Key(['mod1','control'],'i',lazy.group['scratchpad'].dropdown_toggle('Signal'),
|
||||
desc="open the dropdown for Signal"),
|
||||
Key(['mod1','control'],'s',lazy.group['scratchpad'].dropdown_toggle('Slack'),
|
||||
desc="open the dropdown for Slack"),
|
||||
Key(['mod1','control'],'t',lazy.group['scratchpad'].dropdown_toggle('Telegram'),
|
||||
desc="open the dropdown for Telegram"),
|
||||
Key(['mod1','control'],'q',lazy.group['scratchpad'].dropdown_toggle('Qalculate!'),
|
||||
desc="open the dropdown for Qalculate!"),
|
||||
Key(['mod1','control'],'d',lazy.group['scratchpad'].dropdown_toggle('Deepl'),
|
||||
desc="open the dropdown for Deepl"),
|
||||
Key(['mod1','control'],'k',lazy.group['scratchpad'].dropdown_toggle('Org Agenda'),
|
||||
desc="open the dropdown for Org Agenda")
|
||||
])
|
||||
@@ -1,89 +0,0 @@
|
||||
from libqtile.config import Key, Drag, Click
|
||||
from libqtile.command import lazy
|
||||
|
||||
from defines import mod, term, ChassisType, chassis_type
|
||||
|
||||
keys = [
|
||||
#screen lock & hibernation
|
||||
Key([mod], "End" , lazy.spawn('dm-tool lock'),desc="locks session"),
|
||||
Key([], "Pause" , lazy.spawn('dm-tool lock'),desc="locks session"),
|
||||
Key([], "Cancel" , lazy.spawn('systemctl hibernate'),desc="enter hibernation"),
|
||||
|
||||
|
||||
#moving focus aroung
|
||||
Key([mod], "h", lazy.layout.left(),desc="move focus left"),
|
||||
Key([mod], "l", lazy.layout.right(),desc="move focus right"),
|
||||
Key([mod], "j", lazy.layout.down(),desc="move focus down"),
|
||||
Key([mod], "k", lazy.layout.up(),desc="move focus up"),
|
||||
Key([mod,"mod1"], "k", lazy.to_screen(0),desc="move focus to top screen"),
|
||||
Key([mod,"mod1"], "j", lazy.to_screen(2),desc="move focus to main screen"),
|
||||
Key([mod,"mod1"], "l", lazy.to_screen(2),desc="move focus to main screen"),
|
||||
Key([mod,"mod1"], "h", lazy.to_screen(1),desc="move focus to left screen"),
|
||||
Key([mod,"mod1"], "n", lazy.next_screen(),desc="move focus to left screen"),
|
||||
|
||||
# moving windows around
|
||||
Key([mod, "shift"], "h", lazy.layout.swap_left(),desc="move focused window left"),
|
||||
Key([mod, "shift"], "l", lazy.layout.swap_right(),desc="move focused window right"),
|
||||
Key([mod, "shift"], "j", lazy.layout.shuffle_down(),desc="move focused window down"),
|
||||
Key([mod, "shift"], "k", lazy.layout.shuffle_up(),desc="move focused window up"),
|
||||
Key([mod, "shift", "control"], "h", lazy.layout.swap_column_left(),desc="move focused window one column to the left"),
|
||||
Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right(),desc="move focused window one column to the right"),
|
||||
|
||||
# resize windows
|
||||
Key([mod], "plus", lazy.layout.grow(),desc="increase window size"),
|
||||
Key([mod], "minus", lazy.layout.shrink(),desc="decrease window size"),
|
||||
Key([mod], "n", lazy.layout.normalize(),desc="normalize windows"),
|
||||
Key([mod], "m", lazy.layout.maximize(),desc="maximize current window"),
|
||||
Key([mod], "space", lazy.window.toggle_fullscreen(),desc="make current window fullscreen"),
|
||||
|
||||
# app hotkeys
|
||||
Key([mod],"t", lazy.spawn(term), desc="Launch terminal"),
|
||||
Key([mod],"f", lazy.spawn("firefox"),desc="Launch firefox"),
|
||||
Key([mod],"e", lazy.spawn("pcmanfm"),desc="Launch pcmanfm"),
|
||||
Key([mod],"c", lazy.spawn("code"),desc="Launch visual studio code"),
|
||||
Key([mod],"v", lazy.spawn(term + " -e nvim"),desc="Launch NeoVim"),
|
||||
Key([mod, "shift"],"s", lazy.spawn('gscreenshot -s -o -f /tmp/screenshots'),desc="take a screenshot"),
|
||||
Key([mod], "o", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Launch Emacs (Client)"),
|
||||
|
||||
# Toggle between different layouts as defined below
|
||||
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
|
||||
Key([mod], "BackSpace", lazy.window.kill(), desc="Kill focused window"),
|
||||
|
||||
# qtile hotkeys
|
||||
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
|
||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
|
||||
|
||||
#rofi
|
||||
Key([mod],'Return',lazy.spawn("rofi -show drun -show-icons -modi drun"),desc="launch rofi (drun)"),
|
||||
|
||||
# audio hotkeys
|
||||
Key([], 'XF86AudioRaiseVolume', lazy.spawn(f'pulseaudio-ctl up {5 if chassis_type == ChassisType.LAPTOP else 1}'), desc="increase speaker volume"),
|
||||
Key([], 'XF86AudioLowerVolume', lazy.spawn(f'pulseaudio-ctl down {5 if chassis_type == ChassisType.LAPTOP else 1}'), desc="decrease speaker volume"),
|
||||
Key([], 'XF86AudioMute', lazy.spawn('pulseaudio-ctl mute'), desc="toggle speaker mute"),
|
||||
Key(['control'], 'XF86AudioRaiseVolume', lazy.spawn(f'amixer set Capture {5 if chassis_type == ChassisType.LAPTOP else 1}%+'), desc="increase mic volume"),
|
||||
Key(['control'], 'XF86AudioLowerVolume', lazy.spawn(f'amixer set Capture {5 if chassis_type == ChassisType.LAPTOP else 1}%-'), desc="decrease mic volume"),
|
||||
Key(['control'], 'XF86AudioMute', lazy.spawn('amixer set Capture toggle'), desc="toggle mic mute"),
|
||||
Key([], 'XF86AudioMicMute', lazy.spawn('amixer set Capture toggle'), desc="toggle mic mute"),
|
||||
|
||||
# Media hotkeys
|
||||
Key([], 'XF86AudioNext', lazy.spawn('playerctl next')),
|
||||
Key([], 'XF86AudioPrev', lazy.spawn('playerctl previous')),
|
||||
Key([], 'XF86AudioPlay', lazy.spawn('playerctl play-pause')),
|
||||
Key([mod], 'Right', lazy.spawn('playerctl next')),
|
||||
Key([mod], 'Left', lazy.spawn('playerctl previous')),
|
||||
Key([mod], 'Down', lazy.spawn('playerctl play-pause')),
|
||||
|
||||
# backlight keys
|
||||
Key([], 'XF86MonBrightnessUp', lazy.spawn('xbacklight -inc 5')),
|
||||
Key([], 'XF86MonBrightnessDown', lazy.spawn('xbacklight -dec 5')),
|
||||
]
|
||||
|
||||
|
||||
# Drag floating layouts.
|
||||
mouse = [
|
||||
Drag([mod], "Button1", lazy.window.set_position_floating(),
|
||||
start=lazy.window.get_position()),
|
||||
Drag([mod], "Button3", lazy.window.set_size_floating(),
|
||||
start=lazy.window.get_size()),
|
||||
Click([mod], "Button2", lazy.window.bring_to_front())
|
||||
]
|
||||
@@ -1,49 +0,0 @@
|
||||
from libqtile import layout
|
||||
from libqtile.config import Match
|
||||
|
||||
from defines import focus_color, border_width, window_margin
|
||||
|
||||
layouts = [
|
||||
layout.MonadTall(
|
||||
align=1,
|
||||
border_focus = focus_color,
|
||||
border_width = border_width,
|
||||
margin=window_margin,
|
||||
new_client_position = 'after_current',
|
||||
),
|
||||
layout.Floating(
|
||||
border_focus = focus_color,
|
||||
border_width = border_width,
|
||||
margin=window_margin,
|
||||
),
|
||||
layout.Max(),
|
||||
layout.MonadWide(
|
||||
border_focus = focus_color,
|
||||
border_width = border_width,
|
||||
new_client_position = 'after_current',
|
||||
margin=window_margin,
|
||||
),
|
||||
layout.Columns(
|
||||
border_focus = focus_color,
|
||||
border_width = border_width,
|
||||
num_columns = 3,
|
||||
margin = window_margin,
|
||||
)
|
||||
]
|
||||
|
||||
floating_layout = layout.Floating(
|
||||
border_focus = focus_color,
|
||||
border_width = border_width,
|
||||
float_rules=[
|
||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||
*layout.Floating.default_float_rules,
|
||||
Match(wm_class='confirmreset'), # gitk
|
||||
Match(wm_class='makebranch'), # gitk
|
||||
Match(wm_class='maketag'), # gitk
|
||||
Match(title='branchdialog'), # gitk
|
||||
Match(title='pinentry'), # GPG key password entry
|
||||
Match(wm_class='ssh-askpass'), # ssh-askpass
|
||||
Match(wm_class='sun-awt-X11-XWindowPeer'), #matlab
|
||||
Match(wm_class='sun-awt-X11-XDialogPeer'), #matlab
|
||||
Match(wm_class='Nitrogen'),
|
||||
])
|
||||
@@ -1,33 +0,0 @@
|
||||
import subprocess
|
||||
import re
|
||||
import numpy as np
|
||||
|
||||
from libqtile.config import Screen
|
||||
|
||||
from Bars import top_bar, left_bar, main_bar, secondary_bar
|
||||
from defines import main_screen_res, top_screen_res
|
||||
|
||||
screens = []
|
||||
|
||||
|
||||
cmd = ['xrandr']
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||
resolution_string, junk = p.communicate()
|
||||
p.stdout.close()
|
||||
screen_resolutions = [np.array(screen_res.split('x')).astype(int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))]
|
||||
number_of_screens = len(screen_resolutions)
|
||||
max_width = max(screen_resolutions, key=lambda res: res[0])[0]
|
||||
defined_main_window = False
|
||||
for width, height in screen_resolutions:
|
||||
if width == main_screen_res[0] and height == main_screen_res[1]:
|
||||
screens.append(Screen(top=main_bar, wallpaper= "~/Pictures/Wallpapers/gruvbox-like.jpg", wallpaper_mode="fill"))
|
||||
defined_main_window = True
|
||||
elif width == top_screen_res[0] and height == top_screen_res[1]:
|
||||
screens.append(Screen(bottom=top_bar, wallpaper="~/Pictures/Wallpapers/wallpaperflare.com_wallpaper.jpg", wallpaper_mode="fill"))
|
||||
elif width < height:
|
||||
screens.append(Screen(top=left_bar, wallpaper="~/Pictures/Wallpapers/gruvbox-like-left.jpg", wallpaper_mode="fill"))
|
||||
elif width == max_width and not defined_main_window:
|
||||
screens.append(Screen(top=main_bar, wallpaper= "~/Pictures/Wallpapers/gruvbox-like.jpg", wallpaper_mode="fill"))
|
||||
defined_main_window = True
|
||||
else:
|
||||
screens.append(Screen(top=secondary_bar, wallpaper= "~/Pictures/Wallpapers/gruvbox-like.jpg", wallpaper_mode="fill"))
|
||||
@@ -1,209 +0,0 @@
|
||||
from libqtile import widget
|
||||
|
||||
from defines import base_color, term
|
||||
from defines import blue_color, light_foreground_color, dark_foreground_color, red_color, light_purple_color, purple_color, green_color, orange_color, magenta_color, yellow_color
|
||||
from defines import ChassisType, chassis_type
|
||||
from Custom_Widgets import MemoryC, Mic
|
||||
|
||||
#region Powerline
|
||||
def powerline_arrow(direction, color1, color2,size):
|
||||
if direction == "r":
|
||||
return [
|
||||
widget.TextBox(
|
||||
text=u"\ue0b0",
|
||||
foreground=color1,
|
||||
background=color2,
|
||||
fontsize=size,
|
||||
borderwidth=0,
|
||||
padding=0
|
||||
),
|
||||
]
|
||||
else:
|
||||
return [
|
||||
widget.TextBox(
|
||||
text=u"\ue0b2",
|
||||
foreground=color2,
|
||||
background=color1,
|
||||
fontsize=size,
|
||||
borderwidth=0,
|
||||
padding=0
|
||||
),
|
||||
]
|
||||
#endregion
|
||||
|
||||
#region Left_widgets
|
||||
def Left_widgets(size,fontsize,prompt=False):
|
||||
return [
|
||||
widget.CurrentLayoutIcon(
|
||||
scale = 0.9,
|
||||
),
|
||||
*powerline_arrow('r',base_color,blue_color,size),
|
||||
widget.TextBox(
|
||||
text=' ',
|
||||
foreground=light_foreground_color,
|
||||
fontsize=fontsize,
|
||||
background=blue_color
|
||||
),
|
||||
*powerline_arrow('r',blue_color,base_color,size),
|
||||
widget.GroupBox(
|
||||
fontsize=fontsize,
|
||||
rounded=False,
|
||||
disable_drag=True,
|
||||
active=light_foreground_color,
|
||||
inactive=dark_foreground_color,
|
||||
highlight_method='block',
|
||||
highlight_color=red_color,
|
||||
other_screen_border = light_purple_color,
|
||||
other_current_screen_border = purple_color,
|
||||
this_current_screen_border = blue_color,
|
||||
this_screen_border = blue_color,
|
||||
urgent_alert_method='block',
|
||||
urgent_border = red_color,
|
||||
),
|
||||
widget.WindowName(fontsize=fontsize-2),
|
||||
]
|
||||
#endregion
|
||||
|
||||
#region Volume_widget
|
||||
def volume_widget(prev_color,color,size,fontsize):
|
||||
return[
|
||||
*powerline_arrow('l',prev_color,color,size),
|
||||
widget.Volume(
|
||||
foreground=light_foreground_color,
|
||||
background=color,
|
||||
emoji=True,
|
||||
fontsize=fontsize - 4,
|
||||
),
|
||||
widget.Volume(
|
||||
foreground=light_foreground_color,
|
||||
background=color,
|
||||
fontsize=fontsize,
|
||||
padding=0
|
||||
),
|
||||
Mic(
|
||||
foreground=light_foreground_color,
|
||||
background=color,
|
||||
emoji=True,
|
||||
fontsize=fontsize,
|
||||
),
|
||||
Mic(
|
||||
foreground=light_foreground_color,
|
||||
background=color,
|
||||
fontsize=fontsize,
|
||||
padding=0
|
||||
),
|
||||
widget.TextBox(" ",background=color),
|
||||
]
|
||||
#endregion
|
||||
|
||||
#region System_widgets
|
||||
def launch_htop():
|
||||
qtile.cmd_spawn(term + ' -e htop')
|
||||
|
||||
def System_widgets(prev_color,last_color,size,fontsize):
|
||||
sys_widgets = []
|
||||
sys_widgets.append(*powerline_arrow('l',prev_color,orange_color,size))
|
||||
# first widget is battery for laptop and cpu temp otherwise
|
||||
if chassis_type == ChassisType.LAPTOP:
|
||||
sys_widgets.append(
|
||||
widget.Battery(
|
||||
foreground=light_foreground_color,
|
||||
background=orange_color,
|
||||
fontsize=fontsize,
|
||||
update_interval=1,
|
||||
format="{char} {percent:2.0%}",
|
||||
low_percentage=0.2,
|
||||
notify_below=True,
|
||||
low_foreground=red_color,
|
||||
)
|
||||
)
|
||||
else:
|
||||
sys_widgets.extend([
|
||||
widget.TextBox(
|
||||
text='',
|
||||
foreground=light_foreground_color,
|
||||
background=orange_color,
|
||||
fontsize=fontsize+6
|
||||
),
|
||||
widget.ThermalSensor(
|
||||
foreground=light_foreground_color,
|
||||
background=orange_color,
|
||||
fontsize=fontsize,
|
||||
tag_sensor='Tctl',
|
||||
mouse_callbacks = {"Button1": launch_htop},
|
||||
)
|
||||
])
|
||||
sys_widgets.append(*powerline_arrow('l',orange_color,green_color,size))
|
||||
|
||||
sys_widgets.extend([
|
||||
widget.TextBox(
|
||||
text=' ',
|
||||
foreground=light_foreground_color,
|
||||
background=green_color,
|
||||
fontsize=fontsize
|
||||
),
|
||||
widget.CPU(
|
||||
foreground=light_foreground_color,
|
||||
background=green_color,
|
||||
fontsize=fontsize,
|
||||
format='{load_percent}%' if chassis_type == ChassisType.LAPTOP else'{load_percent}% @ {freq_current}GHz',
|
||||
mouse_callbacks = launch_htop,
|
||||
),
|
||||
*powerline_arrow('l',green_color,yellow_color,size),
|
||||
widget.TextBox(
|
||||
text='',
|
||||
foreground=light_foreground_color,
|
||||
background=yellow_color,
|
||||
fontsize=fontsize
|
||||
),
|
||||
MemoryC(
|
||||
foreground=light_foreground_color,
|
||||
background=yellow_color,
|
||||
fontsize=fontsize,
|
||||
format='{MemUsed}GB|{SwapUsed}GB' if chassis_type == ChassisType.LAPTOP else'{MemUsed}GB({MemPercent}%) | {SwapUsed}GB({SwapPercent}%)',
|
||||
mouse_callbacks = launch_htop,
|
||||
),
|
||||
*powerline_arrow('l',yellow_color,last_color,size),
|
||||
widget.TextBox(
|
||||
text=' ',
|
||||
foreground=light_foreground_color,
|
||||
background=blue_color,
|
||||
fontsize=fontsize
|
||||
),
|
||||
widget.Net(
|
||||
background=last_color,
|
||||
foreground=light_foreground_color,
|
||||
fontsize=fontsize,
|
||||
prefix='M',
|
||||
format='{down:6.2f}{down_suffix}↓{up:6.2f}{up_suffix}↑',
|
||||
mouse_callbacks = launch_htop,
|
||||
)
|
||||
]
|
||||
)
|
||||
return sys_widgets
|
||||
#endregion
|
||||
|
||||
#region End_widgets
|
||||
def end_widgets(prev_color,size,fontsize):
|
||||
return [
|
||||
*powerline_arrow('l',prev_color,purple_color,size),
|
||||
widget.TextBox(
|
||||
text=' ',
|
||||
foreground=light_foreground_color,
|
||||
background=purple_color,
|
||||
fontsize=fontsize
|
||||
),
|
||||
widget.Clock(
|
||||
foreground=light_foreground_color,
|
||||
background=purple_color,
|
||||
fontsize=fontsize,
|
||||
format='%Y-%m-%d'
|
||||
),
|
||||
*powerline_arrow('l',purple_color,base_color,size),
|
||||
widget.Clock(
|
||||
font='dseg7 classic bold',
|
||||
fontsize=16,
|
||||
format='%H:%M'
|
||||
),
|
||||
]
|
||||
#endregion
|
||||
@@ -1,60 +0,0 @@
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
from libqtile import layout, bar, widget, hook
|
||||
from libqtile.config import Key, Drag, Click, Group, Screen, ScratchPad, DropDown
|
||||
from libqtile.command import lazy
|
||||
|
||||
sys.path.append("/home/paul/.config/qtile")
|
||||
|
||||
from defines import hotkey_file
|
||||
from Keys import keys
|
||||
from Groups import groups
|
||||
from Layouts import layouts, floating_layout
|
||||
from Bars import top_bar, left_bar, main_bar, widget_defaults, extension_defaults
|
||||
from Screens import screens
|
||||
|
||||
#region Hooks
|
||||
@hook.subscribe.startup_once
|
||||
def autostart():
|
||||
home = os.path.expanduser('~/.config/qtile/autostart.sh')
|
||||
subprocess.call([home])
|
||||
|
||||
#region miscelanious
|
||||
dgroups_key_binder = None
|
||||
dgroups_app_rules = [] # type: List
|
||||
main = None # WARNING: this is deprecated and will be removed soon
|
||||
follow_mouse_focus = True
|
||||
bring_front_click = True
|
||||
cursor_warp = False
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
|
||||
#region Hotkey_Wallpaper
|
||||
|
||||
#create hotkey textfile
|
||||
# if os.path.isfile(hotkey_file):
|
||||
# os.remove(hotkey_file)
|
||||
# with open(hotkey_file,'w') as file:
|
||||
# for key in keys:
|
||||
# if not str(key.key).startswith("XF86"):
|
||||
# modifiers=""
|
||||
# for modifier in key.modifiers:
|
||||
# modifiers += '{:^7}'.format(
|
||||
# str(modifier).replace("mod1","Alt").replace("mod4","Super").replace("shift","Shift").replace("control","Ctrl")
|
||||
# ) + "+"
|
||||
# file.write('{:30}'.format(modifiers+' '+str(key.key).upper())+"=> "+key.desc)
|
||||
# file.write('\n')
|
||||
#endregion
|
||||
|
||||
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
|
||||
# string besides java UI toolkits; you can see several discussions on the
|
||||
# mailing lists, GitHub issues, and other WM documentation that suggest setting
|
||||
# this string if your java app doesn't work correctly. We may as well just lie
|
||||
# and say that we're a working one by default.
|
||||
#
|
||||
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
|
||||
# java that happens to be on java's whitelist.
|
||||
wmname = "LG3D"
|
||||
#endregion
|
||||
@@ -1,56 +0,0 @@
|
||||
from enum import Enum
|
||||
import subprocess
|
||||
|
||||
term = 'alacritty'
|
||||
focus_color = '#076678'
|
||||
border_width = 2
|
||||
window_margin = 5
|
||||
mod = 'mod4'
|
||||
hotkey_file='/home/paul/Hotkeys'
|
||||
main_screen_res = [3440,1440]
|
||||
top_screen_res = [1440,900]
|
||||
|
||||
#region chassis type detection
|
||||
class ChassisType(Enum):
|
||||
DESKTOP = 0
|
||||
LAPTOP = 1
|
||||
|
||||
def detect_chassis_type() -> ChassisType:
|
||||
try:
|
||||
output = subprocess.check_output(["hostnamectl", "status"], universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Error running hostnamectl:", e)
|
||||
exit(1)
|
||||
return ChassisType.LAPTOP if "Chassis: laptop" in output else ChassisType.DESKTOP
|
||||
|
||||
chassis_type = detect_chassis_type()
|
||||
#endregion
|
||||
|
||||
|
||||
#region colors
|
||||
light_foreground_color = ['#fbf1c7','#fbf1c7']
|
||||
dark_foreground_color = ['#282828','#282828']
|
||||
background_color0 = ['#1d2021','#1d2021']
|
||||
background_color8 = ['#7c6f64','#7c6f64']
|
||||
base_color = background_color0
|
||||
# red
|
||||
red_color = ['#cc241d','#cc241d']
|
||||
light_red_color = ['#fb4934','#fb4934']
|
||||
# green
|
||||
green_color = ['#98971a','#98971a']
|
||||
light_green_color = ['#b8bb26','#b8bb26']
|
||||
#orange
|
||||
orange_color = ['#d65d0e','#d65d0e']
|
||||
# yellow
|
||||
yellow_color = ['#d79921','#d79921']
|
||||
light_yellow_color = ['#fabd2f','#fabd2f']
|
||||
#blue
|
||||
blue_color = ['#076678','#076678']
|
||||
# purple
|
||||
purple_color = ['#b16286','#b16286']
|
||||
light_purple_color = ['#d3869b','#d3869b']
|
||||
# magenta
|
||||
magenta_color = ['#ff79c6','#ff79c6']
|
||||
# cyan
|
||||
cyan_color = ['#8be9fd','#8be9fd']
|
||||
#endregion
|
||||
@@ -1,31 +0,0 @@
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
import os
|
||||
import time
|
||||
|
||||
hotkey_file='/home/paul/Hotkeys'
|
||||
hotkey_picture='/home/paul/Pictures/Wallpapers/Hotkeys.png'
|
||||
|
||||
with open(hotkey_file) as file:
|
||||
lines = [line.rstrip() for line in file]
|
||||
|
||||
text1=''
|
||||
for line in lines[len(lines)//2:]:
|
||||
text1+=line +"\n"
|
||||
|
||||
text2=''
|
||||
for line in lines[:len(lines)//2]:
|
||||
text2+=line +"\n"
|
||||
|
||||
if os.path.isfile(hotkey_picture):
|
||||
os.remove(hotkey_picture)
|
||||
|
||||
fontsize = 20
|
||||
|
||||
image = Image.new(mode = "RGB", size = (1440,900), color=(43,46,59))
|
||||
ImageDraw.Draw(image).text((10,10), text1, font=ImageFont.truetype('/usr/share/fonts/ubuntu/UbuntuMono-R.ttf',fontsize), fill='#ffffff')
|
||||
image.save(hotkey_picture)
|
||||
image = Image.open(hotkey_picture)
|
||||
ImageDraw.Draw(image).text((750,10), text2, font=ImageFont.truetype('/usr/share/fonts/ubuntu/UbuntuMono-R.ttf',fontsize), fill='#ffffff')
|
||||
image.save(hotkey_picture)
|
||||
|
||||
image.show()
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 753 B |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
scrot -s '/tmp/screenshots/%F_%T_$wx$h.png' -e 'echo $f | xclip -selection clipboard -target text/uri-list -i'
|
||||
@@ -1,5 +0,0 @@
|
||||
# This is a test file for anything.
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
subprocess.call([os.path.expanduser('~/.config/qtile/mic_led.sh'), "0"])
|
||||